twilio 5.4.4 → 5.4.5

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.
@@ -41,7 +41,7 @@ export interface TranscriptionListInstanceCreateOptions {
41
41
  hints?: string;
42
42
  /** The provider will add punctuation to recognition result */
43
43
  enableAutomaticPunctuation?: boolean;
44
- /** The SID of the [Voice Intelligence Service](https://www.twilio.com/docs/voice/intelligence/api/service-resource) for persisting transcripts and running post-call Language Operators . */
44
+ /** The SID or unique name of the [Voice Intelligence Service](https://www.twilio.com/docs/voice/intelligence/api/service-resource) for persisting transcripts and running post-call Language Operators . */
45
45
  intelligenceService?: string;
46
46
  }
47
47
  export interface TranscriptionContext {
@@ -0,0 +1,232 @@
1
+ /// <reference types="node" />
2
+ import { inspect, InspectOptions } from "util";
3
+ import V1 from "../../../V1";
4
+ export type InteractionTransferTransferStatus = "active" | "failed" | "completed";
5
+ export type InteractionTransferTransferType = "warm" | "cold" | "external";
6
+ /**
7
+ * Options to pass to update a InteractionTransferInstance
8
+ */
9
+ export interface InteractionTransferContextUpdateOptions {
10
+ /** */
11
+ body?: object;
12
+ }
13
+ /**
14
+ * Options to pass to create a InteractionTransferInstance
15
+ */
16
+ export interface InteractionTransferListInstanceCreateOptions {
17
+ /** */
18
+ body?: object;
19
+ }
20
+ export interface InteractionTransferContext {
21
+ /**
22
+ * Fetch a InteractionTransferInstance
23
+ *
24
+ * @param callback - Callback to handle processed record
25
+ *
26
+ * @returns Resolves to processed InteractionTransferInstance
27
+ */
28
+ fetch(callback?: (error: Error | null, item?: InteractionTransferInstance) => any): Promise<InteractionTransferInstance>;
29
+ /**
30
+ * Update a InteractionTransferInstance
31
+ *
32
+ * @param callback - Callback to handle processed record
33
+ *
34
+ * @returns Resolves to processed InteractionTransferInstance
35
+ */
36
+ update(callback?: (error: Error | null, item?: InteractionTransferInstance) => any): Promise<InteractionTransferInstance>;
37
+ /**
38
+ * Update a InteractionTransferInstance
39
+ *
40
+ * @param params - Body for request
41
+ * @param headers - header params for request
42
+ * @param callback - Callback to handle processed record
43
+ *
44
+ * @returns Resolves to processed InteractionTransferInstance
45
+ */
46
+ update(params: object, headers?: any, callback?: (error: Error | null, item?: InteractionTransferInstance) => any): Promise<InteractionTransferInstance>;
47
+ /**
48
+ * Provide a user-friendly representation
49
+ */
50
+ toJSON(): any;
51
+ [inspect.custom](_depth: any, options: InspectOptions): any;
52
+ }
53
+ export interface InteractionTransferContextSolution {
54
+ interactionSid: string;
55
+ channelSid: string;
56
+ sid: string;
57
+ }
58
+ export declare class InteractionTransferContextImpl implements InteractionTransferContext {
59
+ protected _version: V1;
60
+ protected _solution: InteractionTransferContextSolution;
61
+ protected _uri: string;
62
+ constructor(_version: V1, interactionSid: string, channelSid: string, sid: string);
63
+ fetch(callback?: (error: Error | null, item?: InteractionTransferInstance) => any): Promise<InteractionTransferInstance>;
64
+ update(params?: object | ((error: Error | null, item?: InteractionTransferInstance) => any), headers?: any, callback?: (error: Error | null, item?: InteractionTransferInstance) => any): Promise<InteractionTransferInstance>;
65
+ /**
66
+ * Provide a user-friendly representation
67
+ *
68
+ * @returns Object
69
+ */
70
+ toJSON(): InteractionTransferContextSolution;
71
+ [inspect.custom](_depth: any, options: InspectOptions): string;
72
+ }
73
+ interface InteractionTransferResource {
74
+ sid: string;
75
+ instance_sid: string;
76
+ account_sid: string;
77
+ interaction_sid: string;
78
+ channel_sid: string;
79
+ execution_sid: string;
80
+ type: InteractionTransferTransferType;
81
+ status: InteractionTransferTransferStatus;
82
+ from: string;
83
+ to: string;
84
+ note_sid: string;
85
+ summary_sid: string;
86
+ date_created: Date;
87
+ date_updated: Date;
88
+ url: string;
89
+ }
90
+ export declare class InteractionTransferInstance {
91
+ protected _version: V1;
92
+ protected _solution: InteractionTransferContextSolution;
93
+ protected _context?: InteractionTransferContext;
94
+ constructor(_version: V1, payload: InteractionTransferResource, interactionSid: string, channelSid: string, sid?: string);
95
+ /**
96
+ * The unique string created by Twilio to identify an Interaction Transfer resource.
97
+ */
98
+ sid: string;
99
+ /**
100
+ * The SID of the Instance associated with the Transfer.
101
+ */
102
+ instanceSid: string;
103
+ /**
104
+ * The SID of the Account that created the Transfer.
105
+ */
106
+ accountSid: string;
107
+ /**
108
+ * The Interaction Sid for this channel.
109
+ */
110
+ interactionSid: string;
111
+ /**
112
+ * The Channel Sid for this Transfer.
113
+ */
114
+ channelSid: string;
115
+ /**
116
+ * The Execution SID associated with the Transfer.
117
+ */
118
+ executionSid: string;
119
+ type: InteractionTransferTransferType;
120
+ status: InteractionTransferTransferStatus;
121
+ /**
122
+ * The SID of the Participant initiating the Transfer.
123
+ */
124
+ from: string;
125
+ /**
126
+ * The SID of the Participant receiving the Transfer.
127
+ */
128
+ to: string;
129
+ /**
130
+ * The SID of the Note associated with the Transfer.
131
+ */
132
+ noteSid: string;
133
+ /**
134
+ * The SID of the Summary associated with the Transfer.
135
+ */
136
+ summarySid: string;
137
+ /**
138
+ * The date and time when the Transfer was created.
139
+ */
140
+ dateCreated: Date;
141
+ /**
142
+ * The date and time when the Transfer was last updated.
143
+ */
144
+ dateUpdated: Date;
145
+ url: string;
146
+ private get _proxy();
147
+ /**
148
+ * Fetch a InteractionTransferInstance
149
+ *
150
+ * @param callback - Callback to handle processed record
151
+ *
152
+ * @returns Resolves to processed InteractionTransferInstance
153
+ */
154
+ fetch(callback?: (error: Error | null, item?: InteractionTransferInstance) => any): Promise<InteractionTransferInstance>;
155
+ /**
156
+ * Update a InteractionTransferInstance
157
+ *
158
+ * @param callback - Callback to handle processed record
159
+ *
160
+ * @returns Resolves to processed InteractionTransferInstance
161
+ */
162
+ update(callback?: (error: Error | null, item?: InteractionTransferInstance) => any): Promise<InteractionTransferInstance>;
163
+ /**
164
+ * Update a InteractionTransferInstance
165
+ *
166
+ * @param params - Body for request
167
+ * @param headers - header params for request
168
+ * @param callback - Callback to handle processed record
169
+ *
170
+ * @returns Resolves to processed InteractionTransferInstance
171
+ */
172
+ update(params: object, headers?: any, callback?: (error: Error | null, item?: InteractionTransferInstance) => any): Promise<InteractionTransferInstance>;
173
+ /**
174
+ * Provide a user-friendly representation
175
+ *
176
+ * @returns Object
177
+ */
178
+ toJSON(): {
179
+ sid: string;
180
+ instanceSid: string;
181
+ accountSid: string;
182
+ interactionSid: string;
183
+ channelSid: string;
184
+ executionSid: string;
185
+ type: InteractionTransferTransferType;
186
+ status: InteractionTransferTransferStatus;
187
+ from: string;
188
+ to: string;
189
+ noteSid: string;
190
+ summarySid: string;
191
+ dateCreated: Date;
192
+ dateUpdated: Date;
193
+ url: string;
194
+ };
195
+ [inspect.custom](_depth: any, options: InspectOptions): string;
196
+ }
197
+ export interface InteractionTransferSolution {
198
+ interactionSid: string;
199
+ channelSid: string;
200
+ }
201
+ export interface InteractionTransferListInstance {
202
+ _version: V1;
203
+ _solution: InteractionTransferSolution;
204
+ _uri: string;
205
+ (sid: string): InteractionTransferContext;
206
+ get(sid: string): InteractionTransferContext;
207
+ /**
208
+ * Create a InteractionTransferInstance
209
+ *
210
+ * @param callback - Callback to handle processed record
211
+ *
212
+ * @returns Resolves to processed InteractionTransferInstance
213
+ */
214
+ create(callback?: (error: Error | null, item?: InteractionTransferInstance) => any): Promise<InteractionTransferInstance>;
215
+ /**
216
+ * Create a InteractionTransferInstance
217
+ *
218
+ * @param params - Body for request
219
+ * @param headers - header params for request
220
+ * @param callback - Callback to handle processed record
221
+ *
222
+ * @returns Resolves to processed InteractionTransferInstance
223
+ */
224
+ create(params: object, headers?: any, callback?: (error: Error | null, item?: InteractionTransferInstance) => any): Promise<InteractionTransferInstance>;
225
+ /**
226
+ * Provide a user-friendly representation
227
+ */
228
+ toJSON(): any;
229
+ [inspect.custom](_depth: any, options: InspectOptions): any;
230
+ }
231
+ export declare function InteractionTransferListInstance(version: V1, interactionSid: string, channelSid: string): InteractionTransferListInstance;
232
+ export {};
@@ -0,0 +1,203 @@
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.InteractionTransferListInstance = exports.InteractionTransferInstance = exports.InteractionTransferContextImpl = void 0;
17
+ const util_1 = require("util");
18
+ const deserialize = require("../../../../../base/deserialize");
19
+ const serialize = require("../../../../../base/serialize");
20
+ const utility_1 = require("../../../../../base/utility");
21
+ class InteractionTransferContextImpl {
22
+ constructor(_version, interactionSid, channelSid, sid) {
23
+ this._version = _version;
24
+ if (!(0, utility_1.isValidPathParam)(interactionSid)) {
25
+ throw new Error("Parameter 'interactionSid' is not valid.");
26
+ }
27
+ if (!(0, utility_1.isValidPathParam)(channelSid)) {
28
+ throw new Error("Parameter 'channelSid' is not valid.");
29
+ }
30
+ if (!(0, utility_1.isValidPathParam)(sid)) {
31
+ throw new Error("Parameter 'sid' is not valid.");
32
+ }
33
+ this._solution = { interactionSid, channelSid, sid };
34
+ this._uri = `/Interactions/${interactionSid}/Channels/${channelSid}/Transfers/${sid}`;
35
+ }
36
+ fetch(callback) {
37
+ const headers = {};
38
+ headers["Accept"] = "application/json";
39
+ const instance = this;
40
+ let operationVersion = instance._version, operationPromise = operationVersion.fetch({
41
+ uri: instance._uri,
42
+ method: "get",
43
+ headers,
44
+ });
45
+ operationPromise = operationPromise.then((payload) => new InteractionTransferInstance(operationVersion, payload, instance._solution.interactionSid, instance._solution.channelSid, instance._solution.sid));
46
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
47
+ return operationPromise;
48
+ }
49
+ update(params, headers, callback) {
50
+ if (params instanceof Function) {
51
+ callback = params;
52
+ params = {};
53
+ }
54
+ else {
55
+ params = params || {};
56
+ }
57
+ let data = {};
58
+ data = params;
59
+ if (headers === null || headers === undefined) {
60
+ headers = {};
61
+ }
62
+ headers["Content-Type"] = "application/json";
63
+ headers["Accept"] = "application/json";
64
+ const instance = this;
65
+ let operationVersion = instance._version, operationPromise = operationVersion.update({
66
+ uri: instance._uri,
67
+ method: "post",
68
+ data,
69
+ headers,
70
+ });
71
+ operationPromise = operationPromise.then((payload) => new InteractionTransferInstance(operationVersion, payload, instance._solution.interactionSid, instance._solution.channelSid, instance._solution.sid));
72
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
73
+ return operationPromise;
74
+ }
75
+ /**
76
+ * Provide a user-friendly representation
77
+ *
78
+ * @returns Object
79
+ */
80
+ toJSON() {
81
+ return this._solution;
82
+ }
83
+ [util_1.inspect.custom](_depth, options) {
84
+ return (0, util_1.inspect)(this.toJSON(), options);
85
+ }
86
+ }
87
+ exports.InteractionTransferContextImpl = InteractionTransferContextImpl;
88
+ class InteractionTransferInstance {
89
+ constructor(_version, payload, interactionSid, channelSid, sid) {
90
+ this._version = _version;
91
+ this.sid = payload.sid;
92
+ this.instanceSid = payload.instance_sid;
93
+ this.accountSid = payload.account_sid;
94
+ this.interactionSid = payload.interaction_sid;
95
+ this.channelSid = payload.channel_sid;
96
+ this.executionSid = payload.execution_sid;
97
+ this.type = payload.type;
98
+ this.status = payload.status;
99
+ this.from = payload.from;
100
+ this.to = payload.to;
101
+ this.noteSid = payload.note_sid;
102
+ this.summarySid = payload.summary_sid;
103
+ this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
104
+ this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
105
+ this.url = payload.url;
106
+ this._solution = { interactionSid, channelSid, sid: sid || this.sid };
107
+ }
108
+ get _proxy() {
109
+ this._context =
110
+ this._context ||
111
+ new InteractionTransferContextImpl(this._version, this._solution.interactionSid, this._solution.channelSid, this._solution.sid);
112
+ return this._context;
113
+ }
114
+ /**
115
+ * Fetch a InteractionTransferInstance
116
+ *
117
+ * @param callback - Callback to handle processed record
118
+ *
119
+ * @returns Resolves to processed InteractionTransferInstance
120
+ */
121
+ fetch(callback) {
122
+ return this._proxy.fetch(callback);
123
+ }
124
+ update(params, callback) {
125
+ return this._proxy.update(params, callback);
126
+ }
127
+ /**
128
+ * Provide a user-friendly representation
129
+ *
130
+ * @returns Object
131
+ */
132
+ toJSON() {
133
+ return {
134
+ sid: this.sid,
135
+ instanceSid: this.instanceSid,
136
+ accountSid: this.accountSid,
137
+ interactionSid: this.interactionSid,
138
+ channelSid: this.channelSid,
139
+ executionSid: this.executionSid,
140
+ type: this.type,
141
+ status: this.status,
142
+ from: this.from,
143
+ to: this.to,
144
+ noteSid: this.noteSid,
145
+ summarySid: this.summarySid,
146
+ dateCreated: this.dateCreated,
147
+ dateUpdated: this.dateUpdated,
148
+ url: this.url,
149
+ };
150
+ }
151
+ [util_1.inspect.custom](_depth, options) {
152
+ return (0, util_1.inspect)(this.toJSON(), options);
153
+ }
154
+ }
155
+ exports.InteractionTransferInstance = InteractionTransferInstance;
156
+ function InteractionTransferListInstance(version, interactionSid, channelSid) {
157
+ if (!(0, utility_1.isValidPathParam)(interactionSid)) {
158
+ throw new Error("Parameter 'interactionSid' is not valid.");
159
+ }
160
+ if (!(0, utility_1.isValidPathParam)(channelSid)) {
161
+ throw new Error("Parameter 'channelSid' is not valid.");
162
+ }
163
+ const instance = ((sid) => instance.get(sid));
164
+ instance.get = function get(sid) {
165
+ return new InteractionTransferContextImpl(version, interactionSid, channelSid, sid);
166
+ };
167
+ instance._version = version;
168
+ instance._solution = { interactionSid, channelSid };
169
+ instance._uri = `/Interactions/${interactionSid}/Channels/${channelSid}/Transfers`;
170
+ instance.create = function create(params, headers, callback) {
171
+ if (params instanceof Function) {
172
+ callback = params;
173
+ params = {};
174
+ }
175
+ else {
176
+ params = params || {};
177
+ }
178
+ let data = {};
179
+ data = params;
180
+ if (headers === null || headers === undefined) {
181
+ headers = {};
182
+ }
183
+ headers["Content-Type"] = "application/json";
184
+ headers["Accept"] = "application/json";
185
+ let operationVersion = version, operationPromise = operationVersion.create({
186
+ uri: instance._uri,
187
+ method: "post",
188
+ data,
189
+ headers,
190
+ });
191
+ operationPromise = operationPromise.then((payload) => new InteractionTransferInstance(operationVersion, payload, instance._solution.interactionSid, instance._solution.channelSid));
192
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
193
+ return operationPromise;
194
+ };
195
+ instance.toJSON = function toJSON() {
196
+ return instance._solution;
197
+ };
198
+ instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
199
+ return (0, util_1.inspect)(instance.toJSON(), options);
200
+ };
201
+ return instance;
202
+ }
203
+ exports.InteractionTransferListInstance = InteractionTransferListInstance;
@@ -5,6 +5,7 @@ import Response from "../../../../http/response";
5
5
  import V1 from "../../V1";
6
6
  import { InteractionChannelInviteListInstance } from "./interactionChannel/interactionChannelInvite";
7
7
  import { InteractionChannelParticipantListInstance } from "./interactionChannel/interactionChannelParticipant";
8
+ import { InteractionTransferListInstance } from "./interactionChannel/interactionTransfer";
8
9
  export type InteractionChannelChannelStatus = "setup" | "active" | "failed" | "closed" | "inactive";
9
10
  export type InteractionChannelType = "voice" | "sms" | "email" | "web" | "whatsapp" | "chat" | "messenger" | "gbm";
10
11
  export type InteractionChannelUpdateChannelStatus = "closed" | "inactive";
@@ -53,6 +54,7 @@ export interface InteractionChannelListInstancePageOptions {
53
54
  export interface InteractionChannelContext {
54
55
  invites: InteractionChannelInviteListInstance;
55
56
  participants: InteractionChannelParticipantListInstance;
57
+ transfers: InteractionTransferListInstance;
56
58
  /**
57
59
  * Fetch a InteractionChannelInstance
58
60
  *
@@ -86,9 +88,11 @@ export declare class InteractionChannelContextImpl implements InteractionChannel
86
88
  protected _uri: string;
87
89
  protected _invites?: InteractionChannelInviteListInstance;
88
90
  protected _participants?: InteractionChannelParticipantListInstance;
91
+ protected _transfers?: InteractionTransferListInstance;
89
92
  constructor(_version: V1, interactionSid: string, sid: string);
90
93
  get invites(): InteractionChannelInviteListInstance;
91
94
  get participants(): InteractionChannelParticipantListInstance;
95
+ get transfers(): InteractionTransferListInstance;
92
96
  fetch(callback?: (error: Error | null, item?: InteractionChannelInstance) => any): Promise<InteractionChannelInstance>;
93
97
  update(params: InteractionChannelContextUpdateOptions, callback?: (error: Error | null, item?: InteractionChannelInstance) => any): Promise<InteractionChannelInstance>;
94
98
  /**
@@ -163,6 +167,10 @@ export declare class InteractionChannelInstance {
163
167
  * Access the participants.
164
168
  */
165
169
  participants(): InteractionChannelParticipantListInstance;
170
+ /**
171
+ * Access the transfers.
172
+ */
173
+ transfers(): InteractionTransferListInstance;
166
174
  /**
167
175
  * Provide a user-friendly representation
168
176
  *
@@ -24,6 +24,7 @@ const serialize = require("../../../../base/serialize");
24
24
  const utility_1 = require("../../../../base/utility");
25
25
  const interactionChannelInvite_1 = require("./interactionChannel/interactionChannelInvite");
26
26
  const interactionChannelParticipant_1 = require("./interactionChannel/interactionChannelParticipant");
27
+ const interactionTransfer_1 = require("./interactionChannel/interactionTransfer");
27
28
  class InteractionChannelContextImpl {
28
29
  constructor(_version, interactionSid, sid) {
29
30
  this._version = _version;
@@ -48,6 +49,12 @@ class InteractionChannelContextImpl {
48
49
  (0, interactionChannelParticipant_1.InteractionChannelParticipantListInstance)(this._version, this._solution.interactionSid, this._solution.sid);
49
50
  return this._participants;
50
51
  }
52
+ get transfers() {
53
+ this._transfers =
54
+ this._transfers ||
55
+ (0, interactionTransfer_1.InteractionTransferListInstance)(this._version, this._solution.interactionSid, this._solution.sid);
56
+ return this._transfers;
57
+ }
51
58
  fetch(callback) {
52
59
  const headers = {};
53
60
  headers["Accept"] = "application/json";
@@ -143,6 +150,12 @@ class InteractionChannelInstance {
143
150
  participants() {
144
151
  return this._proxy.participants;
145
152
  }
153
+ /**
154
+ * Access the transfers.
155
+ */
156
+ transfers() {
157
+ return this._proxy.transfers;
158
+ }
146
159
  /**
147
160
  * Provide a user-friendly representation
148
161
  *
@@ -2,7 +2,7 @@ import IamBase from "../IamBase";
2
2
  import Version from "../../base/Version";
3
3
  import { ApiKeyListInstance } from "./v1/apiKey";
4
4
  import { GetApiKeysListInstance } from "./v1/getApiKeys";
5
- import { NewApiKeyListInstance } from "./v1/newApiKey";
5
+ import { KeyListInstance } from "./v1/key";
6
6
  export default class V1 extends Version {
7
7
  /**
8
8
  * Initialize the V1 version of Iam
@@ -14,12 +14,12 @@ export default class V1 extends Version {
14
14
  protected _apiKey?: ApiKeyListInstance;
15
15
  /** getApiKeys - { Twilio.Iam.V1.GetApiKeysListInstance } resource */
16
16
  protected _getApiKeys?: GetApiKeysListInstance;
17
- /** newApiKey - { Twilio.Iam.V1.NewApiKeyListInstance } resource */
18
- protected _newApiKey?: NewApiKeyListInstance;
17
+ /** keys - { Twilio.Iam.V1.KeyListInstance } resource */
18
+ protected _keys?: KeyListInstance;
19
19
  /** Getter for apiKey resource */
20
20
  get apiKey(): ApiKeyListInstance;
21
21
  /** Getter for getApiKeys resource */
22
22
  get getApiKeys(): GetApiKeysListInstance;
23
- /** Getter for newApiKey resource */
24
- get newApiKey(): NewApiKeyListInstance;
23
+ /** Getter for keys resource */
24
+ get keys(): KeyListInstance;
25
25
  }
@@ -19,7 +19,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
19
19
  const Version_1 = __importDefault(require("../../base/Version"));
20
20
  const apiKey_1 = require("./v1/apiKey");
21
21
  const getApiKeys_1 = require("./v1/getApiKeys");
22
- const newApiKey_1 = require("./v1/newApiKey");
22
+ const key_1 = require("./v1/key");
23
23
  class V1 extends Version_1.default {
24
24
  /**
25
25
  * Initialize the V1 version of Iam
@@ -39,10 +39,10 @@ class V1 extends Version_1.default {
39
39
  this._getApiKeys = this._getApiKeys || (0, getApiKeys_1.GetApiKeysListInstance)(this);
40
40
  return this._getApiKeys;
41
41
  }
42
- /** Getter for newApiKey resource */
43
- get newApiKey() {
44
- this._newApiKey = this._newApiKey || (0, newApiKey_1.NewApiKeyListInstance)(this);
45
- return this._newApiKey;
42
+ /** Getter for keys resource */
43
+ get keys() {
44
+ this._keys = this._keys || (0, key_1.KeyListInstance)(this);
45
+ return this._keys;
46
46
  }
47
47
  }
48
48
  exports.default = V1;
@@ -1,43 +1,43 @@
1
1
  /// <reference types="node" />
2
2
  import { inspect, InspectOptions } from "util";
3
3
  import V1 from "../V1";
4
- export type NewApiKeyKeytype = "restricted";
4
+ export type KeyKeytype = "restricted";
5
5
  /**
6
- * Options to pass to create a NewApiKeyInstance
6
+ * Options to pass to create a KeyInstance
7
7
  */
8
- export interface NewApiKeyListInstanceCreateOptions {
8
+ export interface KeyListInstanceCreateOptions {
9
9
  /** The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource. */
10
10
  accountSid: string;
11
11
  /** A descriptive string that you create to describe the resource. It can be up to 64 characters long. */
12
12
  friendlyName?: string;
13
13
  /** */
14
- keyType?: NewApiKeyKeytype;
14
+ keyType?: KeyKeytype;
15
15
  /** The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys). */
16
16
  policy?: any;
17
17
  }
18
- export interface NewApiKeySolution {
18
+ export interface KeySolution {
19
19
  }
20
- export interface NewApiKeyListInstance {
20
+ export interface KeyListInstance {
21
21
  _version: V1;
22
- _solution: NewApiKeySolution;
22
+ _solution: KeySolution;
23
23
  _uri: string;
24
24
  /**
25
- * Create a NewApiKeyInstance
25
+ * Create a KeyInstance
26
26
  *
27
27
  * @param params - Parameter for request
28
28
  * @param callback - Callback to handle processed record
29
29
  *
30
- * @returns Resolves to processed NewApiKeyInstance
30
+ * @returns Resolves to processed KeyInstance
31
31
  */
32
- create(params: NewApiKeyListInstanceCreateOptions, callback?: (error: Error | null, item?: NewApiKeyInstance) => any): Promise<NewApiKeyInstance>;
32
+ create(params: KeyListInstanceCreateOptions, callback?: (error: Error | null, item?: KeyInstance) => any): Promise<KeyInstance>;
33
33
  /**
34
34
  * Provide a user-friendly representation
35
35
  */
36
36
  toJSON(): any;
37
37
  [inspect.custom](_depth: any, options: InspectOptions): any;
38
38
  }
39
- export declare function NewApiKeyListInstance(version: V1): NewApiKeyListInstance;
40
- interface NewApiKeyResource {
39
+ export declare function KeyListInstance(version: V1): KeyListInstance;
40
+ interface KeyResource {
41
41
  sid: string;
42
42
  friendly_name: string;
43
43
  date_created: Date;
@@ -45,9 +45,9 @@ interface NewApiKeyResource {
45
45
  secret: string;
46
46
  policy: any;
47
47
  }
48
- export declare class NewApiKeyInstance {
48
+ export declare class KeyInstance {
49
49
  protected _version: V1;
50
- constructor(_version: V1, payload: NewApiKeyResource);
50
+ constructor(_version: V1, payload: KeyResource);
51
51
  /**
52
52
  * The unique string that that we created to identify the NewKey resource. You will use this as the basic-auth `user` when authenticating to the API.
53
53
  */
@@ -13,11 +13,11 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.NewApiKeyInstance = exports.NewApiKeyListInstance = void 0;
16
+ exports.KeyInstance = exports.KeyListInstance = void 0;
17
17
  const util_1 = require("util");
18
18
  const deserialize = require("../../../base/deserialize");
19
19
  const serialize = require("../../../base/serialize");
20
- function NewApiKeyListInstance(version) {
20
+ function KeyListInstance(version) {
21
21
  const instance = {};
22
22
  instance._version = version;
23
23
  instance._solution = {};
@@ -46,7 +46,7 @@ function NewApiKeyListInstance(version) {
46
46
  data,
47
47
  headers,
48
48
  });
49
- operationPromise = operationPromise.then((payload) => new NewApiKeyInstance(operationVersion, payload));
49
+ operationPromise = operationPromise.then((payload) => new KeyInstance(operationVersion, payload));
50
50
  operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
51
51
  return operationPromise;
52
52
  };
@@ -58,8 +58,8 @@ function NewApiKeyListInstance(version) {
58
58
  };
59
59
  return instance;
60
60
  }
61
- exports.NewApiKeyListInstance = NewApiKeyListInstance;
62
- class NewApiKeyInstance {
61
+ exports.KeyListInstance = KeyListInstance;
62
+ class KeyInstance {
63
63
  constructor(_version, payload) {
64
64
  this._version = _version;
65
65
  this.sid = payload.sid;
@@ -88,4 +88,4 @@ class NewApiKeyInstance {
88
88
  return (0, util_1.inspect)(this.toJSON(), options);
89
89
  }
90
90
  }
91
- exports.NewApiKeyInstance = NewApiKeyInstance;
91
+ exports.KeyInstance = KeyInstance;
@@ -7,8 +7,8 @@ import { PortingPortInPhoneNumberListInstance } from "./v1/portingPortInPhoneNum
7
7
  import { PortingPortabilityListInstance } from "./v1/portingPortability";
8
8
  import { PortingWebhookConfigurationListInstance } from "./v1/portingWebhookConfiguration";
9
9
  import { PortingWebhookConfigurationDeleteListInstance } from "./v1/portingWebhookConfigurationDelete";
10
- import { PortingWebhookConfigurationFetchListInstance } from "./v1/portingWebhookConfigurationFetch";
11
10
  import { SigningRequestConfigurationListInstance } from "./v1/signingRequestConfiguration";
11
+ import { WebhookListInstance } from "./v1/webhook";
12
12
  export default class V1 extends Version {
13
13
  /**
14
14
  * Initialize the V1 version of Numbers
@@ -30,10 +30,10 @@ export default class V1 extends Version {
30
30
  protected _portingWebhookConfigurations?: PortingWebhookConfigurationListInstance;
31
31
  /** portingWebhookConfigurationsDelete - { Twilio.Numbers.V1.PortingWebhookConfigurationDeleteListInstance } resource */
32
32
  protected _portingWebhookConfigurationsDelete?: PortingWebhookConfigurationDeleteListInstance;
33
- /** portingWebhookConfigurationFetch - { Twilio.Numbers.V1.PortingWebhookConfigurationFetchListInstance } resource */
34
- protected _portingWebhookConfigurationFetch?: PortingWebhookConfigurationFetchListInstance;
35
33
  /** signingRequestConfigurations - { Twilio.Numbers.V1.SigningRequestConfigurationListInstance } resource */
36
34
  protected _signingRequestConfigurations?: SigningRequestConfigurationListInstance;
35
+ /** webhook - { Twilio.Numbers.V1.WebhookListInstance } resource */
36
+ protected _webhook?: WebhookListInstance;
37
37
  /** Getter for bulkEligibilities resource */
38
38
  get bulkEligibilities(): BulkEligibilityListInstance;
39
39
  /** Getter for eligibilities resource */
@@ -48,8 +48,8 @@ export default class V1 extends Version {
48
48
  get portingWebhookConfigurations(): PortingWebhookConfigurationListInstance;
49
49
  /** Getter for portingWebhookConfigurationsDelete resource */
50
50
  get portingWebhookConfigurationsDelete(): PortingWebhookConfigurationDeleteListInstance;
51
- /** Getter for portingWebhookConfigurationFetch resource */
52
- get portingWebhookConfigurationFetch(): PortingWebhookConfigurationFetchListInstance;
53
51
  /** Getter for signingRequestConfigurations resource */
54
52
  get signingRequestConfigurations(): SigningRequestConfigurationListInstance;
53
+ /** Getter for webhook resource */
54
+ get webhook(): WebhookListInstance;
55
55
  }
@@ -24,8 +24,8 @@ const portingPortInPhoneNumber_1 = require("./v1/portingPortInPhoneNumber");
24
24
  const portingPortability_1 = require("./v1/portingPortability");
25
25
  const portingWebhookConfiguration_1 = require("./v1/portingWebhookConfiguration");
26
26
  const portingWebhookConfigurationDelete_1 = require("./v1/portingWebhookConfigurationDelete");
27
- const portingWebhookConfigurationFetch_1 = require("./v1/portingWebhookConfigurationFetch");
28
27
  const signingRequestConfiguration_1 = require("./v1/signingRequestConfiguration");
28
+ const webhook_1 = require("./v1/webhook");
29
29
  class V1 extends Version_1.default {
30
30
  /**
31
31
  * Initialize the V1 version of Numbers
@@ -79,13 +79,6 @@ class V1 extends Version_1.default {
79
79
  (0, portingWebhookConfigurationDelete_1.PortingWebhookConfigurationDeleteListInstance)(this);
80
80
  return this._portingWebhookConfigurationsDelete;
81
81
  }
82
- /** Getter for portingWebhookConfigurationFetch resource */
83
- get portingWebhookConfigurationFetch() {
84
- this._portingWebhookConfigurationFetch =
85
- this._portingWebhookConfigurationFetch ||
86
- (0, portingWebhookConfigurationFetch_1.PortingWebhookConfigurationFetchListInstance)(this);
87
- return this._portingWebhookConfigurationFetch;
88
- }
89
82
  /** Getter for signingRequestConfigurations resource */
90
83
  get signingRequestConfigurations() {
91
84
  this._signingRequestConfigurations =
@@ -93,5 +86,10 @@ class V1 extends Version_1.default {
93
86
  (0, signingRequestConfiguration_1.SigningRequestConfigurationListInstance)(this);
94
87
  return this._signingRequestConfigurations;
95
88
  }
89
+ /** Getter for webhook resource */
90
+ get webhook() {
91
+ this._webhook = this._webhook || (0, webhook_1.WebhookListInstance)(this);
92
+ return this._webhook;
93
+ }
96
94
  }
97
95
  exports.default = V1;
@@ -1,28 +1,28 @@
1
1
  /// <reference types="node" />
2
2
  import { inspect, InspectOptions } from "util";
3
3
  import V1 from "../V1";
4
- export interface PortingWebhookConfigurationFetchSolution {
4
+ export interface WebhookSolution {
5
5
  }
6
- export interface PortingWebhookConfigurationFetchListInstance {
6
+ export interface WebhookListInstance {
7
7
  _version: V1;
8
- _solution: PortingWebhookConfigurationFetchSolution;
8
+ _solution: WebhookSolution;
9
9
  _uri: string;
10
10
  /**
11
- * Fetch a PortingWebhookConfigurationFetchInstance
11
+ * Fetch a WebhookInstance
12
12
  *
13
13
  * @param callback - Callback to handle processed record
14
14
  *
15
- * @returns Resolves to processed PortingWebhookConfigurationFetchInstance
15
+ * @returns Resolves to processed WebhookInstance
16
16
  */
17
- fetch(callback?: (error: Error | null, item?: PortingWebhookConfigurationFetchInstance) => any): Promise<PortingWebhookConfigurationFetchInstance>;
17
+ fetch(callback?: (error: Error | null, item?: WebhookInstance) => any): Promise<WebhookInstance>;
18
18
  /**
19
19
  * Provide a user-friendly representation
20
20
  */
21
21
  toJSON(): any;
22
22
  [inspect.custom](_depth: any, options: InspectOptions): any;
23
23
  }
24
- export declare function PortingWebhookConfigurationFetchListInstance(version: V1): PortingWebhookConfigurationFetchListInstance;
25
- interface PortingWebhookConfigurationFetchResource {
24
+ export declare function WebhookListInstance(version: V1): WebhookListInstance;
25
+ interface WebhookResource {
26
26
  url: string;
27
27
  port_in_target_url: string;
28
28
  port_out_target_url: string;
@@ -30,9 +30,9 @@ interface PortingWebhookConfigurationFetchResource {
30
30
  port_in_target_date_created: Date;
31
31
  port_out_target_date_created: Date;
32
32
  }
33
- export declare class PortingWebhookConfigurationFetchInstance {
33
+ export declare class WebhookInstance {
34
34
  protected _version: V1;
35
- constructor(_version: V1, payload: PortingWebhookConfigurationFetchResource);
35
+ constructor(_version: V1, payload: WebhookResource);
36
36
  /**
37
37
  * The URL of the webhook configuration request
38
38
  */
@@ -13,11 +13,11 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.PortingWebhookConfigurationFetchInstance = exports.PortingWebhookConfigurationFetchListInstance = void 0;
16
+ exports.WebhookInstance = exports.WebhookListInstance = void 0;
17
17
  const util_1 = require("util");
18
18
  const deserialize = require("../../../base/deserialize");
19
19
  const serialize = require("../../../base/serialize");
20
- function PortingWebhookConfigurationFetchListInstance(version) {
20
+ function WebhookListInstance(version) {
21
21
  const instance = {};
22
22
  instance._version = version;
23
23
  instance._solution = {};
@@ -30,7 +30,7 @@ function PortingWebhookConfigurationFetchListInstance(version) {
30
30
  method: "get",
31
31
  headers,
32
32
  });
33
- operationPromise = operationPromise.then((payload) => new PortingWebhookConfigurationFetchInstance(operationVersion, payload));
33
+ operationPromise = operationPromise.then((payload) => new WebhookInstance(operationVersion, payload));
34
34
  operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
35
35
  return operationPromise;
36
36
  };
@@ -42,8 +42,8 @@ function PortingWebhookConfigurationFetchListInstance(version) {
42
42
  };
43
43
  return instance;
44
44
  }
45
- exports.PortingWebhookConfigurationFetchListInstance = PortingWebhookConfigurationFetchListInstance;
46
- class PortingWebhookConfigurationFetchInstance {
45
+ exports.WebhookListInstance = WebhookListInstance;
46
+ class WebhookInstance {
47
47
  constructor(_version, payload) {
48
48
  this._version = _version;
49
49
  this.url = payload.url;
@@ -72,4 +72,4 @@ class PortingWebhookConfigurationFetchInstance {
72
72
  return (0, util_1.inspect)(this.toJSON(), options);
73
73
  }
74
74
  }
75
- exports.PortingWebhookConfigurationFetchInstance = PortingWebhookConfigurationFetchInstance;
75
+ exports.WebhookInstance = WebhookInstance;
@@ -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 SupportingDocumentStatus = "draft" | "pending-review" | "rejected" | "approved" | "expired" | "provisionally-approved";
6
+ export type SupportingDocumentStatus = "DRAFT" | "PENDING_REVIEW" | "REJECTED" | "APPROVED" | "EXPIRED" | "PROVISIONALLY_APPROVED";
7
7
  /**
8
8
  * Options to pass to update a SupportingDocumentInstance
9
9
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "twilio",
3
3
  "description": "A Twilio helper library",
4
- "version": "5.4.4",
4
+ "version": "5.4.5",
5
5
  "author": "API Team <api@twilio.com>",
6
6
  "contributors": [
7
7
  {