@sentdm/sentdm 0.41.0 → 0.43.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.
Files changed (120) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/client.d.mts +20 -3
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +20 -3
  5. package/client.d.ts.map +1 -1
  6. package/client.js +15 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +15 -0
  9. package/client.mjs.map +1 -1
  10. package/core/pagination.d.mts +25 -0
  11. package/core/pagination.d.mts.map +1 -1
  12. package/core/pagination.d.ts +25 -0
  13. package/core/pagination.d.ts.map +1 -1
  14. package/core/pagination.js +28 -1
  15. package/core/pagination.js.map +1 -1
  16. package/core/pagination.mjs +26 -0
  17. package/core/pagination.mjs.map +1 -1
  18. package/package.json +1 -1
  19. package/resources/calls/calls.d.mts +388 -0
  20. package/resources/calls/calls.d.mts.map +1 -0
  21. package/resources/calls/calls.d.ts +388 -0
  22. package/resources/calls/calls.d.ts.map +1 -0
  23. package/resources/calls/calls.js +159 -0
  24. package/resources/calls/calls.js.map +1 -0
  25. package/resources/calls/calls.mjs +154 -0
  26. package/resources/calls/calls.mjs.map +1 -0
  27. package/resources/calls/index.d.mts +3 -0
  28. package/resources/calls/index.d.mts.map +1 -0
  29. package/resources/calls/index.d.ts +3 -0
  30. package/resources/calls/index.d.ts.map +1 -0
  31. package/resources/calls/index.js +9 -0
  32. package/resources/calls/index.js.map +1 -0
  33. package/resources/calls/index.mjs +4 -0
  34. package/resources/calls/index.mjs.map +1 -0
  35. package/resources/calls/participants.d.mts +258 -0
  36. package/resources/calls/participants.d.mts.map +1 -0
  37. package/resources/calls/participants.d.ts +258 -0
  38. package/resources/calls/participants.d.ts.map +1 -0
  39. package/resources/calls/participants.js +158 -0
  40. package/resources/calls/participants.js.map +1 -0
  41. package/resources/calls/participants.mjs +154 -0
  42. package/resources/calls/participants.mjs.map +1 -0
  43. package/resources/calls.d.mts +2 -0
  44. package/resources/calls.d.mts.map +1 -0
  45. package/resources/calls.d.ts +2 -0
  46. package/resources/calls.d.ts.map +1 -0
  47. package/resources/calls.js +6 -0
  48. package/resources/calls.js.map +1 -0
  49. package/resources/calls.mjs +3 -0
  50. package/resources/calls.mjs.map +1 -0
  51. package/resources/channels/channels.d.mts +10 -0
  52. package/resources/channels/channels.d.mts.map +1 -0
  53. package/resources/channels/channels.d.ts +10 -0
  54. package/resources/channels/channels.d.ts.map +1 -0
  55. package/resources/channels/channels.js +17 -0
  56. package/resources/channels/channels.js.map +1 -0
  57. package/resources/channels/channels.mjs +12 -0
  58. package/resources/channels/channels.mjs.map +1 -0
  59. package/resources/channels/index.d.mts +3 -0
  60. package/resources/channels/index.d.mts.map +1 -0
  61. package/resources/channels/index.d.ts +3 -0
  62. package/resources/channels/index.d.ts.map +1 -0
  63. package/resources/channels/index.js +9 -0
  64. package/resources/channels/index.js.map +1 -0
  65. package/resources/channels/index.mjs +4 -0
  66. package/resources/channels/index.mjs.map +1 -0
  67. package/resources/channels/voice.d.mts +654 -0
  68. package/resources/channels/voice.d.mts.map +1 -0
  69. package/resources/channels/voice.d.ts +654 -0
  70. package/resources/channels/voice.d.ts.map +1 -0
  71. package/resources/channels/voice.js +285 -0
  72. package/resources/channels/voice.js.map +1 -0
  73. package/resources/channels/voice.mjs +281 -0
  74. package/resources/channels/voice.mjs.map +1 -0
  75. package/resources/channels.d.mts +2 -0
  76. package/resources/channels.d.mts.map +1 -0
  77. package/resources/channels.d.ts +2 -0
  78. package/resources/channels.d.ts.map +1 -0
  79. package/resources/channels.js +6 -0
  80. package/resources/channels.js.map +1 -0
  81. package/resources/channels.mjs +3 -0
  82. package/resources/channels.mjs.map +1 -0
  83. package/resources/index.d.mts +3 -1
  84. package/resources/index.d.mts.map +1 -1
  85. package/resources/index.d.ts +3 -1
  86. package/resources/index.d.ts.map +1 -1
  87. package/resources/index.js +5 -1
  88. package/resources/index.js.map +1 -1
  89. package/resources/index.mjs +2 -0
  90. package/resources/index.mjs.map +1 -1
  91. package/resources/messages.d.mts +13 -8
  92. package/resources/messages.d.mts.map +1 -1
  93. package/resources/messages.d.ts +13 -8
  94. package/resources/messages.d.ts.map +1 -1
  95. package/resources/messages.js +7 -4
  96. package/resources/messages.js.map +1 -1
  97. package/resources/messages.mjs +7 -4
  98. package/resources/messages.mjs.map +1 -1
  99. package/resources/webhooks.d.mts +112 -109
  100. package/resources/webhooks.d.mts.map +1 -1
  101. package/resources/webhooks.d.ts +112 -109
  102. package/resources/webhooks.d.ts.map +1 -1
  103. package/src/client.ts +62 -0
  104. package/src/core/pagination.ts +59 -0
  105. package/src/resources/calls/calls.ts +556 -0
  106. package/src/resources/calls/index.ts +31 -0
  107. package/src/resources/calls/participants.ts +367 -0
  108. package/src/resources/calls.ts +3 -0
  109. package/src/resources/channels/channels.ts +61 -0
  110. package/src/resources/channels/index.ts +27 -0
  111. package/src/resources/channels/voice.ts +864 -0
  112. package/src/resources/channels.ts +3 -0
  113. package/src/resources/index.ts +21 -0
  114. package/src/resources/messages.ts +13 -8
  115. package/src/resources/webhooks.ts +127 -122
  116. package/src/version.ts +1 -1
  117. package/version.d.mts +1 -1
  118. package/version.d.ts +1 -1
  119. package/version.js +1 -1
  120. package/version.mjs +1 -1
@@ -0,0 +1,258 @@
1
+ import { APIResource } from "../../core/resource.js";
2
+ import * as WebhooksAPI from "../webhooks.js";
3
+ import * as CallsAPI from "./calls.js";
4
+ import { APIPromise } from "../../core/api-promise.js";
5
+ import { RequestOptions } from "../../internal/request-options.js";
6
+ /**
7
+ * Phone calls from the numbers you hold, driven by your own callback URL.
8
+ *
9
+ * `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent asks what to do with each call on it, and `POST /v3/channels/voice/tokens` mints a short-lived token that lets a user of your app place and receive calls as that number. When a call arrives or a caller presses a key, a signed question is POSTed to the callback URL and the answer decides the call; `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need before a real call reaches it, and `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret. The call events themselves (`call.completed` and the rest) arrive through your webhooks.
10
+ *
11
+ * Every call is a record under `/v3/calls`: read it, list its recordings once one is ready, hang it up, start or stop recording, and add, mute or remove conference participants while it is live. A leg to a phone number runs for at most what your balance affords at the destination's rate.
12
+ */
13
+ export declare class Participants extends APIResource {
14
+ /**
15
+ * Mutes or unmutes one participant of the conference room a live call is in, named
16
+ * by the participant's own call id from the participants list: send muted true to
17
+ * silence them, muted false to let them be heard again. Muting a participant who
18
+ * is already muted succeeds, as does unmuting one who is not. A participant who is
19
+ * not in this call's room answers 404. A call that has ended answers 409, as does
20
+ * a call that is not in a conference.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * await client.calls.participants.update(
25
+ * 'call_9f2ab000-0000-4000-8000-000000000002',
26
+ * { id: 'call_9f2ab000-0000-4000-8000-000000000001' },
27
+ * );
28
+ * ```
29
+ */
30
+ update(participantID: string, params: ParticipantUpdateParams, options?: RequestOptions): APIPromise<void>;
31
+ /**
32
+ * Lists who is in the conference room one of your live calls is in: each
33
+ * participant's own call id, who they are, whether the room mutes them, and how
34
+ * long they have been connected. The call itself is one of the participants. Use a
35
+ * participant's id to mute or remove them; it is also a call id, so GET
36
+ * /v3/calls/{id} accepts it. A call that has ended answers 409, as does a call
37
+ * that is not in a conference.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * const apiResponseOfListOfCallParticipant =
42
+ * await client.calls.participants.list(
43
+ * 'call_9f2ab000-0000-4000-8000-000000000001',
44
+ * );
45
+ * ```
46
+ */
47
+ list(id: string, params?: ParticipantListParams | null | undefined, options?: RequestOptions): APIPromise<APIResponseOfListOfCallParticipant>;
48
+ /**
49
+ * Dials one of your app users or a phone number into a call that is in a
50
+ * conference room, and answers with the participant's own call record. The
51
+ * participant is a call of their own: it has its own id, can be looked up and hung
52
+ * up, and is billed and reported through call.completed and call.failed like any
53
+ * other call. Every participant needs a positive balance. A phone participant is
54
+ * called from caller_id, which must be one of your numbers, or from the call's
55
+ * owning number when omitted, and needs a destination you may call. Only a call
56
+ * your answer connected to a conference can take participants: a call connected to
57
+ * a user or a number answers 409.
58
+ *
59
+ * @example
60
+ * ```ts
61
+ * const apiResponseOfCall =
62
+ * await client.calls.participants.add(
63
+ * 'call_9f2ab000-0000-4000-8000-000000000001',
64
+ * );
65
+ * ```
66
+ */
67
+ add(id: string, params: ParticipantAddParams, options?: RequestOptions): APIPromise<CallsAPI.APIResponseOfCall>;
68
+ /**
69
+ * Removes one participant from the conference room a live call is in, named by the
70
+ * participant's own call id from the participants list. Their leg ends and is
71
+ * reported through call.completed like any other call; everyone else stays
72
+ * connected. A participant who is not in this call's room answers 404. A call that
73
+ * has ended answers 409, as does a call that is not in a conference.
74
+ *
75
+ * @example
76
+ * ```ts
77
+ * await client.calls.participants.remove(
78
+ * 'call_9f2ab000-0000-4000-8000-000000000002',
79
+ * { id: 'call_9f2ab000-0000-4000-8000-000000000001' },
80
+ * );
81
+ * ```
82
+ */
83
+ remove(participantID: string, params: ParticipantRemoveParams, options?: RequestOptions): APIPromise<void>;
84
+ /**
85
+ * Removes every participant from the conference room a live call is in, the call
86
+ * itself included. Every leg ends and is reported through call.completed like any
87
+ * other call. A room that is already empty answers 204 as well. A call that has
88
+ * ended answers 409, as does a call that is not in a conference.
89
+ *
90
+ * @example
91
+ * ```ts
92
+ * await client.calls.participants.removeAll(
93
+ * 'call_9f2ab000-0000-4000-8000-000000000001',
94
+ * );
95
+ * ```
96
+ */
97
+ removeAll(id: string, params: ParticipantRemoveAllParams, options?: RequestOptions): APIPromise<void>;
98
+ }
99
+ /**
100
+ * Standard API response envelope for all v3 endpoints
101
+ */
102
+ export interface APIResponseOfListOfCallParticipant {
103
+ /**
104
+ * The response data (null if error)
105
+ */
106
+ data?: Array<CallParticipant> | null;
107
+ /**
108
+ * Error information
109
+ */
110
+ error?: WebhooksAPI.ErrorDetail | null;
111
+ /**
112
+ * Request and response metadata
113
+ */
114
+ meta?: WebhooksAPI.APIMeta;
115
+ /**
116
+ * Indicates whether the request was successful
117
+ */
118
+ success?: boolean;
119
+ }
120
+ /**
121
+ * A participant of a conference call
122
+ */
123
+ export interface CallParticipant {
124
+ /**
125
+ * The participant's own call id: what the mute and remove endpoints take, and what
126
+ * GET /v3/calls/{id} accepts
127
+ */
128
+ id?: string;
129
+ /**
130
+ * How long the participant has been connected to the room, in seconds
131
+ */
132
+ duration_seconds?: number;
133
+ /**
134
+ * user for one of your app users, number for a phone number, anonymous for a
135
+ * caller who withheld their number
136
+ */
137
+ kind?: string;
138
+ /**
139
+ * True while the room mutes this participant
140
+ */
141
+ muted?: boolean;
142
+ /**
143
+ * The app user's identity or the phone number in E.164 format. Null when the kind
144
+ * is anonymous
145
+ */
146
+ value?: string | null;
147
+ }
148
+ /**
149
+ * A participant to add to a call
150
+ */
151
+ export interface CallParticipantTarget {
152
+ /**
153
+ * user for one of your app users, number for a phone number
154
+ */
155
+ kind?: string;
156
+ /**
157
+ * The app user's identity, or the phone number in E.164 format
158
+ */
159
+ value?: string;
160
+ }
161
+ export interface ParticipantUpdateParams {
162
+ /**
163
+ * Path param: The call id from the route, as carried by call webhooks and the
164
+ * calls list, for example call_9f2ab000-0000-4000-8000-000000000001
165
+ */
166
+ id: string;
167
+ /**
168
+ * Body param: true to mute the participant, false to unmute them
169
+ */
170
+ muted?: boolean;
171
+ /**
172
+ * Body param: Sandbox flag - when true, the operation is simulated without side
173
+ * effects Useful for testing integrations without actual execution
174
+ */
175
+ sandbox?: boolean;
176
+ /**
177
+ * Header param: Unique key to ensure idempotent request processing. Must be 1-255
178
+ * alphanumeric characters, hyphens, or underscores. Responses are cached for 24
179
+ * hours per key per customer.
180
+ */
181
+ 'Idempotency-Key'?: string;
182
+ /**
183
+ * Header param: Profile UUID to scope the request to a child profile. Only
184
+ * organization API keys can use this header. The profile must belong to the
185
+ * calling organization.
186
+ */
187
+ 'x-profile-id'?: string;
188
+ }
189
+ export interface ParticipantListParams {
190
+ /**
191
+ * Profile UUID to scope the request to a child profile. Only organization API keys
192
+ * can use this header. The profile must belong to the calling organization.
193
+ */
194
+ 'x-profile-id'?: string;
195
+ }
196
+ export interface ParticipantAddParams {
197
+ /**
198
+ * Body param: The number shown to a phone participant as the caller, in E.164
199
+ * format. Must be one of your numbers. The call's owning number when omitted
200
+ */
201
+ caller_id?: string | null;
202
+ /**
203
+ * Body param: Sandbox flag - when true, the operation is simulated without side
204
+ * effects Useful for testing integrations without actual execution
205
+ */
206
+ sandbox?: boolean;
207
+ /**
208
+ * Body param: A participant to add to a call
209
+ */
210
+ to?: CallParticipantTarget;
211
+ /**
212
+ * Header param: Unique key to ensure idempotent request processing. Must be 1-255
213
+ * alphanumeric characters, hyphens, or underscores. Responses are cached for 24
214
+ * hours per key per customer.
215
+ */
216
+ 'Idempotency-Key'?: string;
217
+ /**
218
+ * Header param: Profile UUID to scope the request to a child profile. Only
219
+ * organization API keys can use this header. The profile must belong to the
220
+ * calling organization.
221
+ */
222
+ 'x-profile-id'?: string;
223
+ }
224
+ export interface ParticipantRemoveParams {
225
+ /**
226
+ * Path param: The call id from the route, as carried by call webhooks and the
227
+ * calls list, for example call_9f2ab000-0000-4000-8000-000000000001
228
+ */
229
+ id: string;
230
+ /**
231
+ * Body param: Sandbox flag - when true, the operation is simulated without side
232
+ * effects Useful for testing integrations without actual execution
233
+ */
234
+ sandbox?: boolean;
235
+ /**
236
+ * Header param: Profile UUID to scope the request to a child profile. Only
237
+ * organization API keys can use this header. The profile must belong to the
238
+ * calling organization.
239
+ */
240
+ 'x-profile-id'?: string;
241
+ }
242
+ export interface ParticipantRemoveAllParams {
243
+ /**
244
+ * Body param: Sandbox flag - when true, the operation is simulated without side
245
+ * effects Useful for testing integrations without actual execution
246
+ */
247
+ sandbox?: boolean;
248
+ /**
249
+ * Header param: Profile UUID to scope the request to a child profile. Only
250
+ * organization API keys can use this header. The profile must belong to the
251
+ * calling organization.
252
+ */
253
+ 'x-profile-id'?: string;
254
+ }
255
+ export declare namespace Participants {
256
+ export { type APIResponseOfListOfCallParticipant as APIResponseOfListOfCallParticipant, type CallParticipant as CallParticipant, type CallParticipantTarget as CallParticipantTarget, type ParticipantUpdateParams as ParticipantUpdateParams, type ParticipantListParams as ParticipantListParams, type ParticipantAddParams as ParticipantAddParams, type ParticipantRemoveParams as ParticipantRemoveParams, type ParticipantRemoveAllParams as ParticipantRemoveAllParams, };
257
+ }
258
+ //# sourceMappingURL=participants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"participants.d.ts","sourceRoot":"","sources":["../../src/resources/calls/participants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,WAAW,uBAAoB;AAC3C,OAAO,KAAK,QAAQ,mBAAgB;AACpC,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;;;;;GAMG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAgB1G;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CACF,EAAE,EAAE,MAAM,EACV,MAAM,GAAE,qBAAqB,GAAG,IAAI,GAAG,SAAc,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kCAAkC,CAAC;IAWjD;;;;;;;;;;;;;;;;;;OAkBG;IACH,GAAG,CACD,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,oBAAoB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,QAAQ,CAAC,iBAAiB,CAAC;IAezC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAA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H,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,EAAE,CAAC,EAAE,qBAAqB,CAAC;IAE3B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
@@ -0,0 +1,158 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Participants = void 0;
5
+ const resource_1 = require("../../core/resource.js");
6
+ const headers_1 = require("../../internal/headers.js");
7
+ const path_1 = require("../../internal/utils/path.js");
8
+ /**
9
+ * Phone calls from the numbers you hold, driven by your own callback URL.
10
+ *
11
+ * `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent asks what to do with each call on it, and `POST /v3/channels/voice/tokens` mints a short-lived token that lets a user of your app place and receive calls as that number. When a call arrives or a caller presses a key, a signed question is POSTed to the callback URL and the answer decides the call; `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need before a real call reaches it, and `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret. The call events themselves (`call.completed` and the rest) arrive through your webhooks.
12
+ *
13
+ * Every call is a record under `/v3/calls`: read it, list its recordings once one is ready, hang it up, start or stop recording, and add, mute or remove conference participants while it is live. A leg to a phone number runs for at most what your balance affords at the destination's rate.
14
+ */
15
+ class Participants extends resource_1.APIResource {
16
+ /**
17
+ * Mutes or unmutes one participant of the conference room a live call is in, named
18
+ * by the participant's own call id from the participants list: send muted true to
19
+ * silence them, muted false to let them be heard again. Muting a participant who
20
+ * is already muted succeeds, as does unmuting one who is not. A participant who is
21
+ * not in this call's room answers 404. A call that has ended answers 409, as does
22
+ * a call that is not in a conference.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * await client.calls.participants.update(
27
+ * 'call_9f2ab000-0000-4000-8000-000000000002',
28
+ * { id: 'call_9f2ab000-0000-4000-8000-000000000001' },
29
+ * );
30
+ * ```
31
+ */
32
+ update(participantID, params, options) {
33
+ const { id, 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
34
+ return this._client.patch((0, path_1.path) `/v3/calls/${id}/participants/${participantID}`, {
35
+ body,
36
+ ...options,
37
+ headers: (0, headers_1.buildHeaders)([
38
+ {
39
+ Accept: '*/*',
40
+ ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
41
+ ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined),
42
+ },
43
+ options?.headers,
44
+ ]),
45
+ });
46
+ }
47
+ /**
48
+ * Lists who is in the conference room one of your live calls is in: each
49
+ * participant's own call id, who they are, whether the room mutes them, and how
50
+ * long they have been connected. The call itself is one of the participants. Use a
51
+ * participant's id to mute or remove them; it is also a call id, so GET
52
+ * /v3/calls/{id} accepts it. A call that has ended answers 409, as does a call
53
+ * that is not in a conference.
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * const apiResponseOfListOfCallParticipant =
58
+ * await client.calls.participants.list(
59
+ * 'call_9f2ab000-0000-4000-8000-000000000001',
60
+ * );
61
+ * ```
62
+ */
63
+ list(id, params = {}, options) {
64
+ const { 'x-profile-id': xProfileID } = params ?? {};
65
+ return this._client.get((0, path_1.path) `/v3/calls/${id}/participants`, {
66
+ ...options,
67
+ headers: (0, headers_1.buildHeaders)([
68
+ { ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
69
+ options?.headers,
70
+ ]),
71
+ });
72
+ }
73
+ /**
74
+ * Dials one of your app users or a phone number into a call that is in a
75
+ * conference room, and answers with the participant's own call record. The
76
+ * participant is a call of their own: it has its own id, can be looked up and hung
77
+ * up, and is billed and reported through call.completed and call.failed like any
78
+ * other call. Every participant needs a positive balance. A phone participant is
79
+ * called from caller_id, which must be one of your numbers, or from the call's
80
+ * owning number when omitted, and needs a destination you may call. Only a call
81
+ * your answer connected to a conference can take participants: a call connected to
82
+ * a user or a number answers 409.
83
+ *
84
+ * @example
85
+ * ```ts
86
+ * const apiResponseOfCall =
87
+ * await client.calls.participants.add(
88
+ * 'call_9f2ab000-0000-4000-8000-000000000001',
89
+ * );
90
+ * ```
91
+ */
92
+ add(id, params, options) {
93
+ const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
94
+ return this._client.post((0, path_1.path) `/v3/calls/${id}/participants`, {
95
+ body,
96
+ ...options,
97
+ headers: (0, headers_1.buildHeaders)([
98
+ {
99
+ ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
100
+ ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined),
101
+ },
102
+ options?.headers,
103
+ ]),
104
+ });
105
+ }
106
+ /**
107
+ * Removes one participant from the conference room a live call is in, named by the
108
+ * participant's own call id from the participants list. Their leg ends and is
109
+ * reported through call.completed like any other call; everyone else stays
110
+ * connected. A participant who is not in this call's room answers 404. A call that
111
+ * has ended answers 409, as does a call that is not in a conference.
112
+ *
113
+ * @example
114
+ * ```ts
115
+ * await client.calls.participants.remove(
116
+ * 'call_9f2ab000-0000-4000-8000-000000000002',
117
+ * { id: 'call_9f2ab000-0000-4000-8000-000000000001' },
118
+ * );
119
+ * ```
120
+ */
121
+ remove(participantID, params, options) {
122
+ const { id, 'x-profile-id': xProfileID, ...body } = params;
123
+ return this._client.delete((0, path_1.path) `/v3/calls/${id}/participants/${participantID}`, {
124
+ body,
125
+ ...options,
126
+ headers: (0, headers_1.buildHeaders)([
127
+ { Accept: '*/*', ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
128
+ options?.headers,
129
+ ]),
130
+ });
131
+ }
132
+ /**
133
+ * Removes every participant from the conference room a live call is in, the call
134
+ * itself included. Every leg ends and is reported through call.completed like any
135
+ * other call. A room that is already empty answers 204 as well. A call that has
136
+ * ended answers 409, as does a call that is not in a conference.
137
+ *
138
+ * @example
139
+ * ```ts
140
+ * await client.calls.participants.removeAll(
141
+ * 'call_9f2ab000-0000-4000-8000-000000000001',
142
+ * );
143
+ * ```
144
+ */
145
+ removeAll(id, params, options) {
146
+ const { 'x-profile-id': xProfileID, ...body } = params;
147
+ return this._client.delete((0, path_1.path) `/v3/calls/${id}/participants`, {
148
+ body,
149
+ ...options,
150
+ headers: (0, headers_1.buildHeaders)([
151
+ { Accept: '*/*', ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
152
+ options?.headers,
153
+ ]),
154
+ });
155
+ }
156
+ }
157
+ exports.Participants = Participants;
158
+ //# sourceMappingURL=participants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"participants.js","sourceRoot":"","sources":["../../src/resources/calls/participants.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF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jB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,EAAU,EAAE,MAAkC,EAAE,OAAwB;QAChF,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,aAAa,EAAE,eAAe,EAAE;YAC7D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACvF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AAzJD,oCAyJC"}
@@ -0,0 +1,154 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../core/resource.mjs";
3
+ import { buildHeaders } from "../../internal/headers.mjs";
4
+ import { path } from "../../internal/utils/path.mjs";
5
+ /**
6
+ * Phone calls from the numbers you hold, driven by your own callback URL.
7
+ *
8
+ * `POST /v3/channels/voice` enables a number for calls, with the callback URL Sent asks what to do with each call on it, and `POST /v3/channels/voice/tokens` mints a short-lived token that lets a user of your app place and receive calls as that number. When a call arrives or a caller presses a key, a signed question is POSTed to the callback URL and the answer decides the call; `POST /v3/channels/voice/{number}/test` checks the URL answers the way we need before a real call reaches it, and `POST /v3/channels/voice/{number}/rotate-secret` replaces the signing secret. The call events themselves (`call.completed` and the rest) arrive through your webhooks.
9
+ *
10
+ * Every call is a record under `/v3/calls`: read it, list its recordings once one is ready, hang it up, start or stop recording, and add, mute or remove conference participants while it is live. A leg to a phone number runs for at most what your balance affords at the destination's rate.
11
+ */
12
+ export class Participants extends APIResource {
13
+ /**
14
+ * Mutes or unmutes one participant of the conference room a live call is in, named
15
+ * by the participant's own call id from the participants list: send muted true to
16
+ * silence them, muted false to let them be heard again. Muting a participant who
17
+ * is already muted succeeds, as does unmuting one who is not. A participant who is
18
+ * not in this call's room answers 404. A call that has ended answers 409, as does
19
+ * a call that is not in a conference.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * await client.calls.participants.update(
24
+ * 'call_9f2ab000-0000-4000-8000-000000000002',
25
+ * { id: 'call_9f2ab000-0000-4000-8000-000000000001' },
26
+ * );
27
+ * ```
28
+ */
29
+ update(participantID, params, options) {
30
+ const { id, 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
31
+ return this._client.patch(path `/v3/calls/${id}/participants/${participantID}`, {
32
+ body,
33
+ ...options,
34
+ headers: buildHeaders([
35
+ {
36
+ Accept: '*/*',
37
+ ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
38
+ ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined),
39
+ },
40
+ options?.headers,
41
+ ]),
42
+ });
43
+ }
44
+ /**
45
+ * Lists who is in the conference room one of your live calls is in: each
46
+ * participant's own call id, who they are, whether the room mutes them, and how
47
+ * long they have been connected. The call itself is one of the participants. Use a
48
+ * participant's id to mute or remove them; it is also a call id, so GET
49
+ * /v3/calls/{id} accepts it. A call that has ended answers 409, as does a call
50
+ * that is not in a conference.
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * const apiResponseOfListOfCallParticipant =
55
+ * await client.calls.participants.list(
56
+ * 'call_9f2ab000-0000-4000-8000-000000000001',
57
+ * );
58
+ * ```
59
+ */
60
+ list(id, params = {}, options) {
61
+ const { 'x-profile-id': xProfileID } = params ?? {};
62
+ return this._client.get(path `/v3/calls/${id}/participants`, {
63
+ ...options,
64
+ headers: buildHeaders([
65
+ { ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
66
+ options?.headers,
67
+ ]),
68
+ });
69
+ }
70
+ /**
71
+ * Dials one of your app users or a phone number into a call that is in a
72
+ * conference room, and answers with the participant's own call record. The
73
+ * participant is a call of their own: it has its own id, can be looked up and hung
74
+ * up, and is billed and reported through call.completed and call.failed like any
75
+ * other call. Every participant needs a positive balance. A phone participant is
76
+ * called from caller_id, which must be one of your numbers, or from the call's
77
+ * owning number when omitted, and needs a destination you may call. Only a call
78
+ * your answer connected to a conference can take participants: a call connected to
79
+ * a user or a number answers 409.
80
+ *
81
+ * @example
82
+ * ```ts
83
+ * const apiResponseOfCall =
84
+ * await client.calls.participants.add(
85
+ * 'call_9f2ab000-0000-4000-8000-000000000001',
86
+ * );
87
+ * ```
88
+ */
89
+ add(id, params, options) {
90
+ const { 'Idempotency-Key': idempotencyKey, 'x-profile-id': xProfileID, ...body } = params;
91
+ return this._client.post(path `/v3/calls/${id}/participants`, {
92
+ body,
93
+ ...options,
94
+ headers: buildHeaders([
95
+ {
96
+ ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined),
97
+ ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined),
98
+ },
99
+ options?.headers,
100
+ ]),
101
+ });
102
+ }
103
+ /**
104
+ * Removes one participant from the conference room a live call is in, named by the
105
+ * participant's own call id from the participants list. Their leg ends and is
106
+ * reported through call.completed like any other call; everyone else stays
107
+ * connected. A participant who is not in this call's room answers 404. A call that
108
+ * has ended answers 409, as does a call that is not in a conference.
109
+ *
110
+ * @example
111
+ * ```ts
112
+ * await client.calls.participants.remove(
113
+ * 'call_9f2ab000-0000-4000-8000-000000000002',
114
+ * { id: 'call_9f2ab000-0000-4000-8000-000000000001' },
115
+ * );
116
+ * ```
117
+ */
118
+ remove(participantID, params, options) {
119
+ const { id, 'x-profile-id': xProfileID, ...body } = params;
120
+ return this._client.delete(path `/v3/calls/${id}/participants/${participantID}`, {
121
+ body,
122
+ ...options,
123
+ headers: buildHeaders([
124
+ { Accept: '*/*', ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
125
+ options?.headers,
126
+ ]),
127
+ });
128
+ }
129
+ /**
130
+ * Removes every participant from the conference room a live call is in, the call
131
+ * itself included. Every leg ends and is reported through call.completed like any
132
+ * other call. A room that is already empty answers 204 as well. A call that has
133
+ * ended answers 409, as does a call that is not in a conference.
134
+ *
135
+ * @example
136
+ * ```ts
137
+ * await client.calls.participants.removeAll(
138
+ * 'call_9f2ab000-0000-4000-8000-000000000001',
139
+ * );
140
+ * ```
141
+ */
142
+ removeAll(id, params, options) {
143
+ const { 'x-profile-id': xProfileID, ...body } = params;
144
+ return this._client.delete(path `/v3/calls/${id}/participants`, {
145
+ body,
146
+ ...options,
147
+ headers: buildHeaders([
148
+ { Accept: '*/*', ...(xProfileID != null ? { 'x-profile-id': xProfileID } : undefined) },
149
+ options?.headers,
150
+ ]),
151
+ });
152
+ }
153
+ }
154
+ //# sourceMappingURL=participants.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"participants.mjs","sourceRoot":"","sources":["../../src/resources/calls/participants.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAIlD,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;;;;;GAMG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,aAAqB,EAAE,MAA+B,EAAE,OAAwB;QACrF,MAAM,EAAE,EAAE,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9F,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,aAAa,EAAE,iBAAiB,aAAa,EAAE,EAAE;YAC7E,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,MAAM,EAAE,KAAK;oBACb,GAAG,CAAC,cAAc,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@@ -0,0 +1,2 @@
1
+ export * from "./calls/index.mjs";
2
+ //# sourceMappingURL=calls.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calls.d.mts","sourceRoot":"","sources":["../src/resources/calls.ts"],"names":[],"mappings":"AAEA,kCAA8B"}
@@ -0,0 +1,2 @@
1
+ export * from "./calls/index.js";
2
+ //# sourceMappingURL=calls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calls.d.ts","sourceRoot":"","sources":["../src/resources/calls.ts"],"names":[],"mappings":"AAEA,iCAA8B"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const tslib_1 = require("../internal/tslib.js");
5
+ tslib_1.__exportStar(require("./calls/index.js"), exports);
6
+ //# sourceMappingURL=calls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calls.js","sourceRoot":"","sources":["../src/resources/calls.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,2DAA8B"}
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export * from "./calls/index.mjs";
3
+ //# sourceMappingURL=calls.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calls.mjs","sourceRoot":"","sources":["../src/resources/calls.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,kCAA8B"}
@@ -0,0 +1,10 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import * as VoiceAPI from "./voice.mjs";
3
+ import { APIResponseOfListOfVoiceNumber, APIResponseOfVoiceCallbackTest, APIResponseOfVoiceNumber, APIResponseOfVoiceNumberCreated, APIResponseOfVoiceSecret, APIResponseOfVoiceToken, Voice, VoiceCallbackTest, VoiceCallbackTestErrorInfo, VoiceCallbackTestRequestInfo, VoiceCallbackTestResponseInfo, VoiceCreateParams, VoiceCreateTokenParams, VoiceListParams, VoiceNumber, VoiceNumberCreated, VoiceRetrieveParams, VoiceRotateSecretParams, VoiceSecret, VoiceTestParams, VoiceToken, VoiceUpdateParams } from "./voice.mjs";
4
+ export declare class Channels extends APIResource {
5
+ voice: VoiceAPI.Voice;
6
+ }
7
+ export declare namespace Channels {
8
+ export { Voice as Voice, type APIResponseOfListOfVoiceNumber as APIResponseOfListOfVoiceNumber, type APIResponseOfVoiceCallbackTest as APIResponseOfVoiceCallbackTest, type APIResponseOfVoiceNumber as APIResponseOfVoiceNumber, type APIResponseOfVoiceNumberCreated as APIResponseOfVoiceNumberCreated, type APIResponseOfVoiceSecret as APIResponseOfVoiceSecret, type APIResponseOfVoiceToken as APIResponseOfVoiceToken, type VoiceCallbackTest as VoiceCallbackTest, type VoiceCallbackTestErrorInfo as VoiceCallbackTestErrorInfo, type VoiceCallbackTestRequestInfo as VoiceCallbackTestRequestInfo, type VoiceCallbackTestResponseInfo as VoiceCallbackTestResponseInfo, type VoiceNumber as VoiceNumber, type VoiceNumberCreated as VoiceNumberCreated, type VoiceSecret as VoiceSecret, type VoiceToken as VoiceToken, type VoiceCreateParams as VoiceCreateParams, type VoiceRetrieveParams as VoiceRetrieveParams, type VoiceUpdateParams as VoiceUpdateParams, type VoiceListParams as VoiceListParams, type VoiceCreateTokenParams as VoiceCreateTokenParams, type VoiceRotateSecretParams as VoiceRotateSecretParams, type VoiceTestParams as VoiceTestParams, };
9
+ }
10
+ //# sourceMappingURL=channels.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channels.d.mts","sourceRoot":"","sources":["../../src/resources/channels/channels.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,QAAQ,oBAAgB;AACpC,OAAO,EACL,8BAA8B,EAC9B,8BAA8B,EAC9B,wBAAwB,EACxB,+BAA+B,EAC/B,wBAAwB,EACxB,uBAAuB,EACvB,KAAK,EACL,iBAAiB,EACjB,0BAA0B,EAC1B,4B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