-
Notifications
You must be signed in to change notification settings - Fork 10
/
types.ts
34 lines (30 loc) · 1023 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
/**
* Request body for update user’s subscription group status.
*
* {@link https://www.braze.com/docs/api/endpoints/subscription_groups/post_update_user_subscription_group_status/#request-body}
*/
export type SubscriptionStatusSetObject =
| SubscriptionStatusSetWithPhone
| SubscriptionStatusSetWithEmail
/**
* Request body for get users’ subscription group status.
*
* {@link https://www.braze.com/docs/api/endpoints/subscription_groups/get_list_user_subscription_group_status/#request-parameters}
*/
export interface SubscriptionStatusGetObject {
subscription_group_id: string
external_id?: string | string[]
email?: string | string[]
phone?: string | string[]
}
interface SubscriptionStatusSet {
subscription_group_id: string
subscription_state: 'unsubscribed' | 'subscribed'
external_id: string[]
}
interface SubscriptionStatusSetWithPhone extends SubscriptionStatusSet {
phone: string[]
}
interface SubscriptionStatusSetWithEmail extends SubscriptionStatusSet {
email: string[]
}