@runwayml/sdk 3.14.3 → 3.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/README.md +31 -0
- package/client.d.mts +52 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +52 -1
- package/client.d.ts.map +1 -1
- package/client.js +63 -17
- package/client.js.map +1 -1
- package/client.mjs +63 -17
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +54 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +54 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +101 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +95 -0
- package/core/pagination.mjs.map +1 -0
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/internal/utils/query.d.mts +5 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +5 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +23 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +20 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils.d.mts +1 -0
- package/internal/utils.d.ts +1 -0
- package/internal/utils.js +1 -0
- package/internal/utils.js.map +1 -1
- package/internal/utils.mjs +1 -0
- package/package.json +22 -1
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resources/avatars.d.mts +1308 -0
- package/resources/avatars.d.mts.map +1 -0
- package/resources/avatars.d.ts +1308 -0
- package/resources/avatars.d.ts.map +1 -0
- package/resources/avatars.js +87 -0
- package/resources/avatars.js.map +1 -0
- package/resources/avatars.mjs +83 -0
- package/resources/avatars.mjs.map +1 -0
- package/resources/character-performance.d.mts +3 -0
- package/resources/character-performance.d.mts.map +1 -1
- package/resources/character-performance.d.ts +3 -0
- package/resources/character-performance.d.ts.map +1 -1
- package/resources/character-performance.js +3 -0
- package/resources/character-performance.js.map +1 -1
- package/resources/character-performance.mjs +3 -0
- package/resources/character-performance.mjs.map +1 -1
- package/resources/documents.d.mts +209 -0
- package/resources/documents.d.mts.map +1 -0
- package/resources/documents.d.ts +209 -0
- package/resources/documents.d.ts.map +1 -0
- package/resources/documents.js +75 -0
- package/resources/documents.js.map +1 -0
- package/resources/documents.mjs +71 -0
- package/resources/documents.mjs.map +1 -0
- package/resources/image-to-video.d.mts +3 -0
- package/resources/image-to-video.d.mts.map +1 -1
- package/resources/image-to-video.d.ts +3 -0
- package/resources/image-to-video.d.ts.map +1 -1
- package/resources/image-to-video.js +3 -0
- package/resources/image-to-video.js.map +1 -1
- package/resources/image-to-video.mjs +3 -0
- package/resources/image-to-video.mjs.map +1 -1
- package/resources/index.d.mts +4 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +9 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -0
- package/resources/index.mjs.map +1 -1
- package/resources/organization.d.mts +2 -2
- package/resources/organization.d.mts.map +1 -1
- package/resources/organization.d.ts +2 -2
- package/resources/organization.d.ts.map +1 -1
- package/resources/realtime-sessions.d.mts +180 -0
- package/resources/realtime-sessions.d.mts.map +1 -0
- package/resources/realtime-sessions.d.ts +180 -0
- package/resources/realtime-sessions.d.ts.map +1 -0
- package/resources/realtime-sessions.js +32 -0
- package/resources/realtime-sessions.js.map +1 -0
- package/resources/realtime-sessions.mjs +28 -0
- package/resources/realtime-sessions.mjs.map +1 -0
- package/resources/sound-effect.d.mts +3 -0
- package/resources/sound-effect.d.mts.map +1 -1
- package/resources/sound-effect.d.ts +3 -0
- package/resources/sound-effect.d.ts.map +1 -1
- package/resources/sound-effect.js +3 -0
- package/resources/sound-effect.js.map +1 -1
- package/resources/sound-effect.mjs +3 -0
- package/resources/sound-effect.mjs.map +1 -1
- package/resources/speech-to-speech.d.mts +3 -0
- package/resources/speech-to-speech.d.mts.map +1 -1
- package/resources/speech-to-speech.d.ts +3 -0
- package/resources/speech-to-speech.d.ts.map +1 -1
- package/resources/speech-to-speech.js +3 -0
- package/resources/speech-to-speech.js.map +1 -1
- package/resources/speech-to-speech.mjs +3 -0
- package/resources/speech-to-speech.mjs.map +1 -1
- package/resources/tasks.d.mts +3 -0
- package/resources/tasks.d.mts.map +1 -1
- package/resources/tasks.d.ts +3 -0
- package/resources/tasks.d.ts.map +1 -1
- package/resources/tasks.js +3 -0
- package/resources/tasks.js.map +1 -1
- package/resources/tasks.mjs +3 -0
- package/resources/tasks.mjs.map +1 -1
- package/resources/text-to-image.d.mts +3 -0
- package/resources/text-to-image.d.mts.map +1 -1
- package/resources/text-to-image.d.ts +3 -0
- package/resources/text-to-image.d.ts.map +1 -1
- package/resources/text-to-image.js +3 -0
- package/resources/text-to-image.js.map +1 -1
- package/resources/text-to-image.mjs +3 -0
- package/resources/text-to-image.mjs.map +1 -1
- package/resources/text-to-speech.d.mts +3 -0
- package/resources/text-to-speech.d.mts.map +1 -1
- package/resources/text-to-speech.d.ts +3 -0
- package/resources/text-to-speech.d.ts.map +1 -1
- package/resources/text-to-speech.js +3 -0
- package/resources/text-to-speech.js.map +1 -1
- package/resources/text-to-speech.mjs +3 -0
- package/resources/text-to-speech.mjs.map +1 -1
- package/resources/text-to-video.d.mts +3 -0
- package/resources/text-to-video.d.mts.map +1 -1
- package/resources/text-to-video.d.ts +3 -0
- package/resources/text-to-video.d.ts.map +1 -1
- package/resources/text-to-video.js +3 -0
- package/resources/text-to-video.js.map +1 -1
- package/resources/text-to-video.mjs +3 -0
- package/resources/text-to-video.mjs.map +1 -1
- package/resources/video-to-video.d.mts +3 -0
- package/resources/video-to-video.d.mts.map +1 -1
- package/resources/video-to-video.d.ts +3 -0
- package/resources/video-to-video.d.ts.map +1 -1
- package/resources/video-to-video.js +3 -0
- package/resources/video-to-video.js.map +1 -1
- package/resources/video-to-video.mjs +3 -0
- package/resources/video-to-video.mjs.map +1 -1
- package/resources/voice-dubbing.d.mts +3 -0
- package/resources/voice-dubbing.d.mts.map +1 -1
- package/resources/voice-dubbing.d.ts +3 -0
- package/resources/voice-dubbing.d.ts.map +1 -1
- package/resources/voice-dubbing.js +3 -0
- package/resources/voice-dubbing.js.map +1 -1
- package/resources/voice-dubbing.mjs +3 -0
- package/resources/voice-dubbing.mjs.map +1 -1
- package/resources/voice-isolation.d.mts +3 -0
- package/resources/voice-isolation.d.mts.map +1 -1
- package/resources/voice-isolation.d.ts +3 -0
- package/resources/voice-isolation.d.ts.map +1 -1
- package/resources/voice-isolation.js +3 -0
- package/resources/voice-isolation.js.map +1 -1
- package/resources/voice-isolation.mjs +3 -0
- package/resources/voice-isolation.mjs.map +1 -1
- package/resources/voices.d.mts +257 -0
- package/resources/voices.d.mts.map +1 -0
- package/resources/voices.d.ts +257 -0
- package/resources/voices.d.ts.map +1 -0
- package/resources/voices.js +47 -0
- package/resources/voices.js.map +1 -0
- package/resources/voices.mjs +43 -0
- package/resources/voices.mjs.map +1 -0
- package/src/client.ts +159 -22
- package/src/core/pagination.ts +157 -0
- package/src/index.ts +1 -0
- package/src/internal/utils/query.ts +23 -0
- package/src/internal/utils.ts +1 -0
- package/src/pagination.ts +2 -0
- package/src/resources/avatars.ts +2049 -0
- package/src/resources/character-performance.ts +3 -0
- package/src/resources/documents.ts +270 -0
- package/src/resources/image-to-video.ts +3 -0
- package/src/resources/index.ts +37 -0
- package/src/resources/organization.ts +5 -1
- package/src/resources/realtime-sessions.ts +251 -0
- package/src/resources/sound-effect.ts +3 -0
- package/src/resources/speech-to-speech.ts +3 -0
- package/src/resources/tasks.ts +3 -0
- package/src/resources/text-to-image.ts +3 -0
- package/src/resources/text-to-speech.ts +3 -0
- package/src/resources/text-to-video.ts +3 -0
- package/src/resources/video-to-video.ts +3 -0
- package/src/resources/voice-dubbing.ts +3 -0
- package/src/resources/voice-isolation.ts +3 -0
- package/src/resources/voices.ts +345 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.mjs";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
|
+
export declare class Voices extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Create a custom voice from a text description.
|
|
8
|
+
*/
|
|
9
|
+
create(body: VoiceCreateParams, options?: RequestOptions): APIPromise<VoiceCreateResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Get details about a specific custom voice.
|
|
12
|
+
*/
|
|
13
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<VoiceRetrieveResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* List custom voices for the authenticated organization with cursor-based
|
|
16
|
+
* pagination.
|
|
17
|
+
*/
|
|
18
|
+
list(query: VoiceListParams, options?: RequestOptions): PagePromise<VoiceListResponsesCursorPage, VoiceListResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* Delete a custom voice.
|
|
21
|
+
*/
|
|
22
|
+
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Generate a short audio preview of a voice from a text description. Use this to
|
|
25
|
+
* audition a voice before creating it.
|
|
26
|
+
*/
|
|
27
|
+
preview(body: VoicePreviewParams, options?: RequestOptions): APIPromise<VoicePreviewResponse>;
|
|
28
|
+
}
|
|
29
|
+
export type VoiceListResponsesCursorPage = CursorPage<VoiceListResponse>;
|
|
30
|
+
export interface VoiceCreateResponse {
|
|
31
|
+
/**
|
|
32
|
+
* The ID of the voice that was created.
|
|
33
|
+
*/
|
|
34
|
+
id: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A voice that is still being processed.
|
|
38
|
+
*/
|
|
39
|
+
export type VoiceRetrieveResponse = VoiceRetrieveResponse.Processing | VoiceRetrieveResponse.Ready | VoiceRetrieveResponse.Failed;
|
|
40
|
+
export declare namespace VoiceRetrieveResponse {
|
|
41
|
+
/**
|
|
42
|
+
* A voice that is still being processed.
|
|
43
|
+
*/
|
|
44
|
+
interface Processing {
|
|
45
|
+
/**
|
|
46
|
+
* The unique identifier of the voice.
|
|
47
|
+
*/
|
|
48
|
+
id: string;
|
|
49
|
+
/**
|
|
50
|
+
* When the voice was created.
|
|
51
|
+
*/
|
|
52
|
+
createdAt: string;
|
|
53
|
+
/**
|
|
54
|
+
* A description of the voice, or null if not set.
|
|
55
|
+
*/
|
|
56
|
+
description: string | null;
|
|
57
|
+
/**
|
|
58
|
+
* The name of the voice.
|
|
59
|
+
*/
|
|
60
|
+
name: string;
|
|
61
|
+
status: 'PROCESSING';
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* A voice that is ready for use.
|
|
65
|
+
*/
|
|
66
|
+
interface Ready {
|
|
67
|
+
/**
|
|
68
|
+
* The unique identifier of the voice.
|
|
69
|
+
*/
|
|
70
|
+
id: string;
|
|
71
|
+
/**
|
|
72
|
+
* When the voice was created.
|
|
73
|
+
*/
|
|
74
|
+
createdAt: string;
|
|
75
|
+
/**
|
|
76
|
+
* A description of the voice, or null if not set.
|
|
77
|
+
*/
|
|
78
|
+
description: string | null;
|
|
79
|
+
/**
|
|
80
|
+
* The name of the voice.
|
|
81
|
+
*/
|
|
82
|
+
name: string;
|
|
83
|
+
/**
|
|
84
|
+
* A signed URL to an MP3 audio sample of the voice, or null if no sample is
|
|
85
|
+
* available.
|
|
86
|
+
*/
|
|
87
|
+
previewUrl: string | null;
|
|
88
|
+
status: 'READY';
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* A voice that failed to finish processing.
|
|
92
|
+
*/
|
|
93
|
+
interface Failed {
|
|
94
|
+
/**
|
|
95
|
+
* The unique identifier of the voice.
|
|
96
|
+
*/
|
|
97
|
+
id: string;
|
|
98
|
+
/**
|
|
99
|
+
* When the voice was created.
|
|
100
|
+
*/
|
|
101
|
+
createdAt: string;
|
|
102
|
+
/**
|
|
103
|
+
* A description of the voice, or null if not set.
|
|
104
|
+
*/
|
|
105
|
+
description: string | null;
|
|
106
|
+
/**
|
|
107
|
+
* A human-readable error message. This value is not stable and should not be
|
|
108
|
+
* matched against programmatically.
|
|
109
|
+
*/
|
|
110
|
+
failureReason: string;
|
|
111
|
+
/**
|
|
112
|
+
* The name of the voice.
|
|
113
|
+
*/
|
|
114
|
+
name: string;
|
|
115
|
+
status: 'FAILED';
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* A voice that is still being processed.
|
|
120
|
+
*/
|
|
121
|
+
export type VoiceListResponse = VoiceListResponse.Processing | VoiceListResponse.Ready | VoiceListResponse.Failed;
|
|
122
|
+
export declare namespace VoiceListResponse {
|
|
123
|
+
/**
|
|
124
|
+
* A voice that is still being processed.
|
|
125
|
+
*/
|
|
126
|
+
interface Processing {
|
|
127
|
+
/**
|
|
128
|
+
* The unique identifier of the voice.
|
|
129
|
+
*/
|
|
130
|
+
id: string;
|
|
131
|
+
/**
|
|
132
|
+
* When the voice was created.
|
|
133
|
+
*/
|
|
134
|
+
createdAt: string;
|
|
135
|
+
/**
|
|
136
|
+
* A description of the voice, or null if not set.
|
|
137
|
+
*/
|
|
138
|
+
description: string | null;
|
|
139
|
+
/**
|
|
140
|
+
* The name of the voice.
|
|
141
|
+
*/
|
|
142
|
+
name: string;
|
|
143
|
+
status: 'PROCESSING';
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* A voice that is ready for use.
|
|
147
|
+
*/
|
|
148
|
+
interface Ready {
|
|
149
|
+
/**
|
|
150
|
+
* The unique identifier of the voice.
|
|
151
|
+
*/
|
|
152
|
+
id: string;
|
|
153
|
+
/**
|
|
154
|
+
* When the voice was created.
|
|
155
|
+
*/
|
|
156
|
+
createdAt: string;
|
|
157
|
+
/**
|
|
158
|
+
* A description of the voice, or null if not set.
|
|
159
|
+
*/
|
|
160
|
+
description: string | null;
|
|
161
|
+
/**
|
|
162
|
+
* The name of the voice.
|
|
163
|
+
*/
|
|
164
|
+
name: string;
|
|
165
|
+
/**
|
|
166
|
+
* A signed URL to an MP3 audio sample of the voice, or null if no sample is
|
|
167
|
+
* available.
|
|
168
|
+
*/
|
|
169
|
+
previewUrl: string | null;
|
|
170
|
+
status: 'READY';
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* A voice that failed to finish processing.
|
|
174
|
+
*/
|
|
175
|
+
interface Failed {
|
|
176
|
+
/**
|
|
177
|
+
* The unique identifier of the voice.
|
|
178
|
+
*/
|
|
179
|
+
id: string;
|
|
180
|
+
/**
|
|
181
|
+
* When the voice was created.
|
|
182
|
+
*/
|
|
183
|
+
createdAt: string;
|
|
184
|
+
/**
|
|
185
|
+
* A description of the voice, or null if not set.
|
|
186
|
+
*/
|
|
187
|
+
description: string | null;
|
|
188
|
+
/**
|
|
189
|
+
* A human-readable error message. This value is not stable and should not be
|
|
190
|
+
* matched against programmatically.
|
|
191
|
+
*/
|
|
192
|
+
failureReason: string;
|
|
193
|
+
/**
|
|
194
|
+
* The name of the voice.
|
|
195
|
+
*/
|
|
196
|
+
name: string;
|
|
197
|
+
status: 'FAILED';
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
export interface VoicePreviewResponse {
|
|
201
|
+
/**
|
|
202
|
+
* Duration of the audio preview in seconds.
|
|
203
|
+
*/
|
|
204
|
+
durationSecs: number;
|
|
205
|
+
/**
|
|
206
|
+
* A presigned URL to the audio preview. The URL expires after 24 hours.
|
|
207
|
+
*/
|
|
208
|
+
url: string;
|
|
209
|
+
}
|
|
210
|
+
export interface VoiceCreateParams {
|
|
211
|
+
/**
|
|
212
|
+
* The source configuration for creating the voice.
|
|
213
|
+
*/
|
|
214
|
+
from: VoiceCreateParams.From;
|
|
215
|
+
/**
|
|
216
|
+
* A name for the voice.
|
|
217
|
+
*/
|
|
218
|
+
name: string;
|
|
219
|
+
/**
|
|
220
|
+
* An optional description of the voice.
|
|
221
|
+
*/
|
|
222
|
+
description?: string | null;
|
|
223
|
+
}
|
|
224
|
+
export declare namespace VoiceCreateParams {
|
|
225
|
+
/**
|
|
226
|
+
* The source configuration for creating the voice.
|
|
227
|
+
*/
|
|
228
|
+
interface From {
|
|
229
|
+
/**
|
|
230
|
+
* The voice design model to use.
|
|
231
|
+
*/
|
|
232
|
+
model: 'eleven_multilingual_ttv_v2' | 'eleven_ttv_v3';
|
|
233
|
+
/**
|
|
234
|
+
* A text description of the desired voice characteristics. Must be at least 20
|
|
235
|
+
* characters.
|
|
236
|
+
*/
|
|
237
|
+
prompt: string;
|
|
238
|
+
type: 'text';
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
export interface VoiceListParams extends CursorPageParams {
|
|
242
|
+
}
|
|
243
|
+
export interface VoicePreviewParams {
|
|
244
|
+
/**
|
|
245
|
+
* The voice design model to use.
|
|
246
|
+
*/
|
|
247
|
+
model: 'eleven_multilingual_ttv_v2' | 'eleven_ttv_v3';
|
|
248
|
+
/**
|
|
249
|
+
* A text description of the desired voice characteristics. Must be at least 20
|
|
250
|
+
* characters.
|
|
251
|
+
*/
|
|
252
|
+
prompt: string;
|
|
253
|
+
}
|
|
254
|
+
export declare namespace Voices {
|
|
255
|
+
export { type VoiceCreateResponse as VoiceCreateResponse, type VoiceRetrieveResponse as VoiceRetrieveResponse, type VoiceListResponse as VoiceListResponse, type VoicePreviewResponse as VoicePreviewResponse, type VoiceListResponsesCursorPage as VoiceListResponsesCursorPage, type VoiceCreateParams as VoiceCreateParams, type VoiceListParams as VoiceListParams, type VoicePreviewParams as VoicePreviewParams, };
|
|
256
|
+
}
|
|
257
|
+
//# sourceMappingURL=voices.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voices.d.mts","sourceRoot":"","sources":["../src/resources/voices.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAElD,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;IAI1F;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAIjF;;;OAGG;IACH,IAAI,CACF,KAAK,EAAE,eAAe,EACtB,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,4BAA4B,EAAE,iBAAiB,CAAC;IAI/D;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAO9D;;;OAGG;IACH,OAAO,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;CAG9F;AAED,MAAM,MAAM,4BAA4B,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC;AAEzE,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAC7B,qBAAqB,CAAC,UAAU,GAChC,qBAAqB,CAAC,KAAK,GAC3B,qBAAqB,CAAC,MAAM,CAAC;AAEjC,yBAAiB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G;IACH,KAAK,EAAE,4BAA4B,GAAG,eAAe,CAAC;IAEtD;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.js";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
5
|
+
export declare class Voices extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Create a custom voice from a text description.
|
|
8
|
+
*/
|
|
9
|
+
create(body: VoiceCreateParams, options?: RequestOptions): APIPromise<VoiceCreateResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Get details about a specific custom voice.
|
|
12
|
+
*/
|
|
13
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<VoiceRetrieveResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* List custom voices for the authenticated organization with cursor-based
|
|
16
|
+
* pagination.
|
|
17
|
+
*/
|
|
18
|
+
list(query: VoiceListParams, options?: RequestOptions): PagePromise<VoiceListResponsesCursorPage, VoiceListResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* Delete a custom voice.
|
|
21
|
+
*/
|
|
22
|
+
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Generate a short audio preview of a voice from a text description. Use this to
|
|
25
|
+
* audition a voice before creating it.
|
|
26
|
+
*/
|
|
27
|
+
preview(body: VoicePreviewParams, options?: RequestOptions): APIPromise<VoicePreviewResponse>;
|
|
28
|
+
}
|
|
29
|
+
export type VoiceListResponsesCursorPage = CursorPage<VoiceListResponse>;
|
|
30
|
+
export interface VoiceCreateResponse {
|
|
31
|
+
/**
|
|
32
|
+
* The ID of the voice that was created.
|
|
33
|
+
*/
|
|
34
|
+
id: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A voice that is still being processed.
|
|
38
|
+
*/
|
|
39
|
+
export type VoiceRetrieveResponse = VoiceRetrieveResponse.Processing | VoiceRetrieveResponse.Ready | VoiceRetrieveResponse.Failed;
|
|
40
|
+
export declare namespace VoiceRetrieveResponse {
|
|
41
|
+
/**
|
|
42
|
+
* A voice that is still being processed.
|
|
43
|
+
*/
|
|
44
|
+
interface Processing {
|
|
45
|
+
/**
|
|
46
|
+
* The unique identifier of the voice.
|
|
47
|
+
*/
|
|
48
|
+
id: string;
|
|
49
|
+
/**
|
|
50
|
+
* When the voice was created.
|
|
51
|
+
*/
|
|
52
|
+
createdAt: string;
|
|
53
|
+
/**
|
|
54
|
+
* A description of the voice, or null if not set.
|
|
55
|
+
*/
|
|
56
|
+
description: string | null;
|
|
57
|
+
/**
|
|
58
|
+
* The name of the voice.
|
|
59
|
+
*/
|
|
60
|
+
name: string;
|
|
61
|
+
status: 'PROCESSING';
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* A voice that is ready for use.
|
|
65
|
+
*/
|
|
66
|
+
interface Ready {
|
|
67
|
+
/**
|
|
68
|
+
* The unique identifier of the voice.
|
|
69
|
+
*/
|
|
70
|
+
id: string;
|
|
71
|
+
/**
|
|
72
|
+
* When the voice was created.
|
|
73
|
+
*/
|
|
74
|
+
createdAt: string;
|
|
75
|
+
/**
|
|
76
|
+
* A description of the voice, or null if not set.
|
|
77
|
+
*/
|
|
78
|
+
description: string | null;
|
|
79
|
+
/**
|
|
80
|
+
* The name of the voice.
|
|
81
|
+
*/
|
|
82
|
+
name: string;
|
|
83
|
+
/**
|
|
84
|
+
* A signed URL to an MP3 audio sample of the voice, or null if no sample is
|
|
85
|
+
* available.
|
|
86
|
+
*/
|
|
87
|
+
previewUrl: string | null;
|
|
88
|
+
status: 'READY';
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* A voice that failed to finish processing.
|
|
92
|
+
*/
|
|
93
|
+
interface Failed {
|
|
94
|
+
/**
|
|
95
|
+
* The unique identifier of the voice.
|
|
96
|
+
*/
|
|
97
|
+
id: string;
|
|
98
|
+
/**
|
|
99
|
+
* When the voice was created.
|
|
100
|
+
*/
|
|
101
|
+
createdAt: string;
|
|
102
|
+
/**
|
|
103
|
+
* A description of the voice, or null if not set.
|
|
104
|
+
*/
|
|
105
|
+
description: string | null;
|
|
106
|
+
/**
|
|
107
|
+
* A human-readable error message. This value is not stable and should not be
|
|
108
|
+
* matched against programmatically.
|
|
109
|
+
*/
|
|
110
|
+
failureReason: string;
|
|
111
|
+
/**
|
|
112
|
+
* The name of the voice.
|
|
113
|
+
*/
|
|
114
|
+
name: string;
|
|
115
|
+
status: 'FAILED';
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* A voice that is still being processed.
|
|
120
|
+
*/
|
|
121
|
+
export type VoiceListResponse = VoiceListResponse.Processing | VoiceListResponse.Ready | VoiceListResponse.Failed;
|
|
122
|
+
export declare namespace VoiceListResponse {
|
|
123
|
+
/**
|
|
124
|
+
* A voice that is still being processed.
|
|
125
|
+
*/
|
|
126
|
+
interface Processing {
|
|
127
|
+
/**
|
|
128
|
+
* The unique identifier of the voice.
|
|
129
|
+
*/
|
|
130
|
+
id: string;
|
|
131
|
+
/**
|
|
132
|
+
* When the voice was created.
|
|
133
|
+
*/
|
|
134
|
+
createdAt: string;
|
|
135
|
+
/**
|
|
136
|
+
* A description of the voice, or null if not set.
|
|
137
|
+
*/
|
|
138
|
+
description: string | null;
|
|
139
|
+
/**
|
|
140
|
+
* The name of the voice.
|
|
141
|
+
*/
|
|
142
|
+
name: string;
|
|
143
|
+
status: 'PROCESSING';
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* A voice that is ready for use.
|
|
147
|
+
*/
|
|
148
|
+
interface Ready {
|
|
149
|
+
/**
|
|
150
|
+
* The unique identifier of the voice.
|
|
151
|
+
*/
|
|
152
|
+
id: string;
|
|
153
|
+
/**
|
|
154
|
+
* When the voice was created.
|
|
155
|
+
*/
|
|
156
|
+
createdAt: string;
|
|
157
|
+
/**
|
|
158
|
+
* A description of the voice, or null if not set.
|
|
159
|
+
*/
|
|
160
|
+
description: string | null;
|
|
161
|
+
/**
|
|
162
|
+
* The name of the voice.
|
|
163
|
+
*/
|
|
164
|
+
name: string;
|
|
165
|
+
/**
|
|
166
|
+
* A signed URL to an MP3 audio sample of the voice, or null if no sample is
|
|
167
|
+
* available.
|
|
168
|
+
*/
|
|
169
|
+
previewUrl: string | null;
|
|
170
|
+
status: 'READY';
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* A voice that failed to finish processing.
|
|
174
|
+
*/
|
|
175
|
+
interface Failed {
|
|
176
|
+
/**
|
|
177
|
+
* The unique identifier of the voice.
|
|
178
|
+
*/
|
|
179
|
+
id: string;
|
|
180
|
+
/**
|
|
181
|
+
* When the voice was created.
|
|
182
|
+
*/
|
|
183
|
+
createdAt: string;
|
|
184
|
+
/**
|
|
185
|
+
* A description of the voice, or null if not set.
|
|
186
|
+
*/
|
|
187
|
+
description: string | null;
|
|
188
|
+
/**
|
|
189
|
+
* A human-readable error message. This value is not stable and should not be
|
|
190
|
+
* matched against programmatically.
|
|
191
|
+
*/
|
|
192
|
+
failureReason: string;
|
|
193
|
+
/**
|
|
194
|
+
* The name of the voice.
|
|
195
|
+
*/
|
|
196
|
+
name: string;
|
|
197
|
+
status: 'FAILED';
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
export interface VoicePreviewResponse {
|
|
201
|
+
/**
|
|
202
|
+
* Duration of the audio preview in seconds.
|
|
203
|
+
*/
|
|
204
|
+
durationSecs: number;
|
|
205
|
+
/**
|
|
206
|
+
* A presigned URL to the audio preview. The URL expires after 24 hours.
|
|
207
|
+
*/
|
|
208
|
+
url: string;
|
|
209
|
+
}
|
|
210
|
+
export interface VoiceCreateParams {
|
|
211
|
+
/**
|
|
212
|
+
* The source configuration for creating the voice.
|
|
213
|
+
*/
|
|
214
|
+
from: VoiceCreateParams.From;
|
|
215
|
+
/**
|
|
216
|
+
* A name for the voice.
|
|
217
|
+
*/
|
|
218
|
+
name: string;
|
|
219
|
+
/**
|
|
220
|
+
* An optional description of the voice.
|
|
221
|
+
*/
|
|
222
|
+
description?: string | null;
|
|
223
|
+
}
|
|
224
|
+
export declare namespace VoiceCreateParams {
|
|
225
|
+
/**
|
|
226
|
+
* The source configuration for creating the voice.
|
|
227
|
+
*/
|
|
228
|
+
interface From {
|
|
229
|
+
/**
|
|
230
|
+
* The voice design model to use.
|
|
231
|
+
*/
|
|
232
|
+
model: 'eleven_multilingual_ttv_v2' | 'eleven_ttv_v3';
|
|
233
|
+
/**
|
|
234
|
+
* A text description of the desired voice characteristics. Must be at least 20
|
|
235
|
+
* characters.
|
|
236
|
+
*/
|
|
237
|
+
prompt: string;
|
|
238
|
+
type: 'text';
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
export interface VoiceListParams extends CursorPageParams {
|
|
242
|
+
}
|
|
243
|
+
export interface VoicePreviewParams {
|
|
244
|
+
/**
|
|
245
|
+
* The voice design model to use.
|
|
246
|
+
*/
|
|
247
|
+
model: 'eleven_multilingual_ttv_v2' | 'eleven_ttv_v3';
|
|
248
|
+
/**
|
|
249
|
+
* A text description of the desired voice characteristics. Must be at least 20
|
|
250
|
+
* characters.
|
|
251
|
+
*/
|
|
252
|
+
prompt: string;
|
|
253
|
+
}
|
|
254
|
+
export declare namespace Voices {
|
|
255
|
+
export { type VoiceCreateResponse as VoiceCreateResponse, type VoiceRetrieveResponse as VoiceRetrieveResponse, type VoiceListResponse as VoiceListResponse, type VoicePreviewResponse as VoicePreviewResponse, type VoiceListResponsesCursorPage as VoiceListResponsesCursorPage, type VoiceCreateParams as VoiceCreateParams, type VoiceListParams as VoiceListParams, type VoicePreviewParams as VoicePreviewParams, };
|
|
256
|
+
}
|
|
257
|
+
//# sourceMappingURL=voices.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voices.d.ts","sourceRoot":"","sources":["../src/resources/voices.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAElD,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;IAI1F;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAIjF;;;OAGG;IACH,IAAI,CACF,KAAK,EAAE,eAAe,EACtB,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,4BAA4B,EAAE,iBAAiB,CAAC;IAI/D;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAO9D;;;OAGG;IACH,OAAO,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;CAG9F;AAED,MAAM,MAAM,4BAA4B,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC;AAEzE,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,E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QAEtD;;;WAGG;QACH,MAAM,EAAE,MAAM,CAAC;QAEf,IAAI,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;CAAG;AAE5D,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,KAAK,EAAE,4BAA4B,GAAG,eAAe,CAAC;IAEtD;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Voices = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../core/pagination.js");
|
|
7
|
+
const headers_1 = require("../internal/headers.js");
|
|
8
|
+
const path_1 = require("../internal/utils/path.js");
|
|
9
|
+
class Voices extends resource_1.APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Create a custom voice from a text description.
|
|
12
|
+
*/
|
|
13
|
+
create(body, options) {
|
|
14
|
+
return this._client.post('/v1/voices', { body, ...options });
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Get details about a specific custom voice.
|
|
18
|
+
*/
|
|
19
|
+
retrieve(id, options) {
|
|
20
|
+
return this._client.get((0, path_1.path) `/v1/voices/${id}`, options);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* List custom voices for the authenticated organization with cursor-based
|
|
24
|
+
* pagination.
|
|
25
|
+
*/
|
|
26
|
+
list(query, options) {
|
|
27
|
+
return this._client.getAPIList('/v1/voices', (pagination_1.CursorPage), { query, ...options });
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Delete a custom voice.
|
|
31
|
+
*/
|
|
32
|
+
delete(id, options) {
|
|
33
|
+
return this._client.delete((0, path_1.path) `/v1/voices/${id}`, {
|
|
34
|
+
...options,
|
|
35
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Generate a short audio preview of a voice from a text description. Use this to
|
|
40
|
+
* audition a voice before creating it.
|
|
41
|
+
*/
|
|
42
|
+
preview(body, options) {
|
|
43
|
+
return this._client.post('/v1/voices/preview', { body, ...options });
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.Voices = Voices;
|
|
47
|
+
//# sourceMappingURL=voices.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voices.js","sourceRoot":"","sources":["../src/resources/voices.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAoF;AACpF,oDAAmD;AAEnD,oDAA8C;AAE9C,MAAa,MAAO,SAAQ,sBAAW;IACrC;;OAEG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,cAAc,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED;;;OAGG;IACH,IAAI,CACF,KAAsB,EACtB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,CAAA,uBAA6B,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrG,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,cAAc,EAAE,EAAE,EAAE;YACjD,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,OAAO,CAAC,IAAwB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;CACF;AA3CD,wBA2CC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { CursorPage } from "../core/pagination.mjs";
|
|
4
|
+
import { buildHeaders } from "../internal/headers.mjs";
|
|
5
|
+
import { path } from "../internal/utils/path.mjs";
|
|
6
|
+
export class Voices extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Create a custom voice from a text description.
|
|
9
|
+
*/
|
|
10
|
+
create(body, options) {
|
|
11
|
+
return this._client.post('/v1/voices', { body, ...options });
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Get details about a specific custom voice.
|
|
15
|
+
*/
|
|
16
|
+
retrieve(id, options) {
|
|
17
|
+
return this._client.get(path `/v1/voices/${id}`, options);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* List custom voices for the authenticated organization with cursor-based
|
|
21
|
+
* pagination.
|
|
22
|
+
*/
|
|
23
|
+
list(query, options) {
|
|
24
|
+
return this._client.getAPIList('/v1/voices', (CursorPage), { query, ...options });
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Delete a custom voice.
|
|
28
|
+
*/
|
|
29
|
+
delete(id, options) {
|
|
30
|
+
return this._client.delete(path `/v1/voices/${id}`, {
|
|
31
|
+
...options,
|
|
32
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Generate a short audio preview of a voice from a text description. Use this to
|
|
37
|
+
* audition a voice before creating it.
|
|
38
|
+
*/
|
|
39
|
+
preview(body, options) {
|
|
40
|
+
return this._client.post('/v1/voices/preview', { body, ...options });
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=voices.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voices.mjs","sourceRoot":"","sources":["../src/resources/voices.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,UAAU,EAAsC;OAClD,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,cAAc,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED;;;OAGG;IACH,IAAI,CACF,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