@sentdm/sentdm 0.7.2 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +117 -0
- package/README.md +71 -34
- package/client.d.mts +49 -21
- package/client.d.mts.map +1 -1
- package/client.d.ts +49 -21
- package/client.d.ts.map +1 -1
- package/client.js +52 -38
- package/client.js.map +1 -1
- package/client.mjs +52 -38
- package/client.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +0 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +0 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/query.d.mts +5 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +5 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +23 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +20 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils.d.mts +1 -0
- package/internal/utils.d.ts +1 -0
- package/internal/utils.js +1 -0
- package/internal/utils.js.map +1 -1
- package/internal/utils.mjs +1 -0
- package/package.json +7 -1
- package/resources/contacts.d.mts +243 -49
- package/resources/contacts.d.mts.map +1 -1
- package/resources/contacts.d.ts +243 -49
- package/resources/contacts.d.ts.map +1 -1
- package/resources/contacts.js +112 -15
- package/resources/contacts.js.map +1 -1
- package/resources/contacts.mjs +112 -15
- package/resources/contacts.mjs.map +1 -1
- package/resources/index.d.mts +8 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +8 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +11 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +5 -1
- package/resources/index.mjs.map +1 -1
- package/resources/me.d.mts +269 -0
- package/resources/me.d.mts.map +1 -0
- package/resources/me.d.ts +269 -0
- package/resources/me.d.ts.map +1 -0
- package/resources/me.js +40 -0
- package/resources/me.js.map +1 -0
- package/resources/me.mjs +36 -0
- package/resources/me.mjs.map +1 -0
- package/resources/messages.d.mts +239 -133
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +239 -133
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +42 -50
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +42 -50
- package/resources/messages.mjs.map +1 -1
- package/resources/numbers.d.mts +70 -0
- package/resources/numbers.d.mts.map +1 -0
- package/resources/numbers.d.ts +70 -0
- package/resources/numbers.d.ts.map +1 -0
- package/resources/numbers.js +36 -0
- package/resources/numbers.js.map +1 -0
- package/resources/numbers.mjs +32 -0
- package/resources/numbers.mjs.map +1 -0
- package/resources/profiles/campaigns.d.mts +339 -0
- package/resources/profiles/campaigns.d.mts.map +1 -0
- package/resources/profiles/campaigns.d.ts +339 -0
- package/resources/profiles/campaigns.d.ts.map +1 -0
- package/resources/profiles/campaigns.js +148 -0
- package/resources/profiles/campaigns.js.map +1 -0
- package/resources/profiles/campaigns.mjs +144 -0
- package/resources/profiles/campaigns.mjs.map +1 -0
- package/resources/profiles/index.d.mts +3 -0
- package/resources/profiles/index.d.mts.map +1 -0
- package/resources/profiles/index.d.ts +3 -0
- package/resources/profiles/index.d.ts.map +1 -0
- package/resources/profiles/index.js +9 -0
- package/resources/profiles/index.js.map +1 -0
- package/resources/profiles/index.mjs +4 -0
- package/resources/profiles/index.mjs.map +1 -0
- package/resources/profiles/profiles.d.mts +967 -0
- package/resources/profiles/profiles.d.mts.map +1 -0
- package/resources/profiles/profiles.d.ts +967 -0
- package/resources/profiles/profiles.d.ts.map +1 -0
- package/resources/profiles/profiles.js +227 -0
- package/resources/profiles/profiles.js.map +1 -0
- package/resources/profiles/profiles.mjs +222 -0
- package/resources/profiles/profiles.mjs.map +1 -0
- package/resources/profiles.d.mts +2 -0
- package/resources/profiles.d.mts.map +1 -0
- package/resources/profiles.d.ts +2 -0
- package/resources/profiles.d.ts.map +1 -0
- package/resources/profiles.js +6 -0
- package/resources/profiles.js.map +1 -0
- package/resources/profiles.mjs +3 -0
- package/resources/profiles.mjs.map +1 -0
- package/resources/templates.d.mts +327 -191
- package/resources/templates.d.mts.map +1 -1
- package/resources/templates.d.ts +327 -191
- package/resources/templates.d.ts.map +1 -1
- package/resources/templates.js +80 -35
- package/resources/templates.js.map +1 -1
- package/resources/templates.mjs +80 -35
- package/resources/templates.mjs.map +1 -1
- package/resources/users.d.mts +251 -0
- package/resources/users.d.mts.map +1 -0
- package/resources/users.d.ts +251 -0
- package/resources/users.d.ts.map +1 -0
- package/resources/users.js +124 -0
- package/resources/users.js.map +1 -0
- package/resources/users.mjs +120 -0
- package/resources/users.mjs.map +1 -0
- package/resources/webhooks.d.mts +639 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +639 -0
- package/resources/webhooks.d.ts.map +1 -0
- package/resources/webhooks.js +237 -0
- package/resources/webhooks.js.map +1 -0
- package/resources/webhooks.mjs +233 -0
- package/resources/webhooks.mjs.map +1 -0
- package/src/client.ts +228 -80
- package/src/internal/utils/log.ts +0 -1
- package/src/internal/utils/query.ts +23 -0
- package/src/internal/utils.ts +1 -0
- package/src/resources/contacts.ts +335 -57
- package/src/resources/index.ts +81 -12
- package/src/resources/me.ts +333 -0
- package/src/resources/messages.ts +306 -147
- package/src/resources/numbers.ts +102 -0
- package/src/resources/profiles/campaigns.ts +501 -0
- package/src/resources/profiles/index.ts +38 -0
- package/src/resources/profiles/profiles.ts +1302 -0
- package/src/resources/profiles.ts +3 -0
- package/src/resources/templates.ts +424 -202
- package/src/resources/users.ts +366 -0
- package/src/resources/webhooks.ts +923 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/number-lookup.d.mts +0 -59
- package/resources/number-lookup.d.mts.map +0 -1
- package/resources/number-lookup.d.ts +0 -59
- package/resources/number-lookup.d.ts.map +0 -1
- package/resources/number-lookup.js +0 -17
- package/resources/number-lookup.js.map +0 -1
- package/resources/number-lookup.mjs +0 -13
- package/resources/number-lookup.mjs.map +0 -1
- package/src/resources/number-lookup.ts +0 -80
|
@@ -1,142 +1,420 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
|
+
import * as ContactsAPI from './contacts';
|
|
5
|
+
import * as WebhooksAPI from './webhooks';
|
|
4
6
|
import { APIPromise } from '../core/api-promise';
|
|
7
|
+
import { buildHeaders } from '../internal/headers';
|
|
5
8
|
import { RequestOptions } from '../internal/request-options';
|
|
9
|
+
import { path } from '../internal/utils/path';
|
|
6
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Create, update, and manage customer contact lists
|
|
13
|
+
*/
|
|
7
14
|
export class Contacts extends APIResource {
|
|
8
15
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
16
|
+
* Creates a new contact by phone number and associates it with the authenticated
|
|
17
|
+
* customer.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const apiResponseOfContact = await client.contacts.create();
|
|
22
|
+
* ```
|
|
12
23
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
24
|
+
create(params: ContactCreateParams, options?: RequestOptions): APIPromise<APIResponseOfContact> {
|
|
25
|
+
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
26
|
+
return this._client.post('/v3/contacts', {
|
|
27
|
+
body,
|
|
28
|
+
...options,
|
|
29
|
+
headers: buildHeaders([
|
|
30
|
+
{
|
|
31
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
32
|
+
...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined),
|
|
33
|
+
},
|
|
34
|
+
options?.headers,
|
|
35
|
+
]),
|
|
36
|
+
});
|
|
15
37
|
}
|
|
16
38
|
|
|
17
39
|
/**
|
|
18
|
-
* Retrieves a contact by their
|
|
19
|
-
*
|
|
20
|
-
*
|
|
40
|
+
* Retrieves a specific contact by their unique identifier. Returns detailed
|
|
41
|
+
* contact information including phone formats, available channels, and opt-out
|
|
42
|
+
* status.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const apiResponseOfContact = await client.contacts.retrieve(
|
|
47
|
+
* '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
|
|
48
|
+
* );
|
|
49
|
+
* ```
|
|
21
50
|
*/
|
|
22
|
-
|
|
23
|
-
|
|
51
|
+
retrieve(
|
|
52
|
+
id: string,
|
|
53
|
+
params: ContactRetrieveParams | null | undefined = {},
|
|
24
54
|
options?: RequestOptions,
|
|
25
|
-
): APIPromise<
|
|
26
|
-
|
|
55
|
+
): APIPromise<APIResponseOfContact> {
|
|
56
|
+
const { 'x-profile-id': xProfileID } = params ?? {};
|
|
57
|
+
return this._client.get(path`/v3/contacts/${id}`, {
|
|
58
|
+
...options,
|
|
59
|
+
headers: buildHeaders([
|
|
60
|
+
{ ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
|
|
61
|
+
options?.headers,
|
|
62
|
+
]),
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Updates a contact's default channel and/or opt-out status. Inherited contacts
|
|
68
|
+
* cannot be updated.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* const apiResponseOfContact = await client.contacts.update(
|
|
73
|
+
* '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
|
|
74
|
+
* );
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
update(
|
|
78
|
+
id: string,
|
|
79
|
+
params: ContactUpdateParams,
|
|
80
|
+
options?: RequestOptions,
|
|
81
|
+
): APIPromise<APIResponseOfContact> {
|
|
82
|
+
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
83
|
+
return this._client.patch(path`/v3/contacts/${id}`, {
|
|
84
|
+
body,
|
|
85
|
+
...options,
|
|
86
|
+
headers: buildHeaders([
|
|
87
|
+
{
|
|
88
|
+
...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
|
|
89
|
+
...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined),
|
|
90
|
+
},
|
|
91
|
+
options?.headers,
|
|
92
|
+
]),
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Retrieves a paginated list of contacts for the authenticated customer. Supports
|
|
98
|
+
* filtering by search term, channel, or phone number.
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```ts
|
|
102
|
+
* const contacts = await client.contacts.list({
|
|
103
|
+
* page: 0,
|
|
104
|
+
* page_size: 0,
|
|
105
|
+
* });
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
list(params: ContactListParams, options?: RequestOptions): APIPromise<ContactListResponse> {
|
|
109
|
+
const { 'x-profile-id': xProfileID, ...query } = params;
|
|
110
|
+
return this._client.get('/v3/contacts', {
|
|
111
|
+
query,
|
|
112
|
+
...options,
|
|
113
|
+
headers: buildHeaders([
|
|
114
|
+
{ ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
|
|
115
|
+
options?.headers,
|
|
116
|
+
]),
|
|
117
|
+
});
|
|
27
118
|
}
|
|
28
119
|
|
|
29
120
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
121
|
+
* Dissociates a contact from the authenticated customer. Inherited contacts cannot
|
|
122
|
+
* be deleted.
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* ```ts
|
|
126
|
+
* await client.contacts.delete(
|
|
127
|
+
* '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
|
|
128
|
+
* { body: {} },
|
|
129
|
+
* );
|
|
130
|
+
* ```
|
|
33
131
|
*/
|
|
34
|
-
|
|
35
|
-
|
|
132
|
+
delete(id: string, params: ContactDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
133
|
+
const { body, 'x-profile-id': xProfileID } = params;
|
|
134
|
+
return this._client.delete(path`/v3/contacts/${id}`, {
|
|
135
|
+
body: body,
|
|
136
|
+
...options,
|
|
137
|
+
headers: buildHeaders([
|
|
138
|
+
{ Accept: '*/*', ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
|
|
139
|
+
options?.headers,
|
|
140
|
+
]),
|
|
141
|
+
});
|
|
36
142
|
}
|
|
37
143
|
}
|
|
38
144
|
|
|
39
145
|
/**
|
|
40
|
-
*
|
|
146
|
+
* Standard API response envelope for all v3 endpoints
|
|
147
|
+
*/
|
|
148
|
+
export interface APIResponseOfContact {
|
|
149
|
+
/**
|
|
150
|
+
* Contact response for v3 API Uses snake_case for JSON property names
|
|
151
|
+
*/
|
|
152
|
+
data?: ContactResponse | null;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Error information
|
|
156
|
+
*/
|
|
157
|
+
error?: WebhooksAPI.ErrorDetail | null;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Request and response metadata
|
|
161
|
+
*/
|
|
162
|
+
meta?: WebhooksAPI.APIMeta;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Indicates whether the request was successful
|
|
166
|
+
*/
|
|
167
|
+
success?: boolean;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Contact response for v3 API Uses snake_case for JSON property names
|
|
41
172
|
*/
|
|
42
|
-
export interface
|
|
173
|
+
export interface ContactResponse {
|
|
43
174
|
/**
|
|
44
|
-
*
|
|
175
|
+
* Unique identifier for the contact
|
|
45
176
|
*/
|
|
46
177
|
id?: string;
|
|
47
178
|
|
|
48
179
|
/**
|
|
49
|
-
* Comma-separated list of available messaging channels
|
|
50
|
-
|
|
180
|
+
* Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
|
|
181
|
+
*/
|
|
182
|
+
available_channels?: string;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Country calling code (e.g., 1 for US/Canada)
|
|
186
|
+
*/
|
|
187
|
+
country_code?: string;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* When the contact was created
|
|
191
|
+
*/
|
|
192
|
+
created_at?: string;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Default messaging channel to use (e.g., "sms" or "whatsapp")
|
|
196
|
+
*/
|
|
197
|
+
default_channel?: string;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Phone number in E.164 format (e.g., +1234567890)
|
|
51
201
|
*/
|
|
52
|
-
|
|
202
|
+
format_e164?: string;
|
|
53
203
|
|
|
54
204
|
/**
|
|
55
|
-
*
|
|
205
|
+
* Phone number in international format (e.g., +1 234-567-890)
|
|
56
206
|
*/
|
|
57
|
-
|
|
207
|
+
format_international?: string;
|
|
58
208
|
|
|
59
209
|
/**
|
|
60
|
-
*
|
|
61
|
-
* "whatsapp")
|
|
210
|
+
* Phone number in national format (e.g., (234) 567-890)
|
|
62
211
|
*/
|
|
63
|
-
|
|
212
|
+
format_national?: string;
|
|
64
213
|
|
|
65
214
|
/**
|
|
66
|
-
*
|
|
215
|
+
* Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
|
|
67
216
|
*/
|
|
68
|
-
|
|
217
|
+
format_rfc?: string;
|
|
69
218
|
|
|
70
219
|
/**
|
|
71
|
-
*
|
|
220
|
+
* Whether this is an inherited contact (read-only)
|
|
72
221
|
*/
|
|
73
|
-
|
|
222
|
+
is_inherited?: boolean;
|
|
74
223
|
|
|
75
224
|
/**
|
|
76
|
-
*
|
|
225
|
+
* Whether the contact has opted out of messaging
|
|
77
226
|
*/
|
|
78
|
-
|
|
227
|
+
opt_out?: boolean;
|
|
79
228
|
|
|
80
229
|
/**
|
|
81
|
-
*
|
|
230
|
+
* Phone number in original format
|
|
82
231
|
*/
|
|
83
|
-
|
|
232
|
+
phone_number?: string;
|
|
84
233
|
|
|
85
234
|
/**
|
|
86
|
-
*
|
|
235
|
+
* ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
|
|
87
236
|
*/
|
|
88
|
-
|
|
237
|
+
region_code?: string;
|
|
89
238
|
|
|
90
239
|
/**
|
|
91
|
-
*
|
|
240
|
+
* When the contact was last updated
|
|
92
241
|
*/
|
|
93
|
-
|
|
242
|
+
updated_at?: string | null;
|
|
94
243
|
}
|
|
95
244
|
|
|
245
|
+
/**
|
|
246
|
+
* Standard API response envelope for all v3 endpoints
|
|
247
|
+
*/
|
|
96
248
|
export interface ContactListResponse {
|
|
97
|
-
|
|
249
|
+
/**
|
|
250
|
+
* Paginated list of contacts response
|
|
251
|
+
*/
|
|
252
|
+
data?: ContactListResponse.Data | null;
|
|
98
253
|
|
|
99
|
-
|
|
254
|
+
/**
|
|
255
|
+
* Error information
|
|
256
|
+
*/
|
|
257
|
+
error?: WebhooksAPI.ErrorDetail | null;
|
|
100
258
|
|
|
101
|
-
|
|
259
|
+
/**
|
|
260
|
+
* Request and response metadata
|
|
261
|
+
*/
|
|
262
|
+
meta?: WebhooksAPI.APIMeta;
|
|
102
263
|
|
|
103
|
-
|
|
264
|
+
/**
|
|
265
|
+
* Indicates whether the request was successful
|
|
266
|
+
*/
|
|
267
|
+
success?: boolean;
|
|
268
|
+
}
|
|
104
269
|
|
|
105
|
-
|
|
270
|
+
export namespace ContactListResponse {
|
|
271
|
+
/**
|
|
272
|
+
* Paginated list of contacts response
|
|
273
|
+
*/
|
|
274
|
+
export interface Data {
|
|
275
|
+
/**
|
|
276
|
+
* List of contacts
|
|
277
|
+
*/
|
|
278
|
+
contacts?: Array<ContactsAPI.ContactResponse>;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Pagination metadata for list responses
|
|
282
|
+
*/
|
|
283
|
+
pagination?: WebhooksAPI.PaginationMeta;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export interface ContactCreateParams {
|
|
288
|
+
/**
|
|
289
|
+
* Body param: Phone number of the contact to create
|
|
290
|
+
*/
|
|
291
|
+
phone_number?: string;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Body param: Sandbox flag - when true, the operation is simulated without side
|
|
295
|
+
* effects Useful for testing integrations without actual execution
|
|
296
|
+
*/
|
|
297
|
+
sandbox?: boolean;
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
301
|
+
* alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
302
|
+
* hours per key per customer.
|
|
303
|
+
*/
|
|
304
|
+
'Idempotency-Key'?: string;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Header param: Profile UUID to scope the request to a child profile. Only
|
|
308
|
+
* organization API keys can use this header. The profile must belong to the
|
|
309
|
+
* calling organization.
|
|
310
|
+
*/
|
|
311
|
+
'x-profile-id'?: string;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
export interface ContactRetrieveParams {
|
|
315
|
+
/**
|
|
316
|
+
* Profile UUID to scope the request to a child profile. Only organization API keys
|
|
317
|
+
* can use this header. The profile must belong to the calling organization.
|
|
318
|
+
*/
|
|
319
|
+
'x-profile-id'?: string;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export interface ContactUpdateParams {
|
|
323
|
+
/**
|
|
324
|
+
* Body param: Default messaging channel: "sms" or "whatsapp"
|
|
325
|
+
*/
|
|
326
|
+
default_channel?: string | null;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Body param: Whether the contact has opted out of messaging
|
|
330
|
+
*/
|
|
331
|
+
opt_out?: boolean | null;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Body param: Sandbox flag - when true, the operation is simulated without side
|
|
335
|
+
* effects Useful for testing integrations without actual execution
|
|
336
|
+
*/
|
|
337
|
+
sandbox?: boolean;
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
341
|
+
* alphanumeric characters, hyphens, or underscores. Responses are cached for 24
|
|
342
|
+
* hours per key per customer.
|
|
343
|
+
*/
|
|
344
|
+
'Idempotency-Key'?: string;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Header param: Profile UUID to scope the request to a child profile. Only
|
|
348
|
+
* organization API keys can use this header. The profile must belong to the
|
|
349
|
+
* calling organization.
|
|
350
|
+
*/
|
|
351
|
+
'x-profile-id'?: string;
|
|
106
352
|
}
|
|
107
353
|
|
|
108
354
|
export interface ContactListParams {
|
|
109
355
|
/**
|
|
110
|
-
*
|
|
356
|
+
* Query param: Page number (1-indexed)
|
|
111
357
|
*/
|
|
112
358
|
page: number;
|
|
113
359
|
|
|
114
360
|
/**
|
|
115
|
-
*
|
|
361
|
+
* Query param: Number of items per page
|
|
362
|
+
*/
|
|
363
|
+
page_size: number;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Query param: Optional channel filter (sms, whatsapp)
|
|
116
367
|
*/
|
|
117
|
-
|
|
368
|
+
channel?: string | null;
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Query param: Optional phone number filter (alternative to list view)
|
|
372
|
+
*/
|
|
373
|
+
phone?: string | null;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Query param: Optional search term for filtering contacts
|
|
377
|
+
*/
|
|
378
|
+
search?: string | null;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Header param: Profile UUID to scope the request to a child profile. Only
|
|
382
|
+
* organization API keys can use this header. The profile must belong to the
|
|
383
|
+
* calling organization.
|
|
384
|
+
*/
|
|
385
|
+
'x-profile-id'?: string;
|
|
118
386
|
}
|
|
119
387
|
|
|
120
|
-
export interface
|
|
388
|
+
export interface ContactDeleteParams {
|
|
389
|
+
/**
|
|
390
|
+
* Body param: Request to delete/dissociate a contact
|
|
391
|
+
*/
|
|
392
|
+
body: ContactDeleteParams.Body;
|
|
393
|
+
|
|
121
394
|
/**
|
|
122
|
-
*
|
|
395
|
+
* Header param: Profile UUID to scope the request to a child profile. Only
|
|
396
|
+
* organization API keys can use this header. The profile must belong to the
|
|
397
|
+
* calling organization.
|
|
123
398
|
*/
|
|
124
|
-
|
|
399
|
+
'x-profile-id'?: string;
|
|
125
400
|
}
|
|
126
401
|
|
|
127
|
-
export
|
|
402
|
+
export namespace ContactDeleteParams {
|
|
128
403
|
/**
|
|
129
|
-
*
|
|
404
|
+
* Request to delete/dissociate a contact
|
|
130
405
|
*/
|
|
131
|
-
|
|
406
|
+
export interface Body extends WebhooksAPI.MutationRequest {}
|
|
132
407
|
}
|
|
133
408
|
|
|
134
409
|
export declare namespace Contacts {
|
|
135
410
|
export {
|
|
136
|
-
type
|
|
411
|
+
type APIResponseOfContact as APIResponseOfContact,
|
|
412
|
+
type ContactResponse as ContactResponse,
|
|
137
413
|
type ContactListResponse as ContactListResponse,
|
|
414
|
+
type ContactCreateParams as ContactCreateParams,
|
|
415
|
+
type ContactRetrieveParams as ContactRetrieveParams,
|
|
416
|
+
type ContactUpdateParams as ContactUpdateParams,
|
|
138
417
|
type ContactListParams as ContactListParams,
|
|
139
|
-
type
|
|
140
|
-
type ContactRetrieveIDParams as ContactRetrieveIDParams,
|
|
418
|
+
type ContactDeleteParams as ContactDeleteParams,
|
|
141
419
|
};
|
|
142
420
|
}
|
package/src/resources/index.ts
CHANGED
|
@@ -2,31 +2,100 @@
|
|
|
2
2
|
|
|
3
3
|
export {
|
|
4
4
|
Contacts,
|
|
5
|
-
type
|
|
5
|
+
type APIResponseOfContact,
|
|
6
|
+
type ContactResponse,
|
|
6
7
|
type ContactListResponse,
|
|
8
|
+
type ContactCreateParams,
|
|
9
|
+
type ContactRetrieveParams,
|
|
10
|
+
type ContactUpdateParams,
|
|
7
11
|
type ContactListParams,
|
|
8
|
-
type
|
|
9
|
-
type ContactRetrieveIDParams,
|
|
12
|
+
type ContactDeleteParams,
|
|
10
13
|
} from './contacts';
|
|
14
|
+
export { Me, type ProfileSettings, type MeRetrieveResponse, type MeRetrieveParams } from './me';
|
|
11
15
|
export {
|
|
12
16
|
Messages,
|
|
13
|
-
type
|
|
14
|
-
type
|
|
15
|
-
type
|
|
16
|
-
type
|
|
17
|
+
type MessageRetrieveActivitiesResponse,
|
|
18
|
+
type MessageRetrieveStatusResponse,
|
|
19
|
+
type MessageSendResponse,
|
|
20
|
+
type MessageRetrieveActivitiesParams,
|
|
21
|
+
type MessageRetrieveStatusParams,
|
|
22
|
+
type MessageSendParams,
|
|
17
23
|
} from './messages';
|
|
24
|
+
export { Numbers, type NumberLookupResponse, type NumberLookupParams } from './numbers';
|
|
18
25
|
export {
|
|
19
|
-
|
|
20
|
-
type
|
|
21
|
-
type
|
|
22
|
-
|
|
26
|
+
Profiles,
|
|
27
|
+
type APIResponseOfProfileDetail,
|
|
28
|
+
type BillingContactInfo,
|
|
29
|
+
type BrandsBrandData,
|
|
30
|
+
type DestinationCountry,
|
|
31
|
+
type PaymentDetails,
|
|
32
|
+
type ProfileDetail,
|
|
33
|
+
type SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo,
|
|
34
|
+
type SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo,
|
|
35
|
+
type SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo,
|
|
36
|
+
type TcrBrandRelationship,
|
|
37
|
+
type TcrVertical,
|
|
38
|
+
type ProfileListResponse,
|
|
39
|
+
type ProfileCompleteResponse,
|
|
40
|
+
type ProfileCreateParams,
|
|
41
|
+
type ProfileRetrieveParams,
|
|
42
|
+
type ProfileUpdateParams,
|
|
43
|
+
type ProfileListParams,
|
|
44
|
+
type ProfileDeleteParams,
|
|
45
|
+
type ProfileCompleteParams,
|
|
46
|
+
} from './profiles/profiles';
|
|
23
47
|
export {
|
|
24
48
|
Templates,
|
|
49
|
+
type APIResponseTemplate,
|
|
50
|
+
type SentDmServicesCommonContractsPocOsAuthenticationConfig,
|
|
51
|
+
type SentDmServicesCommonContractsPocOsTemplateBody,
|
|
52
|
+
type SentDmServicesCommonContractsPocOsTemplateButton,
|
|
53
|
+
type SentDmServicesCommonContractsPocOsTemplateButtonProps,
|
|
54
|
+
type SentDmServicesCommonContractsPocOsTemplateFooter,
|
|
55
|
+
type SentDmServicesCommonContractsPocOsTemplateHeader,
|
|
56
|
+
type Template,
|
|
25
57
|
type TemplateBodyContent,
|
|
26
58
|
type TemplateDefinition,
|
|
27
|
-
type TemplateResponseV2,
|
|
28
59
|
type TemplateVariable,
|
|
29
60
|
type TemplateListResponse,
|
|
30
61
|
type TemplateCreateParams,
|
|
62
|
+
type TemplateRetrieveParams,
|
|
63
|
+
type TemplateUpdateParams,
|
|
31
64
|
type TemplateListParams,
|
|
65
|
+
type TemplateDeleteParams,
|
|
32
66
|
} from './templates';
|
|
67
|
+
export {
|
|
68
|
+
Users,
|
|
69
|
+
type APIResponseOfUser,
|
|
70
|
+
type UserResponse,
|
|
71
|
+
type UserListResponse,
|
|
72
|
+
type UserRetrieveParams,
|
|
73
|
+
type UserListParams,
|
|
74
|
+
type UserInviteParams,
|
|
75
|
+
type UserRemoveParams,
|
|
76
|
+
type UserUpdateRoleParams,
|
|
77
|
+
} from './users';
|
|
78
|
+
export {
|
|
79
|
+
Webhooks,
|
|
80
|
+
type APIMeta,
|
|
81
|
+
type APIResponseWebhook,
|
|
82
|
+
type ErrorDetail,
|
|
83
|
+
type MutationRequest,
|
|
84
|
+
type PaginationMeta,
|
|
85
|
+
type WebhookResponse,
|
|
86
|
+
type WebhookListResponse,
|
|
87
|
+
type WebhookListEventTypesResponse,
|
|
88
|
+
type WebhookListEventsResponse,
|
|
89
|
+
type WebhookRotateSecretResponse,
|
|
90
|
+
type WebhookTestResponse,
|
|
91
|
+
type WebhookCreateParams,
|
|
92
|
+
type WebhookRetrieveParams,
|
|
93
|
+
type WebhookUpdateParams,
|
|
94
|
+
type WebhookListParams,
|
|
95
|
+
type WebhookDeleteParams,
|
|
96
|
+
type WebhookListEventTypesParams,
|
|
97
|
+
type WebhookListEventsParams,
|
|
98
|
+
type WebhookRotateSecretParams,
|
|
99
|
+
type WebhookTestParams,
|
|
100
|
+
type WebhookToggleStatusParams,
|
|
101
|
+
} from './webhooks';
|