@sentdm/sentdm 0.33.0 → 0.34.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 +27 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- 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/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/messages.d.mts +6 -4
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +6 -4
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +6 -4
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +6 -4
- package/resources/messages.mjs.map +1 -1
- package/resources/profiles/campaigns.d.mts +1 -1
- package/resources/profiles/campaigns.d.ts +1 -1
- package/resources/profiles/profiles.d.mts +13 -4
- package/resources/profiles/profiles.d.mts.map +1 -1
- package/resources/profiles/profiles.d.ts +13 -4
- package/resources/profiles/profiles.d.ts.map +1 -1
- package/resources/profiles/profiles.js +9 -3
- package/resources/profiles/profiles.js.map +1 -1
- package/resources/profiles/profiles.mjs +9 -3
- package/resources/profiles/profiles.mjs.map +1 -1
- package/resources/users.d.mts +5 -3
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +5 -3
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +5 -3
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +5 -3
- package/resources/users.mjs.map +1 -1
- package/resources/webhooks.d.mts +226 -2
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +226 -2
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +12 -0
- package/src/resources/index.ts +6 -0
- package/src/resources/messages.ts +6 -4
- package/src/resources/profiles/campaigns.ts +1 -1
- package/src/resources/profiles/profiles.ts +13 -4
- package/src/resources/users.ts +5 -3
- package/src/resources/webhooks.ts +269 -1
- 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
|
@@ -366,7 +366,7 @@ export interface CampaignData {
|
|
|
366
366
|
|
|
367
367
|
/**
|
|
368
368
|
* Expected messaging volume for this campaign. Numeric string (e.g. "1999",
|
|
369
|
-
* "5000")
|
|
369
|
+
* "5000"). Values below 2000 bill at the low-volume tier.
|
|
370
370
|
*/
|
|
371
371
|
volume?: string | null;
|
|
372
372
|
}
|
|
@@ -96,7 +96,9 @@ export class Profiles extends APIResource {
|
|
|
96
96
|
* @example
|
|
97
97
|
* ```ts
|
|
98
98
|
* const apiResponseOfProfileDetail =
|
|
99
|
-
* await client.profiles.retrieve(
|
|
99
|
+
* await client.profiles.retrieve(
|
|
100
|
+
* '770e8400-e29b-41d4-a716-446655440002',
|
|
101
|
+
* );
|
|
100
102
|
* ```
|
|
101
103
|
*/
|
|
102
104
|
retrieve(
|
|
@@ -137,7 +139,9 @@ export class Profiles extends APIResource {
|
|
|
137
139
|
* @example
|
|
138
140
|
* ```ts
|
|
139
141
|
* const apiResponseOfProfileDetail =
|
|
140
|
-
* await client.profiles.update(
|
|
142
|
+
* await client.profiles.update(
|
|
143
|
+
* '770e8400-e29b-41d4-a716-446655440002',
|
|
144
|
+
* );
|
|
141
145
|
* ```
|
|
142
146
|
*/
|
|
143
147
|
update(
|
|
@@ -190,7 +194,9 @@ export class Profiles extends APIResource {
|
|
|
190
194
|
*
|
|
191
195
|
* @example
|
|
192
196
|
* ```ts
|
|
193
|
-
* await client.profiles.delete(
|
|
197
|
+
* await client.profiles.delete(
|
|
198
|
+
* '770e8400-e29b-41d4-a716-446655440002',
|
|
199
|
+
* );
|
|
194
200
|
* ```
|
|
195
201
|
*/
|
|
196
202
|
delete(profileID: string, params: ProfileDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
@@ -677,7 +683,10 @@ export namespace ProfileDetail {
|
|
|
677
683
|
created_at?: string;
|
|
678
684
|
|
|
679
685
|
/**
|
|
680
|
-
*
|
|
686
|
+
* @deprecated Deprecated and scheduled for removal. Identifies the Campaign
|
|
687
|
+
* Service Provider that registered the brand, which is Sent, so the value is the
|
|
688
|
+
* same for every brand and every account. Nothing on your side can act on it and
|
|
689
|
+
* there is no replacement. Stop reading it.
|
|
681
690
|
*/
|
|
682
691
|
csp_id?: string | null;
|
|
683
692
|
|
package/src/resources/users.ts
CHANGED
|
@@ -19,7 +19,7 @@ export class Users extends APIResource {
|
|
|
19
19
|
* @example
|
|
20
20
|
* ```ts
|
|
21
21
|
* const apiResponseOfUser = await client.users.retrieve(
|
|
22
|
-
* '
|
|
22
|
+
* '880e8400-e29b-41d4-a716-446655440003',
|
|
23
23
|
* );
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
@@ -93,7 +93,9 @@ export class Users extends APIResource {
|
|
|
93
93
|
*
|
|
94
94
|
* @example
|
|
95
95
|
* ```ts
|
|
96
|
-
* await client.users.remove(
|
|
96
|
+
* await client.users.remove(
|
|
97
|
+
* 'aa0e8400-e29b-41d4-a716-446655440005',
|
|
98
|
+
* );
|
|
97
99
|
* ```
|
|
98
100
|
*/
|
|
99
101
|
remove(userID: string, params: UserRemoveParams, options?: RequestOptions): APIPromise<void> {
|
|
@@ -115,7 +117,7 @@ export class Users extends APIResource {
|
|
|
115
117
|
* @example
|
|
116
118
|
* ```ts
|
|
117
119
|
* const apiResponseOfUser = await client.users.updateRole(
|
|
118
|
-
* '
|
|
120
|
+
* 'aa0e8400-e29b-41d4-a716-446655440005',
|
|
119
121
|
* );
|
|
120
122
|
* ```
|
|
121
123
|
*/
|
|
@@ -337,6 +337,177 @@ export interface ErrorDetail {
|
|
|
337
337
|
message?: string;
|
|
338
338
|
}
|
|
339
339
|
|
|
340
|
+
/**
|
|
341
|
+
* The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares
|
|
342
|
+
* this shape and varies only in Payload.
|
|
343
|
+
*/
|
|
344
|
+
export interface InboundMessageEvent {
|
|
345
|
+
/**
|
|
346
|
+
* The specific event within the family, for example message.delivered or
|
|
347
|
+
* message.received. Absent on events that have no subtype, so treat it as
|
|
348
|
+
* optional.
|
|
349
|
+
*/
|
|
350
|
+
event?: string | null;
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* The event family, for example message or templates. Route on this first, then on
|
|
354
|
+
* event for the specific change.
|
|
355
|
+
*/
|
|
356
|
+
field?: string;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Body of a message.received event. Delivered when a contact messages one of your
|
|
360
|
+
* numbers.
|
|
361
|
+
*/
|
|
362
|
+
payload?: InboundMessageEventPayload | null;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* When Sent emitted the event, in UTC (yyyy-MM-ddTHH:mm:ssZ). This is the emission
|
|
366
|
+
* time, not the time the underlying change happened. Use the timestamp inside the
|
|
367
|
+
* payload for the latter.
|
|
368
|
+
*/
|
|
369
|
+
timestamp?: string;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Body of a message.received event. Delivered when a contact messages one of your
|
|
374
|
+
* numbers.
|
|
375
|
+
*/
|
|
376
|
+
export interface InboundMessageEventPayload {
|
|
377
|
+
/**
|
|
378
|
+
* The account the message belongs to.
|
|
379
|
+
*/
|
|
380
|
+
account_id?: string;
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* The channel the message arrived on, for example sms or whatsapp.
|
|
384
|
+
*/
|
|
385
|
+
channel?: string;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* The contact's number in E.164 format, meaning the number the message came from.
|
|
389
|
+
*/
|
|
390
|
+
inbound_number?: string;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* The inbound message.
|
|
394
|
+
*/
|
|
395
|
+
message_id?: string;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Your number in E.164 format, meaning the number the message was addressed to.
|
|
399
|
+
*/
|
|
400
|
+
outbound_number?: string;
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* When the message was received, in UTC (yyyy-MM-ddTHH:mm:ssZ).
|
|
404
|
+
*/
|
|
405
|
+
received_at?: string;
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* The message body. Sent as null when the inbound message carried no text, for
|
|
409
|
+
* example a media-only message. The field is always present, so read it and check
|
|
410
|
+
* for null rather than checking whether the key exists.
|
|
411
|
+
*/
|
|
412
|
+
text?: string | null;
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* When the message was received, in UTC (yyyy-MM-ddTHH:mm:ssZ). Same value as
|
|
416
|
+
* ReceivedAt, kept for envelope consistency with outbound events.
|
|
417
|
+
*/
|
|
418
|
+
updated_at?: string;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares
|
|
423
|
+
* this shape and varies only in Payload.
|
|
424
|
+
*/
|
|
425
|
+
export interface MessageEvent {
|
|
426
|
+
/**
|
|
427
|
+
* The specific event within the family, for example message.delivered or
|
|
428
|
+
* message.received. Absent on events that have no subtype, so treat it as
|
|
429
|
+
* optional.
|
|
430
|
+
*/
|
|
431
|
+
event?: string | null;
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* The event family, for example message or templates. Route on this first, then on
|
|
435
|
+
* event for the specific change.
|
|
436
|
+
*/
|
|
437
|
+
field?: string;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Body of an outbound message lifecycle event. Delivered once per status change,
|
|
441
|
+
* so a single message produces several of these as it moves toward a terminal
|
|
442
|
+
* status.
|
|
443
|
+
*/
|
|
444
|
+
payload?: MessageEventPayload | null;
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* When Sent emitted the event, in UTC (yyyy-MM-ddTHH:mm:ssZ). This is the emission
|
|
448
|
+
* time, not the time the underlying change happened. Use the timestamp inside the
|
|
449
|
+
* payload for the latter.
|
|
450
|
+
*/
|
|
451
|
+
timestamp?: string;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Body of an outbound message lifecycle event. Delivered once per status change,
|
|
456
|
+
* so a single message produces several of these as it moves toward a terminal
|
|
457
|
+
* status.
|
|
458
|
+
*/
|
|
459
|
+
export interface MessageEventPayload {
|
|
460
|
+
/**
|
|
461
|
+
* The account the message belongs to.
|
|
462
|
+
*/
|
|
463
|
+
account_id?: string;
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* The agent attributed to the send, when the send was attributed to one.
|
|
467
|
+
*/
|
|
468
|
+
agent_id?: string | null;
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* The channel the message went out on, for example sms or whatsapp. A message that
|
|
472
|
+
* falls back to another channel reports the channel actually used.
|
|
473
|
+
*/
|
|
474
|
+
channel?: string;
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* The message this event describes. Stable across every event in the message's
|
|
478
|
+
* lifecycle, so use it to correlate them.
|
|
479
|
+
*/
|
|
480
|
+
message_id?: string;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* The status the message just reached, for example SENT, DELIVERED, or FAILED.
|
|
484
|
+
* Sent means dispatched and delivered means confirmed, so treat them as distinct
|
|
485
|
+
* outcomes.
|
|
486
|
+
*/
|
|
487
|
+
message_status?: string;
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* The recipient's number in E.164 format.
|
|
491
|
+
*/
|
|
492
|
+
outbound_number?: string;
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* The template the message was sent from, when it was sent from one.
|
|
496
|
+
*/
|
|
497
|
+
template_id?: string | null;
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Name of the template the message was sent from. Omitted when the message wasn't
|
|
501
|
+
* template-based.
|
|
502
|
+
*/
|
|
503
|
+
template_name?: string | null;
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* When the message reached MessageStatus, in UTC (yyyy-MM-ddTHH:mm:ssZ).
|
|
507
|
+
*/
|
|
508
|
+
updated_at?: string;
|
|
509
|
+
}
|
|
510
|
+
|
|
340
511
|
export interface MutationRequest {
|
|
341
512
|
/**
|
|
342
513
|
* Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
@@ -397,6 +568,91 @@ export namespace PaginationMeta {
|
|
|
397
568
|
}
|
|
398
569
|
}
|
|
399
570
|
|
|
571
|
+
/**
|
|
572
|
+
* The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares
|
|
573
|
+
* this shape and varies only in Payload.
|
|
574
|
+
*/
|
|
575
|
+
export interface TemplateEvent {
|
|
576
|
+
/**
|
|
577
|
+
* The specific event within the family, for example message.delivered or
|
|
578
|
+
* message.received. Absent on events that have no subtype, so treat it as
|
|
579
|
+
* optional.
|
|
580
|
+
*/
|
|
581
|
+
event?: string | null;
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* The event family, for example message or templates. Route on this first, then on
|
|
585
|
+
* event for the specific change.
|
|
586
|
+
*/
|
|
587
|
+
field?: string;
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* Body of a template status event. Delivered when a template's review outcome
|
|
591
|
+
* changes, so you can react without polling.
|
|
592
|
+
*/
|
|
593
|
+
payload?: TemplateEventPayload | null;
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* When Sent emitted the event, in UTC (yyyy-MM-ddTHH:mm:ssZ). This is the emission
|
|
597
|
+
* time, not the time the underlying change happened. Use the timestamp inside the
|
|
598
|
+
* payload for the latter.
|
|
599
|
+
*/
|
|
600
|
+
timestamp?: string;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* Body of a template status event. Delivered when a template's review outcome
|
|
605
|
+
* changes, so you can react without polling.
|
|
606
|
+
*/
|
|
607
|
+
export interface TemplateEventPayload {
|
|
608
|
+
/**
|
|
609
|
+
* The account the template belongs to.
|
|
610
|
+
*/
|
|
611
|
+
account_id?: string;
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* The template's category, for example UTILITY, MARKETING, or AUTHENTICATION.
|
|
615
|
+
*/
|
|
616
|
+
category?: string;
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* The channel the template applies to.
|
|
620
|
+
*/
|
|
621
|
+
channel?: string;
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* The template's language code, for example en_US.
|
|
625
|
+
*/
|
|
626
|
+
language?: string;
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* Why the template reached Status, when a reason was given. Populated on a
|
|
630
|
+
* rejection.
|
|
631
|
+
*/
|
|
632
|
+
reason?: string | null;
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* The review status the template just reached, for example APPROVED or REJECTED.
|
|
636
|
+
*/
|
|
637
|
+
status?: string;
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* The template in Sent.
|
|
641
|
+
*/
|
|
642
|
+
template_id?: string;
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* The template's display name.
|
|
646
|
+
*/
|
|
647
|
+
template_name?: string;
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* The template's identifier with Meta, assigned when the template is submitted for
|
|
651
|
+
* review.
|
|
652
|
+
*/
|
|
653
|
+
whatsapp_template_id?: string;
|
|
654
|
+
}
|
|
655
|
+
|
|
400
656
|
export interface WebhookEventType {
|
|
401
657
|
description?: string | null;
|
|
402
658
|
|
|
@@ -564,7 +820,13 @@ export namespace WebhookListEventsResponse {
|
|
|
564
820
|
|
|
565
821
|
error_message?: string | null;
|
|
566
822
|
|
|
567
|
-
|
|
823
|
+
/**
|
|
824
|
+
* The exact event body that was delivered, or attempted, for this record. One of
|
|
825
|
+
* the three webhook envelopes: a message status change, an inbound message, or a
|
|
826
|
+
* template status change. Read field and event to tell which, the same way your
|
|
827
|
+
* endpoint does.
|
|
828
|
+
*/
|
|
829
|
+
event_data?: WebhooksAPI.MessageEvent | WebhooksAPI.InboundMessageEvent | WebhooksAPI.TemplateEvent;
|
|
568
830
|
|
|
569
831
|
event_type?: string;
|
|
570
832
|
|
|
@@ -911,8 +1173,14 @@ export declare namespace Webhooks {
|
|
|
911
1173
|
type APIMeta as APIMeta,
|
|
912
1174
|
type APIResponseWebhook as APIResponseWebhook,
|
|
913
1175
|
type ErrorDetail as ErrorDetail,
|
|
1176
|
+
type InboundMessageEvent as InboundMessageEvent,
|
|
1177
|
+
type InboundMessageEventPayload as InboundMessageEventPayload,
|
|
1178
|
+
type MessageEvent as MessageEvent,
|
|
1179
|
+
type MessageEventPayload as MessageEventPayload,
|
|
914
1180
|
type MutationRequest as MutationRequest,
|
|
915
1181
|
type PaginationMeta as PaginationMeta,
|
|
1182
|
+
type TemplateEvent as TemplateEvent,
|
|
1183
|
+
type TemplateEventPayload as TemplateEventPayload,
|
|
916
1184
|
type WebhookEventType as WebhookEventType,
|
|
917
1185
|
type WebhookResponse as WebhookResponse,
|
|
918
1186
|
type WebhookListResponse as WebhookListResponse,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.34.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.34.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.34.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.34.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|