Appearance
DoCurious API Reference / types / Gift
Interface: Gift
Defined in: types/gift.types.ts:55
A challenge gift sent from one user to another.
Remarks
Gifts can be sent to existing users (recipientUserId) or to an email address (recipientEmail) for users not yet on the platform. Gifts are not available to Tier 1 school-only students.
Example
ts
const gift: Gift = {
id: 'gift-001',
createdAt: '2025-10-01T10:00:00Z',
updatedAt: '2025-10-01T10:00:00Z',
senderUserId: 'usr-042',
recipientUserId: 'usr-099',
challengeId: 'ch-042',
status: 'pending',
personalMessage: 'Thought you would love this!',
sentAt: '2025-10-01T10:00:00Z',
expiresAt: '2025-10-15T10:00:00Z',
}Extends
Properties
acceptedAt?
optionalacceptedAt:string
Defined in: types/gift.types.ts:71
challenge?
optionalchallenge:Challenge
Defined in: types/gift.types.ts:77
challengeId
challengeId:
string
Defined in: types/gift.types.ts:63
createdAt
createdAt:
string
Defined in: types/common.types.ts:154
ISO 8601 datetime when the entity was created
Inherited from
declinedAt?
optionaldeclinedAt:string
Defined in: types/gift.types.ts:72
expiresAt
expiresAt:
string
Defined in: types/gift.types.ts:74
ISO datetime after which this gift can no longer be accepted
id
id:
string
Defined in: types/common.types.ts:167
Inherited from
personalMessage?
optionalpersonalMessage:string
Defined in: types/gift.types.ts:68
Optional personal message from the sender displayed with the gift
recipient?
optionalrecipient:object
Defined in: types/gift.types.ts:83
avatarUrl?
optionalavatarUrl:string
displayName
displayName:
string
id
id:
string
recipientEmail?
optionalrecipientEmail:string
Defined in: types/gift.types.ts:61
Recipient's email (for gifting to non-registered users)
recipientUserId?
optionalrecipientUserId:string
Defined in: types/gift.types.ts:59
Recipient's user ID (for existing platform members)
sender?
optionalsender:object
Defined in: types/gift.types.ts:78
avatarUrl?
optionalavatarUrl:string
displayName
displayName:
string
id
id:
string
senderUserId
senderUserId:
string
Defined in: types/gift.types.ts:56
sentAt
sentAt:
string
Defined in: types/gift.types.ts:70
status
status:
GiftStatus
Defined in: types/gift.types.ts:65
updatedAt
updatedAt:
string
Defined in: types/common.types.ts:156
ISO 8601 datetime when the entity was last modified