@automate.ax/integration-contracts 0.150.2 → 0.151.3
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/dist/close/events.d.ts +2 -2
- package/dist/close/schemas.d.ts +2 -2
- package/dist/elevenlabs/api.d.ts +58 -0
- package/dist/elevenlabs/api.js +237 -0
- package/dist/elevenlabs/events.d.ts +264 -0
- package/dist/elevenlabs/events.js +47 -0
- package/dist/elevenlabs/index.d.ts +3 -0
- package/dist/elevenlabs/index.js +3 -0
- package/dist/elevenlabs/schemas.d.ts +458 -0
- package/dist/elevenlabs/schemas.js +229 -0
- package/dist/highlevel/openapi-operations.generated.json +9 -2
- package/dist/highlevel/openapi-types.generated.d.ts +1 -1
- package/dist/krisp/schemas.d.ts +1 -1
- package/dist/triggers.d.ts +2 -1
- package/package.json +8 -2
- package/src/elevenlabs/api.ts +341 -0
- package/src/elevenlabs/events.ts +58 -0
- package/src/elevenlabs/index.ts +3 -0
- package/src/elevenlabs/schemas.ts +253 -0
- package/src/highlevel/openapi-operations.generated.json +9 -2
- package/src/highlevel/openapi-types.generated.ts +1 -1
- package/src/triggers.ts +2 -0
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export declare const ELEVENLABS_OUTPUT_FORMAT_SCHEMA: z.ZodEnum<{
|
|
3
|
+
alaw_8000: "alaw_8000";
|
|
4
|
+
mp3_22050_32: "mp3_22050_32";
|
|
5
|
+
mp3_24000_48: "mp3_24000_48";
|
|
6
|
+
mp3_44100_32: "mp3_44100_32";
|
|
7
|
+
mp3_44100_64: "mp3_44100_64";
|
|
8
|
+
mp3_44100_96: "mp3_44100_96";
|
|
9
|
+
mp3_44100_128: "mp3_44100_128";
|
|
10
|
+
mp3_44100_192: "mp3_44100_192";
|
|
11
|
+
opus_48000_32: "opus_48000_32";
|
|
12
|
+
opus_48000_64: "opus_48000_64";
|
|
13
|
+
opus_48000_96: "opus_48000_96";
|
|
14
|
+
opus_48000_128: "opus_48000_128";
|
|
15
|
+
opus_48000_192: "opus_48000_192";
|
|
16
|
+
pcm_8000: "pcm_8000";
|
|
17
|
+
pcm_16000: "pcm_16000";
|
|
18
|
+
pcm_22050: "pcm_22050";
|
|
19
|
+
pcm_24000: "pcm_24000";
|
|
20
|
+
pcm_32000: "pcm_32000";
|
|
21
|
+
pcm_44100: "pcm_44100";
|
|
22
|
+
pcm_48000: "pcm_48000";
|
|
23
|
+
ulaw_8000: "ulaw_8000";
|
|
24
|
+
wav_8000: "wav_8000";
|
|
25
|
+
wav_16000: "wav_16000";
|
|
26
|
+
wav_22050: "wav_22050";
|
|
27
|
+
wav_24000: "wav_24000";
|
|
28
|
+
wav_32000: "wav_32000";
|
|
29
|
+
wav_44100: "wav_44100";
|
|
30
|
+
wav_48000: "wav_48000";
|
|
31
|
+
}>;
|
|
32
|
+
export declare const ELEVENLABS_USER_SCHEMA: z.ZodObject<{
|
|
33
|
+
createdAt: z.ZodNumber;
|
|
34
|
+
firstName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
35
|
+
isOnboardingCompleted: z.ZodBoolean;
|
|
36
|
+
seatType: z.ZodString;
|
|
37
|
+
subscription: z.ZodObject<{
|
|
38
|
+
characterCount: z.ZodNumber;
|
|
39
|
+
characterLimit: z.ZodNumber;
|
|
40
|
+
status: z.ZodString;
|
|
41
|
+
tier: z.ZodString;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
userId: z.ZodString;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
export declare const ELEVENLABS_MODEL_SCHEMA: z.ZodObject<{
|
|
46
|
+
canDoTextToSpeech: z.ZodBoolean;
|
|
47
|
+
canDoVoiceConversion: z.ZodBoolean;
|
|
48
|
+
canUseSpeakerBoost: z.ZodBoolean;
|
|
49
|
+
canUseStyle: z.ZodBoolean;
|
|
50
|
+
description: z.ZodString;
|
|
51
|
+
languages: z.ZodArray<z.ZodObject<{
|
|
52
|
+
languageId: z.ZodString;
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
}, z.core.$strip>>;
|
|
55
|
+
maximumTextLengthPerRequest: z.ZodNumber;
|
|
56
|
+
modelId: z.ZodString;
|
|
57
|
+
name: z.ZodString;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
export declare const ELEVENLABS_VOICE_SCHEMA: z.ZodObject<{
|
|
60
|
+
availableForTiers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
61
|
+
category: z.ZodString;
|
|
62
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
63
|
+
labels: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
64
|
+
name: z.ZodString;
|
|
65
|
+
previewUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
|
|
66
|
+
voiceId: z.ZodString;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
export declare const ELEVENLABS_VOICES_PAGE_SCHEMA: z.ZodObject<{
|
|
69
|
+
hasMore: z.ZodBoolean;
|
|
70
|
+
nextPageToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
71
|
+
totalCount: z.ZodNumber;
|
|
72
|
+
voices: z.ZodArray<z.ZodObject<{
|
|
73
|
+
availableForTiers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
74
|
+
category: z.ZodString;
|
|
75
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
76
|
+
labels: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
77
|
+
name: z.ZodString;
|
|
78
|
+
previewUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
|
|
79
|
+
voiceId: z.ZodString;
|
|
80
|
+
}, z.core.$strip>>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
export declare const ELEVENLABS_ALIGNMENT_SCHEMA: z.ZodObject<{
|
|
83
|
+
characterEndTimesSeconds: z.ZodArray<z.ZodNumber>;
|
|
84
|
+
characterStartTimesSeconds: z.ZodArray<z.ZodNumber>;
|
|
85
|
+
characters: z.ZodArray<z.ZodString>;
|
|
86
|
+
}, z.core.$strip>;
|
|
87
|
+
export declare const ELEVENLABS_TIMESTAMPED_AUDIO_SCHEMA: z.ZodObject<{
|
|
88
|
+
alignment: z.ZodNullable<z.ZodObject<{
|
|
89
|
+
characterEndTimesSeconds: z.ZodArray<z.ZodNumber>;
|
|
90
|
+
characterStartTimesSeconds: z.ZodArray<z.ZodNumber>;
|
|
91
|
+
characters: z.ZodArray<z.ZodString>;
|
|
92
|
+
}, z.core.$strip>>;
|
|
93
|
+
audioBase64: z.ZodBase64;
|
|
94
|
+
normalizedAlignment: z.ZodNullable<z.ZodObject<{
|
|
95
|
+
characterEndTimesSeconds: z.ZodArray<z.ZodNumber>;
|
|
96
|
+
characterStartTimesSeconds: z.ZodArray<z.ZodNumber>;
|
|
97
|
+
characters: z.ZodArray<z.ZodString>;
|
|
98
|
+
}, z.core.$strip>>;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
export declare const ELEVENLABS_TRANSCRIPT_WORD_SCHEMA: z.ZodObject<{
|
|
101
|
+
channelIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
102
|
+
end: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
103
|
+
logprob: z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
speakerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
105
|
+
start: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
106
|
+
text: z.ZodString;
|
|
107
|
+
type: z.ZodEnum<{
|
|
108
|
+
audio_event: "audio_event";
|
|
109
|
+
spacing: "spacing";
|
|
110
|
+
word: "word";
|
|
111
|
+
}>;
|
|
112
|
+
}, z.core.$strip>;
|
|
113
|
+
export declare const ELEVENLABS_TRANSCRIPT_SCHEMA: z.ZodObject<{
|
|
114
|
+
languageCode: z.ZodString;
|
|
115
|
+
languageProbability: z.ZodNumber;
|
|
116
|
+
text: z.ZodString;
|
|
117
|
+
words: z.ZodArray<z.ZodObject<{
|
|
118
|
+
channelIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
119
|
+
end: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
120
|
+
logprob: z.ZodOptional<z.ZodNumber>;
|
|
121
|
+
speakerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
122
|
+
start: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
123
|
+
text: z.ZodString;
|
|
124
|
+
type: z.ZodEnum<{
|
|
125
|
+
audio_event: "audio_event";
|
|
126
|
+
spacing: "spacing";
|
|
127
|
+
word: "word";
|
|
128
|
+
}>;
|
|
129
|
+
}, z.core.$strip>>;
|
|
130
|
+
}, z.core.$strip>;
|
|
131
|
+
export declare const ELEVENLABS_TRANSCRIPTION_RESULT_SCHEMA: z.ZodUnion<readonly [z.ZodObject<{
|
|
132
|
+
languageCode: z.ZodString;
|
|
133
|
+
languageProbability: z.ZodNumber;
|
|
134
|
+
text: z.ZodString;
|
|
135
|
+
words: z.ZodArray<z.ZodObject<{
|
|
136
|
+
channelIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
137
|
+
end: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
138
|
+
logprob: z.ZodOptional<z.ZodNumber>;
|
|
139
|
+
speakerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
140
|
+
start: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
141
|
+
text: z.ZodString;
|
|
142
|
+
type: z.ZodEnum<{
|
|
143
|
+
audio_event: "audio_event";
|
|
144
|
+
spacing: "spacing";
|
|
145
|
+
word: "word";
|
|
146
|
+
}>;
|
|
147
|
+
}, z.core.$strip>>;
|
|
148
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
149
|
+
transcripts: z.ZodArray<z.ZodObject<{
|
|
150
|
+
languageCode: z.ZodString;
|
|
151
|
+
languageProbability: z.ZodNumber;
|
|
152
|
+
text: z.ZodString;
|
|
153
|
+
words: z.ZodArray<z.ZodObject<{
|
|
154
|
+
channelIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
155
|
+
end: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
156
|
+
logprob: z.ZodOptional<z.ZodNumber>;
|
|
157
|
+
speakerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
158
|
+
start: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
159
|
+
text: z.ZodString;
|
|
160
|
+
type: z.ZodEnum<{
|
|
161
|
+
audio_event: "audio_event";
|
|
162
|
+
spacing: "spacing";
|
|
163
|
+
word: "word";
|
|
164
|
+
}>;
|
|
165
|
+
}, z.core.$strip>>;
|
|
166
|
+
}, z.core.$strip>>;
|
|
167
|
+
}, z.core.$strip>]>;
|
|
168
|
+
export declare const ELEVENLABS_FORCED_ALIGNMENT_SCHEMA: z.ZodObject<{
|
|
169
|
+
characters: z.ZodArray<z.ZodObject<{
|
|
170
|
+
end: z.ZodNumber;
|
|
171
|
+
start: z.ZodNumber;
|
|
172
|
+
text: z.ZodString;
|
|
173
|
+
}, z.core.$strip>>;
|
|
174
|
+
loss: z.ZodNumber;
|
|
175
|
+
words: z.ZodArray<z.ZodObject<{
|
|
176
|
+
end: z.ZodNumber;
|
|
177
|
+
start: z.ZodNumber;
|
|
178
|
+
text: z.ZodString;
|
|
179
|
+
}, z.core.$strip>>;
|
|
180
|
+
}, z.core.$strip>;
|
|
181
|
+
export declare const ELEVENLABS_DUBBING_CREATED_SCHEMA: z.ZodObject<{
|
|
182
|
+
dubbingId: z.ZodString;
|
|
183
|
+
expectedDurationSec: z.ZodNumber;
|
|
184
|
+
}, z.core.$strip>;
|
|
185
|
+
export declare const ELEVENLABS_DUBBING_SCHEMA: z.ZodObject<{
|
|
186
|
+
dubbingId: z.ZodString;
|
|
187
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
188
|
+
name: z.ZodString;
|
|
189
|
+
sourceLanguage: z.ZodNullable<z.ZodString>;
|
|
190
|
+
status: z.ZodEnum<{
|
|
191
|
+
failed: "failed";
|
|
192
|
+
cloning: "cloning";
|
|
193
|
+
dubbed: "dubbed";
|
|
194
|
+
dubbing: "dubbing";
|
|
195
|
+
preparing: "preparing";
|
|
196
|
+
queued: "queued";
|
|
197
|
+
}>;
|
|
198
|
+
targetLanguages: z.ZodArray<z.ZodString>;
|
|
199
|
+
}, z.core.$strip>;
|
|
200
|
+
export declare const ELEVENLABS_AGENT_SUMMARY_SCHEMA: z.ZodObject<{
|
|
201
|
+
agentId: z.ZodString;
|
|
202
|
+
name: z.ZodString;
|
|
203
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
204
|
+
}, z.core.$strip>;
|
|
205
|
+
export declare const ELEVENLABS_AGENTS_PAGE_SCHEMA: z.ZodObject<{
|
|
206
|
+
agents: z.ZodArray<z.ZodObject<{
|
|
207
|
+
agentId: z.ZodString;
|
|
208
|
+
name: z.ZodString;
|
|
209
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
210
|
+
}, z.core.$strip>>;
|
|
211
|
+
hasMore: z.ZodBoolean;
|
|
212
|
+
nextCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
213
|
+
}, z.core.$strip>;
|
|
214
|
+
export declare const ELEVENLABS_CONVERSATION_SUMMARY_SCHEMA: z.ZodObject<{
|
|
215
|
+
agentId: z.ZodString;
|
|
216
|
+
agentName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
217
|
+
callDurationSecs: z.ZodNumber;
|
|
218
|
+
callSuccessful: z.ZodEnum<{
|
|
219
|
+
unknown: "unknown";
|
|
220
|
+
success: "success";
|
|
221
|
+
error: "error";
|
|
222
|
+
failure: "failure";
|
|
223
|
+
}>;
|
|
224
|
+
conversationId: z.ZodString;
|
|
225
|
+
direction: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
226
|
+
inbound: "inbound";
|
|
227
|
+
outbound: "outbound";
|
|
228
|
+
}>>>;
|
|
229
|
+
mainLanguage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
230
|
+
messageCount: z.ZodNumber;
|
|
231
|
+
startTimeUnixSecs: z.ZodNumber;
|
|
232
|
+
status: z.ZodEnum<{
|
|
233
|
+
done: "done";
|
|
234
|
+
failed: "failed";
|
|
235
|
+
"in-progress": "in-progress";
|
|
236
|
+
initiated: "initiated";
|
|
237
|
+
processing: "processing";
|
|
238
|
+
}>;
|
|
239
|
+
transcriptSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
240
|
+
}, z.core.$strip>;
|
|
241
|
+
export declare const ELEVENLABS_CONVERSATIONS_PAGE_SCHEMA: z.ZodObject<{
|
|
242
|
+
conversations: z.ZodArray<z.ZodObject<{
|
|
243
|
+
agentId: z.ZodString;
|
|
244
|
+
agentName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
245
|
+
callDurationSecs: z.ZodNumber;
|
|
246
|
+
callSuccessful: z.ZodEnum<{
|
|
247
|
+
unknown: "unknown";
|
|
248
|
+
success: "success";
|
|
249
|
+
error: "error";
|
|
250
|
+
failure: "failure";
|
|
251
|
+
}>;
|
|
252
|
+
conversationId: z.ZodString;
|
|
253
|
+
direction: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
254
|
+
inbound: "inbound";
|
|
255
|
+
outbound: "outbound";
|
|
256
|
+
}>>>;
|
|
257
|
+
mainLanguage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
258
|
+
messageCount: z.ZodNumber;
|
|
259
|
+
startTimeUnixSecs: z.ZodNumber;
|
|
260
|
+
status: z.ZodEnum<{
|
|
261
|
+
done: "done";
|
|
262
|
+
failed: "failed";
|
|
263
|
+
"in-progress": "in-progress";
|
|
264
|
+
initiated: "initiated";
|
|
265
|
+
processing: "processing";
|
|
266
|
+
}>;
|
|
267
|
+
transcriptSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
268
|
+
}, z.core.$strip>>;
|
|
269
|
+
hasMore: z.ZodBoolean;
|
|
270
|
+
nextCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
271
|
+
}, z.core.$strip>;
|
|
272
|
+
export declare const ELEVENLABS_CONVERSATION_SCHEMA: z.ZodObject<{
|
|
273
|
+
agentId: z.ZodString;
|
|
274
|
+
conversationId: z.ZodString;
|
|
275
|
+
hasAudio: z.ZodBoolean;
|
|
276
|
+
status: z.ZodEnum<{
|
|
277
|
+
done: "done";
|
|
278
|
+
failed: "failed";
|
|
279
|
+
"in-progress": "in-progress";
|
|
280
|
+
initiated: "initiated";
|
|
281
|
+
processing: "processing";
|
|
282
|
+
}>;
|
|
283
|
+
transcript: z.ZodArray<z.ZodObject<{
|
|
284
|
+
agentMetadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
285
|
+
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
286
|
+
role: z.ZodEnum<{
|
|
287
|
+
agent: "agent";
|
|
288
|
+
user: "user";
|
|
289
|
+
}>;
|
|
290
|
+
timeInCallSecs: z.ZodNumber;
|
|
291
|
+
}, z.core.$strip>>;
|
|
292
|
+
}, z.core.$strip>;
|
|
293
|
+
export declare const ELEVENLABS_OUTBOUND_CALL_SCHEMA: z.ZodObject<{
|
|
294
|
+
callSid: z.ZodNullable<z.ZodString>;
|
|
295
|
+
conversationId: z.ZodNullable<z.ZodString>;
|
|
296
|
+
message: z.ZodString;
|
|
297
|
+
success: z.ZodBoolean;
|
|
298
|
+
}, z.core.$strip>;
|
|
299
|
+
export declare const ELEVENLABS_VOICE_REMOVAL_EVENT_SCHEMA: z.ZodObject<{
|
|
300
|
+
data: z.ZodObject<{
|
|
301
|
+
noticePeriodDays: z.ZodOptional<z.ZodNumber>;
|
|
302
|
+
voiceId: z.ZodString;
|
|
303
|
+
voiceName: z.ZodOptional<z.ZodString>;
|
|
304
|
+
}, z.core.$strip>;
|
|
305
|
+
eventTimestamp: z.ZodNumber;
|
|
306
|
+
type: z.ZodEnum<{
|
|
307
|
+
voice_removal_notice: "voice_removal_notice";
|
|
308
|
+
voice_removal_notice_withdrawn: "voice_removal_notice_withdrawn";
|
|
309
|
+
voice_removed: "voice_removed";
|
|
310
|
+
}>;
|
|
311
|
+
}, z.core.$strip>;
|
|
312
|
+
export declare const ELEVENLABS_TRANSCRIPTION_EVENT_SCHEMA: z.ZodObject<{
|
|
313
|
+
data: z.ZodObject<{
|
|
314
|
+
requestId: z.ZodString;
|
|
315
|
+
transcription: z.ZodUnion<readonly [z.ZodObject<{
|
|
316
|
+
languageCode: z.ZodString;
|
|
317
|
+
languageProbability: z.ZodNumber;
|
|
318
|
+
text: z.ZodString;
|
|
319
|
+
words: z.ZodArray<z.ZodObject<{
|
|
320
|
+
channelIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
321
|
+
end: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
322
|
+
logprob: z.ZodOptional<z.ZodNumber>;
|
|
323
|
+
speakerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
324
|
+
start: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
325
|
+
text: z.ZodString;
|
|
326
|
+
type: z.ZodEnum<{
|
|
327
|
+
audio_event: "audio_event";
|
|
328
|
+
spacing: "spacing";
|
|
329
|
+
word: "word";
|
|
330
|
+
}>;
|
|
331
|
+
}, z.core.$strip>>;
|
|
332
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
333
|
+
transcripts: z.ZodArray<z.ZodObject<{
|
|
334
|
+
languageCode: z.ZodString;
|
|
335
|
+
languageProbability: z.ZodNumber;
|
|
336
|
+
text: z.ZodString;
|
|
337
|
+
words: z.ZodArray<z.ZodObject<{
|
|
338
|
+
channelIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
339
|
+
end: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
340
|
+
logprob: z.ZodOptional<z.ZodNumber>;
|
|
341
|
+
speakerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
342
|
+
start: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
343
|
+
text: z.ZodString;
|
|
344
|
+
type: z.ZodEnum<{
|
|
345
|
+
audio_event: "audio_event";
|
|
346
|
+
spacing: "spacing";
|
|
347
|
+
word: "word";
|
|
348
|
+
}>;
|
|
349
|
+
}, z.core.$strip>>;
|
|
350
|
+
}, z.core.$strip>>;
|
|
351
|
+
}, z.core.$strip>]>;
|
|
352
|
+
webhookMetadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
353
|
+
}, z.core.$strip>;
|
|
354
|
+
eventTimestamp: z.ZodOptional<z.ZodNumber>;
|
|
355
|
+
type: z.ZodLiteral<"speech_to_text_transcription">;
|
|
356
|
+
}, z.core.$strip>;
|
|
357
|
+
export declare const ELEVENLABS_FLOW_GENERATION_EVENT_SCHEMA: z.ZodObject<{
|
|
358
|
+
data: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
359
|
+
contentMimeType: z.ZodString;
|
|
360
|
+
contentUrl: z.ZodURL;
|
|
361
|
+
id: z.ZodString;
|
|
362
|
+
status: z.ZodLiteral<"completed">;
|
|
363
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
364
|
+
errorMessage: z.ZodString;
|
|
365
|
+
failureReason: z.ZodEnum<{
|
|
366
|
+
timeout: "timeout";
|
|
367
|
+
charging_failed: "charging_failed";
|
|
368
|
+
dependency_failed: "dependency_failed";
|
|
369
|
+
internal_error: "internal_error";
|
|
370
|
+
invalid_parameters: "invalid_parameters";
|
|
371
|
+
model_error: "model_error";
|
|
372
|
+
moderated: "moderated";
|
|
373
|
+
}>;
|
|
374
|
+
id: z.ZodString;
|
|
375
|
+
status: z.ZodLiteral<"failed">;
|
|
376
|
+
}, z.core.$strip>], "status">;
|
|
377
|
+
eventTimestamp: z.ZodNumber;
|
|
378
|
+
type: z.ZodLiteral<"flows_generation">;
|
|
379
|
+
}, z.core.$strip>;
|
|
380
|
+
export declare const ELEVENLABS_WEBHOOK_EVENT_SCHEMA: z.ZodUnion<readonly [z.ZodObject<{
|
|
381
|
+
data: z.ZodObject<{
|
|
382
|
+
noticePeriodDays: z.ZodOptional<z.ZodNumber>;
|
|
383
|
+
voiceId: z.ZodString;
|
|
384
|
+
voiceName: z.ZodOptional<z.ZodString>;
|
|
385
|
+
}, z.core.$strip>;
|
|
386
|
+
eventTimestamp: z.ZodNumber;
|
|
387
|
+
type: z.ZodEnum<{
|
|
388
|
+
voice_removal_notice: "voice_removal_notice";
|
|
389
|
+
voice_removal_notice_withdrawn: "voice_removal_notice_withdrawn";
|
|
390
|
+
voice_removed: "voice_removed";
|
|
391
|
+
}>;
|
|
392
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
393
|
+
data: z.ZodObject<{
|
|
394
|
+
requestId: z.ZodString;
|
|
395
|
+
transcription: z.ZodUnion<readonly [z.ZodObject<{
|
|
396
|
+
languageCode: z.ZodString;
|
|
397
|
+
languageProbability: z.ZodNumber;
|
|
398
|
+
text: z.ZodString;
|
|
399
|
+
words: z.ZodArray<z.ZodObject<{
|
|
400
|
+
channelIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
401
|
+
end: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
402
|
+
logprob: z.ZodOptional<z.ZodNumber>;
|
|
403
|
+
speakerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
404
|
+
start: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
405
|
+
text: z.ZodString;
|
|
406
|
+
type: z.ZodEnum<{
|
|
407
|
+
audio_event: "audio_event";
|
|
408
|
+
spacing: "spacing";
|
|
409
|
+
word: "word";
|
|
410
|
+
}>;
|
|
411
|
+
}, z.core.$strip>>;
|
|
412
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
413
|
+
transcripts: z.ZodArray<z.ZodObject<{
|
|
414
|
+
languageCode: z.ZodString;
|
|
415
|
+
languageProbability: z.ZodNumber;
|
|
416
|
+
text: z.ZodString;
|
|
417
|
+
words: z.ZodArray<z.ZodObject<{
|
|
418
|
+
channelIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
419
|
+
end: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
420
|
+
logprob: z.ZodOptional<z.ZodNumber>;
|
|
421
|
+
speakerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
422
|
+
start: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
423
|
+
text: z.ZodString;
|
|
424
|
+
type: z.ZodEnum<{
|
|
425
|
+
audio_event: "audio_event";
|
|
426
|
+
spacing: "spacing";
|
|
427
|
+
word: "word";
|
|
428
|
+
}>;
|
|
429
|
+
}, z.core.$strip>>;
|
|
430
|
+
}, z.core.$strip>>;
|
|
431
|
+
}, z.core.$strip>]>;
|
|
432
|
+
webhookMetadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
433
|
+
}, z.core.$strip>;
|
|
434
|
+
eventTimestamp: z.ZodOptional<z.ZodNumber>;
|
|
435
|
+
type: z.ZodLiteral<"speech_to_text_transcription">;
|
|
436
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
437
|
+
data: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
438
|
+
contentMimeType: z.ZodString;
|
|
439
|
+
contentUrl: z.ZodURL;
|
|
440
|
+
id: z.ZodString;
|
|
441
|
+
status: z.ZodLiteral<"completed">;
|
|
442
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
443
|
+
errorMessage: z.ZodString;
|
|
444
|
+
failureReason: z.ZodEnum<{
|
|
445
|
+
timeout: "timeout";
|
|
446
|
+
charging_failed: "charging_failed";
|
|
447
|
+
dependency_failed: "dependency_failed";
|
|
448
|
+
internal_error: "internal_error";
|
|
449
|
+
invalid_parameters: "invalid_parameters";
|
|
450
|
+
model_error: "model_error";
|
|
451
|
+
moderated: "moderated";
|
|
452
|
+
}>;
|
|
453
|
+
id: z.ZodString;
|
|
454
|
+
status: z.ZodLiteral<"failed">;
|
|
455
|
+
}, z.core.$strip>], "status">;
|
|
456
|
+
eventTimestamp: z.ZodNumber;
|
|
457
|
+
type: z.ZodLiteral<"flows_generation">;
|
|
458
|
+
}, z.core.$strip>]>;
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export const ELEVENLABS_OUTPUT_FORMAT_SCHEMA = z.enum([
|
|
3
|
+
"alaw_8000",
|
|
4
|
+
"mp3_22050_32",
|
|
5
|
+
"mp3_24000_48",
|
|
6
|
+
"mp3_44100_32",
|
|
7
|
+
"mp3_44100_64",
|
|
8
|
+
"mp3_44100_96",
|
|
9
|
+
"mp3_44100_128",
|
|
10
|
+
"mp3_44100_192",
|
|
11
|
+
"opus_48000_32",
|
|
12
|
+
"opus_48000_64",
|
|
13
|
+
"opus_48000_96",
|
|
14
|
+
"opus_48000_128",
|
|
15
|
+
"opus_48000_192",
|
|
16
|
+
"pcm_8000",
|
|
17
|
+
"pcm_16000",
|
|
18
|
+
"pcm_22050",
|
|
19
|
+
"pcm_24000",
|
|
20
|
+
"pcm_32000",
|
|
21
|
+
"pcm_44100",
|
|
22
|
+
"pcm_48000",
|
|
23
|
+
"ulaw_8000",
|
|
24
|
+
"wav_8000",
|
|
25
|
+
"wav_16000",
|
|
26
|
+
"wav_22050",
|
|
27
|
+
"wav_24000",
|
|
28
|
+
"wav_32000",
|
|
29
|
+
"wav_44100",
|
|
30
|
+
"wav_48000",
|
|
31
|
+
]);
|
|
32
|
+
export const ELEVENLABS_USER_SCHEMA = z.object({
|
|
33
|
+
createdAt: z.number().int().nonnegative(),
|
|
34
|
+
firstName: z.string().nullable().optional(),
|
|
35
|
+
isOnboardingCompleted: z.boolean(),
|
|
36
|
+
seatType: z.string(),
|
|
37
|
+
subscription: z.object({
|
|
38
|
+
characterCount: z.number().int().nonnegative(),
|
|
39
|
+
characterLimit: z.number().int().nonnegative(),
|
|
40
|
+
status: z.string(),
|
|
41
|
+
tier: z.string(),
|
|
42
|
+
}),
|
|
43
|
+
userId: z.string().min(1),
|
|
44
|
+
});
|
|
45
|
+
export const ELEVENLABS_MODEL_SCHEMA = z.object({
|
|
46
|
+
canDoTextToSpeech: z.boolean(),
|
|
47
|
+
canDoVoiceConversion: z.boolean(),
|
|
48
|
+
canUseSpeakerBoost: z.boolean(),
|
|
49
|
+
canUseStyle: z.boolean(),
|
|
50
|
+
description: z.string(),
|
|
51
|
+
languages: z.object({ languageId: z.string(), name: z.string() }).array(),
|
|
52
|
+
maximumTextLengthPerRequest: z.number().int().positive(),
|
|
53
|
+
modelId: z.string().min(1),
|
|
54
|
+
name: z.string(),
|
|
55
|
+
});
|
|
56
|
+
export const ELEVENLABS_VOICE_SCHEMA = z.object({
|
|
57
|
+
availableForTiers: z.string().array().nullable().optional(),
|
|
58
|
+
category: z.string(),
|
|
59
|
+
description: z.string().nullable().optional(),
|
|
60
|
+
labels: z.record(z.string(), z.string()),
|
|
61
|
+
name: z.string(),
|
|
62
|
+
previewUrl: z.url().nullable().optional(),
|
|
63
|
+
voiceId: z.string().min(1),
|
|
64
|
+
});
|
|
65
|
+
export const ELEVENLABS_VOICES_PAGE_SCHEMA = z.object({
|
|
66
|
+
hasMore: z.boolean(),
|
|
67
|
+
nextPageToken: z.string().nullable().optional(),
|
|
68
|
+
totalCount: z.number().int().nonnegative(),
|
|
69
|
+
voices: ELEVENLABS_VOICE_SCHEMA.array(),
|
|
70
|
+
});
|
|
71
|
+
export const ELEVENLABS_ALIGNMENT_SCHEMA = z.object({
|
|
72
|
+
characterEndTimesSeconds: z.number().nonnegative().array(),
|
|
73
|
+
characterStartTimesSeconds: z.number().nonnegative().array(),
|
|
74
|
+
characters: z.string().array(),
|
|
75
|
+
});
|
|
76
|
+
export const ELEVENLABS_TIMESTAMPED_AUDIO_SCHEMA = z.object({
|
|
77
|
+
alignment: ELEVENLABS_ALIGNMENT_SCHEMA.nullable(),
|
|
78
|
+
audioBase64: z.base64(),
|
|
79
|
+
normalizedAlignment: ELEVENLABS_ALIGNMENT_SCHEMA.nullable(),
|
|
80
|
+
});
|
|
81
|
+
export const ELEVENLABS_TRANSCRIPT_WORD_SCHEMA = z.object({
|
|
82
|
+
channelIndex: z.number().int().nonnegative().nullable().optional(),
|
|
83
|
+
end: z.number().nonnegative().nullable().optional(),
|
|
84
|
+
logprob: z.number().optional(),
|
|
85
|
+
speakerId: z.string().nullable().optional(),
|
|
86
|
+
start: z.number().nonnegative().nullable().optional(),
|
|
87
|
+
text: z.string(),
|
|
88
|
+
type: z.enum(["audio_event", "spacing", "word"]),
|
|
89
|
+
});
|
|
90
|
+
export const ELEVENLABS_TRANSCRIPT_SCHEMA = z.object({
|
|
91
|
+
languageCode: z.string(),
|
|
92
|
+
languageProbability: z.number().min(0).max(1),
|
|
93
|
+
text: z.string(),
|
|
94
|
+
words: ELEVENLABS_TRANSCRIPT_WORD_SCHEMA.array(),
|
|
95
|
+
});
|
|
96
|
+
export const ELEVENLABS_TRANSCRIPTION_RESULT_SCHEMA = z.union([
|
|
97
|
+
ELEVENLABS_TRANSCRIPT_SCHEMA,
|
|
98
|
+
z.object({ transcripts: ELEVENLABS_TRANSCRIPT_SCHEMA.array() }),
|
|
99
|
+
]);
|
|
100
|
+
export const ELEVENLABS_FORCED_ALIGNMENT_SCHEMA = z.object({
|
|
101
|
+
characters: z
|
|
102
|
+
.object({ end: z.number(), start: z.number(), text: z.string() })
|
|
103
|
+
.array(),
|
|
104
|
+
loss: z.number(),
|
|
105
|
+
words: z
|
|
106
|
+
.object({ end: z.number(), start: z.number(), text: z.string() })
|
|
107
|
+
.array(),
|
|
108
|
+
});
|
|
109
|
+
export const ELEVENLABS_DUBBING_CREATED_SCHEMA = z.object({
|
|
110
|
+
dubbingId: z.string().min(1),
|
|
111
|
+
expectedDurationSec: z.number().nonnegative(),
|
|
112
|
+
});
|
|
113
|
+
export const ELEVENLABS_DUBBING_SCHEMA = z.object({
|
|
114
|
+
dubbingId: z.string().min(1),
|
|
115
|
+
error: z.string().nullable().optional(),
|
|
116
|
+
name: z.string(),
|
|
117
|
+
sourceLanguage: z.string().nullable(),
|
|
118
|
+
status: z.enum([
|
|
119
|
+
"cloning",
|
|
120
|
+
"dubbed",
|
|
121
|
+
"dubbing",
|
|
122
|
+
"failed",
|
|
123
|
+
"preparing",
|
|
124
|
+
"queued",
|
|
125
|
+
]),
|
|
126
|
+
targetLanguages: z.string().array(),
|
|
127
|
+
});
|
|
128
|
+
export const ELEVENLABS_AGENT_SUMMARY_SCHEMA = z.object({
|
|
129
|
+
agentId: z.string().min(1),
|
|
130
|
+
name: z.string(),
|
|
131
|
+
tags: z.string().array().optional(),
|
|
132
|
+
});
|
|
133
|
+
export const ELEVENLABS_AGENTS_PAGE_SCHEMA = z.object({
|
|
134
|
+
agents: ELEVENLABS_AGENT_SUMMARY_SCHEMA.array(),
|
|
135
|
+
hasMore: z.boolean(),
|
|
136
|
+
nextCursor: z.string().nullable().optional(),
|
|
137
|
+
});
|
|
138
|
+
export const ELEVENLABS_CONVERSATION_SUMMARY_SCHEMA = z.object({
|
|
139
|
+
agentId: z.string().min(1),
|
|
140
|
+
agentName: z.string().nullable().optional(),
|
|
141
|
+
callDurationSecs: z.number().int().nonnegative(),
|
|
142
|
+
callSuccessful: z.enum(["error", "failure", "success", "unknown"]),
|
|
143
|
+
conversationId: z.string().min(1),
|
|
144
|
+
direction: z.enum(["inbound", "outbound"]).nullable().optional(),
|
|
145
|
+
mainLanguage: z.string().nullable().optional(),
|
|
146
|
+
messageCount: z.number().int().nonnegative(),
|
|
147
|
+
startTimeUnixSecs: z.number().int().nonnegative(),
|
|
148
|
+
status: z.enum(["done", "failed", "in-progress", "initiated", "processing"]),
|
|
149
|
+
transcriptSummary: z.string().nullable().optional(),
|
|
150
|
+
});
|
|
151
|
+
export const ELEVENLABS_CONVERSATIONS_PAGE_SCHEMA = z.object({
|
|
152
|
+
conversations: ELEVENLABS_CONVERSATION_SUMMARY_SCHEMA.array(),
|
|
153
|
+
hasMore: z.boolean(),
|
|
154
|
+
nextCursor: z.string().nullable().optional(),
|
|
155
|
+
});
|
|
156
|
+
export const ELEVENLABS_CONVERSATION_SCHEMA = z.object({
|
|
157
|
+
agentId: z.string().min(1),
|
|
158
|
+
conversationId: z.string().min(1),
|
|
159
|
+
hasAudio: z.boolean(),
|
|
160
|
+
status: z.enum(["done", "failed", "in-progress", "initiated", "processing"]),
|
|
161
|
+
transcript: z
|
|
162
|
+
.object({
|
|
163
|
+
agentMetadata: z.record(z.string(), z.json()).nullable().optional(),
|
|
164
|
+
message: z.string().nullable().optional(),
|
|
165
|
+
role: z.enum(["agent", "user"]),
|
|
166
|
+
timeInCallSecs: z.number().nonnegative(),
|
|
167
|
+
})
|
|
168
|
+
.array(),
|
|
169
|
+
});
|
|
170
|
+
export const ELEVENLABS_OUTBOUND_CALL_SCHEMA = z.object({
|
|
171
|
+
callSid: z.string().nullable(),
|
|
172
|
+
conversationId: z.string().nullable(),
|
|
173
|
+
message: z.string(),
|
|
174
|
+
success: z.boolean(),
|
|
175
|
+
});
|
|
176
|
+
export const ELEVENLABS_VOICE_REMOVAL_EVENT_SCHEMA = z.object({
|
|
177
|
+
data: z.object({
|
|
178
|
+
noticePeriodDays: z.number().int().nonnegative().optional(),
|
|
179
|
+
voiceId: z.string().min(1),
|
|
180
|
+
voiceName: z.string().optional(),
|
|
181
|
+
}),
|
|
182
|
+
eventTimestamp: z.number().int().nonnegative(),
|
|
183
|
+
type: z.enum([
|
|
184
|
+
"voice_removal_notice",
|
|
185
|
+
"voice_removal_notice_withdrawn",
|
|
186
|
+
"voice_removed",
|
|
187
|
+
]),
|
|
188
|
+
});
|
|
189
|
+
export const ELEVENLABS_TRANSCRIPTION_EVENT_SCHEMA = z.object({
|
|
190
|
+
data: z.object({
|
|
191
|
+
requestId: z.string().min(1),
|
|
192
|
+
transcription: ELEVENLABS_TRANSCRIPTION_RESULT_SCHEMA,
|
|
193
|
+
webhookMetadata: z.record(z.string(), z.json()).nullable().optional(),
|
|
194
|
+
}),
|
|
195
|
+
eventTimestamp: z.number().int().nonnegative().optional(),
|
|
196
|
+
type: z.literal("speech_to_text_transcription"),
|
|
197
|
+
});
|
|
198
|
+
const ELEVENLABS_FLOW_GENERATION_DATA_SCHEMA = z.discriminatedUnion("status", [
|
|
199
|
+
z.object({
|
|
200
|
+
contentMimeType: z.string().min(1),
|
|
201
|
+
contentUrl: z.url(),
|
|
202
|
+
id: z.string().min(1),
|
|
203
|
+
status: z.literal("completed"),
|
|
204
|
+
}),
|
|
205
|
+
z.object({
|
|
206
|
+
errorMessage: z.string(),
|
|
207
|
+
failureReason: z.enum([
|
|
208
|
+
"charging_failed",
|
|
209
|
+
"dependency_failed",
|
|
210
|
+
"internal_error",
|
|
211
|
+
"invalid_parameters",
|
|
212
|
+
"model_error",
|
|
213
|
+
"moderated",
|
|
214
|
+
"timeout",
|
|
215
|
+
]),
|
|
216
|
+
id: z.string().min(1),
|
|
217
|
+
status: z.literal("failed"),
|
|
218
|
+
}),
|
|
219
|
+
]);
|
|
220
|
+
export const ELEVENLABS_FLOW_GENERATION_EVENT_SCHEMA = z.object({
|
|
221
|
+
data: ELEVENLABS_FLOW_GENERATION_DATA_SCHEMA,
|
|
222
|
+
eventTimestamp: z.number().int().nonnegative(),
|
|
223
|
+
type: z.literal("flows_generation"),
|
|
224
|
+
});
|
|
225
|
+
export const ELEVENLABS_WEBHOOK_EVENT_SCHEMA = z.union([
|
|
226
|
+
ELEVENLABS_VOICE_REMOVAL_EVENT_SCHEMA,
|
|
227
|
+
ELEVENLABS_TRANSCRIPTION_EVENT_SCHEMA,
|
|
228
|
+
ELEVENLABS_FLOW_GENERATION_EVENT_SCHEMA,
|
|
229
|
+
]);
|