-
Notifications
You must be signed in to change notification settings - Fork 10
/
types.ts
34 lines (30 loc) · 878 Bytes
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import type {
Attributes,
ConnectedAudienceObject,
TriggerProperties,
UserAlias,
} from '../../common/types'
/**
* Request body for sending campaign messages via API-triggered delivery.
*
* {@link https://www.braze.com/docs/api/endpoints/messaging/send_messages/post_send_triggered_campaigns/#request-body}
*/
export interface CampaignsTriggerSendObject {
campaign_id: string
send_id?: string
trigger_properties?: TriggerProperties
broadcast?: boolean
audience?: ConnectedAudienceObject
recipients?: (RecipientWithExternalUserId | RecipientWithUserAlias)[]
}
interface Recipient {
trigger_properties?: TriggerProperties
send_to_existing_only?: boolean
attributes?: Attributes
}
interface RecipientWithExternalUserId extends Recipient {
external_user_id: string
}
interface RecipientWithUserAlias extends Recipient {
user_alias: UserAlias
}