@sentdm/sentdm 0.26.0 → 0.27.2
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/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,4 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as TemplatesAPI from "./templates.mjs";
|
|
3
|
+
import * as WebhooksAPI from "./webhooks.mjs";
|
|
2
4
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
5
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
6
|
/**
|
|
@@ -12,34 +14,34 @@ export declare class Templates extends APIResource {
|
|
|
12
14
|
*
|
|
13
15
|
* @example
|
|
14
16
|
* ```ts
|
|
15
|
-
* const
|
|
17
|
+
* const apiResponseTemplate = await client.templates.create();
|
|
16
18
|
* ```
|
|
17
19
|
*/
|
|
18
|
-
create(params: TemplateCreateParams, options?: RequestOptions): APIPromise<
|
|
20
|
+
create(params: TemplateCreateParams, options?: RequestOptions): APIPromise<APIResponseTemplate>;
|
|
19
21
|
/**
|
|
20
22
|
* Retrieves a specific template by its ID. Returns template details including
|
|
21
23
|
* name, category, language, status, and definition.
|
|
22
24
|
*
|
|
23
25
|
* @example
|
|
24
26
|
* ```ts
|
|
25
|
-
* const
|
|
27
|
+
* const apiResponseTemplate = await client.templates.retrieve(
|
|
26
28
|
* '7ba7b820-9dad-11d1-80b4-00c04fd430c8',
|
|
27
29
|
* );
|
|
28
30
|
* ```
|
|
29
31
|
*/
|
|
30
|
-
retrieve(id: string, params?: TemplateRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<
|
|
32
|
+
retrieve(id: string, params?: TemplateRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<APIResponseTemplate>;
|
|
31
33
|
/**
|
|
32
34
|
* Updates an existing template's name, category, language, definition, or submits
|
|
33
35
|
* it for review.
|
|
34
36
|
*
|
|
35
37
|
* @example
|
|
36
38
|
* ```ts
|
|
37
|
-
* const
|
|
39
|
+
* const apiResponseTemplate = await client.templates.update(
|
|
38
40
|
* '7ba7b820-9dad-11d1-80b4-00c04fd430c8',
|
|
39
41
|
* );
|
|
40
42
|
* ```
|
|
41
43
|
*/
|
|
42
|
-
update(id: string, params: TemplateUpdateParams, options?: RequestOptions): APIPromise<
|
|
44
|
+
update(id: string, params: TemplateUpdateParams, options?: RequestOptions): APIPromise<APIResponseTemplate>;
|
|
43
45
|
/**
|
|
44
46
|
* Retrieves a paginated list of message templates for the authenticated customer.
|
|
45
47
|
* Supports filtering by status, category, and search term.
|
|
@@ -69,325 +71,223 @@ export declare class Templates extends APIResource {
|
|
|
69
71
|
/**
|
|
70
72
|
* Standard API response envelope for all v3 endpoints
|
|
71
73
|
*/
|
|
72
|
-
export interface
|
|
74
|
+
export interface APIResponseTemplate {
|
|
73
75
|
/**
|
|
74
76
|
* Template response for v3 API
|
|
75
77
|
*/
|
|
76
|
-
data?:
|
|
78
|
+
data?: Template | null;
|
|
77
79
|
/**
|
|
78
80
|
* Error information
|
|
79
81
|
*/
|
|
80
|
-
error?:
|
|
82
|
+
error?: WebhooksAPI.ErrorDetail | null;
|
|
81
83
|
/**
|
|
82
84
|
* Request and response metadata
|
|
83
85
|
*/
|
|
84
|
-
meta?:
|
|
86
|
+
meta?: WebhooksAPI.APIMeta;
|
|
85
87
|
/**
|
|
86
88
|
* Indicates whether the request was successful
|
|
87
89
|
*/
|
|
88
90
|
success?: boolean;
|
|
89
91
|
}
|
|
90
|
-
|
|
92
|
+
/**
|
|
93
|
+
* Configuration for AUTHENTICATION category templates
|
|
94
|
+
*/
|
|
95
|
+
export interface SentDmServicesCommonContractsPocOsAuthenticationConfig {
|
|
91
96
|
/**
|
|
92
|
-
*
|
|
97
|
+
* Whether to add the security recommendation text: "For your security, do not
|
|
98
|
+
* share this code."
|
|
93
99
|
*/
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Unique template identifier
|
|
97
|
-
*/
|
|
98
|
-
id?: string;
|
|
99
|
-
/**
|
|
100
|
-
* Template category: MARKETING, UTILITY, AUTHENTICATION
|
|
101
|
-
*/
|
|
102
|
-
category?: string;
|
|
103
|
-
/**
|
|
104
|
-
* Supported channels: sms, whatsapp
|
|
105
|
-
*/
|
|
106
|
-
channels?: Array<string> | null;
|
|
107
|
-
/**
|
|
108
|
-
* When the template was created
|
|
109
|
-
*/
|
|
110
|
-
created_at?: string;
|
|
111
|
-
/**
|
|
112
|
-
* Whether the template is published and active
|
|
113
|
-
*/
|
|
114
|
-
is_published?: boolean;
|
|
115
|
-
/**
|
|
116
|
-
* Template language code (e.g., en_US)
|
|
117
|
-
*/
|
|
118
|
-
language?: string;
|
|
119
|
-
/**
|
|
120
|
-
* Template display name
|
|
121
|
-
*/
|
|
122
|
-
name?: string;
|
|
123
|
-
/**
|
|
124
|
-
* Template status: APPROVED, PENDING, REJECTED
|
|
125
|
-
*/
|
|
126
|
-
status?: string;
|
|
127
|
-
/**
|
|
128
|
-
* When the template was last updated
|
|
129
|
-
*/
|
|
130
|
-
updated_at?: string | null;
|
|
131
|
-
/**
|
|
132
|
-
* Template variables for personalization
|
|
133
|
-
*/
|
|
134
|
-
variables?: Array<string> | null;
|
|
135
|
-
}
|
|
100
|
+
addSecurityRecommendation?: boolean;
|
|
136
101
|
/**
|
|
137
|
-
*
|
|
102
|
+
* Code expiration time in minutes (1-90). If set, adds footer: "This code expires
|
|
103
|
+
* in X minutes."
|
|
138
104
|
*/
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
* Additional validation error details (field-level errors)
|
|
146
|
-
*/
|
|
147
|
-
details?: {
|
|
148
|
-
[key: string]: Array<string>;
|
|
149
|
-
} | null;
|
|
150
|
-
/**
|
|
151
|
-
* URL to documentation about this error
|
|
152
|
-
*/
|
|
153
|
-
doc_url?: string | null;
|
|
154
|
-
/**
|
|
155
|
-
* Human-readable error message
|
|
156
|
-
*/
|
|
157
|
-
message?: string;
|
|
158
|
-
}
|
|
105
|
+
codeExpirationMinutes?: number | null;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Body section of a message template with channel-specific content
|
|
109
|
+
*/
|
|
110
|
+
export interface SentDmServicesCommonContractsPocOsTemplateBody {
|
|
159
111
|
/**
|
|
160
|
-
*
|
|
112
|
+
* Content that will be used for all channels (SMS and WhatsApp) unless
|
|
113
|
+
* channel-specific content is provided
|
|
161
114
|
*/
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
115
|
+
multiChannel?: TemplateBodyContent | null;
|
|
116
|
+
/**
|
|
117
|
+
* RCS-specific content that overrides multi-channel content for RCS messages
|
|
118
|
+
*/
|
|
119
|
+
rcs?: TemplateBodyContent | null;
|
|
120
|
+
/**
|
|
121
|
+
* SMS-specific content that overrides multi-channel content for SMS messages
|
|
122
|
+
*/
|
|
123
|
+
sms?: TemplateBodyContent | null;
|
|
124
|
+
/**
|
|
125
|
+
* WhatsApp-specific content that overrides multi-channel content for WhatsApp
|
|
126
|
+
* messages
|
|
127
|
+
*/
|
|
128
|
+
whatsapp?: TemplateBodyContent | null;
|
|
176
129
|
}
|
|
177
130
|
/**
|
|
178
|
-
*
|
|
131
|
+
* Interactive button in a message template
|
|
179
132
|
*/
|
|
180
|
-
export interface
|
|
133
|
+
export interface SentDmServicesCommonContractsPocOsTemplateButton {
|
|
181
134
|
/**
|
|
182
|
-
*
|
|
135
|
+
* Properties specific to the button type
|
|
183
136
|
*/
|
|
184
|
-
|
|
137
|
+
props: SentDmServicesCommonContractsPocOsTemplateButtonProps;
|
|
185
138
|
/**
|
|
186
|
-
*
|
|
139
|
+
* The type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, VOICE_CALL, COPY_CODE)
|
|
187
140
|
*/
|
|
188
|
-
|
|
141
|
+
type: string;
|
|
189
142
|
/**
|
|
190
|
-
*
|
|
143
|
+
* The unique identifier of the button (1-based index)
|
|
144
|
+
*/
|
|
145
|
+
id?: number;
|
|
146
|
+
}
|
|
147
|
+
export interface SentDmServicesCommonContractsPocOsTemplateButtonProps {
|
|
148
|
+
activeFor: number;
|
|
149
|
+
countryCode: string;
|
|
150
|
+
offerCode: string;
|
|
151
|
+
phoneNumber: string;
|
|
152
|
+
quickReplyType: string;
|
|
153
|
+
text: string;
|
|
154
|
+
url: string;
|
|
155
|
+
urlType: string;
|
|
156
|
+
autofillText?: string | null;
|
|
157
|
+
otpType?: string | null;
|
|
158
|
+
packageName?: string | null;
|
|
159
|
+
signatureHash?: string | null;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Footer section of a message template
|
|
163
|
+
*/
|
|
164
|
+
export interface SentDmServicesCommonContractsPocOsTemplateFooter {
|
|
165
|
+
/**
|
|
166
|
+
* The footer template text with optional variable placeholders
|
|
191
167
|
*/
|
|
192
|
-
|
|
168
|
+
template: string;
|
|
193
169
|
/**
|
|
194
|
-
*
|
|
170
|
+
* The type of footer (typically "text")
|
|
195
171
|
*/
|
|
196
|
-
|
|
172
|
+
type?: string | null;
|
|
173
|
+
/**
|
|
174
|
+
* List of variables used in the footer template
|
|
175
|
+
*/
|
|
176
|
+
variables?: Array<TemplateVariable> | null;
|
|
197
177
|
}
|
|
198
|
-
|
|
178
|
+
/**
|
|
179
|
+
* Header section of a message template
|
|
180
|
+
*/
|
|
181
|
+
export interface SentDmServicesCommonContractsPocOsTemplateHeader {
|
|
199
182
|
/**
|
|
200
|
-
*
|
|
183
|
+
* The header template text with optional variable placeholders (e.g., "Welcome to
|
|
184
|
+
* {{0:variable}}")
|
|
201
185
|
*/
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Unique template identifier
|
|
205
|
-
*/
|
|
206
|
-
id?: string;
|
|
207
|
-
/**
|
|
208
|
-
* Template category: MARKETING, UTILITY, AUTHENTICATION
|
|
209
|
-
*/
|
|
210
|
-
category?: string;
|
|
211
|
-
/**
|
|
212
|
-
* Supported channels: sms, whatsapp
|
|
213
|
-
*/
|
|
214
|
-
channels?: Array<string> | null;
|
|
215
|
-
/**
|
|
216
|
-
* When the template was created
|
|
217
|
-
*/
|
|
218
|
-
created_at?: string;
|
|
219
|
-
/**
|
|
220
|
-
* Whether the template is published and active
|
|
221
|
-
*/
|
|
222
|
-
is_published?: boolean;
|
|
223
|
-
/**
|
|
224
|
-
* Template language code (e.g., en_US)
|
|
225
|
-
*/
|
|
226
|
-
language?: string;
|
|
227
|
-
/**
|
|
228
|
-
* Template display name
|
|
229
|
-
*/
|
|
230
|
-
name?: string;
|
|
231
|
-
/**
|
|
232
|
-
* Template status: APPROVED, PENDING, REJECTED
|
|
233
|
-
*/
|
|
234
|
-
status?: string;
|
|
235
|
-
/**
|
|
236
|
-
* When the template was last updated
|
|
237
|
-
*/
|
|
238
|
-
updated_at?: string | null;
|
|
239
|
-
/**
|
|
240
|
-
* Template variables for personalization
|
|
241
|
-
*/
|
|
242
|
-
variables?: Array<string> | null;
|
|
243
|
-
}
|
|
186
|
+
template: string;
|
|
244
187
|
/**
|
|
245
|
-
*
|
|
188
|
+
* The type of header (e.g., "text", "image", "video", "document")
|
|
246
189
|
*/
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
250
|
-
*/
|
|
251
|
-
code?: string;
|
|
252
|
-
/**
|
|
253
|
-
* Additional validation error details (field-level errors)
|
|
254
|
-
*/
|
|
255
|
-
details?: {
|
|
256
|
-
[key: string]: Array<string>;
|
|
257
|
-
} | null;
|
|
258
|
-
/**
|
|
259
|
-
* URL to documentation about this error
|
|
260
|
-
*/
|
|
261
|
-
doc_url?: string | null;
|
|
262
|
-
/**
|
|
263
|
-
* Human-readable error message
|
|
264
|
-
*/
|
|
265
|
-
message?: string;
|
|
266
|
-
}
|
|
190
|
+
type?: string | null;
|
|
267
191
|
/**
|
|
268
|
-
*
|
|
192
|
+
* List of variables used in the header template
|
|
269
193
|
*/
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* Unique identifier for this request (for tracing and support)
|
|
273
|
-
*/
|
|
274
|
-
request_id?: string;
|
|
275
|
-
/**
|
|
276
|
-
* Server timestamp when the response was generated
|
|
277
|
-
*/
|
|
278
|
-
timestamp?: string;
|
|
279
|
-
/**
|
|
280
|
-
* API version used for this request
|
|
281
|
-
*/
|
|
282
|
-
version?: string;
|
|
283
|
-
}
|
|
194
|
+
variables?: Array<TemplateVariable> | null;
|
|
284
195
|
}
|
|
285
196
|
/**
|
|
286
|
-
*
|
|
197
|
+
* Template response for v3 API
|
|
287
198
|
*/
|
|
288
|
-
export interface
|
|
199
|
+
export interface Template {
|
|
289
200
|
/**
|
|
290
|
-
*
|
|
201
|
+
* Unique template identifier
|
|
291
202
|
*/
|
|
292
|
-
|
|
203
|
+
id?: string;
|
|
293
204
|
/**
|
|
294
|
-
*
|
|
205
|
+
* Template category: MARKETING, UTILITY, AUTHENTICATION
|
|
295
206
|
*/
|
|
296
|
-
|
|
207
|
+
category?: string;
|
|
297
208
|
/**
|
|
298
|
-
*
|
|
209
|
+
* Supported channels: sms, whatsapp
|
|
299
210
|
*/
|
|
300
|
-
|
|
211
|
+
channels?: Array<string> | null;
|
|
301
212
|
/**
|
|
302
|
-
*
|
|
213
|
+
* When the template was created
|
|
303
214
|
*/
|
|
304
|
-
|
|
215
|
+
created_at?: string;
|
|
216
|
+
/**
|
|
217
|
+
* Whether the template is published and active
|
|
218
|
+
*/
|
|
219
|
+
is_published?: boolean;
|
|
220
|
+
/**
|
|
221
|
+
* Template language code (e.g., en_US)
|
|
222
|
+
*/
|
|
223
|
+
language?: string;
|
|
224
|
+
/**
|
|
225
|
+
* Template display name
|
|
226
|
+
*/
|
|
227
|
+
name?: string;
|
|
228
|
+
/**
|
|
229
|
+
* Template status: APPROVED, PENDING, REJECTED
|
|
230
|
+
*/
|
|
231
|
+
status?: string;
|
|
232
|
+
/**
|
|
233
|
+
* When the template was last updated
|
|
234
|
+
*/
|
|
235
|
+
updated_at?: string | null;
|
|
236
|
+
/**
|
|
237
|
+
* Template variables for personalization
|
|
238
|
+
*/
|
|
239
|
+
variables?: Array<string> | null;
|
|
240
|
+
}
|
|
241
|
+
export interface TemplateBodyContent {
|
|
242
|
+
template: string;
|
|
243
|
+
type?: string | null;
|
|
244
|
+
variables?: Array<TemplateVariable> | null;
|
|
305
245
|
}
|
|
306
|
-
|
|
246
|
+
/**
|
|
247
|
+
* Complete definition of a message template including header, body, footer, and
|
|
248
|
+
* buttons
|
|
249
|
+
*/
|
|
250
|
+
export interface TemplateDefinition {
|
|
307
251
|
/**
|
|
308
|
-
*
|
|
252
|
+
* Body section of a message template with channel-specific content
|
|
309
253
|
*/
|
|
310
|
-
|
|
311
|
-
/**
|
|
312
|
-
* Unique template identifier
|
|
313
|
-
*/
|
|
314
|
-
id?: string;
|
|
315
|
-
/**
|
|
316
|
-
* Template category: MARKETING, UTILITY, AUTHENTICATION
|
|
317
|
-
*/
|
|
318
|
-
category?: string;
|
|
319
|
-
/**
|
|
320
|
-
* Supported channels: sms, whatsapp
|
|
321
|
-
*/
|
|
322
|
-
channels?: Array<string> | null;
|
|
323
|
-
/**
|
|
324
|
-
* When the template was created
|
|
325
|
-
*/
|
|
326
|
-
created_at?: string;
|
|
327
|
-
/**
|
|
328
|
-
* Whether the template is published and active
|
|
329
|
-
*/
|
|
330
|
-
is_published?: boolean;
|
|
331
|
-
/**
|
|
332
|
-
* Template language code (e.g., en_US)
|
|
333
|
-
*/
|
|
334
|
-
language?: string;
|
|
335
|
-
/**
|
|
336
|
-
* Template display name
|
|
337
|
-
*/
|
|
338
|
-
name?: string;
|
|
339
|
-
/**
|
|
340
|
-
* Template status: APPROVED, PENDING, REJECTED
|
|
341
|
-
*/
|
|
342
|
-
status?: string;
|
|
343
|
-
/**
|
|
344
|
-
* When the template was last updated
|
|
345
|
-
*/
|
|
346
|
-
updated_at?: string | null;
|
|
347
|
-
/**
|
|
348
|
-
* Template variables for personalization
|
|
349
|
-
*/
|
|
350
|
-
variables?: Array<string> | null;
|
|
351
|
-
}
|
|
254
|
+
body: SentDmServicesCommonContractsPocOsTemplateBody;
|
|
352
255
|
/**
|
|
353
|
-
*
|
|
256
|
+
* Configuration for AUTHENTICATION category templates
|
|
354
257
|
*/
|
|
355
|
-
|
|
356
|
-
/**
|
|
357
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
358
|
-
*/
|
|
359
|
-
code?: string;
|
|
360
|
-
/**
|
|
361
|
-
* Additional validation error details (field-level errors)
|
|
362
|
-
*/
|
|
363
|
-
details?: {
|
|
364
|
-
[key: string]: Array<string>;
|
|
365
|
-
} | null;
|
|
366
|
-
/**
|
|
367
|
-
* URL to documentation about this error
|
|
368
|
-
*/
|
|
369
|
-
doc_url?: string | null;
|
|
370
|
-
/**
|
|
371
|
-
* Human-readable error message
|
|
372
|
-
*/
|
|
373
|
-
message?: string;
|
|
374
|
-
}
|
|
258
|
+
authenticationConfig?: SentDmServicesCommonContractsPocOsAuthenticationConfig | null;
|
|
375
259
|
/**
|
|
376
|
-
*
|
|
260
|
+
* Optional list of interactive buttons (e.g., quick replies, URLs, phone numbers)
|
|
377
261
|
*/
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
262
|
+
buttons?: Array<SentDmServicesCommonContractsPocOsTemplateButton> | null;
|
|
263
|
+
/**
|
|
264
|
+
* The version of the template definition format
|
|
265
|
+
*/
|
|
266
|
+
definitionVersion?: string | null;
|
|
267
|
+
/**
|
|
268
|
+
* Footer section of a message template
|
|
269
|
+
*/
|
|
270
|
+
footer?: SentDmServicesCommonContractsPocOsTemplateFooter | null;
|
|
271
|
+
/**
|
|
272
|
+
* Header section of a message template
|
|
273
|
+
*/
|
|
274
|
+
header?: SentDmServicesCommonContractsPocOsTemplateHeader | null;
|
|
275
|
+
}
|
|
276
|
+
export interface TemplateVariable {
|
|
277
|
+
name: string;
|
|
278
|
+
props: TemplateVariable.Props;
|
|
279
|
+
type: string;
|
|
280
|
+
id?: number;
|
|
281
|
+
}
|
|
282
|
+
export declare namespace TemplateVariable {
|
|
283
|
+
interface Props {
|
|
284
|
+
mediaType: string;
|
|
285
|
+
sample: string;
|
|
286
|
+
url: string;
|
|
287
|
+
variableType: string;
|
|
288
|
+
alt?: string | null;
|
|
289
|
+
regex?: string | null;
|
|
290
|
+
shortUrl?: string | null;
|
|
391
291
|
}
|
|
392
292
|
}
|
|
393
293
|
/**
|
|
@@ -401,11 +301,11 @@ export interface TemplateListResponse {
|
|
|
401
301
|
/**
|
|
402
302
|
* Error information
|
|
403
303
|
*/
|
|
404
|
-
error?:
|
|
304
|
+
error?: WebhooksAPI.ErrorDetail | null;
|
|
405
305
|
/**
|
|
406
306
|
* Request and response metadata
|
|
407
307
|
*/
|
|
408
|
-
meta?:
|
|
308
|
+
meta?: WebhooksAPI.APIMeta;
|
|
409
309
|
/**
|
|
410
310
|
* Indicates whether the request was successful
|
|
411
311
|
*/
|
|
@@ -419,142 +319,11 @@ export declare namespace TemplateListResponse {
|
|
|
419
319
|
/**
|
|
420
320
|
* Pagination metadata for list responses
|
|
421
321
|
*/
|
|
422
|
-
pagination?:
|
|
322
|
+
pagination?: WebhooksAPI.PaginationMeta;
|
|
423
323
|
/**
|
|
424
324
|
* List of templates
|
|
425
325
|
*/
|
|
426
|
-
templates?: Array<
|
|
427
|
-
}
|
|
428
|
-
namespace Data {
|
|
429
|
-
/**
|
|
430
|
-
* Pagination metadata for list responses
|
|
431
|
-
*/
|
|
432
|
-
interface Pagination {
|
|
433
|
-
/**
|
|
434
|
-
* Cursor-based pagination pointers
|
|
435
|
-
*/
|
|
436
|
-
cursors?: Pagination.Cursors | null;
|
|
437
|
-
/**
|
|
438
|
-
* Whether there are more pages after this one
|
|
439
|
-
*/
|
|
440
|
-
has_more?: boolean;
|
|
441
|
-
/**
|
|
442
|
-
* Current page number (1-indexed)
|
|
443
|
-
*/
|
|
444
|
-
page?: number;
|
|
445
|
-
/**
|
|
446
|
-
* Number of items per page
|
|
447
|
-
*/
|
|
448
|
-
page_size?: number;
|
|
449
|
-
/**
|
|
450
|
-
* Total number of items across all pages
|
|
451
|
-
*/
|
|
452
|
-
total_count?: number;
|
|
453
|
-
/**
|
|
454
|
-
* Total number of pages
|
|
455
|
-
*/
|
|
456
|
-
total_pages?: number;
|
|
457
|
-
}
|
|
458
|
-
namespace Pagination {
|
|
459
|
-
/**
|
|
460
|
-
* Cursor-based pagination pointers
|
|
461
|
-
*/
|
|
462
|
-
interface Cursors {
|
|
463
|
-
/**
|
|
464
|
-
* Cursor to fetch the next page
|
|
465
|
-
*/
|
|
466
|
-
after?: string | null;
|
|
467
|
-
/**
|
|
468
|
-
* Cursor to fetch the previous page
|
|
469
|
-
*/
|
|
470
|
-
before?: string | null;
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
/**
|
|
474
|
-
* Template response for v3 API
|
|
475
|
-
*/
|
|
476
|
-
interface Template {
|
|
477
|
-
/**
|
|
478
|
-
* Unique template identifier
|
|
479
|
-
*/
|
|
480
|
-
id?: string;
|
|
481
|
-
/**
|
|
482
|
-
* Template category: MARKETING, UTILITY, AUTHENTICATION
|
|
483
|
-
*/
|
|
484
|
-
category?: string;
|
|
485
|
-
/**
|
|
486
|
-
* Supported channels: sms, whatsapp
|
|
487
|
-
*/
|
|
488
|
-
channels?: Array<string> | null;
|
|
489
|
-
/**
|
|
490
|
-
* When the template was created
|
|
491
|
-
*/
|
|
492
|
-
created_at?: string;
|
|
493
|
-
/**
|
|
494
|
-
* Whether the template is published and active
|
|
495
|
-
*/
|
|
496
|
-
is_published?: boolean;
|
|
497
|
-
/**
|
|
498
|
-
* Template language code (e.g., en_US)
|
|
499
|
-
*/
|
|
500
|
-
language?: string;
|
|
501
|
-
/**
|
|
502
|
-
* Template display name
|
|
503
|
-
*/
|
|
504
|
-
name?: string;
|
|
505
|
-
/**
|
|
506
|
-
* Template status: APPROVED, PENDING, REJECTED
|
|
507
|
-
*/
|
|
508
|
-
status?: string;
|
|
509
|
-
/**
|
|
510
|
-
* When the template was last updated
|
|
511
|
-
*/
|
|
512
|
-
updated_at?: string | null;
|
|
513
|
-
/**
|
|
514
|
-
* Template variables for personalization
|
|
515
|
-
*/
|
|
516
|
-
variables?: Array<string> | null;
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
/**
|
|
520
|
-
* Error information
|
|
521
|
-
*/
|
|
522
|
-
interface Error {
|
|
523
|
-
/**
|
|
524
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
525
|
-
*/
|
|
526
|
-
code?: string;
|
|
527
|
-
/**
|
|
528
|
-
* Additional validation error details (field-level errors)
|
|
529
|
-
*/
|
|
530
|
-
details?: {
|
|
531
|
-
[key: string]: Array<string>;
|
|
532
|
-
} | null;
|
|
533
|
-
/**
|
|
534
|
-
* URL to documentation about this error
|
|
535
|
-
*/
|
|
536
|
-
doc_url?: string | null;
|
|
537
|
-
/**
|
|
538
|
-
* Human-readable error message
|
|
539
|
-
*/
|
|
540
|
-
message?: string;
|
|
541
|
-
}
|
|
542
|
-
/**
|
|
543
|
-
* Request and response metadata
|
|
544
|
-
*/
|
|
545
|
-
interface Meta {
|
|
546
|
-
/**
|
|
547
|
-
* Unique identifier for this request (for tracing and support)
|
|
548
|
-
*/
|
|
549
|
-
request_id?: string;
|
|
550
|
-
/**
|
|
551
|
-
* Server timestamp when the response was generated
|
|
552
|
-
*/
|
|
553
|
-
timestamp?: string;
|
|
554
|
-
/**
|
|
555
|
-
* API version used for this request
|
|
556
|
-
*/
|
|
557
|
-
version?: string;
|
|
326
|
+
templates?: Array<TemplatesAPI.Template>;
|
|
558
327
|
}
|
|
559
328
|
}
|
|
560
329
|
export interface TemplateCreateParams {
|
|
@@ -571,7 +340,7 @@ export interface TemplateCreateParams {
|
|
|
571
340
|
* Body param: Complete definition of a message template including header, body,
|
|
572
341
|
* footer, and buttons
|
|
573
342
|
*/
|
|
574
|
-
definition?:
|
|
343
|
+
definition?: TemplateDefinition;
|
|
575
344
|
/**
|
|
576
345
|
* Body param: Template language code (e.g., en_US) (optional, auto-detected if not
|
|
577
346
|
* provided)
|
|
@@ -600,299 +369,6 @@ export interface TemplateCreateParams {
|
|
|
600
369
|
*/
|
|
601
370
|
'x-profile-id'?: string;
|
|
602
371
|
}
|
|
603
|
-
export declare namespace TemplateCreateParams {
|
|
604
|
-
/**
|
|
605
|
-
* Complete definition of a message template including header, body, footer, and
|
|
606
|
-
* buttons
|
|
607
|
-
*/
|
|
608
|
-
interface Definition {
|
|
609
|
-
/**
|
|
610
|
-
* Body section of a message template with channel-specific content
|
|
611
|
-
*/
|
|
612
|
-
body: Definition.Body;
|
|
613
|
-
/**
|
|
614
|
-
* Configuration for AUTHENTICATION category templates
|
|
615
|
-
*/
|
|
616
|
-
authenticationConfig?: Definition.AuthenticationConfig | null;
|
|
617
|
-
/**
|
|
618
|
-
* Optional list of interactive buttons (e.g., quick replies, URLs, phone numbers)
|
|
619
|
-
*/
|
|
620
|
-
buttons?: Array<Definition.Button> | null;
|
|
621
|
-
/**
|
|
622
|
-
* The version of the template definition format
|
|
623
|
-
*/
|
|
624
|
-
definitionVersion?: string | null;
|
|
625
|
-
/**
|
|
626
|
-
* Footer section of a message template
|
|
627
|
-
*/
|
|
628
|
-
footer?: Definition.Footer | null;
|
|
629
|
-
/**
|
|
630
|
-
* Header section of a message template
|
|
631
|
-
*/
|
|
632
|
-
header?: Definition.Header | null;
|
|
633
|
-
}
|
|
634
|
-
namespace Definition {
|
|
635
|
-
/**
|
|
636
|
-
* Body section of a message template with channel-specific content
|
|
637
|
-
*/
|
|
638
|
-
interface Body {
|
|
639
|
-
/**
|
|
640
|
-
* Content that will be used for all channels (SMS and WhatsApp) unless
|
|
641
|
-
* channel-specific content is provided
|
|
642
|
-
*/
|
|
643
|
-
multiChannel?: Body.MultiChannel | null;
|
|
644
|
-
/**
|
|
645
|
-
* RCS-specific content that overrides multi-channel content for RCS messages
|
|
646
|
-
*/
|
|
647
|
-
rcs?: Body.Rcs | null;
|
|
648
|
-
/**
|
|
649
|
-
* SMS-specific content that overrides multi-channel content for SMS messages
|
|
650
|
-
*/
|
|
651
|
-
sms?: Body.SMS | null;
|
|
652
|
-
/**
|
|
653
|
-
* WhatsApp-specific content that overrides multi-channel content for WhatsApp
|
|
654
|
-
* messages
|
|
655
|
-
*/
|
|
656
|
-
whatsapp?: Body.Whatsapp | null;
|
|
657
|
-
}
|
|
658
|
-
namespace Body {
|
|
659
|
-
/**
|
|
660
|
-
* Content that will be used for all channels (SMS and WhatsApp) unless
|
|
661
|
-
* channel-specific content is provided
|
|
662
|
-
*/
|
|
663
|
-
interface MultiChannel {
|
|
664
|
-
template: string;
|
|
665
|
-
type?: string | null;
|
|
666
|
-
variables?: Array<MultiChannel.Variable> | null;
|
|
667
|
-
}
|
|
668
|
-
namespace MultiChannel {
|
|
669
|
-
interface Variable {
|
|
670
|
-
name: string;
|
|
671
|
-
props: Variable.Props;
|
|
672
|
-
type: string;
|
|
673
|
-
id?: number;
|
|
674
|
-
}
|
|
675
|
-
namespace Variable {
|
|
676
|
-
interface Props {
|
|
677
|
-
mediaType: string;
|
|
678
|
-
sample: string;
|
|
679
|
-
url: string;
|
|
680
|
-
variableType: string;
|
|
681
|
-
alt?: string | null;
|
|
682
|
-
regex?: string | null;
|
|
683
|
-
shortUrl?: string | null;
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
/**
|
|
688
|
-
* RCS-specific content that overrides multi-channel content for RCS messages
|
|
689
|
-
*/
|
|
690
|
-
interface Rcs {
|
|
691
|
-
template: string;
|
|
692
|
-
type?: string | null;
|
|
693
|
-
variables?: Array<Rcs.Variable> | null;
|
|
694
|
-
}
|
|
695
|
-
namespace Rcs {
|
|
696
|
-
interface Variable {
|
|
697
|
-
name: string;
|
|
698
|
-
props: Variable.Props;
|
|
699
|
-
type: string;
|
|
700
|
-
id?: number;
|
|
701
|
-
}
|
|
702
|
-
namespace Variable {
|
|
703
|
-
interface Props {
|
|
704
|
-
mediaType: string;
|
|
705
|
-
sample: string;
|
|
706
|
-
url: string;
|
|
707
|
-
variableType: string;
|
|
708
|
-
alt?: string | null;
|
|
709
|
-
regex?: string | null;
|
|
710
|
-
shortUrl?: string | null;
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
/**
|
|
715
|
-
* SMS-specific content that overrides multi-channel content for SMS messages
|
|
716
|
-
*/
|
|
717
|
-
interface SMS {
|
|
718
|
-
template: string;
|
|
719
|
-
type?: string | null;
|
|
720
|
-
variables?: Array<SMS.Variable> | null;
|
|
721
|
-
}
|
|
722
|
-
namespace SMS {
|
|
723
|
-
interface Variable {
|
|
724
|
-
name: string;
|
|
725
|
-
props: Variable.Props;
|
|
726
|
-
type: string;
|
|
727
|
-
id?: number;
|
|
728
|
-
}
|
|
729
|
-
namespace Variable {
|
|
730
|
-
interface Props {
|
|
731
|
-
mediaType: string;
|
|
732
|
-
sample: string;
|
|
733
|
-
url: string;
|
|
734
|
-
variableType: string;
|
|
735
|
-
alt?: string | null;
|
|
736
|
-
regex?: string | null;
|
|
737
|
-
shortUrl?: string | null;
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
/**
|
|
742
|
-
* WhatsApp-specific content that overrides multi-channel content for WhatsApp
|
|
743
|
-
* messages
|
|
744
|
-
*/
|
|
745
|
-
interface Whatsapp {
|
|
746
|
-
template: string;
|
|
747
|
-
type?: string | null;
|
|
748
|
-
variables?: Array<Whatsapp.Variable> | null;
|
|
749
|
-
}
|
|
750
|
-
namespace Whatsapp {
|
|
751
|
-
interface Variable {
|
|
752
|
-
name: string;
|
|
753
|
-
props: Variable.Props;
|
|
754
|
-
type: string;
|
|
755
|
-
id?: number;
|
|
756
|
-
}
|
|
757
|
-
namespace Variable {
|
|
758
|
-
interface Props {
|
|
759
|
-
mediaType: string;
|
|
760
|
-
sample: string;
|
|
761
|
-
url: string;
|
|
762
|
-
variableType: string;
|
|
763
|
-
alt?: string | null;
|
|
764
|
-
regex?: string | null;
|
|
765
|
-
shortUrl?: string | null;
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
/**
|
|
771
|
-
* Configuration for AUTHENTICATION category templates
|
|
772
|
-
*/
|
|
773
|
-
interface AuthenticationConfig {
|
|
774
|
-
/**
|
|
775
|
-
* Whether to add the security recommendation text: "For your security, do not
|
|
776
|
-
* share this code."
|
|
777
|
-
*/
|
|
778
|
-
addSecurityRecommendation?: boolean;
|
|
779
|
-
/**
|
|
780
|
-
* Code expiration time in minutes (1-90). If set, adds footer: "This code expires
|
|
781
|
-
* in X minutes."
|
|
782
|
-
*/
|
|
783
|
-
codeExpirationMinutes?: number | null;
|
|
784
|
-
}
|
|
785
|
-
/**
|
|
786
|
-
* Interactive button in a message template
|
|
787
|
-
*/
|
|
788
|
-
interface Button {
|
|
789
|
-
/**
|
|
790
|
-
* Properties specific to the button type
|
|
791
|
-
*/
|
|
792
|
-
props: Button.Props;
|
|
793
|
-
/**
|
|
794
|
-
* The type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, VOICE_CALL, COPY_CODE)
|
|
795
|
-
*/
|
|
796
|
-
type: string;
|
|
797
|
-
/**
|
|
798
|
-
* The unique identifier of the button (1-based index)
|
|
799
|
-
*/
|
|
800
|
-
id?: number;
|
|
801
|
-
}
|
|
802
|
-
namespace Button {
|
|
803
|
-
/**
|
|
804
|
-
* Properties specific to the button type
|
|
805
|
-
*/
|
|
806
|
-
interface Props {
|
|
807
|
-
activeFor: number;
|
|
808
|
-
countryCode: string;
|
|
809
|
-
offerCode: string;
|
|
810
|
-
phoneNumber: string;
|
|
811
|
-
quickReplyType: string;
|
|
812
|
-
text: string;
|
|
813
|
-
url: string;
|
|
814
|
-
urlType: string;
|
|
815
|
-
autofillText?: string | null;
|
|
816
|
-
otpType?: string | null;
|
|
817
|
-
packageName?: string | null;
|
|
818
|
-
signatureHash?: string | null;
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
/**
|
|
822
|
-
* Footer section of a message template
|
|
823
|
-
*/
|
|
824
|
-
interface Footer {
|
|
825
|
-
/**
|
|
826
|
-
* The footer template text with optional variable placeholders
|
|
827
|
-
*/
|
|
828
|
-
template: string;
|
|
829
|
-
/**
|
|
830
|
-
* The type of footer (typically "text")
|
|
831
|
-
*/
|
|
832
|
-
type?: string | null;
|
|
833
|
-
/**
|
|
834
|
-
* List of variables used in the footer template
|
|
835
|
-
*/
|
|
836
|
-
variables?: Array<Footer.Variable> | null;
|
|
837
|
-
}
|
|
838
|
-
namespace Footer {
|
|
839
|
-
interface Variable {
|
|
840
|
-
name: string;
|
|
841
|
-
props: Variable.Props;
|
|
842
|
-
type: string;
|
|
843
|
-
id?: number;
|
|
844
|
-
}
|
|
845
|
-
namespace Variable {
|
|
846
|
-
interface Props {
|
|
847
|
-
mediaType: string;
|
|
848
|
-
sample: string;
|
|
849
|
-
url: string;
|
|
850
|
-
variableType: string;
|
|
851
|
-
alt?: string | null;
|
|
852
|
-
regex?: string | null;
|
|
853
|
-
shortUrl?: string | null;
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
/**
|
|
858
|
-
* Header section of a message template
|
|
859
|
-
*/
|
|
860
|
-
interface Header {
|
|
861
|
-
/**
|
|
862
|
-
* The header template text with optional variable placeholders (e.g., "Welcome to
|
|
863
|
-
* {{0:variable}}")
|
|
864
|
-
*/
|
|
865
|
-
template: string;
|
|
866
|
-
/**
|
|
867
|
-
* The type of header (e.g., "text", "image", "video", "document")
|
|
868
|
-
*/
|
|
869
|
-
type?: string | null;
|
|
870
|
-
/**
|
|
871
|
-
* List of variables used in the header template
|
|
872
|
-
*/
|
|
873
|
-
variables?: Array<Header.Variable> | null;
|
|
874
|
-
}
|
|
875
|
-
namespace Header {
|
|
876
|
-
interface Variable {
|
|
877
|
-
name: string;
|
|
878
|
-
props: Variable.Props;
|
|
879
|
-
type: string;
|
|
880
|
-
id?: number;
|
|
881
|
-
}
|
|
882
|
-
namespace Variable {
|
|
883
|
-
interface Props {
|
|
884
|
-
mediaType: string;
|
|
885
|
-
sample: string;
|
|
886
|
-
url: string;
|
|
887
|
-
variableType: string;
|
|
888
|
-
alt?: string | null;
|
|
889
|
-
regex?: string | null;
|
|
890
|
-
shortUrl?: string | null;
|
|
891
|
-
}
|
|
892
|
-
}
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
372
|
export interface TemplateRetrieveParams {
|
|
897
373
|
/**
|
|
898
374
|
* Profile UUID to scope the request to a child profile. Only organization API keys
|
|
@@ -909,7 +385,7 @@ export interface TemplateUpdateParams {
|
|
|
909
385
|
* Body param: Complete definition of a message template including header, body,
|
|
910
386
|
* footer, and buttons
|
|
911
387
|
*/
|
|
912
|
-
definition?:
|
|
388
|
+
definition?: TemplateDefinition | null;
|
|
913
389
|
/**
|
|
914
390
|
* Body param: Template language code (e.g., en_US)
|
|
915
391
|
*/
|
|
@@ -941,299 +417,6 @@ export interface TemplateUpdateParams {
|
|
|
941
417
|
*/
|
|
942
418
|
'x-profile-id'?: string;
|
|
943
419
|
}
|
|
944
|
-
export declare namespace TemplateUpdateParams {
|
|
945
|
-
/**
|
|
946
|
-
* Complete definition of a message template including header, body, footer, and
|
|
947
|
-
* buttons
|
|
948
|
-
*/
|
|
949
|
-
interface Definition {
|
|
950
|
-
/**
|
|
951
|
-
* Body section of a message template with channel-specific content
|
|
952
|
-
*/
|
|
953
|
-
body: Definition.Body;
|
|
954
|
-
/**
|
|
955
|
-
* Configuration for AUTHENTICATION category templates
|
|
956
|
-
*/
|
|
957
|
-
authenticationConfig?: Definition.AuthenticationConfig | null;
|
|
958
|
-
/**
|
|
959
|
-
* Optional list of interactive buttons (e.g., quick replies, URLs, phone numbers)
|
|
960
|
-
*/
|
|
961
|
-
buttons?: Array<Definition.Button> | null;
|
|
962
|
-
/**
|
|
963
|
-
* The version of the template definition format
|
|
964
|
-
*/
|
|
965
|
-
definitionVersion?: string | null;
|
|
966
|
-
/**
|
|
967
|
-
* Footer section of a message template
|
|
968
|
-
*/
|
|
969
|
-
footer?: Definition.Footer | null;
|
|
970
|
-
/**
|
|
971
|
-
* Header section of a message template
|
|
972
|
-
*/
|
|
973
|
-
header?: Definition.Header | null;
|
|
974
|
-
}
|
|
975
|
-
namespace Definition {
|
|
976
|
-
/**
|
|
977
|
-
* Body section of a message template with channel-specific content
|
|
978
|
-
*/
|
|
979
|
-
interface Body {
|
|
980
|
-
/**
|
|
981
|
-
* Content that will be used for all channels (SMS and WhatsApp) unless
|
|
982
|
-
* channel-specific content is provided
|
|
983
|
-
*/
|
|
984
|
-
multiChannel?: Body.MultiChannel | null;
|
|
985
|
-
/**
|
|
986
|
-
* RCS-specific content that overrides multi-channel content for RCS messages
|
|
987
|
-
*/
|
|
988
|
-
rcs?: Body.Rcs | null;
|
|
989
|
-
/**
|
|
990
|
-
* SMS-specific content that overrides multi-channel content for SMS messages
|
|
991
|
-
*/
|
|
992
|
-
sms?: Body.SMS | null;
|
|
993
|
-
/**
|
|
994
|
-
* WhatsApp-specific content that overrides multi-channel content for WhatsApp
|
|
995
|
-
* messages
|
|
996
|
-
*/
|
|
997
|
-
whatsapp?: Body.Whatsapp | null;
|
|
998
|
-
}
|
|
999
|
-
namespace Body {
|
|
1000
|
-
/**
|
|
1001
|
-
* Content that will be used for all channels (SMS and WhatsApp) unless
|
|
1002
|
-
* channel-specific content is provided
|
|
1003
|
-
*/
|
|
1004
|
-
interface MultiChannel {
|
|
1005
|
-
template: string;
|
|
1006
|
-
type?: string | null;
|
|
1007
|
-
variables?: Array<MultiChannel.Variable> | null;
|
|
1008
|
-
}
|
|
1009
|
-
namespace MultiChannel {
|
|
1010
|
-
interface Variable {
|
|
1011
|
-
name: string;
|
|
1012
|
-
props: Variable.Props;
|
|
1013
|
-
type: string;
|
|
1014
|
-
id?: number;
|
|
1015
|
-
}
|
|
1016
|
-
namespace Variable {
|
|
1017
|
-
interface Props {
|
|
1018
|
-
mediaType: string;
|
|
1019
|
-
sample: string;
|
|
1020
|
-
url: string;
|
|
1021
|
-
variableType: string;
|
|
1022
|
-
alt?: string | null;
|
|
1023
|
-
regex?: string | null;
|
|
1024
|
-
shortUrl?: string | null;
|
|
1025
|
-
}
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
/**
|
|
1029
|
-
* RCS-specific content that overrides multi-channel content for RCS messages
|
|
1030
|
-
*/
|
|
1031
|
-
interface Rcs {
|
|
1032
|
-
template: string;
|
|
1033
|
-
type?: string | null;
|
|
1034
|
-
variables?: Array<Rcs.Variable> | null;
|
|
1035
|
-
}
|
|
1036
|
-
namespace Rcs {
|
|
1037
|
-
interface Variable {
|
|
1038
|
-
name: string;
|
|
1039
|
-
props: Variable.Props;
|
|
1040
|
-
type: string;
|
|
1041
|
-
id?: number;
|
|
1042
|
-
}
|
|
1043
|
-
namespace Variable {
|
|
1044
|
-
interface Props {
|
|
1045
|
-
mediaType: string;
|
|
1046
|
-
sample: string;
|
|
1047
|
-
url: string;
|
|
1048
|
-
variableType: string;
|
|
1049
|
-
alt?: string | null;
|
|
1050
|
-
regex?: string | null;
|
|
1051
|
-
shortUrl?: string | null;
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
/**
|
|
1056
|
-
* SMS-specific content that overrides multi-channel content for SMS messages
|
|
1057
|
-
*/
|
|
1058
|
-
interface SMS {
|
|
1059
|
-
template: string;
|
|
1060
|
-
type?: string | null;
|
|
1061
|
-
variables?: Array<SMS.Variable> | null;
|
|
1062
|
-
}
|
|
1063
|
-
namespace SMS {
|
|
1064
|
-
interface Variable {
|
|
1065
|
-
name: string;
|
|
1066
|
-
props: Variable.Props;
|
|
1067
|
-
type: string;
|
|
1068
|
-
id?: number;
|
|
1069
|
-
}
|
|
1070
|
-
namespace Variable {
|
|
1071
|
-
interface Props {
|
|
1072
|
-
mediaType: string;
|
|
1073
|
-
sample: string;
|
|
1074
|
-
url: string;
|
|
1075
|
-
variableType: string;
|
|
1076
|
-
alt?: string | null;
|
|
1077
|
-
regex?: string | null;
|
|
1078
|
-
shortUrl?: string | null;
|
|
1079
|
-
}
|
|
1080
|
-
}
|
|
1081
|
-
}
|
|
1082
|
-
/**
|
|
1083
|
-
* WhatsApp-specific content that overrides multi-channel content for WhatsApp
|
|
1084
|
-
* messages
|
|
1085
|
-
*/
|
|
1086
|
-
interface Whatsapp {
|
|
1087
|
-
template: string;
|
|
1088
|
-
type?: string | null;
|
|
1089
|
-
variables?: Array<Whatsapp.Variable> | null;
|
|
1090
|
-
}
|
|
1091
|
-
namespace Whatsapp {
|
|
1092
|
-
interface Variable {
|
|
1093
|
-
name: string;
|
|
1094
|
-
props: Variable.Props;
|
|
1095
|
-
type: string;
|
|
1096
|
-
id?: number;
|
|
1097
|
-
}
|
|
1098
|
-
namespace Variable {
|
|
1099
|
-
interface Props {
|
|
1100
|
-
mediaType: string;
|
|
1101
|
-
sample: string;
|
|
1102
|
-
url: string;
|
|
1103
|
-
variableType: string;
|
|
1104
|
-
alt?: string | null;
|
|
1105
|
-
regex?: string | null;
|
|
1106
|
-
shortUrl?: string | null;
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
1110
|
-
}
|
|
1111
|
-
/**
|
|
1112
|
-
* Configuration for AUTHENTICATION category templates
|
|
1113
|
-
*/
|
|
1114
|
-
interface AuthenticationConfig {
|
|
1115
|
-
/**
|
|
1116
|
-
* Whether to add the security recommendation text: "For your security, do not
|
|
1117
|
-
* share this code."
|
|
1118
|
-
*/
|
|
1119
|
-
addSecurityRecommendation?: boolean;
|
|
1120
|
-
/**
|
|
1121
|
-
* Code expiration time in minutes (1-90). If set, adds footer: "This code expires
|
|
1122
|
-
* in X minutes."
|
|
1123
|
-
*/
|
|
1124
|
-
codeExpirationMinutes?: number | null;
|
|
1125
|
-
}
|
|
1126
|
-
/**
|
|
1127
|
-
* Interactive button in a message template
|
|
1128
|
-
*/
|
|
1129
|
-
interface Button {
|
|
1130
|
-
/**
|
|
1131
|
-
* Properties specific to the button type
|
|
1132
|
-
*/
|
|
1133
|
-
props: Button.Props;
|
|
1134
|
-
/**
|
|
1135
|
-
* The type of button (e.g., QUICK_REPLY, URL, PHONE_NUMBER, VOICE_CALL, COPY_CODE)
|
|
1136
|
-
*/
|
|
1137
|
-
type: string;
|
|
1138
|
-
/**
|
|
1139
|
-
* The unique identifier of the button (1-based index)
|
|
1140
|
-
*/
|
|
1141
|
-
id?: number;
|
|
1142
|
-
}
|
|
1143
|
-
namespace Button {
|
|
1144
|
-
/**
|
|
1145
|
-
* Properties specific to the button type
|
|
1146
|
-
*/
|
|
1147
|
-
interface Props {
|
|
1148
|
-
activeFor: number;
|
|
1149
|
-
countryCode: string;
|
|
1150
|
-
offerCode: string;
|
|
1151
|
-
phoneNumber: string;
|
|
1152
|
-
quickReplyType: string;
|
|
1153
|
-
text: string;
|
|
1154
|
-
url: string;
|
|
1155
|
-
urlType: string;
|
|
1156
|
-
autofillText?: string | null;
|
|
1157
|
-
otpType?: string | null;
|
|
1158
|
-
packageName?: string | null;
|
|
1159
|
-
signatureHash?: string | null;
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
/**
|
|
1163
|
-
* Footer section of a message template
|
|
1164
|
-
*/
|
|
1165
|
-
interface Footer {
|
|
1166
|
-
/**
|
|
1167
|
-
* The footer template text with optional variable placeholders
|
|
1168
|
-
*/
|
|
1169
|
-
template: string;
|
|
1170
|
-
/**
|
|
1171
|
-
* The type of footer (typically "text")
|
|
1172
|
-
*/
|
|
1173
|
-
type?: string | null;
|
|
1174
|
-
/**
|
|
1175
|
-
* List of variables used in the footer template
|
|
1176
|
-
*/
|
|
1177
|
-
variables?: Array<Footer.Variable> | null;
|
|
1178
|
-
}
|
|
1179
|
-
namespace Footer {
|
|
1180
|
-
interface Variable {
|
|
1181
|
-
name: string;
|
|
1182
|
-
props: Variable.Props;
|
|
1183
|
-
type: string;
|
|
1184
|
-
id?: number;
|
|
1185
|
-
}
|
|
1186
|
-
namespace Variable {
|
|
1187
|
-
interface Props {
|
|
1188
|
-
mediaType: string;
|
|
1189
|
-
sample: string;
|
|
1190
|
-
url: string;
|
|
1191
|
-
variableType: string;
|
|
1192
|
-
alt?: string | null;
|
|
1193
|
-
regex?: string | null;
|
|
1194
|
-
shortUrl?: string | null;
|
|
1195
|
-
}
|
|
1196
|
-
}
|
|
1197
|
-
}
|
|
1198
|
-
/**
|
|
1199
|
-
* Header section of a message template
|
|
1200
|
-
*/
|
|
1201
|
-
interface Header {
|
|
1202
|
-
/**
|
|
1203
|
-
* The header template text with optional variable placeholders (e.g., "Welcome to
|
|
1204
|
-
* {{0:variable}}")
|
|
1205
|
-
*/
|
|
1206
|
-
template: string;
|
|
1207
|
-
/**
|
|
1208
|
-
* The type of header (e.g., "text", "image", "video", "document")
|
|
1209
|
-
*/
|
|
1210
|
-
type?: string | null;
|
|
1211
|
-
/**
|
|
1212
|
-
* List of variables used in the header template
|
|
1213
|
-
*/
|
|
1214
|
-
variables?: Array<Header.Variable> | null;
|
|
1215
|
-
}
|
|
1216
|
-
namespace Header {
|
|
1217
|
-
interface Variable {
|
|
1218
|
-
name: string;
|
|
1219
|
-
props: Variable.Props;
|
|
1220
|
-
type: string;
|
|
1221
|
-
id?: number;
|
|
1222
|
-
}
|
|
1223
|
-
namespace Variable {
|
|
1224
|
-
interface Props {
|
|
1225
|
-
mediaType: string;
|
|
1226
|
-
sample: string;
|
|
1227
|
-
url: string;
|
|
1228
|
-
variableType: string;
|
|
1229
|
-
alt?: string | null;
|
|
1230
|
-
regex?: string | null;
|
|
1231
|
-
shortUrl?: string | null;
|
|
1232
|
-
}
|
|
1233
|
-
}
|
|
1234
|
-
}
|
|
1235
|
-
}
|
|
1236
|
-
}
|
|
1237
420
|
export interface TemplateListParams {
|
|
1238
421
|
/**
|
|
1239
422
|
* Query param: Page number (1-indexed)
|
|
@@ -1285,6 +468,6 @@ export interface TemplateDeleteParams {
|
|
|
1285
468
|
'x-profile-id'?: string;
|
|
1286
469
|
}
|
|
1287
470
|
export declare namespace Templates {
|
|
1288
|
-
export { type
|
|
471
|
+
export { type APIResponseTemplate as APIResponseTemplate, type SentDmServicesCommonContractsPocOsAuthenticationConfig as SentDmServicesCommonContractsPocOsAuthenticationConfig, type SentDmServicesCommonContractsPocOsTemplateBody as SentDmServicesCommonContractsPocOsTemplateBody, type SentDmServicesCommonContractsPocOsTemplateButton as SentDmServicesCommonContractsPocOsTemplateButton, type SentDmServicesCommonContractsPocOsTemplateButtonProps as SentDmServicesCommonContractsPocOsTemplateButtonProps, type SentDmServicesCommonContractsPocOsTemplateFooter as SentDmServicesCommonContractsPocOsTemplateFooter, type SentDmServicesCommonContractsPocOsTemplateHeader as SentDmServicesCommonContractsPocOsTemplateHeader, type Template as Template, type TemplateBodyContent as TemplateBodyContent, type TemplateDefinition as TemplateDefinition, type TemplateVariable as TemplateVariable, type TemplateListResponse as TemplateListResponse, type TemplateCreateParams as TemplateCreateParams, type TemplateRetrieveParams as TemplateRetrieveParams, type TemplateUpdateParams as TemplateUpdateParams, type TemplateListParams as TemplateListParams, type TemplateDeleteParams as TemplateDeleteParams, };
|
|
1289
472
|
}
|
|
1290
473
|
//# sourceMappingURL=templates.d.mts.map
|