twilio 5.13.1 → 6.0.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 (38) hide show
  1. package/README.md +2 -4
  2. package/lib/rest/MessagingBase.d.ts +3 -0
  3. package/lib/rest/MessagingBase.js +5 -0
  4. package/lib/rest/api/v2010/account/call/transcription.d.ts +2 -0
  5. package/lib/rest/api/v2010/account/call/transcription.js +4 -0
  6. package/lib/rest/api/v2010/account/message.d.ts +2 -0
  7. package/lib/rest/api/v2010/account/message.js +4 -0
  8. package/lib/rest/flexApi/V1.d.ts +0 -5
  9. package/lib/rest/flexApi/V1.js +0 -7
  10. package/lib/rest/iam/V1.d.ts +3 -0
  11. package/lib/rest/iam/V1.js +5 -0
  12. package/lib/rest/iam/v1/rolePermission.d.ts +225 -0
  13. package/lib/rest/iam/v1/rolePermission.js +181 -0
  14. package/lib/rest/insights/v2/inbound.d.ts +8 -8
  15. package/lib/rest/insights/v2/inbound.js +4 -4
  16. package/lib/rest/insights/v2/outbound.d.ts +8 -8
  17. package/lib/rest/insights/v2/outbound.js +4 -4
  18. package/lib/rest/insights/v2/report.d.ts +8 -8
  19. package/lib/rest/insights/v2/report.js +4 -4
  20. package/lib/rest/messaging/V3.d.ts +15 -0
  21. package/lib/rest/messaging/V3.js +37 -0
  22. package/lib/rest/messaging/v2/channelsSender.d.ts +1 -1
  23. package/lib/rest/messaging/v3/typingIndicator.d.ts +90 -0
  24. package/lib/rest/messaging/v3/typingIndicator.js +114 -0
  25. package/lib/rest/numbers/v3/hostedNumberOrder.d.ts +1 -1
  26. package/lib/rest/numbers/v3/hostedNumberOrder.js +2 -1
  27. package/lib/rest/studio/v2/flow/execution.d.ts +12 -0
  28. package/lib/rest/studio/v2/flow/execution.js +6 -0
  29. package/lib/rest/verify/v2/service/approveChallenge.d.ts +6 -6
  30. package/lib/rest/verify/v2/service/approveChallenge.js +2 -2
  31. package/lib/rest/verify/v2/service/newChallenge.d.ts +6 -6
  32. package/lib/rest/verify/v2/service/newChallenge.js +2 -2
  33. package/lib/rest/verify/v2/service/verification.d.ts +1 -1
  34. package/lib/rest/video/v1/room.d.ts +4 -1
  35. package/lib/twiml/VoiceResponse.d.ts +10 -0
  36. package/package.json +2 -2
  37. package/lib/rest/flexApi/v1/createFlexInstance.d.ts +0 -165
  38. package/lib/rest/flexApi/v1/createFlexInstance.js +0 -165
@@ -8,7 +8,10 @@ import { RecordingRulesListInstance } from "./room/recordingRules";
8
8
  import { RoomRecordingListInstance } from "./room/roomRecording";
9
9
  import { TranscriptionsListInstance } from "./room/transcriptions";
10
10
  export type RoomRoomStatus = "in-progress" | "completed" | "failed";
11
- export type RoomRoomType = "go" | "peer-to-peer" | "group" | "group-small";
11
+ /**
12
+ * Type of room. Use `group` for new implementations. `go`, `peer-to-peer`, and `group-small` are deprecated.
13
+ */
14
+ export type RoomRoomType = "group" | "go" | "peer-to-peer" | "group-small";
12
15
  export type RoomVideoCodec = "VP8" | "H264";
13
16
  /**
14
17
  * Options to pass to update a RoomInstance
@@ -1526,14 +1526,22 @@ declare namespace VoiceResponse {
1526
1526
  * Attributes to pass to conversationRelay
1527
1527
  */
1528
1528
  export interface ConversationRelayAttributes {
1529
+ /** backgroundnoisereduction - This parameters enables background noise filtering on the audio stream before it reaches the STT engine, improving transcription accuracy in noisy environments */
1530
+ backgroundnoisereduction?: string;
1529
1531
  /** debug - Multiple debug options to be used for troubleshooting */
1530
1532
  debug?: string;
1533
+ /** deepgramsmartformat - This parameter enables Deepgram's smart formatting feature, which automatically applies punctuation, capitalization, and formatting (e.g. numbers, dates, currency) to transcripts */
1534
+ deepgramsmartformat?: string;
1531
1535
  /** dtmfDetection - Whether DTMF tones should be detected and reported in speech transcription */
1532
1536
  dtmfDetection?: boolean;
1533
1537
  /** elevenlabsTextNormalization - When using ElevenLabs as TTS provider, this parameter allows you to enable or disable its text normalization feature */
1534
1538
  elevenlabsTextNormalization?: string;
1539
+ /** events - This parameter allows you to enable event subscriptions */
1540
+ events?: string;
1535
1541
  /** hints - Phrases to help better accuracy in speech recognition of these pharases */
1536
1542
  hints?: string;
1543
+ /** ignorebackchannel - This parameter brief caller acknowledgments (e.g. "yeah", "uh-huh") are ignored and will not interrupt the agent while it is speaking. */
1544
+ ignorebackchannel?: string;
1537
1545
  /** intelligenceService - The Conversational Intelligence Service id or unique name to be used for the session */
1538
1546
  intelligenceService?: string;
1539
1547
  /** interruptSensitivity - Set the sensitivity of the interrupt feature for speech. The value can be low, medium, or high */
@@ -1552,6 +1560,8 @@ declare namespace VoiceResponse {
1552
1560
  reportInputDuringAgentSpeech?: boolean;
1553
1561
  /** speechModel - Speech model to be used for transcription */
1554
1562
  speechModel?: string;
1563
+ /** speechtimeout - Set the duration of silence that indicates the end of speech */
1564
+ speechtimeout?: string;
1555
1565
  /** transcriptionLanguage - Language to be used for transcription */
1556
1566
  transcriptionLanguage?: string;
1557
1567
  /** transcriptionProvider - Provider to be used for transcription */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "twilio",
3
3
  "description": "A Twilio helper library",
4
- "version": "5.13.1",
4
+ "version": "6.0.0",
5
5
  "author": "API Team <api@twilio.com>",
6
6
  "contributors": [
7
7
  {
@@ -71,7 +71,7 @@
71
71
  "main": "./lib",
72
72
  "types": "./index.d.ts",
73
73
  "engines": {
74
- "node": ">=14.0"
74
+ "node": ">=20.0.0"
75
75
  },
76
76
  "license": "MIT"
77
77
  }
@@ -1,165 +0,0 @@
1
- import { inspect, InspectOptions } from "util";
2
- import V1 from "../V1";
3
- import { ApiResponse } from "../../../base/ApiResponse";
4
- export declare class CreateInstanceRequestBody {
5
- "conversation"?: CreateInstanceRequestBodyConversation;
6
- constructor(payload: any);
7
- }
8
- export declare class CreateInstanceRequestBodyConversation {
9
- /**
10
- * Set newly created conversation service as the default conversation service
11
- */
12
- "_default"?: boolean;
13
- constructor(payload: any);
14
- }
15
- /**
16
- * Options to pass to create a CreateFlexInstanceInstance
17
- */
18
- export interface CreateFlexInstanceContextCreateOptions {
19
- /** */
20
- createInstanceRequestBody?: CreateInstanceRequestBody;
21
- }
22
- export interface CreateFlexInstanceContext {
23
- /**
24
- * Create a CreateFlexInstanceInstance
25
- *
26
- * @param callback - Callback to handle processed record
27
- *
28
- * @returns Resolves to processed CreateFlexInstanceInstance
29
- */
30
- create(callback?: (error: Error | null, item?: CreateFlexInstanceInstance) => any): Promise<CreateFlexInstanceInstance>;
31
- /**
32
- * Create a CreateFlexInstanceInstance
33
- *
34
- * @param params - Body for request
35
- * @param headers - header params for request
36
- * @param callback - Callback to handle processed record
37
- *
38
- * @returns Resolves to processed CreateFlexInstanceInstance
39
- */
40
- create(params: CreateInstanceRequestBody, headers?: any, callback?: (error: Error | null, item?: CreateFlexInstanceInstance) => any): Promise<CreateFlexInstanceInstance>;
41
- /**
42
- * Create a CreateFlexInstanceInstance and return HTTP info
43
- *
44
- * @param callback - Callback to handle processed record
45
- *
46
- * @returns Resolves to processed CreateFlexInstanceInstance with HTTP metadata
47
- */
48
- createWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<CreateFlexInstanceInstance>) => any): Promise<ApiResponse<CreateFlexInstanceInstance>>;
49
- /**
50
- * Create a CreateFlexInstanceInstance and return HTTP info
51
- *
52
- * @param params - Body for request
53
- * @param headers - header params for request
54
- * @param callback - Callback to handle processed record
55
- *
56
- * @returns Resolves to processed CreateFlexInstanceInstance with HTTP metadata
57
- */
58
- createWithHttpInfo(params: CreateInstanceRequestBody, headers?: any, callback?: (error: Error | null, item?: ApiResponse<CreateFlexInstanceInstance>) => any): Promise<ApiResponse<CreateFlexInstanceInstance>>;
59
- /**
60
- * Provide a user-friendly representation
61
- */
62
- toJSON(): any;
63
- [inspect.custom](_depth: any, options: InspectOptions): any;
64
- }
65
- export interface CreateFlexInstanceContextSolution {
66
- }
67
- export declare class CreateFlexInstanceContextImpl implements CreateFlexInstanceContext {
68
- protected _version: V1;
69
- protected _solution: CreateFlexInstanceContextSolution;
70
- protected _uri: string;
71
- constructor(_version: V1);
72
- create(params?: CreateInstanceRequestBody | ((error: Error | null, item?: CreateFlexInstanceInstance) => any), headers?: any, callback?: (error: Error | null, item?: CreateFlexInstanceInstance) => any): Promise<CreateFlexInstanceInstance>;
73
- createWithHttpInfo(params?: CreateInstanceRequestBody | ((error: Error | null, item?: ApiResponse<CreateFlexInstanceInstance>) => any), headers?: any, callback?: (error: Error | null, item?: ApiResponse<CreateFlexInstanceInstance>) => any): Promise<ApiResponse<CreateFlexInstanceInstance>>;
74
- /**
75
- * Provide a user-friendly representation
76
- *
77
- * @returns Object
78
- */
79
- toJSON(): CreateFlexInstanceContextSolution;
80
- [inspect.custom](_depth: any, options: InspectOptions): string;
81
- }
82
- interface CreateFlexInstanceResource {
83
- flex_instance_sid: string;
84
- account_sid: string;
85
- status: string;
86
- date_created: Date;
87
- date_updated: Date;
88
- }
89
- export declare class CreateFlexInstanceInstance {
90
- protected _version: V1;
91
- protected _solution: CreateFlexInstanceContextSolution;
92
- protected _context?: CreateFlexInstanceContext;
93
- constructor(_version: V1, payload: CreateFlexInstanceResource);
94
- flexInstanceSid: string;
95
- accountSid: string;
96
- status: string;
97
- dateCreated: Date;
98
- dateUpdated: Date;
99
- private get _proxy();
100
- /**
101
- * Create a CreateFlexInstanceInstance
102
- *
103
- * @param callback - Callback to handle processed record
104
- *
105
- * @returns Resolves to processed CreateFlexInstanceInstance
106
- */
107
- create(callback?: (error: Error | null, item?: CreateFlexInstanceInstance) => any): Promise<CreateFlexInstanceInstance>;
108
- /**
109
- * Create a CreateFlexInstanceInstance
110
- *
111
- * @param params - Body for request
112
- * @param headers - header params for request
113
- * @param callback - Callback to handle processed record
114
- *
115
- * @returns Resolves to processed CreateFlexInstanceInstance
116
- */
117
- create(params: CreateInstanceRequestBody, headers?: any, callback?: (error: Error | null, item?: CreateFlexInstanceInstance) => any): Promise<CreateFlexInstanceInstance>;
118
- /**
119
- * Create a CreateFlexInstanceInstance and return HTTP info
120
- *
121
- * @param callback - Callback to handle processed record
122
- *
123
- * @returns Resolves to processed CreateFlexInstanceInstance with HTTP metadata
124
- */
125
- createWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<CreateFlexInstanceInstance>) => any): Promise<ApiResponse<CreateFlexInstanceInstance>>;
126
- /**
127
- * Create a CreateFlexInstanceInstance and return HTTP info
128
- *
129
- * @param params - Body for request
130
- * @param headers - header params for request
131
- * @param callback - Callback to handle processed record
132
- *
133
- * @returns Resolves to processed CreateFlexInstanceInstance with HTTP metadata
134
- */
135
- createWithHttpInfo(params: CreateInstanceRequestBody, headers?: any, callback?: (error: Error | null, item?: ApiResponse<CreateFlexInstanceInstance>) => any): Promise<ApiResponse<CreateFlexInstanceInstance>>;
136
- /**
137
- * Provide a user-friendly representation
138
- *
139
- * @returns Object
140
- */
141
- toJSON(): {
142
- flexInstanceSid: string;
143
- accountSid: string;
144
- status: string;
145
- dateCreated: Date;
146
- dateUpdated: Date;
147
- };
148
- [inspect.custom](_depth: any, options: InspectOptions): string;
149
- }
150
- export interface CreateFlexInstanceSolution {
151
- }
152
- export interface CreateFlexInstanceListInstance {
153
- _version: V1;
154
- _solution: CreateFlexInstanceSolution;
155
- _uri: string;
156
- (): CreateFlexInstanceContext;
157
- get(): CreateFlexInstanceContext;
158
- /**
159
- * Provide a user-friendly representation
160
- */
161
- toJSON(): any;
162
- [inspect.custom](_depth: any, options: InspectOptions): any;
163
- }
164
- export declare function CreateFlexInstanceListInstance(version: V1): CreateFlexInstanceListInstance;
165
- export {};
@@ -1,165 +0,0 @@
1
- "use strict";
2
- /*
3
- * This code was generated by
4
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
- *
8
- * Twilio - Flex
9
- * This is the public Twilio REST API.
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator.
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.CreateFlexInstanceInstance = exports.CreateFlexInstanceContextImpl = exports.CreateInstanceRequestBodyConversation = exports.CreateInstanceRequestBody = void 0;
17
- exports.CreateFlexInstanceListInstance = CreateFlexInstanceListInstance;
18
- const util_1 = require("util");
19
- const deserialize = require("../../../base/deserialize");
20
- const serialize = require("../../../base/serialize");
21
- class CreateInstanceRequestBody {
22
- constructor(payload) {
23
- this.conversation = payload["Conversation"];
24
- }
25
- }
26
- exports.CreateInstanceRequestBody = CreateInstanceRequestBody;
27
- class CreateInstanceRequestBodyConversation {
28
- constructor(payload) {
29
- this._default = payload["Default"];
30
- }
31
- }
32
- exports.CreateInstanceRequestBodyConversation = CreateInstanceRequestBodyConversation;
33
- class CreateFlexInstanceContextImpl {
34
- constructor(_version) {
35
- this._version = _version;
36
- this._solution = {};
37
- this._uri = `/Instances`;
38
- }
39
- create(params, headers, callback) {
40
- if (params instanceof Function) {
41
- callback = params;
42
- params = {};
43
- }
44
- else {
45
- params = params || {};
46
- }
47
- let data = {};
48
- data = params;
49
- if (headers === null || headers === undefined) {
50
- headers = {};
51
- }
52
- headers["Content-Type"] = "application/json";
53
- headers["Accept"] = "application/json";
54
- const instance = this;
55
- let operationVersion = instance._version, operationPromise = operationVersion.create({
56
- uri: instance._uri,
57
- method: "post",
58
- data,
59
- headers,
60
- });
61
- operationPromise = operationPromise.then((payload) => new CreateFlexInstanceInstance(operationVersion, payload));
62
- operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
63
- return operationPromise;
64
- }
65
- createWithHttpInfo(params, headers, callback) {
66
- if (params instanceof Function) {
67
- callback = params;
68
- params = {};
69
- }
70
- else {
71
- params = params || {};
72
- }
73
- let data = {};
74
- data = params;
75
- if (headers === null || headers === undefined) {
76
- headers = {};
77
- }
78
- headers["Content-Type"] = "application/json";
79
- headers["Accept"] = "application/json";
80
- const instance = this;
81
- let operationVersion = instance._version;
82
- // CREATE, FETCH, UPDATE operations
83
- let operationPromise = operationVersion
84
- .createWithResponseInfo({
85
- uri: instance._uri,
86
- method: "post",
87
- data,
88
- headers,
89
- })
90
- .then((response) => ({
91
- ...response,
92
- body: new CreateFlexInstanceInstance(operationVersion, response.body),
93
- }));
94
- operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
95
- return operationPromise;
96
- }
97
- /**
98
- * Provide a user-friendly representation
99
- *
100
- * @returns Object
101
- */
102
- toJSON() {
103
- return this._solution;
104
- }
105
- [util_1.inspect.custom](_depth, options) {
106
- return (0, util_1.inspect)(this.toJSON(), options);
107
- }
108
- }
109
- exports.CreateFlexInstanceContextImpl = CreateFlexInstanceContextImpl;
110
- class CreateFlexInstanceInstance {
111
- constructor(_version, payload) {
112
- this._version = _version;
113
- this.flexInstanceSid = payload.flex_instance_sid;
114
- this.accountSid = payload.account_sid;
115
- this.status = payload.status;
116
- this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
117
- this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
118
- this._solution = {};
119
- }
120
- get _proxy() {
121
- this._context =
122
- this._context || new CreateFlexInstanceContextImpl(this._version);
123
- return this._context;
124
- }
125
- create(params, callback) {
126
- return this._proxy.create(params, callback);
127
- }
128
- createWithHttpInfo(params, callback) {
129
- return this._proxy.createWithHttpInfo(params, callback);
130
- }
131
- /**
132
- * Provide a user-friendly representation
133
- *
134
- * @returns Object
135
- */
136
- toJSON() {
137
- return {
138
- flexInstanceSid: this.flexInstanceSid,
139
- accountSid: this.accountSid,
140
- status: this.status,
141
- dateCreated: this.dateCreated,
142
- dateUpdated: this.dateUpdated,
143
- };
144
- }
145
- [util_1.inspect.custom](_depth, options) {
146
- return (0, util_1.inspect)(this.toJSON(), options);
147
- }
148
- }
149
- exports.CreateFlexInstanceInstance = CreateFlexInstanceInstance;
150
- function CreateFlexInstanceListInstance(version) {
151
- const instance = (() => instance.get());
152
- instance.get = function get() {
153
- return new CreateFlexInstanceContextImpl(version);
154
- };
155
- instance._version = version;
156
- instance._solution = {};
157
- instance._uri = ``;
158
- instance.toJSON = function toJSON() {
159
- return instance._solution;
160
- };
161
- instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
162
- return (0, util_1.inspect)(instance.toJSON(), options);
163
- };
164
- return instance;
165
- }