@sentdm/sentdm 0.41.0 → 0.42.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 +7 -0
- package/client.d.mts +18 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +18 -3
- package/client.d.ts.map +1 -1
- package/client.js +13 -0
- package/client.js.map +1 -1
- package/client.mjs +13 -0
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +25 -0
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +25 -0
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.js +28 -1
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +26 -0
- package/core/pagination.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/calls/calls.d.mts +386 -0
- package/resources/calls/calls.d.mts.map +1 -0
- package/resources/calls/calls.d.ts +386 -0
- package/resources/calls/calls.d.ts.map +1 -0
- package/resources/calls/calls.js +158 -0
- package/resources/calls/calls.js.map +1 -0
- package/resources/calls/calls.mjs +153 -0
- package/resources/calls/calls.mjs.map +1 -0
- package/resources/calls/index.d.mts +3 -0
- package/resources/calls/index.d.mts.map +1 -0
- package/resources/calls/index.d.ts +3 -0
- package/resources/calls/index.d.ts.map +1 -0
- package/resources/calls/index.js +9 -0
- package/resources/calls/index.js.map +1 -0
- package/resources/calls/index.mjs +4 -0
- package/resources/calls/index.mjs.map +1 -0
- package/resources/calls/participants.d.mts +258 -0
- package/resources/calls/participants.d.mts.map +1 -0
- package/resources/calls/participants.d.ts +258 -0
- package/resources/calls/participants.d.ts.map +1 -0
- package/resources/calls/participants.js +158 -0
- package/resources/calls/participants.js.map +1 -0
- package/resources/calls/participants.mjs +154 -0
- package/resources/calls/participants.mjs.map +1 -0
- package/resources/calls.d.mts +2 -0
- package/resources/calls.d.mts.map +1 -0
- package/resources/calls.d.ts +2 -0
- package/resources/calls.d.ts.map +1 -0
- package/resources/calls.js +6 -0
- package/resources/calls.js.map +1 -0
- package/resources/calls.mjs +3 -0
- package/resources/calls.mjs.map +1 -0
- package/resources/channels/channels.d.mts +10 -0
- package/resources/channels/channels.d.mts.map +1 -0
- package/resources/channels/channels.d.ts +10 -0
- package/resources/channels/channels.d.ts.map +1 -0
- package/resources/channels/channels.js +17 -0
- package/resources/channels/channels.js.map +1 -0
- package/resources/channels/channels.mjs +12 -0
- package/resources/channels/channels.mjs.map +1 -0
- package/resources/channels/index.d.mts +3 -0
- package/resources/channels/index.d.mts.map +1 -0
- package/resources/channels/index.d.ts +3 -0
- package/resources/channels/index.d.ts.map +1 -0
- package/resources/channels/index.js +9 -0
- package/resources/channels/index.js.map +1 -0
- package/resources/channels/index.mjs +4 -0
- package/resources/channels/index.mjs.map +1 -0
- package/resources/channels/voice.d.mts +654 -0
- package/resources/channels/voice.d.mts.map +1 -0
- package/resources/channels/voice.d.ts +654 -0
- package/resources/channels/voice.d.ts.map +1 -0
- package/resources/channels/voice.js +285 -0
- package/resources/channels/voice.js.map +1 -0
- package/resources/channels/voice.mjs +281 -0
- package/resources/channels/voice.mjs.map +1 -0
- package/resources/channels.d.mts +2 -0
- package/resources/channels.d.mts.map +1 -0
- package/resources/channels.d.ts +2 -0
- package/resources/channels.d.ts.map +1 -0
- package/resources/channels.js +6 -0
- package/resources/channels.js.map +1 -0
- package/resources/channels.mjs +3 -0
- package/resources/channels.mjs.map +1 -0
- package/resources/index.d.mts +3 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/webhooks.d.mts +104 -106
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +104 -106
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +60 -0
- package/src/core/pagination.ts +59 -0
- package/src/resources/calls/calls.ts +554 -0
- package/src/resources/calls/index.ts +31 -0
- package/src/resources/calls/participants.ts +367 -0
- package/src/resources/calls.ts +3 -0
- package/src/resources/channels/channels.ts +61 -0
- package/src/resources/channels/index.ts +27 -0
- package/src/resources/channels/voice.ts +864 -0
- package/src/resources/channels.ts +3 -0
- package/src/resources/index.ts +21 -0
- package/src/resources/webhooks.ts +119 -119
- 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/src/resources/index.ts
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
export {
|
|
4
|
+
Calls,
|
|
5
|
+
type APIResponseOfCall,
|
|
6
|
+
type APIResponseOfCallRecordings,
|
|
7
|
+
type APIResponseOfCallsList,
|
|
8
|
+
type Call,
|
|
9
|
+
type CallParty,
|
|
10
|
+
type CallRecording,
|
|
11
|
+
type CallRecordings,
|
|
12
|
+
type CallTimelineEntry,
|
|
13
|
+
type CallsList,
|
|
14
|
+
type CallRetrieveParams,
|
|
15
|
+
type CallListParams,
|
|
16
|
+
type CallHangupParams,
|
|
17
|
+
type CallListRecordingsParams,
|
|
18
|
+
type CallRecordParams,
|
|
19
|
+
type CallsCallsPage,
|
|
20
|
+
} from './calls/calls';
|
|
21
|
+
export { Channels } from './channels/channels';
|
|
3
22
|
export {
|
|
4
23
|
Contacts,
|
|
5
24
|
type APIResponseOfContact,
|
|
@@ -90,6 +109,8 @@ export {
|
|
|
90
109
|
Webhooks,
|
|
91
110
|
type APIMeta,
|
|
92
111
|
type APIResponseWebhook,
|
|
112
|
+
type CallEvent,
|
|
113
|
+
type CallEventPayload,
|
|
93
114
|
type ChannelEvent,
|
|
94
115
|
type ChannelEventPayload,
|
|
95
116
|
type ContactEvent,
|
|
@@ -338,6 +338,122 @@ export interface APIResponseWebhook {
|
|
|
338
338
|
success?: boolean;
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
+
/**
|
|
342
|
+
* The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares
|
|
343
|
+
* this shape and varies only in Payload.
|
|
344
|
+
*/
|
|
345
|
+
export interface CallEvent {
|
|
346
|
+
/**
|
|
347
|
+
* The specific event within the family, for example message.delivered,
|
|
348
|
+
* message.received or contact.opt_out. Absent on events that have no subtype, so
|
|
349
|
+
* treat it as optional.
|
|
350
|
+
*/
|
|
351
|
+
event?: string | null;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* The event family, for example message, templates or contact. Route on this
|
|
355
|
+
* first, then on event for the specific change.
|
|
356
|
+
*/
|
|
357
|
+
field?: string;
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Body of a call.initiated, call.answered, call.completed, call.failed or
|
|
361
|
+
* call.recording_ready event. Which of them occurred is the envelope's event.
|
|
362
|
+
*
|
|
363
|
+
* Shaped like the message, inbound, template and channel payloads: account_id
|
|
364
|
+
* names the account the event is about, channel names the channel, and updated_at
|
|
365
|
+
* is when the change happened on the call, in the same yyyy-MM-ddTHH:mm:ssZ form.
|
|
366
|
+
* duration_seconds and price are added on call.completed, reason on call.failed
|
|
367
|
+
* and recording_id on call.recording_ready; each is omitted rather than sent as
|
|
368
|
+
* null when it does not apply.
|
|
369
|
+
*
|
|
370
|
+
* Casing is snake_case because these ride the same webhook stream customers
|
|
371
|
+
* already parse message_id from; the question/answer contract is a separate
|
|
372
|
+
* surface and stays camelCase. Nothing here is provider-shaped: no provider call
|
|
373
|
+
* id, no namespaced identity.
|
|
374
|
+
*/
|
|
375
|
+
payload?: CallEventPayload | null;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* The event-specific body.
|
|
379
|
+
*/
|
|
380
|
+
request_id?: string | null;
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* When Sent emitted the event, in UTC (yyyy-MM-ddTHH:mm:ssZ). This is the emission
|
|
384
|
+
* time, not the time the underlying change happened. Use the timestamp inside the
|
|
385
|
+
* payload for the latter.
|
|
386
|
+
*/
|
|
387
|
+
timestamp?: string;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Body of a call.initiated, call.answered, call.completed, call.failed or
|
|
392
|
+
* call.recording_ready event. Which of them occurred is the envelope's event.
|
|
393
|
+
*
|
|
394
|
+
* Shaped like the message, inbound, template and channel payloads: account_id
|
|
395
|
+
* names the account the event is about, channel names the channel, and updated_at
|
|
396
|
+
* is when the change happened on the call, in the same yyyy-MM-ddTHH:mm:ssZ form.
|
|
397
|
+
* duration_seconds and price are added on call.completed, reason on call.failed
|
|
398
|
+
* and recording_id on call.recording_ready; each is omitted rather than sent as
|
|
399
|
+
* null when it does not apply.
|
|
400
|
+
*
|
|
401
|
+
* Casing is snake_case because these ride the same webhook stream customers
|
|
402
|
+
* already parse message_id from; the question/answer contract is a separate
|
|
403
|
+
* surface and stays camelCase. Nothing here is provider-shaped: no provider call
|
|
404
|
+
* id, no namespaced identity.
|
|
405
|
+
*/
|
|
406
|
+
export interface CallEventPayload {
|
|
407
|
+
/**
|
|
408
|
+
* Sent's call id, the same one the customer saw on the first question.
|
|
409
|
+
*/
|
|
410
|
+
call_id: string;
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* The account the call belongs to: the key's own customer, or the sender profile
|
|
414
|
+
* it acted as.
|
|
415
|
+
*/
|
|
416
|
+
account_id?: string;
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Always voice.
|
|
420
|
+
*/
|
|
421
|
+
channel?: string;
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* How long the call lasted. Only on call.completed.
|
|
425
|
+
*/
|
|
426
|
+
duration_seconds?: number | null;
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* The customer number that owns the call, in E.164 format.
|
|
430
|
+
*/
|
|
431
|
+
number?: string;
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* What the call was charged. Only on call.completed, and omitted there until
|
|
435
|
+
* billing has recorded the charge.
|
|
436
|
+
*/
|
|
437
|
+
price?: number | null;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* The machine-readable reason the call did not complete. Only on call.failed, and
|
|
441
|
+
* omitted when no reason was recorded.
|
|
442
|
+
*/
|
|
443
|
+
reason?: string | null;
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* The recording that became available, the same id GET /v3/calls/{id}/recordings
|
|
447
|
+
* lists it under. Only on call.recording_ready, which is sent once per recording.
|
|
448
|
+
*/
|
|
449
|
+
recording_id?: string | null;
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* When the change happened on the call, as opposed to when the event was emitted.
|
|
453
|
+
*/
|
|
454
|
+
updated_at?: string;
|
|
455
|
+
}
|
|
456
|
+
|
|
341
457
|
/**
|
|
342
458
|
* The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares
|
|
343
459
|
* this shape and varies only in Payload.
|
|
@@ -1387,7 +1503,7 @@ export interface WebhookListEventsResponse {
|
|
|
1387
1503
|
| ChannelEvent
|
|
1388
1504
|
| ContactEvent
|
|
1389
1505
|
| WebhookListEventsResponse.SentDmServicesCommonServicesWebhooksContractsWebhookEventOfLinkWebhookPayload
|
|
1390
|
-
|
|
|
1506
|
+
| CallEvent;
|
|
1391
1507
|
|
|
1392
1508
|
event_type?: string;
|
|
1393
1509
|
|
|
@@ -1610,124 +1726,6 @@ export namespace WebhookListEventsResponse {
|
|
|
1610
1726
|
traffic_class?: string | null;
|
|
1611
1727
|
}
|
|
1612
1728
|
}
|
|
1613
|
-
|
|
1614
|
-
/**
|
|
1615
|
-
* The envelope Sent POSTs to a subscribed webhook endpoint. Every event shares
|
|
1616
|
-
* this shape and varies only in Payload.
|
|
1617
|
-
*/
|
|
1618
|
-
export interface SentDmServicesCommonServicesWebhooksContractsWebhookEventOfCallWebhookPayload {
|
|
1619
|
-
/**
|
|
1620
|
-
* The specific event within the family, for example message.delivered,
|
|
1621
|
-
* message.received or contact.opt_out. Absent on events that have no subtype, so
|
|
1622
|
-
* treat it as optional.
|
|
1623
|
-
*/
|
|
1624
|
-
event?: string | null;
|
|
1625
|
-
|
|
1626
|
-
/**
|
|
1627
|
-
* The event family, for example message, templates or contact. Route on this
|
|
1628
|
-
* first, then on event for the specific change.
|
|
1629
|
-
*/
|
|
1630
|
-
field?: string;
|
|
1631
|
-
|
|
1632
|
-
/**
|
|
1633
|
-
* Body of a call.initiated, call.answered, call.completed, call.failed or
|
|
1634
|
-
* call.recording_ready event. Which of them occurred is the envelope's event.
|
|
1635
|
-
*
|
|
1636
|
-
* Shaped like the message, inbound, template and channel payloads: account_id
|
|
1637
|
-
* names the account the event is about, channel names the channel, and updated_at
|
|
1638
|
-
* is when the change happened on the call, in the same yyyy-MM-ddTHH:mm:ssZ form.
|
|
1639
|
-
* duration_seconds and price are added on call.completed, reason on call.failed
|
|
1640
|
-
* and recording_id on call.recording_ready; each is omitted rather than sent as
|
|
1641
|
-
* null when it does not apply.
|
|
1642
|
-
*
|
|
1643
|
-
* Casing is snake_case because these ride the same webhook stream customers
|
|
1644
|
-
* already parse message_id from; the question/answer contract is a separate
|
|
1645
|
-
* surface and stays camelCase. Nothing here is provider-shaped: no provider call
|
|
1646
|
-
* id, no namespaced identity.
|
|
1647
|
-
*/
|
|
1648
|
-
payload?: SentDmServicesCommonServicesWebhooksContractsWebhookEventOfCallWebhookPayload.Payload | null;
|
|
1649
|
-
|
|
1650
|
-
/**
|
|
1651
|
-
* The event-specific body.
|
|
1652
|
-
*/
|
|
1653
|
-
request_id?: string | null;
|
|
1654
|
-
|
|
1655
|
-
/**
|
|
1656
|
-
* When Sent emitted the event, in UTC (yyyy-MM-ddTHH:mm:ssZ). This is the emission
|
|
1657
|
-
* time, not the time the underlying change happened. Use the timestamp inside the
|
|
1658
|
-
* payload for the latter.
|
|
1659
|
-
*/
|
|
1660
|
-
timestamp?: string;
|
|
1661
|
-
}
|
|
1662
|
-
|
|
1663
|
-
export namespace SentDmServicesCommonServicesWebhooksContractsWebhookEventOfCallWebhookPayload {
|
|
1664
|
-
/**
|
|
1665
|
-
* Body of a call.initiated, call.answered, call.completed, call.failed or
|
|
1666
|
-
* call.recording_ready event. Which of them occurred is the envelope's event.
|
|
1667
|
-
*
|
|
1668
|
-
* Shaped like the message, inbound, template and channel payloads: account_id
|
|
1669
|
-
* names the account the event is about, channel names the channel, and updated_at
|
|
1670
|
-
* is when the change happened on the call, in the same yyyy-MM-ddTHH:mm:ssZ form.
|
|
1671
|
-
* duration_seconds and price are added on call.completed, reason on call.failed
|
|
1672
|
-
* and recording_id on call.recording_ready; each is omitted rather than sent as
|
|
1673
|
-
* null when it does not apply.
|
|
1674
|
-
*
|
|
1675
|
-
* Casing is snake_case because these ride the same webhook stream customers
|
|
1676
|
-
* already parse message_id from; the question/answer contract is a separate
|
|
1677
|
-
* surface and stays camelCase. Nothing here is provider-shaped: no provider call
|
|
1678
|
-
* id, no namespaced identity.
|
|
1679
|
-
*/
|
|
1680
|
-
export interface Payload {
|
|
1681
|
-
/**
|
|
1682
|
-
* Sent's call id, the same one the customer saw on the first question.
|
|
1683
|
-
*/
|
|
1684
|
-
call_id: string;
|
|
1685
|
-
|
|
1686
|
-
/**
|
|
1687
|
-
* The account the call belongs to: the key's own customer, or the sender profile
|
|
1688
|
-
* it acted as.
|
|
1689
|
-
*/
|
|
1690
|
-
account_id?: string;
|
|
1691
|
-
|
|
1692
|
-
/**
|
|
1693
|
-
* Always voice.
|
|
1694
|
-
*/
|
|
1695
|
-
channel?: string;
|
|
1696
|
-
|
|
1697
|
-
/**
|
|
1698
|
-
* How long the call lasted. Only on call.completed.
|
|
1699
|
-
*/
|
|
1700
|
-
duration_seconds?: number | null;
|
|
1701
|
-
|
|
1702
|
-
/**
|
|
1703
|
-
* The customer number that owns the call, in E.164 format.
|
|
1704
|
-
*/
|
|
1705
|
-
number?: string;
|
|
1706
|
-
|
|
1707
|
-
/**
|
|
1708
|
-
* What the call was charged. Only on call.completed, and omitted there until
|
|
1709
|
-
* billing has recorded the charge.
|
|
1710
|
-
*/
|
|
1711
|
-
price?: number | null;
|
|
1712
|
-
|
|
1713
|
-
/**
|
|
1714
|
-
* The machine-readable reason the call did not complete. Only on call.failed, and
|
|
1715
|
-
* omitted when no reason was recorded.
|
|
1716
|
-
*/
|
|
1717
|
-
reason?: string | null;
|
|
1718
|
-
|
|
1719
|
-
/**
|
|
1720
|
-
* The recording that became available, the same id GET /v3/calls/{id}/recordings
|
|
1721
|
-
* lists it under. Only on call.recording_ready, which is sent once per recording.
|
|
1722
|
-
*/
|
|
1723
|
-
recording_id?: string | null;
|
|
1724
|
-
|
|
1725
|
-
/**
|
|
1726
|
-
* When the change happened on the call, as opposed to when the event was emitted.
|
|
1727
|
-
*/
|
|
1728
|
-
updated_at?: string;
|
|
1729
|
-
}
|
|
1730
|
-
}
|
|
1731
1729
|
}
|
|
1732
1730
|
|
|
1733
1731
|
/**
|
|
@@ -2079,6 +2077,8 @@ export declare namespace Webhooks {
|
|
|
2079
2077
|
export {
|
|
2080
2078
|
type APIMeta as APIMeta,
|
|
2081
2079
|
type APIResponseWebhook as APIResponseWebhook,
|
|
2080
|
+
type CallEvent as CallEvent,
|
|
2081
|
+
type CallEventPayload as CallEventPayload,
|
|
2082
2082
|
type ChannelEvent as ChannelEvent,
|
|
2083
2083
|
type ChannelEventPayload as ChannelEventPayload,
|
|
2084
2084
|
type ContactEvent as ContactEvent,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.42.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.42.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.42.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.42.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|