@sentdm/sentdm 0.34.0 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/client.d.mts +53 -22
- package/client.d.mts.map +1 -1
- package/client.d.ts +53 -22
- package/client.d.ts.map +1 -1
- package/client.js +39 -8
- package/client.js.map +1 -1
- package/client.mjs +39 -8
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/contacts.d.mts +606 -89
- package/resources/contacts.d.mts.map +1 -1
- package/resources/contacts.d.ts +606 -89
- package/resources/contacts.d.ts.map +1 -1
- package/resources/contacts.js +21 -15
- package/resources/contacts.js.map +1 -1
- package/resources/contacts.mjs +21 -15
- package/resources/contacts.mjs.map +1 -1
- package/resources/conversations.d.mts +335 -69
- package/resources/conversations.d.mts.map +1 -1
- package/resources/conversations.d.ts +335 -69
- package/resources/conversations.d.ts.map +1 -1
- package/resources/conversations.js +15 -10
- package/resources/conversations.js.map +1 -1
- package/resources/conversations.mjs +15 -10
- package/resources/conversations.mjs.map +1 -1
- package/resources/index.d.mts +7 -7
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +7 -7
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/me.d.mts +165 -41
- package/resources/me.d.mts.map +1 -1
- package/resources/me.d.ts +165 -41
- package/resources/me.d.ts.map +1 -1
- package/resources/me.js +14 -1
- package/resources/me.js.map +1 -1
- package/resources/me.mjs +14 -1
- package/resources/me.mjs.map +1 -1
- package/resources/messages.d.mts +206 -27
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +206 -27
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +5 -1
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +5 -1
- package/resources/messages.mjs.map +1 -1
- package/resources/numbers.d.mts +45 -4
- package/resources/numbers.d.mts.map +1 -1
- package/resources/numbers.d.ts +45 -4
- package/resources/numbers.d.ts.map +1 -1
- package/resources/numbers.js +3 -1
- package/resources/numbers.js.map +1 -1
- package/resources/numbers.mjs +3 -1
- package/resources/numbers.mjs.map +1 -1
- package/resources/profiles/campaigns.d.mts +579 -209
- package/resources/profiles/campaigns.d.mts.map +1 -1
- package/resources/profiles/campaigns.d.ts +579 -209
- package/resources/profiles/campaigns.d.ts.map +1 -1
- package/resources/profiles/campaigns.js +33 -64
- package/resources/profiles/campaigns.js.map +1 -1
- package/resources/profiles/campaigns.mjs +33 -64
- package/resources/profiles/campaigns.mjs.map +1 -1
- package/resources/profiles/index.d.mts +2 -2
- package/resources/profiles/index.d.mts.map +1 -1
- package/resources/profiles/index.d.ts +2 -2
- package/resources/profiles/index.d.ts.map +1 -1
- package/resources/profiles/index.js.map +1 -1
- package/resources/profiles/index.mjs.map +1 -1
- package/resources/profiles/profiles.d.mts +2006 -508
- package/resources/profiles/profiles.d.mts.map +1 -1
- package/resources/profiles/profiles.d.ts +2006 -508
- package/resources/profiles/profiles.d.ts.map +1 -1
- package/resources/profiles/profiles.js +98 -75
- package/resources/profiles/profiles.js.map +1 -1
- package/resources/profiles/profiles.mjs +98 -75
- package/resources/profiles/profiles.mjs.map +1 -1
- package/resources/templates.d.mts +497 -84
- package/resources/templates.d.mts.map +1 -1
- package/resources/templates.d.ts +497 -84
- package/resources/templates.d.ts.map +1 -1
- package/resources/templates.js +6 -4
- package/resources/templates.js.map +1 -1
- package/resources/templates.mjs +6 -4
- package/resources/templates.mjs.map +1 -1
- package/resources/users.d.mts +444 -43
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +444 -43
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +6 -4
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +6 -4
- package/resources/users.mjs.map +1 -1
- package/resources/webhooks.d.mts +791 -190
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +791 -190
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +11 -8
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +11 -8
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +78 -60
- package/src/resources/contacts.ts +696 -92
- package/src/resources/conversations.ts +400 -77
- package/src/resources/index.ts +20 -26
- package/src/resources/me.ts +186 -52
- package/src/resources/messages.ts +230 -27
- package/src/resources/numbers.ts +50 -4
- package/src/resources/profiles/campaigns.ts +706 -232
- package/src/resources/profiles/index.ts +6 -14
- package/src/resources/profiles/profiles.ts +2421 -646
- package/src/resources/templates.ts +583 -99
- package/src/resources/users.ts +514 -44
- package/src/resources/webhooks.ts +964 -241
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/messages.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.js";
|
|
2
|
-
import * as WebhooksAPI from "./webhooks.js";
|
|
3
2
|
import { APIPromise } from "../core/api-promise.js";
|
|
4
3
|
import { RequestOptions } from "../internal/request-options.js";
|
|
5
4
|
/**
|
|
6
|
-
* Send and
|
|
5
|
+
* Send a message and follow what happened to it.
|
|
6
|
+
*
|
|
7
|
+
* One endpoint sends on any channel: pass `channel: "sent"` and we pick between SMS, WhatsApp and RCS per recipient using your routing rules, or name a channel to pin it. A send is accepted asynchronously — `POST /v3/messages` returns an id, and delivery is reported through `GET /v3/messages/{id}`, its activities, or a webhook.
|
|
8
|
+
*
|
|
9
|
+
* **A message needs a sender.** What you can send, where, and at what cost is decided by the markets under **Channels** — so a recipient in a country you hold no sender for is refused here rather than queued.
|
|
7
10
|
*/
|
|
8
11
|
export declare class Messages extends APIResource {
|
|
9
12
|
/**
|
|
@@ -60,11 +63,11 @@ export interface MessageRetrieveActivitiesResponse {
|
|
|
60
63
|
/**
|
|
61
64
|
* Error information
|
|
62
65
|
*/
|
|
63
|
-
error?:
|
|
66
|
+
error?: MessageRetrieveActivitiesResponse.Error | null;
|
|
64
67
|
/**
|
|
65
68
|
* Request and response metadata
|
|
66
69
|
*/
|
|
67
|
-
meta?:
|
|
70
|
+
meta?: MessageRetrieveActivitiesResponse.Meta;
|
|
68
71
|
/**
|
|
69
72
|
* Indicates whether the request was successful
|
|
70
73
|
*/
|
|
@@ -83,6 +86,10 @@ export declare namespace MessageRetrieveActivitiesResponse {
|
|
|
83
86
|
* The message ID these activities belong to
|
|
84
87
|
*/
|
|
85
88
|
message_id?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Pagination metadata for list responses
|
|
91
|
+
*/
|
|
92
|
+
pagination?: Data.Pagination;
|
|
86
93
|
}
|
|
87
94
|
namespace Data {
|
|
88
95
|
/**
|
|
@@ -119,6 +126,90 @@ export declare namespace MessageRetrieveActivitiesResponse {
|
|
|
119
126
|
*/
|
|
120
127
|
timestamp?: string;
|
|
121
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* Pagination metadata for list responses
|
|
131
|
+
*/
|
|
132
|
+
interface Pagination {
|
|
133
|
+
/**
|
|
134
|
+
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
135
|
+
*/
|
|
136
|
+
cursors?: Pagination.Cursors | null;
|
|
137
|
+
/**
|
|
138
|
+
* Whether there are more pages after this one
|
|
139
|
+
*/
|
|
140
|
+
has_more?: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Current page number (1-indexed)
|
|
143
|
+
*/
|
|
144
|
+
page?: number;
|
|
145
|
+
/**
|
|
146
|
+
* Number of items per page
|
|
147
|
+
*/
|
|
148
|
+
page_size?: number;
|
|
149
|
+
/**
|
|
150
|
+
* Total number of items across all pages
|
|
151
|
+
*/
|
|
152
|
+
total_count?: number;
|
|
153
|
+
/**
|
|
154
|
+
* Total number of pages
|
|
155
|
+
*/
|
|
156
|
+
total_pages?: number;
|
|
157
|
+
}
|
|
158
|
+
namespace Pagination {
|
|
159
|
+
/**
|
|
160
|
+
* @deprecated Cursor-based pagination. Never populated — see Cursors.
|
|
161
|
+
*/
|
|
162
|
+
interface Cursors {
|
|
163
|
+
/**
|
|
164
|
+
* Cursor to fetch the next page.
|
|
165
|
+
*/
|
|
166
|
+
after?: string | null;
|
|
167
|
+
/**
|
|
168
|
+
* Cursor to fetch the previous page.
|
|
169
|
+
*/
|
|
170
|
+
before?: string | null;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Error information
|
|
176
|
+
*/
|
|
177
|
+
interface Error {
|
|
178
|
+
/**
|
|
179
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
180
|
+
*/
|
|
181
|
+
code?: string;
|
|
182
|
+
/**
|
|
183
|
+
* Additional validation error details (field-level errors)
|
|
184
|
+
*/
|
|
185
|
+
details?: {
|
|
186
|
+
[key: string]: Array<string>;
|
|
187
|
+
} | null;
|
|
188
|
+
/**
|
|
189
|
+
* URL to documentation about this error
|
|
190
|
+
*/
|
|
191
|
+
doc_url?: string | null;
|
|
192
|
+
/**
|
|
193
|
+
* Human-readable error message
|
|
194
|
+
*/
|
|
195
|
+
message?: string;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Request and response metadata
|
|
199
|
+
*/
|
|
200
|
+
interface Meta {
|
|
201
|
+
/**
|
|
202
|
+
* Unique identifier for this request (for tracing and support)
|
|
203
|
+
*/
|
|
204
|
+
request_id?: string;
|
|
205
|
+
/**
|
|
206
|
+
* Server timestamp when the response was generated
|
|
207
|
+
*/
|
|
208
|
+
timestamp?: string;
|
|
209
|
+
/**
|
|
210
|
+
* API version used for this request
|
|
211
|
+
*/
|
|
212
|
+
version?: string;
|
|
122
213
|
}
|
|
123
214
|
}
|
|
124
215
|
/**
|
|
@@ -132,11 +223,11 @@ export interface MessageRetrieveStatusResponse {
|
|
|
132
223
|
/**
|
|
133
224
|
* Error information
|
|
134
225
|
*/
|
|
135
|
-
error?:
|
|
226
|
+
error?: MessageRetrieveStatusResponse.Error | null;
|
|
136
227
|
/**
|
|
137
228
|
* Request and response metadata
|
|
138
229
|
*/
|
|
139
|
-
meta?:
|
|
230
|
+
meta?: MessageRetrieveStatusResponse.Meta;
|
|
140
231
|
/**
|
|
141
232
|
* Indicates whether the request was successful
|
|
142
233
|
*/
|
|
@@ -197,23 +288,72 @@ export declare namespace MessageRetrieveStatusResponse {
|
|
|
197
288
|
}
|
|
198
289
|
}
|
|
199
290
|
}
|
|
291
|
+
/**
|
|
292
|
+
* Error information
|
|
293
|
+
*/
|
|
294
|
+
interface Error {
|
|
295
|
+
/**
|
|
296
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
297
|
+
*/
|
|
298
|
+
code?: string;
|
|
299
|
+
/**
|
|
300
|
+
* Additional validation error details (field-level errors)
|
|
301
|
+
*/
|
|
302
|
+
details?: {
|
|
303
|
+
[key: string]: Array<string>;
|
|
304
|
+
} | null;
|
|
305
|
+
/**
|
|
306
|
+
* URL to documentation about this error
|
|
307
|
+
*/
|
|
308
|
+
doc_url?: string | null;
|
|
309
|
+
/**
|
|
310
|
+
* Human-readable error message
|
|
311
|
+
*/
|
|
312
|
+
message?: string;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Request and response metadata
|
|
316
|
+
*/
|
|
317
|
+
interface Meta {
|
|
318
|
+
/**
|
|
319
|
+
* Unique identifier for this request (for tracing and support)
|
|
320
|
+
*/
|
|
321
|
+
request_id?: string;
|
|
322
|
+
/**
|
|
323
|
+
* Server timestamp when the response was generated
|
|
324
|
+
*/
|
|
325
|
+
timestamp?: string;
|
|
326
|
+
/**
|
|
327
|
+
* API version used for this request
|
|
328
|
+
*/
|
|
329
|
+
version?: string;
|
|
330
|
+
}
|
|
200
331
|
}
|
|
201
332
|
/**
|
|
202
333
|
* Standard API response envelope for all v3 endpoints
|
|
203
334
|
*/
|
|
204
335
|
export interface MessageSendResponse {
|
|
205
336
|
/**
|
|
206
|
-
*
|
|
337
|
+
* The result of a multi-recipient send.
|
|
338
|
+
*
|
|
339
|
+
* Declared here rather than in the service layer. POST /v3/messages used to
|
|
340
|
+
* publish MessageSendResult — a type in Common.Services.Messaging.Contracts — so
|
|
341
|
+
* the public contract was whatever the send service happened to return, and
|
|
342
|
+
* changing that service for an internal reason changed the API. The service keeps
|
|
343
|
+
* its result; this is what a caller sees, and the mapping between them is a
|
|
344
|
+
* decision the endpoint makes.
|
|
345
|
+
*
|
|
346
|
+
* The wire is unchanged by the move: same names, same values.
|
|
207
347
|
*/
|
|
208
348
|
data?: MessageSendResponse.Data | null;
|
|
209
349
|
/**
|
|
210
350
|
* Error information
|
|
211
351
|
*/
|
|
212
|
-
error?:
|
|
352
|
+
error?: MessageSendResponse.Error | null;
|
|
213
353
|
/**
|
|
214
354
|
* Request and response metadata
|
|
215
355
|
*/
|
|
216
|
-
meta?:
|
|
356
|
+
meta?: MessageSendResponse.Meta;
|
|
217
357
|
/**
|
|
218
358
|
* Indicates whether the request was successful
|
|
219
359
|
*/
|
|
@@ -221,51 +361,90 @@ export interface MessageSendResponse {
|
|
|
221
361
|
}
|
|
222
362
|
export declare namespace MessageSendResponse {
|
|
223
363
|
/**
|
|
224
|
-
*
|
|
364
|
+
* The result of a multi-recipient send.
|
|
365
|
+
*
|
|
366
|
+
* Declared here rather than in the service layer. POST /v3/messages used to
|
|
367
|
+
* publish MessageSendResult — a type in Common.Services.Messaging.Contracts — so
|
|
368
|
+
* the public contract was whatever the send service happened to return, and
|
|
369
|
+
* changing that service for an internal reason changed the API. The service keeps
|
|
370
|
+
* its result; this is what a caller sees, and the mapping between them is a
|
|
371
|
+
* decision the endpoint makes.
|
|
372
|
+
*
|
|
373
|
+
* The wire is unchanged by the move: same names, same values.
|
|
225
374
|
*/
|
|
226
375
|
interface Data {
|
|
227
|
-
/**
|
|
228
|
-
* Per-recipient message results
|
|
229
|
-
*/
|
|
230
376
|
recipients?: Array<Data.Recipient>;
|
|
231
377
|
/**
|
|
232
|
-
* Overall
|
|
378
|
+
* Overall status — QUEUED once the batch is accepted for delivery.
|
|
233
379
|
*/
|
|
234
380
|
status?: string;
|
|
235
|
-
/**
|
|
236
|
-
* Template ID that was used
|
|
237
|
-
*/
|
|
238
381
|
template_id?: string;
|
|
239
|
-
/**
|
|
240
|
-
* Template display name
|
|
241
|
-
*/
|
|
242
382
|
template_name?: string;
|
|
243
383
|
}
|
|
244
384
|
namespace Data {
|
|
245
385
|
/**
|
|
246
|
-
*
|
|
386
|
+
* What one recipient of a send got, as the API reports it.
|
|
247
387
|
*/
|
|
248
388
|
interface Recipient {
|
|
249
389
|
/**
|
|
250
|
-
* Resolved template body
|
|
251
|
-
* auto-
|
|
390
|
+
* Resolved template body for this recipient's channel, or null when the channel is
|
|
391
|
+
* auto-detected.
|
|
252
392
|
*/
|
|
253
393
|
body?: string | null;
|
|
254
394
|
/**
|
|
255
|
-
* Channel this message will be sent on
|
|
256
|
-
* auto-detect
|
|
395
|
+
* Channel this message will be sent on — sms, whatsapp — or null to auto-detect.
|
|
257
396
|
*/
|
|
258
397
|
channel?: string | null;
|
|
259
398
|
/**
|
|
260
|
-
*
|
|
399
|
+
* Identifier for tracking this recipient's message.
|
|
261
400
|
*/
|
|
262
401
|
message_id?: string;
|
|
263
402
|
/**
|
|
264
|
-
* Phone number in E.164 format
|
|
403
|
+
* Phone number in E.164 format.
|
|
265
404
|
*/
|
|
266
405
|
to?: string;
|
|
267
406
|
}
|
|
268
407
|
}
|
|
408
|
+
/**
|
|
409
|
+
* Error information
|
|
410
|
+
*/
|
|
411
|
+
interface Error {
|
|
412
|
+
/**
|
|
413
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
414
|
+
*/
|
|
415
|
+
code?: string;
|
|
416
|
+
/**
|
|
417
|
+
* Additional validation error details (field-level errors)
|
|
418
|
+
*/
|
|
419
|
+
details?: {
|
|
420
|
+
[key: string]: Array<string>;
|
|
421
|
+
} | null;
|
|
422
|
+
/**
|
|
423
|
+
* URL to documentation about this error
|
|
424
|
+
*/
|
|
425
|
+
doc_url?: string | null;
|
|
426
|
+
/**
|
|
427
|
+
* Human-readable error message
|
|
428
|
+
*/
|
|
429
|
+
message?: string;
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* Request and response metadata
|
|
433
|
+
*/
|
|
434
|
+
interface Meta {
|
|
435
|
+
/**
|
|
436
|
+
* Unique identifier for this request (for tracing and support)
|
|
437
|
+
*/
|
|
438
|
+
request_id?: string;
|
|
439
|
+
/**
|
|
440
|
+
* Server timestamp when the response was generated
|
|
441
|
+
*/
|
|
442
|
+
timestamp?: string;
|
|
443
|
+
/**
|
|
444
|
+
* API version used for this request
|
|
445
|
+
*/
|
|
446
|
+
version?: string;
|
|
447
|
+
}
|
|
269
448
|
}
|
|
270
449
|
export interface MessageRetrieveActivitiesParams {
|
|
271
450
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;;;;;GAMG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;OAUG;IACH,kBAAkB,CAChB,EAAE,EAAE,MAAM,EACV,MAAM,GAAE,+BAA+B,GAAG,IAAI,GAAG,SAAc,EAC/D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iCAAiC,CAAC;IAWhD;;;;;;;;;;OAUG;IACH,cAAc,CACZ,EAAE,EAAE,MAAM,EACV,MAAM,GAAE,2BAA2B,GAAG,IAAI,GAAG,SAAc,EAC3D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,6BAA6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,OAAO,CAAC;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAC,QAAQ,GAAG,IAAI,CAAC;IAE7C;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;;OAGG;IACH,EAAE,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEnB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,yBAAiB,iBAAiB,CAAC;IACjC;;;OAGG;IACH,UAAiB,QAAQ;QACvB;;WAEG;QACH,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAEnB;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAErB;;WAEG;QACH,UAAU,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE,GAAG,IAAI,CAAC;KAC/C;CACF;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
package/resources/messages.js
CHANGED
|
@@ -6,7 +6,11 @@ const resource_1 = require("../core/resource.js");
|
|
|
6
6
|
const headers_1 = require("../internal/headers.js");
|
|
7
7
|
const path_1 = require("../internal/utils/path.js");
|
|
8
8
|
/**
|
|
9
|
-
* Send and
|
|
9
|
+
* Send a message and follow what happened to it.
|
|
10
|
+
*
|
|
11
|
+
* One endpoint sends on any channel: pass `channel: "sent"` and we pick between SMS, WhatsApp and RCS per recipient using your routing rules, or name a channel to pin it. A send is accepted asynchronously — `POST /v3/messages` returns an id, and delivery is reported through `GET /v3/messages/{id}`, its activities, or a webhook.
|
|
12
|
+
*
|
|
13
|
+
* **A message needs a sender.** What you can send, where, and at what cost is decided by the markets under **Channels** — so a recipient in a country you hold no sender for is refused here rather than queued.
|
|
10
14
|
*/
|
|
11
15
|
class Messages extends resource_1.APIResource {
|
|
12
16
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAEnD,oDAA8C;AAE9C;;;;;;GAMG;AACH,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;OAUG;IACH,kBAAkB,CAChB,EAAU,EACV,SAA6D,EAAE,EAC/D,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,gBAAgB,EAAE,aAAa,EAAE;YAC3D,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,cAAc,CACZ,EAAU,EACV,SAAyD,EAAE,EAC3D,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,gBAAgB,EAAE,EAAE,EAAE;YAChD,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,IAAI,CAAC,MAAyB,EAAE,OAAwB;QACtD,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC1F,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBAC/E,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACrE;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AApFD,4BAoFC"}
|
package/resources/messages.mjs
CHANGED
|
@@ -3,7 +3,11 @@ import { APIResource } from "../core/resource.mjs";
|
|
|
3
3
|
import { buildHeaders } from "../internal/headers.mjs";
|
|
4
4
|
import { path } from "../internal/utils/path.mjs";
|
|
5
5
|
/**
|
|
6
|
-
* Send and
|
|
6
|
+
* Send a message and follow what happened to it.
|
|
7
|
+
*
|
|
8
|
+
* One endpoint sends on any channel: pass `channel: "sent"` and we pick between SMS, WhatsApp and RCS per recipient using your routing rules, or name a channel to pin it. A send is accepted asynchronously — `POST /v3/messages` returns an id, and delivery is reported through `GET /v3/messages/{id}`, its activities, or a webhook.
|
|
9
|
+
*
|
|
10
|
+
* **A message needs a sender.** What you can send, where, and at what cost is decided by the markets under **Channels** — so a recipient in a country you hold no sender for is refused here rather than queued.
|
|
7
11
|
*/
|
|
8
12
|
export class Messages extends APIResource {
|
|
9
13
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;
|
|
1
|
+
{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C;;;;;;GAMG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;OAUG;IACH,kBAAkB,CAChB,EAAU,EACV,SAA6D,EAAE,EAC/D,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,gBAAgB,EAAE,aAAa,EAAE;YAC3D,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,cAAc,CACZ,EAAU,EACV,SAAyD,EAAE,EAC3D,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,gBAAgB,EAAE,EAAE,EAAE;YAChD,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,IAAI,CAAC,MAAyB,EAAE,OAAwB;QACtD,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC1F,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE;YACvC,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBAC/E,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACrE;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/resources/numbers.d.mts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
|
-
import * as WebhooksAPI from "./webhooks.mjs";
|
|
3
2
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
4
3
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
4
|
/**
|
|
6
|
-
*
|
|
5
|
+
* What a phone number actually is, before you send to it.
|
|
6
|
+
*
|
|
7
|
+
* A lookup returns the number's country, line type and carrier, which is what decides whether it is reachable on a channel and what it costs. Worth doing on import rather than on send: a landline in a contact list is a message that can never be delivered.
|
|
7
8
|
*/
|
|
8
9
|
export declare class Numbers extends APIResource {
|
|
9
10
|
/**
|
|
@@ -31,11 +32,11 @@ export interface NumberLookupResponse {
|
|
|
31
32
|
/**
|
|
32
33
|
* Error information
|
|
33
34
|
*/
|
|
34
|
-
error?:
|
|
35
|
+
error?: NumberLookupResponse.Error | null;
|
|
35
36
|
/**
|
|
36
37
|
* Request and response metadata
|
|
37
38
|
*/
|
|
38
|
-
meta?:
|
|
39
|
+
meta?: NumberLookupResponse.Meta;
|
|
39
40
|
/**
|
|
40
41
|
* Indicates whether the request was successful
|
|
41
42
|
*/
|
|
@@ -56,6 +57,46 @@ export declare namespace NumberLookupResponse {
|
|
|
56
57
|
mobile_network_code?: string | null;
|
|
57
58
|
phone_number?: string;
|
|
58
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Error information
|
|
62
|
+
*/
|
|
63
|
+
interface Error {
|
|
64
|
+
/**
|
|
65
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
66
|
+
*/
|
|
67
|
+
code?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Additional validation error details (field-level errors)
|
|
70
|
+
*/
|
|
71
|
+
details?: {
|
|
72
|
+
[key: string]: Array<string>;
|
|
73
|
+
} | null;
|
|
74
|
+
/**
|
|
75
|
+
* URL to documentation about this error
|
|
76
|
+
*/
|
|
77
|
+
doc_url?: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* Human-readable error message
|
|
80
|
+
*/
|
|
81
|
+
message?: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Request and response metadata
|
|
85
|
+
*/
|
|
86
|
+
interface Meta {
|
|
87
|
+
/**
|
|
88
|
+
* Unique identifier for this request (for tracing and support)
|
|
89
|
+
*/
|
|
90
|
+
request_id?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Server timestamp when the response was generated
|
|
93
|
+
*/
|
|
94
|
+
timestamp?: string;
|
|
95
|
+
/**
|
|
96
|
+
* API version used for this request
|
|
97
|
+
*/
|
|
98
|
+
version?: string;
|
|
99
|
+
}
|
|
59
100
|
}
|
|
60
101
|
export interface NumberLookupParams {
|
|
61
102
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numbers.d.mts","sourceRoot":"","sources":["../src/resources/numbers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,
|
|
1
|
+
{"version":3,"file":"numbers.d.mts","sourceRoot":"","sources":["../src/resources/numbers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D;;;;GAIG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,WAAW,EAAE,MAAM,EACnB,MAAM,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oBAAoB,CAAC;CAUpC;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,IAAI,CAAC,EAAE,oBAAoB,CAAC,IAAI,GAAG,IAAI,CAAC;IAExC;;OAEG;IACH,KAAK,CAAC,EAAE,oBAAoB,CAAC,KAAK,GAAG,IAAI,CAAC;IAE1C;;OAEG;IACH,IAAI,CAAC,EAAE,oBAAoB,CAAC,IAAI,CAAC;IAEjC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,yBAAiB,oBAAoB,CAAC;IACpC;;OAEG;IACH,UAAiB,IAAI;QACnB,YAAY,CAAC,EA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2
|
-
import * as WebhooksAPI from "./webhooks.js";
|
|
3
2
|
import { APIPromise } from "../core/api-promise.js";
|
|
4
3
|
import { RequestOptions } from "../internal/request-options.js";
|
|
5
4
|
/**
|
|
6
|
-
*
|
|
5
|
+
* What a phone number actually is, before you send to it.
|
|
6
|
+
*
|
|
7
|
+
* A lookup returns the number's country, line type and carrier, which is what decides whether it is reachable on a channel and what it costs. Worth doing on import rather than on send: a landline in a contact list is a message that can never be delivered.
|
|
7
8
|
*/
|
|
8
9
|
export declare class Numbers extends APIResource {
|
|
9
10
|
/**
|
|
@@ -31,11 +32,11 @@ export interface NumberLookupResponse {
|
|
|
31
32
|
/**
|
|
32
33
|
* Error information
|
|
33
34
|
*/
|
|
34
|
-
error?:
|
|
35
|
+
error?: NumberLookupResponse.Error | null;
|
|
35
36
|
/**
|
|
36
37
|
* Request and response metadata
|
|
37
38
|
*/
|
|
38
|
-
meta?:
|
|
39
|
+
meta?: NumberLookupResponse.Meta;
|
|
39
40
|
/**
|
|
40
41
|
* Indicates whether the request was successful
|
|
41
42
|
*/
|
|
@@ -56,6 +57,46 @@ export declare namespace NumberLookupResponse {
|
|
|
56
57
|
mobile_network_code?: string | null;
|
|
57
58
|
phone_number?: string;
|
|
58
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Error information
|
|
62
|
+
*/
|
|
63
|
+
interface Error {
|
|
64
|
+
/**
|
|
65
|
+
* Machine-readable error code (e.g., "RESOURCE_001")
|
|
66
|
+
*/
|
|
67
|
+
code?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Additional validation error details (field-level errors)
|
|
70
|
+
*/
|
|
71
|
+
details?: {
|
|
72
|
+
[key: string]: Array<string>;
|
|
73
|
+
} | null;
|
|
74
|
+
/**
|
|
75
|
+
* URL to documentation about this error
|
|
76
|
+
*/
|
|
77
|
+
doc_url?: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* Human-readable error message
|
|
80
|
+
*/
|
|
81
|
+
message?: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Request and response metadata
|
|
85
|
+
*/
|
|
86
|
+
interface Meta {
|
|
87
|
+
/**
|
|
88
|
+
* Unique identifier for this request (for tracing and support)
|
|
89
|
+
*/
|
|
90
|
+
request_id?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Server timestamp when the response was generated
|
|
93
|
+
*/
|
|
94
|
+
timestamp?: string;
|
|
95
|
+
/**
|
|
96
|
+
* API version used for this request
|
|
97
|
+
*/
|
|
98
|
+
version?: string;
|
|
99
|
+
}
|
|
59
100
|
}
|
|
60
101
|
export interface NumberLookupParams {
|
|
61
102
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numbers.d.ts","sourceRoot":"","sources":["../src/resources/numbers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,
|
|
1
|
+
{"version":3,"file":"numbers.d.ts","sourceRoot":"","sources":["../src/resources/numbers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;;;GAIG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,WAAW,EAAE,MAAM,EACnB,MAAM,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oBAAoB,CAAC;CAUpC;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,IAAI,CAAC,EAAE,oBAAoB,CAAC,IAAI,GAAG,IAAI,CAAC;IAExC;;OAEG;IACH,KAAK,CAAC,EAAE,oBAAoB,CAAC,KAAK,GAAG,IAAI,CAAC;IAE1C;;OAEG;IACH,IAAI,CAAC,EAAE,oBAAoB,CAAC,IAAI,CAAC;IAEjC;;OA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AAI,kBAAkB,EAAE,CAAC;CAC7G"}
|
package/resources/numbers.js
CHANGED
|
@@ -6,7 +6,9 @@ const resource_1 = require("../core/resource.js");
|
|
|
6
6
|
const headers_1 = require("../internal/headers.js");
|
|
7
7
|
const path_1 = require("../internal/utils/path.js");
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* What a phone number actually is, before you send to it.
|
|
10
|
+
*
|
|
11
|
+
* A lookup returns the number's country, line type and carrier, which is what decides whether it is reachable on a channel and what it costs. Worth doing on import rather than on send: a landline in a contact list is a message that can never be delivered.
|
|
10
12
|
*/
|
|
11
13
|
class Numbers extends resource_1.APIResource {
|
|
12
14
|
/**
|
package/resources/numbers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numbers.js","sourceRoot":"","sources":["../src/resources/numbers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;
|
|
1
|
+
{"version":3,"file":"numbers.js","sourceRoot":"","sources":["../src/resources/numbers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAEnD,oDAA8C;AAE9C;;;;GAIG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,WAAmB,EACnB,SAAgD,EAAE,EAClD,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,sBAAsB,WAAW,EAAE,EAAE;YAC/D,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AA3BD,0BA2BC"}
|
package/resources/numbers.mjs
CHANGED
|
@@ -3,7 +3,9 @@ import { APIResource } from "../core/resource.mjs";
|
|
|
3
3
|
import { buildHeaders } from "../internal/headers.mjs";
|
|
4
4
|
import { path } from "../internal/utils/path.mjs";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* What a phone number actually is, before you send to it.
|
|
7
|
+
*
|
|
8
|
+
* A lookup returns the number's country, line type and carrier, which is what decides whether it is reachable on a channel and what it costs. Worth doing on import rather than on send: a landline in a contact list is a message that can never be delivered.
|
|
7
9
|
*/
|
|
8
10
|
export class Numbers extends APIResource {
|
|
9
11
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numbers.mjs","sourceRoot":"","sources":["../src/resources/numbers.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;
|
|
1
|
+
{"version":3,"file":"numbers.mjs","sourceRoot":"","sources":["../src/resources/numbers.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C;;;;GAIG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,WAAmB,EACnB,SAAgD,EAAE,EAClD,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,sBAAsB,WAAW,EAAE,EAAE;YAC/D,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACxE,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
|