@avallon-labs/sdk 0.0.0-0ca09b5e
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 +135 -0
- package/dist/index.d.ts +957 -0
- package/dist/index.js +512 -0
- package/dist/index.js.map +1 -0
- package/openapi.yaml +986 -0
- package/package.json +66 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,957 @@
|
|
|
1
|
+
import * as swr_mutation from 'swr/mutation';
|
|
2
|
+
import { SWRMutationConfiguration } from 'swr/mutation';
|
|
3
|
+
import * as swr__internal from 'swr/_internal';
|
|
4
|
+
import * as swr from 'swr';
|
|
5
|
+
import { Key, SWRConfiguration, Arguments } from 'swr';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Custom fetch wrapper for Orval-generated client.
|
|
9
|
+
* Handles auth (API key or Bearer token) and base URL configuration.
|
|
10
|
+
* Throws AvallonError on non-2xx responses for clean SWR error handling.
|
|
11
|
+
*/
|
|
12
|
+
type AvallonConfig = {
|
|
13
|
+
baseUrl?: string;
|
|
14
|
+
apiKey?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Token provider - can be sync or async.
|
|
17
|
+
* Async allows the application to check expiry and refresh before returning.
|
|
18
|
+
*/
|
|
19
|
+
getAccessToken?: () => string | null | Promise<string | null>;
|
|
20
|
+
};
|
|
21
|
+
/** Configure the SDK at runtime */
|
|
22
|
+
declare function configure(newConfig: Partial<AvallonConfig>): void;
|
|
23
|
+
/** Get current config */
|
|
24
|
+
declare function getConfig(): AvallonConfig;
|
|
25
|
+
/** Authenticated fetch - adds API key or Bearer token */
|
|
26
|
+
declare function customFetch<T>(url: string, options: RequestInit): Promise<T>;
|
|
27
|
+
/** Unauthenticated fetch - for auth flow endpoints (sign-in, sign-up, etc.) */
|
|
28
|
+
declare function customFetchNoAuth<T>(url: string, options: RequestInit): Promise<T>;
|
|
29
|
+
/** Orval uses this to type the `error` field in SWR hooks as AvallonError */
|
|
30
|
+
type ErrorType<E> = AvallonError;
|
|
31
|
+
/** Typed error class for API errors. Thrown by customFetch on non-2xx responses. */
|
|
32
|
+
declare class AvallonError extends Error {
|
|
33
|
+
readonly status: number;
|
|
34
|
+
readonly body: {
|
|
35
|
+
data?: unknown;
|
|
36
|
+
message?: string;
|
|
37
|
+
};
|
|
38
|
+
constructor(status: number, body: {
|
|
39
|
+
data?: unknown;
|
|
40
|
+
message?: string;
|
|
41
|
+
});
|
|
42
|
+
/** Validation errors (400) have field-level details */
|
|
43
|
+
get errors(): Array<{
|
|
44
|
+
field: string;
|
|
45
|
+
message: string;
|
|
46
|
+
}> | undefined;
|
|
47
|
+
isValidationError(): boolean;
|
|
48
|
+
isUnauthorized(): boolean;
|
|
49
|
+
isNotFound(): boolean;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* PKCE Utilities
|
|
54
|
+
*
|
|
55
|
+
* Cryptographic helpers for OAuth PKCE flow. Platform-agnostic -
|
|
56
|
+
* works in both Node.js and browsers via Web Crypto API.
|
|
57
|
+
*
|
|
58
|
+
* These utilities can't be generated from OpenAPI - they're
|
|
59
|
+
* client-side crypto that complements the generated auth endpoints.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* import {
|
|
64
|
+
* generateCodeVerifier,
|
|
65
|
+
* generateCodeChallenge,
|
|
66
|
+
* getV1AuthOauthUrl,
|
|
67
|
+
* postV1AuthOauthExchange,
|
|
68
|
+
* } from "@avallon-labs/sdk";
|
|
69
|
+
*
|
|
70
|
+
* // 1. Generate PKCE pair
|
|
71
|
+
* const verifier = generateCodeVerifier();
|
|
72
|
+
* const challenge = await generateCodeChallenge(verifier);
|
|
73
|
+
*
|
|
74
|
+
* // 2. Get OAuth URL (store verifier for after redirect)
|
|
75
|
+
* sessionStorage.setItem("oauth_verifier", verifier);
|
|
76
|
+
* const { data } = await getV1AuthOauthUrl({
|
|
77
|
+
* provider: "google",
|
|
78
|
+
* redirect_uri: "https://app.example.com/callback",
|
|
79
|
+
* code_challenge: challenge,
|
|
80
|
+
* code_challenge_method: "s256",
|
|
81
|
+
* });
|
|
82
|
+
* window.location.href = data.data.url;
|
|
83
|
+
*
|
|
84
|
+
* // 3. After redirect, exchange code for tokens
|
|
85
|
+
* const verifier = sessionStorage.getItem("oauth_verifier");
|
|
86
|
+
* const tokens = await postV1AuthOauthExchange({
|
|
87
|
+
* code: urlParams.get("code"),
|
|
88
|
+
* code_verifier: verifier,
|
|
89
|
+
* });
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
/** Generate a cryptographically random code verifier (43-128 chars) */
|
|
93
|
+
declare function generateCodeVerifier(length?: number): string;
|
|
94
|
+
/** Generate S256 code challenge from verifier */
|
|
95
|
+
declare function generateCodeChallenge(verifier: string): Promise<string>;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Generated by orval v8.1.0 🍺
|
|
99
|
+
* Do not edit manually.
|
|
100
|
+
* Avallon API
|
|
101
|
+
* OpenAPI spec version: 1.0.0
|
|
102
|
+
*/
|
|
103
|
+
type AgentBackgroundSounds = (typeof AgentBackgroundSounds)[keyof typeof AgentBackgroundSounds];
|
|
104
|
+
declare const AgentBackgroundSounds: {
|
|
105
|
+
readonly enabled: "enabled";
|
|
106
|
+
readonly disabled: "disabled";
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Generated by orval v8.1.0 🍺
|
|
111
|
+
* Do not edit manually.
|
|
112
|
+
* Avallon API
|
|
113
|
+
* OpenAPI spec version: 1.0.0
|
|
114
|
+
*/
|
|
115
|
+
type AgentDirection = (typeof AgentDirection)[keyof typeof AgentDirection];
|
|
116
|
+
declare const AgentDirection: {
|
|
117
|
+
readonly INBOUND: "INBOUND";
|
|
118
|
+
readonly OUTBOUND: "OUTBOUND";
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Generated by orval v8.1.0 🍺
|
|
123
|
+
* Do not edit manually.
|
|
124
|
+
* Avallon API
|
|
125
|
+
* OpenAPI spec version: 1.0.0
|
|
126
|
+
*/
|
|
127
|
+
type AgentLanguage = (typeof AgentLanguage)[keyof typeof AgentLanguage];
|
|
128
|
+
declare const AgentLanguage: {
|
|
129
|
+
readonly "en-US": "en-US";
|
|
130
|
+
readonly "de-DE": "de-DE";
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Generated by orval v8.1.0 🍺
|
|
135
|
+
* Do not edit manually.
|
|
136
|
+
* Avallon API
|
|
137
|
+
* OpenAPI spec version: 1.0.0
|
|
138
|
+
*/
|
|
139
|
+
type AgentLlmModel = (typeof AgentLlmModel)[keyof typeof AgentLlmModel];
|
|
140
|
+
declare const AgentLlmModel: {
|
|
141
|
+
readonly GPT41: "GPT4.1";
|
|
142
|
+
readonly "AZURE-GPT4o": "AZURE-GPT4o";
|
|
143
|
+
readonly "AZURE-GPT41": "AZURE-GPT4.1";
|
|
144
|
+
readonly "GPT-5": "GPT-5";
|
|
145
|
+
readonly "GPT-5-low": "GPT-5-low";
|
|
146
|
+
readonly "GPT-5-high": "GPT-5-high";
|
|
147
|
+
readonly "GPT-51-chat-latest": "GPT-5.1-chat-latest";
|
|
148
|
+
readonly "GPT-51-no-reasoning": "GPT-5.1-no-reasoning";
|
|
149
|
+
readonly "GEMINI-15-flash": "GEMINI-1.5-flash";
|
|
150
|
+
readonly "GEMINI-25-flash": "GEMINI-2.5-flash";
|
|
151
|
+
readonly "GEMINI-25-flash-lite": "GEMINI-2.5-flash-lite";
|
|
152
|
+
readonly "GEMINI-3-flash": "GEMINI-3-flash";
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Generated by orval v8.1.0 🍺
|
|
157
|
+
* Do not edit manually.
|
|
158
|
+
* Avallon API
|
|
159
|
+
* OpenAPI spec version: 1.0.0
|
|
160
|
+
*/
|
|
161
|
+
type AgentSttModel = (typeof AgentSttModel)[keyof typeof AgentSttModel];
|
|
162
|
+
declare const AgentSttModel: {
|
|
163
|
+
readonly "DEEPGRAM-NOVA-2-GENERAL": "DEEPGRAM-NOVA-2-GENERAL";
|
|
164
|
+
readonly "DEEPGRAM-NOVA-3-GENERAL": "DEEPGRAM-NOVA-3-GENERAL";
|
|
165
|
+
readonly "AWS-TRANSCRIBE": "AWS-TRANSCRIBE";
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Generated by orval v8.1.0 🍺
|
|
170
|
+
* Do not edit manually.
|
|
171
|
+
* Avallon API
|
|
172
|
+
* OpenAPI spec version: 1.0.0
|
|
173
|
+
*/
|
|
174
|
+
type AgentTtsModel = (typeof AgentTtsModel)[keyof typeof AgentTtsModel];
|
|
175
|
+
declare const AgentTtsModel: {
|
|
176
|
+
readonly eleven_flash_v2_5: "eleven_flash_v2_5";
|
|
177
|
+
readonly eleven_turbo_v2_5: "eleven_turbo_v2_5";
|
|
178
|
+
readonly "sonic-multilingual": "sonic-multilingual";
|
|
179
|
+
readonly "sonic-3": "sonic-3";
|
|
180
|
+
readonly chirp_3: "chirp_3";
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Generated by orval v8.1.0 🍺
|
|
185
|
+
* Do not edit manually.
|
|
186
|
+
* Avallon API
|
|
187
|
+
* OpenAPI spec version: 1.0.0
|
|
188
|
+
*/
|
|
189
|
+
type AgentTtsProvider = (typeof AgentTtsProvider)[keyof typeof AgentTtsProvider];
|
|
190
|
+
declare const AgentTtsProvider: {
|
|
191
|
+
readonly elevenlabs: "elevenlabs";
|
|
192
|
+
readonly cartesia: "cartesia";
|
|
193
|
+
readonly google: "google";
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Generated by orval v8.1.0 🍺
|
|
198
|
+
* Do not edit manually.
|
|
199
|
+
* Avallon API
|
|
200
|
+
* OpenAPI spec version: 1.0.0
|
|
201
|
+
*/
|
|
202
|
+
|
|
203
|
+
interface Agent {
|
|
204
|
+
id: string;
|
|
205
|
+
tenant_id: string;
|
|
206
|
+
agent_name: string;
|
|
207
|
+
direction: AgentDirection;
|
|
208
|
+
llm_model: AgentLlmModel;
|
|
209
|
+
tts_provider: AgentTtsProvider;
|
|
210
|
+
tts_model: AgentTtsModel;
|
|
211
|
+
language: AgentLanguage;
|
|
212
|
+
tts_voice_id: string;
|
|
213
|
+
stt_model: AgentSttModel;
|
|
214
|
+
transfer_phone_number: string | null;
|
|
215
|
+
background_sounds: AgentBackgroundSounds;
|
|
216
|
+
created_at: string;
|
|
217
|
+
updated_at: string;
|
|
218
|
+
phone_number: string | null;
|
|
219
|
+
dial_pad: boolean;
|
|
220
|
+
end_call: boolean;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Generated by orval v8.1.0 🍺
|
|
225
|
+
* Do not edit manually.
|
|
226
|
+
* Avallon API
|
|
227
|
+
* OpenAPI spec version: 1.0.0
|
|
228
|
+
*/
|
|
229
|
+
|
|
230
|
+
interface AgentList {
|
|
231
|
+
agents: Agent[];
|
|
232
|
+
/**
|
|
233
|
+
* Total number of agents
|
|
234
|
+
* @minimum -9007199254740991
|
|
235
|
+
* @maximum 9007199254740991
|
|
236
|
+
*/
|
|
237
|
+
total: number;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Generated by orval v8.1.0 🍺
|
|
242
|
+
* Do not edit manually.
|
|
243
|
+
* Avallon API
|
|
244
|
+
* OpenAPI spec version: 1.0.0
|
|
245
|
+
*/
|
|
246
|
+
interface ApiKey {
|
|
247
|
+
/** Unique identifier for the API key */
|
|
248
|
+
id: string;
|
|
249
|
+
/** Human-readable name for the API key */
|
|
250
|
+
name: string;
|
|
251
|
+
/** First 12 characters of the key (e.g. ak_live_abc1) */
|
|
252
|
+
key_prefix: string;
|
|
253
|
+
/** Last usage timestamp, if ever used */
|
|
254
|
+
last_used_at?: string;
|
|
255
|
+
/** Expiration date, if set */
|
|
256
|
+
expires_at?: string;
|
|
257
|
+
/** Revocation timestamp, if revoked */
|
|
258
|
+
revoked_at?: string;
|
|
259
|
+
/** Creation timestamp */
|
|
260
|
+
created_at: string;
|
|
261
|
+
/** Last update timestamp */
|
|
262
|
+
updated_at: string;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Generated by orval v8.1.0 🍺
|
|
267
|
+
* Do not edit manually.
|
|
268
|
+
* Avallon API
|
|
269
|
+
* OpenAPI spec version: 1.0.0
|
|
270
|
+
*/
|
|
271
|
+
interface ApiKeyCreated {
|
|
272
|
+
/** Unique identifier for the API key */
|
|
273
|
+
id: string;
|
|
274
|
+
/** Human-readable name for the API key */
|
|
275
|
+
name: string;
|
|
276
|
+
/** First 12 characters of the key (e.g. ak_live_abc1) */
|
|
277
|
+
key_prefix: string;
|
|
278
|
+
/** Expiration date, if set */
|
|
279
|
+
expires_at?: string;
|
|
280
|
+
/** Creation timestamp */
|
|
281
|
+
created_at: string;
|
|
282
|
+
/** The full API key — only returned once at creation */
|
|
283
|
+
api_key: string;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Generated by orval v8.1.0 🍺
|
|
288
|
+
* Do not edit manually.
|
|
289
|
+
* Avallon API
|
|
290
|
+
* OpenAPI spec version: 1.0.0
|
|
291
|
+
*/
|
|
292
|
+
|
|
293
|
+
interface ApiKeyList {
|
|
294
|
+
data: ApiKey[];
|
|
295
|
+
/** Total number of keys returned */
|
|
296
|
+
count: number;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Generated by orval v8.1.0 🍺
|
|
301
|
+
* Do not edit manually.
|
|
302
|
+
* Avallon API
|
|
303
|
+
* OpenAPI spec version: 1.0.0
|
|
304
|
+
*/
|
|
305
|
+
interface AuthTokens {
|
|
306
|
+
access_token: string;
|
|
307
|
+
refresh_token: string;
|
|
308
|
+
expires_at: string;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Generated by orval v8.1.0 🍺
|
|
313
|
+
* Do not edit manually.
|
|
314
|
+
* Avallon API
|
|
315
|
+
* OpenAPI spec version: 1.0.0
|
|
316
|
+
*/
|
|
317
|
+
interface ConfirmationResponse {
|
|
318
|
+
/** Confirmation message */
|
|
319
|
+
message: string;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Generated by orval v8.1.0 🍺
|
|
324
|
+
* Do not edit manually.
|
|
325
|
+
* Avallon API
|
|
326
|
+
* OpenAPI spec version: 1.0.0
|
|
327
|
+
*/
|
|
328
|
+
/**
|
|
329
|
+
* Call direction the agent handles
|
|
330
|
+
*/
|
|
331
|
+
type CreateAgentBodyDirection = (typeof CreateAgentBodyDirection)[keyof typeof CreateAgentBodyDirection];
|
|
332
|
+
declare const CreateAgentBodyDirection: {
|
|
333
|
+
readonly OUTBOUND: "OUTBOUND";
|
|
334
|
+
readonly INBOUND: "INBOUND";
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Generated by orval v8.1.0 🍺
|
|
339
|
+
* Do not edit manually.
|
|
340
|
+
* Avallon API
|
|
341
|
+
* OpenAPI spec version: 1.0.0
|
|
342
|
+
*/
|
|
343
|
+
/**
|
|
344
|
+
* Language for the agent
|
|
345
|
+
*/
|
|
346
|
+
type CreateAgentBodyLanguage = (typeof CreateAgentBodyLanguage)[keyof typeof CreateAgentBodyLanguage];
|
|
347
|
+
declare const CreateAgentBodyLanguage: {
|
|
348
|
+
readonly "en-US": "en-US";
|
|
349
|
+
readonly "de-DE": "de-DE";
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Generated by orval v8.1.0 🍺
|
|
354
|
+
* Do not edit manually.
|
|
355
|
+
* Avallon API
|
|
356
|
+
* OpenAPI spec version: 1.0.0
|
|
357
|
+
*/
|
|
358
|
+
/**
|
|
359
|
+
* LLM model for conversation
|
|
360
|
+
*/
|
|
361
|
+
type CreateAgentBodyLlmModel = (typeof CreateAgentBodyLlmModel)[keyof typeof CreateAgentBodyLlmModel];
|
|
362
|
+
declare const CreateAgentBodyLlmModel: {
|
|
363
|
+
readonly GPT41: "GPT4.1";
|
|
364
|
+
readonly "AZURE-GPT4o": "AZURE-GPT4o";
|
|
365
|
+
readonly "AZURE-GPT41": "AZURE-GPT4.1";
|
|
366
|
+
readonly "GPT-5": "GPT-5";
|
|
367
|
+
readonly "GPT-5-low": "GPT-5-low";
|
|
368
|
+
readonly "GPT-5-high": "GPT-5-high";
|
|
369
|
+
readonly "GPT-51-chat-latest": "GPT-5.1-chat-latest";
|
|
370
|
+
readonly "GPT-51-no-reasoning": "GPT-5.1-no-reasoning";
|
|
371
|
+
readonly "GEMINI-15-flash": "GEMINI-1.5-flash";
|
|
372
|
+
readonly "GEMINI-25-flash": "GEMINI-2.5-flash";
|
|
373
|
+
readonly "GEMINI-25-flash-lite": "GEMINI-2.5-flash-lite";
|
|
374
|
+
readonly "GEMINI-3-flash": "GEMINI-3-flash";
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Generated by orval v8.1.0 🍺
|
|
379
|
+
* Do not edit manually.
|
|
380
|
+
* Avallon API
|
|
381
|
+
* OpenAPI spec version: 1.0.0
|
|
382
|
+
*/
|
|
383
|
+
/**
|
|
384
|
+
* Speech-to-text model
|
|
385
|
+
*/
|
|
386
|
+
type CreateAgentBodySttModel = (typeof CreateAgentBodySttModel)[keyof typeof CreateAgentBodySttModel];
|
|
387
|
+
declare const CreateAgentBodySttModel: {
|
|
388
|
+
readonly "DEEPGRAM-NOVA-2-GENERAL": "DEEPGRAM-NOVA-2-GENERAL";
|
|
389
|
+
readonly "DEEPGRAM-NOVA-3-GENERAL": "DEEPGRAM-NOVA-3-GENERAL";
|
|
390
|
+
readonly "AWS-TRANSCRIBE": "AWS-TRANSCRIBE";
|
|
391
|
+
};
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Generated by orval v8.1.0 🍺
|
|
395
|
+
* Do not edit manually.
|
|
396
|
+
* Avallon API
|
|
397
|
+
* OpenAPI spec version: 1.0.0
|
|
398
|
+
*/
|
|
399
|
+
/**
|
|
400
|
+
* Text-to-speech model
|
|
401
|
+
*/
|
|
402
|
+
type CreateAgentBodyTtsModel = (typeof CreateAgentBodyTtsModel)[keyof typeof CreateAgentBodyTtsModel];
|
|
403
|
+
declare const CreateAgentBodyTtsModel: {
|
|
404
|
+
readonly eleven_flash_v2_5: "eleven_flash_v2_5";
|
|
405
|
+
readonly eleven_turbo_v2_5: "eleven_turbo_v2_5";
|
|
406
|
+
readonly "sonic-multilingual": "sonic-multilingual";
|
|
407
|
+
readonly "sonic-3": "sonic-3";
|
|
408
|
+
readonly chirp_3: "chirp_3";
|
|
409
|
+
};
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Generated by orval v8.1.0 🍺
|
|
413
|
+
* Do not edit manually.
|
|
414
|
+
* Avallon API
|
|
415
|
+
* OpenAPI spec version: 1.0.0
|
|
416
|
+
*/
|
|
417
|
+
/**
|
|
418
|
+
* Text-to-speech provider
|
|
419
|
+
*/
|
|
420
|
+
type CreateAgentBodyTtsProvider = (typeof CreateAgentBodyTtsProvider)[keyof typeof CreateAgentBodyTtsProvider];
|
|
421
|
+
declare const CreateAgentBodyTtsProvider: {
|
|
422
|
+
readonly elevenlabs: "elevenlabs";
|
|
423
|
+
readonly cartesia: "cartesia";
|
|
424
|
+
readonly google: "google";
|
|
425
|
+
};
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Generated by orval v8.1.0 🍺
|
|
429
|
+
* Do not edit manually.
|
|
430
|
+
* Avallon API
|
|
431
|
+
* OpenAPI spec version: 1.0.0
|
|
432
|
+
*/
|
|
433
|
+
|
|
434
|
+
type CreateAgentBody = {
|
|
435
|
+
/**
|
|
436
|
+
* Name for the agent
|
|
437
|
+
* @minLength 1
|
|
438
|
+
*/
|
|
439
|
+
agent_name: string;
|
|
440
|
+
/** Call direction the agent handles */
|
|
441
|
+
direction: CreateAgentBodyDirection;
|
|
442
|
+
/** LLM model for conversation */
|
|
443
|
+
llm_model: CreateAgentBodyLlmModel;
|
|
444
|
+
/** Text-to-speech provider */
|
|
445
|
+
tts_provider: CreateAgentBodyTtsProvider;
|
|
446
|
+
/** Text-to-speech model */
|
|
447
|
+
tts_model: CreateAgentBodyTtsModel;
|
|
448
|
+
/** Voice ID from the TTS provider */
|
|
449
|
+
tts_voice_id: "Achernar" | "Achird" | "v3V1d2rk6528UrLKRuy8" | "5c42302c-194b-4d0c-ba1a-8cb485c84ab9" | "e8e5fffb-252c-436d-b842-8879b84445b6" | "f786b574-daa5-4673-aa0c-cbe3e8534c02" | "8d8ce8c9-44a4-46c4-b10f-9a927b99a853" | "5ee9feff-1265-424a-9d7f-8e4d431a12c7" | "b9de4a89-2257-424b-94c2-db18ba68c81a";
|
|
450
|
+
/** Speech-to-text model */
|
|
451
|
+
stt_model: CreateAgentBodySttModel;
|
|
452
|
+
/** Phone number to transfer calls to */
|
|
453
|
+
transfer_phone_number: string | null;
|
|
454
|
+
/** ID of phone number to assign to agent */
|
|
455
|
+
phone_number_id?: string;
|
|
456
|
+
/** Language for the agent */
|
|
457
|
+
language: CreateAgentBodyLanguage;
|
|
458
|
+
/** Whether the agent supports DTMF dial pad input */
|
|
459
|
+
dial_pad?: boolean;
|
|
460
|
+
/** Whether the agent can end the call */
|
|
461
|
+
end_call?: boolean;
|
|
462
|
+
};
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Generated by orval v8.1.0 🍺
|
|
466
|
+
* Do not edit manually.
|
|
467
|
+
* Avallon API
|
|
468
|
+
* OpenAPI spec version: 1.0.0
|
|
469
|
+
*/
|
|
470
|
+
|
|
471
|
+
interface CreateAgentResponse {
|
|
472
|
+
agent: Agent;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Generated by orval v8.1.0 🍺
|
|
477
|
+
* Do not edit manually.
|
|
478
|
+
* Avallon API
|
|
479
|
+
* OpenAPI spec version: 1.0.0
|
|
480
|
+
*/
|
|
481
|
+
/**
|
|
482
|
+
* Target environment for the key
|
|
483
|
+
*/
|
|
484
|
+
type CreateApiKeyBodyEnvironment = (typeof CreateApiKeyBodyEnvironment)[keyof typeof CreateApiKeyBodyEnvironment];
|
|
485
|
+
declare const CreateApiKeyBodyEnvironment: {
|
|
486
|
+
readonly test: "test";
|
|
487
|
+
readonly live: "live";
|
|
488
|
+
};
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* Generated by orval v8.1.0 🍺
|
|
492
|
+
* Do not edit manually.
|
|
493
|
+
* Avallon API
|
|
494
|
+
* OpenAPI spec version: 1.0.0
|
|
495
|
+
*/
|
|
496
|
+
|
|
497
|
+
type CreateApiKeyBody = {
|
|
498
|
+
/**
|
|
499
|
+
* Human-readable name for the API key
|
|
500
|
+
* @minLength 1
|
|
501
|
+
* @maxLength 100
|
|
502
|
+
*/
|
|
503
|
+
name: string;
|
|
504
|
+
/** Optional expiration date (ISO 8601) */
|
|
505
|
+
expires_at?: string;
|
|
506
|
+
/** Target environment for the key */
|
|
507
|
+
environment?: CreateApiKeyBodyEnvironment;
|
|
508
|
+
};
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* Generated by orval v8.1.0 🍺
|
|
512
|
+
* Do not edit manually.
|
|
513
|
+
* Avallon API
|
|
514
|
+
* OpenAPI spec version: 1.0.0
|
|
515
|
+
*/
|
|
516
|
+
interface EmptyResponse {
|
|
517
|
+
[key: string]: unknown;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* Generated by orval v8.1.0 🍺
|
|
522
|
+
* Do not edit manually.
|
|
523
|
+
* Avallon API
|
|
524
|
+
* OpenAPI spec version: 1.0.0
|
|
525
|
+
*/
|
|
526
|
+
type ErrorResponseData = {
|
|
527
|
+
[key: string]: unknown;
|
|
528
|
+
};
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Generated by orval v8.1.0 🍺
|
|
532
|
+
* Do not edit manually.
|
|
533
|
+
* Avallon API
|
|
534
|
+
* OpenAPI spec version: 1.0.0
|
|
535
|
+
*/
|
|
536
|
+
|
|
537
|
+
interface ErrorResponse {
|
|
538
|
+
data: ErrorResponseData;
|
|
539
|
+
/** Human-readable error message */
|
|
540
|
+
message: string;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* Generated by orval v8.1.0 🍺
|
|
545
|
+
* Do not edit manually.
|
|
546
|
+
* Avallon API
|
|
547
|
+
* OpenAPI spec version: 1.0.0
|
|
548
|
+
*/
|
|
549
|
+
|
|
550
|
+
interface GetAgentResponse {
|
|
551
|
+
agent: Agent;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Generated by orval v8.1.0 🍺
|
|
556
|
+
* Do not edit manually.
|
|
557
|
+
* Avallon API
|
|
558
|
+
* OpenAPI spec version: 1.0.0
|
|
559
|
+
*/
|
|
560
|
+
type GetV1AuthOauthUrlCodeChallengeMethod = (typeof GetV1AuthOauthUrlCodeChallengeMethod)[keyof typeof GetV1AuthOauthUrlCodeChallengeMethod];
|
|
561
|
+
declare const GetV1AuthOauthUrlCodeChallengeMethod: {
|
|
562
|
+
readonly plain: "plain";
|
|
563
|
+
readonly s256: "s256";
|
|
564
|
+
};
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Generated by orval v8.1.0 🍺
|
|
568
|
+
* Do not edit manually.
|
|
569
|
+
* Avallon API
|
|
570
|
+
* OpenAPI spec version: 1.0.0
|
|
571
|
+
*/
|
|
572
|
+
type GetV1AuthOauthUrlProvider = (typeof GetV1AuthOauthUrlProvider)[keyof typeof GetV1AuthOauthUrlProvider];
|
|
573
|
+
declare const GetV1AuthOauthUrlProvider: {
|
|
574
|
+
readonly google: "google";
|
|
575
|
+
readonly microsoft: "microsoft";
|
|
576
|
+
};
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* Generated by orval v8.1.0 🍺
|
|
580
|
+
* Do not edit manually.
|
|
581
|
+
* Avallon API
|
|
582
|
+
* OpenAPI spec version: 1.0.0
|
|
583
|
+
*/
|
|
584
|
+
|
|
585
|
+
type GetV1AuthOauthUrlParams = {
|
|
586
|
+
provider: GetV1AuthOauthUrlProvider;
|
|
587
|
+
redirect_uri: string;
|
|
588
|
+
code_challenge_method: GetV1AuthOauthUrlCodeChallengeMethod;
|
|
589
|
+
/**
|
|
590
|
+
* @minLength 1
|
|
591
|
+
*/
|
|
592
|
+
code_challenge: string;
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* Generated by orval v8.1.0 🍺
|
|
597
|
+
* Do not edit manually.
|
|
598
|
+
* Avallon API
|
|
599
|
+
* OpenAPI spec version: 1.0.0
|
|
600
|
+
*/
|
|
601
|
+
type ListAgentsParams = {
|
|
602
|
+
/**
|
|
603
|
+
* Filter by exact agent name
|
|
604
|
+
*/
|
|
605
|
+
agent_name?: string;
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* Generated by orval v8.1.0 🍺
|
|
610
|
+
* Do not edit manually.
|
|
611
|
+
* Avallon API
|
|
612
|
+
* OpenAPI spec version: 1.0.0
|
|
613
|
+
*/
|
|
614
|
+
type ListApiKeysIncludeRevoked = (typeof ListApiKeysIncludeRevoked)[keyof typeof ListApiKeysIncludeRevoked];
|
|
615
|
+
declare const ListApiKeysIncludeRevoked: {
|
|
616
|
+
readonly true: "true";
|
|
617
|
+
readonly false: "false";
|
|
618
|
+
};
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* Generated by orval v8.1.0 🍺
|
|
622
|
+
* Do not edit manually.
|
|
623
|
+
* Avallon API
|
|
624
|
+
* OpenAPI spec version: 1.0.0
|
|
625
|
+
*/
|
|
626
|
+
|
|
627
|
+
type ListApiKeysParams = {
|
|
628
|
+
/**
|
|
629
|
+
* Include revoked keys in the response
|
|
630
|
+
*/
|
|
631
|
+
include_revoked?: ListApiKeysIncludeRevoked;
|
|
632
|
+
};
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* Generated by orval v8.1.0 🍺
|
|
636
|
+
* Do not edit manually.
|
|
637
|
+
* Avallon API
|
|
638
|
+
* OpenAPI spec version: 1.0.0
|
|
639
|
+
*/
|
|
640
|
+
interface OAuthUrl {
|
|
641
|
+
url: string;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* Generated by orval v8.1.0 🍺
|
|
646
|
+
* Do not edit manually.
|
|
647
|
+
* Avallon API
|
|
648
|
+
* OpenAPI spec version: 1.0.0
|
|
649
|
+
*/
|
|
650
|
+
type PostV1AuthRefreshTokenBody = {
|
|
651
|
+
access_token: string;
|
|
652
|
+
refresh_token: string;
|
|
653
|
+
};
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* Generated by orval v8.1.0 🍺
|
|
657
|
+
* Do not edit manually.
|
|
658
|
+
* Avallon API
|
|
659
|
+
* OpenAPI spec version: 1.0.0
|
|
660
|
+
*/
|
|
661
|
+
type PostV1AuthSignInBody = {
|
|
662
|
+
type: "password";
|
|
663
|
+
email: string;
|
|
664
|
+
password: string;
|
|
665
|
+
} | {
|
|
666
|
+
type: "oauth";
|
|
667
|
+
code: string;
|
|
668
|
+
verifier: string;
|
|
669
|
+
} | {
|
|
670
|
+
type: "email_otp";
|
|
671
|
+
/** @pattern ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$ */
|
|
672
|
+
email: string;
|
|
673
|
+
/** @minLength 1 */
|
|
674
|
+
token: string;
|
|
675
|
+
};
|
|
676
|
+
|
|
677
|
+
/**
|
|
678
|
+
* Generated by orval v8.1.0 🍺
|
|
679
|
+
* Do not edit manually.
|
|
680
|
+
* Avallon API
|
|
681
|
+
* OpenAPI spec version: 1.0.0
|
|
682
|
+
*/
|
|
683
|
+
type PostV1AuthSignUpBody = {
|
|
684
|
+
/** @pattern ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$ */
|
|
685
|
+
email: string;
|
|
686
|
+
password: string;
|
|
687
|
+
};
|
|
688
|
+
|
|
689
|
+
type SecondParameter$2<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
690
|
+
/**
|
|
691
|
+
* List all agents for your tenant.
|
|
692
|
+
|
|
693
|
+
**Filtering:**
|
|
694
|
+
|
|
695
|
+
Filter agents by name using the `agent_name` query parameter (exact match).
|
|
696
|
+
|
|
697
|
+
**Response:**
|
|
698
|
+
|
|
699
|
+
Returns an array of all agents with their configurations and a total count.
|
|
700
|
+
* @summary List agents
|
|
701
|
+
*/
|
|
702
|
+
declare const getListAgentsUrl: (params?: ListAgentsParams) => string;
|
|
703
|
+
declare const listAgents: (params?: ListAgentsParams, options?: RequestInit) => Promise<AgentList>;
|
|
704
|
+
declare const getListAgentsKey: (params?: ListAgentsParams) => readonly ["/v1/agents", ...ListAgentsParams[]];
|
|
705
|
+
type ListAgentsQueryResult = NonNullable<Awaited<ReturnType<typeof listAgents>>>;
|
|
706
|
+
/**
|
|
707
|
+
* @summary List agents
|
|
708
|
+
*/
|
|
709
|
+
declare const useListAgents: <TError = ErrorType<ErrorResponse>>(params?: ListAgentsParams, options?: {
|
|
710
|
+
swr?: SWRConfiguration<Awaited<ReturnType<typeof listAgents>>, TError> & {
|
|
711
|
+
swrKey?: Key;
|
|
712
|
+
enabled?: boolean;
|
|
713
|
+
};
|
|
714
|
+
request?: SecondParameter$2<typeof customFetch>;
|
|
715
|
+
}) => {
|
|
716
|
+
data: AgentList | undefined;
|
|
717
|
+
error: TError | undefined;
|
|
718
|
+
mutate: swr.KeyedMutator<AgentList>;
|
|
719
|
+
isValidating: boolean;
|
|
720
|
+
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
721
|
+
swrKey: string | false | readonly [any, ...unknown[]] | Record<any, any> | (() => swr.Arguments);
|
|
722
|
+
};
|
|
723
|
+
/**
|
|
724
|
+
* Create a new voice agent with the specified configuration.
|
|
725
|
+
|
|
726
|
+
**Required fields:**
|
|
727
|
+
|
|
728
|
+
All fields in the request body are required except `phone_number_id` and `transfer_phone_number`.
|
|
729
|
+
|
|
730
|
+
**Response:**
|
|
731
|
+
|
|
732
|
+
Returns the created agent with its ID and configuration.
|
|
733
|
+
* @summary Create agent
|
|
734
|
+
*/
|
|
735
|
+
declare const getCreateAgentUrl: () => string;
|
|
736
|
+
declare const createAgent: (createAgentBody: CreateAgentBody, options?: RequestInit) => Promise<CreateAgentResponse>;
|
|
737
|
+
declare const getCreateAgentMutationFetcher: (options?: SecondParameter$2<typeof customFetch>) => (_: Key, { arg }: {
|
|
738
|
+
arg: CreateAgentBody;
|
|
739
|
+
}) => Promise<CreateAgentResponse>;
|
|
740
|
+
declare const getCreateAgentMutationKey: () => readonly ["/v1/agents"];
|
|
741
|
+
type CreateAgentMutationResult = NonNullable<Awaited<ReturnType<typeof createAgent>>>;
|
|
742
|
+
/**
|
|
743
|
+
* @summary Create agent
|
|
744
|
+
*/
|
|
745
|
+
declare const useCreateAgent: <TError = ErrorType<ErrorResponse>>(options?: {
|
|
746
|
+
swr?: SWRMutationConfiguration<Awaited<ReturnType<typeof createAgent>>, TError, Key, CreateAgentBody, Awaited<ReturnType<typeof createAgent>>> & {
|
|
747
|
+
swrKey?: string;
|
|
748
|
+
};
|
|
749
|
+
request?: SecondParameter$2<typeof customFetch>;
|
|
750
|
+
}) => {
|
|
751
|
+
isMutating: boolean;
|
|
752
|
+
trigger: swr_mutation.TriggerWithArgs<CreateAgentResponse, TError, string | readonly ["/v1/agents"], CreateAgentBody>;
|
|
753
|
+
reset: () => void;
|
|
754
|
+
data: CreateAgentResponse | undefined;
|
|
755
|
+
error: TError | undefined;
|
|
756
|
+
swrKey: string | readonly ["/v1/agents"];
|
|
757
|
+
};
|
|
758
|
+
/**
|
|
759
|
+
* Retrieve a single agent by ID.
|
|
760
|
+
* @summary Get agent
|
|
761
|
+
*/
|
|
762
|
+
declare const getGetAgentUrl: (id: string) => string;
|
|
763
|
+
declare const getAgent: (id: string, options?: RequestInit) => Promise<GetAgentResponse>;
|
|
764
|
+
declare const getGetAgentKey: (id: string) => readonly [`/v1/agents/${string}`];
|
|
765
|
+
type GetAgentQueryResult = NonNullable<Awaited<ReturnType<typeof getAgent>>>;
|
|
766
|
+
/**
|
|
767
|
+
* @summary Get agent
|
|
768
|
+
*/
|
|
769
|
+
declare const useGetAgent: <TError = ErrorType<ErrorResponse>>(id: string, options?: {
|
|
770
|
+
swr?: SWRConfiguration<Awaited<ReturnType<typeof getAgent>>, TError> & {
|
|
771
|
+
swrKey?: Key;
|
|
772
|
+
enabled?: boolean;
|
|
773
|
+
};
|
|
774
|
+
request?: SecondParameter$2<typeof customFetch>;
|
|
775
|
+
}) => {
|
|
776
|
+
data: GetAgentResponse | undefined;
|
|
777
|
+
error: TError | undefined;
|
|
778
|
+
mutate: swr.KeyedMutator<GetAgentResponse>;
|
|
779
|
+
isValidating: boolean;
|
|
780
|
+
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
781
|
+
swrKey: string | false | readonly [any, ...unknown[]] | Record<any, any> | (() => swr.Arguments);
|
|
782
|
+
};
|
|
783
|
+
|
|
784
|
+
type SecondParameter$1<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
785
|
+
/**
|
|
786
|
+
* List all API keys for your tenant.
|
|
787
|
+
|
|
788
|
+
By default, revoked keys are excluded. Set `include_revoked=true` to include them.
|
|
789
|
+
|
|
790
|
+
**Note:** The full API key value is never returned — only the key prefix is shown.
|
|
791
|
+
* @summary List API keys
|
|
792
|
+
*/
|
|
793
|
+
declare const getListApiKeysUrl: (params?: ListApiKeysParams) => string;
|
|
794
|
+
declare const listApiKeys: (params?: ListApiKeysParams, options?: RequestInit) => Promise<ApiKeyList>;
|
|
795
|
+
declare const getListApiKeysKey: (params?: ListApiKeysParams) => readonly ["/platform/api-keys", ...ListApiKeysParams[]];
|
|
796
|
+
type ListApiKeysQueryResult = NonNullable<Awaited<ReturnType<typeof listApiKeys>>>;
|
|
797
|
+
/**
|
|
798
|
+
* @summary List API keys
|
|
799
|
+
*/
|
|
800
|
+
declare const useListApiKeys: <TError = ErrorType<ErrorResponse>>(params?: ListApiKeysParams, options?: {
|
|
801
|
+
swr?: SWRConfiguration<Awaited<ReturnType<typeof listApiKeys>>, TError> & {
|
|
802
|
+
swrKey?: Key;
|
|
803
|
+
enabled?: boolean;
|
|
804
|
+
};
|
|
805
|
+
request?: SecondParameter$1<typeof customFetch>;
|
|
806
|
+
}) => {
|
|
807
|
+
data: ApiKeyList | undefined;
|
|
808
|
+
error: TError | undefined;
|
|
809
|
+
mutate: swr.KeyedMutator<ApiKeyList>;
|
|
810
|
+
isValidating: boolean;
|
|
811
|
+
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
812
|
+
swrKey: string | false | readonly [any, ...unknown[]] | Record<any, any> | (() => Arguments);
|
|
813
|
+
};
|
|
814
|
+
/**
|
|
815
|
+
* Create a new API key for authenticating with the Avallon API.
|
|
816
|
+
|
|
817
|
+
**Important:** The full API key is only returned once in the response. Store it securely — it cannot be retrieved again.
|
|
818
|
+
|
|
819
|
+
Keys are scoped to an environment (`test` or `live`) and optionally accept an expiration date.
|
|
820
|
+
* @summary Create an API key
|
|
821
|
+
*/
|
|
822
|
+
declare const getCreateApiKeyUrl: () => string;
|
|
823
|
+
declare const createApiKey: (createApiKeyBody: CreateApiKeyBody, options?: RequestInit) => Promise<ApiKeyCreated>;
|
|
824
|
+
declare const getCreateApiKeyMutationFetcher: (options?: SecondParameter$1<typeof customFetch>) => (_: Key, { arg }: {
|
|
825
|
+
arg: CreateApiKeyBody;
|
|
826
|
+
}) => Promise<ApiKeyCreated>;
|
|
827
|
+
declare const getCreateApiKeyMutationKey: () => readonly ["/platform/api-keys"];
|
|
828
|
+
type CreateApiKeyMutationResult = NonNullable<Awaited<ReturnType<typeof createApiKey>>>;
|
|
829
|
+
/**
|
|
830
|
+
* @summary Create an API key
|
|
831
|
+
*/
|
|
832
|
+
declare const useCreateApiKey: <TError = ErrorType<ErrorResponse>>(options?: {
|
|
833
|
+
swr?: SWRMutationConfiguration<Awaited<ReturnType<typeof createApiKey>>, TError, Key, CreateApiKeyBody, Awaited<ReturnType<typeof createApiKey>>> & {
|
|
834
|
+
swrKey?: string;
|
|
835
|
+
};
|
|
836
|
+
request?: SecondParameter$1<typeof customFetch>;
|
|
837
|
+
}) => {
|
|
838
|
+
isMutating: boolean;
|
|
839
|
+
trigger: swr_mutation.TriggerWithArgs<ApiKeyCreated, TError, string | readonly ["/platform/api-keys"], CreateApiKeyBody>;
|
|
840
|
+
reset: () => void;
|
|
841
|
+
data: ApiKeyCreated | undefined;
|
|
842
|
+
error: TError | undefined;
|
|
843
|
+
swrKey: string | readonly ["/platform/api-keys"];
|
|
844
|
+
};
|
|
845
|
+
/**
|
|
846
|
+
* Revoke an existing API key. Once revoked, the key can no longer be used for authentication.
|
|
847
|
+
|
|
848
|
+
This operation is irreversible — revoked keys cannot be re-enabled. Create a new key if needed.
|
|
849
|
+
|
|
850
|
+
Returns 409 if the key is already revoked, 404 if the key does not exist.
|
|
851
|
+
* @summary Revoke an API key
|
|
852
|
+
*/
|
|
853
|
+
declare const getRevokeApiKeyUrl: (id: string) => string;
|
|
854
|
+
declare const revokeApiKey: (id: string, options?: RequestInit) => Promise<ConfirmationResponse>;
|
|
855
|
+
declare const getRevokeApiKeyMutationFetcher: (id: string, options?: SecondParameter$1<typeof customFetch>) => (_: Key, __: {
|
|
856
|
+
arg: Arguments;
|
|
857
|
+
}) => Promise<ConfirmationResponse>;
|
|
858
|
+
declare const getRevokeApiKeyMutationKey: (id: string) => readonly [`/platform/api-keys/${string}/revoke`];
|
|
859
|
+
type RevokeApiKeyMutationResult = NonNullable<Awaited<ReturnType<typeof revokeApiKey>>>;
|
|
860
|
+
/**
|
|
861
|
+
* @summary Revoke an API key
|
|
862
|
+
*/
|
|
863
|
+
declare const useRevokeApiKey: <TError = ErrorType<ErrorResponse>>(id: string, options?: {
|
|
864
|
+
swr?: SWRMutationConfiguration<Awaited<ReturnType<typeof revokeApiKey>>, TError, Key, Arguments, Awaited<ReturnType<typeof revokeApiKey>>> & {
|
|
865
|
+
swrKey?: string;
|
|
866
|
+
};
|
|
867
|
+
request?: SecondParameter$1<typeof customFetch>;
|
|
868
|
+
}) => {
|
|
869
|
+
isMutating: boolean;
|
|
870
|
+
trigger: swr_mutation.TriggerWithOptionsArgs<ConfirmationResponse, TError, string | readonly [`/platform/api-keys/${string}/revoke`], Arguments>;
|
|
871
|
+
reset: () => void;
|
|
872
|
+
data: ConfirmationResponse | undefined;
|
|
873
|
+
error: TError | undefined;
|
|
874
|
+
swrKey: string | readonly [`/platform/api-keys/${string}/revoke`];
|
|
875
|
+
};
|
|
876
|
+
|
|
877
|
+
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
878
|
+
declare const getPostV1AuthSignUpUrl: () => string;
|
|
879
|
+
declare const postV1AuthSignUp: (postV1AuthSignUpBody: PostV1AuthSignUpBody, options?: RequestInit) => Promise<EmptyResponse>;
|
|
880
|
+
declare const getPostV1AuthSignUpMutationFetcher: (options?: SecondParameter<typeof customFetchNoAuth>) => (_: Key, { arg }: {
|
|
881
|
+
arg: PostV1AuthSignUpBody;
|
|
882
|
+
}) => Promise<EmptyResponse>;
|
|
883
|
+
declare const getPostV1AuthSignUpMutationKey: () => readonly ["/v1/auth/sign-up"];
|
|
884
|
+
type PostV1AuthSignUpMutationResult = NonNullable<Awaited<ReturnType<typeof postV1AuthSignUp>>>;
|
|
885
|
+
declare const usePostV1AuthSignUp: <TError = ErrorType<ErrorResponse>>(options?: {
|
|
886
|
+
swr?: SWRMutationConfiguration<Awaited<ReturnType<typeof postV1AuthSignUp>>, TError, Key, PostV1AuthSignUpBody, Awaited<ReturnType<typeof postV1AuthSignUp>>> & {
|
|
887
|
+
swrKey?: string;
|
|
888
|
+
};
|
|
889
|
+
request?: SecondParameter<typeof customFetchNoAuth>;
|
|
890
|
+
}) => {
|
|
891
|
+
isMutating: boolean;
|
|
892
|
+
trigger: swr_mutation.TriggerWithArgs<EmptyResponse, TError, string | readonly ["/v1/auth/sign-up"], PostV1AuthSignUpBody>;
|
|
893
|
+
reset: () => void;
|
|
894
|
+
data: EmptyResponse | undefined;
|
|
895
|
+
error: TError | undefined;
|
|
896
|
+
swrKey: string | readonly ["/v1/auth/sign-up"];
|
|
897
|
+
};
|
|
898
|
+
declare const getPostV1AuthSignInUrl: () => string;
|
|
899
|
+
declare const postV1AuthSignIn: (postV1AuthSignInBody: PostV1AuthSignInBody, options?: RequestInit) => Promise<AuthTokens>;
|
|
900
|
+
declare const getPostV1AuthSignInMutationFetcher: (options?: SecondParameter<typeof customFetchNoAuth>) => (_: Key, { arg }: {
|
|
901
|
+
arg: PostV1AuthSignInBody;
|
|
902
|
+
}) => Promise<AuthTokens>;
|
|
903
|
+
declare const getPostV1AuthSignInMutationKey: () => readonly ["/v1/auth/sign-in"];
|
|
904
|
+
type PostV1AuthSignInMutationResult = NonNullable<Awaited<ReturnType<typeof postV1AuthSignIn>>>;
|
|
905
|
+
declare const usePostV1AuthSignIn: <TError = ErrorType<ErrorResponse>>(options?: {
|
|
906
|
+
swr?: SWRMutationConfiguration<Awaited<ReturnType<typeof postV1AuthSignIn>>, TError, Key, PostV1AuthSignInBody, Awaited<ReturnType<typeof postV1AuthSignIn>>> & {
|
|
907
|
+
swrKey?: string;
|
|
908
|
+
};
|
|
909
|
+
request?: SecondParameter<typeof customFetchNoAuth>;
|
|
910
|
+
}) => {
|
|
911
|
+
isMutating: boolean;
|
|
912
|
+
trigger: swr_mutation.TriggerWithArgs<AuthTokens, TError, string | readonly ["/v1/auth/sign-in"], PostV1AuthSignInBody>;
|
|
913
|
+
reset: () => void;
|
|
914
|
+
data: AuthTokens | undefined;
|
|
915
|
+
error: TError | undefined;
|
|
916
|
+
swrKey: string | readonly ["/v1/auth/sign-in"];
|
|
917
|
+
};
|
|
918
|
+
declare const getPostV1AuthRefreshTokenUrl: () => string;
|
|
919
|
+
declare const postV1AuthRefreshToken: (postV1AuthRefreshTokenBody: PostV1AuthRefreshTokenBody, options?: RequestInit) => Promise<AuthTokens>;
|
|
920
|
+
declare const getPostV1AuthRefreshTokenMutationFetcher: (options?: SecondParameter<typeof customFetchNoAuth>) => (_: Key, { arg }: {
|
|
921
|
+
arg: PostV1AuthRefreshTokenBody;
|
|
922
|
+
}) => Promise<AuthTokens>;
|
|
923
|
+
declare const getPostV1AuthRefreshTokenMutationKey: () => readonly ["/v1/auth/refresh-token"];
|
|
924
|
+
type PostV1AuthRefreshTokenMutationResult = NonNullable<Awaited<ReturnType<typeof postV1AuthRefreshToken>>>;
|
|
925
|
+
declare const usePostV1AuthRefreshToken: <TError = ErrorType<ErrorResponse>>(options?: {
|
|
926
|
+
swr?: SWRMutationConfiguration<Awaited<ReturnType<typeof postV1AuthRefreshToken>>, TError, Key, PostV1AuthRefreshTokenBody, Awaited<ReturnType<typeof postV1AuthRefreshToken>>> & {
|
|
927
|
+
swrKey?: string;
|
|
928
|
+
};
|
|
929
|
+
request?: SecondParameter<typeof customFetchNoAuth>;
|
|
930
|
+
}) => {
|
|
931
|
+
isMutating: boolean;
|
|
932
|
+
trigger: swr_mutation.TriggerWithArgs<AuthTokens, TError, string | readonly ["/v1/auth/refresh-token"], PostV1AuthRefreshTokenBody>;
|
|
933
|
+
reset: () => void;
|
|
934
|
+
data: AuthTokens | undefined;
|
|
935
|
+
error: TError | undefined;
|
|
936
|
+
swrKey: string | readonly ["/v1/auth/refresh-token"];
|
|
937
|
+
};
|
|
938
|
+
declare const getGetV1AuthOauthUrlUrl: (params: GetV1AuthOauthUrlParams) => string;
|
|
939
|
+
declare const getV1AuthOauthUrl: (params: GetV1AuthOauthUrlParams, options?: RequestInit) => Promise<OAuthUrl>;
|
|
940
|
+
declare const getGetV1AuthOauthUrlKey: (params: GetV1AuthOauthUrlParams) => readonly ["/v1/auth/oauth-url", ...GetV1AuthOauthUrlParams[]];
|
|
941
|
+
type GetV1AuthOauthUrlQueryResult = NonNullable<Awaited<ReturnType<typeof getV1AuthOauthUrl>>>;
|
|
942
|
+
declare const useGetV1AuthOauthUrl: <TError = ErrorType<ErrorResponse>>(params: GetV1AuthOauthUrlParams, options?: {
|
|
943
|
+
swr?: SWRConfiguration<Awaited<ReturnType<typeof getV1AuthOauthUrl>>, TError> & {
|
|
944
|
+
swrKey?: Key;
|
|
945
|
+
enabled?: boolean;
|
|
946
|
+
};
|
|
947
|
+
request?: SecondParameter<typeof customFetchNoAuth>;
|
|
948
|
+
}) => {
|
|
949
|
+
data: OAuthUrl | undefined;
|
|
950
|
+
error: TError | undefined;
|
|
951
|
+
mutate: swr.KeyedMutator<OAuthUrl>;
|
|
952
|
+
isValidating: boolean;
|
|
953
|
+
isLoading: swr__internal.IsLoadingResponse<Data, Config>;
|
|
954
|
+
swrKey: string | false | readonly [any, ...unknown[]] | Record<any, any> | (() => swr.Arguments);
|
|
955
|
+
};
|
|
956
|
+
|
|
957
|
+
export { type Agent, AgentBackgroundSounds, AgentDirection, AgentLanguage, type AgentList, AgentLlmModel, AgentSttModel, AgentTtsModel, AgentTtsProvider, type ApiKey, type ApiKeyCreated, type ApiKeyList, type AuthTokens, type AvallonConfig, AvallonError, type ConfirmationResponse, type CreateAgentBody, CreateAgentBodyDirection, CreateAgentBodyLanguage, CreateAgentBodyLlmModel, CreateAgentBodySttModel, CreateAgentBodyTtsModel, CreateAgentBodyTtsProvider, type CreateAgentMutationResult, type CreateAgentResponse, type CreateApiKeyBody, CreateApiKeyBodyEnvironment, type CreateApiKeyMutationResult, type EmptyResponse, type ErrorResponse, type ErrorResponseData, type GetAgentQueryResult, type GetAgentResponse, GetV1AuthOauthUrlCodeChallengeMethod, type GetV1AuthOauthUrlParams, GetV1AuthOauthUrlProvider, type GetV1AuthOauthUrlQueryResult, type ListAgentsParams, type ListAgentsQueryResult, ListApiKeysIncludeRevoked, type ListApiKeysParams, type ListApiKeysQueryResult, type OAuthUrl, type PostV1AuthRefreshTokenBody, type PostV1AuthRefreshTokenMutationResult, type PostV1AuthSignInBody, type PostV1AuthSignInMutationResult, type PostV1AuthSignUpBody, type PostV1AuthSignUpMutationResult, type RevokeApiKeyMutationResult, configure, createAgent, createApiKey, generateCodeChallenge, generateCodeVerifier, getAgent, getConfig, getCreateAgentMutationFetcher, getCreateAgentMutationKey, getCreateAgentUrl, getCreateApiKeyMutationFetcher, getCreateApiKeyMutationKey, getCreateApiKeyUrl, getGetAgentKey, getGetAgentUrl, getGetV1AuthOauthUrlKey, getGetV1AuthOauthUrlUrl, getListAgentsKey, getListAgentsUrl, getListApiKeysKey, getListApiKeysUrl, getPostV1AuthRefreshTokenMutationFetcher, getPostV1AuthRefreshTokenMutationKey, getPostV1AuthRefreshTokenUrl, getPostV1AuthSignInMutationFetcher, getPostV1AuthSignInMutationKey, getPostV1AuthSignInUrl, getPostV1AuthSignUpMutationFetcher, getPostV1AuthSignUpMutationKey, getPostV1AuthSignUpUrl, getRevokeApiKeyMutationFetcher, getRevokeApiKeyMutationKey, getRevokeApiKeyUrl, getV1AuthOauthUrl, listAgents, listApiKeys, postV1AuthRefreshToken, postV1AuthSignIn, postV1AuthSignUp, revokeApiKey, useCreateAgent, useCreateApiKey, useGetAgent, useGetV1AuthOauthUrl, useListAgents, useListApiKeys, usePostV1AuthRefreshToken, usePostV1AuthSignIn, usePostV1AuthSignUp, useRevokeApiKey };
|