twilio 6.0.0 → 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 (119) hide show
  1. package/lib/rest/ConversationsBase.d.ts +3 -0
  2. package/lib/rest/ConversationsBase.js +5 -0
  3. package/lib/rest/InsightsBase.d.ts +3 -0
  4. package/lib/rest/InsightsBase.js +5 -0
  5. package/lib/rest/IntelligenceBase.d.ts +3 -0
  6. package/lib/rest/IntelligenceBase.js +5 -0
  7. package/lib/rest/KnowledgeBase.d.ts +3 -0
  8. package/lib/rest/KnowledgeBase.js +5 -0
  9. package/lib/rest/Memory.d.ts +4 -0
  10. package/lib/rest/Memory.js +8 -0
  11. package/lib/rest/MemoryBase.d.ts +13 -0
  12. package/lib/rest/MemoryBase.js +31 -0
  13. package/lib/rest/Twilio.d.ts +5 -0
  14. package/lib/rest/Twilio.js +5 -0
  15. package/lib/rest/VoiceBase.d.ts +3 -0
  16. package/lib/rest/VoiceBase.js +5 -0
  17. package/lib/rest/api/v2010/account/call/recording.d.ts +2 -0
  18. package/lib/rest/api/v2010/account/call/recording.js +4 -0
  19. package/lib/rest/api/v2010/account/call/transcription.d.ts +1 -1
  20. package/lib/rest/api/v2010/account/call/transcription.js +6 -4
  21. package/lib/rest/api/v2010/account/call.d.ts +2 -0
  22. package/lib/rest/api/v2010/account/call.js +4 -0
  23. package/lib/rest/api/v2010/account/conference/participant.d.ts +2 -0
  24. package/lib/rest/api/v2010/account/conference/participant.js +4 -0
  25. package/lib/rest/conversations/V2.d.ts +35 -0
  26. package/lib/rest/conversations/V2.js +67 -0
  27. package/lib/rest/conversations/v2/communication.d.ts +479 -0
  28. package/lib/rest/conversations/v2/communication.js +436 -0
  29. package/lib/rest/conversations/v2/configuration.d.ts +906 -0
  30. package/lib/rest/conversations/v2/configuration.js +619 -0
  31. package/lib/rest/conversations/v2/conversation.d.ts +936 -0
  32. package/lib/rest/conversations/v2/conversation.js +664 -0
  33. package/lib/rest/conversations/v2/operation.d.ts +167 -0
  34. package/lib/rest/conversations/v2/operation.js +170 -0
  35. package/lib/rest/conversations/v2/participant.d.ts +469 -0
  36. package/lib/rest/conversations/v2/participant.js +442 -0
  37. package/lib/rest/flexApi/v1/plugin/pluginVersions.d.ts +1 -1
  38. package/lib/rest/flexApi/v1/plugin/pluginVersions.js +8 -6
  39. package/lib/rest/insights/V3.d.ts +20 -0
  40. package/lib/rest/insights/V3.js +42 -0
  41. package/lib/rest/insights/v1/call/callSummary.d.ts +10 -10
  42. package/lib/rest/insights/v1/call/event.d.ts +4 -4
  43. package/lib/rest/insights/v1/callSummaries.d.ts +12 -9
  44. package/lib/rest/insights/v3/metadata.d.ts +115 -0
  45. package/lib/rest/insights/v3/metadata.js +118 -0
  46. package/lib/rest/insights/v3/query.d.ts +180 -0
  47. package/lib/rest/insights/v3/query.js +214 -0
  48. package/lib/rest/intelligence/V3.d.ts +35 -0
  49. package/lib/rest/intelligence/V3.js +65 -0
  50. package/lib/rest/intelligence/v3/configuration.d.ts +693 -0
  51. package/lib/rest/intelligence/v3/configuration.js +528 -0
  52. package/lib/rest/intelligence/v3/conversation.d.ts +478 -0
  53. package/lib/rest/intelligence/v3/conversation.js +342 -0
  54. package/lib/rest/intelligence/v3/operator.d.ts +619 -0
  55. package/lib/rest/intelligence/v3/operator.js +493 -0
  56. package/lib/rest/intelligence/v3/operatorResult.d.ts +543 -0
  57. package/lib/rest/intelligence/v3/operatorResult.js +478 -0
  58. package/lib/rest/intelligence/v3/version.d.ts +469 -0
  59. package/lib/rest/intelligence/v3/version.js +341 -0
  60. package/lib/rest/knowledge/V2.d.ts +31 -0
  61. package/lib/rest/knowledge/V2.js +62 -0
  62. package/lib/rest/knowledge/v2/chunk.d.ts +209 -0
  63. package/lib/rest/knowledge/v2/chunk.js +178 -0
  64. package/lib/rest/knowledge/v2/knowledge.d.ts +507 -0
  65. package/lib/rest/knowledge/v2/knowledge.js +466 -0
  66. package/lib/rest/knowledge/v2/knowledgeBasis.d.ts +484 -0
  67. package/lib/rest/knowledge/v2/knowledgeBasis.js +441 -0
  68. package/lib/rest/knowledge/v2/operation.d.ts +162 -0
  69. package/lib/rest/knowledge/v2/operation.js +175 -0
  70. package/lib/rest/knowledge/v2/search.d.ts +180 -0
  71. package/lib/rest/knowledge/v2/search.js +174 -0
  72. package/lib/rest/memory/V1.d.ts +76 -0
  73. package/lib/rest/memory/V1.js +140 -0
  74. package/lib/rest/memory/v1/bulk.d.ts +129 -0
  75. package/lib/rest/memory/v1/bulk.js +158 -0
  76. package/lib/rest/memory/v1/conversationSummary.d.ts +531 -0
  77. package/lib/rest/memory/v1/conversationSummary.js +473 -0
  78. package/lib/rest/memory/v1/dataMapping.d.ts +630 -0
  79. package/lib/rest/memory/v1/dataMapping.js +512 -0
  80. package/lib/rest/memory/v1/event.d.ts +153 -0
  81. package/lib/rest/memory/v1/event.js +159 -0
  82. package/lib/rest/memory/v1/identifier.d.ts +362 -0
  83. package/lib/rest/memory/v1/identifier.js +369 -0
  84. package/lib/rest/memory/v1/identityResolutionSetting.d.ts +247 -0
  85. package/lib/rest/memory/v1/identityResolutionSetting.js +229 -0
  86. package/lib/rest/memory/v1/import.d.ts +292 -0
  87. package/lib/rest/memory/v1/import.js +280 -0
  88. package/lib/rest/memory/v1/lookup.d.ts +82 -0
  89. package/lib/rest/memory/v1/lookup.js +118 -0
  90. package/lib/rest/memory/v1/observation.d.ts +521 -0
  91. package/lib/rest/memory/v1/observation.js +477 -0
  92. package/lib/rest/memory/v1/operation.d.ts +162 -0
  93. package/lib/rest/memory/v1/operation.js +175 -0
  94. package/lib/rest/memory/v1/profile.d.ts +441 -0
  95. package/lib/rest/memory/v1/profile.js +467 -0
  96. package/lib/rest/memory/v1/recall.d.ts +306 -0
  97. package/lib/rest/memory/v1/recall.js +234 -0
  98. package/lib/rest/memory/v1/revision.d.ts +246 -0
  99. package/lib/rest/memory/v1/revision.js +195 -0
  100. package/lib/rest/memory/v1/store.d.ts +503 -0
  101. package/lib/rest/memory/v1/store.js +482 -0
  102. package/lib/rest/memory/v1/trait.d.ts +233 -0
  103. package/lib/rest/memory/v1/trait.js +190 -0
  104. package/lib/rest/memory/v1/traitGroup.d.ts +758 -0
  105. package/lib/rest/memory/v1/traitGroup.js +555 -0
  106. package/lib/rest/messaging/v2/channelsSender.d.ts +8 -0
  107. package/lib/rest/messaging/v2/channelsSender.js +2 -0
  108. package/lib/rest/previewIam/versionless/organization/roleAssignment.d.ts +32 -0
  109. package/lib/rest/previewIam/versionless/organization/roleAssignment.js +14 -0
  110. package/lib/rest/studio/v2/flow.d.ts +4 -0
  111. package/lib/rest/studio/v2/flow.js +8 -0
  112. package/lib/rest/verify/v2/service/webhook.d.ts +2 -2
  113. package/lib/rest/verify/v2/service/webhook.js +8 -8
  114. package/lib/rest/voice/V3.d.ts +15 -0
  115. package/lib/rest/voice/V3.js +37 -0
  116. package/lib/rest/voice/v3/transcription.d.ts +378 -0
  117. package/lib/rest/voice/v3/transcription.js +264 -0
  118. package/lib/twiml/VoiceResponse.d.ts +8 -0
  119. package/package.json +1 -1
@@ -28,6 +28,8 @@ class PublicApiCreateRoleAssignmentRequest {
28
28
  this.roleSid = payload["role_sid"];
29
29
  this.scope = payload["scope"];
30
30
  this.identity = payload["identity"];
31
+ this.resourceType = payload["resource_type"];
32
+ this.resourceId = payload["resource_id"];
31
33
  }
32
34
  }
33
35
  exports.PublicApiCreateRoleAssignmentRequest = PublicApiCreateRoleAssignmentRequest;
@@ -88,6 +90,8 @@ class RoleAssignmentInstance {
88
90
  this.roleSid = payload.role_sid;
89
91
  this.scope = payload.scope;
90
92
  this.identity = payload.identity;
93
+ this.resourceType = payload.resource_type;
94
+ this.resourceId = payload.resource_id;
91
95
  this.code = payload.code;
92
96
  this.message = payload.message;
93
97
  this.moreInfo = payload.moreInfo;
@@ -131,6 +135,8 @@ class RoleAssignmentInstance {
131
135
  roleSid: this.roleSid,
132
136
  scope: this.scope,
133
137
  identity: this.identity,
138
+ resourceType: this.resourceType,
139
+ resourceId: this.resourceId,
134
140
  code: this.code,
135
141
  message: this.message,
136
142
  moreInfo: this.moreInfo,
@@ -216,6 +222,10 @@ function RoleAssignmentListInstance(version, organizationSid) {
216
222
  data["Identity"] = params["identity"];
217
223
  if (params["scope"] !== undefined)
218
224
  data["Scope"] = params["scope"];
225
+ if (params["resourceType"] !== undefined)
226
+ data["ResourceType"] = params["resourceType"];
227
+ if (params["resourceId"] !== undefined)
228
+ data["ResourceId"] = params["resourceId"];
219
229
  if (params.pageNumber !== undefined)
220
230
  data["Page"] = params.pageNumber;
221
231
  if (params.pageToken !== undefined)
@@ -258,6 +268,10 @@ function RoleAssignmentListInstance(version, organizationSid) {
258
268
  data["Identity"] = params["identity"];
259
269
  if (params["scope"] !== undefined)
260
270
  data["Scope"] = params["scope"];
271
+ if (params["resourceType"] !== undefined)
272
+ data["ResourceType"] = params["resourceType"];
273
+ if (params["resourceId"] !== undefined)
274
+ data["ResourceId"] = params["resourceId"];
261
275
  if (params.pageNumber !== undefined)
262
276
  data["Page"] = params.pageNumber;
263
277
  if (params.pageToken !== undefined)
@@ -22,6 +22,8 @@ export interface FlowContextUpdateOptions {
22
22
  definition?: any;
23
23
  /** Description of change made in the revision. */
24
24
  commitMessage?: string;
25
+ /** The SID of the User that created or last updated the Flow. */
26
+ authorSid?: string;
25
27
  }
26
28
  /**
27
29
  * Options to pass to create a FlowInstance
@@ -35,6 +37,8 @@ export interface FlowListInstanceCreateOptions {
35
37
  definition: any;
36
38
  /** Description of change made in the revision. */
37
39
  commitMessage?: string;
40
+ /** The SID of the User that created the Flow. */
41
+ authorSid?: string;
38
42
  }
39
43
  /**
40
44
  * Options to pass to each
@@ -125,6 +125,8 @@ class FlowContextImpl {
125
125
  data["Definition"] = serialize.object(params["definition"]);
126
126
  if (params["commitMessage"] !== undefined)
127
127
  data["CommitMessage"] = params["commitMessage"];
128
+ if (params["authorSid"] !== undefined)
129
+ data["AuthorSid"] = params["authorSid"];
128
130
  const headers = {};
129
131
  headers["Content-Type"] = "application/x-www-form-urlencoded";
130
132
  headers["Accept"] = "application/json";
@@ -154,6 +156,8 @@ class FlowContextImpl {
154
156
  data["Definition"] = serialize.object(params["definition"]);
155
157
  if (params["commitMessage"] !== undefined)
156
158
  data["CommitMessage"] = params["commitMessage"];
159
+ if (params["authorSid"] !== undefined)
160
+ data["AuthorSid"] = params["authorSid"];
157
161
  const headers = {};
158
162
  headers["Content-Type"] = "application/x-www-form-urlencoded";
159
163
  headers["Accept"] = "application/json";
@@ -335,6 +339,8 @@ function FlowListInstance(version) {
335
339
  data["Definition"] = serialize.object(params["definition"]);
336
340
  if (params["commitMessage"] !== undefined)
337
341
  data["CommitMessage"] = params["commitMessage"];
342
+ if (params["authorSid"] !== undefined)
343
+ data["AuthorSid"] = params["authorSid"];
338
344
  const headers = {};
339
345
  headers["Content-Type"] = "application/x-www-form-urlencoded";
340
346
  headers["Accept"] = "application/json";
@@ -368,6 +374,8 @@ function FlowListInstance(version) {
368
374
  data["Definition"] = serialize.object(params["definition"]);
369
375
  if (params["commitMessage"] !== undefined)
370
376
  data["CommitMessage"] = params["commitMessage"];
377
+ if (params["authorSid"] !== undefined)
378
+ data["AuthorSid"] = params["authorSid"];
371
379
  const headers = {};
372
380
  headers["Content-Type"] = "application/x-www-form-urlencoded";
373
381
  headers["Accept"] = "application/json";
@@ -28,7 +28,7 @@ export interface WebhookContextUpdateOptions {
28
28
  /** */
29
29
  status?: WebhookStatus;
30
30
  /** */
31
- version?: WebhookVersion;
31
+ versionParam?: WebhookVersion;
32
32
  }
33
33
  /**
34
34
  * Options to pass to create a WebhookInstance
@@ -43,7 +43,7 @@ export interface WebhookListInstanceCreateOptions {
43
43
  /** */
44
44
  status?: WebhookStatus;
45
45
  /** */
46
- version?: WebhookVersion;
46
+ versionParam?: WebhookVersion;
47
47
  }
48
48
  /**
49
49
  * Options to pass to each
@@ -109,8 +109,8 @@ class WebhookContextImpl {
109
109
  data["WebhookUrl"] = params["webhookUrl"];
110
110
  if (params["status"] !== undefined)
111
111
  data["Status"] = params["status"];
112
- if (params["version"] !== undefined)
113
- data["Version"] = params["version"];
112
+ if (params["versionParam"] !== undefined)
113
+ data["Version"] = params["versionParam"];
114
114
  const headers = {};
115
115
  headers["Content-Type"] = "application/x-www-form-urlencoded";
116
116
  headers["Accept"] = "application/json";
@@ -142,8 +142,8 @@ class WebhookContextImpl {
142
142
  data["WebhookUrl"] = params["webhookUrl"];
143
143
  if (params["status"] !== undefined)
144
144
  data["Status"] = params["status"];
145
- if (params["version"] !== undefined)
146
- data["Version"] = params["version"];
145
+ if (params["versionParam"] !== undefined)
146
+ data["Version"] = params["versionParam"];
147
147
  const headers = {};
148
148
  headers["Content-Type"] = "application/x-www-form-urlencoded";
149
149
  headers["Accept"] = "application/json";
@@ -303,8 +303,8 @@ function WebhookListInstance(version, serviceSid) {
303
303
  data["WebhookUrl"] = params["webhookUrl"];
304
304
  if (params["status"] !== undefined)
305
305
  data["Status"] = params["status"];
306
- if (params["version"] !== undefined)
307
- data["Version"] = params["version"];
306
+ if (params["versionParam"] !== undefined)
307
+ data["Version"] = params["versionParam"];
308
308
  const headers = {};
309
309
  headers["Content-Type"] = "application/x-www-form-urlencoded";
310
310
  headers["Accept"] = "application/json";
@@ -338,8 +338,8 @@ function WebhookListInstance(version, serviceSid) {
338
338
  data["WebhookUrl"] = params["webhookUrl"];
339
339
  if (params["status"] !== undefined)
340
340
  data["Status"] = params["status"];
341
- if (params["version"] !== undefined)
342
- data["Version"] = params["version"];
341
+ if (params["versionParam"] !== undefined)
342
+ data["Version"] = params["versionParam"];
343
343
  const headers = {};
344
344
  headers["Content-Type"] = "application/x-www-form-urlencoded";
345
345
  headers["Accept"] = "application/json";
@@ -0,0 +1,15 @@
1
+ import VoiceBase from "../VoiceBase";
2
+ import Version from "../../base/Version";
3
+ import { TranscriptionListInstance } from "./v3/transcription";
4
+ export default class V3 extends Version {
5
+ /**
6
+ * Initialize the V3 version of Voice
7
+ *
8
+ * @param domain - The Twilio (Twilio.Voice) domain
9
+ */
10
+ constructor(domain: VoiceBase);
11
+ /** transcriptions - { Twilio.Voice.V3.TranscriptionListInstance } resource */
12
+ protected _transcriptions?: TranscriptionListInstance;
13
+ /** Getter for transcriptions resource */
14
+ get transcriptions(): TranscriptionListInstance;
15
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio API definition for public-api voice
9
+ * Powers Twilio public-api voice
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 transcription_1 = require("./v3/transcription");
21
+ class V3 extends Version_1.default {
22
+ /**
23
+ * Initialize the V3 version of Voice
24
+ *
25
+ * @param domain - The Twilio (Twilio.Voice) domain
26
+ */
27
+ constructor(domain) {
28
+ super(domain, "v3");
29
+ }
30
+ /** Getter for transcriptions resource */
31
+ get transcriptions() {
32
+ this._transcriptions =
33
+ this._transcriptions || (0, transcription_1.TranscriptionListInstance)(this);
34
+ return this._transcriptions;
35
+ }
36
+ }
37
+ exports.default = V3;
@@ -0,0 +1,378 @@
1
+ import { inspect, InspectOptions } from "util";
2
+ import V3 from "../V3";
3
+ import { ApiResponse } from "../../../base/ApiResponse";
4
+ export declare class CreateV3TranscriptionsRequest {
5
+ /**
6
+ * The ID of the transcription configuration to use
7
+ */
8
+ "transcriptionConfigurationId": string;
9
+ /**
10
+ * Discriminator indicating the input source type
11
+ */
12
+ "inputSource"?: string;
13
+ /**
14
+ * The SID or TTID of the source audio to transcribe (e.g. a Twilio Recording SID). When provided, audioStartedAt is inferred from the recording\'s start time and does not need to be supplied by the caller.
15
+ */
16
+ "sourceId": string;
17
+ /**
18
+ * Participants in the conversation. If omitted or partially specified, defaults from the transcription configuration will be applied.
19
+ */
20
+ "participants"?: Array<VoiceV3TranscriptionParticipant>;
21
+ /**
22
+ * URL to the media file to transcribe
23
+ */
24
+ "mediaUrl": string;
25
+ /**
26
+ * The start time of the audio recording
27
+ */
28
+ "audioStartedAt"?: Date;
29
+ constructor(payload: any);
30
+ }
31
+ export declare class VoiceV3TranscriptionParticipant {
32
+ /**
33
+ * The role of this participant in the conversation.
34
+ */
35
+ "type"?: string;
36
+ /**
37
+ * The phone number or identifier for this participant (E.164 format for phone numbers). Used to correlate this participant with their profile and conversation history.
38
+ */
39
+ "address"?: string;
40
+ /**
41
+ * User-defined name for this participant
42
+ */
43
+ "name"?: string;
44
+ /**
45
+ * One-based index of the audio channel in a multi-channel recording
46
+ */
47
+ "audioChannelIndex": number;
48
+ constructor(payload: any);
49
+ }
50
+ export declare class VoiceV3TranscriptionResolvedConfiguration {
51
+ /**
52
+ * The engine used for transcription (Deepgram, Google, or auto)
53
+ */
54
+ "transcriptionEngine"?: string;
55
+ /**
56
+ * The speech model used for transcription (e.g., nova-2, nova-3, chirp_2)
57
+ */
58
+ "speechModel"?: string;
59
+ /**
60
+ * The language code for transcription
61
+ */
62
+ "language"?: string;
63
+ "transcriptionStatusCallback"?: VoiceV3TranscriptionTranscriptionStatusCallback;
64
+ /**
65
+ * Maestro conversation configuration ID
66
+ */
67
+ "conversationConfigurationId"?: string | null;
68
+ /**
69
+ * Default participant configurations for the transcription
70
+ */
71
+ "participantDefaults"?: Array<VoiceV3TranscriptionResolvedConfigurationParticipantDefaults>;
72
+ constructor(payload: any);
73
+ }
74
+ export declare class VoiceV3TranscriptionResolvedConfigurationParticipantDefaults {
75
+ /**
76
+ * One-based index of the audio channel
77
+ */
78
+ "audioChannelIndex": number;
79
+ /**
80
+ * The participant role type
81
+ */
82
+ "type": string;
83
+ constructor(payload: any);
84
+ }
85
+ export declare class VoiceV3TranscriptionTranscription {
86
+ /**
87
+ * Unique identifier for a Transcription. This is also the transcriptionId returned in the LRO 202 response.
88
+ */
89
+ "id": string;
90
+ /**
91
+ * Twilio Account SID
92
+ */
93
+ "accountId": string;
94
+ /**
95
+ * The current status of the transcription operation
96
+ */
97
+ "status": string;
98
+ /**
99
+ * Unique identifier for a Transcription configuration.
100
+ */
101
+ "transcriptionConfigurationId": string;
102
+ /**
103
+ * The third party media URL
104
+ */
105
+ "mediaUrl"?: string | null;
106
+ /**
107
+ * The source ID (recording ID) - used for tracking only
108
+ */
109
+ "sourceId"?: string | null;
110
+ /**
111
+ * The call/recording start time. When the transcription was created using a sourceId, this value is inferred from the recording resource\'s start time. When created using a mediaUrl, this reflects the value supplied by the caller.
112
+ */
113
+ "audioStartedAt"?: Date;
114
+ /**
115
+ * Maestro conversation ID, populated once the transcription has been stored in Maestro.
116
+ */
117
+ "conversationId"?: string | null;
118
+ /**
119
+ * Array of participants in the conversation
120
+ */
121
+ "participants"?: Array<VoiceV3TranscriptionParticipant>;
122
+ /**
123
+ * Audio duration in seconds
124
+ */
125
+ "duration"?: number | null;
126
+ "resolvedConfiguration"?: VoiceV3TranscriptionResolvedConfiguration;
127
+ /**
128
+ * When this transcript was created
129
+ */
130
+ "createdAt": Date;
131
+ /**
132
+ * When this transcript was last updated
133
+ */
134
+ "updatedAt": Date;
135
+ /**
136
+ * The URL of this resource
137
+ */
138
+ "url": string;
139
+ constructor(payload: any);
140
+ }
141
+ export declare class VoiceV3TranscriptionTranscriptionStatusCallback {
142
+ /**
143
+ * The URL to call when transcription status changes
144
+ */
145
+ "url"?: string;
146
+ /**
147
+ * The HTTP method to use for the callback, currently only POST is supported
148
+ */
149
+ "method"?: string;
150
+ /**
151
+ * The transcription events that will trigger the callback
152
+ */
153
+ "events"?: Array<string> | null;
154
+ constructor(payload: any);
155
+ }
156
+ /**
157
+ * Options to pass to create a TranscriptionInstance
158
+ */
159
+ export interface TranscriptionListInstanceCreateOptions {
160
+ /** */
161
+ createV3TranscriptionsRequest: CreateV3TranscriptionsRequest;
162
+ /** A unique key to ensure idempotency. We recommend using UUID v7. Requests with the same key within the idempotency window return the original response. */
163
+ idempotencyKey?: string;
164
+ }
165
+ export interface TranscriptionContext {
166
+ /**
167
+ * Fetch a TranscriptionInstance
168
+ *
169
+ * @param callback - Callback to handle processed record
170
+ *
171
+ * @returns Resolves to processed TranscriptionInstance
172
+ */
173
+ fetch(callback?: (error: Error | null, item?: TranscriptionInstance) => any): Promise<TranscriptionInstance>;
174
+ /**
175
+ * Fetch a TranscriptionInstance and return HTTP info
176
+ *
177
+ * @param callback - Callback to handle processed record
178
+ *
179
+ * @returns Resolves to processed TranscriptionInstance with HTTP metadata
180
+ */
181
+ fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<TranscriptionInstance>) => any): Promise<ApiResponse<TranscriptionInstance>>;
182
+ /**
183
+ * Provide a user-friendly representation
184
+ */
185
+ toJSON(): any;
186
+ [inspect.custom](_depth: any, options: InspectOptions): any;
187
+ }
188
+ export interface TranscriptionContextSolution {
189
+ transcriptionId: string;
190
+ }
191
+ export declare class TranscriptionContextImpl implements TranscriptionContext {
192
+ protected _version: V3;
193
+ protected _solution: TranscriptionContextSolution;
194
+ protected _uri: string;
195
+ constructor(_version: V3, transcriptionId: string);
196
+ fetch(callback?: (error: Error | null, item?: TranscriptionInstance) => any): Promise<TranscriptionInstance>;
197
+ fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<TranscriptionInstance>) => any): Promise<ApiResponse<TranscriptionInstance>>;
198
+ /**
199
+ * Provide a user-friendly representation
200
+ *
201
+ * @returns Object
202
+ */
203
+ toJSON(): TranscriptionContextSolution;
204
+ [inspect.custom](_depth: any, options: InspectOptions): string;
205
+ }
206
+ /**
207
+ * Nested model for CreateV3TranscriptionsRequest
208
+ */
209
+ export interface CreateV3TranscriptionsRequest {
210
+ transcriptionConfigurationId: string;
211
+ inputSource?: string;
212
+ sourceId: string;
213
+ participants?: Array<VoiceV3TranscriptionParticipant>;
214
+ mediaUrl: string;
215
+ audioStartedAt?: Date;
216
+ }
217
+ /**
218
+ * Nested model for VoiceV3TranscriptionParticipant
219
+ */
220
+ export interface VoiceV3TranscriptionParticipant {
221
+ type?: string;
222
+ address?: string;
223
+ name?: string;
224
+ audioChannelIndex: number;
225
+ }
226
+ /**
227
+ * Nested model for VoiceV3TranscriptionResolvedConfiguration
228
+ */
229
+ export interface VoiceV3TranscriptionResolvedConfiguration {
230
+ transcriptionEngine?: string;
231
+ speechModel?: string;
232
+ language?: string;
233
+ transcriptionStatusCallback?: VoiceV3TranscriptionTranscriptionStatusCallback;
234
+ conversationConfigurationId?: string;
235
+ participantDefaults?: Array<VoiceV3TranscriptionResolvedConfigurationParticipantDefaults>;
236
+ }
237
+ /**
238
+ * Nested model for VoiceV3TranscriptionResolvedConfigurationParticipantDefaults
239
+ */
240
+ export interface VoiceV3TranscriptionResolvedConfigurationParticipantDefaults {
241
+ audioChannelIndex: number;
242
+ type: string;
243
+ }
244
+ /**
245
+ * Nested model for VoiceV3TranscriptionTranscription
246
+ */
247
+ export interface VoiceV3TranscriptionTranscription {
248
+ id: string;
249
+ accountId: string;
250
+ status: string;
251
+ transcriptionConfigurationId: string;
252
+ mediaUrl?: string;
253
+ sourceId?: string;
254
+ audioStartedAt?: Date;
255
+ conversationId?: string;
256
+ participants?: Array<VoiceV3TranscriptionParticipant>;
257
+ duration?: number;
258
+ resolvedConfiguration?: VoiceV3TranscriptionResolvedConfiguration;
259
+ createdAt: Date;
260
+ updatedAt: Date;
261
+ url: string;
262
+ }
263
+ /**
264
+ * Nested model for VoiceV3TranscriptionTranscriptionStatusCallback
265
+ */
266
+ export interface VoiceV3TranscriptionTranscriptionStatusCallback {
267
+ url?: string;
268
+ method?: string;
269
+ events?: Array<string>;
270
+ }
271
+ /**
272
+ * Response model for VoiceV3TranscriptionLongRunningOperation202Response operations
273
+ */
274
+ interface VoiceV3TranscriptionLongRunningOperation202Response_ResponseResource {
275
+ status: string;
276
+ statusUrl: string;
277
+ transcription: VoiceV3TranscriptionTranscription;
278
+ }
279
+ /**
280
+ * Response model for VoiceV3TranscriptionLongRunningOperationResponse operations
281
+ */
282
+ interface VoiceV3TranscriptionLongRunningOperationResponse_ResponseResource {
283
+ operationId: string;
284
+ status: string;
285
+ statusUrl: string;
286
+ transcription: VoiceV3TranscriptionTranscription;
287
+ }
288
+ /**
289
+ * Union type for all possible response models
290
+ */
291
+ type TranscriptionResource = VoiceV3TranscriptionLongRunningOperation202Response_ResponseResource | VoiceV3TranscriptionLongRunningOperationResponse_ResponseResource;
292
+ /**
293
+ * Response envelope for long-running operations (202 Accepted pattern). Returned immediately on acceptance and on each status poll. Extensible to allow additional fields in future versions.
294
+ */
295
+ export declare class TranscriptionInstance {
296
+ protected _version: V3;
297
+ protected _solution: TranscriptionContextSolution;
298
+ protected _context?: TranscriptionContext;
299
+ constructor(_version: V3, _payload: TranscriptionResource, transcriptionId?: string);
300
+ /**
301
+ * Current status of the long-running operation. PENDING: accepted but not yet started. RUNNING: currently in progress. COMPLETED: successfully completed. FAILED: failed and cannot be completed.
302
+ */
303
+ status?: string;
304
+ /**
305
+ * URI to poll for operation status. Mirrors the Location response header. Provided as a body field for programmatic access by JSON-parsing clients (RFC 9110 Section 15.3.3).
306
+ */
307
+ statusUrl?: string;
308
+ transcription?: VoiceV3TranscriptionTranscription;
309
+ /**
310
+ * Unique identifier for the transcription operation.
311
+ */
312
+ operationId?: string;
313
+ private get _proxy();
314
+ /**
315
+ * Fetch a TranscriptionInstance
316
+ *
317
+ * @param callback - Callback to handle processed record
318
+ *
319
+ * @returns Resolves to processed TranscriptionInstance
320
+ */
321
+ fetch(callback?: (error: Error | null, item?: TranscriptionInstance) => any): Promise<TranscriptionInstance>;
322
+ /**
323
+ * Fetch a TranscriptionInstance and return HTTP info
324
+ *
325
+ * @param callback - Callback to handle processed record
326
+ *
327
+ * @returns Resolves to processed TranscriptionInstance with HTTP metadata
328
+ */
329
+ fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<TranscriptionInstance>) => any): Promise<ApiResponse<TranscriptionInstance>>;
330
+ /**
331
+ * Provide a user-friendly representation
332
+ *
333
+ * @returns Object
334
+ */
335
+ toJSON(): {
336
+ status: string;
337
+ statusUrl: string;
338
+ transcription: VoiceV3TranscriptionTranscription;
339
+ operationId: string;
340
+ };
341
+ [inspect.custom](_depth: any, options: InspectOptions): string;
342
+ }
343
+ export interface TranscriptionSolution {
344
+ }
345
+ export interface TranscriptionListInstance {
346
+ _version: V3;
347
+ _solution: TranscriptionSolution;
348
+ _uri: string;
349
+ (transcriptionId: string): TranscriptionContext;
350
+ get(transcriptionId: string): TranscriptionContext;
351
+ /**
352
+ * Create a TranscriptionInstance
353
+ *
354
+ * @param params - Body for request
355
+ * @param headers - header params for request
356
+ * @param callback - Callback to handle processed record
357
+ *
358
+ * @returns Resolves to processed TranscriptionInstance
359
+ */
360
+ create(params: CreateV3TranscriptionsRequest, headers?: any, callback?: (error: Error | null, item?: TranscriptionInstance) => any): Promise<TranscriptionInstance>;
361
+ /**
362
+ * Create a TranscriptionInstance and return HTTP info
363
+ *
364
+ * @param params - Body for request
365
+ * @param headers - header params for request
366
+ * @param callback - Callback to handle processed record
367
+ *
368
+ * @returns Resolves to processed TranscriptionInstance with HTTP metadata
369
+ */
370
+ createWithHttpInfo(params: CreateV3TranscriptionsRequest, headers?: any, callback?: (error: Error | null, item?: ApiResponse<TranscriptionInstance>) => any): Promise<ApiResponse<TranscriptionInstance>>;
371
+ /**
372
+ * Provide a user-friendly representation
373
+ */
374
+ toJSON(): any;
375
+ [inspect.custom](_depth: any, options: InspectOptions): any;
376
+ }
377
+ export declare function TranscriptionListInstance(version: V3): TranscriptionListInstance;
378
+ export {};