@sentdm/sentdm 0.36.0 → 0.38.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 +24 -0
- package/README.md +31 -0
- package/client.d.mts +28 -14
- package/client.d.mts.map +1 -1
- package/client.d.ts +28 -14
- package/client.d.ts.map +1 -1
- package/client.js +10 -0
- package/client.js.map +1 -1
- package/client.mjs +10 -0
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +164 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +164 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +212 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +202 -0
- package/core/pagination.mjs.map +1 -0
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/package.json +11 -1
- package/pagination.d.mts +3 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +3 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +3 -0
- package/pagination.mjs.map +1 -0
- package/resources/contacts.d.mts +79 -626
- package/resources/contacts.d.mts.map +1 -1
- package/resources/contacts.d.ts +79 -626
- package/resources/contacts.d.ts.map +1 -1
- package/resources/contacts.js +12 -11
- package/resources/contacts.js.map +1 -1
- package/resources/contacts.mjs +12 -11
- package/resources/contacts.mjs.map +1 -1
- package/resources/conversations.d.mts +72 -346
- package/resources/conversations.d.mts.map +1 -1
- package/resources/conversations.d.ts +72 -346
- package/resources/conversations.d.ts.map +1 -1
- package/resources/conversations.js +16 -13
- package/resources/conversations.js.map +1 -1
- package/resources/conversations.mjs +16 -13
- 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 +48 -129
- package/resources/me.d.mts.map +1 -1
- package/resources/me.d.ts +48 -129
- 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 +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 +87 -532
- package/resources/templates.d.mts.map +1 -1
- package/resources/templates.d.ts +87 -532
- package/resources/templates.d.ts.map +1 -1
- package/resources/templates.js +11 -10
- package/resources/templates.js.map +1 -1
- package/resources/templates.mjs +11 -10
- 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 +192 -856
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +192 -856
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +23 -19
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +23 -19
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +124 -45
- package/src/core/pagination.ts +428 -0
- package/src/index.ts +1 -0
- package/src/pagination.ts +2 -0
- package/src/resources/contacts.ts +89 -726
- package/src/resources/conversations.ts +99 -427
- package/src/resources/index.ts +31 -23
- package/src/resources/me.ts +59 -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 +110 -629
- package/src/resources/users.ts +48 -505
- package/src/resources/webhooks.ts +307 -1091
- 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,5 +1,7 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as WebhooksAPI from "./webhooks.mjs";
|
|
2
3
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
4
|
+
import { PagePromise, TemplatesPage, type TemplatesPageParams } from "../core/pagination.mjs";
|
|
3
5
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
6
|
/**
|
|
5
7
|
* Reusable message bodies with named variables.
|
|
@@ -14,47 +16,47 @@ export declare class Templates extends APIResource {
|
|
|
14
16
|
*
|
|
15
17
|
* @example
|
|
16
18
|
* ```ts
|
|
17
|
-
* const
|
|
19
|
+
* const apiResponseTemplate = await client.templates.create();
|
|
18
20
|
* ```
|
|
19
21
|
*/
|
|
20
|
-
create(params: TemplateCreateParams, options?: RequestOptions): APIPromise<
|
|
22
|
+
create(params: TemplateCreateParams, options?: RequestOptions): APIPromise<APIResponseTemplate>;
|
|
21
23
|
/**
|
|
22
24
|
* Retrieves a specific template by its ID. Returns template details including
|
|
23
25
|
* name, category, language, status, and definition.
|
|
24
26
|
*
|
|
25
27
|
* @example
|
|
26
28
|
* ```ts
|
|
27
|
-
* const
|
|
29
|
+
* const apiResponseTemplate = await client.templates.retrieve(
|
|
28
30
|
* '7ba7b820-9dad-11d1-80b4-00c04fd430c8',
|
|
29
31
|
* );
|
|
30
32
|
* ```
|
|
31
33
|
*/
|
|
32
|
-
retrieve(id: string, params?: TemplateRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<
|
|
34
|
+
retrieve(id: string, params?: TemplateRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<APIResponseTemplate>;
|
|
33
35
|
/**
|
|
34
36
|
* Updates an existing template's name, category, language, definition, or submits
|
|
35
37
|
* it for review.
|
|
36
38
|
*
|
|
37
39
|
* @example
|
|
38
40
|
* ```ts
|
|
39
|
-
* const
|
|
41
|
+
* const apiResponseTemplate = await client.templates.update(
|
|
40
42
|
* '7ba7b820-9dad-11d1-80b4-00c04fd430c8',
|
|
41
43
|
* );
|
|
42
44
|
* ```
|
|
43
45
|
*/
|
|
44
|
-
update(id: string, params: TemplateUpdateParams, options?: RequestOptions): APIPromise<
|
|
46
|
+
update(id: string, params: TemplateUpdateParams, options?: RequestOptions): APIPromise<APIResponseTemplate>;
|
|
45
47
|
/**
|
|
46
48
|
* Retrieves a paginated list of message templates for the authenticated customer.
|
|
47
49
|
* Supports filtering by status, category, and search term.
|
|
48
50
|
*
|
|
49
51
|
* @example
|
|
50
52
|
* ```ts
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* }
|
|
53
|
+
* // Automatically fetches more pages as needed.
|
|
54
|
+
* for await (const template of client.templates.list()) {
|
|
55
|
+
* // ...
|
|
56
|
+
* }
|
|
55
57
|
* ```
|
|
56
58
|
*/
|
|
57
|
-
list(params
|
|
59
|
+
list(params?: TemplateListParams | null | undefined, options?: RequestOptions): PagePromise<TemplatesTemplatesPage, Template>;
|
|
58
60
|
/**
|
|
59
61
|
* Deletes a template by ID. Optionally, you can also delete the template from
|
|
60
62
|
* WhatsApp/Meta by setting delete_from_meta=true.
|
|
@@ -68,6 +70,28 @@ export declare class Templates extends APIResource {
|
|
|
68
70
|
*/
|
|
69
71
|
delete(id: string, params: TemplateDeleteParams, options?: RequestOptions): APIPromise<void>;
|
|
70
72
|
}
|
|
73
|
+
export type TemplatesTemplatesPage = TemplatesPage<Template>;
|
|
74
|
+
/**
|
|
75
|
+
* Standard API response envelope for all v3 endpoints
|
|
76
|
+
*/
|
|
77
|
+
export interface APIResponseTemplate {
|
|
78
|
+
/**
|
|
79
|
+
* Template response for v3 API
|
|
80
|
+
*/
|
|
81
|
+
data?: Template | null;
|
|
82
|
+
/**
|
|
83
|
+
* Error information
|
|
84
|
+
*/
|
|
85
|
+
error?: WebhooksAPI.ErrorDetail | null;
|
|
86
|
+
/**
|
|
87
|
+
* Request and response metadata
|
|
88
|
+
*/
|
|
89
|
+
meta?: WebhooksAPI.APIMeta;
|
|
90
|
+
/**
|
|
91
|
+
* Indicates whether the request was successful
|
|
92
|
+
*/
|
|
93
|
+
success?: boolean;
|
|
94
|
+
}
|
|
71
95
|
/**
|
|
72
96
|
* Configuration for AUTHENTICATION category templates
|
|
73
97
|
*/
|
|
@@ -83,6 +107,56 @@ export interface AuthenticationConfig {
|
|
|
83
107
|
*/
|
|
84
108
|
codeExpirationMinutes?: number | null;
|
|
85
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* Template response for v3 API
|
|
112
|
+
*/
|
|
113
|
+
export interface Template {
|
|
114
|
+
/**
|
|
115
|
+
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
116
|
+
* Says whose resource this is, which the resource's own id does not.
|
|
117
|
+
*/
|
|
118
|
+
customer_id: string;
|
|
119
|
+
/**
|
|
120
|
+
* Unique template identifier
|
|
121
|
+
*/
|
|
122
|
+
id?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Template category: MARKETING, UTILITY, AUTHENTICATION
|
|
125
|
+
*/
|
|
126
|
+
category?: string;
|
|
127
|
+
/**
|
|
128
|
+
* Supported channels: sms, whatsapp
|
|
129
|
+
*/
|
|
130
|
+
channels?: Array<string> | null;
|
|
131
|
+
/**
|
|
132
|
+
* When the template was created
|
|
133
|
+
*/
|
|
134
|
+
created_at?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Whether the template is published and active
|
|
137
|
+
*/
|
|
138
|
+
is_published?: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Template language code (e.g., en_US)
|
|
141
|
+
*/
|
|
142
|
+
language?: string;
|
|
143
|
+
/**
|
|
144
|
+
* Template display name
|
|
145
|
+
*/
|
|
146
|
+
name?: string;
|
|
147
|
+
/**
|
|
148
|
+
* Template status: APPROVED, PENDING, REJECTED
|
|
149
|
+
*/
|
|
150
|
+
status?: string;
|
|
151
|
+
/**
|
|
152
|
+
* When the template was last updated
|
|
153
|
+
*/
|
|
154
|
+
updated_at?: string | null;
|
|
155
|
+
/**
|
|
156
|
+
* Template variables for personalization
|
|
157
|
+
*/
|
|
158
|
+
variables?: Array<string> | null;
|
|
159
|
+
}
|
|
86
160
|
/**
|
|
87
161
|
* Body section of a message template with channel-specific content
|
|
88
162
|
*/
|
|
@@ -230,517 +304,6 @@ export declare namespace TemplateVariable {
|
|
|
230
304
|
shortUrl?: string | null;
|
|
231
305
|
}
|
|
232
306
|
}
|
|
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
|
-
}
|
|
572
|
-
/**
|
|
573
|
-
* Standard API response envelope for all v3 endpoints
|
|
574
|
-
*/
|
|
575
|
-
export interface TemplateListResponse {
|
|
576
|
-
/**
|
|
577
|
-
* A paginated list of templates.
|
|
578
|
-
*/
|
|
579
|
-
data?: TemplateListResponse.Data | null;
|
|
580
|
-
/**
|
|
581
|
-
* Error information
|
|
582
|
-
*/
|
|
583
|
-
error?: TemplateListResponse.Error | null;
|
|
584
|
-
/**
|
|
585
|
-
* Request and response metadata
|
|
586
|
-
*/
|
|
587
|
-
meta?: TemplateListResponse.Meta;
|
|
588
|
-
/**
|
|
589
|
-
* Indicates whether the request was successful
|
|
590
|
-
*/
|
|
591
|
-
success?: boolean;
|
|
592
|
-
}
|
|
593
|
-
export declare namespace TemplateListResponse {
|
|
594
|
-
/**
|
|
595
|
-
* A paginated list of templates.
|
|
596
|
-
*/
|
|
597
|
-
interface Data {
|
|
598
|
-
/**
|
|
599
|
-
* Pagination metadata for list responses
|
|
600
|
-
*/
|
|
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;
|
|
738
|
-
/**
|
|
739
|
-
* API version used for this request
|
|
740
|
-
*/
|
|
741
|
-
version?: string;
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
307
|
export interface TemplateCreateParams {
|
|
745
308
|
/**
|
|
746
309
|
* Body param: Template category: MARKETING, UTILITY, AUTHENTICATION (optional,
|
|
@@ -832,15 +395,7 @@ export interface TemplateUpdateParams {
|
|
|
832
395
|
*/
|
|
833
396
|
'x-profile-id'?: string;
|
|
834
397
|
}
|
|
835
|
-
export interface TemplateListParams {
|
|
836
|
-
/**
|
|
837
|
-
* Query param: Page number (1-indexed)
|
|
838
|
-
*/
|
|
839
|
-
page: number;
|
|
840
|
-
/**
|
|
841
|
-
* Query param: Number of items per page
|
|
842
|
-
*/
|
|
843
|
-
page_size: number;
|
|
398
|
+
export interface TemplateListParams extends TemplatesPageParams {
|
|
844
399
|
/**
|
|
845
400
|
* Query param: Optional category filter: MARKETING, UTILITY, AUTHENTICATION
|
|
846
401
|
*/
|
|
@@ -887,6 +442,6 @@ export interface TemplateDeleteParams {
|
|
|
887
442
|
'x-profile-id'?: string;
|
|
888
443
|
}
|
|
889
444
|
export declare namespace Templates {
|
|
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
|
|
445
|
+
export { type APIResponseTemplate as APIResponseTemplate, type AuthenticationConfig as AuthenticationConfig, type Template as Template, 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 TemplatesTemplatesPage as TemplatesTemplatesPage, type TemplateCreateParams as TemplateCreateParams, type TemplateRetrieveParams as TemplateRetrieveParams, type TemplateUpdateParams as TemplateUpdateParams, type TemplateListParams as TemplateListParams, type TemplateDeleteParams as TemplateDeleteParams, };
|
|
891
446
|
}
|
|
892
447
|
//# sourceMappingURL=templates.d.mts.map
|