@sentdm/sentdm 0.34.0 → 0.36.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 +15 -0
- package/client.d.mts +53 -22
- package/client.d.mts.map +1 -1
- package/client.d.ts +53 -22
- package/client.d.ts.map +1 -1
- package/client.js +39 -8
- package/client.js.map +1 -1
- package/client.mjs +39 -8
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/contacts.d.mts +606 -89
- package/resources/contacts.d.mts.map +1 -1
- package/resources/contacts.d.ts +606 -89
- package/resources/contacts.d.ts.map +1 -1
- package/resources/contacts.js +21 -15
- package/resources/contacts.js.map +1 -1
- package/resources/contacts.mjs +21 -15
- package/resources/contacts.mjs.map +1 -1
- package/resources/conversations.d.mts +335 -69
- package/resources/conversations.d.mts.map +1 -1
- package/resources/conversations.d.ts +335 -69
- package/resources/conversations.d.ts.map +1 -1
- package/resources/conversations.js +15 -10
- package/resources/conversations.js.map +1 -1
- package/resources/conversations.mjs +15 -10
- 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 +165 -41
- package/resources/me.d.mts.map +1 -1
- package/resources/me.d.ts +165 -41
- package/resources/me.d.ts.map +1 -1
- package/resources/me.js +14 -1
- package/resources/me.js.map +1 -1
- package/resources/me.mjs +14 -1
- package/resources/me.mjs.map +1 -1
- package/resources/messages.d.mts +206 -27
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +206 -27
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +5 -1
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +5 -1
- package/resources/messages.mjs.map +1 -1
- package/resources/numbers.d.mts +45 -4
- package/resources/numbers.d.mts.map +1 -1
- package/resources/numbers.d.ts +45 -4
- package/resources/numbers.d.ts.map +1 -1
- package/resources/numbers.js +3 -1
- package/resources/numbers.js.map +1 -1
- package/resources/numbers.mjs +3 -1
- package/resources/numbers.mjs.map +1 -1
- package/resources/profiles/campaigns.d.mts +579 -209
- package/resources/profiles/campaigns.d.mts.map +1 -1
- package/resources/profiles/campaigns.d.ts +579 -209
- package/resources/profiles/campaigns.d.ts.map +1 -1
- package/resources/profiles/campaigns.js +33 -64
- package/resources/profiles/campaigns.js.map +1 -1
- package/resources/profiles/campaigns.mjs +33 -64
- 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 +2006 -508
- package/resources/profiles/profiles.d.mts.map +1 -1
- package/resources/profiles/profiles.d.ts +2006 -508
- package/resources/profiles/profiles.d.ts.map +1 -1
- package/resources/profiles/profiles.js +98 -75
- package/resources/profiles/profiles.js.map +1 -1
- package/resources/profiles/profiles.mjs +98 -75
- package/resources/profiles/profiles.mjs.map +1 -1
- package/resources/templates.d.mts +497 -84
- package/resources/templates.d.mts.map +1 -1
- package/resources/templates.d.ts +497 -84
- package/resources/templates.d.ts.map +1 -1
- package/resources/templates.js +6 -4
- package/resources/templates.js.map +1 -1
- package/resources/templates.mjs +6 -4
- package/resources/templates.mjs.map +1 -1
- package/resources/users.d.mts +444 -43
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +444 -43
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +6 -4
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +6 -4
- package/resources/users.mjs.map +1 -1
- package/resources/webhooks.d.mts +791 -190
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +791 -190
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +11 -8
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +11 -8
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +78 -60
- package/src/resources/contacts.ts +696 -92
- package/src/resources/conversations.ts +400 -77
- package/src/resources/index.ts +20 -26
- package/src/resources/me.ts +186 -52
- package/src/resources/messages.ts +230 -27
- package/src/resources/numbers.ts +50 -4
- package/src/resources/profiles/campaigns.ts +706 -232
- package/src/resources/profiles/index.ts +6 -14
- package/src/resources/profiles/profiles.ts +2421 -646
- package/src/resources/templates.ts +583 -99
- package/src/resources/users.ts +514 -44
- package/src/resources/webhooks.ts +964 -241
- 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.mjs","sourceRoot":"","sources":["../../src/resources/profiles/profiles.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;
|
|
1
|
+
{"version":3,"file":"profiles.mjs","sourceRoot":"","sources":["../../src/resources/profiles/profiles.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,KAAK,YAAY,wBAAoB;AAC5C,OAAO,EAQL,SAAS,GAEV,wBAAoB;AAErB,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;;;;;GAMG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAwQ/E,CAAC;IAtQC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;IACH,MAAM,CAAC,MAA2B,EAAE,OAAwB;QAC1D,MAAM,EAAE,iBAAiB,EAAE,cAA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CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACvF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACH,QAAQ,CACN,SAAiB,EACjB,MAA6B,EAC7B,OAAwB;QAExB,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC1F,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,gBAAgB,SAAS,WAAW,EAAE;YACjE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBAC/E,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACrE;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AAmvFD,QAAQ,CAAC,SAAS,GAAG,SAAS,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
|
-
import * as TemplatesAPI from "./templates.mjs";
|
|
3
|
-
import * as WebhooksAPI from "./webhooks.mjs";
|
|
4
2
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
5
3
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
6
4
|
/**
|
|
7
|
-
*
|
|
5
|
+
* Reusable message bodies with named variables.
|
|
6
|
+
*
|
|
7
|
+
* A template is substituted at send time from the values you pass, so the copy lives here rather than in your application. WhatsApp templates additionally need Meta's approval before they can be sent, and a template's channel status reports where that stands — an approved SMS template and an unapproved WhatsApp one are the same template in two states.
|
|
8
8
|
*/
|
|
9
9
|
export declare class Templates extends APIResource {
|
|
10
10
|
/**
|
|
@@ -14,34 +14,34 @@ export declare class Templates extends APIResource {
|
|
|
14
14
|
*
|
|
15
15
|
* @example
|
|
16
16
|
* ```ts
|
|
17
|
-
* const
|
|
17
|
+
* const template = await client.templates.create();
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
create(params: TemplateCreateParams, options?: RequestOptions): APIPromise<
|
|
20
|
+
create(params: TemplateCreateParams, options?: RequestOptions): APIPromise<TemplateCreateResponse>;
|
|
21
21
|
/**
|
|
22
22
|
* Retrieves a specific template by its ID. Returns template details including
|
|
23
23
|
* name, category, language, status, and definition.
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
26
|
* ```ts
|
|
27
|
-
* const
|
|
27
|
+
* const template = await client.templates.retrieve(
|
|
28
28
|
* '7ba7b820-9dad-11d1-80b4-00c04fd430c8',
|
|
29
29
|
* );
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
retrieve(id: string, params?: TemplateRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<
|
|
32
|
+
retrieve(id: string, params?: TemplateRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<TemplateRetrieveResponse>;
|
|
33
33
|
/**
|
|
34
34
|
* Updates an existing template's name, category, language, definition, or submits
|
|
35
35
|
* it for review.
|
|
36
36
|
*
|
|
37
37
|
* @example
|
|
38
38
|
* ```ts
|
|
39
|
-
* const
|
|
39
|
+
* const template = await client.templates.update(
|
|
40
40
|
* '7ba7b820-9dad-11d1-80b4-00c04fd430c8',
|
|
41
41
|
* );
|
|
42
42
|
* ```
|
|
43
43
|
*/
|
|
44
|
-
update(id: string, params: TemplateUpdateParams, options?: RequestOptions): APIPromise<
|
|
44
|
+
update(id: string, params: TemplateUpdateParams, options?: RequestOptions): APIPromise<TemplateUpdateResponse>;
|
|
45
45
|
/**
|
|
46
46
|
* Retrieves a paginated list of message templates for the authenticated customer.
|
|
47
47
|
* Supports filtering by status, category, and search term.
|
|
@@ -68,27 +68,6 @@ export declare class Templates extends APIResource {
|
|
|
68
68
|
*/
|
|
69
69
|
delete(id: string, params: TemplateDeleteParams, options?: RequestOptions): APIPromise<void>;
|
|
70
70
|
}
|
|
71
|
-
/**
|
|
72
|
-
* Standard API response envelope for all v3 endpoints
|
|
73
|
-
*/
|
|
74
|
-
export interface APIResponseTemplate {
|
|
75
|
-
/**
|
|
76
|
-
* Template response for v3 API
|
|
77
|
-
*/
|
|
78
|
-
data?: Template | null;
|
|
79
|
-
/**
|
|
80
|
-
* Error information
|
|
81
|
-
*/
|
|
82
|
-
error?: WebhooksAPI.ErrorDetail | null;
|
|
83
|
-
/**
|
|
84
|
-
* Request and response metadata
|
|
85
|
-
*/
|
|
86
|
-
meta?: WebhooksAPI.APIMeta;
|
|
87
|
-
/**
|
|
88
|
-
* Indicates whether the request was successful
|
|
89
|
-
*/
|
|
90
|
-
success?: boolean;
|
|
91
|
-
}
|
|
92
71
|
/**
|
|
93
72
|
* Configuration for AUTHENTICATION category templates
|
|
94
73
|
*/
|
|
@@ -104,51 +83,6 @@ export interface AuthenticationConfig {
|
|
|
104
83
|
*/
|
|
105
84
|
codeExpirationMinutes?: number | null;
|
|
106
85
|
}
|
|
107
|
-
/**
|
|
108
|
-
* Template response for v3 API
|
|
109
|
-
*/
|
|
110
|
-
export interface Template {
|
|
111
|
-
/**
|
|
112
|
-
* Unique template identifier
|
|
113
|
-
*/
|
|
114
|
-
id?: string;
|
|
115
|
-
/**
|
|
116
|
-
* Template category: MARKETING, UTILITY, AUTHENTICATION
|
|
117
|
-
*/
|
|
118
|
-
category?: string;
|
|
119
|
-
/**
|
|
120
|
-
* Supported channels: sms, whatsapp
|
|
121
|
-
*/
|
|
122
|
-
channels?: Array<string> | null;
|
|
123
|
-
/**
|
|
124
|
-
* When the template was created
|
|
125
|
-
*/
|
|
126
|
-
created_at?: string;
|
|
127
|
-
/**
|
|
128
|
-
* Whether the template is published and active
|
|
129
|
-
*/
|
|
130
|
-
is_published?: boolean;
|
|
131
|
-
/**
|
|
132
|
-
* Template language code (e.g., en_US)
|
|
133
|
-
*/
|
|
134
|
-
language?: string;
|
|
135
|
-
/**
|
|
136
|
-
* Template display name
|
|
137
|
-
*/
|
|
138
|
-
name?: string;
|
|
139
|
-
/**
|
|
140
|
-
* Template status: APPROVED, PENDING, REJECTED
|
|
141
|
-
*/
|
|
142
|
-
status?: string;
|
|
143
|
-
/**
|
|
144
|
-
* When the template was last updated
|
|
145
|
-
*/
|
|
146
|
-
updated_at?: string | null;
|
|
147
|
-
/**
|
|
148
|
-
* Template variables for personalization
|
|
149
|
-
*/
|
|
150
|
-
variables?: Array<string> | null;
|
|
151
|
-
}
|
|
152
86
|
/**
|
|
153
87
|
* Body section of a message template with channel-specific content
|
|
154
88
|
*/
|
|
@@ -296,22 +230,361 @@ export declare namespace TemplateVariable {
|
|
|
296
230
|
shortUrl?: string | null;
|
|
297
231
|
}
|
|
298
232
|
}
|
|
233
|
+
/**
|
|
234
|
+
* Standard API response envelope for all v3 endpoints
|
|
235
|
+
*/
|
|
236
|
+
export interface TemplateCreateResponse {
|
|
237
|
+
/**
|
|
238
|
+
* Template response for v3 API
|
|
239
|
+
*/
|
|
240
|
+
data?: TemplateCreateResponse.Data | null;
|
|
241
|
+
/**
|
|
242
|
+
* Error information
|
|
243
|
+
*/
|
|
244
|
+
error?: TemplateCreateResponse.Error | null;
|
|
245
|
+
/**
|
|
246
|
+
* Request and response metadata
|
|
247
|
+
*/
|
|
248
|
+
meta?: TemplateCreateResponse.Meta;
|
|
249
|
+
/**
|
|
250
|
+
* Indicates whether the request was successful
|
|
251
|
+
*/
|
|
252
|
+
success?: boolean;
|
|
253
|
+
}
|
|
254
|
+
export declare namespace TemplateCreateResponse {
|
|
255
|
+
/**
|
|
256
|
+
* Template response for v3 API
|
|
257
|
+
*/
|
|
258
|
+
interface Data {
|
|
259
|
+
/**
|
|
260
|
+
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
261
|
+
* Says whose resource this is, which the resource's own id does not.
|
|
262
|
+
*/
|
|
263
|
+
customer_id: string;
|
|
264
|
+
/**
|
|
265
|
+
* Unique template identifier
|
|
266
|
+
*/
|
|
267
|
+
id?: string;
|
|
268
|
+
/**
|
|
269
|
+
* Template category: MARKETING, UTILITY, AUTHENTICATION
|
|
270
|
+
*/
|
|
271
|
+
category?: string;
|
|
272
|
+
/**
|
|
273
|
+
* Supported channels: sms, whatsapp
|
|
274
|
+
*/
|
|
275
|
+
channels?: Array<string> | null;
|
|
276
|
+
/**
|
|
277
|
+
* When the template was created
|
|
278
|
+
*/
|
|
279
|
+
created_at?: string;
|
|
280
|
+
/**
|
|
281
|
+
* Whether the template is published and active
|
|
282
|
+
*/
|
|
283
|
+
is_published?: boolean;
|
|
284
|
+
/**
|
|
285
|
+
* Template language code (e.g., en_US)
|
|
286
|
+
*/
|
|
287
|
+
language?: string;
|
|
288
|
+
/**
|
|
289
|
+
* Template display name
|
|
290
|
+
*/
|
|
291
|
+
name?: string;
|
|
292
|
+
/**
|
|
293
|
+
* Template status: APPROVED, PENDING, REJECTED
|
|
294
|
+
*/
|
|
295
|
+
status?: string;
|
|
296
|
+
/**
|
|
297
|
+
* When the template was last updated
|
|
298
|
+
*/
|
|
299
|
+
updated_at?: string | null;
|
|
300
|
+
/**
|
|
301
|
+
* Template variables for personalization
|
|
302
|
+
*/
|
|
303
|
+
variables?: Array<string> | null;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Error information
|
|
307
|
+
*/
|
|
308
|
+
interface Error {
|
|
309
|
+
/**
|
|
310
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
311
|
+
*/
|
|
312
|
+
code?: string;
|
|
313
|
+
/**
|
|
314
|
+
* Additional validation error details (field-level errors)
|
|
315
|
+
*/
|
|
316
|
+
details?: {
|
|
317
|
+
[key: string]: Array<string>;
|
|
318
|
+
} | null;
|
|
319
|
+
/**
|
|
320
|
+
* URL to documentation about this error
|
|
321
|
+
*/
|
|
322
|
+
doc_url?: string | null;
|
|
323
|
+
/**
|
|
324
|
+
* Human-readable error message
|
|
325
|
+
*/
|
|
326
|
+
message?: string;
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Request and response metadata
|
|
330
|
+
*/
|
|
331
|
+
interface Meta {
|
|
332
|
+
/**
|
|
333
|
+
* Unique identifier for this request (for tracing and support)
|
|
334
|
+
*/
|
|
335
|
+
request_id?: string;
|
|
336
|
+
/**
|
|
337
|
+
* Server timestamp when the response was generated
|
|
338
|
+
*/
|
|
339
|
+
timestamp?: string;
|
|
340
|
+
/**
|
|
341
|
+
* API version used for this request
|
|
342
|
+
*/
|
|
343
|
+
version?: string;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Standard API response envelope for all v3 endpoints
|
|
348
|
+
*/
|
|
349
|
+
export interface TemplateRetrieveResponse {
|
|
350
|
+
/**
|
|
351
|
+
* Template response for v3 API
|
|
352
|
+
*/
|
|
353
|
+
data?: TemplateRetrieveResponse.Data | null;
|
|
354
|
+
/**
|
|
355
|
+
* Error information
|
|
356
|
+
*/
|
|
357
|
+
error?: TemplateRetrieveResponse.Error | null;
|
|
358
|
+
/**
|
|
359
|
+
* Request and response metadata
|
|
360
|
+
*/
|
|
361
|
+
meta?: TemplateRetrieveResponse.Meta;
|
|
362
|
+
/**
|
|
363
|
+
* Indicates whether the request was successful
|
|
364
|
+
*/
|
|
365
|
+
success?: boolean;
|
|
366
|
+
}
|
|
367
|
+
export declare namespace TemplateRetrieveResponse {
|
|
368
|
+
/**
|
|
369
|
+
* Template response for v3 API
|
|
370
|
+
*/
|
|
371
|
+
interface Data {
|
|
372
|
+
/**
|
|
373
|
+
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
374
|
+
* Says whose resource this is, which the resource's own id does not.
|
|
375
|
+
*/
|
|
376
|
+
customer_id: string;
|
|
377
|
+
/**
|
|
378
|
+
* Unique template identifier
|
|
379
|
+
*/
|
|
380
|
+
id?: string;
|
|
381
|
+
/**
|
|
382
|
+
* Template category: MARKETING, UTILITY, AUTHENTICATION
|
|
383
|
+
*/
|
|
384
|
+
category?: string;
|
|
385
|
+
/**
|
|
386
|
+
* Supported channels: sms, whatsapp
|
|
387
|
+
*/
|
|
388
|
+
channels?: Array<string> | null;
|
|
389
|
+
/**
|
|
390
|
+
* When the template was created
|
|
391
|
+
*/
|
|
392
|
+
created_at?: string;
|
|
393
|
+
/**
|
|
394
|
+
* Whether the template is published and active
|
|
395
|
+
*/
|
|
396
|
+
is_published?: boolean;
|
|
397
|
+
/**
|
|
398
|
+
* Template language code (e.g., en_US)
|
|
399
|
+
*/
|
|
400
|
+
language?: string;
|
|
401
|
+
/**
|
|
402
|
+
* Template display name
|
|
403
|
+
*/
|
|
404
|
+
name?: string;
|
|
405
|
+
/**
|
|
406
|
+
* Template status: APPROVED, PENDING, REJECTED
|
|
407
|
+
*/
|
|
408
|
+
status?: string;
|
|
409
|
+
/**
|
|
410
|
+
* When the template was last updated
|
|
411
|
+
*/
|
|
412
|
+
updated_at?: string | null;
|
|
413
|
+
/**
|
|
414
|
+
* Template variables for personalization
|
|
415
|
+
*/
|
|
416
|
+
variables?: Array<string> | null;
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Error information
|
|
420
|
+
*/
|
|
421
|
+
interface Error {
|
|
422
|
+
/**
|
|
423
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
424
|
+
*/
|
|
425
|
+
code?: string;
|
|
426
|
+
/**
|
|
427
|
+
* Additional validation error details (field-level errors)
|
|
428
|
+
*/
|
|
429
|
+
details?: {
|
|
430
|
+
[key: string]: Array<string>;
|
|
431
|
+
} | null;
|
|
432
|
+
/**
|
|
433
|
+
* URL to documentation about this error
|
|
434
|
+
*/
|
|
435
|
+
doc_url?: string | null;
|
|
436
|
+
/**
|
|
437
|
+
* Human-readable error message
|
|
438
|
+
*/
|
|
439
|
+
message?: string;
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* Request and response metadata
|
|
443
|
+
*/
|
|
444
|
+
interface Meta {
|
|
445
|
+
/**
|
|
446
|
+
* Unique identifier for this request (for tracing and support)
|
|
447
|
+
*/
|
|
448
|
+
request_id?: string;
|
|
449
|
+
/**
|
|
450
|
+
* Server timestamp when the response was generated
|
|
451
|
+
*/
|
|
452
|
+
timestamp?: string;
|
|
453
|
+
/**
|
|
454
|
+
* API version used for this request
|
|
455
|
+
*/
|
|
456
|
+
version?: string;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* Standard API response envelope for all v3 endpoints
|
|
461
|
+
*/
|
|
462
|
+
export interface TemplateUpdateResponse {
|
|
463
|
+
/**
|
|
464
|
+
* Template response for v3 API
|
|
465
|
+
*/
|
|
466
|
+
data?: TemplateUpdateResponse.Data | null;
|
|
467
|
+
/**
|
|
468
|
+
* Error information
|
|
469
|
+
*/
|
|
470
|
+
error?: TemplateUpdateResponse.Error | null;
|
|
471
|
+
/**
|
|
472
|
+
* Request and response metadata
|
|
473
|
+
*/
|
|
474
|
+
meta?: TemplateUpdateResponse.Meta;
|
|
475
|
+
/**
|
|
476
|
+
* Indicates whether the request was successful
|
|
477
|
+
*/
|
|
478
|
+
success?: boolean;
|
|
479
|
+
}
|
|
480
|
+
export declare namespace TemplateUpdateResponse {
|
|
481
|
+
/**
|
|
482
|
+
* Template response for v3 API
|
|
483
|
+
*/
|
|
484
|
+
interface Data {
|
|
485
|
+
/**
|
|
486
|
+
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
487
|
+
* Says whose resource this is, which the resource's own id does not.
|
|
488
|
+
*/
|
|
489
|
+
customer_id: string;
|
|
490
|
+
/**
|
|
491
|
+
* Unique template identifier
|
|
492
|
+
*/
|
|
493
|
+
id?: string;
|
|
494
|
+
/**
|
|
495
|
+
* Template category: MARKETING, UTILITY, AUTHENTICATION
|
|
496
|
+
*/
|
|
497
|
+
category?: string;
|
|
498
|
+
/**
|
|
499
|
+
* Supported channels: sms, whatsapp
|
|
500
|
+
*/
|
|
501
|
+
channels?: Array<string> | null;
|
|
502
|
+
/**
|
|
503
|
+
* When the template was created
|
|
504
|
+
*/
|
|
505
|
+
created_at?: string;
|
|
506
|
+
/**
|
|
507
|
+
* Whether the template is published and active
|
|
508
|
+
*/
|
|
509
|
+
is_published?: boolean;
|
|
510
|
+
/**
|
|
511
|
+
* Template language code (e.g., en_US)
|
|
512
|
+
*/
|
|
513
|
+
language?: string;
|
|
514
|
+
/**
|
|
515
|
+
* Template display name
|
|
516
|
+
*/
|
|
517
|
+
name?: string;
|
|
518
|
+
/**
|
|
519
|
+
* Template status: APPROVED, PENDING, REJECTED
|
|
520
|
+
*/
|
|
521
|
+
status?: string;
|
|
522
|
+
/**
|
|
523
|
+
* When the template was last updated
|
|
524
|
+
*/
|
|
525
|
+
updated_at?: string | null;
|
|
526
|
+
/**
|
|
527
|
+
* Template variables for personalization
|
|
528
|
+
*/
|
|
529
|
+
variables?: Array<string> | null;
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* Error information
|
|
533
|
+
*/
|
|
534
|
+
interface Error {
|
|
535
|
+
/**
|
|
536
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
537
|
+
*/
|
|
538
|
+
code?: string;
|
|
539
|
+
/**
|
|
540
|
+
* Additional validation error details (field-level errors)
|
|
541
|
+
*/
|
|
542
|
+
details?: {
|
|
543
|
+
[key: string]: Array<string>;
|
|
544
|
+
} | null;
|
|
545
|
+
/**
|
|
546
|
+
* URL to documentation about this error
|
|
547
|
+
*/
|
|
548
|
+
doc_url?: string | null;
|
|
549
|
+
/**
|
|
550
|
+
* Human-readable error message
|
|
551
|
+
*/
|
|
552
|
+
message?: string;
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Request and response metadata
|
|
556
|
+
*/
|
|
557
|
+
interface Meta {
|
|
558
|
+
/**
|
|
559
|
+
* Unique identifier for this request (for tracing and support)
|
|
560
|
+
*/
|
|
561
|
+
request_id?: string;
|
|
562
|
+
/**
|
|
563
|
+
* Server timestamp when the response was generated
|
|
564
|
+
*/
|
|
565
|
+
timestamp?: string;
|
|
566
|
+
/**
|
|
567
|
+
* API version used for this request
|
|
568
|
+
*/
|
|
569
|
+
version?: string;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
299
572
|
/**
|
|
300
573
|
* Standard API response envelope for all v3 endpoints
|
|
301
574
|
*/
|
|
302
575
|
export interface TemplateListResponse {
|
|
303
576
|
/**
|
|
304
|
-
*
|
|
577
|
+
* A paginated list of templates.
|
|
305
578
|
*/
|
|
306
579
|
data?: TemplateListResponse.Data | null;
|
|
307
580
|
/**
|
|
308
581
|
* Error information
|
|
309
582
|
*/
|
|
310
|
-
error?:
|
|
583
|
+
error?: TemplateListResponse.Error | null;
|
|
311
584
|
/**
|
|
312
585
|
* Request and response metadata
|
|
313
586
|
*/
|
|
314
|
-
meta?:
|
|
587
|
+
meta?: TemplateListResponse.Meta;
|
|
315
588
|
/**
|
|
316
589
|
* Indicates whether the request was successful
|
|
317
590
|
*/
|
|
@@ -319,17 +592,153 @@ export interface TemplateListResponse {
|
|
|
319
592
|
}
|
|
320
593
|
export declare namespace TemplateListResponse {
|
|
321
594
|
/**
|
|
322
|
-
*
|
|
595
|
+
* A paginated list of templates.
|
|
323
596
|
*/
|
|
324
597
|
interface Data {
|
|
325
598
|
/**
|
|
326
599
|
* Pagination metadata for list responses
|
|
327
600
|
*/
|
|
328
|
-
pagination?:
|
|
601
|
+
pagination?: Data.Pagination;
|
|
602
|
+
/**
|
|
603
|
+
* The templates on this page.
|
|
604
|
+
*/
|
|
605
|
+
templates?: Array<Data.Template>;
|
|
606
|
+
}
|
|
607
|
+
namespace Data {
|
|
608
|
+
/**
|
|
609
|
+
* Pagination metadata for list responses
|
|
610
|
+
*/
|
|
611
|
+
interface Pagination {
|
|
612
|
+
/**
|
|
613
|
+
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
614
|
+
*/
|
|
615
|
+
cursors?: Pagination.Cursors | null;
|
|
616
|
+
/**
|
|
617
|
+
* Whether there are more pages after this one
|
|
618
|
+
*/
|
|
619
|
+
has_more?: boolean;
|
|
620
|
+
/**
|
|
621
|
+
* Current page number (1-indexed)
|
|
622
|
+
*/
|
|
623
|
+
page?: number;
|
|
624
|
+
/**
|
|
625
|
+
* Number of items per page
|
|
626
|
+
*/
|
|
627
|
+
page_size?: number;
|
|
628
|
+
/**
|
|
629
|
+
* Total number of items across all pages
|
|
630
|
+
*/
|
|
631
|
+
total_count?: number;
|
|
632
|
+
/**
|
|
633
|
+
* Total number of pages
|
|
634
|
+
*/
|
|
635
|
+
total_pages?: number;
|
|
636
|
+
}
|
|
637
|
+
namespace Pagination {
|
|
638
|
+
/**
|
|
639
|
+
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
640
|
+
*/
|
|
641
|
+
interface Cursors {
|
|
642
|
+
/**
|
|
643
|
+
* Cursor to fetch the next page.
|
|
644
|
+
*/
|
|
645
|
+
after?: string | null;
|
|
646
|
+
/**
|
|
647
|
+
* Cursor to fetch the previous page.
|
|
648
|
+
*/
|
|
649
|
+
before?: string | null;
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Template response for v3 API
|
|
654
|
+
*/
|
|
655
|
+
interface Template {
|
|
656
|
+
/**
|
|
657
|
+
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
658
|
+
* Says whose resource this is, which the resource's own id does not.
|
|
659
|
+
*/
|
|
660
|
+
customer_id: string;
|
|
661
|
+
/**
|
|
662
|
+
* Unique template identifier
|
|
663
|
+
*/
|
|
664
|
+
id?: string;
|
|
665
|
+
/**
|
|
666
|
+
* Template category: MARKETING, UTILITY, AUTHENTICATION
|
|
667
|
+
*/
|
|
668
|
+
category?: string;
|
|
669
|
+
/**
|
|
670
|
+
* Supported channels: sms, whatsapp
|
|
671
|
+
*/
|
|
672
|
+
channels?: Array<string> | null;
|
|
673
|
+
/**
|
|
674
|
+
* When the template was created
|
|
675
|
+
*/
|
|
676
|
+
created_at?: string;
|
|
677
|
+
/**
|
|
678
|
+
* Whether the template is published and active
|
|
679
|
+
*/
|
|
680
|
+
is_published?: boolean;
|
|
681
|
+
/**
|
|
682
|
+
* Template language code (e.g., en_US)
|
|
683
|
+
*/
|
|
684
|
+
language?: string;
|
|
685
|
+
/**
|
|
686
|
+
* Template display name
|
|
687
|
+
*/
|
|
688
|
+
name?: string;
|
|
689
|
+
/**
|
|
690
|
+
* Template status: APPROVED, PENDING, REJECTED
|
|
691
|
+
*/
|
|
692
|
+
status?: string;
|
|
693
|
+
/**
|
|
694
|
+
* When the template was last updated
|
|
695
|
+
*/
|
|
696
|
+
updated_at?: string | null;
|
|
697
|
+
/**
|
|
698
|
+
* Template variables for personalization
|
|
699
|
+
*/
|
|
700
|
+
variables?: Array<string> | null;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* Error information
|
|
705
|
+
*/
|
|
706
|
+
interface Error {
|
|
707
|
+
/**
|
|
708
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
709
|
+
*/
|
|
710
|
+
code?: string;
|
|
711
|
+
/**
|
|
712
|
+
* Additional validation error details (field-level errors)
|
|
713
|
+
*/
|
|
714
|
+
details?: {
|
|
715
|
+
[key: string]: Array<string>;
|
|
716
|
+
} | null;
|
|
717
|
+
/**
|
|
718
|
+
* URL to documentation about this error
|
|
719
|
+
*/
|
|
720
|
+
doc_url?: string | null;
|
|
721
|
+
/**
|
|
722
|
+
* Human-readable error message
|
|
723
|
+
*/
|
|
724
|
+
message?: string;
|
|
725
|
+
}
|
|
726
|
+
/**
|
|
727
|
+
* Request and response metadata
|
|
728
|
+
*/
|
|
729
|
+
interface Meta {
|
|
730
|
+
/**
|
|
731
|
+
* Unique identifier for this request (for tracing and support)
|
|
732
|
+
*/
|
|
733
|
+
request_id?: string;
|
|
734
|
+
/**
|
|
735
|
+
* Server timestamp when the response was generated
|
|
736
|
+
*/
|
|
737
|
+
timestamp?: string;
|
|
329
738
|
/**
|
|
330
|
-
*
|
|
739
|
+
* API version used for this request
|
|
331
740
|
*/
|
|
332
|
-
|
|
741
|
+
version?: string;
|
|
333
742
|
}
|
|
334
743
|
}
|
|
335
744
|
export interface TemplateCreateParams {
|
|
@@ -437,7 +846,11 @@ export interface TemplateListParams {
|
|
|
437
846
|
*/
|
|
438
847
|
category?: string | null;
|
|
439
848
|
/**
|
|
440
|
-
* Query param:
|
|
849
|
+
* Query param: Accepted and ignored. It used to filter on the welcome-playground
|
|
850
|
+
* marker inside a template's LOB details; that filter is gone and nothing reads
|
|
851
|
+
* this value, so sending it neither narrows nor widens the result. Retained only
|
|
852
|
+
* so a client still passing is_welcome_playground keeps binding instead of the
|
|
853
|
+
* request shape changing under it.
|
|
441
854
|
*/
|
|
442
855
|
is_welcome_playground?: boolean | null;
|
|
443
856
|
/**
|
|
@@ -474,6 +887,6 @@ export interface TemplateDeleteParams {
|
|
|
474
887
|
'x-profile-id'?: string;
|
|
475
888
|
}
|
|
476
889
|
export declare namespace Templates {
|
|
477
|
-
export { type
|
|
890
|
+
export { type AuthenticationConfig as AuthenticationConfig, type TemplateBody as TemplateBody, type TemplateBodyContent as TemplateBodyContent, type TemplateButton as TemplateButton, type TemplateButtonProps as TemplateButtonProps, type TemplateDefinition as TemplateDefinition, type TemplateFooter as TemplateFooter, type TemplateHeader as TemplateHeader, type TemplateVariable as TemplateVariable, type TemplateCreateResponse as TemplateCreateResponse, type TemplateRetrieveResponse as TemplateRetrieveResponse, type TemplateUpdateResponse as TemplateUpdateResponse, type TemplateListResponse as TemplateListResponse, type TemplateCreateParams as TemplateCreateParams, type TemplateRetrieveParams as TemplateRetrieveParams, type TemplateUpdateParams as TemplateUpdateParams, type TemplateListParams as TemplateListParams, type TemplateDeleteParams as TemplateDeleteParams, };
|
|
478
891
|
}
|
|
479
892
|
//# sourceMappingURL=templates.d.mts.map
|