twilio 4.8.0 → 4.9.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 (111) hide show
  1. package/lib/base/BaseTwilio.d.ts +1 -0
  2. package/lib/jwt/AccessToken.d.ts +168 -173
  3. package/lib/jwt/AccessToken.js +180 -185
  4. package/lib/rest/api/v2010/account/address/dependentPhoneNumber.d.ts +15 -20
  5. package/lib/rest/api/v2010/account/application.d.ts +15 -20
  6. package/lib/rest/api/v2010/account/call/feedback.d.ts +5 -5
  7. package/lib/rest/api/v2010/account/call/feedbackSummary.d.ts +4 -4
  8. package/lib/rest/api/v2010/account/call/notification.d.ts +3 -4
  9. package/lib/rest/api/v2010/account/call/payment.d.ts +10 -10
  10. package/lib/rest/api/v2010/account/call/recording.d.ts +9 -9
  11. package/lib/rest/api/v2010/account/conference/recording.d.ts +9 -9
  12. package/lib/rest/api/v2010/account/connectApp.d.ts +3 -4
  13. package/lib/rest/api/v2010/account/incomingPhoneNumber/local.d.ts +33 -38
  14. package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.d.ts +33 -38
  15. package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.d.ts +33 -38
  16. package/lib/rest/api/v2010/account/incomingPhoneNumber.d.ts +15 -20
  17. package/lib/rest/api/v2010/account/message/feedback.d.ts +5 -5
  18. package/lib/rest/api/v2010/account/notification.d.ts +3 -4
  19. package/lib/rest/api/v2010/account/queue.d.ts +3 -3
  20. package/lib/rest/api/v2010/account/recording/addOnResult.d.ts +4 -4
  21. package/lib/rest/api/v2010/account/recording/transcription.d.ts +4 -4
  22. package/lib/rest/api/v2010/account/shortCode.d.ts +6 -8
  23. package/lib/rest/api/v2010/account/sip/domain.d.ts +9 -12
  24. package/lib/rest/api/v2010/account/usage/record/allTime.d.ts +7 -7
  25. package/lib/rest/api/v2010/account/usage/record/daily.d.ts +7 -7
  26. package/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +7 -7
  27. package/lib/rest/api/v2010/account/usage/record/monthly.d.ts +7 -7
  28. package/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +7 -7
  29. package/lib/rest/api/v2010/account/usage/record/today.d.ts +7 -7
  30. package/lib/rest/api/v2010/account/usage/record/yearly.d.ts +7 -7
  31. package/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +7 -7
  32. package/lib/rest/api/v2010/account/usage/record.d.ts +7 -7
  33. package/lib/rest/api/v2010/account/usage/trigger.d.ts +27 -28
  34. package/lib/rest/api/v2010/account/usage.d.ts +1 -1
  35. package/lib/rest/chat/v2/service/channel/webhook.d.ts +5 -5
  36. package/lib/rest/content/V1.d.ts +5 -0
  37. package/lib/rest/content/V1.js +7 -0
  38. package/lib/rest/content/v1/contentAndApprovals.d.ts +190 -0
  39. package/lib/rest/content/v1/contentAndApprovals.js +134 -0
  40. package/lib/rest/conversations/v1/addressConfiguration.d.ts +8 -8
  41. package/lib/rest/conversations/v1/configuration/webhook.d.ts +9 -9
  42. package/lib/rest/conversations/v1/conversation/message/deliveryReceipt.d.ts +4 -4
  43. package/lib/rest/conversations/v1/conversation/message.d.ts +8 -8
  44. package/lib/rest/conversations/v1/conversation/participant.d.ts +4 -4
  45. package/lib/rest/conversations/v1/conversation/webhook.d.ts +5 -5
  46. package/lib/rest/conversations/v1/service/binding.d.ts +7 -7
  47. package/lib/rest/conversations/v1/service/configuration/webhook.d.ts +4 -4
  48. package/lib/rest/conversations/v1/service/conversation/message/deliveryReceipt.d.ts +4 -4
  49. package/lib/rest/conversations/v1/service/conversation/message.d.ts +8 -8
  50. package/lib/rest/conversations/v1/service/conversation/participant.d.ts +4 -4
  51. package/lib/rest/conversations/v1/service/conversation/webhook.d.ts +5 -5
  52. package/lib/rest/conversations/v1/service/conversation.d.ts +10 -10
  53. package/lib/rest/conversations/v1/service/participantConversation.d.ts +4 -4
  54. package/lib/rest/conversations/v1/service/role.d.ts +5 -5
  55. package/lib/rest/conversations/v1/service/user/userConversation.d.ts +9 -9
  56. package/lib/rest/conversations/v1/service/user.d.ts +4 -4
  57. package/lib/rest/flexApi/V1.d.ts +5 -0
  58. package/lib/rest/flexApi/V1.js +7 -0
  59. package/lib/rest/flexApi/v1/assessments.d.ts +117 -0
  60. package/lib/rest/flexApi/v1/assessments.js +70 -1
  61. package/lib/rest/flexApi/v1/insightsConversations.d.ts +172 -0
  62. package/lib/rest/flexApi/v1/insightsConversations.js +128 -0
  63. package/lib/rest/flexApi/v1/insightsQuestionnairesQuestion.d.ts +2 -2
  64. package/lib/rest/flexApi/v1/insightsQuestionnairesQuestion.js +2 -4
  65. package/lib/rest/insights/v1/call/callSummary.d.ts +17 -17
  66. package/lib/rest/insights/v1/room/participant.d.ts +16 -16
  67. package/lib/rest/insights/v1/room.d.ts +41 -42
  68. package/lib/rest/ipMessaging/v2/service/channel/webhook.d.ts +5 -5
  69. package/lib/rest/media/v1/mediaProcessor.d.ts +3 -4
  70. package/lib/rest/media/v1/mediaRecording.d.ts +3 -4
  71. package/lib/rest/media/v1/playerStreamer.d.ts +3 -4
  72. package/lib/rest/messaging/V1.d.ts +10 -0
  73. package/lib/rest/messaging/V1.js +16 -0
  74. package/lib/rest/messaging/v1/brandRegistration.d.ts +12 -12
  75. package/lib/rest/messaging/v1/domainCerts.d.ts +4 -4
  76. package/lib/rest/messaging/v1/domainCerts.js +2 -2
  77. package/lib/rest/messaging/v1/domainConfigMessagingService.d.ts +121 -0
  78. package/lib/rest/messaging/v1/domainConfigMessagingService.js +122 -0
  79. package/lib/rest/messaging/v1/linkshorteningMessagingService.d.ts +109 -0
  80. package/lib/rest/messaging/v1/linkshorteningMessagingService.js +135 -0
  81. package/lib/rest/messaging/v1/service.d.ts +6 -8
  82. package/lib/rest/microvisor/v1/app/appManifest.d.ts +101 -0
  83. package/lib/rest/microvisor/v1/app/appManifest.js +115 -0
  84. package/lib/rest/microvisor/v1/app.d.ts +11 -0
  85. package/lib/rest/microvisor/v1/app.js +15 -0
  86. package/lib/rest/monitor/v1/alert.d.ts +3 -4
  87. package/lib/rest/preview/wireless/sim.d.ts +12 -16
  88. package/lib/rest/supersim/v1/esimProfile.d.ts +14 -0
  89. package/lib/rest/supersim/v1/esimProfile.js +6 -0
  90. package/lib/rest/supersim/v1/fleet.d.ts +6 -8
  91. package/lib/rest/taskrouter/v1/workspace/task/reservation.d.ts +14 -14
  92. package/lib/rest/taskrouter/v1/workspace/worker/reservation.d.ts +12 -12
  93. package/lib/rest/trunking/v1/trunk/phoneNumber.d.ts +15 -20
  94. package/lib/rest/trunking/v1/trunk.d.ts +3 -4
  95. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.d.ts +4 -4
  96. package/lib/rest/trusthub/v1/customerProfiles.d.ts +8 -8
  97. package/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.d.ts +4 -4
  98. package/lib/rest/trusthub/v1/trustProducts.d.ts +8 -8
  99. package/lib/rest/verify/v2/service/verification.d.ts +1 -1
  100. package/lib/rest/video/v1/composition.d.ts +3 -4
  101. package/lib/rest/video/v1/compositionHook.d.ts +3 -4
  102. package/lib/rest/video/v1/recording.d.ts +3 -4
  103. package/lib/rest/video/v1/room/participant/anonymize.d.ts +4 -4
  104. package/lib/rest/video/v1/room/participant/publishedTrack.d.ts +4 -4
  105. package/lib/rest/video/v1/room/participant/subscribedTrack.d.ts +4 -4
  106. package/lib/rest/video/v1/room/participant.d.ts +8 -8
  107. package/lib/rest/video/v1/room.d.ts +3 -4
  108. package/lib/rest/voice/v1/byocTrunk.d.ts +9 -12
  109. package/lib/rest/wireless/v1/sim.d.ts +15 -20
  110. package/lib/rest/wireless/v1/usageRecord.d.ts +4 -4
  111. package/package.json +1 -1
@@ -159,7 +159,6 @@ export declare class RoomContextImpl implements RoomContext {
159
159
  toJSON(): RoomContextSolution;
160
160
  [inspect.custom](_depth: any, options: InspectOptions): string;
161
161
  }
162
- export type RoomStatusCallbackMethod = "HEAD" | "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
163
162
  interface RoomPayload extends TwilioResponsePayload {
164
163
  rooms: RoomResource[];
165
164
  }
@@ -172,7 +171,7 @@ interface RoomResource {
172
171
  enable_turn: boolean;
173
172
  unique_name: string;
174
173
  status_callback: string;
175
- status_callback_method: RoomStatusCallbackMethod;
174
+ status_callback_method: string;
176
175
  end_time: Date;
177
176
  duration: number;
178
177
  type: RoomRoomType;
@@ -226,7 +225,7 @@ export declare class RoomInstance {
226
225
  /**
227
226
  * The HTTP method we use to call `status_callback`. Can be `POST` or `GET` and defaults to `POST`.
228
227
  */
229
- statusCallbackMethod: RoomStatusCallbackMethod;
228
+ statusCallbackMethod: string;
230
229
  /**
231
230
  * The UTC end time of the room in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#UTC) format.
232
231
  */
@@ -328,7 +327,7 @@ export declare class RoomInstance {
328
327
  enableTurn: boolean;
329
328
  uniqueName: string;
330
329
  statusCallback: string;
331
- statusCallbackMethod: RoomStatusCallbackMethod;
330
+ statusCallbackMethod: string;
332
331
  endTime: Date;
333
332
  duration: number;
334
333
  type: RoomRoomType;
@@ -145,9 +145,6 @@ export declare class ByocTrunkContextImpl implements ByocTrunkContext {
145
145
  toJSON(): ByocTrunkContextSolution;
146
146
  [inspect.custom](_depth: any, options: InspectOptions): string;
147
147
  }
148
- export type ByocTrunkVoiceMethod = "HEAD" | "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
149
- export type ByocTrunkVoiceFallbackMethod = "HEAD" | "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
150
- export type ByocTrunkStatusCallbackMethod = "HEAD" | "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
151
148
  interface ByocTrunkPayload extends TwilioResponsePayload {
152
149
  byoc_trunks: ByocTrunkResource[];
153
150
  }
@@ -156,11 +153,11 @@ interface ByocTrunkResource {
156
153
  sid: string;
157
154
  friendly_name: string;
158
155
  voice_url: string;
159
- voice_method: ByocTrunkVoiceMethod;
156
+ voice_method: string;
160
157
  voice_fallback_url: string;
161
- voice_fallback_method: ByocTrunkVoiceFallbackMethod;
158
+ voice_fallback_method: string;
162
159
  status_callback_url: string;
163
- status_callback_method: ByocTrunkStatusCallbackMethod;
160
+ status_callback_method: string;
164
161
  cnam_lookup_enabled: boolean;
165
162
  connection_policy_sid: string;
166
163
  from_domain_sid: string;
@@ -192,7 +189,7 @@ export declare class ByocTrunkInstance {
192
189
  /**
193
190
  * The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`.
194
191
  */
195
- voiceMethod: ByocTrunkVoiceMethod;
192
+ voiceMethod: string;
196
193
  /**
197
194
  * The URL that we call when an error occurs while retrieving or executing the TwiML requested from `voice_url`.
198
195
  */
@@ -200,7 +197,7 @@ export declare class ByocTrunkInstance {
200
197
  /**
201
198
  * The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`.
202
199
  */
203
- voiceFallbackMethod: ByocTrunkVoiceFallbackMethod;
200
+ voiceFallbackMethod: string;
204
201
  /**
205
202
  * The URL that we call to pass status parameters (such as call ended) to your application.
206
203
  */
@@ -208,7 +205,7 @@ export declare class ByocTrunkInstance {
208
205
  /**
209
206
  * The HTTP method we use to call `status_callback_url`. Either `GET` or `POST`.
210
207
  */
211
- statusCallbackMethod: ByocTrunkStatusCallbackMethod;
208
+ statusCallbackMethod: string;
212
209
  /**
213
210
  * Whether Caller ID Name (CNAM) lookup is enabled for the trunk. If enabled, all inbound calls to the BYOC Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information.
214
211
  */
@@ -277,11 +274,11 @@ export declare class ByocTrunkInstance {
277
274
  sid: string;
278
275
  friendlyName: string;
279
276
  voiceUrl: string;
280
- voiceMethod: ByocTrunkVoiceMethod;
277
+ voiceMethod: string;
281
278
  voiceFallbackUrl: string;
282
- voiceFallbackMethod: ByocTrunkVoiceFallbackMethod;
279
+ voiceFallbackMethod: string;
283
280
  statusCallbackUrl: string;
284
- statusCallbackMethod: ByocTrunkStatusCallbackMethod;
281
+ statusCallbackMethod: string;
285
282
  cnamLookupEnabled: boolean;
286
283
  connectionPolicySid: string;
287
284
  fromDomainSid: string;
@@ -176,11 +176,6 @@ export declare class SimContextImpl implements SimContext {
176
176
  toJSON(): SimContextSolution;
177
177
  [inspect.custom](_depth: any, options: InspectOptions): string;
178
178
  }
179
- export type SimCommandsCallbackMethod = "HEAD" | "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
180
- export type SimSmsFallbackMethod = "HEAD" | "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
181
- export type SimSmsMethod = "HEAD" | "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
182
- export type SimVoiceFallbackMethod = "HEAD" | "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
183
- export type SimVoiceMethod = "HEAD" | "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
184
179
  interface SimPayload extends TwilioResponsePayload {
185
180
  sims: SimResource[];
186
181
  }
@@ -195,14 +190,14 @@ interface SimResource {
195
190
  status: SimStatus;
196
191
  reset_status: SimResetStatus;
197
192
  commands_callback_url: string;
198
- commands_callback_method: SimCommandsCallbackMethod;
199
- sms_fallback_method: SimSmsFallbackMethod;
193
+ commands_callback_method: string;
194
+ sms_fallback_method: string;
200
195
  sms_fallback_url: string;
201
- sms_method: SimSmsMethod;
196
+ sms_method: string;
202
197
  sms_url: string;
203
- voice_fallback_method: SimVoiceFallbackMethod;
198
+ voice_fallback_method: string;
204
199
  voice_fallback_url: string;
205
- voice_method: SimVoiceMethod;
200
+ voice_method: string;
206
201
  voice_url: string;
207
202
  date_created: Date;
208
203
  date_updated: Date;
@@ -252,11 +247,11 @@ export declare class SimInstance {
252
247
  /**
253
248
  * The HTTP method we use to call `commands_callback_url`. Can be: `POST` or `GET`. Default is `POST`.
254
249
  */
255
- commandsCallbackMethod: SimCommandsCallbackMethod;
250
+ commandsCallbackMethod: string;
256
251
  /**
257
252
  * Deprecated.
258
253
  */
259
- smsFallbackMethod: SimSmsFallbackMethod;
254
+ smsFallbackMethod: string;
260
255
  /**
261
256
  * Deprecated.
262
257
  */
@@ -264,7 +259,7 @@ export declare class SimInstance {
264
259
  /**
265
260
  * Deprecated.
266
261
  */
267
- smsMethod: SimSmsMethod;
262
+ smsMethod: string;
268
263
  /**
269
264
  * Deprecated.
270
265
  */
@@ -272,7 +267,7 @@ export declare class SimInstance {
272
267
  /**
273
268
  * Deprecated. The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`. Default is `POST`.
274
269
  */
275
- voiceFallbackMethod: SimVoiceFallbackMethod;
270
+ voiceFallbackMethod: string;
276
271
  /**
277
272
  * Deprecated. The URL we call using the `voice_fallback_method` when an error occurs while retrieving or executing the TwiML requested from `voice_url`.
278
273
  */
@@ -280,7 +275,7 @@ export declare class SimInstance {
280
275
  /**
281
276
  * Deprecated. The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`. Default is `POST`.
282
277
  */
283
- voiceMethod: SimVoiceMethod;
278
+ voiceMethod: string;
284
279
  /**
285
280
  * Deprecated. The URL we call using the `voice_method` when the SIM-connected device makes a voice call.
286
281
  */
@@ -363,14 +358,14 @@ export declare class SimInstance {
363
358
  status: SimStatus;
364
359
  resetStatus: "resetting";
365
360
  commandsCallbackUrl: string;
366
- commandsCallbackMethod: SimCommandsCallbackMethod;
367
- smsFallbackMethod: SimSmsFallbackMethod;
361
+ commandsCallbackMethod: string;
362
+ smsFallbackMethod: string;
368
363
  smsFallbackUrl: string;
369
- smsMethod: SimSmsMethod;
364
+ smsMethod: string;
370
365
  smsUrl: string;
371
- voiceFallbackMethod: SimVoiceFallbackMethod;
366
+ voiceFallbackMethod: string;
372
367
  voiceFallbackUrl: string;
373
- voiceMethod: SimVoiceMethod;
368
+ voiceMethod: string;
374
369
  voiceUrl: string;
375
370
  dateCreated: Date;
376
371
  dateUpdated: Date;
@@ -3,7 +3,7 @@ import { inspect, InspectOptions } from "util";
3
3
  import Page, { TwilioResponsePayload } from "../../../base/Page";
4
4
  import Response from "../../../http/response";
5
5
  import V1 from "../V1";
6
- export type AccountUsageRecordGranularity = "hourly" | "daily" | "all";
6
+ export type UsageRecordGranularity = "hourly" | "daily" | "all";
7
7
  /**
8
8
  * Options to pass to each
9
9
  */
@@ -13,7 +13,7 @@ export interface UsageRecordListInstanceEachOptions {
13
13
  /** Only include usage that has occurred on or after this date. Format is [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). */
14
14
  start?: Date;
15
15
  /** How to summarize the usage by time. Can be: `daily`, `hourly`, or `all`. A value of `all` returns one Usage Record that describes the usage for the entire period. */
16
- granularity?: AccountUsageRecordGranularity;
16
+ granularity?: UsageRecordGranularity;
17
17
  /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
18
18
  pageSize?: number;
19
19
  /** Function to process each record. If this and a positional callback are passed, this one will be used */
@@ -32,7 +32,7 @@ export interface UsageRecordListInstanceOptions {
32
32
  /** Only include usage that has occurred on or after this date. Format is [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). */
33
33
  start?: Date;
34
34
  /** How to summarize the usage by time. Can be: `daily`, `hourly`, or `all`. A value of `all` returns one Usage Record that describes the usage for the entire period. */
35
- granularity?: AccountUsageRecordGranularity;
35
+ granularity?: UsageRecordGranularity;
36
36
  /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
37
37
  pageSize?: number;
38
38
  /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
@@ -47,7 +47,7 @@ export interface UsageRecordListInstancePageOptions {
47
47
  /** Only include usage that has occurred on or after this date. Format is [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). */
48
48
  start?: Date;
49
49
  /** How to summarize the usage by time. Can be: `daily`, `hourly`, or `all`. A value of `all` returns one Usage Record that describes the usage for the entire period. */
50
- granularity?: AccountUsageRecordGranularity;
50
+ granularity?: UsageRecordGranularity;
51
51
  /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
52
52
  pageSize?: number;
53
53
  /** Page Number, this value is simply for client state */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "twilio",
3
3
  "description": "A Twilio helper library",
4
- "version": "4.8.0",
4
+ "version": "4.9.0",
5
5
  "author": "API Team <api@twilio.com>",
6
6
  "contributors": [
7
7
  {