twilio 5.13.1 → 6.0.1

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 (151) hide show
  1. package/README.md +2 -4
  2. package/lib/rest/ConversationsBase.d.ts +3 -0
  3. package/lib/rest/ConversationsBase.js +5 -0
  4. package/lib/rest/InsightsBase.d.ts +3 -0
  5. package/lib/rest/InsightsBase.js +5 -0
  6. package/lib/rest/IntelligenceBase.d.ts +3 -0
  7. package/lib/rest/IntelligenceBase.js +5 -0
  8. package/lib/rest/KnowledgeBase.d.ts +3 -0
  9. package/lib/rest/KnowledgeBase.js +5 -0
  10. package/lib/rest/Memory.d.ts +4 -0
  11. package/lib/rest/Memory.js +8 -0
  12. package/lib/rest/MemoryBase.d.ts +13 -0
  13. package/lib/rest/MemoryBase.js +31 -0
  14. package/lib/rest/MessagingBase.d.ts +3 -0
  15. package/lib/rest/MessagingBase.js +5 -0
  16. package/lib/rest/Twilio.d.ts +5 -0
  17. package/lib/rest/Twilio.js +5 -0
  18. package/lib/rest/VoiceBase.d.ts +3 -0
  19. package/lib/rest/VoiceBase.js +5 -0
  20. package/lib/rest/api/v2010/account/call/recording.d.ts +2 -0
  21. package/lib/rest/api/v2010/account/call/recording.js +4 -0
  22. package/lib/rest/api/v2010/account/call/transcription.d.ts +2 -0
  23. package/lib/rest/api/v2010/account/call/transcription.js +6 -0
  24. package/lib/rest/api/v2010/account/call.d.ts +2 -0
  25. package/lib/rest/api/v2010/account/call.js +4 -0
  26. package/lib/rest/api/v2010/account/conference/participant.d.ts +2 -0
  27. package/lib/rest/api/v2010/account/conference/participant.js +4 -0
  28. package/lib/rest/api/v2010/account/message.d.ts +2 -0
  29. package/lib/rest/api/v2010/account/message.js +4 -0
  30. package/lib/rest/conversations/V2.d.ts +35 -0
  31. package/lib/rest/conversations/V2.js +67 -0
  32. package/lib/rest/conversations/v2/communication.d.ts +479 -0
  33. package/lib/rest/conversations/v2/communication.js +436 -0
  34. package/lib/rest/conversations/v2/configuration.d.ts +906 -0
  35. package/lib/rest/conversations/v2/configuration.js +619 -0
  36. package/lib/rest/conversations/v2/conversation.d.ts +936 -0
  37. package/lib/rest/conversations/v2/conversation.js +664 -0
  38. package/lib/rest/conversations/v2/operation.d.ts +167 -0
  39. package/lib/rest/conversations/v2/operation.js +170 -0
  40. package/lib/rest/conversations/v2/participant.d.ts +469 -0
  41. package/lib/rest/conversations/v2/participant.js +442 -0
  42. package/lib/rest/flexApi/V1.d.ts +0 -5
  43. package/lib/rest/flexApi/V1.js +0 -7
  44. package/lib/rest/flexApi/v1/plugin/pluginVersions.d.ts +1 -1
  45. package/lib/rest/flexApi/v1/plugin/pluginVersions.js +8 -6
  46. package/lib/rest/iam/V1.d.ts +3 -0
  47. package/lib/rest/iam/V1.js +5 -0
  48. package/lib/rest/iam/v1/rolePermission.d.ts +225 -0
  49. package/lib/rest/iam/v1/rolePermission.js +181 -0
  50. package/lib/rest/insights/V3.d.ts +20 -0
  51. package/lib/rest/insights/V3.js +42 -0
  52. package/lib/rest/insights/v1/call/callSummary.d.ts +10 -10
  53. package/lib/rest/insights/v1/call/event.d.ts +4 -4
  54. package/lib/rest/insights/v1/callSummaries.d.ts +12 -9
  55. package/lib/rest/insights/v2/inbound.d.ts +8 -8
  56. package/lib/rest/insights/v2/inbound.js +4 -4
  57. package/lib/rest/insights/v2/outbound.d.ts +8 -8
  58. package/lib/rest/insights/v2/outbound.js +4 -4
  59. package/lib/rest/insights/v2/report.d.ts +8 -8
  60. package/lib/rest/insights/v2/report.js +4 -4
  61. package/lib/rest/insights/v3/metadata.d.ts +115 -0
  62. package/lib/rest/insights/v3/metadata.js +118 -0
  63. package/lib/rest/insights/v3/query.d.ts +180 -0
  64. package/lib/rest/insights/v3/query.js +214 -0
  65. package/lib/rest/intelligence/V3.d.ts +35 -0
  66. package/lib/rest/intelligence/V3.js +65 -0
  67. package/lib/rest/intelligence/v3/configuration.d.ts +693 -0
  68. package/lib/rest/intelligence/v3/configuration.js +528 -0
  69. package/lib/rest/intelligence/v3/conversation.d.ts +478 -0
  70. package/lib/rest/intelligence/v3/conversation.js +342 -0
  71. package/lib/rest/intelligence/v3/operator.d.ts +619 -0
  72. package/lib/rest/intelligence/v3/operator.js +493 -0
  73. package/lib/rest/intelligence/v3/operatorResult.d.ts +543 -0
  74. package/lib/rest/intelligence/v3/operatorResult.js +478 -0
  75. package/lib/rest/intelligence/v3/version.d.ts +469 -0
  76. package/lib/rest/intelligence/v3/version.js +341 -0
  77. package/lib/rest/knowledge/V2.d.ts +31 -0
  78. package/lib/rest/knowledge/V2.js +62 -0
  79. package/lib/rest/knowledge/v2/chunk.d.ts +209 -0
  80. package/lib/rest/knowledge/v2/chunk.js +178 -0
  81. package/lib/rest/knowledge/v2/knowledge.d.ts +507 -0
  82. package/lib/rest/knowledge/v2/knowledge.js +466 -0
  83. package/lib/rest/knowledge/v2/knowledgeBasis.d.ts +484 -0
  84. package/lib/rest/knowledge/v2/knowledgeBasis.js +441 -0
  85. package/lib/rest/knowledge/v2/operation.d.ts +162 -0
  86. package/lib/rest/knowledge/v2/operation.js +175 -0
  87. package/lib/rest/knowledge/v2/search.d.ts +180 -0
  88. package/lib/rest/{flexApi/v1/createFlexInstance.js → knowledge/v2/search.js} +45 -36
  89. package/lib/rest/memory/V1.d.ts +76 -0
  90. package/lib/rest/memory/V1.js +140 -0
  91. package/lib/rest/memory/v1/bulk.d.ts +129 -0
  92. package/lib/rest/memory/v1/bulk.js +158 -0
  93. package/lib/rest/memory/v1/conversationSummary.d.ts +531 -0
  94. package/lib/rest/memory/v1/conversationSummary.js +473 -0
  95. package/lib/rest/memory/v1/dataMapping.d.ts +630 -0
  96. package/lib/rest/memory/v1/dataMapping.js +512 -0
  97. package/lib/rest/memory/v1/event.d.ts +153 -0
  98. package/lib/rest/memory/v1/event.js +159 -0
  99. package/lib/rest/memory/v1/identifier.d.ts +362 -0
  100. package/lib/rest/memory/v1/identifier.js +369 -0
  101. package/lib/rest/memory/v1/identityResolutionSetting.d.ts +247 -0
  102. package/lib/rest/memory/v1/identityResolutionSetting.js +229 -0
  103. package/lib/rest/memory/v1/import.d.ts +292 -0
  104. package/lib/rest/memory/v1/import.js +280 -0
  105. package/lib/rest/memory/v1/lookup.d.ts +82 -0
  106. package/lib/rest/memory/v1/lookup.js +118 -0
  107. package/lib/rest/memory/v1/observation.d.ts +521 -0
  108. package/lib/rest/memory/v1/observation.js +477 -0
  109. package/lib/rest/memory/v1/operation.d.ts +162 -0
  110. package/lib/rest/memory/v1/operation.js +175 -0
  111. package/lib/rest/memory/v1/profile.d.ts +441 -0
  112. package/lib/rest/memory/v1/profile.js +467 -0
  113. package/lib/rest/memory/v1/recall.d.ts +306 -0
  114. package/lib/rest/memory/v1/recall.js +234 -0
  115. package/lib/rest/memory/v1/revision.d.ts +246 -0
  116. package/lib/rest/memory/v1/revision.js +195 -0
  117. package/lib/rest/memory/v1/store.d.ts +503 -0
  118. package/lib/rest/memory/v1/store.js +482 -0
  119. package/lib/rest/memory/v1/trait.d.ts +233 -0
  120. package/lib/rest/memory/v1/trait.js +190 -0
  121. package/lib/rest/memory/v1/traitGroup.d.ts +758 -0
  122. package/lib/rest/memory/v1/traitGroup.js +555 -0
  123. package/lib/rest/messaging/V3.d.ts +15 -0
  124. package/lib/rest/messaging/V3.js +37 -0
  125. package/lib/rest/messaging/v2/channelsSender.d.ts +9 -1
  126. package/lib/rest/messaging/v2/channelsSender.js +2 -0
  127. package/lib/rest/messaging/v3/typingIndicator.d.ts +90 -0
  128. package/lib/rest/messaging/v3/typingIndicator.js +114 -0
  129. package/lib/rest/numbers/v3/hostedNumberOrder.d.ts +1 -1
  130. package/lib/rest/numbers/v3/hostedNumberOrder.js +2 -1
  131. package/lib/rest/previewIam/versionless/organization/roleAssignment.d.ts +32 -0
  132. package/lib/rest/previewIam/versionless/organization/roleAssignment.js +14 -0
  133. package/lib/rest/studio/v2/flow/execution.d.ts +12 -0
  134. package/lib/rest/studio/v2/flow/execution.js +6 -0
  135. package/lib/rest/studio/v2/flow.d.ts +4 -0
  136. package/lib/rest/studio/v2/flow.js +8 -0
  137. package/lib/rest/verify/v2/service/approveChallenge.d.ts +6 -6
  138. package/lib/rest/verify/v2/service/approveChallenge.js +2 -2
  139. package/lib/rest/verify/v2/service/newChallenge.d.ts +6 -6
  140. package/lib/rest/verify/v2/service/newChallenge.js +2 -2
  141. package/lib/rest/verify/v2/service/verification.d.ts +1 -1
  142. package/lib/rest/verify/v2/service/webhook.d.ts +2 -2
  143. package/lib/rest/verify/v2/service/webhook.js +8 -8
  144. package/lib/rest/video/v1/room.d.ts +4 -1
  145. package/lib/rest/voice/V3.d.ts +15 -0
  146. package/lib/rest/voice/V3.js +37 -0
  147. package/lib/rest/voice/v3/transcription.d.ts +378 -0
  148. package/lib/rest/voice/v3/transcription.js +264 -0
  149. package/lib/twiml/VoiceResponse.d.ts +18 -0
  150. package/package.json +2 -2
  151. package/lib/rest/flexApi/v1/createFlexInstance.d.ts +0 -165
@@ -0,0 +1,225 @@
1
+ import { inspect, InspectOptions } from "util";
2
+ import Page, { TwilioResponsePayload } from "../../../base/Page";
3
+ import Response from "../../../http/response";
4
+ import V1 from "../V1";
5
+ import { ApiResponse } from "../../../base/ApiResponse";
6
+ /**
7
+ * Options to pass to each
8
+ */
9
+ export interface RolePermissionListInstanceEachOptions {
10
+ /** How many resources to return in each list page. The default is 50, and the maximum is 100. */
11
+ pageSize?: number;
12
+ /** Function to process each record. If this and a positional callback are passed, this one will be used */
13
+ callback?: (item: RolePermissionInstance, done: (err?: Error) => void) => void;
14
+ /** Function to be called upon completion of streaming */
15
+ done?: Function;
16
+ /** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
17
+ limit?: number;
18
+ }
19
+ /**
20
+ * Options to pass to list
21
+ */
22
+ export interface RolePermissionListInstanceOptions {
23
+ /** How many resources to return in each list page. The default is 50, and the maximum is 100. */
24
+ pageSize?: number;
25
+ /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
26
+ limit?: number;
27
+ }
28
+ /**
29
+ * Options to pass to page
30
+ */
31
+ export interface RolePermissionListInstancePageOptions {
32
+ /** How many resources to return in each list page. The default is 50, and the maximum is 100. */
33
+ pageSize?: number;
34
+ /** Page Number, this value is simply for client state */
35
+ pageNumber?: number;
36
+ /** PageToken provided by the API */
37
+ pageToken?: string;
38
+ }
39
+ export interface RolePermissionSolution {
40
+ roleSid: string;
41
+ }
42
+ export interface RolePermissionListInstance {
43
+ _version: V1;
44
+ _solution: RolePermissionSolution;
45
+ _uri: string;
46
+ /**
47
+ * Streams RolePermissionInstance records from the API.
48
+ *
49
+ * This operation lazily loads records as efficiently as possible until the limit
50
+ * is reached.
51
+ *
52
+ * The results are passed into the callback function, so this operation is memory
53
+ * efficient.
54
+ *
55
+ * If a function is passed as the first argument, it will be used as the callback
56
+ * function.
57
+ *
58
+ * @param { RolePermissionListInstanceEachOptions } [params] - Options for request
59
+ * @param { function } [callback] - Function to process each record
60
+ */
61
+ each(callback?: (item: RolePermissionInstance, done: (err?: Error) => void) => void): void;
62
+ each(params: RolePermissionListInstanceEachOptions, callback?: (item: RolePermissionInstance, done: (err?: Error) => void) => void): void;
63
+ /**
64
+ * Streams RolePermissionInstance records from the API with HTTP metadata captured per page.
65
+ *
66
+ * This operation lazily loads records as efficiently as possible until the limit
67
+ * is reached. HTTP metadata (status code, headers) is captured for each page request.
68
+ *
69
+ * The results are passed into the callback function, so this operation is memory
70
+ * efficient.
71
+ *
72
+ * If a function is passed as the first argument, it will be used as the callback
73
+ * function.
74
+ *
75
+ * @param { RolePermissionListInstanceEachOptions } [params] - Options for request
76
+ * @param { function } [callback] - Function to process each record
77
+ */
78
+ eachWithHttpInfo(callback?: (item: RolePermissionInstance, done: (err?: Error) => void) => void): void;
79
+ eachWithHttpInfo(params: RolePermissionListInstanceEachOptions, callback?: (item: RolePermissionInstance, done: (err?: Error) => void) => void): void;
80
+ /**
81
+ * Retrieve a single target page of RolePermissionInstance records from the API.
82
+ *
83
+ * The request is executed immediately.
84
+ *
85
+ * @param { string } [targetUrl] - API-generated URL for the requested results page
86
+ * @param { function } [callback] - Callback to handle list of records
87
+ */
88
+ getPage(targetUrl: string, callback?: (error: Error | null, items: RolePermissionPage) => any): Promise<RolePermissionPage>;
89
+ /**
90
+ * Retrieve a single target page of RolePermissionInstance records from the API with HTTP metadata.
91
+ *
92
+ * The request is executed immediately.
93
+ *
94
+ * @param { string } [targetUrl] - API-generated URL for the requested results page
95
+ * @param { function } [callback] - Callback to handle list of records with metadata
96
+ */
97
+ getPageWithHttpInfo(targetUrl: string, callback?: (error: Error | null, items: ApiResponse<RolePermissionPage>) => any): Promise<ApiResponse<RolePermissionPage>>;
98
+ /**
99
+ * Lists RolePermissionInstance records from the API as a list.
100
+ *
101
+ * If a function is passed as the first argument, it will be used as the callback
102
+ * function.
103
+ *
104
+ * @param { RolePermissionListInstanceOptions } [params] - Options for request
105
+ * @param { function } [callback] - Callback to handle list of records
106
+ */
107
+ list(callback?: (error: Error | null, items: RolePermissionInstance[]) => any): Promise<RolePermissionInstance[]>;
108
+ list(params: RolePermissionListInstanceOptions, callback?: (error: Error | null, items: RolePermissionInstance[]) => any): Promise<RolePermissionInstance[]>;
109
+ /**
110
+ * Lists RolePermissionInstance records from the API as a list with HTTP metadata.
111
+ *
112
+ * Returns all records along with HTTP metadata from the first page fetched.
113
+ *
114
+ * If a function is passed as the first argument, it will be used as the callback
115
+ * function.
116
+ *
117
+ * @param { RolePermissionListInstanceOptions } [params] - Options for request
118
+ * @param { function } [callback] - Callback to handle list of records with metadata
119
+ */
120
+ listWithHttpInfo(callback?: (error: Error | null, items: ApiResponse<RolePermissionInstance[]>) => any): Promise<ApiResponse<RolePermissionInstance[]>>;
121
+ listWithHttpInfo(params: RolePermissionListInstanceOptions, callback?: (error: Error | null, items: ApiResponse<RolePermissionInstance[]>) => any): Promise<ApiResponse<RolePermissionInstance[]>>;
122
+ /**
123
+ * Retrieve a single page of RolePermissionInstance records from the API.
124
+ *
125
+ * The request is executed immediately.
126
+ *
127
+ * If a function is passed as the first argument, it will be used as the callback
128
+ * function.
129
+ *
130
+ * @param { RolePermissionListInstancePageOptions } [params] - Options for request
131
+ * @param { function } [callback] - Callback to handle list of records
132
+ */
133
+ page(callback?: (error: Error | null, items: RolePermissionPage) => any): Promise<RolePermissionPage>;
134
+ page(params: RolePermissionListInstancePageOptions, callback?: (error: Error | null, items: RolePermissionPage) => any): Promise<RolePermissionPage>;
135
+ /**
136
+ * Retrieve a single page of RolePermissionInstance records from the API with HTTP metadata.
137
+ *
138
+ * The request is executed immediately.
139
+ *
140
+ * If a function is passed as the first argument, it will be used as the callback
141
+ * function.
142
+ *
143
+ * @param { RolePermissionListInstancePageOptions } [params] - Options for request
144
+ * @param { function } [callback] - Callback to handle list of records with metadata
145
+ */
146
+ pageWithHttpInfo(callback?: (error: Error | null, items: ApiResponse<RolePermissionPage>) => any): Promise<ApiResponse<RolePermissionPage>>;
147
+ pageWithHttpInfo(params: RolePermissionListInstancePageOptions, callback?: (error: Error | null, items: ApiResponse<RolePermissionPage>) => any): Promise<ApiResponse<RolePermissionPage>>;
148
+ /**
149
+ * Provide a user-friendly representation
150
+ */
151
+ toJSON(): any;
152
+ [inspect.custom](_depth: any, options: InspectOptions): any;
153
+ }
154
+ export declare function RolePermissionListInstance(version: V1, roleSid: string): RolePermissionListInstance;
155
+ interface RolePermissionPayload extends TwilioResponsePayload {
156
+ permissions: RolePermissionResource[];
157
+ }
158
+ interface RolePermissionResource {
159
+ sid: string;
160
+ namespace: string;
161
+ product: string;
162
+ resource: string;
163
+ action: string;
164
+ externalDescription: string;
165
+ }
166
+ export declare class RolePermissionInstance {
167
+ protected _version: V1;
168
+ constructor(_version: V1, payload: RolePermissionResource, roleSid?: string);
169
+ /**
170
+ * The unique string that identifies the Permission resource.
171
+ */
172
+ sid: string;
173
+ /**
174
+ * The namespace of the permission (e.g., twilio).
175
+ */
176
+ namespace: string;
177
+ /**
178
+ * The product the permission belongs to (e.g., iam).
179
+ */
180
+ product: string;
181
+ /**
182
+ * The resource the permission applies to (e.g., roles).
183
+ */
184
+ resource: string;
185
+ /**
186
+ * The action granted by the permission (e.g., read).
187
+ */
188
+ action: string;
189
+ /**
190
+ * The external description of the permission.
191
+ */
192
+ externalDescription: string;
193
+ /**
194
+ * Provide a user-friendly representation
195
+ *
196
+ * @returns Object
197
+ */
198
+ toJSON(): {
199
+ sid: string;
200
+ namespace: string;
201
+ product: string;
202
+ resource: string;
203
+ action: string;
204
+ externalDescription: string;
205
+ };
206
+ [inspect.custom](_depth: any, options: InspectOptions): string;
207
+ }
208
+ export declare class RolePermissionPage extends Page<V1, RolePermissionPayload, RolePermissionResource, RolePermissionInstance> {
209
+ /**
210
+ * Initialize the RolePermissionPage
211
+ *
212
+ * @param version - Version of the resource
213
+ * @param response - Response from the API
214
+ * @param solution - Path solution
215
+ */
216
+ constructor(version: V1, response: Response<string>, solution: RolePermissionSolution);
217
+ /**
218
+ * Build an instance of RolePermissionInstance
219
+ *
220
+ * @param payload - Payload response from the API
221
+ */
222
+ getInstance(payload: RolePermissionResource): RolePermissionInstance;
223
+ [inspect.custom](depth: any, options: InspectOptions): string;
224
+ }
225
+ export {};
@@ -0,0 +1,181 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio - Iam
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.RolePermissionPage = exports.RolePermissionInstance = void 0;
20
+ exports.RolePermissionListInstance = RolePermissionListInstance;
21
+ const util_1 = require("util");
22
+ const Page_1 = __importDefault(require("../../../base/Page"));
23
+ const deserialize = require("../../../base/deserialize");
24
+ const serialize = require("../../../base/serialize");
25
+ const utility_1 = require("../../../base/utility");
26
+ function RolePermissionListInstance(version, roleSid) {
27
+ if (!(0, utility_1.isValidPathParam)(roleSid)) {
28
+ throw new Error("Parameter 'roleSid' is not valid.");
29
+ }
30
+ const instance = {};
31
+ instance._version = version;
32
+ instance._solution = { roleSid };
33
+ instance._uri = `/Roles/${roleSid}/Permissions`;
34
+ instance.page = function page(params, callback) {
35
+ if (params instanceof Function) {
36
+ callback = params;
37
+ params = {};
38
+ }
39
+ else {
40
+ params = params || {};
41
+ }
42
+ let data = {};
43
+ if (params["pageSize"] !== undefined)
44
+ data["PageSize"] = params["pageSize"];
45
+ if (params.pageNumber !== undefined)
46
+ data["Page"] = params.pageNumber;
47
+ if (params.pageToken !== undefined)
48
+ data["PageToken"] = params.pageToken;
49
+ const headers = {};
50
+ headers["Accept"] = "application/json";
51
+ let operationVersion = version, operationPromise = operationVersion.page({
52
+ uri: instance._uri,
53
+ method: "get",
54
+ params: data,
55
+ headers,
56
+ });
57
+ operationPromise = operationPromise.then((payload) => new RolePermissionPage(operationVersion, payload, instance._solution));
58
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
59
+ return operationPromise;
60
+ };
61
+ instance.each = instance._version.each;
62
+ instance.list = instance._version.list;
63
+ instance.getPage = function getPage(targetUrl, callback) {
64
+ const operationPromise = instance._version._domain.twilio.request({
65
+ method: "get",
66
+ uri: targetUrl,
67
+ });
68
+ let pagePromise = operationPromise.then((payload) => new RolePermissionPage(instance._version, payload, instance._solution));
69
+ pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
70
+ return pagePromise;
71
+ };
72
+ instance.pageWithHttpInfo = function pageWithHttpInfo(params, callback) {
73
+ if (params instanceof Function) {
74
+ callback = params;
75
+ params = {};
76
+ }
77
+ else {
78
+ params = params || {};
79
+ }
80
+ let data = {};
81
+ if (params["pageSize"] !== undefined)
82
+ data["PageSize"] = params["pageSize"];
83
+ if (params.pageNumber !== undefined)
84
+ data["Page"] = params.pageNumber;
85
+ if (params.pageToken !== undefined)
86
+ data["PageToken"] = params.pageToken;
87
+ const headers = {};
88
+ headers["Accept"] = "application/json";
89
+ let operationVersion = version;
90
+ // For page operations, use page() directly as it already returns { statusCode, body, headers }
91
+ // IMPORTANT: Pass full response to Page constructor, not response.body
92
+ let operationPromise = operationVersion
93
+ .page({ uri: instance._uri, method: "get", params: data, headers })
94
+ .then((response) => ({
95
+ statusCode: response.statusCode,
96
+ headers: response.headers,
97
+ body: new RolePermissionPage(operationVersion, response, instance._solution),
98
+ }));
99
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
100
+ return operationPromise;
101
+ };
102
+ instance.each = instance._version.each;
103
+ instance.eachWithHttpInfo = instance._version.eachWithHttpInfo;
104
+ instance.list = instance._version.list;
105
+ instance.listWithHttpInfo = instance._version.listWithHttpInfo;
106
+ instance.getPageWithHttpInfo = function getPageWithHttpInfo(targetUrl, callback) {
107
+ // Use request() directly as it already returns { statusCode, body, headers }
108
+ const operationPromise = instance._version._domain.twilio.request({
109
+ method: "get",
110
+ uri: targetUrl,
111
+ });
112
+ let pagePromise = operationPromise.then((response) => ({
113
+ statusCode: response.statusCode,
114
+ headers: response.headers,
115
+ body: new RolePermissionPage(instance._version, response, instance._solution),
116
+ }));
117
+ pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
118
+ return pagePromise;
119
+ };
120
+ instance.toJSON = function toJSON() {
121
+ return instance._solution;
122
+ };
123
+ instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
124
+ return (0, util_1.inspect)(instance.toJSON(), options);
125
+ };
126
+ return instance;
127
+ }
128
+ class RolePermissionInstance {
129
+ constructor(_version, payload, roleSid) {
130
+ this._version = _version;
131
+ this.sid = payload.sid;
132
+ this.namespace = payload.namespace;
133
+ this.product = payload.product;
134
+ this.resource = payload.resource;
135
+ this.action = payload.action;
136
+ this.externalDescription = payload.externalDescription;
137
+ }
138
+ /**
139
+ * Provide a user-friendly representation
140
+ *
141
+ * @returns Object
142
+ */
143
+ toJSON() {
144
+ return {
145
+ sid: this.sid,
146
+ namespace: this.namespace,
147
+ product: this.product,
148
+ resource: this.resource,
149
+ action: this.action,
150
+ externalDescription: this.externalDescription,
151
+ };
152
+ }
153
+ [util_1.inspect.custom](_depth, options) {
154
+ return (0, util_1.inspect)(this.toJSON(), options);
155
+ }
156
+ }
157
+ exports.RolePermissionInstance = RolePermissionInstance;
158
+ class RolePermissionPage extends Page_1.default {
159
+ /**
160
+ * Initialize the RolePermissionPage
161
+ *
162
+ * @param version - Version of the resource
163
+ * @param response - Response from the API
164
+ * @param solution - Path solution
165
+ */
166
+ constructor(version, response, solution) {
167
+ super(version, response, solution);
168
+ }
169
+ /**
170
+ * Build an instance of RolePermissionInstance
171
+ *
172
+ * @param payload - Payload response from the API
173
+ */
174
+ getInstance(payload) {
175
+ return new RolePermissionInstance(this._version, payload, this._solution.roleSid);
176
+ }
177
+ [util_1.inspect.custom](depth, options) {
178
+ return (0, util_1.inspect)(this.toJSON(), options);
179
+ }
180
+ }
181
+ exports.RolePermissionPage = RolePermissionPage;
@@ -0,0 +1,20 @@
1
+ import InsightsBase from "../InsightsBase";
2
+ import Version from "../../base/Version";
3
+ import { MetadataListInstance } from "./v3/metadata";
4
+ import { QueryListInstance } from "./v3/query";
5
+ export default class V3 extends Version {
6
+ /**
7
+ * Initialize the V3 version of Insights
8
+ *
9
+ * @param domain - The Twilio (Twilio.Insights) domain
10
+ */
11
+ constructor(domain: InsightsBase);
12
+ /** metadata - { Twilio.Insights.V3.MetadataListInstance } resource */
13
+ protected _metadata?: MetadataListInstance;
14
+ /** query - { Twilio.Insights.V3.QueryListInstance } resource */
15
+ protected _query?: QueryListInstance;
16
+ /** Getter for metadata resource */
17
+ get metadata(): MetadataListInstance;
18
+ /** Getter for query resource */
19
+ get query(): QueryListInstance;
20
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio - Insights
9
+ * Insights Domain V3 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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ const Version_1 = __importDefault(require("../../base/Version"));
20
+ const metadata_1 = require("./v3/metadata");
21
+ const query_1 = require("./v3/query");
22
+ class V3 extends Version_1.default {
23
+ /**
24
+ * Initialize the V3 version of Insights
25
+ *
26
+ * @param domain - The Twilio (Twilio.Insights) domain
27
+ */
28
+ constructor(domain) {
29
+ super(domain, "v3");
30
+ }
31
+ /** Getter for metadata resource */
32
+ get metadata() {
33
+ this._metadata = this._metadata || (0, metadata_1.MetadataListInstance)(this);
34
+ return this._metadata;
35
+ }
36
+ /** Getter for query resource */
37
+ get query() {
38
+ this._query = this._query || (0, query_1.QueryListInstance)(this);
39
+ return this._query;
40
+ }
41
+ }
42
+ exports.default = V3;
@@ -134,27 +134,27 @@ export declare class CallSummaryInstance {
134
134
  */
135
135
  connectDuration: number;
136
136
  /**
137
- * The calling party.
137
+ * `object` The calling party. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#tofrom-object) for the object properties.
138
138
  */
139
139
  from: any;
140
140
  /**
141
- * The called party.
141
+ * `object` The called party. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#tofrom-object) for the object properties.
142
142
  */
143
143
  to: any;
144
144
  /**
145
- * Contains metrics and properties for the Twilio media gateway of a PSTN call.
145
+ * `object` Contains metrics and properties for the Twilio media gateway of a PSTN call. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#edges-and-their-properties) for the object properties.
146
146
  */
147
147
  carrierEdge: any;
148
148
  /**
149
- * Contains metrics and properties for the Twilio media gateway of a Client call.
149
+ * `object` Contains metrics and properties for the Twilio media gateway of a Client call. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#edges-and-their-properties) for the object properties.
150
150
  */
151
151
  clientEdge: any;
152
152
  /**
153
- * Contains metrics and properties for the SDK sensor library for Client calls.
153
+ * `object` Contains metrics and properties for the SDK sensor library for Client calls. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#edges-and-their-properties) for the object properties.
154
154
  */
155
155
  sdkEdge: any;
156
156
  /**
157
- * Contains metrics and properties for the Twilio media gateway of a SIP Interface or Trunking call.
157
+ * `object` Contains metrics and properties for the Twilio media gateway of a SIP Interface or Trunking call. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#edges-and-their-properties) for the object properties.
158
158
  */
159
159
  sipEdge: any;
160
160
  /**
@@ -166,19 +166,19 @@ export declare class CallSummaryInstance {
166
166
  */
167
167
  url: string;
168
168
  /**
169
- * Attributes capturing call-flow-specific details.
169
+ * `object` Attributes capturing call-flow-specific details. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#attributes-object) for the object properties.
170
170
  */
171
171
  attributes: any;
172
172
  /**
173
- * Contains edge-agnostic call-level details.
173
+ * `object` Contains edge-agnostic call-level details. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#properties-object) for the object properties.
174
174
  */
175
175
  properties: any;
176
176
  /**
177
- * Contains trusted communications details including Branded Call and verified caller ID.
177
+ * `object` Contains trusted communications details including Branded Call and verified caller ID. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#trust-object) for the object properties.
178
178
  */
179
179
  trust: any;
180
180
  /**
181
- * Programmatically labeled annotations for the Call. Developers can update the Call Summary records with Annotation during or after a Call. Annotations can be updated as long as the Call Summary record is addressable via the API.
181
+ * `object` Programmatically labeled annotations for the Call. Developers can update the Call Summary records with Annotation during or after a Call. Annotations can be updated as long as the Call Summary record is addressable via the API. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#annotation-object) for the object properties.
182
182
  */
183
183
  annotation: any;
184
184
  private get _proxy();
@@ -202,19 +202,19 @@ export declare class EventInstance {
202
202
  */
203
203
  name: string;
204
204
  /**
205
- * Represents the connection between Twilio and our immediate carrier partners. The events here describe the call lifecycle as reported by Twilio\'s carrier media gateways.
205
+ * `object` Represents the connection between Twilio and our immediate carrier partners. The events here describe the call lifecycle as reported by Twilio\'s carrier media gateways. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#edges-and-their-properties) for the object properties.
206
206
  */
207
207
  carrierEdge: any;
208
208
  /**
209
- * Represents the Twilio media gateway for SIP interface and SIP trunking calls. The events here describe the call lifecycle as reported by Twilio\'s public media gateways.
209
+ * `object` Represents the Twilio media gateway for SIP interface and SIP trunking calls. The events here describe the call lifecycle as reported by Twilio\'s public media gateways. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#edges-and-their-properties) for the object properties.
210
210
  */
211
211
  sipEdge: any;
212
212
  /**
213
- * Represents the Voice SDK running locally in the browser or in the Android/iOS application. The events here are emitted by the Voice SDK in response to certain call progress events, network changes, or call quality conditions.
213
+ * `object` Represents the Voice SDK running locally in the browser or in the Android/iOS application. The events here are emitted by the Voice SDK in response to certain call progress events, network changes, or call quality conditions. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#edges-and-their-properties) for the object properties.
214
214
  */
215
215
  sdkEdge: any;
216
216
  /**
217
- * Represents the Twilio media gateway for Client calls. The events here describe the call lifecycle as reported by Twilio\'s Voice SDK media gateways.
217
+ * `object` Represents the Twilio media gateway for Client calls. The events here describe the call lifecycle as reported by Twilio\'s Voice SDK media gateways. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#edges-and-their-properties) for the object properties.
218
218
  */
219
219
  clientEdge: any;
220
220
  /**
@@ -437,27 +437,27 @@ export declare class CallSummariesInstance {
437
437
  */
438
438
  connectDuration: number;
439
439
  /**
440
- * The calling party.
440
+ * `object` The calling party. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#tofrom-object) for the object properties.
441
441
  */
442
442
  from: any;
443
443
  /**
444
- * The called party.
444
+ * `object` The called party. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#tofrom-object) for the object properties.
445
445
  */
446
446
  to: any;
447
447
  /**
448
- * Contains metrics and properties for the Twilio media gateway of a PSTN call.
448
+ * `object` Contains metrics and properties for the Twilio media gateway of a PSTN call. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#edges-and-their-properties) for the object properties.
449
449
  */
450
450
  carrierEdge: any;
451
451
  /**
452
- * Contains metrics and properties for the Twilio media gateway of a Client call.
452
+ * `object` Contains metrics and properties for the Twilio media gateway of a Client call. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#edges-and-their-properties) for the object properties.
453
453
  */
454
454
  clientEdge: any;
455
455
  /**
456
- * Contains metrics and properties for the SDK sensor library for Client calls.
456
+ * `object` Contains metrics and properties for the SDK sensor library for Client calls. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#edges-and-their-properties) for the object properties.
457
457
  */
458
458
  sdkEdge: any;
459
459
  /**
460
- * Contains metrics and properties for the Twilio media gateway of a SIP Interface or Trunking call.
460
+ * `object` Contains metrics and properties for the Twilio media gateway of a SIP Interface or Trunking call. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#edges-and-their-properties) for the object properties.
461
461
  */
462
462
  sipEdge: any;
463
463
  /**
@@ -469,17 +469,20 @@ export declare class CallSummariesInstance {
469
469
  */
470
470
  url: string;
471
471
  /**
472
- * Attributes capturing call-flow-specific details.
472
+ * `object` Attributes capturing call-flow-specific details. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#attributes-object) for the object properties.
473
473
  */
474
474
  attributes: any;
475
475
  /**
476
- * Contains edge-agnostic call-level details.
476
+ * `object` Contains edge-agnostic call-level details. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#properties-object) for the object properties.
477
477
  */
478
478
  properties: any;
479
479
  /**
480
- * Contains trusted communications details including Branded Call and verified caller ID.
480
+ * `object` Contains trusted communications details including Branded Call and verified caller ID. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#trust-object) for the object properties.
481
481
  */
482
482
  trust: any;
483
+ /**
484
+ * `object` Programmatically labeled annotations for the Call. Developers can update the Call Summary records with Annotation during or after a Call. Annotations can be updated as long as the Call Summary record is addressable via the API. See [Details: Call Summary](https://www.twilio.com/docs/voice/voice-insights/api/call/details-call-summary#annotation-object) for the object properties.
485
+ */
483
486
  annotation: any;
484
487
  /**
485
488
  * Provide a user-friendly representation
@@ -14,13 +14,13 @@ export declare class InsightsV2CreatePhoneNumbersReportRequest {
14
14
  }
15
15
  export declare class InsightsV2CreatePhoneNumbersReportRequestTimeRange {
16
16
  /**
17
- * Start time of the report
17
+ * Start date time of the report
18
18
  */
19
- "startTime"?: Date;
19
+ "startDatetime"?: Date;
20
20
  /**
21
- * End time of the report
21
+ * End date time of the report
22
22
  */
23
- "endTime"?: Date;
23
+ "endDatetime"?: Date;
24
24
  constructor(payload: any);
25
25
  }
26
26
  /**
@@ -73,13 +73,13 @@ export declare class ReportFilter {
73
73
  }
74
74
  export declare class ReportMetadata {
75
75
  /**
76
- * Start time of the report
76
+ * Start date time of the report
77
77
  */
78
- "startTime"?: Date;
78
+ "startDatetime"?: Date;
79
79
  /**
80
- * End time of the report
80
+ * End date time of the report
81
81
  */
82
- "endTime"?: Date;
82
+ "endDatetime"?: Date;
83
83
  /**
84
84
  * Filter values applied to the report
85
85
  */