@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
|
@@ -0,0 +1,481 @@
|
|
|
1
|
+
// src/generated/models.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { SecretString } from "@superdurable/connectors-sdk";
|
|
4
|
+
var ConfigSchema = z.object({
|
|
5
|
+
"baseUrl": z.string().optional(),
|
|
6
|
+
"timeoutMs": z.number().int().optional(),
|
|
7
|
+
"maxResponseBytes": z.number().int().optional()
|
|
8
|
+
});
|
|
9
|
+
var CredentialMaterialError = class extends TypeError {
|
|
10
|
+
constructor(message) {
|
|
11
|
+
super(message);
|
|
12
|
+
this.name = "CredentialMaterialError";
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
var sdkCredentialDecodingFailureMessages = /* @__PURE__ */ new Set([
|
|
16
|
+
"project credential decoding failed",
|
|
17
|
+
"shared project credential decoding failed",
|
|
18
|
+
"project credential decoding failed: this connector version does not support shared credentials"
|
|
19
|
+
]);
|
|
20
|
+
function isCredentialMaterialError(error) {
|
|
21
|
+
return error instanceof CredentialMaterialError || error instanceof TypeError && sdkCredentialDecodingFailureMessages.has(error.message);
|
|
22
|
+
}
|
|
23
|
+
function decodeCredentials(value) {
|
|
24
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new CredentialMaterialError("credential fields are invalid");
|
|
25
|
+
const fields = value;
|
|
26
|
+
const allowed = /* @__PURE__ */ new Set(["api_key"]);
|
|
27
|
+
if (Object.keys(fields).some((key) => !allowed.has(key))) throw new CredentialMaterialError("stored credential does not match the connector credential fields");
|
|
28
|
+
if (fields["api_key"] != null && !(typeof fields["api_key"] === "string")) throw new CredentialMaterialError("credential api_key has an invalid type");
|
|
29
|
+
const credentials = {};
|
|
30
|
+
if (!fields["api_key"]) throw new CredentialMaterialError("credential api_key is required");
|
|
31
|
+
credentials.apiKey = new SecretString(fields["api_key"] ?? "");
|
|
32
|
+
return credentials;
|
|
33
|
+
}
|
|
34
|
+
var ListModelsInputSchema = z.strictObject({});
|
|
35
|
+
var ModelMetadataSchema = z.strictObject({
|
|
36
|
+
"modelId": z.string(),
|
|
37
|
+
"name": z.string(),
|
|
38
|
+
"canDoTextToSpeech": z.boolean(),
|
|
39
|
+
"maximumTextLengthPerRequest": z.number().int()
|
|
40
|
+
});
|
|
41
|
+
var ModelsListSchema = z.strictObject({
|
|
42
|
+
"models": z.array(ModelMetadataSchema).nullable()
|
|
43
|
+
});
|
|
44
|
+
var ListHistoryItemsInputSchema = z.strictObject({
|
|
45
|
+
"pageSize": z.number().int().optional(),
|
|
46
|
+
"startAfterHistoryItemId": z.string().optional(),
|
|
47
|
+
"voiceId": z.string().optional(),
|
|
48
|
+
"modelId": z.string().optional(),
|
|
49
|
+
"source": z.string().optional()
|
|
50
|
+
});
|
|
51
|
+
var HistoryItemMetadataSchema = z.strictObject({
|
|
52
|
+
"historyItemId": z.string(),
|
|
53
|
+
"dateUnix": z.number().int(),
|
|
54
|
+
"voiceId": z.string().optional(),
|
|
55
|
+
"modelId": z.string().optional(),
|
|
56
|
+
"contentType": z.string(),
|
|
57
|
+
"source": z.string().optional()
|
|
58
|
+
});
|
|
59
|
+
var HistoryItemsPageSchema = z.strictObject({
|
|
60
|
+
"items": z.array(HistoryItemMetadataSchema).nullable(),
|
|
61
|
+
"hasMore": z.boolean(),
|
|
62
|
+
"lastHistoryItemId": z.string().optional()
|
|
63
|
+
});
|
|
64
|
+
var HistoryItemIdentityInputSchema = z.strictObject({
|
|
65
|
+
"historyItemId": z.string()
|
|
66
|
+
});
|
|
67
|
+
var DeletedHistoryItemSchema = z.strictObject({
|
|
68
|
+
"historyItemId": z.string(),
|
|
69
|
+
"deleted": z.boolean()
|
|
70
|
+
});
|
|
71
|
+
var GetVoiceInputSchema = z.strictObject({
|
|
72
|
+
"voiceId": z.string()
|
|
73
|
+
});
|
|
74
|
+
var VoiceSchema = z.strictObject({
|
|
75
|
+
"voiceId": z.string(),
|
|
76
|
+
"name": z.string()
|
|
77
|
+
});
|
|
78
|
+
var EditVoiceMetadataInputSchema = z.strictObject({
|
|
79
|
+
"voiceId": z.string(),
|
|
80
|
+
"name": z.string(),
|
|
81
|
+
"description": z.string().optional()
|
|
82
|
+
});
|
|
83
|
+
var EditedVoiceMetadataSchema = z.strictObject({
|
|
84
|
+
"voiceId": z.string(),
|
|
85
|
+
"name": z.string()
|
|
86
|
+
});
|
|
87
|
+
var DeletedVoiceSchema = z.strictObject({
|
|
88
|
+
"voiceId": z.string(),
|
|
89
|
+
"deleted": z.boolean()
|
|
90
|
+
});
|
|
91
|
+
var UpdateVoiceSettingsInputSchema = z.strictObject({
|
|
92
|
+
"voiceId": z.string(),
|
|
93
|
+
"stability": z.number(),
|
|
94
|
+
"similarityBoost": z.number(),
|
|
95
|
+
"style": z.number(),
|
|
96
|
+
"speed": z.number(),
|
|
97
|
+
"useSpeakerBoost": z.boolean()
|
|
98
|
+
});
|
|
99
|
+
var UpdatedVoiceSettingsSchema = z.strictObject({
|
|
100
|
+
"voiceId": z.string()
|
|
101
|
+
});
|
|
102
|
+
var ListVoicesInputSchema = z.strictObject({
|
|
103
|
+
"pageSize": z.number().int().optional(),
|
|
104
|
+
"nextPageToken": z.string().optional()
|
|
105
|
+
});
|
|
106
|
+
var ListVoicesOutputSchema = z.strictObject({
|
|
107
|
+
"voices": z.array(VoiceSchema).nullable(),
|
|
108
|
+
"hasMore": z.boolean(),
|
|
109
|
+
"nextPageToken": z.string().optional()
|
|
110
|
+
});
|
|
111
|
+
var CreateSpeechInputSchema = z.strictObject({
|
|
112
|
+
"voiceId": z.string(),
|
|
113
|
+
"text": z.string(),
|
|
114
|
+
"modelId": z.string().optional()
|
|
115
|
+
});
|
|
116
|
+
var CreateSpeechOutputSchema = z.strictObject({
|
|
117
|
+
"audioBase64": z.string(),
|
|
118
|
+
"contentType": z.string()
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
// src/generated/definitions.ts
|
|
122
|
+
var ConnectorID = "elevenlabs";
|
|
123
|
+
var ProviderID = "elevenlabs";
|
|
124
|
+
var ListModelsBranch = {
|
|
125
|
+
Listed: "listed",
|
|
126
|
+
ProviderRejected: "providerRejected",
|
|
127
|
+
InvalidResponse: "invalidResponse",
|
|
128
|
+
Defect: "defect"
|
|
129
|
+
};
|
|
130
|
+
var ListModelsBranchListed = ListModelsBranch.Listed;
|
|
131
|
+
var ListModelsBranchProviderRejected = ListModelsBranch.ProviderRejected;
|
|
132
|
+
var ListModelsBranchInvalidResponse = ListModelsBranch.InvalidResponse;
|
|
133
|
+
var ListModelsBranchDefect = ListModelsBranch.Defect;
|
|
134
|
+
var ListModelsDefinition = {
|
|
135
|
+
operation: { connectorId: ConnectorID, operationId: "listModels" },
|
|
136
|
+
branches: [
|
|
137
|
+
{ id: "listed", description: "ElevenLabs returned available models." },
|
|
138
|
+
{ id: "providerRejected", description: "ElevenLabs rejected model listing.", optional: true },
|
|
139
|
+
{ id: "invalidResponse", description: "ElevenLabs returned invalid model data.", optional: true },
|
|
140
|
+
{ id: "defect", description: "Credentials are unavailable or invalid.", optional: true }
|
|
141
|
+
],
|
|
142
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
|
|
143
|
+
};
|
|
144
|
+
var ListModelsMetadata = { kind: "query", idempotency: "none", authorization: "required" };
|
|
145
|
+
var ListHistoryItemsBranch = {
|
|
146
|
+
Listed: "listed",
|
|
147
|
+
ProviderRejected: "providerRejected",
|
|
148
|
+
InvalidResponse: "invalidResponse",
|
|
149
|
+
Defect: "defect"
|
|
150
|
+
};
|
|
151
|
+
var ListHistoryItemsBranchListed = ListHistoryItemsBranch.Listed;
|
|
152
|
+
var ListHistoryItemsBranchProviderRejected = ListHistoryItemsBranch.ProviderRejected;
|
|
153
|
+
var ListHistoryItemsBranchInvalidResponse = ListHistoryItemsBranch.InvalidResponse;
|
|
154
|
+
var ListHistoryItemsBranchDefect = ListHistoryItemsBranch.Defect;
|
|
155
|
+
var ListHistoryItemsDefinition = {
|
|
156
|
+
operation: { connectorId: ConnectorID, operationId: "listHistoryItems" },
|
|
157
|
+
branches: [
|
|
158
|
+
{ id: "listed", description: "ElevenLabs returned a history page." },
|
|
159
|
+
{ id: "providerRejected", description: "ElevenLabs rejected history listing.", optional: true },
|
|
160
|
+
{ id: "invalidResponse", description: "ElevenLabs returned invalid history data.", optional: true },
|
|
161
|
+
{ id: "defect", description: "History filters or credentials are invalid.", optional: true }
|
|
162
|
+
],
|
|
163
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
|
|
164
|
+
};
|
|
165
|
+
var ListHistoryItemsMetadata = { kind: "query", idempotency: "none", authorization: "required" };
|
|
166
|
+
var GetHistoryItemBranch = {
|
|
167
|
+
Found: "found",
|
|
168
|
+
NotFound: "notFound",
|
|
169
|
+
ProviderRejected: "providerRejected",
|
|
170
|
+
InvalidResponse: "invalidResponse",
|
|
171
|
+
Defect: "defect"
|
|
172
|
+
};
|
|
173
|
+
var GetHistoryItemBranchFound = GetHistoryItemBranch.Found;
|
|
174
|
+
var GetHistoryItemBranchNotFound = GetHistoryItemBranch.NotFound;
|
|
175
|
+
var GetHistoryItemBranchProviderRejected = GetHistoryItemBranch.ProviderRejected;
|
|
176
|
+
var GetHistoryItemBranchInvalidResponse = GetHistoryItemBranch.InvalidResponse;
|
|
177
|
+
var GetHistoryItemBranchDefect = GetHistoryItemBranch.Defect;
|
|
178
|
+
var GetHistoryItemDefinition = {
|
|
179
|
+
operation: { connectorId: ConnectorID, operationId: "getHistoryItem" },
|
|
180
|
+
branches: [
|
|
181
|
+
{ id: "found", description: "ElevenLabs returned the generated item." },
|
|
182
|
+
{ id: "notFound", description: "The generated item is unavailable.", optional: true },
|
|
183
|
+
{ id: "providerRejected", description: "ElevenLabs rejected item retrieval.", optional: true },
|
|
184
|
+
{ id: "invalidResponse", description: "ElevenLabs returned invalid item data.", optional: true },
|
|
185
|
+
{ id: "defect", description: "History item ID or credentials are invalid.", optional: true }
|
|
186
|
+
],
|
|
187
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
|
|
188
|
+
};
|
|
189
|
+
var GetHistoryItemMetadata = { kind: "query", idempotency: "none", authorization: "required" };
|
|
190
|
+
var DeleteHistoryItemBranch = {
|
|
191
|
+
Deleted: "deleted",
|
|
192
|
+
ProviderRejected: "providerRejected",
|
|
193
|
+
InvalidResponse: "invalidResponse",
|
|
194
|
+
Defect: "defect"
|
|
195
|
+
};
|
|
196
|
+
var DeleteHistoryItemBranchDeleted = DeleteHistoryItemBranch.Deleted;
|
|
197
|
+
var DeleteHistoryItemBranchProviderRejected = DeleteHistoryItemBranch.ProviderRejected;
|
|
198
|
+
var DeleteHistoryItemBranchInvalidResponse = DeleteHistoryItemBranch.InvalidResponse;
|
|
199
|
+
var DeleteHistoryItemBranchDefect = DeleteHistoryItemBranch.Defect;
|
|
200
|
+
var DeleteHistoryItemDefinition = {
|
|
201
|
+
operation: { connectorId: ConnectorID, operationId: "deleteHistoryItem" },
|
|
202
|
+
branches: [
|
|
203
|
+
{ id: "deleted", description: "The generated item is absent." },
|
|
204
|
+
{ id: "providerRejected", description: "ElevenLabs rejected deletion.", optional: true },
|
|
205
|
+
{ id: "invalidResponse", description: "ElevenLabs returned an invalid deletion confirmation.", optional: true },
|
|
206
|
+
{ id: "defect", description: "History item ID or credentials are invalid.", optional: true }
|
|
207
|
+
],
|
|
208
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" },
|
|
209
|
+
repeatOnUnknown: "safe"
|
|
210
|
+
};
|
|
211
|
+
var DeleteHistoryItemMetadata = { kind: "mutation", idempotency: "required", authorization: "required" };
|
|
212
|
+
var GetVoiceBranch = {
|
|
213
|
+
Found: "found",
|
|
214
|
+
NotFound: "notFound",
|
|
215
|
+
ProviderRejected: "providerRejected",
|
|
216
|
+
InvalidResponse: "invalidResponse",
|
|
217
|
+
Defect: "defect"
|
|
218
|
+
};
|
|
219
|
+
var GetVoiceBranchFound = GetVoiceBranch.Found;
|
|
220
|
+
var GetVoiceBranchNotFound = GetVoiceBranch.NotFound;
|
|
221
|
+
var GetVoiceBranchProviderRejected = GetVoiceBranch.ProviderRejected;
|
|
222
|
+
var GetVoiceBranchInvalidResponse = GetVoiceBranch.InvalidResponse;
|
|
223
|
+
var GetVoiceBranchDefect = GetVoiceBranch.Defect;
|
|
224
|
+
var GetVoiceDefinition = {
|
|
225
|
+
operation: { connectorId: ConnectorID, operationId: "getVoice" },
|
|
226
|
+
branches: [
|
|
227
|
+
{ id: "found", description: "ElevenLabs returned the requested voice." },
|
|
228
|
+
{ id: "notFound", description: "The voice does not exist.", optional: true },
|
|
229
|
+
{ id: "providerRejected", description: "ElevenLabs conclusively rejected the read.", optional: true },
|
|
230
|
+
{ id: "invalidResponse", description: "ElevenLabs returned malformed or oversized voice data.", optional: true },
|
|
231
|
+
{ id: "defect", description: "Local voice ID or credentials are invalid.", optional: true }
|
|
232
|
+
],
|
|
233
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
|
|
234
|
+
};
|
|
235
|
+
var GetVoiceMetadata = { kind: "query", idempotency: "none", authorization: "required" };
|
|
236
|
+
var EditVoiceMetadataBranch = {
|
|
237
|
+
Edited: "edited",
|
|
238
|
+
NotFound: "notFound",
|
|
239
|
+
ProviderRejected: "providerRejected",
|
|
240
|
+
InvalidResponse: "invalidResponse",
|
|
241
|
+
Defect: "defect"
|
|
242
|
+
};
|
|
243
|
+
var EditVoiceMetadataBranchEdited = EditVoiceMetadataBranch.Edited;
|
|
244
|
+
var EditVoiceMetadataBranchNotFound = EditVoiceMetadataBranch.NotFound;
|
|
245
|
+
var EditVoiceMetadataBranchProviderRejected = EditVoiceMetadataBranch.ProviderRejected;
|
|
246
|
+
var EditVoiceMetadataBranchInvalidResponse = EditVoiceMetadataBranch.InvalidResponse;
|
|
247
|
+
var EditVoiceMetadataBranchDefect = EditVoiceMetadataBranch.Defect;
|
|
248
|
+
var EditVoiceMetadataDefinition = {
|
|
249
|
+
operation: { connectorId: ConnectorID, operationId: "editVoiceMetadata" },
|
|
250
|
+
branches: [
|
|
251
|
+
{ id: "edited", description: "ElevenLabs accepted the voice metadata edit." },
|
|
252
|
+
{ id: "notFound", description: "The voice is unavailable.", optional: true },
|
|
253
|
+
{ id: "providerRejected", description: "ElevenLabs rejected the metadata edit.", optional: true },
|
|
254
|
+
{ id: "invalidResponse", description: "ElevenLabs returned an invalid edit confirmation.", optional: true },
|
|
255
|
+
{ id: "defect", description: "Voice ID and metadata or credentials are invalid.", optional: true }
|
|
256
|
+
],
|
|
257
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" },
|
|
258
|
+
repeatOnUnknown: "safe"
|
|
259
|
+
};
|
|
260
|
+
var EditVoiceMetadataMetadata = { kind: "mutation", idempotency: "required", authorization: "required" };
|
|
261
|
+
var DeleteVoiceBranch = {
|
|
262
|
+
Deleted: "deleted",
|
|
263
|
+
ProviderRejected: "providerRejected",
|
|
264
|
+
InvalidResponse: "invalidResponse",
|
|
265
|
+
Defect: "defect"
|
|
266
|
+
};
|
|
267
|
+
var DeleteVoiceBranchDeleted = DeleteVoiceBranch.Deleted;
|
|
268
|
+
var DeleteVoiceBranchProviderRejected = DeleteVoiceBranch.ProviderRejected;
|
|
269
|
+
var DeleteVoiceBranchInvalidResponse = DeleteVoiceBranch.InvalidResponse;
|
|
270
|
+
var DeleteVoiceBranchDefect = DeleteVoiceBranch.Defect;
|
|
271
|
+
var DeleteVoiceDefinition = {
|
|
272
|
+
operation: { connectorId: ConnectorID, operationId: "deleteVoice" },
|
|
273
|
+
branches: [
|
|
274
|
+
{ id: "deleted", description: "The voice is absent." },
|
|
275
|
+
{ id: "providerRejected", description: "ElevenLabs rejected voice deletion.", optional: true },
|
|
276
|
+
{ id: "invalidResponse", description: "ElevenLabs returned an invalid deletion confirmation.", optional: true },
|
|
277
|
+
{ id: "defect", description: "Voice ID or credentials are invalid.", optional: true }
|
|
278
|
+
],
|
|
279
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" },
|
|
280
|
+
repeatOnUnknown: "safe"
|
|
281
|
+
};
|
|
282
|
+
var DeleteVoiceMetadata = { kind: "mutation", idempotency: "required", authorization: "required" };
|
|
283
|
+
var UpdateVoiceSettingsBranch = {
|
|
284
|
+
Updated: "updated",
|
|
285
|
+
NotFound: "notFound",
|
|
286
|
+
ProviderRejected: "providerRejected",
|
|
287
|
+
Defect: "defect"
|
|
288
|
+
};
|
|
289
|
+
var UpdateVoiceSettingsBranchUpdated = UpdateVoiceSettingsBranch.Updated;
|
|
290
|
+
var UpdateVoiceSettingsBranchNotFound = UpdateVoiceSettingsBranch.NotFound;
|
|
291
|
+
var UpdateVoiceSettingsBranchProviderRejected = UpdateVoiceSettingsBranch.ProviderRejected;
|
|
292
|
+
var UpdateVoiceSettingsBranchDefect = UpdateVoiceSettingsBranch.Defect;
|
|
293
|
+
var UpdateVoiceSettingsDefinition = {
|
|
294
|
+
operation: { connectorId: ConnectorID, operationId: "updateVoiceSettings" },
|
|
295
|
+
branches: [
|
|
296
|
+
{ id: "updated", description: "ElevenLabs confirmed the voice settings replacement." },
|
|
297
|
+
{ id: "notFound", description: "The voice does not exist.", optional: true },
|
|
298
|
+
{ id: "providerRejected", description: "ElevenLabs conclusively rejected the settings.", optional: true },
|
|
299
|
+
{ id: "defect", description: "Local settings or credentials are invalid.", optional: true }
|
|
300
|
+
],
|
|
301
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" },
|
|
302
|
+
repeatOnUnknown: "safe"
|
|
303
|
+
};
|
|
304
|
+
var UpdateVoiceSettingsMetadata = { kind: "mutation", idempotency: "required", authorization: "required" };
|
|
305
|
+
var ListVoicesBranch = {
|
|
306
|
+
Listed: "listed",
|
|
307
|
+
ProviderRejected: "providerRejected",
|
|
308
|
+
InvalidResponse: "invalidResponse",
|
|
309
|
+
Defect: "defect"
|
|
310
|
+
};
|
|
311
|
+
var ListVoicesBranchListed = ListVoicesBranch.Listed;
|
|
312
|
+
var ListVoicesBranchProviderRejected = ListVoicesBranch.ProviderRejected;
|
|
313
|
+
var ListVoicesBranchInvalidResponse = ListVoicesBranch.InvalidResponse;
|
|
314
|
+
var ListVoicesBranchDefect = ListVoicesBranch.Defect;
|
|
315
|
+
var ListVoicesDefinition = {
|
|
316
|
+
operation: { connectorId: ConnectorID, operationId: "listVoices" },
|
|
317
|
+
branches: [
|
|
318
|
+
{ id: "listed", description: "ElevenLabs returned the requested result." },
|
|
319
|
+
{ id: "providerRejected", description: "The provider conclusively rejected the request.", optional: true },
|
|
320
|
+
{ id: "invalidResponse", description: "The provider returned malformed or oversized data.", optional: true },
|
|
321
|
+
{ id: "defect", description: "Local input or credentials are invalid.", optional: true }
|
|
322
|
+
],
|
|
323
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
|
|
324
|
+
};
|
|
325
|
+
var ListVoicesMetadata = { kind: "query", idempotency: "none", authorization: "required" };
|
|
326
|
+
var CreateSpeechBranch = {
|
|
327
|
+
Created: "created",
|
|
328
|
+
ProviderRejected: "providerRejected",
|
|
329
|
+
InvalidResponse: "invalidResponse",
|
|
330
|
+
Defect: "defect"
|
|
331
|
+
};
|
|
332
|
+
var CreateSpeechBranchCreated = CreateSpeechBranch.Created;
|
|
333
|
+
var CreateSpeechBranchProviderRejected = CreateSpeechBranch.ProviderRejected;
|
|
334
|
+
var CreateSpeechBranchInvalidResponse = CreateSpeechBranch.InvalidResponse;
|
|
335
|
+
var CreateSpeechBranchDefect = CreateSpeechBranch.Defect;
|
|
336
|
+
var CreateSpeechDefinition = {
|
|
337
|
+
operation: { connectorId: ConnectorID, operationId: "createSpeech" },
|
|
338
|
+
branches: [
|
|
339
|
+
{ id: "created", description: "ElevenLabs returned the requested result." },
|
|
340
|
+
{ id: "providerRejected", description: "The provider conclusively rejected the request.", optional: true },
|
|
341
|
+
{ id: "invalidResponse", description: "The provider returned malformed or oversized data.", optional: true },
|
|
342
|
+
{ id: "defect", description: "Local input or credentials are invalid.", optional: true }
|
|
343
|
+
],
|
|
344
|
+
stepDefaults: { executeMethodTimeoutMs: 15e4, executeDurability: "sync", executeRetry: { initialIntervalMs: 2e3, backoffCoefficient: 2, maximumIntervalMs: 3e4, maximumAttempts: 3, totalDurationMs: 3e5 } }
|
|
345
|
+
};
|
|
346
|
+
var CreateSpeechMetadata = { kind: "query", idempotency: "none", authorization: "required" };
|
|
347
|
+
|
|
348
|
+
// src/generated/connection.ts
|
|
349
|
+
import { ConnectionRefSchema } from "@superdurable/connectors-sdk";
|
|
350
|
+
var Connection = class {
|
|
351
|
+
/** Stable provider and connection name. */
|
|
352
|
+
reference;
|
|
353
|
+
/** Bound provider operations. */
|
|
354
|
+
operations;
|
|
355
|
+
/** Validate a reference and bind operations. */
|
|
356
|
+
constructor(reference, operations) {
|
|
357
|
+
this.reference = ConnectionRefSchema.parse(reference);
|
|
358
|
+
if (this.reference.provider !== ProviderID) throw new TypeError("connection provider differs from the manifest");
|
|
359
|
+
if (!operations) throw new TypeError("connector operations are required");
|
|
360
|
+
this.operations = operations;
|
|
361
|
+
}
|
|
362
|
+
};
|
|
363
|
+
function newConnection(client, reference) {
|
|
364
|
+
if (!client) throw new TypeError("connector client is required");
|
|
365
|
+
return new Connection(reference, client);
|
|
366
|
+
}
|
|
367
|
+
function newConnectionWithOperations(operations, reference) {
|
|
368
|
+
return new Connection(reference, operations);
|
|
369
|
+
}
|
|
370
|
+
function newProjectConnection(project, connectionName, createClient) {
|
|
371
|
+
if (!project) throw new TypeError("loaded project is required");
|
|
372
|
+
const reference = ConnectionRefSchema.parse({ provider: ProviderID, name: connectionName });
|
|
373
|
+
const selected = project.configuration.connections.find((entry) => entry.connectorId === ConnectorID && entry.connectionName === connectionName);
|
|
374
|
+
if (!selected || selected.provider !== ProviderID) throw new TypeError("project connection is not configured");
|
|
375
|
+
return newConnection(createClient(project, connectionName), reference);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
export {
|
|
379
|
+
ConfigSchema,
|
|
380
|
+
CredentialMaterialError,
|
|
381
|
+
isCredentialMaterialError,
|
|
382
|
+
decodeCredentials,
|
|
383
|
+
ListModelsInputSchema,
|
|
384
|
+
ModelMetadataSchema,
|
|
385
|
+
ModelsListSchema,
|
|
386
|
+
ListHistoryItemsInputSchema,
|
|
387
|
+
HistoryItemMetadataSchema,
|
|
388
|
+
HistoryItemsPageSchema,
|
|
389
|
+
HistoryItemIdentityInputSchema,
|
|
390
|
+
DeletedHistoryItemSchema,
|
|
391
|
+
GetVoiceInputSchema,
|
|
392
|
+
VoiceSchema,
|
|
393
|
+
EditVoiceMetadataInputSchema,
|
|
394
|
+
EditedVoiceMetadataSchema,
|
|
395
|
+
DeletedVoiceSchema,
|
|
396
|
+
UpdateVoiceSettingsInputSchema,
|
|
397
|
+
UpdatedVoiceSettingsSchema,
|
|
398
|
+
ListVoicesInputSchema,
|
|
399
|
+
ListVoicesOutputSchema,
|
|
400
|
+
CreateSpeechInputSchema,
|
|
401
|
+
CreateSpeechOutputSchema,
|
|
402
|
+
ConnectorID,
|
|
403
|
+
ProviderID,
|
|
404
|
+
ListModelsBranch,
|
|
405
|
+
ListModelsBranchListed,
|
|
406
|
+
ListModelsBranchProviderRejected,
|
|
407
|
+
ListModelsBranchInvalidResponse,
|
|
408
|
+
ListModelsBranchDefect,
|
|
409
|
+
ListModelsDefinition,
|
|
410
|
+
ListModelsMetadata,
|
|
411
|
+
ListHistoryItemsBranch,
|
|
412
|
+
ListHistoryItemsBranchListed,
|
|
413
|
+
ListHistoryItemsBranchProviderRejected,
|
|
414
|
+
ListHistoryItemsBranchInvalidResponse,
|
|
415
|
+
ListHistoryItemsBranchDefect,
|
|
416
|
+
ListHistoryItemsDefinition,
|
|
417
|
+
ListHistoryItemsMetadata,
|
|
418
|
+
GetHistoryItemBranch,
|
|
419
|
+
GetHistoryItemBranchFound,
|
|
420
|
+
GetHistoryItemBranchNotFound,
|
|
421
|
+
GetHistoryItemBranchProviderRejected,
|
|
422
|
+
GetHistoryItemBranchInvalidResponse,
|
|
423
|
+
GetHistoryItemBranchDefect,
|
|
424
|
+
GetHistoryItemDefinition,
|
|
425
|
+
GetHistoryItemMetadata,
|
|
426
|
+
DeleteHistoryItemBranch,
|
|
427
|
+
DeleteHistoryItemBranchDeleted,
|
|
428
|
+
DeleteHistoryItemBranchProviderRejected,
|
|
429
|
+
DeleteHistoryItemBranchInvalidResponse,
|
|
430
|
+
DeleteHistoryItemBranchDefect,
|
|
431
|
+
DeleteHistoryItemDefinition,
|
|
432
|
+
DeleteHistoryItemMetadata,
|
|
433
|
+
GetVoiceBranch,
|
|
434
|
+
GetVoiceBranchFound,
|
|
435
|
+
GetVoiceBranchNotFound,
|
|
436
|
+
GetVoiceBranchProviderRejected,
|
|
437
|
+
GetVoiceBranchInvalidResponse,
|
|
438
|
+
GetVoiceBranchDefect,
|
|
439
|
+
GetVoiceDefinition,
|
|
440
|
+
GetVoiceMetadata,
|
|
441
|
+
EditVoiceMetadataBranch,
|
|
442
|
+
EditVoiceMetadataBranchEdited,
|
|
443
|
+
EditVoiceMetadataBranchNotFound,
|
|
444
|
+
EditVoiceMetadataBranchProviderRejected,
|
|
445
|
+
EditVoiceMetadataBranchInvalidResponse,
|
|
446
|
+
EditVoiceMetadataBranchDefect,
|
|
447
|
+
EditVoiceMetadataDefinition,
|
|
448
|
+
EditVoiceMetadataMetadata,
|
|
449
|
+
DeleteVoiceBranch,
|
|
450
|
+
DeleteVoiceBranchDeleted,
|
|
451
|
+
DeleteVoiceBranchProviderRejected,
|
|
452
|
+
DeleteVoiceBranchInvalidResponse,
|
|
453
|
+
DeleteVoiceBranchDefect,
|
|
454
|
+
DeleteVoiceDefinition,
|
|
455
|
+
DeleteVoiceMetadata,
|
|
456
|
+
UpdateVoiceSettingsBranch,
|
|
457
|
+
UpdateVoiceSettingsBranchUpdated,
|
|
458
|
+
UpdateVoiceSettingsBranchNotFound,
|
|
459
|
+
UpdateVoiceSettingsBranchProviderRejected,
|
|
460
|
+
UpdateVoiceSettingsBranchDefect,
|
|
461
|
+
UpdateVoiceSettingsDefinition,
|
|
462
|
+
UpdateVoiceSettingsMetadata,
|
|
463
|
+
ListVoicesBranch,
|
|
464
|
+
ListVoicesBranchListed,
|
|
465
|
+
ListVoicesBranchProviderRejected,
|
|
466
|
+
ListVoicesBranchInvalidResponse,
|
|
467
|
+
ListVoicesBranchDefect,
|
|
468
|
+
ListVoicesDefinition,
|
|
469
|
+
ListVoicesMetadata,
|
|
470
|
+
CreateSpeechBranch,
|
|
471
|
+
CreateSpeechBranchCreated,
|
|
472
|
+
CreateSpeechBranchProviderRejected,
|
|
473
|
+
CreateSpeechBranchInvalidResponse,
|
|
474
|
+
CreateSpeechBranchDefect,
|
|
475
|
+
CreateSpeechDefinition,
|
|
476
|
+
CreateSpeechMetadata,
|
|
477
|
+
Connection,
|
|
478
|
+
newConnection,
|
|
479
|
+
newConnectionWithOperations,
|
|
480
|
+
newProjectConnection
|
|
481
|
+
};
|