@sentdm/sentdm 0.35.0 → 0.37.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 +18 -0
- package/client.d.mts +14 -14
- package/client.d.mts.map +1 -1
- package/client.d.ts +14 -14
- 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 +85 -589
- package/resources/contacts.d.mts.map +1 -1
- package/resources/contacts.d.ts +85 -589
- package/resources/contacts.d.ts.map +1 -1
- package/resources/contacts.js +4 -4
- package/resources/contacts.js.map +1 -1
- package/resources/contacts.mjs +4 -4
- package/resources/contacts.mjs.map +1 -1
- package/resources/conversations.d.mts +69 -328
- package/resources/conversations.d.mts.map +1 -1
- package/resources/conversations.d.ts +69 -328
- package/resources/conversations.d.ts.map +1 -1
- package/resources/conversations.js +10 -8
- package/resources/conversations.js.map +1 -1
- package/resources/conversations.mjs +10 -8
- package/resources/conversations.mjs.map +1 -1
- package/resources/index.d.mts +7 -7
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +7 -7
- 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 +81 -129
- package/resources/me.d.mts.map +1 -1
- package/resources/me.d.ts +81 -129
- package/resources/me.d.ts.map +1 -1
- package/resources/me.js +11 -0
- package/resources/me.js.map +1 -1
- package/resources/me.mjs +11 -0
- package/resources/me.mjs.map +1 -1
- package/resources/messages.d.mts +8 -171
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +8 -171
- 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 -544
- package/resources/profiles/campaigns.d.mts.map +1 -1
- package/resources/profiles/campaigns.d.ts +149 -544
- package/resources/profiles/campaigns.d.ts.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 +411 -1821
- package/resources/profiles/profiles.d.mts.map +1 -1
- package/resources/profiles/profiles.d.ts +411 -1821
- package/resources/profiles/profiles.d.ts.map +1 -1
- package/resources/profiles/profiles.js.map +1 -1
- package/resources/profiles/profiles.mjs.map +1 -1
- package/resources/templates.d.mts +84 -486
- package/resources/templates.d.mts.map +1 -1
- package/resources/templates.d.ts +84 -486
- 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 +47 -437
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +47 -437
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +3 -3
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +3 -3
- package/resources/users.mjs.map +1 -1
- package/resources/webhooks.d.mts +189 -768
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +189 -768
- 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 +52 -39
- package/src/resources/contacts.ts +88 -678
- package/src/resources/conversations.ts +77 -393
- package/src/resources/index.ts +26 -20
- package/src/resources/me.ts +94 -148
- package/src/resources/messages.ts +8 -194
- package/src/resources/numbers.ts +3 -47
- package/src/resources/profiles/campaigns.ts +174 -673
- package/src/resources/profiles/index.ts +14 -6
- package/src/resources/profiles/profiles.ts +529 -2216
- package/src/resources/templates.ts +100 -572
- package/src/resources/users.ts +48 -505
- package/src/resources/webhooks.ts +297 -996
- 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 TemplatesAPI from './templates';
|
|
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';
|
|
@@ -19,10 +21,10 @@ export class Templates extends APIResource {
|
|
|
19
21
|
*
|
|
20
22
|
* @example
|
|
21
23
|
* ```ts
|
|
22
|
-
* const
|
|
24
|
+
* const apiResponseTemplate = await client.templates.create();
|
|
23
25
|
* ```
|
|
24
26
|
*/
|
|
25
|
-
create(params: TemplateCreateParams, options?: RequestOptions): APIPromise<
|
|
27
|
+
create(params: TemplateCreateParams, options?: RequestOptions): APIPromise<APIResponseTemplate> {
|
|
26
28
|
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
27
29
|
return this._client.post('/v3/templates', {
|
|
28
30
|
body,
|
|
@@ -43,7 +45,7 @@ export class Templates extends APIResource {
|
|
|
43
45
|
*
|
|
44
46
|
* @example
|
|
45
47
|
* ```ts
|
|
46
|
-
* const
|
|
48
|
+
* const apiResponseTemplate = await client.templates.retrieve(
|
|
47
49
|
* '7ba7b820-9dad-11d1-80b4-00c04fd430c8',
|
|
48
50
|
* );
|
|
49
51
|
* ```
|
|
@@ -52,7 +54,7 @@ export class Templates extends APIResource {
|
|
|
52
54
|
id: string,
|
|
53
55
|
params: TemplateRetrieveParams | null | undefined = {},
|
|
54
56
|
options?: RequestOptions,
|
|
55
|
-
): APIPromise<
|
|
57
|
+
): APIPromise<APIResponseTemplate> {
|
|
56
58
|
const { 'x-profile-id': xProfileID } = params ?? {};
|
|
57
59
|
return this._client.get(path`/v3/templates/${id}`, {
|
|
58
60
|
...options,
|
|
@@ -69,7 +71,7 @@ export class Templates extends APIResource {
|
|
|
69
71
|
*
|
|
70
72
|
* @example
|
|
71
73
|
* ```ts
|
|
72
|
-
* const
|
|
74
|
+
* const apiResponseTemplate = await client.templates.update(
|
|
73
75
|
* '7ba7b820-9dad-11d1-80b4-00c04fd430c8',
|
|
74
76
|
* );
|
|
75
77
|
* ```
|
|
@@ -78,7 +80,7 @@ export class Templates extends APIResource {
|
|
|
78
80
|
id: string,
|
|
79
81
|
params: TemplateUpdateParams,
|
|
80
82
|
options?: RequestOptions,
|
|
81
|
-
): APIPromise<
|
|
83
|
+
): APIPromise<APIResponseTemplate> {
|
|
82
84
|
const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
|
|
83
85
|
return this._client.put(path`/v3/templates/${id}`, {
|
|
84
86
|
body,
|
|
@@ -141,6 +143,31 @@ export class Templates extends APIResource {
|
|
|
141
143
|
}
|
|
142
144
|
}
|
|
143
145
|
|
|
146
|
+
/**
|
|
147
|
+
* Standard API response envelope for all v3 endpoints
|
|
148
|
+
*/
|
|
149
|
+
export interface APIResponseTemplate {
|
|
150
|
+
/**
|
|
151
|
+
* Template response for v3 API
|
|
152
|
+
*/
|
|
153
|
+
data?: Template | null;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Error information
|
|
157
|
+
*/
|
|
158
|
+
error?: WebhooksAPI.ErrorDetail | null;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Request and response metadata
|
|
162
|
+
*/
|
|
163
|
+
meta?: WebhooksAPI.APIMeta;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Indicates whether the request was successful
|
|
167
|
+
*/
|
|
168
|
+
success?: boolean;
|
|
169
|
+
}
|
|
170
|
+
|
|
144
171
|
/**
|
|
145
172
|
* Configuration for AUTHENTICATION category templates
|
|
146
173
|
*/
|
|
@@ -158,6 +185,67 @@ export interface AuthenticationConfig {
|
|
|
158
185
|
codeExpirationMinutes?: number | null;
|
|
159
186
|
}
|
|
160
187
|
|
|
188
|
+
/**
|
|
189
|
+
* Template response for v3 API
|
|
190
|
+
*/
|
|
191
|
+
export interface Template {
|
|
192
|
+
/**
|
|
193
|
+
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
194
|
+
* Says whose resource this is, which the resource's own id does not.
|
|
195
|
+
*/
|
|
196
|
+
customer_id: string;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Unique template identifier
|
|
200
|
+
*/
|
|
201
|
+
id?: string;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Template category: MARKETING, UTILITY, AUTHENTICATION
|
|
205
|
+
*/
|
|
206
|
+
category?: string;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Supported channels: sms, whatsapp
|
|
210
|
+
*/
|
|
211
|
+
channels?: Array<string> | null;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* When the template was created
|
|
215
|
+
*/
|
|
216
|
+
created_at?: string;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Whether the template is published and active
|
|
220
|
+
*/
|
|
221
|
+
is_published?: boolean;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Template language code (e.g., en_US)
|
|
225
|
+
*/
|
|
226
|
+
language?: string;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Template display name
|
|
230
|
+
*/
|
|
231
|
+
name?: string;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Template status: APPROVED, PENDING, REJECTED
|
|
235
|
+
*/
|
|
236
|
+
status?: string;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* When the template was last updated
|
|
240
|
+
*/
|
|
241
|
+
updated_at?: string | null;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Template variables for personalization
|
|
245
|
+
*/
|
|
246
|
+
variables?: Array<string> | null;
|
|
247
|
+
}
|
|
248
|
+
|
|
161
249
|
/**
|
|
162
250
|
* Body section of a message template with channel-specific content
|
|
163
251
|
*/
|
|
@@ -351,405 +439,6 @@ export namespace TemplateVariable {
|
|
|
351
439
|
}
|
|
352
440
|
}
|
|
353
441
|
|
|
354
|
-
/**
|
|
355
|
-
* Standard API response envelope for all v3 endpoints
|
|
356
|
-
*/
|
|
357
|
-
export interface TemplateCreateResponse {
|
|
358
|
-
/**
|
|
359
|
-
* Template response for v3 API
|
|
360
|
-
*/
|
|
361
|
-
data?: TemplateCreateResponse.Data | null;
|
|
362
|
-
|
|
363
|
-
/**
|
|
364
|
-
* Error information
|
|
365
|
-
*/
|
|
366
|
-
error?: TemplateCreateResponse.Error | null;
|
|
367
|
-
|
|
368
|
-
/**
|
|
369
|
-
* Request and response metadata
|
|
370
|
-
*/
|
|
371
|
-
meta?: TemplateCreateResponse.Meta;
|
|
372
|
-
|
|
373
|
-
/**
|
|
374
|
-
* Indicates whether the request was successful
|
|
375
|
-
*/
|
|
376
|
-
success?: boolean;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
export namespace TemplateCreateResponse {
|
|
380
|
-
/**
|
|
381
|
-
* Template response for v3 API
|
|
382
|
-
*/
|
|
383
|
-
export interface Data {
|
|
384
|
-
/**
|
|
385
|
-
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
386
|
-
* Says whose resource this is, which the resource's own id does not.
|
|
387
|
-
*/
|
|
388
|
-
customer_id: string;
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* Unique template identifier
|
|
392
|
-
*/
|
|
393
|
-
id?: string;
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
* Template category: MARKETING, UTILITY, AUTHENTICATION
|
|
397
|
-
*/
|
|
398
|
-
category?: string;
|
|
399
|
-
|
|
400
|
-
/**
|
|
401
|
-
* Supported channels: sms, whatsapp
|
|
402
|
-
*/
|
|
403
|
-
channels?: Array<string> | null;
|
|
404
|
-
|
|
405
|
-
/**
|
|
406
|
-
* When the template was created
|
|
407
|
-
*/
|
|
408
|
-
created_at?: string;
|
|
409
|
-
|
|
410
|
-
/**
|
|
411
|
-
* Whether the template is published and active
|
|
412
|
-
*/
|
|
413
|
-
is_published?: boolean;
|
|
414
|
-
|
|
415
|
-
/**
|
|
416
|
-
* Template language code (e.g., en_US)
|
|
417
|
-
*/
|
|
418
|
-
language?: string;
|
|
419
|
-
|
|
420
|
-
/**
|
|
421
|
-
* Template display name
|
|
422
|
-
*/
|
|
423
|
-
name?: string;
|
|
424
|
-
|
|
425
|
-
/**
|
|
426
|
-
* Template status: APPROVED, PENDING, REJECTED
|
|
427
|
-
*/
|
|
428
|
-
status?: string;
|
|
429
|
-
|
|
430
|
-
/**
|
|
431
|
-
* When the template was last updated
|
|
432
|
-
*/
|
|
433
|
-
updated_at?: string | null;
|
|
434
|
-
|
|
435
|
-
/**
|
|
436
|
-
* Template variables for personalization
|
|
437
|
-
*/
|
|
438
|
-
variables?: Array<string> | null;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
/**
|
|
442
|
-
* Error information
|
|
443
|
-
*/
|
|
444
|
-
export interface Error {
|
|
445
|
-
/**
|
|
446
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
447
|
-
*/
|
|
448
|
-
code?: string;
|
|
449
|
-
|
|
450
|
-
/**
|
|
451
|
-
* Additional validation error details (field-level errors)
|
|
452
|
-
*/
|
|
453
|
-
details?: { [key: string]: Array<string> } | null;
|
|
454
|
-
|
|
455
|
-
/**
|
|
456
|
-
* URL to documentation about this error
|
|
457
|
-
*/
|
|
458
|
-
doc_url?: string | null;
|
|
459
|
-
|
|
460
|
-
/**
|
|
461
|
-
* Human-readable error message
|
|
462
|
-
*/
|
|
463
|
-
message?: string;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
/**
|
|
467
|
-
* Request and response metadata
|
|
468
|
-
*/
|
|
469
|
-
export interface Meta {
|
|
470
|
-
/**
|
|
471
|
-
* Unique identifier for this request (for tracing and support)
|
|
472
|
-
*/
|
|
473
|
-
request_id?: string;
|
|
474
|
-
|
|
475
|
-
/**
|
|
476
|
-
* Server timestamp when the response was generated
|
|
477
|
-
*/
|
|
478
|
-
timestamp?: string;
|
|
479
|
-
|
|
480
|
-
/**
|
|
481
|
-
* API version used for this request
|
|
482
|
-
*/
|
|
483
|
-
version?: string;
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
/**
|
|
488
|
-
* Standard API response envelope for all v3 endpoints
|
|
489
|
-
*/
|
|
490
|
-
export interface TemplateRetrieveResponse {
|
|
491
|
-
/**
|
|
492
|
-
* Template response for v3 API
|
|
493
|
-
*/
|
|
494
|
-
data?: TemplateRetrieveResponse.Data | null;
|
|
495
|
-
|
|
496
|
-
/**
|
|
497
|
-
* Error information
|
|
498
|
-
*/
|
|
499
|
-
error?: TemplateRetrieveResponse.Error | null;
|
|
500
|
-
|
|
501
|
-
/**
|
|
502
|
-
* Request and response metadata
|
|
503
|
-
*/
|
|
504
|
-
meta?: TemplateRetrieveResponse.Meta;
|
|
505
|
-
|
|
506
|
-
/**
|
|
507
|
-
* Indicates whether the request was successful
|
|
508
|
-
*/
|
|
509
|
-
success?: boolean;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
export namespace TemplateRetrieveResponse {
|
|
513
|
-
/**
|
|
514
|
-
* Template response for v3 API
|
|
515
|
-
*/
|
|
516
|
-
export interface Data {
|
|
517
|
-
/**
|
|
518
|
-
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
519
|
-
* Says whose resource this is, which the resource's own id does not.
|
|
520
|
-
*/
|
|
521
|
-
customer_id: string;
|
|
522
|
-
|
|
523
|
-
/**
|
|
524
|
-
* Unique template identifier
|
|
525
|
-
*/
|
|
526
|
-
id?: string;
|
|
527
|
-
|
|
528
|
-
/**
|
|
529
|
-
* Template category: MARKETING, UTILITY, AUTHENTICATION
|
|
530
|
-
*/
|
|
531
|
-
category?: string;
|
|
532
|
-
|
|
533
|
-
/**
|
|
534
|
-
* Supported channels: sms, whatsapp
|
|
535
|
-
*/
|
|
536
|
-
channels?: Array<string> | null;
|
|
537
|
-
|
|
538
|
-
/**
|
|
539
|
-
* When the template was created
|
|
540
|
-
*/
|
|
541
|
-
created_at?: string;
|
|
542
|
-
|
|
543
|
-
/**
|
|
544
|
-
* Whether the template is published and active
|
|
545
|
-
*/
|
|
546
|
-
is_published?: boolean;
|
|
547
|
-
|
|
548
|
-
/**
|
|
549
|
-
* Template language code (e.g., en_US)
|
|
550
|
-
*/
|
|
551
|
-
language?: string;
|
|
552
|
-
|
|
553
|
-
/**
|
|
554
|
-
* Template display name
|
|
555
|
-
*/
|
|
556
|
-
name?: string;
|
|
557
|
-
|
|
558
|
-
/**
|
|
559
|
-
* Template status: APPROVED, PENDING, REJECTED
|
|
560
|
-
*/
|
|
561
|
-
status?: string;
|
|
562
|
-
|
|
563
|
-
/**
|
|
564
|
-
* When the template was last updated
|
|
565
|
-
*/
|
|
566
|
-
updated_at?: string | null;
|
|
567
|
-
|
|
568
|
-
/**
|
|
569
|
-
* Template variables for personalization
|
|
570
|
-
*/
|
|
571
|
-
variables?: Array<string> | null;
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
/**
|
|
575
|
-
* Error information
|
|
576
|
-
*/
|
|
577
|
-
export interface Error {
|
|
578
|
-
/**
|
|
579
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
580
|
-
*/
|
|
581
|
-
code?: string;
|
|
582
|
-
|
|
583
|
-
/**
|
|
584
|
-
* Additional validation error details (field-level errors)
|
|
585
|
-
*/
|
|
586
|
-
details?: { [key: string]: Array<string> } | null;
|
|
587
|
-
|
|
588
|
-
/**
|
|
589
|
-
* URL to documentation about this error
|
|
590
|
-
*/
|
|
591
|
-
doc_url?: string | null;
|
|
592
|
-
|
|
593
|
-
/**
|
|
594
|
-
* Human-readable error message
|
|
595
|
-
*/
|
|
596
|
-
message?: string;
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
/**
|
|
600
|
-
* Request and response metadata
|
|
601
|
-
*/
|
|
602
|
-
export interface Meta {
|
|
603
|
-
/**
|
|
604
|
-
* Unique identifier for this request (for tracing and support)
|
|
605
|
-
*/
|
|
606
|
-
request_id?: string;
|
|
607
|
-
|
|
608
|
-
/**
|
|
609
|
-
* Server timestamp when the response was generated
|
|
610
|
-
*/
|
|
611
|
-
timestamp?: string;
|
|
612
|
-
|
|
613
|
-
/**
|
|
614
|
-
* API version used for this request
|
|
615
|
-
*/
|
|
616
|
-
version?: string;
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
/**
|
|
621
|
-
* Standard API response envelope for all v3 endpoints
|
|
622
|
-
*/
|
|
623
|
-
export interface TemplateUpdateResponse {
|
|
624
|
-
/**
|
|
625
|
-
* Template response for v3 API
|
|
626
|
-
*/
|
|
627
|
-
data?: TemplateUpdateResponse.Data | null;
|
|
628
|
-
|
|
629
|
-
/**
|
|
630
|
-
* Error information
|
|
631
|
-
*/
|
|
632
|
-
error?: TemplateUpdateResponse.Error | null;
|
|
633
|
-
|
|
634
|
-
/**
|
|
635
|
-
* Request and response metadata
|
|
636
|
-
*/
|
|
637
|
-
meta?: TemplateUpdateResponse.Meta;
|
|
638
|
-
|
|
639
|
-
/**
|
|
640
|
-
* Indicates whether the request was successful
|
|
641
|
-
*/
|
|
642
|
-
success?: boolean;
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
export namespace TemplateUpdateResponse {
|
|
646
|
-
/**
|
|
647
|
-
* Template response for v3 API
|
|
648
|
-
*/
|
|
649
|
-
export interface Data {
|
|
650
|
-
/**
|
|
651
|
-
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
652
|
-
* Says whose resource this is, which the resource's own id does not.
|
|
653
|
-
*/
|
|
654
|
-
customer_id: string;
|
|
655
|
-
|
|
656
|
-
/**
|
|
657
|
-
* Unique template identifier
|
|
658
|
-
*/
|
|
659
|
-
id?: string;
|
|
660
|
-
|
|
661
|
-
/**
|
|
662
|
-
* Template category: MARKETING, UTILITY, AUTHENTICATION
|
|
663
|
-
*/
|
|
664
|
-
category?: string;
|
|
665
|
-
|
|
666
|
-
/**
|
|
667
|
-
* Supported channels: sms, whatsapp
|
|
668
|
-
*/
|
|
669
|
-
channels?: Array<string> | null;
|
|
670
|
-
|
|
671
|
-
/**
|
|
672
|
-
* When the template was created
|
|
673
|
-
*/
|
|
674
|
-
created_at?: string;
|
|
675
|
-
|
|
676
|
-
/**
|
|
677
|
-
* Whether the template is published and active
|
|
678
|
-
*/
|
|
679
|
-
is_published?: boolean;
|
|
680
|
-
|
|
681
|
-
/**
|
|
682
|
-
* Template language code (e.g., en_US)
|
|
683
|
-
*/
|
|
684
|
-
language?: string;
|
|
685
|
-
|
|
686
|
-
/**
|
|
687
|
-
* Template display name
|
|
688
|
-
*/
|
|
689
|
-
name?: string;
|
|
690
|
-
|
|
691
|
-
/**
|
|
692
|
-
* Template status: APPROVED, PENDING, REJECTED
|
|
693
|
-
*/
|
|
694
|
-
status?: string;
|
|
695
|
-
|
|
696
|
-
/**
|
|
697
|
-
* When the template was last updated
|
|
698
|
-
*/
|
|
699
|
-
updated_at?: string | null;
|
|
700
|
-
|
|
701
|
-
/**
|
|
702
|
-
* Template variables for personalization
|
|
703
|
-
*/
|
|
704
|
-
variables?: Array<string> | null;
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
/**
|
|
708
|
-
* Error information
|
|
709
|
-
*/
|
|
710
|
-
export interface Error {
|
|
711
|
-
/**
|
|
712
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
713
|
-
*/
|
|
714
|
-
code?: string;
|
|
715
|
-
|
|
716
|
-
/**
|
|
717
|
-
* Additional validation error details (field-level errors)
|
|
718
|
-
*/
|
|
719
|
-
details?: { [key: string]: Array<string> } | null;
|
|
720
|
-
|
|
721
|
-
/**
|
|
722
|
-
* URL to documentation about this error
|
|
723
|
-
*/
|
|
724
|
-
doc_url?: string | null;
|
|
725
|
-
|
|
726
|
-
/**
|
|
727
|
-
* Human-readable error message
|
|
728
|
-
*/
|
|
729
|
-
message?: string;
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
/**
|
|
733
|
-
* Request and response metadata
|
|
734
|
-
*/
|
|
735
|
-
export interface Meta {
|
|
736
|
-
/**
|
|
737
|
-
* Unique identifier for this request (for tracing and support)
|
|
738
|
-
*/
|
|
739
|
-
request_id?: string;
|
|
740
|
-
|
|
741
|
-
/**
|
|
742
|
-
* Server timestamp when the response was generated
|
|
743
|
-
*/
|
|
744
|
-
timestamp?: string;
|
|
745
|
-
|
|
746
|
-
/**
|
|
747
|
-
* API version used for this request
|
|
748
|
-
*/
|
|
749
|
-
version?: string;
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
|
|
753
442
|
/**
|
|
754
443
|
* Standard API response envelope for all v3 endpoints
|
|
755
444
|
*/
|
|
@@ -762,12 +451,12 @@ export interface TemplateListResponse {
|
|
|
762
451
|
/**
|
|
763
452
|
* Error information
|
|
764
453
|
*/
|
|
765
|
-
error?:
|
|
454
|
+
error?: WebhooksAPI.ErrorDetail | null;
|
|
766
455
|
|
|
767
456
|
/**
|
|
768
457
|
* Request and response metadata
|
|
769
458
|
*/
|
|
770
|
-
meta?:
|
|
459
|
+
meta?: WebhooksAPI.APIMeta;
|
|
771
460
|
|
|
772
461
|
/**
|
|
773
462
|
* Indicates whether the request was successful
|
|
@@ -783,172 +472,12 @@ export namespace TemplateListResponse {
|
|
|
783
472
|
/**
|
|
784
473
|
* Pagination metadata for list responses
|
|
785
474
|
*/
|
|
786
|
-
pagination?:
|
|
475
|
+
pagination?: WebhooksAPI.PaginationMeta;
|
|
787
476
|
|
|
788
477
|
/**
|
|
789
478
|
* The templates on this page.
|
|
790
479
|
*/
|
|
791
|
-
templates?: Array<
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
export namespace Data {
|
|
795
|
-
/**
|
|
796
|
-
* Pagination metadata for list responses
|
|
797
|
-
*/
|
|
798
|
-
export interface Pagination {
|
|
799
|
-
/**
|
|
800
|
-
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
801
|
-
*/
|
|
802
|
-
cursors?: Pagination.Cursors | null;
|
|
803
|
-
|
|
804
|
-
/**
|
|
805
|
-
* Whether there are more pages after this one
|
|
806
|
-
*/
|
|
807
|
-
has_more?: boolean;
|
|
808
|
-
|
|
809
|
-
/**
|
|
810
|
-
* Current page number (1-indexed)
|
|
811
|
-
*/
|
|
812
|
-
page?: number;
|
|
813
|
-
|
|
814
|
-
/**
|
|
815
|
-
* Number of items per page
|
|
816
|
-
*/
|
|
817
|
-
page_size?: number;
|
|
818
|
-
|
|
819
|
-
/**
|
|
820
|
-
* Total number of items across all pages
|
|
821
|
-
*/
|
|
822
|
-
total_count?: number;
|
|
823
|
-
|
|
824
|
-
/**
|
|
825
|
-
* Total number of pages
|
|
826
|
-
*/
|
|
827
|
-
total_pages?: number;
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
export namespace Pagination {
|
|
831
|
-
/**
|
|
832
|
-
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
833
|
-
*/
|
|
834
|
-
export interface Cursors {
|
|
835
|
-
/**
|
|
836
|
-
* Cursor to fetch the next page.
|
|
837
|
-
*/
|
|
838
|
-
after?: string | null;
|
|
839
|
-
|
|
840
|
-
/**
|
|
841
|
-
* Cursor to fetch the previous page.
|
|
842
|
-
*/
|
|
843
|
-
before?: string | null;
|
|
844
|
-
}
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
/**
|
|
848
|
-
* Template response for v3 API
|
|
849
|
-
*/
|
|
850
|
-
export interface Template {
|
|
851
|
-
/**
|
|
852
|
-
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
853
|
-
* Says whose resource this is, which the resource's own id does not.
|
|
854
|
-
*/
|
|
855
|
-
customer_id: string;
|
|
856
|
-
|
|
857
|
-
/**
|
|
858
|
-
* Unique template identifier
|
|
859
|
-
*/
|
|
860
|
-
id?: string;
|
|
861
|
-
|
|
862
|
-
/**
|
|
863
|
-
* Template category: MARKETING, UTILITY, AUTHENTICATION
|
|
864
|
-
*/
|
|
865
|
-
category?: string;
|
|
866
|
-
|
|
867
|
-
/**
|
|
868
|
-
* Supported channels: sms, whatsapp
|
|
869
|
-
*/
|
|
870
|
-
channels?: Array<string> | null;
|
|
871
|
-
|
|
872
|
-
/**
|
|
873
|
-
* When the template was created
|
|
874
|
-
*/
|
|
875
|
-
created_at?: string;
|
|
876
|
-
|
|
877
|
-
/**
|
|
878
|
-
* Whether the template is published and active
|
|
879
|
-
*/
|
|
880
|
-
is_published?: boolean;
|
|
881
|
-
|
|
882
|
-
/**
|
|
883
|
-
* Template language code (e.g., en_US)
|
|
884
|
-
*/
|
|
885
|
-
language?: string;
|
|
886
|
-
|
|
887
|
-
/**
|
|
888
|
-
* Template display name
|
|
889
|
-
*/
|
|
890
|
-
name?: string;
|
|
891
|
-
|
|
892
|
-
/**
|
|
893
|
-
* Template status: APPROVED, PENDING, REJECTED
|
|
894
|
-
*/
|
|
895
|
-
status?: string;
|
|
896
|
-
|
|
897
|
-
/**
|
|
898
|
-
* When the template was last updated
|
|
899
|
-
*/
|
|
900
|
-
updated_at?: string | null;
|
|
901
|
-
|
|
902
|
-
/**
|
|
903
|
-
* Template variables for personalization
|
|
904
|
-
*/
|
|
905
|
-
variables?: Array<string> | null;
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
/**
|
|
910
|
-
* Error information
|
|
911
|
-
*/
|
|
912
|
-
export interface Error {
|
|
913
|
-
/**
|
|
914
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
915
|
-
*/
|
|
916
|
-
code?: string;
|
|
917
|
-
|
|
918
|
-
/**
|
|
919
|
-
* Additional validation error details (field-level errors)
|
|
920
|
-
*/
|
|
921
|
-
details?: { [key: string]: Array<string> } | null;
|
|
922
|
-
|
|
923
|
-
/**
|
|
924
|
-
* URL to documentation about this error
|
|
925
|
-
*/
|
|
926
|
-
doc_url?: string | null;
|
|
927
|
-
|
|
928
|
-
/**
|
|
929
|
-
* Human-readable error message
|
|
930
|
-
*/
|
|
931
|
-
message?: string;
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
/**
|
|
935
|
-
* Request and response metadata
|
|
936
|
-
*/
|
|
937
|
-
export interface Meta {
|
|
938
|
-
/**
|
|
939
|
-
* Unique identifier for this request (for tracing and support)
|
|
940
|
-
*/
|
|
941
|
-
request_id?: string;
|
|
942
|
-
|
|
943
|
-
/**
|
|
944
|
-
* Server timestamp when the response was generated
|
|
945
|
-
*/
|
|
946
|
-
timestamp?: string;
|
|
947
|
-
|
|
948
|
-
/**
|
|
949
|
-
* API version used for this request
|
|
950
|
-
*/
|
|
951
|
-
version?: string;
|
|
480
|
+
templates?: Array<TemplatesAPI.Template>;
|
|
952
481
|
}
|
|
953
482
|
}
|
|
954
483
|
|
|
@@ -1126,7 +655,9 @@ export interface TemplateDeleteParams {
|
|
|
1126
655
|
|
|
1127
656
|
export declare namespace Templates {
|
|
1128
657
|
export {
|
|
658
|
+
type APIResponseTemplate as APIResponseTemplate,
|
|
1129
659
|
type AuthenticationConfig as AuthenticationConfig,
|
|
660
|
+
type Template as Template,
|
|
1130
661
|
type TemplateBody as TemplateBody,
|
|
1131
662
|
type TemplateBodyContent as TemplateBodyContent,
|
|
1132
663
|
type TemplateButton as TemplateButton,
|
|
@@ -1135,9 +666,6 @@ export declare namespace Templates {
|
|
|
1135
666
|
type TemplateFooter as TemplateFooter,
|
|
1136
667
|
type TemplateHeader as TemplateHeader,
|
|
1137
668
|
type TemplateVariable as TemplateVariable,
|
|
1138
|
-
type TemplateCreateResponse as TemplateCreateResponse,
|
|
1139
|
-
type TemplateRetrieveResponse as TemplateRetrieveResponse,
|
|
1140
|
-
type TemplateUpdateResponse as TemplateUpdateResponse,
|
|
1141
669
|
type TemplateListResponse as TemplateListResponse,
|
|
1142
670
|
type TemplateCreateParams as TemplateCreateParams,
|
|
1143
671
|
type TemplateRetrieveParams as TemplateRetrieveParams,
|