@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
package/resources/contacts.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import * as ContactsAPI from "./contacts.js";
|
|
3
|
+
import * as WebhooksAPI from "./webhooks.js";
|
|
2
4
|
import { APIPromise } from "../core/api-promise.js";
|
|
3
5
|
import { RequestOptions } from "../internal/request-options.js";
|
|
4
6
|
/**
|
|
@@ -11,10 +13,10 @@ export declare class Contacts extends APIResource {
|
|
|
11
13
|
*
|
|
12
14
|
* @example
|
|
13
15
|
* ```ts
|
|
14
|
-
* const
|
|
16
|
+
* const apiResponseOfContact = await client.contacts.create();
|
|
15
17
|
* ```
|
|
16
18
|
*/
|
|
17
|
-
create(params: ContactCreateParams, options?: RequestOptions): APIPromise<
|
|
19
|
+
create(params: ContactCreateParams, options?: RequestOptions): APIPromise<APIResponseOfContact>;
|
|
18
20
|
/**
|
|
19
21
|
* Retrieves a specific contact by their unique identifier. Returns detailed
|
|
20
22
|
* contact information including phone formats, available channels, and opt-out
|
|
@@ -22,24 +24,24 @@ export declare class Contacts extends APIResource {
|
|
|
22
24
|
*
|
|
23
25
|
* @example
|
|
24
26
|
* ```ts
|
|
25
|
-
* const
|
|
27
|
+
* const apiResponseOfContact = await client.contacts.retrieve(
|
|
26
28
|
* '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
|
|
27
29
|
* );
|
|
28
30
|
* ```
|
|
29
31
|
*/
|
|
30
|
-
retrieve(id: string, params?: ContactRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<
|
|
32
|
+
retrieve(id: string, params?: ContactRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<APIResponseOfContact>;
|
|
31
33
|
/**
|
|
32
34
|
* Updates a contact's default channel and/or opt-out status. Inherited contacts
|
|
33
35
|
* cannot be updated.
|
|
34
36
|
*
|
|
35
37
|
* @example
|
|
36
38
|
* ```ts
|
|
37
|
-
* const
|
|
39
|
+
* const apiResponseOfContact = await client.contacts.update(
|
|
38
40
|
* '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
|
|
39
41
|
* );
|
|
40
42
|
* ```
|
|
41
43
|
*/
|
|
42
|
-
update(id: string, params: ContactUpdateParams, options?: RequestOptions): APIPromise<
|
|
44
|
+
update(id: string, params: ContactUpdateParams, options?: RequestOptions): APIPromise<APIResponseOfContact>;
|
|
43
45
|
/**
|
|
44
46
|
* Retrieves a paginated list of contacts for the authenticated customer. Supports
|
|
45
47
|
* filtering by search term, channel, or phone number.
|
|
@@ -69,377 +71,85 @@ export declare class Contacts extends APIResource {
|
|
|
69
71
|
/**
|
|
70
72
|
* Standard API response envelope for all v3 endpoints
|
|
71
73
|
*/
|
|
72
|
-
export interface
|
|
74
|
+
export interface APIResponseOfContact {
|
|
73
75
|
/**
|
|
74
76
|
* Contact response for v3 API Uses snake_case for JSON property names
|
|
75
77
|
*/
|
|
76
|
-
data?:
|
|
78
|
+
data?: ContactResponse | 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
|
-
export declare namespace ContactCreateResponse {
|
|
91
|
-
/**
|
|
92
|
-
* Contact response for v3 API Uses snake_case for JSON property names
|
|
93
|
-
*/
|
|
94
|
-
interface Data {
|
|
95
|
-
/**
|
|
96
|
-
* Unique identifier for the contact
|
|
97
|
-
*/
|
|
98
|
-
id?: string;
|
|
99
|
-
/**
|
|
100
|
-
* Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
|
|
101
|
-
*/
|
|
102
|
-
available_channels?: string;
|
|
103
|
-
/**
|
|
104
|
-
* Country calling code (e.g., 1 for US/Canada)
|
|
105
|
-
*/
|
|
106
|
-
country_code?: string;
|
|
107
|
-
/**
|
|
108
|
-
* When the contact was created
|
|
109
|
-
*/
|
|
110
|
-
created_at?: string;
|
|
111
|
-
/**
|
|
112
|
-
* Default messaging channel to use (e.g., "sms" or "whatsapp")
|
|
113
|
-
*/
|
|
114
|
-
default_channel?: string;
|
|
115
|
-
/**
|
|
116
|
-
* Phone number in E.164 format (e.g., +1234567890)
|
|
117
|
-
*/
|
|
118
|
-
format_e164?: string;
|
|
119
|
-
/**
|
|
120
|
-
* Phone number in international format (e.g., +1 234-567-890)
|
|
121
|
-
*/
|
|
122
|
-
format_international?: string;
|
|
123
|
-
/**
|
|
124
|
-
* Phone number in national format (e.g., (234) 567-890)
|
|
125
|
-
*/
|
|
126
|
-
format_national?: string;
|
|
127
|
-
/**
|
|
128
|
-
* Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
|
|
129
|
-
*/
|
|
130
|
-
format_rfc?: string;
|
|
131
|
-
/**
|
|
132
|
-
* Whether this is an inherited contact (read-only)
|
|
133
|
-
*/
|
|
134
|
-
is_inherited?: boolean;
|
|
135
|
-
/**
|
|
136
|
-
* Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
137
|
-
* is per-contact, not per-channel.
|
|
138
|
-
*/
|
|
139
|
-
opt_out?: boolean;
|
|
140
|
-
/**
|
|
141
|
-
* Phone number in original format
|
|
142
|
-
*/
|
|
143
|
-
phone_number?: string;
|
|
144
|
-
/**
|
|
145
|
-
* ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
|
|
146
|
-
*/
|
|
147
|
-
region_code?: string;
|
|
148
|
-
/**
|
|
149
|
-
* When the contact was last updated
|
|
150
|
-
*/
|
|
151
|
-
updated_at?: string | null;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Error information
|
|
155
|
-
*/
|
|
156
|
-
interface Error {
|
|
157
|
-
/**
|
|
158
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
159
|
-
*/
|
|
160
|
-
code?: string;
|
|
161
|
-
/**
|
|
162
|
-
* Additional validation error details (field-level errors)
|
|
163
|
-
*/
|
|
164
|
-
details?: {
|
|
165
|
-
[key: string]: Array<string>;
|
|
166
|
-
} | null;
|
|
167
|
-
/**
|
|
168
|
-
* URL to documentation about this error
|
|
169
|
-
*/
|
|
170
|
-
doc_url?: string | null;
|
|
171
|
-
/**
|
|
172
|
-
* Human-readable error message
|
|
173
|
-
*/
|
|
174
|
-
message?: string;
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Request and response metadata
|
|
178
|
-
*/
|
|
179
|
-
interface Meta {
|
|
180
|
-
/**
|
|
181
|
-
* Unique identifier for this request (for tracing and support)
|
|
182
|
-
*/
|
|
183
|
-
request_id?: string;
|
|
184
|
-
/**
|
|
185
|
-
* Server timestamp when the response was generated
|
|
186
|
-
*/
|
|
187
|
-
timestamp?: string;
|
|
188
|
-
/**
|
|
189
|
-
* API version used for this request
|
|
190
|
-
*/
|
|
191
|
-
version?: string;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
92
|
/**
|
|
195
|
-
*
|
|
93
|
+
* Contact response for v3 API Uses snake_case for JSON property names
|
|
196
94
|
*/
|
|
197
|
-
export interface
|
|
95
|
+
export interface ContactResponse {
|
|
198
96
|
/**
|
|
199
|
-
*
|
|
97
|
+
* Unique identifier for the contact
|
|
200
98
|
*/
|
|
201
|
-
|
|
99
|
+
id?: string;
|
|
202
100
|
/**
|
|
203
|
-
*
|
|
101
|
+
* Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
|
|
204
102
|
*/
|
|
205
|
-
|
|
103
|
+
available_channels?: string;
|
|
206
104
|
/**
|
|
207
|
-
*
|
|
105
|
+
* Country calling code (e.g., 1 for US/Canada)
|
|
208
106
|
*/
|
|
209
|
-
|
|
107
|
+
country_code?: string;
|
|
210
108
|
/**
|
|
211
|
-
*
|
|
109
|
+
* When the contact was created
|
|
212
110
|
*/
|
|
213
|
-
|
|
214
|
-
}
|
|
215
|
-
export declare namespace ContactRetrieveResponse {
|
|
111
|
+
created_at?: string;
|
|
216
112
|
/**
|
|
217
|
-
*
|
|
113
|
+
* Default messaging channel to use (e.g., "sms" or "whatsapp")
|
|
218
114
|
*/
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Unique identifier for the contact
|
|
222
|
-
*/
|
|
223
|
-
id?: string;
|
|
224
|
-
/**
|
|
225
|
-
* Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
|
|
226
|
-
*/
|
|
227
|
-
available_channels?: string;
|
|
228
|
-
/**
|
|
229
|
-
* Country calling code (e.g., 1 for US/Canada)
|
|
230
|
-
*/
|
|
231
|
-
country_code?: string;
|
|
232
|
-
/**
|
|
233
|
-
* When the contact was created
|
|
234
|
-
*/
|
|
235
|
-
created_at?: string;
|
|
236
|
-
/**
|
|
237
|
-
* Default messaging channel to use (e.g., "sms" or "whatsapp")
|
|
238
|
-
*/
|
|
239
|
-
default_channel?: string;
|
|
240
|
-
/**
|
|
241
|
-
* Phone number in E.164 format (e.g., +1234567890)
|
|
242
|
-
*/
|
|
243
|
-
format_e164?: string;
|
|
244
|
-
/**
|
|
245
|
-
* Phone number in international format (e.g., +1 234-567-890)
|
|
246
|
-
*/
|
|
247
|
-
format_international?: string;
|
|
248
|
-
/**
|
|
249
|
-
* Phone number in national format (e.g., (234) 567-890)
|
|
250
|
-
*/
|
|
251
|
-
format_national?: string;
|
|
252
|
-
/**
|
|
253
|
-
* Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
|
|
254
|
-
*/
|
|
255
|
-
format_rfc?: string;
|
|
256
|
-
/**
|
|
257
|
-
* Whether this is an inherited contact (read-only)
|
|
258
|
-
*/
|
|
259
|
-
is_inherited?: boolean;
|
|
260
|
-
/**
|
|
261
|
-
* Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
262
|
-
* is per-contact, not per-channel.
|
|
263
|
-
*/
|
|
264
|
-
opt_out?: boolean;
|
|
265
|
-
/**
|
|
266
|
-
* Phone number in original format
|
|
267
|
-
*/
|
|
268
|
-
phone_number?: string;
|
|
269
|
-
/**
|
|
270
|
-
* ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
|
|
271
|
-
*/
|
|
272
|
-
region_code?: string;
|
|
273
|
-
/**
|
|
274
|
-
* When the contact was last updated
|
|
275
|
-
*/
|
|
276
|
-
updated_at?: string | null;
|
|
277
|
-
}
|
|
115
|
+
default_channel?: string;
|
|
278
116
|
/**
|
|
279
|
-
*
|
|
117
|
+
* Phone number in E.164 format (e.g., +1234567890)
|
|
280
118
|
*/
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
284
|
-
*/
|
|
285
|
-
code?: string;
|
|
286
|
-
/**
|
|
287
|
-
* Additional validation error details (field-level errors)
|
|
288
|
-
*/
|
|
289
|
-
details?: {
|
|
290
|
-
[key: string]: Array<string>;
|
|
291
|
-
} | null;
|
|
292
|
-
/**
|
|
293
|
-
* URL to documentation about this error
|
|
294
|
-
*/
|
|
295
|
-
doc_url?: string | null;
|
|
296
|
-
/**
|
|
297
|
-
* Human-readable error message
|
|
298
|
-
*/
|
|
299
|
-
message?: string;
|
|
300
|
-
}
|
|
119
|
+
format_e164?: string;
|
|
301
120
|
/**
|
|
302
|
-
*
|
|
121
|
+
* Phone number in international format (e.g., +1 234-567-890)
|
|
303
122
|
*/
|
|
304
|
-
|
|
305
|
-
/**
|
|
306
|
-
* Unique identifier for this request (for tracing and support)
|
|
307
|
-
*/
|
|
308
|
-
request_id?: string;
|
|
309
|
-
/**
|
|
310
|
-
* Server timestamp when the response was generated
|
|
311
|
-
*/
|
|
312
|
-
timestamp?: string;
|
|
313
|
-
/**
|
|
314
|
-
* API version used for this request
|
|
315
|
-
*/
|
|
316
|
-
version?: string;
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* Standard API response envelope for all v3 endpoints
|
|
321
|
-
*/
|
|
322
|
-
export interface ContactUpdateResponse {
|
|
123
|
+
format_international?: string;
|
|
323
124
|
/**
|
|
324
|
-
*
|
|
125
|
+
* Phone number in national format (e.g., (234) 567-890)
|
|
325
126
|
*/
|
|
326
|
-
|
|
127
|
+
format_national?: string;
|
|
327
128
|
/**
|
|
328
|
-
*
|
|
129
|
+
* Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
|
|
329
130
|
*/
|
|
330
|
-
|
|
131
|
+
format_rfc?: string;
|
|
331
132
|
/**
|
|
332
|
-
*
|
|
133
|
+
* Whether this is an inherited contact (read-only)
|
|
333
134
|
*/
|
|
334
|
-
|
|
135
|
+
is_inherited?: boolean;
|
|
335
136
|
/**
|
|
336
|
-
*
|
|
137
|
+
* Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
138
|
+
* is per-contact, not per-channel.
|
|
337
139
|
*/
|
|
338
|
-
|
|
339
|
-
}
|
|
340
|
-
export declare namespace ContactUpdateResponse {
|
|
140
|
+
opt_out?: boolean;
|
|
341
141
|
/**
|
|
342
|
-
*
|
|
142
|
+
* Phone number in original format
|
|
343
143
|
*/
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* Unique identifier for the contact
|
|
347
|
-
*/
|
|
348
|
-
id?: string;
|
|
349
|
-
/**
|
|
350
|
-
* Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
|
|
351
|
-
*/
|
|
352
|
-
available_channels?: string;
|
|
353
|
-
/**
|
|
354
|
-
* Country calling code (e.g., 1 for US/Canada)
|
|
355
|
-
*/
|
|
356
|
-
country_code?: string;
|
|
357
|
-
/**
|
|
358
|
-
* When the contact was created
|
|
359
|
-
*/
|
|
360
|
-
created_at?: string;
|
|
361
|
-
/**
|
|
362
|
-
* Default messaging channel to use (e.g., "sms" or "whatsapp")
|
|
363
|
-
*/
|
|
364
|
-
default_channel?: string;
|
|
365
|
-
/**
|
|
366
|
-
* Phone number in E.164 format (e.g., +1234567890)
|
|
367
|
-
*/
|
|
368
|
-
format_e164?: string;
|
|
369
|
-
/**
|
|
370
|
-
* Phone number in international format (e.g., +1 234-567-890)
|
|
371
|
-
*/
|
|
372
|
-
format_international?: string;
|
|
373
|
-
/**
|
|
374
|
-
* Phone number in national format (e.g., (234) 567-890)
|
|
375
|
-
*/
|
|
376
|
-
format_national?: string;
|
|
377
|
-
/**
|
|
378
|
-
* Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
|
|
379
|
-
*/
|
|
380
|
-
format_rfc?: string;
|
|
381
|
-
/**
|
|
382
|
-
* Whether this is an inherited contact (read-only)
|
|
383
|
-
*/
|
|
384
|
-
is_inherited?: boolean;
|
|
385
|
-
/**
|
|
386
|
-
* Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
387
|
-
* is per-contact, not per-channel.
|
|
388
|
-
*/
|
|
389
|
-
opt_out?: boolean;
|
|
390
|
-
/**
|
|
391
|
-
* Phone number in original format
|
|
392
|
-
*/
|
|
393
|
-
phone_number?: string;
|
|
394
|
-
/**
|
|
395
|
-
* ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
|
|
396
|
-
*/
|
|
397
|
-
region_code?: string;
|
|
398
|
-
/**
|
|
399
|
-
* When the contact was last updated
|
|
400
|
-
*/
|
|
401
|
-
updated_at?: string | null;
|
|
402
|
-
}
|
|
144
|
+
phone_number?: string;
|
|
403
145
|
/**
|
|
404
|
-
*
|
|
146
|
+
* ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
|
|
405
147
|
*/
|
|
406
|
-
|
|
407
|
-
/**
|
|
408
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
409
|
-
*/
|
|
410
|
-
code?: string;
|
|
411
|
-
/**
|
|
412
|
-
* Additional validation error details (field-level errors)
|
|
413
|
-
*/
|
|
414
|
-
details?: {
|
|
415
|
-
[key: string]: Array<string>;
|
|
416
|
-
} | null;
|
|
417
|
-
/**
|
|
418
|
-
* URL to documentation about this error
|
|
419
|
-
*/
|
|
420
|
-
doc_url?: string | null;
|
|
421
|
-
/**
|
|
422
|
-
* Human-readable error message
|
|
423
|
-
*/
|
|
424
|
-
message?: string;
|
|
425
|
-
}
|
|
148
|
+
region_code?: string;
|
|
426
149
|
/**
|
|
427
|
-
*
|
|
150
|
+
* When the contact was last updated
|
|
428
151
|
*/
|
|
429
|
-
|
|
430
|
-
/**
|
|
431
|
-
* Unique identifier for this request (for tracing and support)
|
|
432
|
-
*/
|
|
433
|
-
request_id?: string;
|
|
434
|
-
/**
|
|
435
|
-
* Server timestamp when the response was generated
|
|
436
|
-
*/
|
|
437
|
-
timestamp?: string;
|
|
438
|
-
/**
|
|
439
|
-
* API version used for this request
|
|
440
|
-
*/
|
|
441
|
-
version?: string;
|
|
442
|
-
}
|
|
152
|
+
updated_at?: string | null;
|
|
443
153
|
}
|
|
444
154
|
/**
|
|
445
155
|
* Standard API response envelope for all v3 endpoints
|
|
@@ -452,11 +162,11 @@ export interface ContactListResponse {
|
|
|
452
162
|
/**
|
|
453
163
|
* Error information
|
|
454
164
|
*/
|
|
455
|
-
error?:
|
|
165
|
+
error?: WebhooksAPI.ErrorDetail | null;
|
|
456
166
|
/**
|
|
457
167
|
* Request and response metadata
|
|
458
168
|
*/
|
|
459
|
-
meta?:
|
|
169
|
+
meta?: WebhooksAPI.APIMeta;
|
|
460
170
|
/**
|
|
461
171
|
* Indicates whether the request was successful
|
|
462
172
|
*/
|
|
@@ -470,159 +180,11 @@ export declare namespace ContactListResponse {
|
|
|
470
180
|
/**
|
|
471
181
|
* List of contacts
|
|
472
182
|
*/
|
|
473
|
-
contacts?: Array<
|
|
474
|
-
/**
|
|
475
|
-
* Pagination metadata for list responses
|
|
476
|
-
*/
|
|
477
|
-
pagination?: Data.Pagination;
|
|
478
|
-
}
|
|
479
|
-
namespace Data {
|
|
480
|
-
/**
|
|
481
|
-
* Contact response for v3 API Uses snake_case for JSON property names
|
|
482
|
-
*/
|
|
483
|
-
interface Contact {
|
|
484
|
-
/**
|
|
485
|
-
* Unique identifier for the contact
|
|
486
|
-
*/
|
|
487
|
-
id?: string;
|
|
488
|
-
/**
|
|
489
|
-
* Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
|
|
490
|
-
*/
|
|
491
|
-
available_channels?: string;
|
|
492
|
-
/**
|
|
493
|
-
* Country calling code (e.g., 1 for US/Canada)
|
|
494
|
-
*/
|
|
495
|
-
country_code?: string;
|
|
496
|
-
/**
|
|
497
|
-
* When the contact was created
|
|
498
|
-
*/
|
|
499
|
-
created_at?: string;
|
|
500
|
-
/**
|
|
501
|
-
* Default messaging channel to use (e.g., "sms" or "whatsapp")
|
|
502
|
-
*/
|
|
503
|
-
default_channel?: string;
|
|
504
|
-
/**
|
|
505
|
-
* Phone number in E.164 format (e.g., +1234567890)
|
|
506
|
-
*/
|
|
507
|
-
format_e164?: string;
|
|
508
|
-
/**
|
|
509
|
-
* Phone number in international format (e.g., +1 234-567-890)
|
|
510
|
-
*/
|
|
511
|
-
format_international?: string;
|
|
512
|
-
/**
|
|
513
|
-
* Phone number in national format (e.g., (234) 567-890)
|
|
514
|
-
*/
|
|
515
|
-
format_national?: string;
|
|
516
|
-
/**
|
|
517
|
-
* Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
|
|
518
|
-
*/
|
|
519
|
-
format_rfc?: string;
|
|
520
|
-
/**
|
|
521
|
-
* Whether this is an inherited contact (read-only)
|
|
522
|
-
*/
|
|
523
|
-
is_inherited?: boolean;
|
|
524
|
-
/**
|
|
525
|
-
* Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
526
|
-
* is per-contact, not per-channel.
|
|
527
|
-
*/
|
|
528
|
-
opt_out?: boolean;
|
|
529
|
-
/**
|
|
530
|
-
* Phone number in original format
|
|
531
|
-
*/
|
|
532
|
-
phone_number?: string;
|
|
533
|
-
/**
|
|
534
|
-
* ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
|
|
535
|
-
*/
|
|
536
|
-
region_code?: string;
|
|
537
|
-
/**
|
|
538
|
-
* When the contact was last updated
|
|
539
|
-
*/
|
|
540
|
-
updated_at?: string | null;
|
|
541
|
-
}
|
|
183
|
+
contacts?: Array<ContactsAPI.ContactResponse>;
|
|
542
184
|
/**
|
|
543
185
|
* Pagination metadata for list responses
|
|
544
186
|
*/
|
|
545
|
-
|
|
546
|
-
/**
|
|
547
|
-
* Cursor-based pagination pointers
|
|
548
|
-
*/
|
|
549
|
-
cursors?: Pagination.Cursors | null;
|
|
550
|
-
/**
|
|
551
|
-
* Whether there are more pages after this one
|
|
552
|
-
*/
|
|
553
|
-
has_more?: boolean;
|
|
554
|
-
/**
|
|
555
|
-
* Current page number (1-indexed)
|
|
556
|
-
*/
|
|
557
|
-
page?: number;
|
|
558
|
-
/**
|
|
559
|
-
* Number of items per page
|
|
560
|
-
*/
|
|
561
|
-
page_size?: number;
|
|
562
|
-
/**
|
|
563
|
-
* Total number of items across all pages
|
|
564
|
-
*/
|
|
565
|
-
total_count?: number;
|
|
566
|
-
/**
|
|
567
|
-
* Total number of pages
|
|
568
|
-
*/
|
|
569
|
-
total_pages?: number;
|
|
570
|
-
}
|
|
571
|
-
namespace Pagination {
|
|
572
|
-
/**
|
|
573
|
-
* Cursor-based pagination pointers
|
|
574
|
-
*/
|
|
575
|
-
interface Cursors {
|
|
576
|
-
/**
|
|
577
|
-
* Cursor to fetch the next page
|
|
578
|
-
*/
|
|
579
|
-
after?: string | null;
|
|
580
|
-
/**
|
|
581
|
-
* Cursor to fetch the previous page
|
|
582
|
-
*/
|
|
583
|
-
before?: string | null;
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
/**
|
|
588
|
-
* Error information
|
|
589
|
-
*/
|
|
590
|
-
interface Error {
|
|
591
|
-
/**
|
|
592
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
593
|
-
*/
|
|
594
|
-
code?: string;
|
|
595
|
-
/**
|
|
596
|
-
* Additional validation error details (field-level errors)
|
|
597
|
-
*/
|
|
598
|
-
details?: {
|
|
599
|
-
[key: string]: Array<string>;
|
|
600
|
-
} | null;
|
|
601
|
-
/**
|
|
602
|
-
* URL to documentation about this error
|
|
603
|
-
*/
|
|
604
|
-
doc_url?: string | null;
|
|
605
|
-
/**
|
|
606
|
-
* Human-readable error message
|
|
607
|
-
*/
|
|
608
|
-
message?: string;
|
|
609
|
-
}
|
|
610
|
-
/**
|
|
611
|
-
* Request and response metadata
|
|
612
|
-
*/
|
|
613
|
-
interface Meta {
|
|
614
|
-
/**
|
|
615
|
-
* Unique identifier for this request (for tracing and support)
|
|
616
|
-
*/
|
|
617
|
-
request_id?: string;
|
|
618
|
-
/**
|
|
619
|
-
* Server timestamp when the response was generated
|
|
620
|
-
*/
|
|
621
|
-
timestamp?: string;
|
|
622
|
-
/**
|
|
623
|
-
* API version used for this request
|
|
624
|
-
*/
|
|
625
|
-
version?: string;
|
|
187
|
+
pagination?: WebhooksAPI.PaginationMeta;
|
|
626
188
|
}
|
|
627
189
|
}
|
|
628
190
|
export interface ContactCreateParams {
|
|
@@ -725,6 +287,6 @@ export interface ContactDeleteParams {
|
|
|
725
287
|
'x-profile-id'?: string;
|
|
726
288
|
}
|
|
727
289
|
export declare namespace Contacts {
|
|
728
|
-
export { type
|
|
290
|
+
export { type APIResponseOfContact as APIResponseOfContact, type ContactResponse as ContactResponse, type ContactListResponse as ContactListResponse, type ContactCreateParams as ContactCreateParams, type ContactRetrieveParams as ContactRetrieveParams, type ContactUpdateParams as ContactUpdateParams, type ContactListParams as ContactListParams, type ContactDeleteParams as ContactDeleteParams, };
|
|
729
291
|
}
|
|
730
292
|
//# sourceMappingURL=contacts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contacts.d.ts","sourceRoot":"","sources":["../src/resources/contacts.ts"],"names":[],"mappings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