@sentdm/sentdm 0.26.0 → 0.27.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 +8 -0
- package/client.d.mts +12 -12
- package/client.d.mts.map +1 -1
- package/client.d.ts +12 -12
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/contacts.d.mts +48 -486
- package/resources/contacts.d.mts.map +1 -1
- package/resources/contacts.d.ts +48 -486
- package/resources/contacts.d.ts.map +1 -1
- package/resources/contacts.js +3 -3
- package/resources/contacts.js.map +1 -1
- package/resources/contacts.mjs +3 -3
- package/resources/contacts.mjs.map +1 -1
- package/resources/index.d.mts +6 -6
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -6
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/me.d.mts +40 -113
- package/resources/me.d.mts.map +1 -1
- package/resources/me.d.ts +40 -113
- package/resources/me.d.ts.map +1 -1
- package/resources/me.js.map +1 -1
- package/resources/me.mjs.map +1 -1
- package/resources/messages.d.mts +7 -126
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +7 -126
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs.map +1 -1
- package/resources/numbers.d.mts +3 -42
- package/resources/numbers.d.mts.map +1 -1
- package/resources/numbers.d.ts +3 -42
- package/resources/numbers.d.ts.map +1 -1
- package/resources/numbers.js.map +1 -1
- package/resources/numbers.mjs.map +1 -1
- package/resources/profiles/campaigns.d.mts +149 -480
- package/resources/profiles/campaigns.d.mts.map +1 -1
- package/resources/profiles/campaigns.d.ts +149 -480
- package/resources/profiles/campaigns.d.ts.map +1 -1
- package/resources/profiles/campaigns.js +41 -39
- package/resources/profiles/campaigns.js.map +1 -1
- package/resources/profiles/campaigns.mjs +41 -39
- package/resources/profiles/campaigns.mjs.map +1 -1
- package/resources/profiles/index.d.mts +2 -2
- package/resources/profiles/index.d.mts.map +1 -1
- package/resources/profiles/index.d.ts +2 -2
- package/resources/profiles/index.d.ts.map +1 -1
- package/resources/profiles/index.js.map +1 -1
- package/resources/profiles/index.mjs.map +1 -1
- package/resources/profiles/profiles.d.mts +391 -1699
- package/resources/profiles/profiles.d.mts.map +1 -1
- package/resources/profiles/profiles.d.ts +391 -1699
- package/resources/profiles/profiles.d.ts.map +1 -1
- package/resources/profiles/profiles.js +6 -3
- package/resources/profiles/profiles.js.map +1 -1
- package/resources/profiles/profiles.mjs +6 -3
- package/resources/profiles/profiles.mjs.map +1 -1
- package/resources/templates.d.mts +176 -993
- package/resources/templates.d.mts.map +1 -1
- package/resources/templates.d.ts +176 -993
- package/resources/templates.d.ts.map +1 -1
- package/resources/templates.js +3 -3
- package/resources/templates.js.map +1 -1
- package/resources/templates.mjs +3 -3
- package/resources/templates.mjs.map +1 -1
- package/resources/users.d.mts +46 -373
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +46 -373
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +7 -3
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +7 -3
- package/resources/users.mjs.map +1 -1
- package/resources/webhooks.d.mts +110 -624
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +110 -624
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +7 -6
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +7 -6
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +68 -33
- package/src/resources/contacts.ts +49 -566
- package/src/resources/index.ts +34 -17
- package/src/resources/me.ts +51 -132
- package/src/resources/messages.ts +7 -141
- package/src/resources/numbers.ts +3 -47
- package/src/resources/profiles/campaigns.ts +172 -667
- package/src/resources/profiles/index.ts +17 -5
- package/src/resources/profiles/profiles.ts +549 -2282
- package/src/resources/templates.ts +206 -1256
- package/src/resources/users.ts +47 -430
- package/src/resources/webhooks.ts +120 -742
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
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';
|
|
5
7
|
import { buildHeaders } from '../internal/headers';
|
|
6
8
|
import { RequestOptions } from '../internal/request-options';
|
|
@@ -16,10 +18,10 @@ export class Contacts extends APIResource {
|
|
|
16
18
|
*
|
|
17
19
|
* @example
|
|
18
20
|
* ```ts
|
|
19
|
-
* const
|
|
21
|
+
* const apiResponseOfContact = await client.contacts.create();
|
|
20
22
|
* ```
|
|
21
23
|
*/
|
|
22
|
-
create(params: ContactCreateParams, options?: RequestOptions): APIPromise<
|
|
24
|
+
create(params: ContactCreateParams, options?: RequestOptions): APIPromise<APIResponseOfContact> {
|
|
23
25
|
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
24
26
|
return this._client.post('/v3/contacts', {
|
|
25
27
|
body,
|
|
@@ -41,7 +43,7 @@ export class Contacts extends APIResource {
|
|
|
41
43
|
*
|
|
42
44
|
* @example
|
|
43
45
|
* ```ts
|
|
44
|
-
* const
|
|
46
|
+
* const apiResponseOfContact = await client.contacts.retrieve(
|
|
45
47
|
* '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
|
|
46
48
|
* );
|
|
47
49
|
* ```
|
|
@@ -50,7 +52,7 @@ export class Contacts extends APIResource {
|
|
|
50
52
|
id: string,
|
|
51
53
|
params: ContactRetrieveParams | null | undefined = {},
|
|
52
54
|
options?: RequestOptions,
|
|
53
|
-
): APIPromise<
|
|
55
|
+
): APIPromise<APIResponseOfContact> {
|
|
54
56
|
const { 'x-profile-id': xProfileID } = params ?? {};
|
|
55
57
|
return this._client.get(path`/v3/contacts/${id}`, {
|
|
56
58
|
...options,
|
|
@@ -67,7 +69,7 @@ export class Contacts extends APIResource {
|
|
|
67
69
|
*
|
|
68
70
|
* @example
|
|
69
71
|
* ```ts
|
|
70
|
-
* const
|
|
72
|
+
* const apiResponseOfContact = await client.contacts.update(
|
|
71
73
|
* '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
|
|
72
74
|
* );
|
|
73
75
|
* ```
|
|
@@ -76,7 +78,7 @@ export class Contacts extends APIResource {
|
|
|
76
78
|
id: string,
|
|
77
79
|
params: ContactUpdateParams,
|
|
78
80
|
options?: RequestOptions,
|
|
79
|
-
): APIPromise<
|
|
81
|
+
): APIPromise<APIResponseOfContact> {
|
|
80
82
|
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
81
83
|
return this._client.patch(path`/v3/contacts/${id}`, {
|
|
82
84
|
body,
|
|
@@ -142,21 +144,21 @@ export class Contacts extends APIResource {
|
|
|
142
144
|
/**
|
|
143
145
|
* Standard API response envelope for all v3 endpoints
|
|
144
146
|
*/
|
|
145
|
-
export interface
|
|
147
|
+
export interface APIResponseOfContact {
|
|
146
148
|
/**
|
|
147
149
|
* Contact response for v3 API Uses snake_case for JSON property names
|
|
148
150
|
*/
|
|
149
|
-
data?:
|
|
151
|
+
data?: ContactResponse | null;
|
|
150
152
|
|
|
151
153
|
/**
|
|
152
154
|
* Error information
|
|
153
155
|
*/
|
|
154
|
-
error?:
|
|
156
|
+
error?: WebhooksAPI.ErrorDetail | null;
|
|
155
157
|
|
|
156
158
|
/**
|
|
157
159
|
* Request and response metadata
|
|
158
160
|
*/
|
|
159
|
-
meta?:
|
|
161
|
+
meta?: WebhooksAPI.APIMeta;
|
|
160
162
|
|
|
161
163
|
/**
|
|
162
164
|
* Indicates whether the request was successful
|
|
@@ -164,423 +166,80 @@ export interface ContactCreateResponse {
|
|
|
164
166
|
success?: boolean;
|
|
165
167
|
}
|
|
166
168
|
|
|
167
|
-
export namespace ContactCreateResponse {
|
|
168
|
-
/**
|
|
169
|
-
* Contact response for v3 API Uses snake_case for JSON property names
|
|
170
|
-
*/
|
|
171
|
-
export interface Data {
|
|
172
|
-
/**
|
|
173
|
-
* Unique identifier for the contact
|
|
174
|
-
*/
|
|
175
|
-
id?: string;
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
|
|
179
|
-
*/
|
|
180
|
-
available_channels?: string;
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* Country calling code (e.g., 1 for US/Canada)
|
|
184
|
-
*/
|
|
185
|
-
country_code?: string;
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* When the contact was created
|
|
189
|
-
*/
|
|
190
|
-
created_at?: string;
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* Default messaging channel to use (e.g., "sms" or "whatsapp")
|
|
194
|
-
*/
|
|
195
|
-
default_channel?: string;
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Phone number in E.164 format (e.g., +1234567890)
|
|
199
|
-
*/
|
|
200
|
-
format_e164?: string;
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Phone number in international format (e.g., +1 234-567-890)
|
|
204
|
-
*/
|
|
205
|
-
format_international?: string;
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* Phone number in national format (e.g., (234) 567-890)
|
|
209
|
-
*/
|
|
210
|
-
format_national?: string;
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
|
|
214
|
-
*/
|
|
215
|
-
format_rfc?: string;
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Whether this is an inherited contact (read-only)
|
|
219
|
-
*/
|
|
220
|
-
is_inherited?: boolean;
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
224
|
-
* is per-contact, not per-channel.
|
|
225
|
-
*/
|
|
226
|
-
opt_out?: boolean;
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* Phone number in original format
|
|
230
|
-
*/
|
|
231
|
-
phone_number?: string;
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
|
|
235
|
-
*/
|
|
236
|
-
region_code?: string;
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* When the contact was last updated
|
|
240
|
-
*/
|
|
241
|
-
updated_at?: string | null;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* Error information
|
|
246
|
-
*/
|
|
247
|
-
export interface Error {
|
|
248
|
-
/**
|
|
249
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
250
|
-
*/
|
|
251
|
-
code?: string;
|
|
252
|
-
|
|
253
|
-
/**
|
|
254
|
-
* Additional validation error details (field-level errors)
|
|
255
|
-
*/
|
|
256
|
-
details?: { [key: string]: Array<string> } | null;
|
|
257
|
-
|
|
258
|
-
/**
|
|
259
|
-
* URL to documentation about this error
|
|
260
|
-
*/
|
|
261
|
-
doc_url?: string | null;
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* Human-readable error message
|
|
265
|
-
*/
|
|
266
|
-
message?: string;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* Request and response metadata
|
|
271
|
-
*/
|
|
272
|
-
export interface Meta {
|
|
273
|
-
/**
|
|
274
|
-
* Unique identifier for this request (for tracing and support)
|
|
275
|
-
*/
|
|
276
|
-
request_id?: string;
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* Server timestamp when the response was generated
|
|
280
|
-
*/
|
|
281
|
-
timestamp?: string;
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* API version used for this request
|
|
285
|
-
*/
|
|
286
|
-
version?: string;
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
|
|
290
169
|
/**
|
|
291
|
-
*
|
|
170
|
+
* Contact response for v3 API Uses snake_case for JSON property names
|
|
292
171
|
*/
|
|
293
|
-
export interface
|
|
172
|
+
export interface ContactResponse {
|
|
294
173
|
/**
|
|
295
|
-
*
|
|
174
|
+
* Unique identifier for the contact
|
|
296
175
|
*/
|
|
297
|
-
|
|
176
|
+
id?: string;
|
|
298
177
|
|
|
299
178
|
/**
|
|
300
|
-
*
|
|
179
|
+
* Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
|
|
301
180
|
*/
|
|
302
|
-
|
|
181
|
+
available_channels?: string;
|
|
303
182
|
|
|
304
183
|
/**
|
|
305
|
-
*
|
|
184
|
+
* Country calling code (e.g., 1 for US/Canada)
|
|
306
185
|
*/
|
|
307
|
-
|
|
186
|
+
country_code?: string;
|
|
308
187
|
|
|
309
188
|
/**
|
|
310
|
-
*
|
|
189
|
+
* When the contact was created
|
|
311
190
|
*/
|
|
312
|
-
|
|
313
|
-
}
|
|
191
|
+
created_at?: string;
|
|
314
192
|
|
|
315
|
-
export namespace ContactRetrieveResponse {
|
|
316
193
|
/**
|
|
317
|
-
*
|
|
194
|
+
* Default messaging channel to use (e.g., "sms" or "whatsapp")
|
|
318
195
|
*/
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* Unique identifier for the contact
|
|
322
|
-
*/
|
|
323
|
-
id?: string;
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
* Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
|
|
327
|
-
*/
|
|
328
|
-
available_channels?: string;
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* Country calling code (e.g., 1 for US/Canada)
|
|
332
|
-
*/
|
|
333
|
-
country_code?: string;
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* When the contact was created
|
|
337
|
-
*/
|
|
338
|
-
created_at?: string;
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* Default messaging channel to use (e.g., "sms" or "whatsapp")
|
|
342
|
-
*/
|
|
343
|
-
default_channel?: string;
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* Phone number in E.164 format (e.g., +1234567890)
|
|
347
|
-
*/
|
|
348
|
-
format_e164?: string;
|
|
349
|
-
|
|
350
|
-
/**
|
|
351
|
-
* Phone number in international format (e.g., +1 234-567-890)
|
|
352
|
-
*/
|
|
353
|
-
format_international?: string;
|
|
354
|
-
|
|
355
|
-
/**
|
|
356
|
-
* Phone number in national format (e.g., (234) 567-890)
|
|
357
|
-
*/
|
|
358
|
-
format_national?: string;
|
|
359
|
-
|
|
360
|
-
/**
|
|
361
|
-
* Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
|
|
362
|
-
*/
|
|
363
|
-
format_rfc?: string;
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* Whether this is an inherited contact (read-only)
|
|
367
|
-
*/
|
|
368
|
-
is_inherited?: boolean;
|
|
369
|
-
|
|
370
|
-
/**
|
|
371
|
-
* Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
372
|
-
* is per-contact, not per-channel.
|
|
373
|
-
*/
|
|
374
|
-
opt_out?: boolean;
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* Phone number in original format
|
|
378
|
-
*/
|
|
379
|
-
phone_number?: string;
|
|
380
|
-
|
|
381
|
-
/**
|
|
382
|
-
* ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
|
|
383
|
-
*/
|
|
384
|
-
region_code?: string;
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* When the contact was last updated
|
|
388
|
-
*/
|
|
389
|
-
updated_at?: string | null;
|
|
390
|
-
}
|
|
196
|
+
default_channel?: string;
|
|
391
197
|
|
|
392
198
|
/**
|
|
393
|
-
*
|
|
199
|
+
* Phone number in E.164 format (e.g., +1234567890)
|
|
394
200
|
*/
|
|
395
|
-
|
|
396
|
-
/**
|
|
397
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
398
|
-
*/
|
|
399
|
-
code?: string;
|
|
400
|
-
|
|
401
|
-
/**
|
|
402
|
-
* Additional validation error details (field-level errors)
|
|
403
|
-
*/
|
|
404
|
-
details?: { [key: string]: Array<string> } | null;
|
|
405
|
-
|
|
406
|
-
/**
|
|
407
|
-
* URL to documentation about this error
|
|
408
|
-
*/
|
|
409
|
-
doc_url?: string | null;
|
|
410
|
-
|
|
411
|
-
/**
|
|
412
|
-
* Human-readable error message
|
|
413
|
-
*/
|
|
414
|
-
message?: string;
|
|
415
|
-
}
|
|
201
|
+
format_e164?: string;
|
|
416
202
|
|
|
417
203
|
/**
|
|
418
|
-
*
|
|
204
|
+
* Phone number in international format (e.g., +1 234-567-890)
|
|
419
205
|
*/
|
|
420
|
-
|
|
421
|
-
/**
|
|
422
|
-
* Unique identifier for this request (for tracing and support)
|
|
423
|
-
*/
|
|
424
|
-
request_id?: string;
|
|
425
|
-
|
|
426
|
-
/**
|
|
427
|
-
* Server timestamp when the response was generated
|
|
428
|
-
*/
|
|
429
|
-
timestamp?: string;
|
|
430
|
-
|
|
431
|
-
/**
|
|
432
|
-
* API version used for this request
|
|
433
|
-
*/
|
|
434
|
-
version?: string;
|
|
435
|
-
}
|
|
436
|
-
}
|
|
206
|
+
format_international?: string;
|
|
437
207
|
|
|
438
|
-
/**
|
|
439
|
-
* Standard API response envelope for all v3 endpoints
|
|
440
|
-
*/
|
|
441
|
-
export interface ContactUpdateResponse {
|
|
442
208
|
/**
|
|
443
|
-
*
|
|
209
|
+
* Phone number in national format (e.g., (234) 567-890)
|
|
444
210
|
*/
|
|
445
|
-
|
|
211
|
+
format_national?: string;
|
|
446
212
|
|
|
447
213
|
/**
|
|
448
|
-
*
|
|
214
|
+
* Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
|
|
449
215
|
*/
|
|
450
|
-
|
|
216
|
+
format_rfc?: string;
|
|
451
217
|
|
|
452
218
|
/**
|
|
453
|
-
*
|
|
219
|
+
* Whether this is an inherited contact (read-only)
|
|
454
220
|
*/
|
|
455
|
-
|
|
221
|
+
is_inherited?: boolean;
|
|
456
222
|
|
|
457
223
|
/**
|
|
458
|
-
*
|
|
224
|
+
* Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
225
|
+
* is per-contact, not per-channel.
|
|
459
226
|
*/
|
|
460
|
-
|
|
461
|
-
}
|
|
227
|
+
opt_out?: boolean;
|
|
462
228
|
|
|
463
|
-
export namespace ContactUpdateResponse {
|
|
464
229
|
/**
|
|
465
|
-
*
|
|
230
|
+
* Phone number in original format
|
|
466
231
|
*/
|
|
467
|
-
|
|
468
|
-
/**
|
|
469
|
-
* Unique identifier for the contact
|
|
470
|
-
*/
|
|
471
|
-
id?: string;
|
|
472
|
-
|
|
473
|
-
/**
|
|
474
|
-
* Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
|
|
475
|
-
*/
|
|
476
|
-
available_channels?: string;
|
|
477
|
-
|
|
478
|
-
/**
|
|
479
|
-
* Country calling code (e.g., 1 for US/Canada)
|
|
480
|
-
*/
|
|
481
|
-
country_code?: string;
|
|
482
|
-
|
|
483
|
-
/**
|
|
484
|
-
* When the contact was created
|
|
485
|
-
*/
|
|
486
|
-
created_at?: string;
|
|
487
|
-
|
|
488
|
-
/**
|
|
489
|
-
* Default messaging channel to use (e.g., "sms" or "whatsapp")
|
|
490
|
-
*/
|
|
491
|
-
default_channel?: string;
|
|
492
|
-
|
|
493
|
-
/**
|
|
494
|
-
* Phone number in E.164 format (e.g., +1234567890)
|
|
495
|
-
*/
|
|
496
|
-
format_e164?: string;
|
|
497
|
-
|
|
498
|
-
/**
|
|
499
|
-
* Phone number in international format (e.g., +1 234-567-890)
|
|
500
|
-
*/
|
|
501
|
-
format_international?: string;
|
|
502
|
-
|
|
503
|
-
/**
|
|
504
|
-
* Phone number in national format (e.g., (234) 567-890)
|
|
505
|
-
*/
|
|
506
|
-
format_national?: string;
|
|
507
|
-
|
|
508
|
-
/**
|
|
509
|
-
* Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
|
|
510
|
-
*/
|
|
511
|
-
format_rfc?: string;
|
|
512
|
-
|
|
513
|
-
/**
|
|
514
|
-
* Whether this is an inherited contact (read-only)
|
|
515
|
-
*/
|
|
516
|
-
is_inherited?: boolean;
|
|
517
|
-
|
|
518
|
-
/**
|
|
519
|
-
* Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
520
|
-
* is per-contact, not per-channel.
|
|
521
|
-
*/
|
|
522
|
-
opt_out?: boolean;
|
|
523
|
-
|
|
524
|
-
/**
|
|
525
|
-
* Phone number in original format
|
|
526
|
-
*/
|
|
527
|
-
phone_number?: string;
|
|
528
|
-
|
|
529
|
-
/**
|
|
530
|
-
* ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
|
|
531
|
-
*/
|
|
532
|
-
region_code?: string;
|
|
533
|
-
|
|
534
|
-
/**
|
|
535
|
-
* When the contact was last updated
|
|
536
|
-
*/
|
|
537
|
-
updated_at?: string | null;
|
|
538
|
-
}
|
|
232
|
+
phone_number?: string;
|
|
539
233
|
|
|
540
234
|
/**
|
|
541
|
-
*
|
|
235
|
+
* ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
|
|
542
236
|
*/
|
|
543
|
-
|
|
544
|
-
/**
|
|
545
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
546
|
-
*/
|
|
547
|
-
code?: string;
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* Additional validation error details (field-level errors)
|
|
551
|
-
*/
|
|
552
|
-
details?: { [key: string]: Array<string> } | null;
|
|
553
|
-
|
|
554
|
-
/**
|
|
555
|
-
* URL to documentation about this error
|
|
556
|
-
*/
|
|
557
|
-
doc_url?: string | null;
|
|
558
|
-
|
|
559
|
-
/**
|
|
560
|
-
* Human-readable error message
|
|
561
|
-
*/
|
|
562
|
-
message?: string;
|
|
563
|
-
}
|
|
237
|
+
region_code?: string;
|
|
564
238
|
|
|
565
239
|
/**
|
|
566
|
-
*
|
|
240
|
+
* When the contact was last updated
|
|
567
241
|
*/
|
|
568
|
-
|
|
569
|
-
/**
|
|
570
|
-
* Unique identifier for this request (for tracing and support)
|
|
571
|
-
*/
|
|
572
|
-
request_id?: string;
|
|
573
|
-
|
|
574
|
-
/**
|
|
575
|
-
* Server timestamp when the response was generated
|
|
576
|
-
*/
|
|
577
|
-
timestamp?: string;
|
|
578
|
-
|
|
579
|
-
/**
|
|
580
|
-
* API version used for this request
|
|
581
|
-
*/
|
|
582
|
-
version?: string;
|
|
583
|
-
}
|
|
242
|
+
updated_at?: string | null;
|
|
584
243
|
}
|
|
585
244
|
|
|
586
245
|
/**
|
|
@@ -595,12 +254,12 @@ export interface ContactListResponse {
|
|
|
595
254
|
/**
|
|
596
255
|
* Error information
|
|
597
256
|
*/
|
|
598
|
-
error?:
|
|
257
|
+
error?: WebhooksAPI.ErrorDetail | null;
|
|
599
258
|
|
|
600
259
|
/**
|
|
601
260
|
* Request and response metadata
|
|
602
261
|
*/
|
|
603
|
-
meta?:
|
|
262
|
+
meta?: WebhooksAPI.APIMeta;
|
|
604
263
|
|
|
605
264
|
/**
|
|
606
265
|
* Indicates whether the request was successful
|
|
@@ -616,187 +275,12 @@ export namespace ContactListResponse {
|
|
|
616
275
|
/**
|
|
617
276
|
* List of contacts
|
|
618
277
|
*/
|
|
619
|
-
contacts?: Array<
|
|
620
|
-
|
|
621
|
-
/**
|
|
622
|
-
* Pagination metadata for list responses
|
|
623
|
-
*/
|
|
624
|
-
pagination?: Data.Pagination;
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
export namespace Data {
|
|
628
|
-
/**
|
|
629
|
-
* Contact response for v3 API Uses snake_case for JSON property names
|
|
630
|
-
*/
|
|
631
|
-
export interface Contact {
|
|
632
|
-
/**
|
|
633
|
-
* Unique identifier for the contact
|
|
634
|
-
*/
|
|
635
|
-
id?: string;
|
|
636
|
-
|
|
637
|
-
/**
|
|
638
|
-
* Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
|
|
639
|
-
*/
|
|
640
|
-
available_channels?: string;
|
|
641
|
-
|
|
642
|
-
/**
|
|
643
|
-
* Country calling code (e.g., 1 for US/Canada)
|
|
644
|
-
*/
|
|
645
|
-
country_code?: string;
|
|
646
|
-
|
|
647
|
-
/**
|
|
648
|
-
* When the contact was created
|
|
649
|
-
*/
|
|
650
|
-
created_at?: string;
|
|
651
|
-
|
|
652
|
-
/**
|
|
653
|
-
* Default messaging channel to use (e.g., "sms" or "whatsapp")
|
|
654
|
-
*/
|
|
655
|
-
default_channel?: string;
|
|
656
|
-
|
|
657
|
-
/**
|
|
658
|
-
* Phone number in E.164 format (e.g., +1234567890)
|
|
659
|
-
*/
|
|
660
|
-
format_e164?: string;
|
|
661
|
-
|
|
662
|
-
/**
|
|
663
|
-
* Phone number in international format (e.g., +1 234-567-890)
|
|
664
|
-
*/
|
|
665
|
-
format_international?: string;
|
|
666
|
-
|
|
667
|
-
/**
|
|
668
|
-
* Phone number in national format (e.g., (234) 567-890)
|
|
669
|
-
*/
|
|
670
|
-
format_national?: string;
|
|
671
|
-
|
|
672
|
-
/**
|
|
673
|
-
* Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
|
|
674
|
-
*/
|
|
675
|
-
format_rfc?: string;
|
|
676
|
-
|
|
677
|
-
/**
|
|
678
|
-
* Whether this is an inherited contact (read-only)
|
|
679
|
-
*/
|
|
680
|
-
is_inherited?: boolean;
|
|
681
|
-
|
|
682
|
-
/**
|
|
683
|
-
* Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
684
|
-
* is per-contact, not per-channel.
|
|
685
|
-
*/
|
|
686
|
-
opt_out?: boolean;
|
|
687
|
-
|
|
688
|
-
/**
|
|
689
|
-
* Phone number in original format
|
|
690
|
-
*/
|
|
691
|
-
phone_number?: string;
|
|
692
|
-
|
|
693
|
-
/**
|
|
694
|
-
* ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
|
|
695
|
-
*/
|
|
696
|
-
region_code?: string;
|
|
697
|
-
|
|
698
|
-
/**
|
|
699
|
-
* When the contact was last updated
|
|
700
|
-
*/
|
|
701
|
-
updated_at?: string | null;
|
|
702
|
-
}
|
|
278
|
+
contacts?: Array<ContactsAPI.ContactResponse>;
|
|
703
279
|
|
|
704
280
|
/**
|
|
705
281
|
* Pagination metadata for list responses
|
|
706
282
|
*/
|
|
707
|
-
|
|
708
|
-
/**
|
|
709
|
-
* Cursor-based pagination pointers
|
|
710
|
-
*/
|
|
711
|
-
cursors?: Pagination.Cursors | null;
|
|
712
|
-
|
|
713
|
-
/**
|
|
714
|
-
* Whether there are more pages after this one
|
|
715
|
-
*/
|
|
716
|
-
has_more?: boolean;
|
|
717
|
-
|
|
718
|
-
/**
|
|
719
|
-
* Current page number (1-indexed)
|
|
720
|
-
*/
|
|
721
|
-
page?: number;
|
|
722
|
-
|
|
723
|
-
/**
|
|
724
|
-
* Number of items per page
|
|
725
|
-
*/
|
|
726
|
-
page_size?: number;
|
|
727
|
-
|
|
728
|
-
/**
|
|
729
|
-
* Total number of items across all pages
|
|
730
|
-
*/
|
|
731
|
-
total_count?: number;
|
|
732
|
-
|
|
733
|
-
/**
|
|
734
|
-
* Total number of pages
|
|
735
|
-
*/
|
|
736
|
-
total_pages?: number;
|
|
737
|
-
}
|
|
738
|
-
|
|
739
|
-
export namespace Pagination {
|
|
740
|
-
/**
|
|
741
|
-
* Cursor-based pagination pointers
|
|
742
|
-
*/
|
|
743
|
-
export interface Cursors {
|
|
744
|
-
/**
|
|
745
|
-
* Cursor to fetch the next page
|
|
746
|
-
*/
|
|
747
|
-
after?: string | null;
|
|
748
|
-
|
|
749
|
-
/**
|
|
750
|
-
* Cursor to fetch the previous page
|
|
751
|
-
*/
|
|
752
|
-
before?: string | null;
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
/**
|
|
758
|
-
* Error information
|
|
759
|
-
*/
|
|
760
|
-
export interface Error {
|
|
761
|
-
/**
|
|
762
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
763
|
-
*/
|
|
764
|
-
code?: string;
|
|
765
|
-
|
|
766
|
-
/**
|
|
767
|
-
* Additional validation error details (field-level errors)
|
|
768
|
-
*/
|
|
769
|
-
details?: { [key: string]: Array<string> } | null;
|
|
770
|
-
|
|
771
|
-
/**
|
|
772
|
-
* URL to documentation about this error
|
|
773
|
-
*/
|
|
774
|
-
doc_url?: string | null;
|
|
775
|
-
|
|
776
|
-
/**
|
|
777
|
-
* Human-readable error message
|
|
778
|
-
*/
|
|
779
|
-
message?: string;
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
/**
|
|
783
|
-
* Request and response metadata
|
|
784
|
-
*/
|
|
785
|
-
export interface Meta {
|
|
786
|
-
/**
|
|
787
|
-
* Unique identifier for this request (for tracing and support)
|
|
788
|
-
*/
|
|
789
|
-
request_id?: string;
|
|
790
|
-
|
|
791
|
-
/**
|
|
792
|
-
* Server timestamp when the response was generated
|
|
793
|
-
*/
|
|
794
|
-
timestamp?: string;
|
|
795
|
-
|
|
796
|
-
/**
|
|
797
|
-
* API version used for this request
|
|
798
|
-
*/
|
|
799
|
-
version?: string;
|
|
283
|
+
pagination?: WebhooksAPI.PaginationMeta;
|
|
800
284
|
}
|
|
801
285
|
}
|
|
802
286
|
|
|
@@ -919,9 +403,8 @@ export interface ContactDeleteParams {
|
|
|
919
403
|
|
|
920
404
|
export declare namespace Contacts {
|
|
921
405
|
export {
|
|
922
|
-
type
|
|
923
|
-
type
|
|
924
|
-
type ContactUpdateResponse as ContactUpdateResponse,
|
|
406
|
+
type APIResponseOfContact as APIResponseOfContact,
|
|
407
|
+
type ContactResponse as ContactResponse,
|
|
925
408
|
type ContactListResponse as ContactListResponse,
|
|
926
409
|
type ContactCreateParams as ContactCreateParams,
|
|
927
410
|
type ContactRetrieveParams as ContactRetrieveParams,
|