@sentdm/sentdm 0.35.0 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/client.d.mts +14 -14
- package/client.d.mts.map +1 -1
- package/client.d.ts +14 -14
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/contacts.d.mts +85 -589
- package/resources/contacts.d.mts.map +1 -1
- package/resources/contacts.d.ts +85 -589
- package/resources/contacts.d.ts.map +1 -1
- package/resources/contacts.js +4 -4
- package/resources/contacts.js.map +1 -1
- package/resources/contacts.mjs +4 -4
- package/resources/contacts.mjs.map +1 -1
- package/resources/conversations.d.mts +69 -328
- package/resources/conversations.d.mts.map +1 -1
- package/resources/conversations.d.ts +69 -328
- package/resources/conversations.d.ts.map +1 -1
- package/resources/conversations.js +10 -8
- package/resources/conversations.js.map +1 -1
- package/resources/conversations.mjs +10 -8
- package/resources/conversations.mjs.map +1 -1
- package/resources/index.d.mts +7 -7
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +7 -7
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/me.d.mts +81 -129
- package/resources/me.d.mts.map +1 -1
- package/resources/me.d.ts +81 -129
- package/resources/me.d.ts.map +1 -1
- package/resources/me.js +11 -0
- package/resources/me.js.map +1 -1
- package/resources/me.mjs +11 -0
- package/resources/me.mjs.map +1 -1
- package/resources/messages.d.mts +8 -171
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +8 -171
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs.map +1 -1
- package/resources/numbers.d.mts +3 -42
- package/resources/numbers.d.mts.map +1 -1
- package/resources/numbers.d.ts +3 -42
- package/resources/numbers.d.ts.map +1 -1
- package/resources/numbers.js.map +1 -1
- package/resources/numbers.mjs.map +1 -1
- package/resources/profiles/campaigns.d.mts +149 -544
- package/resources/profiles/campaigns.d.mts.map +1 -1
- package/resources/profiles/campaigns.d.ts +149 -544
- package/resources/profiles/campaigns.d.ts.map +1 -1
- package/resources/profiles/index.d.mts +2 -2
- package/resources/profiles/index.d.mts.map +1 -1
- package/resources/profiles/index.d.ts +2 -2
- package/resources/profiles/index.d.ts.map +1 -1
- package/resources/profiles/index.js.map +1 -1
- package/resources/profiles/index.mjs.map +1 -1
- package/resources/profiles/profiles.d.mts +411 -1821
- package/resources/profiles/profiles.d.mts.map +1 -1
- package/resources/profiles/profiles.d.ts +411 -1821
- package/resources/profiles/profiles.d.ts.map +1 -1
- package/resources/profiles/profiles.js.map +1 -1
- package/resources/profiles/profiles.mjs.map +1 -1
- package/resources/templates.d.mts +84 -486
- package/resources/templates.d.mts.map +1 -1
- package/resources/templates.d.ts +84 -486
- package/resources/templates.d.ts.map +1 -1
- package/resources/templates.js +3 -3
- package/resources/templates.js.map +1 -1
- package/resources/templates.mjs +3 -3
- package/resources/templates.mjs.map +1 -1
- package/resources/users.d.mts +47 -437
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +47 -437
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +3 -3
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +3 -3
- package/resources/users.mjs.map +1 -1
- package/resources/webhooks.d.mts +189 -768
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +189 -768
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +7 -6
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +7 -6
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +52 -39
- package/src/resources/contacts.ts +88 -678
- package/src/resources/conversations.ts +77 -393
- package/src/resources/index.ts +26 -20
- package/src/resources/me.ts +94 -148
- package/src/resources/messages.ts +8 -194
- package/src/resources/numbers.ts +3 -47
- package/src/resources/profiles/campaigns.ts +174 -673
- package/src/resources/profiles/index.ts +14 -6
- package/src/resources/profiles/profiles.ts +529 -2216
- package/src/resources/templates.ts +100 -572
- package/src/resources/users.ts +48 -505
- package/src/resources/webhooks.ts +297 -996
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
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
|
/**
|
|
@@ -15,12 +17,12 @@ export declare class Contacts extends APIResource {
|
|
|
15
17
|
*
|
|
16
18
|
* @example
|
|
17
19
|
* ```ts
|
|
18
|
-
* const
|
|
20
|
+
* const apiResponseOfContact = await client.contacts.create({
|
|
19
21
|
* phone_number: '+1234567890',
|
|
20
22
|
* });
|
|
21
23
|
* ```
|
|
22
24
|
*/
|
|
23
|
-
create(params: ContactCreateParams, options?: RequestOptions): APIPromise<
|
|
25
|
+
create(params: ContactCreateParams, options?: RequestOptions): APIPromise<APIResponseOfContact>;
|
|
24
26
|
/**
|
|
25
27
|
* Retrieves a specific contact by their unique identifier. Returns detailed
|
|
26
28
|
* contact information including phone formats, available channels, and opt-out
|
|
@@ -28,23 +30,23 @@ export declare class Contacts extends APIResource {
|
|
|
28
30
|
*
|
|
29
31
|
* @example
|
|
30
32
|
* ```ts
|
|
31
|
-
* const
|
|
33
|
+
* const apiResponseOfContact = await client.contacts.retrieve(
|
|
32
34
|
* '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
|
|
33
35
|
* );
|
|
34
36
|
* ```
|
|
35
37
|
*/
|
|
36
|
-
retrieve(id: string, params?: ContactRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<
|
|
38
|
+
retrieve(id: string, params?: ContactRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<APIResponseOfContact>;
|
|
37
39
|
/**
|
|
38
40
|
* Updates a contact's default channel and/or opt-out status.
|
|
39
41
|
*
|
|
40
42
|
* @example
|
|
41
43
|
* ```ts
|
|
42
|
-
* const
|
|
44
|
+
* const apiResponseOfContact = await client.contacts.update(
|
|
43
45
|
* '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
|
|
44
46
|
* );
|
|
45
47
|
* ```
|
|
46
48
|
*/
|
|
47
|
-
update(id: string, params: ContactUpdateParams, options?: RequestOptions): APIPromise<
|
|
49
|
+
update(id: string, params: ContactUpdateParams, options?: RequestOptions): APIPromise<APIResponseOfContact>;
|
|
48
50
|
/**
|
|
49
51
|
* Retrieves a paginated list of contacts for the authenticated customer. Supports
|
|
50
52
|
* filtering by search term, channel, or phone number.
|
|
@@ -81,687 +83,181 @@ export declare class Contacts extends APIResource {
|
|
|
81
83
|
*
|
|
82
84
|
* @example
|
|
83
85
|
* ```ts
|
|
84
|
-
* const
|
|
86
|
+
* const apiResponseOfContactMessageSummary =
|
|
85
87
|
* await client.contacts.retrieveMessageSummary(
|
|
86
88
|
* '6ba7b810-9dad-11d1-80b4-00c04fd430c8',
|
|
87
89
|
* );
|
|
88
90
|
* ```
|
|
89
91
|
*/
|
|
90
|
-
retrieveMessageSummary(contactID: string, params?: ContactRetrieveMessageSummaryParams | null | undefined, options?: RequestOptions): APIPromise<
|
|
92
|
+
retrieveMessageSummary(contactID: string, params?: ContactRetrieveMessageSummaryParams | null | undefined, options?: RequestOptions): APIPromise<APIResponseOfContactMessageSummary>;
|
|
91
93
|
}
|
|
92
94
|
/**
|
|
93
95
|
* Standard API response envelope for all v3 endpoints
|
|
94
96
|
*/
|
|
95
|
-
export interface
|
|
97
|
+
export interface APIResponseOfContact {
|
|
96
98
|
/**
|
|
97
99
|
* Contact response for v3 API Uses snake_case for JSON property names
|
|
98
100
|
*/
|
|
99
|
-
data?:
|
|
101
|
+
data?: ContactResponse | null;
|
|
100
102
|
/**
|
|
101
103
|
* Error information
|
|
102
104
|
*/
|
|
103
|
-
error?:
|
|
105
|
+
error?: WebhooksAPI.ErrorDetail | null;
|
|
104
106
|
/**
|
|
105
107
|
* Request and response metadata
|
|
106
108
|
*/
|
|
107
|
-
meta?:
|
|
109
|
+
meta?: WebhooksAPI.APIMeta;
|
|
108
110
|
/**
|
|
109
111
|
* Indicates whether the request was successful
|
|
110
112
|
*/
|
|
111
113
|
success?: boolean;
|
|
112
114
|
}
|
|
113
|
-
export declare namespace ContactCreateResponse {
|
|
114
|
-
/**
|
|
115
|
-
* Contact response for v3 API Uses snake_case for JSON property names
|
|
116
|
-
*/
|
|
117
|
-
interface Data {
|
|
118
|
-
/**
|
|
119
|
-
* Unique identifier for the contact
|
|
120
|
-
*/
|
|
121
|
-
id?: string;
|
|
122
|
-
/**
|
|
123
|
-
* Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
|
|
124
|
-
*/
|
|
125
|
-
available_channels?: string;
|
|
126
|
-
/**
|
|
127
|
-
* Country calling code (e.g., 1 for US/Canada)
|
|
128
|
-
*/
|
|
129
|
-
country_code?: string;
|
|
130
|
-
/**
|
|
131
|
-
* When the contact was created
|
|
132
|
-
*/
|
|
133
|
-
created_at?: string;
|
|
134
|
-
/**
|
|
135
|
-
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
136
|
-
* Says whose resource this is, which the resource's own id does not.
|
|
137
|
-
*/
|
|
138
|
-
customer_id?: string;
|
|
139
|
-
/**
|
|
140
|
-
* Default messaging channel to use (e.g., "sms" or "whatsapp")
|
|
141
|
-
*/
|
|
142
|
-
default_channel?: string;
|
|
143
|
-
/**
|
|
144
|
-
* Phone number in E.164 format (e.g., +1234567890)
|
|
145
|
-
*/
|
|
146
|
-
format_e164?: string;
|
|
147
|
-
/**
|
|
148
|
-
* Phone number in international format (e.g., +1 234-567-890)
|
|
149
|
-
*/
|
|
150
|
-
format_international?: string;
|
|
151
|
-
/**
|
|
152
|
-
* Phone number in national format (e.g., (234) 567-890)
|
|
153
|
-
*/
|
|
154
|
-
format_national?: string;
|
|
155
|
-
/**
|
|
156
|
-
* Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
|
|
157
|
-
*/
|
|
158
|
-
format_rfc?: string;
|
|
159
|
-
/**
|
|
160
|
-
* @deprecated Always false. Contacts are no longer shared or inherited between
|
|
161
|
-
* sender profiles — a profile sees only the contacts it owns. Retained so existing
|
|
162
|
-
* v3 clients reading is_inherited keep deserializing; it carries no information.
|
|
163
|
-
*/
|
|
164
|
-
is_inherited?: boolean;
|
|
165
|
-
/**
|
|
166
|
-
* Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
167
|
-
* is per-contact, not per-channel.
|
|
168
|
-
*/
|
|
169
|
-
opt_out?: boolean;
|
|
170
|
-
/**
|
|
171
|
-
* Phone number in original format
|
|
172
|
-
*/
|
|
173
|
-
phone_number?: string;
|
|
174
|
-
/**
|
|
175
|
-
* ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
|
|
176
|
-
*/
|
|
177
|
-
region_code?: string;
|
|
178
|
-
/**
|
|
179
|
-
* When the contact was last updated
|
|
180
|
-
*/
|
|
181
|
-
updated_at?: string | null;
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Error information
|
|
185
|
-
*/
|
|
186
|
-
interface Error {
|
|
187
|
-
/**
|
|
188
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
189
|
-
*/
|
|
190
|
-
code?: string;
|
|
191
|
-
/**
|
|
192
|
-
* Additional validation error details (field-level errors)
|
|
193
|
-
*/
|
|
194
|
-
details?: {
|
|
195
|
-
[key: string]: Array<string>;
|
|
196
|
-
} | null;
|
|
197
|
-
/**
|
|
198
|
-
* URL to documentation about this error
|
|
199
|
-
*/
|
|
200
|
-
doc_url?: string | null;
|
|
201
|
-
/**
|
|
202
|
-
* Human-readable error message
|
|
203
|
-
*/
|
|
204
|
-
message?: string;
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* Request and response metadata
|
|
208
|
-
*/
|
|
209
|
-
interface Meta {
|
|
210
|
-
/**
|
|
211
|
-
* Unique identifier for this request (for tracing and support)
|
|
212
|
-
*/
|
|
213
|
-
request_id?: string;
|
|
214
|
-
/**
|
|
215
|
-
* Server timestamp when the response was generated
|
|
216
|
-
*/
|
|
217
|
-
timestamp?: string;
|
|
218
|
-
/**
|
|
219
|
-
* API version used for this request
|
|
220
|
-
*/
|
|
221
|
-
version?: string;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
115
|
/**
|
|
225
116
|
* Standard API response envelope for all v3 endpoints
|
|
226
117
|
*/
|
|
227
|
-
export interface
|
|
118
|
+
export interface APIResponseOfContactMessageSummary {
|
|
228
119
|
/**
|
|
229
|
-
*
|
|
120
|
+
* The response data (null if error)
|
|
230
121
|
*/
|
|
231
|
-
data?:
|
|
122
|
+
data?: ContactMessageSummary | null;
|
|
232
123
|
/**
|
|
233
124
|
* Error information
|
|
234
125
|
*/
|
|
235
|
-
error?:
|
|
126
|
+
error?: WebhooksAPI.ErrorDetail | null;
|
|
236
127
|
/**
|
|
237
128
|
* Request and response metadata
|
|
238
129
|
*/
|
|
239
|
-
meta?:
|
|
130
|
+
meta?: WebhooksAPI.APIMeta;
|
|
240
131
|
/**
|
|
241
132
|
* Indicates whether the request was successful
|
|
242
133
|
*/
|
|
243
134
|
success?: boolean;
|
|
244
135
|
}
|
|
245
|
-
export
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
*/
|
|
257
|
-
available_channels?: string;
|
|
258
|
-
/**
|
|
259
|
-
* Country calling code (e.g., 1 for US/Canada)
|
|
260
|
-
*/
|
|
261
|
-
country_code?: string;
|
|
262
|
-
/**
|
|
263
|
-
* When the contact was created
|
|
264
|
-
*/
|
|
265
|
-
created_at?: string;
|
|
266
|
-
/**
|
|
267
|
-
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
268
|
-
* Says whose resource this is, which the resource's own id does not.
|
|
269
|
-
*/
|
|
270
|
-
customer_id?: string;
|
|
271
|
-
/**
|
|
272
|
-
* Default messaging channel to use (e.g., "sms" or "whatsapp")
|
|
273
|
-
*/
|
|
274
|
-
default_channel?: string;
|
|
275
|
-
/**
|
|
276
|
-
* Phone number in E.164 format (e.g., +1234567890)
|
|
277
|
-
*/
|
|
278
|
-
format_e164?: string;
|
|
279
|
-
/**
|
|
280
|
-
* Phone number in international format (e.g., +1 234-567-890)
|
|
281
|
-
*/
|
|
282
|
-
format_international?: string;
|
|
283
|
-
/**
|
|
284
|
-
* Phone number in national format (e.g., (234) 567-890)
|
|
285
|
-
*/
|
|
286
|
-
format_national?: string;
|
|
287
|
-
/**
|
|
288
|
-
* Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
|
|
289
|
-
*/
|
|
290
|
-
format_rfc?: string;
|
|
291
|
-
/**
|
|
292
|
-
* @deprecated Always false. Contacts are no longer shared or inherited between
|
|
293
|
-
* sender profiles — a profile sees only the contacts it owns. Retained so existing
|
|
294
|
-
* v3 clients reading is_inherited keep deserializing; it carries no information.
|
|
295
|
-
*/
|
|
296
|
-
is_inherited?: boolean;
|
|
297
|
-
/**
|
|
298
|
-
* Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
299
|
-
* is per-contact, not per-channel.
|
|
300
|
-
*/
|
|
301
|
-
opt_out?: boolean;
|
|
302
|
-
/**
|
|
303
|
-
* Phone number in original format
|
|
304
|
-
*/
|
|
305
|
-
phone_number?: string;
|
|
306
|
-
/**
|
|
307
|
-
* ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
|
|
308
|
-
*/
|
|
309
|
-
region_code?: string;
|
|
310
|
-
/**
|
|
311
|
-
* When the contact was last updated
|
|
312
|
-
*/
|
|
313
|
-
updated_at?: string | null;
|
|
314
|
-
}
|
|
315
|
-
/**
|
|
316
|
-
* Error information
|
|
317
|
-
*/
|
|
318
|
-
interface Error {
|
|
319
|
-
/**
|
|
320
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
321
|
-
*/
|
|
322
|
-
code?: string;
|
|
323
|
-
/**
|
|
324
|
-
* Additional validation error details (field-level errors)
|
|
325
|
-
*/
|
|
326
|
-
details?: {
|
|
327
|
-
[key: string]: Array<string>;
|
|
328
|
-
} | null;
|
|
329
|
-
/**
|
|
330
|
-
* URL to documentation about this error
|
|
331
|
-
*/
|
|
332
|
-
doc_url?: string | null;
|
|
333
|
-
/**
|
|
334
|
-
* Human-readable error message
|
|
335
|
-
*/
|
|
336
|
-
message?: string;
|
|
337
|
-
}
|
|
338
|
-
/**
|
|
339
|
-
* Request and response metadata
|
|
340
|
-
*/
|
|
341
|
-
interface Meta {
|
|
342
|
-
/**
|
|
343
|
-
* Unique identifier for this request (for tracing and support)
|
|
344
|
-
*/
|
|
345
|
-
request_id?: string;
|
|
136
|
+
export interface ContactMessageSummary {
|
|
137
|
+
channel_scores?: Array<ContactMessageSummary.ChannelScore>;
|
|
138
|
+
channels_used?: Array<string>;
|
|
139
|
+
contact_id?: string;
|
|
140
|
+
first_message_at?: string | null;
|
|
141
|
+
last_message_at?: string | null;
|
|
142
|
+
message_count?: number;
|
|
143
|
+
}
|
|
144
|
+
export declare namespace ContactMessageSummary {
|
|
145
|
+
interface ChannelScore {
|
|
146
|
+
channel?: string;
|
|
346
147
|
/**
|
|
347
|
-
*
|
|
148
|
+
* Percentage (0-100) of messages on this channel that ended in FAILED.
|
|
348
149
|
*/
|
|
349
|
-
|
|
150
|
+
fail_score?: number;
|
|
350
151
|
/**
|
|
351
|
-
*
|
|
152
|
+
* Percentage (0-100) of messages on this channel that reached a successful
|
|
153
|
+
* terminal state: SENT/DELIVERED/READ for outbound, RECEIVED for inbound.
|
|
352
154
|
*/
|
|
353
|
-
|
|
155
|
+
success_score?: number;
|
|
354
156
|
}
|
|
355
157
|
}
|
|
356
158
|
/**
|
|
357
|
-
*
|
|
159
|
+
* Contact response for v3 API Uses snake_case for JSON property names
|
|
358
160
|
*/
|
|
359
|
-
export interface
|
|
161
|
+
export interface ContactResponse {
|
|
360
162
|
/**
|
|
361
|
-
*
|
|
163
|
+
* Unique identifier for the contact
|
|
362
164
|
*/
|
|
363
|
-
|
|
165
|
+
id?: string;
|
|
364
166
|
/**
|
|
365
|
-
*
|
|
167
|
+
* Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
|
|
366
168
|
*/
|
|
367
|
-
|
|
169
|
+
available_channels?: string;
|
|
368
170
|
/**
|
|
369
|
-
*
|
|
171
|
+
* Country calling code (e.g., 1 for US/Canada)
|
|
370
172
|
*/
|
|
371
|
-
|
|
173
|
+
country_code?: string;
|
|
372
174
|
/**
|
|
373
|
-
*
|
|
175
|
+
* When the contact was created
|
|
374
176
|
*/
|
|
375
|
-
|
|
376
|
-
}
|
|
377
|
-
export declare namespace ContactUpdateResponse {
|
|
177
|
+
created_at?: string;
|
|
378
178
|
/**
|
|
379
|
-
*
|
|
179
|
+
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
180
|
+
* Says whose resource this is, which the resource's own id does not.
|
|
380
181
|
*/
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* Unique identifier for the contact
|
|
384
|
-
*/
|
|
385
|
-
id?: string;
|
|
386
|
-
/**
|
|
387
|
-
* Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
|
|
388
|
-
*/
|
|
389
|
-
available_channels?: string;
|
|
390
|
-
/**
|
|
391
|
-
* Country calling code (e.g., 1 for US/Canada)
|
|
392
|
-
*/
|
|
393
|
-
country_code?: string;
|
|
394
|
-
/**
|
|
395
|
-
* When the contact was created
|
|
396
|
-
*/
|
|
397
|
-
created_at?: string;
|
|
398
|
-
/**
|
|
399
|
-
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
400
|
-
* Says whose resource this is, which the resource's own id does not.
|
|
401
|
-
*/
|
|
402
|
-
customer_id?: string;
|
|
403
|
-
/**
|
|
404
|
-
* Default messaging channel to use (e.g., "sms" or "whatsapp")
|
|
405
|
-
*/
|
|
406
|
-
default_channel?: string;
|
|
407
|
-
/**
|
|
408
|
-
* Phone number in E.164 format (e.g., +1234567890)
|
|
409
|
-
*/
|
|
410
|
-
format_e164?: string;
|
|
411
|
-
/**
|
|
412
|
-
* Phone number in international format (e.g., +1 234-567-890)
|
|
413
|
-
*/
|
|
414
|
-
format_international?: string;
|
|
415
|
-
/**
|
|
416
|
-
* Phone number in national format (e.g., (234) 567-890)
|
|
417
|
-
*/
|
|
418
|
-
format_national?: string;
|
|
419
|
-
/**
|
|
420
|
-
* Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
|
|
421
|
-
*/
|
|
422
|
-
format_rfc?: string;
|
|
423
|
-
/**
|
|
424
|
-
* @deprecated Always false. Contacts are no longer shared or inherited between
|
|
425
|
-
* sender profiles — a profile sees only the contacts it owns. Retained so existing
|
|
426
|
-
* v3 clients reading is_inherited keep deserializing; it carries no information.
|
|
427
|
-
*/
|
|
428
|
-
is_inherited?: boolean;
|
|
429
|
-
/**
|
|
430
|
-
* Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
431
|
-
* is per-contact, not per-channel.
|
|
432
|
-
*/
|
|
433
|
-
opt_out?: boolean;
|
|
434
|
-
/**
|
|
435
|
-
* Phone number in original format
|
|
436
|
-
*/
|
|
437
|
-
phone_number?: string;
|
|
438
|
-
/**
|
|
439
|
-
* ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
|
|
440
|
-
*/
|
|
441
|
-
region_code?: string;
|
|
442
|
-
/**
|
|
443
|
-
* When the contact was last updated
|
|
444
|
-
*/
|
|
445
|
-
updated_at?: string | null;
|
|
446
|
-
}
|
|
182
|
+
customer_id?: string;
|
|
447
183
|
/**
|
|
448
|
-
*
|
|
184
|
+
* Default messaging channel to use (e.g., "sms" or "whatsapp")
|
|
449
185
|
*/
|
|
450
|
-
|
|
451
|
-
/**
|
|
452
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
453
|
-
*/
|
|
454
|
-
code?: string;
|
|
455
|
-
/**
|
|
456
|
-
* Additional validation error details (field-level errors)
|
|
457
|
-
*/
|
|
458
|
-
details?: {
|
|
459
|
-
[key: string]: Array<string>;
|
|
460
|
-
} | null;
|
|
461
|
-
/**
|
|
462
|
-
* URL to documentation about this error
|
|
463
|
-
*/
|
|
464
|
-
doc_url?: string | null;
|
|
465
|
-
/**
|
|
466
|
-
* Human-readable error message
|
|
467
|
-
*/
|
|
468
|
-
message?: string;
|
|
469
|
-
}
|
|
186
|
+
default_channel?: string;
|
|
470
187
|
/**
|
|
471
|
-
*
|
|
188
|
+
* Phone number in E.164 format (e.g., +1234567890)
|
|
472
189
|
*/
|
|
473
|
-
|
|
474
|
-
/**
|
|
475
|
-
* Unique identifier for this request (for tracing and support)
|
|
476
|
-
*/
|
|
477
|
-
request_id?: string;
|
|
478
|
-
/**
|
|
479
|
-
* Server timestamp when the response was generated
|
|
480
|
-
*/
|
|
481
|
-
timestamp?: string;
|
|
482
|
-
/**
|
|
483
|
-
* API version used for this request
|
|
484
|
-
*/
|
|
485
|
-
version?: string;
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
/**
|
|
489
|
-
* Standard API response envelope for all v3 endpoints
|
|
490
|
-
*/
|
|
491
|
-
export interface ContactListResponse {
|
|
190
|
+
format_e164?: string;
|
|
492
191
|
/**
|
|
493
|
-
*
|
|
192
|
+
* Phone number in international format (e.g., +1 234-567-890)
|
|
494
193
|
*/
|
|
495
|
-
|
|
194
|
+
format_international?: string;
|
|
496
195
|
/**
|
|
497
|
-
*
|
|
196
|
+
* Phone number in national format (e.g., (234) 567-890)
|
|
498
197
|
*/
|
|
499
|
-
|
|
198
|
+
format_national?: string;
|
|
500
199
|
/**
|
|
501
|
-
*
|
|
200
|
+
* Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
|
|
502
201
|
*/
|
|
503
|
-
|
|
202
|
+
format_rfc?: string;
|
|
504
203
|
/**
|
|
505
|
-
*
|
|
204
|
+
* @deprecated Always false. Contacts are no longer shared or inherited between
|
|
205
|
+
* sender profiles — a profile sees only the contacts it owns. Retained so existing
|
|
206
|
+
* v3 clients reading is_inherited keep deserializing; it carries no information.
|
|
506
207
|
*/
|
|
507
|
-
|
|
508
|
-
}
|
|
509
|
-
export declare namespace ContactListResponse {
|
|
208
|
+
is_inherited?: boolean;
|
|
510
209
|
/**
|
|
511
|
-
*
|
|
210
|
+
* Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
211
|
+
* is per-contact, not per-channel.
|
|
512
212
|
*/
|
|
513
|
-
|
|
514
|
-
/**
|
|
515
|
-
* The contacts on this page.
|
|
516
|
-
*/
|
|
517
|
-
contacts?: Array<Data.Contact>;
|
|
518
|
-
/**
|
|
519
|
-
* Pagination metadata for list responses
|
|
520
|
-
*/
|
|
521
|
-
pagination?: Data.Pagination;
|
|
522
|
-
}
|
|
523
|
-
namespace Data {
|
|
524
|
-
/**
|
|
525
|
-
* Contact response for v3 API Uses snake_case for JSON property names
|
|
526
|
-
*/
|
|
527
|
-
interface Contact {
|
|
528
|
-
/**
|
|
529
|
-
* Unique identifier for the contact
|
|
530
|
-
*/
|
|
531
|
-
id?: string;
|
|
532
|
-
/**
|
|
533
|
-
* Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
|
|
534
|
-
*/
|
|
535
|
-
available_channels?: string;
|
|
536
|
-
/**
|
|
537
|
-
* Country calling code (e.g., 1 for US/Canada)
|
|
538
|
-
*/
|
|
539
|
-
country_code?: string;
|
|
540
|
-
/**
|
|
541
|
-
* When the contact was created
|
|
542
|
-
*/
|
|
543
|
-
created_at?: string;
|
|
544
|
-
/**
|
|
545
|
-
* Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
546
|
-
* Says whose resource this is, which the resource's own id does not.
|
|
547
|
-
*/
|
|
548
|
-
customer_id?: string;
|
|
549
|
-
/**
|
|
550
|
-
* Default messaging channel to use (e.g., "sms" or "whatsapp")
|
|
551
|
-
*/
|
|
552
|
-
default_channel?: string;
|
|
553
|
-
/**
|
|
554
|
-
* Phone number in E.164 format (e.g., +1234567890)
|
|
555
|
-
*/
|
|
556
|
-
format_e164?: string;
|
|
557
|
-
/**
|
|
558
|
-
* Phone number in international format (e.g., +1 234-567-890)
|
|
559
|
-
*/
|
|
560
|
-
format_international?: string;
|
|
561
|
-
/**
|
|
562
|
-
* Phone number in national format (e.g., (234) 567-890)
|
|
563
|
-
*/
|
|
564
|
-
format_national?: string;
|
|
565
|
-
/**
|
|
566
|
-
* Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
|
|
567
|
-
*/
|
|
568
|
-
format_rfc?: string;
|
|
569
|
-
/**
|
|
570
|
-
* @deprecated Always false. Contacts are no longer shared or inherited between
|
|
571
|
-
* sender profiles — a profile sees only the contacts it owns. Retained so existing
|
|
572
|
-
* v3 clients reading is_inherited keep deserializing; it carries no information.
|
|
573
|
-
*/
|
|
574
|
-
is_inherited?: boolean;
|
|
575
|
-
/**
|
|
576
|
-
* Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
577
|
-
* is per-contact, not per-channel.
|
|
578
|
-
*/
|
|
579
|
-
opt_out?: boolean;
|
|
580
|
-
/**
|
|
581
|
-
* Phone number in original format
|
|
582
|
-
*/
|
|
583
|
-
phone_number?: string;
|
|
584
|
-
/**
|
|
585
|
-
* ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
|
|
586
|
-
*/
|
|
587
|
-
region_code?: string;
|
|
588
|
-
/**
|
|
589
|
-
* When the contact was last updated
|
|
590
|
-
*/
|
|
591
|
-
updated_at?: string | null;
|
|
592
|
-
}
|
|
593
|
-
/**
|
|
594
|
-
* Pagination metadata for list responses
|
|
595
|
-
*/
|
|
596
|
-
interface Pagination {
|
|
597
|
-
/**
|
|
598
|
-
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
599
|
-
*/
|
|
600
|
-
cursors?: Pagination.Cursors | null;
|
|
601
|
-
/**
|
|
602
|
-
* Whether there are more pages after this one
|
|
603
|
-
*/
|
|
604
|
-
has_more?: boolean;
|
|
605
|
-
/**
|
|
606
|
-
* Current page number (1-indexed)
|
|
607
|
-
*/
|
|
608
|
-
page?: number;
|
|
609
|
-
/**
|
|
610
|
-
* Number of items per page
|
|
611
|
-
*/
|
|
612
|
-
page_size?: number;
|
|
613
|
-
/**
|
|
614
|
-
* Total number of items across all pages
|
|
615
|
-
*/
|
|
616
|
-
total_count?: number;
|
|
617
|
-
/**
|
|
618
|
-
* Total number of pages
|
|
619
|
-
*/
|
|
620
|
-
total_pages?: number;
|
|
621
|
-
}
|
|
622
|
-
namespace Pagination {
|
|
623
|
-
/**
|
|
624
|
-
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
625
|
-
*/
|
|
626
|
-
interface Cursors {
|
|
627
|
-
/**
|
|
628
|
-
* Cursor to fetch the next page.
|
|
629
|
-
*/
|
|
630
|
-
after?: string | null;
|
|
631
|
-
/**
|
|
632
|
-
* Cursor to fetch the previous page.
|
|
633
|
-
*/
|
|
634
|
-
before?: string | null;
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
}
|
|
213
|
+
opt_out?: boolean;
|
|
638
214
|
/**
|
|
639
|
-
*
|
|
215
|
+
* Phone number in original format
|
|
640
216
|
*/
|
|
641
|
-
|
|
642
|
-
/**
|
|
643
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
644
|
-
*/
|
|
645
|
-
code?: string;
|
|
646
|
-
/**
|
|
647
|
-
* Additional validation error details (field-level errors)
|
|
648
|
-
*/
|
|
649
|
-
details?: {
|
|
650
|
-
[key: string]: Array<string>;
|
|
651
|
-
} | null;
|
|
652
|
-
/**
|
|
653
|
-
* URL to documentation about this error
|
|
654
|
-
*/
|
|
655
|
-
doc_url?: string | null;
|
|
656
|
-
/**
|
|
657
|
-
* Human-readable error message
|
|
658
|
-
*/
|
|
659
|
-
message?: string;
|
|
660
|
-
}
|
|
217
|
+
phone_number?: string;
|
|
661
218
|
/**
|
|
662
|
-
*
|
|
219
|
+
* ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
|
|
663
220
|
*/
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
/**
|
|
670
|
-
* Server timestamp when the response was generated
|
|
671
|
-
*/
|
|
672
|
-
timestamp?: string;
|
|
673
|
-
/**
|
|
674
|
-
* API version used for this request
|
|
675
|
-
*/
|
|
676
|
-
version?: string;
|
|
677
|
-
}
|
|
221
|
+
region_code?: string;
|
|
222
|
+
/**
|
|
223
|
+
* When the contact was last updated
|
|
224
|
+
*/
|
|
225
|
+
updated_at?: string | null;
|
|
678
226
|
}
|
|
679
227
|
/**
|
|
680
228
|
* Standard API response envelope for all v3 endpoints
|
|
681
229
|
*/
|
|
682
|
-
export interface
|
|
230
|
+
export interface ContactListResponse {
|
|
683
231
|
/**
|
|
684
|
-
*
|
|
232
|
+
* A paginated list of contacts.
|
|
685
233
|
*/
|
|
686
|
-
data?:
|
|
234
|
+
data?: ContactListResponse.Data | null;
|
|
687
235
|
/**
|
|
688
236
|
* Error information
|
|
689
237
|
*/
|
|
690
|
-
error?:
|
|
238
|
+
error?: WebhooksAPI.ErrorDetail | null;
|
|
691
239
|
/**
|
|
692
240
|
* Request and response metadata
|
|
693
241
|
*/
|
|
694
|
-
meta?:
|
|
242
|
+
meta?: WebhooksAPI.APIMeta;
|
|
695
243
|
/**
|
|
696
244
|
* Indicates whether the request was successful
|
|
697
245
|
*/
|
|
698
246
|
success?: boolean;
|
|
699
247
|
}
|
|
700
|
-
export declare namespace
|
|
248
|
+
export declare namespace ContactListResponse {
|
|
701
249
|
/**
|
|
702
|
-
*
|
|
250
|
+
* A paginated list of contacts.
|
|
703
251
|
*/
|
|
704
252
|
interface Data {
|
|
705
|
-
channel_scores?: Array<Data.ChannelScore>;
|
|
706
|
-
channels_used?: Array<string>;
|
|
707
|
-
contact_id?: string;
|
|
708
|
-
first_message_at?: string | null;
|
|
709
|
-
last_message_at?: string | null;
|
|
710
|
-
message_count?: number;
|
|
711
|
-
}
|
|
712
|
-
namespace Data {
|
|
713
|
-
interface ChannelScore {
|
|
714
|
-
channel?: string;
|
|
715
|
-
/**
|
|
716
|
-
* Percentage (0-100) of messages on this channel that ended in FAILED.
|
|
717
|
-
*/
|
|
718
|
-
fail_score?: number;
|
|
719
|
-
/**
|
|
720
|
-
* Percentage (0-100) of messages on this channel that reached a successful
|
|
721
|
-
* terminal state: SENT/DELIVERED/READ for outbound, RECEIVED for inbound.
|
|
722
|
-
*/
|
|
723
|
-
success_score?: number;
|
|
724
|
-
}
|
|
725
|
-
}
|
|
726
|
-
/**
|
|
727
|
-
* Error information
|
|
728
|
-
*/
|
|
729
|
-
interface Error {
|
|
730
|
-
/**
|
|
731
|
-
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
732
|
-
*/
|
|
733
|
-
code?: string;
|
|
734
|
-
/**
|
|
735
|
-
* Additional validation error details (field-level errors)
|
|
736
|
-
*/
|
|
737
|
-
details?: {
|
|
738
|
-
[key: string]: Array<string>;
|
|
739
|
-
} | null;
|
|
740
|
-
/**
|
|
741
|
-
* URL to documentation about this error
|
|
742
|
-
*/
|
|
743
|
-
doc_url?: string | null;
|
|
744
253
|
/**
|
|
745
|
-
*
|
|
746
|
-
*/
|
|
747
|
-
message?: string;
|
|
748
|
-
}
|
|
749
|
-
/**
|
|
750
|
-
* Request and response metadata
|
|
751
|
-
*/
|
|
752
|
-
interface Meta {
|
|
753
|
-
/**
|
|
754
|
-
* Unique identifier for this request (for tracing and support)
|
|
755
|
-
*/
|
|
756
|
-
request_id?: string;
|
|
757
|
-
/**
|
|
758
|
-
* Server timestamp when the response was generated
|
|
254
|
+
* The contacts on this page.
|
|
759
255
|
*/
|
|
760
|
-
|
|
256
|
+
contacts?: Array<ContactsAPI.ContactResponse>;
|
|
761
257
|
/**
|
|
762
|
-
*
|
|
258
|
+
* Pagination metadata for list responses
|
|
763
259
|
*/
|
|
764
|
-
|
|
260
|
+
pagination?: WebhooksAPI.PaginationMeta;
|
|
765
261
|
}
|
|
766
262
|
}
|
|
767
263
|
export interface ContactCreateParams {
|
|
@@ -871,6 +367,6 @@ export interface ContactRetrieveMessageSummaryParams {
|
|
|
871
367
|
'x-profile-id'?: string;
|
|
872
368
|
}
|
|
873
369
|
export declare namespace Contacts {
|
|
874
|
-
export { type
|
|
370
|
+
export { type APIResponseOfContact as APIResponseOfContact, type APIResponseOfContactMessageSummary as APIResponseOfContactMessageSummary, type ContactMessageSummary as ContactMessageSummary, 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, type ContactRetrieveMessageSummaryParams as ContactRetrieveMessageSummaryParams, };
|
|
875
371
|
}
|
|
876
372
|
//# sourceMappingURL=contacts.d.ts.map
|