@superdurable/connector-elevenlabs 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -19
- package/dex-connector.json +492 -4
- package/dist/chunk-UBMQRHWH.js +481 -0
- package/dist/connection-BWnmpStG.d.ts +347 -0
- package/dist/index.d.ts +460 -8
- package/dist/index.js +693 -28
- package/dist/mock.d.ts +159 -5
- package/dist/mock.js +385 -4
- package/package.json +4 -3
- package/dist/chunk-GIQKY62E.js +0 -134
- package/dist/connection-DFnhV-HC.d.ts +0 -117
package/dist/index.js
CHANGED
|
@@ -11,6 +11,69 @@ import {
|
|
|
11
11
|
CreateSpeechInputSchema,
|
|
12
12
|
CreateSpeechMetadata,
|
|
13
13
|
CreateSpeechOutputSchema,
|
|
14
|
+
CredentialMaterialError,
|
|
15
|
+
DeleteHistoryItemBranch,
|
|
16
|
+
DeleteHistoryItemBranchDefect,
|
|
17
|
+
DeleteHistoryItemBranchDeleted,
|
|
18
|
+
DeleteHistoryItemBranchInvalidResponse,
|
|
19
|
+
DeleteHistoryItemBranchProviderRejected,
|
|
20
|
+
DeleteHistoryItemDefinition,
|
|
21
|
+
DeleteHistoryItemMetadata,
|
|
22
|
+
DeleteVoiceBranch,
|
|
23
|
+
DeleteVoiceBranchDefect,
|
|
24
|
+
DeleteVoiceBranchDeleted,
|
|
25
|
+
DeleteVoiceBranchInvalidResponse,
|
|
26
|
+
DeleteVoiceBranchProviderRejected,
|
|
27
|
+
DeleteVoiceDefinition,
|
|
28
|
+
DeleteVoiceMetadata,
|
|
29
|
+
DeletedHistoryItemSchema,
|
|
30
|
+
DeletedVoiceSchema,
|
|
31
|
+
EditVoiceMetadataBranch,
|
|
32
|
+
EditVoiceMetadataBranchDefect,
|
|
33
|
+
EditVoiceMetadataBranchEdited,
|
|
34
|
+
EditVoiceMetadataBranchInvalidResponse,
|
|
35
|
+
EditVoiceMetadataBranchNotFound,
|
|
36
|
+
EditVoiceMetadataBranchProviderRejected,
|
|
37
|
+
EditVoiceMetadataDefinition,
|
|
38
|
+
EditVoiceMetadataInputSchema,
|
|
39
|
+
EditVoiceMetadataMetadata,
|
|
40
|
+
EditedVoiceMetadataSchema,
|
|
41
|
+
GetHistoryItemBranch,
|
|
42
|
+
GetHistoryItemBranchDefect,
|
|
43
|
+
GetHistoryItemBranchFound,
|
|
44
|
+
GetHistoryItemBranchInvalidResponse,
|
|
45
|
+
GetHistoryItemBranchNotFound,
|
|
46
|
+
GetHistoryItemBranchProviderRejected,
|
|
47
|
+
GetHistoryItemDefinition,
|
|
48
|
+
GetHistoryItemMetadata,
|
|
49
|
+
GetVoiceBranch,
|
|
50
|
+
GetVoiceBranchDefect,
|
|
51
|
+
GetVoiceBranchFound,
|
|
52
|
+
GetVoiceBranchInvalidResponse,
|
|
53
|
+
GetVoiceBranchNotFound,
|
|
54
|
+
GetVoiceBranchProviderRejected,
|
|
55
|
+
GetVoiceDefinition,
|
|
56
|
+
GetVoiceInputSchema,
|
|
57
|
+
GetVoiceMetadata,
|
|
58
|
+
HistoryItemIdentityInputSchema,
|
|
59
|
+
HistoryItemMetadataSchema,
|
|
60
|
+
HistoryItemsPageSchema,
|
|
61
|
+
ListHistoryItemsBranch,
|
|
62
|
+
ListHistoryItemsBranchDefect,
|
|
63
|
+
ListHistoryItemsBranchInvalidResponse,
|
|
64
|
+
ListHistoryItemsBranchListed,
|
|
65
|
+
ListHistoryItemsBranchProviderRejected,
|
|
66
|
+
ListHistoryItemsDefinition,
|
|
67
|
+
ListHistoryItemsInputSchema,
|
|
68
|
+
ListHistoryItemsMetadata,
|
|
69
|
+
ListModelsBranch,
|
|
70
|
+
ListModelsBranchDefect,
|
|
71
|
+
ListModelsBranchInvalidResponse,
|
|
72
|
+
ListModelsBranchListed,
|
|
73
|
+
ListModelsBranchProviderRejected,
|
|
74
|
+
ListModelsDefinition,
|
|
75
|
+
ListModelsInputSchema,
|
|
76
|
+
ListModelsMetadata,
|
|
14
77
|
ListVoicesBranch,
|
|
15
78
|
ListVoicesBranchDefect,
|
|
16
79
|
ListVoicesBranchInvalidResponse,
|
|
@@ -20,15 +83,111 @@ import {
|
|
|
20
83
|
ListVoicesInputSchema,
|
|
21
84
|
ListVoicesMetadata,
|
|
22
85
|
ListVoicesOutputSchema,
|
|
86
|
+
ModelMetadataSchema,
|
|
87
|
+
ModelsListSchema,
|
|
23
88
|
ProviderID,
|
|
89
|
+
UpdateVoiceSettingsBranch,
|
|
90
|
+
UpdateVoiceSettingsBranchDefect,
|
|
91
|
+
UpdateVoiceSettingsBranchNotFound,
|
|
92
|
+
UpdateVoiceSettingsBranchProviderRejected,
|
|
93
|
+
UpdateVoiceSettingsBranchUpdated,
|
|
94
|
+
UpdateVoiceSettingsDefinition,
|
|
95
|
+
UpdateVoiceSettingsInputSchema,
|
|
96
|
+
UpdateVoiceSettingsMetadata,
|
|
97
|
+
UpdatedVoiceSettingsSchema,
|
|
24
98
|
VoiceSchema,
|
|
99
|
+
decodeCredentials,
|
|
100
|
+
isCredentialMaterialError,
|
|
25
101
|
newConnection,
|
|
26
102
|
newConnectionWithOperations,
|
|
27
103
|
newProjectConnection
|
|
28
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-UBMQRHWH.js";
|
|
29
105
|
|
|
30
106
|
// src/generated/steps.ts
|
|
31
|
-
import { goToBranch, newQueryStep } from "@superdurable/connectors-sdk";
|
|
107
|
+
import { goToBranch, newMutationStep, newQueryStep } from "@superdurable/connectors-sdk";
|
|
108
|
+
function newListModelsStep(configuration) {
|
|
109
|
+
const { connection, connectionName, listed, providerRejected, invalidResponse, defect, ...stepConfiguration } = configuration;
|
|
110
|
+
if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
|
|
111
|
+
return newQueryStep({ ...stepConfiguration, operation: connection.operations.listModels(), connection: connection.reference, branches: [
|
|
112
|
+
goToBranch("listed", listed),
|
|
113
|
+
...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
|
|
114
|
+
...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
|
|
115
|
+
...defect ? [goToBranch("defect", defect)] : []
|
|
116
|
+
] });
|
|
117
|
+
}
|
|
118
|
+
function newListHistoryItemsStep(configuration) {
|
|
119
|
+
const { connection, connectionName, listed, providerRejected, invalidResponse, defect, ...stepConfiguration } = configuration;
|
|
120
|
+
if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
|
|
121
|
+
return newQueryStep({ ...stepConfiguration, operation: connection.operations.listHistoryItems(), connection: connection.reference, branches: [
|
|
122
|
+
goToBranch("listed", listed),
|
|
123
|
+
...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
|
|
124
|
+
...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
|
|
125
|
+
...defect ? [goToBranch("defect", defect)] : []
|
|
126
|
+
] });
|
|
127
|
+
}
|
|
128
|
+
function newGetHistoryItemStep(configuration) {
|
|
129
|
+
const { connection, connectionName, found, notFound, providerRejected, invalidResponse, defect, ...stepConfiguration } = configuration;
|
|
130
|
+
if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
|
|
131
|
+
return newQueryStep({ ...stepConfiguration, operation: connection.operations.getHistoryItem(), connection: connection.reference, branches: [
|
|
132
|
+
goToBranch("found", found),
|
|
133
|
+
...notFound ? [goToBranch("notFound", notFound)] : [],
|
|
134
|
+
...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
|
|
135
|
+
...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
|
|
136
|
+
...defect ? [goToBranch("defect", defect)] : []
|
|
137
|
+
] });
|
|
138
|
+
}
|
|
139
|
+
function newDeleteHistoryItemStep(configuration) {
|
|
140
|
+
const { connection, connectionName, deleted, providerRejected, invalidResponse, defect, maxSends, ...stepConfiguration } = configuration;
|
|
141
|
+
if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
|
|
142
|
+
return newMutationStep({ ...stepConfiguration, operation: connection.operations.deleteHistoryItem(), connection: connection.reference, branches: [
|
|
143
|
+
goToBranch("deleted", deleted),
|
|
144
|
+
...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
|
|
145
|
+
...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
|
|
146
|
+
...defect ? [goToBranch("defect", defect)] : []
|
|
147
|
+
] });
|
|
148
|
+
}
|
|
149
|
+
function newGetVoiceStep(configuration) {
|
|
150
|
+
const { connection, connectionName, found, notFound, providerRejected, invalidResponse, defect, ...stepConfiguration } = configuration;
|
|
151
|
+
if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
|
|
152
|
+
return newQueryStep({ ...stepConfiguration, operation: connection.operations.getVoice(), connection: connection.reference, branches: [
|
|
153
|
+
goToBranch("found", found),
|
|
154
|
+
...notFound ? [goToBranch("notFound", notFound)] : [],
|
|
155
|
+
...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
|
|
156
|
+
...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
|
|
157
|
+
...defect ? [goToBranch("defect", defect)] : []
|
|
158
|
+
] });
|
|
159
|
+
}
|
|
160
|
+
function newEditVoiceMetadataStep(configuration) {
|
|
161
|
+
const { connection, connectionName, edited, notFound, providerRejected, invalidResponse, defect, maxSends, ...stepConfiguration } = configuration;
|
|
162
|
+
if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
|
|
163
|
+
return newMutationStep({ ...stepConfiguration, operation: connection.operations.editVoiceMetadata(), connection: connection.reference, branches: [
|
|
164
|
+
goToBranch("edited", edited),
|
|
165
|
+
...notFound ? [goToBranch("notFound", notFound)] : [],
|
|
166
|
+
...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
|
|
167
|
+
...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
|
|
168
|
+
...defect ? [goToBranch("defect", defect)] : []
|
|
169
|
+
] });
|
|
170
|
+
}
|
|
171
|
+
function newDeleteVoiceStep(configuration) {
|
|
172
|
+
const { connection, connectionName, deleted, providerRejected, invalidResponse, defect, maxSends, ...stepConfiguration } = configuration;
|
|
173
|
+
if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
|
|
174
|
+
return newMutationStep({ ...stepConfiguration, operation: connection.operations.deleteVoice(), connection: connection.reference, branches: [
|
|
175
|
+
goToBranch("deleted", deleted),
|
|
176
|
+
...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
|
|
177
|
+
...invalidResponse ? [goToBranch("invalidResponse", invalidResponse)] : [],
|
|
178
|
+
...defect ? [goToBranch("defect", defect)] : []
|
|
179
|
+
] });
|
|
180
|
+
}
|
|
181
|
+
function newUpdateVoiceSettingsStep(configuration) {
|
|
182
|
+
const { connection, connectionName, updated, notFound, providerRejected, defect, maxSends, ...stepConfiguration } = configuration;
|
|
183
|
+
if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
|
|
184
|
+
return newMutationStep({ ...stepConfiguration, operation: connection.operations.updateVoiceSettings(), connection: connection.reference, branches: [
|
|
185
|
+
goToBranch("updated", updated),
|
|
186
|
+
...notFound ? [goToBranch("notFound", notFound)] : [],
|
|
187
|
+
...providerRejected ? [goToBranch("providerRejected", providerRejected)] : [],
|
|
188
|
+
...defect ? [goToBranch("defect", defect)] : []
|
|
189
|
+
] });
|
|
190
|
+
}
|
|
32
191
|
function newListVoicesStep(configuration) {
|
|
33
192
|
const { connection, connectionName, listed, providerRejected, invalidResponse, defect, ...stepConfiguration } = configuration;
|
|
34
193
|
if (!connection || connection.reference.name !== connectionName) throw new TypeError("Step connection name differs from the bound connection");
|
|
@@ -55,11 +214,11 @@ import { SecretString as SecretString2 } from "@superdurable/connectors-sdk";
|
|
|
55
214
|
import { z } from "zod";
|
|
56
215
|
|
|
57
216
|
// src/client.ts
|
|
58
|
-
import { BodyTooLargeError, isHeaderSafeCredential, parseRetryAfter, sendProviderRequest, validateBaseURL } from "@superdurable/connectors-sdk/providerhttp";
|
|
59
|
-
import { SecretString, newQueryBranch as newQueryBranch2, newQueryRetry } from "@superdurable/connectors-sdk";
|
|
217
|
+
import { BodyTooLargeError, ProviderTransportError, isHeaderSafeCredential, parseRetryAfter, sendProviderRequest, validateBaseURL } from "@superdurable/connectors-sdk/providerhttp";
|
|
218
|
+
import { SecretString, newMutationBranch as newMutationBranch2, newMutationRetry, newQueryBranch as newQueryBranch2, newQueryRetry } from "@superdurable/connectors-sdk";
|
|
60
219
|
|
|
61
220
|
// src/operations.ts
|
|
62
|
-
import { newQueryBranch } from "@superdurable/connectors-sdk";
|
|
221
|
+
import { newMutationBranch, newQueryBranch } from "@superdurable/connectors-sdk";
|
|
63
222
|
var emptyVoices = { voices: [], hasMore: false };
|
|
64
223
|
var emptySpeech = { audioBase64: "", contentType: "" };
|
|
65
224
|
var voiceIDPattern = /^[A-Za-z0-9_-]{1,128}$/;
|
|
@@ -123,8 +282,316 @@ function decodeSpeech(body) {
|
|
|
123
282
|
function isObject(value) {
|
|
124
283
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
125
284
|
}
|
|
285
|
+
var ListModelsOperation = class {
|
|
286
|
+
/** Bind the provider client. */
|
|
287
|
+
constructor(client) {
|
|
288
|
+
this.client = client;
|
|
289
|
+
}
|
|
290
|
+
client;
|
|
291
|
+
/** Return the manifest Query contract. */
|
|
292
|
+
definition() {
|
|
293
|
+
return ListModelsDefinition;
|
|
294
|
+
}
|
|
295
|
+
/** Validate input and classify the provider response. */
|
|
296
|
+
async invoke(call, input) {
|
|
297
|
+
const operation = "listModels";
|
|
298
|
+
if (!isObject(input)) return queryDefect(operation, emptyModels, "model catalog input is invalid");
|
|
299
|
+
return this.client.invokeQuery(call, operation, "listed", "GET", "/v1/models", new URLSearchParams(), void 0, emptyModels, modelCatalog);
|
|
300
|
+
}
|
|
301
|
+
};
|
|
302
|
+
var ListHistoryItemsOperation = class {
|
|
303
|
+
/** Bind the provider client. */
|
|
304
|
+
constructor(client) {
|
|
305
|
+
this.client = client;
|
|
306
|
+
}
|
|
307
|
+
client;
|
|
308
|
+
/** Return the manifest Query contract. */
|
|
309
|
+
definition() {
|
|
310
|
+
return ListHistoryItemsDefinition;
|
|
311
|
+
}
|
|
312
|
+
/** Validate input and classify the provider response. */
|
|
313
|
+
async invoke(call, input) {
|
|
314
|
+
const operation = "listHistoryItems";
|
|
315
|
+
const { pageSize = 0, startAfterHistoryItemId = "", voiceId = "", modelId = "", source = "" } = input;
|
|
316
|
+
if (!Number.isSafeInteger(pageSize) || pageSize < 0 || pageSize > 1e3 || [startAfterHistoryItemId, voiceId, modelId].some((value) => value && !isVoiceID(value)) || modelId && !source || !["", "TTS", "STS", "Flows"].includes(source)) {
|
|
317
|
+
return queryDefect(operation, emptyHistoryPage, "history page filters are invalid");
|
|
318
|
+
}
|
|
319
|
+
const query = new URLSearchParams();
|
|
320
|
+
if (pageSize) query.set("page_size", String(pageSize));
|
|
321
|
+
if (startAfterHistoryItemId) query.set("start_after_history_item_id", startAfterHistoryItemId);
|
|
322
|
+
if (voiceId) query.set("voice_id", voiceId);
|
|
323
|
+
if (modelId) query.set("model_id", modelId);
|
|
324
|
+
if (source) query.set("source", source);
|
|
325
|
+
query.sort();
|
|
326
|
+
return this.client.invokeQuery(call, operation, "listed", "GET", "/v1/history", query, void 0, emptyHistoryPage, historyPage);
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
var GetHistoryItemOperation = class {
|
|
330
|
+
/** Bind the provider client. */
|
|
331
|
+
constructor(client) {
|
|
332
|
+
this.client = client;
|
|
333
|
+
}
|
|
334
|
+
client;
|
|
335
|
+
/** Return the manifest Query contract. */
|
|
336
|
+
definition() {
|
|
337
|
+
return GetHistoryItemDefinition;
|
|
338
|
+
}
|
|
339
|
+
/** Validate input and classify the provider response. */
|
|
340
|
+
async invoke(call, input) {
|
|
341
|
+
const operation = "getHistoryItem";
|
|
342
|
+
if (!isVoiceID(input.historyItemId)) return queryDefect(operation, emptyHistory, "history item ID is invalid");
|
|
343
|
+
return this.client.invokeQuery(call, operation, "found", "GET", `/v1/history/${input.historyItemId}`, new URLSearchParams(), void 0, emptyHistory, (bytes) => {
|
|
344
|
+
const item = historyMetadata(parseJSON(bytes));
|
|
345
|
+
if (item.historyItemId !== input.historyItemId) throw new TypeError("history identity differs");
|
|
346
|
+
return item;
|
|
347
|
+
}, true);
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
var DeleteHistoryItemOperation = class {
|
|
351
|
+
/** Bind the provider client. */
|
|
352
|
+
constructor(client) {
|
|
353
|
+
this.client = client;
|
|
354
|
+
}
|
|
355
|
+
client;
|
|
356
|
+
/** Return the manifest Mutation contract. */
|
|
357
|
+
definition() {
|
|
358
|
+
return DeleteHistoryItemDefinition;
|
|
359
|
+
}
|
|
360
|
+
/** Preserve one call identity across retries. */
|
|
361
|
+
idempotencyKey(callId) {
|
|
362
|
+
return callId;
|
|
363
|
+
}
|
|
364
|
+
/** Validate input and classify the provider response. */
|
|
365
|
+
async invoke(call, input) {
|
|
366
|
+
const operation = "deleteHistoryItem";
|
|
367
|
+
if (!isVoiceID(input.historyItemId)) return mutationDefect(operation, emptyDeletion, "history item ID is invalid");
|
|
368
|
+
return this.client[elevenLabsWrite](
|
|
369
|
+
call,
|
|
370
|
+
operation,
|
|
371
|
+
"deleted",
|
|
372
|
+
{ method: "DELETE", path: `/v1/history/${input.historyItemId}`, absentIsSuccess: true },
|
|
373
|
+
emptyDeletion,
|
|
374
|
+
{ historyItemId: input.historyItemId, deleted: true }
|
|
375
|
+
);
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
var GetVoiceOperation = class {
|
|
379
|
+
/** Bind the provider client. */
|
|
380
|
+
constructor(client) {
|
|
381
|
+
this.client = client;
|
|
382
|
+
}
|
|
383
|
+
client;
|
|
384
|
+
/** Return the manifest Query contract. */
|
|
385
|
+
definition() {
|
|
386
|
+
return GetVoiceDefinition;
|
|
387
|
+
}
|
|
388
|
+
/** Validate input and classify the provider response. */
|
|
389
|
+
async invoke(call, input) {
|
|
390
|
+
const operation = "getVoice";
|
|
391
|
+
if (!isVoiceID(input.voiceId)) return queryDefect(operation, emptyVoice, "voiceId is invalid");
|
|
392
|
+
return this.client.invokeQuery(
|
|
393
|
+
call,
|
|
394
|
+
operation,
|
|
395
|
+
"found",
|
|
396
|
+
"GET",
|
|
397
|
+
`/v1/voices/${input.voiceId}`,
|
|
398
|
+
new URLSearchParams(),
|
|
399
|
+
void 0,
|
|
400
|
+
emptyVoice,
|
|
401
|
+
(bytes) => {
|
|
402
|
+
const voice = asObject(parseJSON(bytes));
|
|
403
|
+
const voiceId = readString(field(voice, "voice_id")), name = readString(field(voice, "name"));
|
|
404
|
+
if (!isVoiceID(voiceId) || !name) throw new TypeError("voice identity missing");
|
|
405
|
+
return { voiceId, name };
|
|
406
|
+
},
|
|
407
|
+
true
|
|
408
|
+
);
|
|
409
|
+
}
|
|
410
|
+
};
|
|
411
|
+
var EditVoiceMetadataOperation = class {
|
|
412
|
+
/** Bind the provider client. */
|
|
413
|
+
constructor(client) {
|
|
414
|
+
this.client = client;
|
|
415
|
+
}
|
|
416
|
+
client;
|
|
417
|
+
/** Return the manifest Mutation contract. */
|
|
418
|
+
definition() {
|
|
419
|
+
return EditVoiceMetadataDefinition;
|
|
420
|
+
}
|
|
421
|
+
/** Preserve one call identity across retries. */
|
|
422
|
+
idempotencyKey(callId) {
|
|
423
|
+
return callId;
|
|
424
|
+
}
|
|
425
|
+
/** Validate input and classify the provider response. */
|
|
426
|
+
async invoke(call, input) {
|
|
427
|
+
const operation = "editVoiceMetadata";
|
|
428
|
+
const description = input.description ?? "";
|
|
429
|
+
if (!isVoiceID(input.voiceId) || !input.name.trim() || !isDisplayText(input.name, 256) || !isDisplayText(description, 1e3)) {
|
|
430
|
+
return mutationDefect(operation, emptyEdit, "voice ID, name, or description is invalid");
|
|
431
|
+
}
|
|
432
|
+
const fields = new FormData();
|
|
433
|
+
fields.set("name", input.name);
|
|
434
|
+
if (description) fields.set("description", description);
|
|
435
|
+
const multipart = new Response(fields);
|
|
436
|
+
const contentType = multipart.headers.get("Content-Type");
|
|
437
|
+
if (!contentType) return newMutationBranch("defect", emptyEdit, {}, validationFailure(operation, "LOCAL_DEFECT", "voice edit body could not be built"));
|
|
438
|
+
return this.client[elevenLabsWrite](call, operation, "edited", {
|
|
439
|
+
method: "POST",
|
|
440
|
+
path: `/v1/voices/${input.voiceId}/edit`,
|
|
441
|
+
body: new Uint8Array(await multipart.arrayBuffer()),
|
|
442
|
+
contentType
|
|
443
|
+
}, emptyEdit, { voiceId: input.voiceId, name: input.name });
|
|
444
|
+
}
|
|
445
|
+
};
|
|
446
|
+
var DeleteVoiceOperation = class {
|
|
447
|
+
/** Bind the provider client. */
|
|
448
|
+
constructor(client) {
|
|
449
|
+
this.client = client;
|
|
450
|
+
}
|
|
451
|
+
client;
|
|
452
|
+
/** Return the manifest Mutation contract. */
|
|
453
|
+
definition() {
|
|
454
|
+
return DeleteVoiceDefinition;
|
|
455
|
+
}
|
|
456
|
+
/** Preserve one call identity across retries. */
|
|
457
|
+
idempotencyKey(callId) {
|
|
458
|
+
return callId;
|
|
459
|
+
}
|
|
460
|
+
/** Validate input and classify the provider response. */
|
|
461
|
+
async invoke(call, input) {
|
|
462
|
+
const operation = "deleteVoice";
|
|
463
|
+
if (!isVoiceID(input.voiceId)) return mutationDefect(operation, emptyVoiceDeletion, "voice ID is invalid");
|
|
464
|
+
return this.client[elevenLabsWrite](
|
|
465
|
+
call,
|
|
466
|
+
operation,
|
|
467
|
+
"deleted",
|
|
468
|
+
{ method: "DELETE", path: `/v1/voices/${input.voiceId}`, absentIsSuccess: true },
|
|
469
|
+
emptyVoiceDeletion,
|
|
470
|
+
{ voiceId: input.voiceId, deleted: true }
|
|
471
|
+
);
|
|
472
|
+
}
|
|
473
|
+
};
|
|
474
|
+
var UpdateVoiceSettingsOperation = class {
|
|
475
|
+
/** Bind the provider client. */
|
|
476
|
+
constructor(client) {
|
|
477
|
+
this.client = client;
|
|
478
|
+
}
|
|
479
|
+
client;
|
|
480
|
+
/** Return the manifest Mutation contract. */
|
|
481
|
+
definition() {
|
|
482
|
+
return UpdateVoiceSettingsDefinition;
|
|
483
|
+
}
|
|
484
|
+
/** Preserve one call identity across retries. */
|
|
485
|
+
idempotencyKey(callId) {
|
|
486
|
+
return callId;
|
|
487
|
+
}
|
|
488
|
+
/** Validate input and classify the provider response. */
|
|
489
|
+
async invoke(call, input) {
|
|
490
|
+
const operation = "updateVoiceSettings";
|
|
491
|
+
if (!isVoiceID(input.voiceId) || !Number.isFinite(input.speed) || input.speed <= 0 || ![input.stability, input.similarityBoost, input.style].every((value) => value >= 0 && value <= 1)) {
|
|
492
|
+
return mutationDefect(operation, emptySettings, "voice ID or settings are invalid");
|
|
493
|
+
}
|
|
494
|
+
const body = Buffer.from(JSON.stringify({
|
|
495
|
+
stability: input.stability,
|
|
496
|
+
similarity_boost: input.similarityBoost,
|
|
497
|
+
style: input.style,
|
|
498
|
+
speed: input.speed,
|
|
499
|
+
use_speaker_boost: input.useSpeakerBoost
|
|
500
|
+
}));
|
|
501
|
+
return this.client[elevenLabsWrite](call, operation, "updated", {
|
|
502
|
+
method: "POST",
|
|
503
|
+
path: `/v1/voices/${input.voiceId}/settings/edit`,
|
|
504
|
+
body
|
|
505
|
+
}, emptySettings, { voiceId: input.voiceId });
|
|
506
|
+
}
|
|
507
|
+
};
|
|
508
|
+
var emptyModels = { models: [] };
|
|
509
|
+
var emptyHistoryPage = { items: [], hasMore: false };
|
|
510
|
+
var emptyHistory = { historyItemId: "", dateUnix: 0, contentType: "" };
|
|
511
|
+
var emptyDeletion = { historyItemId: "", deleted: false };
|
|
512
|
+
var emptyVoice = { voiceId: "", name: "" };
|
|
513
|
+
var emptyEdit = { voiceId: "", name: "" };
|
|
514
|
+
var emptyVoiceDeletion = { voiceId: "", deleted: false };
|
|
515
|
+
var emptySettings = { voiceId: "" };
|
|
516
|
+
function isVoiceID(value) {
|
|
517
|
+
return voiceIDPattern.exec(value)?.[0] === value;
|
|
518
|
+
}
|
|
519
|
+
function isDisplayText(value, limit) {
|
|
520
|
+
return ![...value].some((character) => {
|
|
521
|
+
const point = character.charCodeAt(0);
|
|
522
|
+
return point < 32 || point >= 127 && point <= 159;
|
|
523
|
+
}) && !/[\uD800-\uDFFF]/u.test(value) && Buffer.byteLength(value) <= limit;
|
|
524
|
+
}
|
|
525
|
+
function modelCatalog(body) {
|
|
526
|
+
const list = parseJSON(body);
|
|
527
|
+
if (!Array.isArray(list)) throw new TypeError("model catalog missing");
|
|
528
|
+
return { models: list.map((row) => {
|
|
529
|
+
const document = asObject(row);
|
|
530
|
+
const modelId = readString(field(document, "model_id"));
|
|
531
|
+
const maximumTextLengthPerRequest = readInteger(field(document, "maximum_text_length_per_request"));
|
|
532
|
+
const supported = field(document, "can_do_text_to_speech");
|
|
533
|
+
if (!isVoiceID(modelId) || maximumTextLengthPerRequest < 0 || supported != null && typeof supported !== "boolean") {
|
|
534
|
+
throw new TypeError("model metadata invalid");
|
|
535
|
+
}
|
|
536
|
+
return { modelId, name: readString(field(document, "name")), maximumTextLengthPerRequest, canDoTextToSpeech: supported ?? false };
|
|
537
|
+
}) };
|
|
538
|
+
}
|
|
539
|
+
function historyMetadata(value) {
|
|
540
|
+
const document = asObject(value);
|
|
541
|
+
const historyItemId = readString(field(document, "history_item_id"));
|
|
542
|
+
const dateUnix = readInteger(field(document, "date_unix"));
|
|
543
|
+
const voiceId = readString(field(document, "voice_id"));
|
|
544
|
+
const modelId = readString(field(document, "model_id"));
|
|
545
|
+
const contentType = readString(field(document, "content_type"));
|
|
546
|
+
const source = readString(field(document, "source"));
|
|
547
|
+
if (!isVoiceID(historyItemId) || dateUnix <= 0 || !contentType.trim() || voiceId && !isVoiceID(voiceId) || modelId && !isVoiceID(modelId)) throw new TypeError("history metadata invalid");
|
|
548
|
+
return { historyItemId, dateUnix, contentType, ...voiceId ? { voiceId } : {}, ...modelId ? { modelId } : {}, ...source ? { source } : {} };
|
|
549
|
+
}
|
|
550
|
+
function historyPage(body) {
|
|
551
|
+
const document = asObject(parseJSON(body));
|
|
552
|
+
const history = field(document, "history"), hasMore = field(document, "has_more");
|
|
553
|
+
const lastHistoryItemId = readString(field(document, "last_history_item_id"));
|
|
554
|
+
if (!Array.isArray(history) || typeof hasMore !== "boolean" || hasMore && !isVoiceID(lastHistoryItemId)) {
|
|
555
|
+
throw new TypeError("history page invalid");
|
|
556
|
+
}
|
|
557
|
+
return { items: history.map(historyMetadata), hasMore, ...lastHistoryItemId ? { lastHistoryItemId } : {} };
|
|
558
|
+
}
|
|
559
|
+
function parseJSON(body) {
|
|
560
|
+
return JSON.parse(Buffer.from(body).toString("utf8"), (key, value, context) => {
|
|
561
|
+
if (["date_unix", "maximum_text_length_per_request"].includes(key.toLowerCase()) && typeof value === "number" && context?.source && !/^-?[0-9]+$/u.test(context.source)) return Number.NaN;
|
|
562
|
+
return value;
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
function asObject(value) {
|
|
566
|
+
if (!isObject(value)) throw new TypeError("ElevenLabs response object missing");
|
|
567
|
+
return value;
|
|
568
|
+
}
|
|
569
|
+
function field(document, name) {
|
|
570
|
+
const key = Object.keys(document).reverse().find((candidate) => candidate.toLowerCase() === name);
|
|
571
|
+
return key === void 0 ? void 0 : document[key];
|
|
572
|
+
}
|
|
573
|
+
function readString(value) {
|
|
574
|
+
if (value == null) return "";
|
|
575
|
+
if (typeof value !== "string") throw new TypeError("ElevenLabs response string invalid");
|
|
576
|
+
return value;
|
|
577
|
+
}
|
|
578
|
+
function readInteger(value) {
|
|
579
|
+
if (value == null) return 0;
|
|
580
|
+
if (typeof value !== "number" || !Number.isSafeInteger(value)) throw new TypeError("ElevenLabs response integer invalid");
|
|
581
|
+
return value;
|
|
582
|
+
}
|
|
583
|
+
function queryDefect(operation, value, message) {
|
|
584
|
+
return newQueryBranch("defect", value, {}, validationFailure(operation, "VALIDATION", message));
|
|
585
|
+
}
|
|
586
|
+
function mutationDefect(operation, value, message) {
|
|
587
|
+
return newMutationBranch("defect", value, {}, validationFailure(operation, "VALIDATION", message));
|
|
588
|
+
}
|
|
589
|
+
function validationFailure(operation, kind, message) {
|
|
590
|
+
return { kind, provider: "elevenlabs", operation, message };
|
|
591
|
+
}
|
|
126
592
|
|
|
127
593
|
// src/client.ts
|
|
594
|
+
var elevenLabsWrite = /* @__PURE__ */ Symbol("ElevenLabs write dispatch");
|
|
128
595
|
var ElevenLabsClient = class {
|
|
129
596
|
baseUrl;
|
|
130
597
|
timeoutMs;
|
|
@@ -152,8 +619,81 @@ var ElevenLabsClient = class {
|
|
|
152
619
|
createSpeech() {
|
|
153
620
|
return new CreateSpeechOperation(this);
|
|
154
621
|
}
|
|
622
|
+
/** List available ElevenLabs speech models and input limits. */
|
|
623
|
+
listModels() {
|
|
624
|
+
return new ListModelsOperation(this);
|
|
625
|
+
}
|
|
626
|
+
/** List operational metadata for generated history items. */
|
|
627
|
+
listHistoryItems() {
|
|
628
|
+
return new ListHistoryItemsOperation(this);
|
|
629
|
+
}
|
|
630
|
+
/** Read one history item's operational metadata. */
|
|
631
|
+
getHistoryItem() {
|
|
632
|
+
return new GetHistoryItemOperation(this);
|
|
633
|
+
}
|
|
634
|
+
/** Permanently delete one generated history item. */
|
|
635
|
+
deleteHistoryItem() {
|
|
636
|
+
return new DeleteHistoryItemOperation(this);
|
|
637
|
+
}
|
|
638
|
+
/** Read one ElevenLabs voice ID and name. */
|
|
639
|
+
getVoice() {
|
|
640
|
+
return new GetVoiceOperation(this);
|
|
641
|
+
}
|
|
642
|
+
/** Replace a voice name and optionally its description. */
|
|
643
|
+
editVoiceMetadata() {
|
|
644
|
+
return new EditVoiceMetadataOperation(this);
|
|
645
|
+
}
|
|
646
|
+
/** Permanently delete one ElevenLabs voice. */
|
|
647
|
+
deleteVoice() {
|
|
648
|
+
return new DeleteVoiceOperation(this);
|
|
649
|
+
}
|
|
650
|
+
/** Replace the five generation settings for one voice. */
|
|
651
|
+
updateVoiceSettings() {
|
|
652
|
+
return new UpdateVoiceSettingsOperation(this);
|
|
653
|
+
}
|
|
155
654
|
/** Send one request and classify its status before decoding its body. */
|
|
156
|
-
async invokeQuery(call, operation, success, method, path, query, body, empty, decode) {
|
|
655
|
+
async invokeQuery(call, operation, success, method, path, query, body, empty, decode, hasNotFoundBranch = false) {
|
|
656
|
+
const response = await this.exchange(call, method, path, query, body);
|
|
657
|
+
if (response.error === "credential") return failed(operation, "defect", empty, "AUTHENTICATION", "connection credentials are unavailable or invalid");
|
|
658
|
+
if (response.error === "request") return newQueryRetry(failure(operation, "AVAILABILITY", "provider request failed"));
|
|
659
|
+
const transient = transientStatus(response.status);
|
|
660
|
+
if (transient) return newQueryRetry(failure(operation, ...transient), response.retryAfterMs);
|
|
661
|
+
if (response.status === 404 && hasNotFoundBranch) return failed(operation, "notFound", empty, "NOT_FOUND", "provider did not find the resource");
|
|
662
|
+
if (response.status !== 200) return failed(operation, "providerRejected", empty, "PROVIDER_REJECTION", `provider rejected the request with HTTP ${response.status}`);
|
|
663
|
+
if (response.error === "tooLarge") return failed(operation, "invalidResponse", empty, "RESPONSE_TOO_LARGE", "provider response exceeded the configured limit");
|
|
664
|
+
if (response.error) return newQueryRetry(failure(operation, "AVAILABILITY", "provider response was interrupted"));
|
|
665
|
+
try {
|
|
666
|
+
return newQueryBranch2(success, decode(response.body), {});
|
|
667
|
+
} catch {
|
|
668
|
+
return failed(operation, "invalidResponse", empty, "PROTOCOL", "provider returned an invalid response");
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
async [elevenLabsWrite](call, operation, branch, request, empty, value) {
|
|
672
|
+
const response = await this.exchange(call, request.method, request.path, new URLSearchParams(), request.body, request.contentType);
|
|
673
|
+
const transportKind = operation === "updateVoiceSettings" ? "AVAILABILITY" : "TRANSPORT";
|
|
674
|
+
if (response.error === "credential") return failedWrite(operation, "defect", empty, "AUTHENTICATION", "connection credentials are unavailable or invalid");
|
|
675
|
+
if (response.error === "request") return newMutationRetry(failure(operation, transportKind, "provider request failed"));
|
|
676
|
+
const transient = transientStatus(response.status);
|
|
677
|
+
if (transient) return newMutationRetry(failure(operation, ...transient), response.retryAfterMs);
|
|
678
|
+
if (response.status === 404 && request.absentIsSuccess) return newMutationBranch2(branch, value);
|
|
679
|
+
if (response.status !== 200) {
|
|
680
|
+
if (isDefiniteRefusal(response)) {
|
|
681
|
+
if (response.status === 404) return failedWrite(operation, "notFound", empty, "NOT_FOUND", "provider did not find the voice");
|
|
682
|
+
return failedWrite(operation, "providerRejected", empty, "PROVIDER_REJECTION", `ElevenLabs rejected HTTP ${response.status}`);
|
|
683
|
+
}
|
|
684
|
+
return newMutationRetry(failure(operation, "AVAILABILITY", "provider write outcome is unknown"), response.retryAfterMs);
|
|
685
|
+
}
|
|
686
|
+
const confirmationDelay = operation === "updateVoiceSettings" ? 0 : response.retryAfterMs;
|
|
687
|
+
if (response.error === "tooLarge") return newMutationRetry(failure(operation, "RESPONSE_TOO_LARGE", "provider confirmation exceeded the configured limit"), confirmationDelay);
|
|
688
|
+
if (response.error) return newMutationRetry(failure(operation, transportKind, "provider response was interrupted"));
|
|
689
|
+
try {
|
|
690
|
+
if (field2(parseObject(response.body), "status") !== "ok") throw new TypeError("provider confirmation missing");
|
|
691
|
+
} catch {
|
|
692
|
+
return newMutationRetry(failure(operation, "PROTOCOL", "provider confirmation was unusable"), confirmationDelay);
|
|
693
|
+
}
|
|
694
|
+
return newMutationBranch2(branch, value);
|
|
695
|
+
}
|
|
696
|
+
async exchange(call, method, path, query, body, contentType = "application/json") {
|
|
157
697
|
let key;
|
|
158
698
|
try {
|
|
159
699
|
const resolved = await this.credentials.resolve(call, call.context.cancellationSignal);
|
|
@@ -161,44 +701,41 @@ var ElevenLabsClient = class {
|
|
|
161
701
|
key = resolved.apiKey.reveal();
|
|
162
702
|
if (!isHeaderSafeCredential(key)) throw new TypeError("API key is invalid");
|
|
163
703
|
} catch {
|
|
164
|
-
return
|
|
704
|
+
return { status: 0, body: new Uint8Array(), retryAfterMs: 0, error: "credential" };
|
|
165
705
|
}
|
|
166
706
|
const encodedQuery = query.toString();
|
|
167
707
|
const request = {
|
|
168
708
|
url: `${this.baseUrl}${path}${encodedQuery ? `?${encodedQuery}` : ""}`,
|
|
169
709
|
method,
|
|
170
|
-
headers: { "xi-api-key": key, Accept: path.startsWith("/v1/text-to-speech/") ? "audio/mpeg" : "application/json", ...body ? { "Content-Type":
|
|
710
|
+
headers: { "xi-api-key": key, Accept: path.startsWith("/v1/text-to-speech/") ? "audio/mpeg" : "application/json", ...body ? { "Content-Type": contentType } : {} },
|
|
171
711
|
...body ? { body } : {},
|
|
172
712
|
maxResponseBytes: this.maxResponseBytes,
|
|
173
713
|
addressPolicy: this.baseUrl.startsWith("http://") ? "privateNetworkHTTP" : "publicHTTPS",
|
|
174
714
|
timeoutMs: this.timeoutMs,
|
|
175
715
|
signal: call.context.cancellationSignal
|
|
176
716
|
};
|
|
177
|
-
let response;
|
|
178
|
-
let isTooLarge = false;
|
|
179
717
|
try {
|
|
180
|
-
response = await this.send(request);
|
|
718
|
+
const response = await this.send(request);
|
|
719
|
+
const retryAfterMs = parseRetryAfter(header(response, "retry-after"), this.now());
|
|
720
|
+
if (response.body.length > this.maxResponseBytes) {
|
|
721
|
+
return { status: response.status, body: new Uint8Array(), retryAfterMs, error: "tooLarge" };
|
|
722
|
+
}
|
|
723
|
+
return { status: response.status, body: response.body, retryAfterMs };
|
|
181
724
|
} catch (error) {
|
|
182
|
-
if (error instanceof BodyTooLargeError && error.status !== void 0) {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
if (status !== 200) return failed(operation, "providerRejected", empty, "PROVIDER_REJECTION", `provider rejected the request with HTTP ${status}`);
|
|
192
|
-
if (isTooLarge) return failed(operation, "invalidResponse", empty, "RESPONSE_TOO_LARGE", "provider response exceeded the configured limit");
|
|
193
|
-
try {
|
|
194
|
-
return newQueryBranch2(success, decode(response.body), {});
|
|
195
|
-
} catch {
|
|
196
|
-
return failed(operation, "invalidResponse", empty, "PROTOCOL", "provider returned an invalid response");
|
|
725
|
+
if ((error instanceof BodyTooLargeError || error instanceof ProviderTransportError) && error.status !== void 0) {
|
|
726
|
+
return {
|
|
727
|
+
status: error.status,
|
|
728
|
+
body: new Uint8Array(),
|
|
729
|
+
retryAfterMs: parseRetryAfter(header({ headers: error.headers ?? {} }, "retry-after"), this.now()),
|
|
730
|
+
error: error instanceof BodyTooLargeError ? "tooLarge" : "interrupted"
|
|
731
|
+
};
|
|
732
|
+
}
|
|
733
|
+
return { status: 0, body: new Uint8Array(), retryAfterMs: 0, error: "request" };
|
|
197
734
|
}
|
|
198
735
|
}
|
|
199
736
|
};
|
|
200
737
|
function header(response, name) {
|
|
201
|
-
const value = response.headers[name];
|
|
738
|
+
const value = Object.entries(response.headers).find(([key]) => key.toLowerCase() === name)?.[1];
|
|
202
739
|
return Array.isArray(value) ? value[0] ?? "" : value ?? "";
|
|
203
740
|
}
|
|
204
741
|
function failure(operation, kind, message) {
|
|
@@ -207,6 +744,42 @@ function failure(operation, kind, message) {
|
|
|
207
744
|
function failed(operation, branch, empty, kind, message) {
|
|
208
745
|
return newQueryBranch2(branch, empty, {}, failure(operation, kind, message));
|
|
209
746
|
}
|
|
747
|
+
function failedWrite(operation, branch, empty, kind, message) {
|
|
748
|
+
return newMutationBranch2(branch, empty, {}, failure(operation, kind, message));
|
|
749
|
+
}
|
|
750
|
+
function transientStatus(status) {
|
|
751
|
+
if (status === 429) return ["RATE_LIMIT", "provider rate limited the request"];
|
|
752
|
+
if (status === 408 || status >= 500) return ["AVAILABILITY", "provider is temporarily unavailable"];
|
|
753
|
+
return void 0;
|
|
754
|
+
}
|
|
755
|
+
var refusalStatuses = /* @__PURE__ */ new Set([400, 401, 403, 404, 411, 413, 414, 415, 422]);
|
|
756
|
+
function isDefiniteRefusal(response) {
|
|
757
|
+
if (response.error || !refusalStatuses.has(response.status)) return false;
|
|
758
|
+
try {
|
|
759
|
+
const document = parseObject(response.body);
|
|
760
|
+
const status = field2(document, "status");
|
|
761
|
+
if (status === "ok" || status != null && typeof status !== "string") return false;
|
|
762
|
+
const detail = field2(document, "detail");
|
|
763
|
+
if (typeof detail === "string") return !!detail.trim();
|
|
764
|
+
if (!isObject2(detail)) return false;
|
|
765
|
+
const detailStatus = field2(detail, "status"), message = field2(detail, "message");
|
|
766
|
+
return typeof detailStatus === "string" && !!detailStatus && typeof message === "string" && !!message;
|
|
767
|
+
} catch {
|
|
768
|
+
return false;
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
function parseObject(bytes) {
|
|
772
|
+
const value = JSON.parse(Buffer.from(bytes).toString("utf8"));
|
|
773
|
+
if (!isObject2(value)) throw new TypeError("ElevenLabs response object missing");
|
|
774
|
+
return value;
|
|
775
|
+
}
|
|
776
|
+
function isObject2(value) {
|
|
777
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
778
|
+
}
|
|
779
|
+
function field2(document, name) {
|
|
780
|
+
const key = Object.keys(document).reverse().find((candidate) => candidate.toLowerCase() === name);
|
|
781
|
+
return key === void 0 ? void 0 : document[key];
|
|
782
|
+
}
|
|
210
783
|
|
|
211
784
|
// src/project.ts
|
|
212
785
|
function newProjectConnection2(project, connectionName) {
|
|
@@ -238,7 +811,77 @@ export {
|
|
|
238
811
|
CreateSpeechMetadata,
|
|
239
812
|
CreateSpeechOperation,
|
|
240
813
|
CreateSpeechOutputSchema,
|
|
814
|
+
CredentialMaterialError,
|
|
815
|
+
DeleteHistoryItemBranch,
|
|
816
|
+
DeleteHistoryItemBranchDefect,
|
|
817
|
+
DeleteHistoryItemBranchDeleted,
|
|
818
|
+
DeleteHistoryItemBranchInvalidResponse,
|
|
819
|
+
DeleteHistoryItemBranchProviderRejected,
|
|
820
|
+
DeleteHistoryItemDefinition,
|
|
821
|
+
DeleteHistoryItemMetadata,
|
|
822
|
+
DeleteHistoryItemOperation,
|
|
823
|
+
DeleteVoiceBranch,
|
|
824
|
+
DeleteVoiceBranchDefect,
|
|
825
|
+
DeleteVoiceBranchDeleted,
|
|
826
|
+
DeleteVoiceBranchInvalidResponse,
|
|
827
|
+
DeleteVoiceBranchProviderRejected,
|
|
828
|
+
DeleteVoiceDefinition,
|
|
829
|
+
DeleteVoiceMetadata,
|
|
830
|
+
DeleteVoiceOperation,
|
|
831
|
+
DeletedHistoryItemSchema,
|
|
832
|
+
DeletedVoiceSchema,
|
|
833
|
+
EditVoiceMetadataBranch,
|
|
834
|
+
EditVoiceMetadataBranchDefect,
|
|
835
|
+
EditVoiceMetadataBranchEdited,
|
|
836
|
+
EditVoiceMetadataBranchInvalidResponse,
|
|
837
|
+
EditVoiceMetadataBranchNotFound,
|
|
838
|
+
EditVoiceMetadataBranchProviderRejected,
|
|
839
|
+
EditVoiceMetadataDefinition,
|
|
840
|
+
EditVoiceMetadataInputSchema,
|
|
841
|
+
EditVoiceMetadataMetadata,
|
|
842
|
+
EditVoiceMetadataOperation,
|
|
843
|
+
EditedVoiceMetadataSchema,
|
|
241
844
|
ElevenLabsClient,
|
|
845
|
+
GetHistoryItemBranch,
|
|
846
|
+
GetHistoryItemBranchDefect,
|
|
847
|
+
GetHistoryItemBranchFound,
|
|
848
|
+
GetHistoryItemBranchInvalidResponse,
|
|
849
|
+
GetHistoryItemBranchNotFound,
|
|
850
|
+
GetHistoryItemBranchProviderRejected,
|
|
851
|
+
GetHistoryItemDefinition,
|
|
852
|
+
GetHistoryItemMetadata,
|
|
853
|
+
GetHistoryItemOperation,
|
|
854
|
+
GetVoiceBranch,
|
|
855
|
+
GetVoiceBranchDefect,
|
|
856
|
+
GetVoiceBranchFound,
|
|
857
|
+
GetVoiceBranchInvalidResponse,
|
|
858
|
+
GetVoiceBranchNotFound,
|
|
859
|
+
GetVoiceBranchProviderRejected,
|
|
860
|
+
GetVoiceDefinition,
|
|
861
|
+
GetVoiceInputSchema,
|
|
862
|
+
GetVoiceMetadata,
|
|
863
|
+
GetVoiceOperation,
|
|
864
|
+
HistoryItemIdentityInputSchema,
|
|
865
|
+
HistoryItemMetadataSchema,
|
|
866
|
+
HistoryItemsPageSchema,
|
|
867
|
+
ListHistoryItemsBranch,
|
|
868
|
+
ListHistoryItemsBranchDefect,
|
|
869
|
+
ListHistoryItemsBranchInvalidResponse,
|
|
870
|
+
ListHistoryItemsBranchListed,
|
|
871
|
+
ListHistoryItemsBranchProviderRejected,
|
|
872
|
+
ListHistoryItemsDefinition,
|
|
873
|
+
ListHistoryItemsInputSchema,
|
|
874
|
+
ListHistoryItemsMetadata,
|
|
875
|
+
ListHistoryItemsOperation,
|
|
876
|
+
ListModelsBranch,
|
|
877
|
+
ListModelsBranchDefect,
|
|
878
|
+
ListModelsBranchInvalidResponse,
|
|
879
|
+
ListModelsBranchListed,
|
|
880
|
+
ListModelsBranchProviderRejected,
|
|
881
|
+
ListModelsDefinition,
|
|
882
|
+
ListModelsInputSchema,
|
|
883
|
+
ListModelsMetadata,
|
|
884
|
+
ListModelsOperation,
|
|
242
885
|
ListVoicesBranch,
|
|
243
886
|
ListVoicesBranchDefect,
|
|
244
887
|
ListVoicesBranchInvalidResponse,
|
|
@@ -249,11 +892,33 @@ export {
|
|
|
249
892
|
ListVoicesMetadata,
|
|
250
893
|
ListVoicesOperation,
|
|
251
894
|
ListVoicesOutputSchema,
|
|
895
|
+
ModelMetadataSchema,
|
|
896
|
+
ModelsListSchema,
|
|
252
897
|
ProviderID,
|
|
898
|
+
UpdateVoiceSettingsBranch,
|
|
899
|
+
UpdateVoiceSettingsBranchDefect,
|
|
900
|
+
UpdateVoiceSettingsBranchNotFound,
|
|
901
|
+
UpdateVoiceSettingsBranchProviderRejected,
|
|
902
|
+
UpdateVoiceSettingsBranchUpdated,
|
|
903
|
+
UpdateVoiceSettingsDefinition,
|
|
904
|
+
UpdateVoiceSettingsInputSchema,
|
|
905
|
+
UpdateVoiceSettingsMetadata,
|
|
906
|
+
UpdateVoiceSettingsOperation,
|
|
907
|
+
UpdatedVoiceSettingsSchema,
|
|
253
908
|
VoiceSchema,
|
|
909
|
+
decodeCredentials,
|
|
910
|
+
isCredentialMaterialError,
|
|
254
911
|
newConnection,
|
|
255
912
|
newConnectionWithOperations,
|
|
256
913
|
newCreateSpeechStep,
|
|
914
|
+
newDeleteHistoryItemStep,
|
|
915
|
+
newDeleteVoiceStep,
|
|
916
|
+
newEditVoiceMetadataStep,
|
|
917
|
+
newGetHistoryItemStep,
|
|
918
|
+
newGetVoiceStep,
|
|
919
|
+
newListHistoryItemsStep,
|
|
920
|
+
newListModelsStep,
|
|
257
921
|
newListVoicesStep,
|
|
258
|
-
newProjectConnection2 as newProjectConnection
|
|
922
|
+
newProjectConnection2 as newProjectConnection,
|
|
923
|
+
newUpdateVoiceSettingsStep
|
|
259
924
|
};
|