@avallon-labs/sdk 0.0.0-main.4 → 0.0.0-main.41

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/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as swr_mutation from 'swr/mutation';
2
2
  import { SWRMutationConfiguration } from 'swr/mutation';
3
3
  import * as swr__internal from 'swr/_internal';
4
4
  import * as swr from 'swr';
5
- import { Key, SWRConfiguration } from 'swr';
5
+ import { Key, SWRConfiguration, Arguments } from 'swr';
6
6
 
7
7
  /**
8
8
  * Custom fetch wrapper for Orval-generated client.
@@ -26,7 +26,9 @@ declare function getConfig(): AvallonConfig;
26
26
  declare function customFetch<T>(url: string, options: RequestInit): Promise<T>;
27
27
  /** Unauthenticated fetch - for auth flow endpoints (sign-in, sign-up, etc.) */
28
28
  declare function customFetchNoAuth<T>(url: string, options: RequestInit): Promise<T>;
29
- /** Typed error class for API errors */
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. */
30
32
  declare class AvallonError extends Error {
31
33
  readonly status: number;
32
34
  readonly body: {
@@ -98,8 +100,8 @@ declare function generateCodeChallenge(verifier: string): Promise<string>;
98
100
  * Avallon API
99
101
  * OpenAPI spec version: 1.0.0
100
102
  */
101
- type CreateAgent200DataAgentBackgroundSounds = (typeof CreateAgent200DataAgentBackgroundSounds)[keyof typeof CreateAgent200DataAgentBackgroundSounds];
102
- declare const CreateAgent200DataAgentBackgroundSounds: {
103
+ type AgentBackgroundSounds = (typeof AgentBackgroundSounds)[keyof typeof AgentBackgroundSounds];
104
+ declare const AgentBackgroundSounds: {
103
105
  readonly enabled: "enabled";
104
106
  readonly disabled: "disabled";
105
107
  };
@@ -110,8 +112,8 @@ declare const CreateAgent200DataAgentBackgroundSounds: {
110
112
  * Avallon API
111
113
  * OpenAPI spec version: 1.0.0
112
114
  */
113
- type CreateAgent200DataAgentDirection = (typeof CreateAgent200DataAgentDirection)[keyof typeof CreateAgent200DataAgentDirection];
114
- declare const CreateAgent200DataAgentDirection: {
115
+ type AgentDirection = (typeof AgentDirection)[keyof typeof AgentDirection];
116
+ declare const AgentDirection: {
115
117
  readonly INBOUND: "INBOUND";
116
118
  readonly OUTBOUND: "OUTBOUND";
117
119
  };
@@ -122,8 +124,8 @@ declare const CreateAgent200DataAgentDirection: {
122
124
  * Avallon API
123
125
  * OpenAPI spec version: 1.0.0
124
126
  */
125
- type CreateAgent200DataAgentLanguage = (typeof CreateAgent200DataAgentLanguage)[keyof typeof CreateAgent200DataAgentLanguage];
126
- declare const CreateAgent200DataAgentLanguage: {
127
+ type AgentLanguage = (typeof AgentLanguage)[keyof typeof AgentLanguage];
128
+ declare const AgentLanguage: {
127
129
  readonly "en-US": "en-US";
128
130
  readonly "de-DE": "de-DE";
129
131
  };
@@ -134,8 +136,8 @@ declare const CreateAgent200DataAgentLanguage: {
134
136
  * Avallon API
135
137
  * OpenAPI spec version: 1.0.0
136
138
  */
137
- type CreateAgent200DataAgentLlmModel = (typeof CreateAgent200DataAgentLlmModel)[keyof typeof CreateAgent200DataAgentLlmModel];
138
- declare const CreateAgent200DataAgentLlmModel: {
139
+ type AgentLlmModel = (typeof AgentLlmModel)[keyof typeof AgentLlmModel];
140
+ declare const AgentLlmModel: {
139
141
  readonly GPT41: "GPT4.1";
140
142
  readonly "AZURE-GPT4o": "AZURE-GPT4o";
141
143
  readonly "AZURE-GPT41": "AZURE-GPT4.1";
@@ -156,8 +158,8 @@ declare const CreateAgent200DataAgentLlmModel: {
156
158
  * Avallon API
157
159
  * OpenAPI spec version: 1.0.0
158
160
  */
159
- type CreateAgent200DataAgentSttModel = (typeof CreateAgent200DataAgentSttModel)[keyof typeof CreateAgent200DataAgentSttModel];
160
- declare const CreateAgent200DataAgentSttModel: {
161
+ type AgentSttModel = (typeof AgentSttModel)[keyof typeof AgentSttModel];
162
+ declare const AgentSttModel: {
161
163
  readonly "DEEPGRAM-NOVA-2-GENERAL": "DEEPGRAM-NOVA-2-GENERAL";
162
164
  readonly "DEEPGRAM-NOVA-3-GENERAL": "DEEPGRAM-NOVA-3-GENERAL";
163
165
  readonly "AWS-TRANSCRIBE": "AWS-TRANSCRIBE";
@@ -169,8 +171,8 @@ declare const CreateAgent200DataAgentSttModel: {
169
171
  * Avallon API
170
172
  * OpenAPI spec version: 1.0.0
171
173
  */
172
- type CreateAgent200DataAgentTtsModel = (typeof CreateAgent200DataAgentTtsModel)[keyof typeof CreateAgent200DataAgentTtsModel];
173
- declare const CreateAgent200DataAgentTtsModel: {
174
+ type AgentTtsModel = (typeof AgentTtsModel)[keyof typeof AgentTtsModel];
175
+ declare const AgentTtsModel: {
174
176
  readonly eleven_flash_v2_5: "eleven_flash_v2_5";
175
177
  readonly eleven_turbo_v2_5: "eleven_turbo_v2_5";
176
178
  readonly "sonic-multilingual": "sonic-multilingual";
@@ -184,8 +186,8 @@ declare const CreateAgent200DataAgentTtsModel: {
184
186
  * Avallon API
185
187
  * OpenAPI spec version: 1.0.0
186
188
  */
187
- type CreateAgent200DataAgentTtsProvider = (typeof CreateAgent200DataAgentTtsProvider)[keyof typeof CreateAgent200DataAgentTtsProvider];
188
- declare const CreateAgent200DataAgentTtsProvider: {
189
+ type AgentTtsProvider = (typeof AgentTtsProvider)[keyof typeof AgentTtsProvider];
190
+ declare const AgentTtsProvider: {
189
191
  readonly elevenlabs: "elevenlabs";
190
192
  readonly cartesia: "cartesia";
191
193
  readonly google: "google";
@@ -198,25 +200,25 @@ declare const CreateAgent200DataAgentTtsProvider: {
198
200
  * OpenAPI spec version: 1.0.0
199
201
  */
200
202
 
201
- type CreateAgent200DataAgent = {
203
+ interface Agent {
202
204
  id: string;
203
205
  tenant_id: string;
204
206
  agent_name: string;
205
- direction: CreateAgent200DataAgentDirection;
206
- llm_model: CreateAgent200DataAgentLlmModel;
207
- tts_provider: CreateAgent200DataAgentTtsProvider;
208
- tts_model: CreateAgent200DataAgentTtsModel;
209
- language: CreateAgent200DataAgentLanguage;
207
+ direction: AgentDirection;
208
+ llm_model: AgentLlmModel;
209
+ tts_provider: AgentTtsProvider;
210
+ tts_model: AgentTtsModel;
211
+ language: AgentLanguage;
210
212
  tts_voice_id: string;
211
- stt_model: CreateAgent200DataAgentSttModel;
213
+ stt_model: AgentSttModel;
212
214
  transfer_phone_number: string | null;
213
- background_sounds: CreateAgent200DataAgentBackgroundSounds;
215
+ background_sounds: AgentBackgroundSounds;
214
216
  created_at: string;
215
217
  updated_at: string;
216
218
  phone_number: string | null;
217
219
  dial_pad: boolean;
218
220
  end_call: boolean;
219
- };
221
+ }
220
222
 
221
223
  /**
222
224
  * Generated by orval v8.1.0 🍺
@@ -225,9 +227,61 @@ type CreateAgent200DataAgent = {
225
227
  * OpenAPI spec version: 1.0.0
226
228
  */
227
229
 
228
- type CreateAgent200Data = {
229
- agent: CreateAgent200DataAgent;
230
- };
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
+ }
231
285
 
232
286
  /**
233
287
  * Generated by orval v8.1.0 🍺
@@ -236,10 +290,34 @@ type CreateAgent200Data = {
236
290
  * OpenAPI spec version: 1.0.0
237
291
  */
238
292
 
239
- type CreateAgent200 = {
240
- data: CreateAgent200Data;
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 */
241
319
  message: string;
242
- };
320
+ }
243
321
 
244
322
  /**
245
323
  * Generated by orval v8.1.0 🍺
@@ -383,16 +461,6 @@ type CreateAgentBody = {
383
461
  end_call?: boolean;
384
462
  };
385
463
 
386
- /**
387
- * Generated by orval v8.1.0 🍺
388
- * Do not edit manually.
389
- * Avallon API
390
- * OpenAPI spec version: 1.0.0
391
- */
392
- type ErrorResponseData = {
393
- [key: string]: unknown;
394
- };
395
-
396
464
  /**
397
465
  * Generated by orval v8.1.0 🍺
398
466
  * Do not edit manually.
@@ -400,10 +468,8 @@ type ErrorResponseData = {
400
468
  * OpenAPI spec version: 1.0.0
401
469
  */
402
470
 
403
- interface ErrorResponse {
404
- data: ErrorResponseData;
405
- /** Human-readable error message */
406
- message: string;
471
+ interface CreateAgentResponse {
472
+ agent: Agent;
407
473
  }
408
474
 
409
475
  /**
@@ -412,34 +478,13 @@ interface ErrorResponse {
412
478
  * Avallon API
413
479
  * OpenAPI spec version: 1.0.0
414
480
  */
415
- type GetAgent200DataAgentBackgroundSounds = (typeof GetAgent200DataAgentBackgroundSounds)[keyof typeof GetAgent200DataAgentBackgroundSounds];
416
- declare const GetAgent200DataAgentBackgroundSounds: {
417
- readonly enabled: "enabled";
418
- readonly disabled: "disabled";
419
- };
420
-
421
481
  /**
422
- * Generated by orval v8.1.0 🍺
423
- * Do not edit manually.
424
- * Avallon API
425
- * OpenAPI spec version: 1.0.0
426
- */
427
- type GetAgent200DataAgentDirection = (typeof GetAgent200DataAgentDirection)[keyof typeof GetAgent200DataAgentDirection];
428
- declare const GetAgent200DataAgentDirection: {
429
- readonly INBOUND: "INBOUND";
430
- readonly OUTBOUND: "OUTBOUND";
431
- };
432
-
433
- /**
434
- * Generated by orval v8.1.0 🍺
435
- * Do not edit manually.
436
- * Avallon API
437
- * OpenAPI spec version: 1.0.0
482
+ * Target environment for the key
438
483
  */
439
- type GetAgent200DataAgentLanguage = (typeof GetAgent200DataAgentLanguage)[keyof typeof GetAgent200DataAgentLanguage];
440
- declare const GetAgent200DataAgentLanguage: {
441
- readonly "en-US": "en-US";
442
- readonly "de-DE": "de-DE";
484
+ type CreateApiKeyBodyEnvironment = (typeof CreateApiKeyBodyEnvironment)[keyof typeof CreateApiKeyBodyEnvironment];
485
+ declare const CreateApiKeyBodyEnvironment: {
486
+ readonly test: "test";
487
+ readonly live: "live";
443
488
  };
444
489
 
445
490
  /**
@@ -448,61 +493,18 @@ declare const GetAgent200DataAgentLanguage: {
448
493
  * Avallon API
449
494
  * OpenAPI spec version: 1.0.0
450
495
  */
451
- type GetAgent200DataAgentLlmModel = (typeof GetAgent200DataAgentLlmModel)[keyof typeof GetAgent200DataAgentLlmModel];
452
- declare const GetAgent200DataAgentLlmModel: {
453
- readonly GPT41: "GPT4.1";
454
- readonly "AZURE-GPT4o": "AZURE-GPT4o";
455
- readonly "AZURE-GPT41": "AZURE-GPT4.1";
456
- readonly "GPT-5": "GPT-5";
457
- readonly "GPT-5-low": "GPT-5-low";
458
- readonly "GPT-5-high": "GPT-5-high";
459
- readonly "GPT-51-chat-latest": "GPT-5.1-chat-latest";
460
- readonly "GPT-51-no-reasoning": "GPT-5.1-no-reasoning";
461
- readonly "GEMINI-15-flash": "GEMINI-1.5-flash";
462
- readonly "GEMINI-25-flash": "GEMINI-2.5-flash";
463
- readonly "GEMINI-25-flash-lite": "GEMINI-2.5-flash-lite";
464
- readonly "GEMINI-3-flash": "GEMINI-3-flash";
465
- };
466
496
 
467
- /**
468
- * Generated by orval v8.1.0 🍺
469
- * Do not edit manually.
470
- * Avallon API
471
- * OpenAPI spec version: 1.0.0
472
- */
473
- type GetAgent200DataAgentSttModel = (typeof GetAgent200DataAgentSttModel)[keyof typeof GetAgent200DataAgentSttModel];
474
- declare const GetAgent200DataAgentSttModel: {
475
- readonly "DEEPGRAM-NOVA-2-GENERAL": "DEEPGRAM-NOVA-2-GENERAL";
476
- readonly "DEEPGRAM-NOVA-3-GENERAL": "DEEPGRAM-NOVA-3-GENERAL";
477
- readonly "AWS-TRANSCRIBE": "AWS-TRANSCRIBE";
478
- };
479
-
480
- /**
481
- * Generated by orval v8.1.0 🍺
482
- * Do not edit manually.
483
- * Avallon API
484
- * OpenAPI spec version: 1.0.0
485
- */
486
- type GetAgent200DataAgentTtsModel = (typeof GetAgent200DataAgentTtsModel)[keyof typeof GetAgent200DataAgentTtsModel];
487
- declare const GetAgent200DataAgentTtsModel: {
488
- readonly eleven_flash_v2_5: "eleven_flash_v2_5";
489
- readonly eleven_turbo_v2_5: "eleven_turbo_v2_5";
490
- readonly "sonic-multilingual": "sonic-multilingual";
491
- readonly "sonic-3": "sonic-3";
492
- readonly chirp_3: "chirp_3";
493
- };
494
-
495
- /**
496
- * Generated by orval v8.1.0 🍺
497
- * Do not edit manually.
498
- * Avallon API
499
- * OpenAPI spec version: 1.0.0
500
- */
501
- type GetAgent200DataAgentTtsProvider = (typeof GetAgent200DataAgentTtsProvider)[keyof typeof GetAgent200DataAgentTtsProvider];
502
- declare const GetAgent200DataAgentTtsProvider: {
503
- readonly elevenlabs: "elevenlabs";
504
- readonly cartesia: "cartesia";
505
- readonly google: "google";
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;
506
508
  };
507
509
 
508
510
  /**
@@ -511,26 +513,9 @@ declare const GetAgent200DataAgentTtsProvider: {
511
513
  * Avallon API
512
514
  * OpenAPI spec version: 1.0.0
513
515
  */
514
-
515
- type GetAgent200DataAgent = {
516
- id: string;
517
- tenant_id: string;
518
- agent_name: string;
519
- direction: GetAgent200DataAgentDirection;
520
- llm_model: GetAgent200DataAgentLlmModel;
521
- tts_provider: GetAgent200DataAgentTtsProvider;
522
- tts_model: GetAgent200DataAgentTtsModel;
523
- language: GetAgent200DataAgentLanguage;
524
- tts_voice_id: string;
525
- stt_model: GetAgent200DataAgentSttModel;
526
- transfer_phone_number: string | null;
527
- background_sounds: GetAgent200DataAgentBackgroundSounds;
528
- created_at: string;
529
- updated_at: string;
530
- phone_number: string | null;
531
- dial_pad: boolean;
532
- end_call: boolean;
533
- };
516
+ interface EmptyResponse {
517
+ [key: string]: unknown;
518
+ }
534
519
 
535
520
  /**
536
521
  * Generated by orval v8.1.0 🍺
@@ -538,9 +523,8 @@ type GetAgent200DataAgent = {
538
523
  * Avallon API
539
524
  * OpenAPI spec version: 1.0.0
540
525
  */
541
-
542
- type GetAgent200Data = {
543
- agent: GetAgent200DataAgent;
526
+ type ErrorResponseData = {
527
+ [key: string]: unknown;
544
528
  };
545
529
 
546
530
  /**
@@ -550,20 +534,11 @@ type GetAgent200Data = {
550
534
  * OpenAPI spec version: 1.0.0
551
535
  */
552
536
 
553
- type GetAgent200 = {
554
- data: GetAgent200Data;
537
+ interface ErrorResponse {
538
+ data: ErrorResponseData;
539
+ /** Human-readable error message */
555
540
  message: string;
556
- };
557
-
558
- /**
559
- * Generated by orval v8.1.0 🍺
560
- * Do not edit manually.
561
- * Avallon API
562
- * OpenAPI spec version: 1.0.0
563
- */
564
- type GetV1AuthOauthUrl200Data = {
565
- url: string;
566
- };
541
+ }
567
542
 
568
543
  /**
569
544
  * Generated by orval v8.1.0 🍺
@@ -572,10 +547,9 @@ type GetV1AuthOauthUrl200Data = {
572
547
  * OpenAPI spec version: 1.0.0
573
548
  */
574
549
 
575
- type GetV1AuthOauthUrl200 = {
576
- data: GetV1AuthOauthUrl200Data;
577
- message: string;
578
- };
550
+ interface GetAgentResponse {
551
+ agent: Agent;
552
+ }
579
553
 
580
554
  /**
581
555
  * Generated by orval v8.1.0 🍺
@@ -618,161 +592,6 @@ type GetV1AuthOauthUrlParams = {
618
592
  code_challenge: string;
619
593
  };
620
594
 
621
- /**
622
- * Generated by orval v8.1.0 🍺
623
- * Do not edit manually.
624
- * Avallon API
625
- * OpenAPI spec version: 1.0.0
626
- */
627
- type ListAgents200DataAgentsItemBackgroundSounds = (typeof ListAgents200DataAgentsItemBackgroundSounds)[keyof typeof ListAgents200DataAgentsItemBackgroundSounds];
628
- declare const ListAgents200DataAgentsItemBackgroundSounds: {
629
- readonly enabled: "enabled";
630
- readonly disabled: "disabled";
631
- };
632
-
633
- /**
634
- * Generated by orval v8.1.0 🍺
635
- * Do not edit manually.
636
- * Avallon API
637
- * OpenAPI spec version: 1.0.0
638
- */
639
- type ListAgents200DataAgentsItemDirection = (typeof ListAgents200DataAgentsItemDirection)[keyof typeof ListAgents200DataAgentsItemDirection];
640
- declare const ListAgents200DataAgentsItemDirection: {
641
- readonly INBOUND: "INBOUND";
642
- readonly OUTBOUND: "OUTBOUND";
643
- };
644
-
645
- /**
646
- * Generated by orval v8.1.0 🍺
647
- * Do not edit manually.
648
- * Avallon API
649
- * OpenAPI spec version: 1.0.0
650
- */
651
- type ListAgents200DataAgentsItemLanguage = (typeof ListAgents200DataAgentsItemLanguage)[keyof typeof ListAgents200DataAgentsItemLanguage];
652
- declare const ListAgents200DataAgentsItemLanguage: {
653
- readonly "en-US": "en-US";
654
- readonly "de-DE": "de-DE";
655
- };
656
-
657
- /**
658
- * Generated by orval v8.1.0 🍺
659
- * Do not edit manually.
660
- * Avallon API
661
- * OpenAPI spec version: 1.0.0
662
- */
663
- type ListAgents200DataAgentsItemLlmModel = (typeof ListAgents200DataAgentsItemLlmModel)[keyof typeof ListAgents200DataAgentsItemLlmModel];
664
- declare const ListAgents200DataAgentsItemLlmModel: {
665
- readonly GPT41: "GPT4.1";
666
- readonly "AZURE-GPT4o": "AZURE-GPT4o";
667
- readonly "AZURE-GPT41": "AZURE-GPT4.1";
668
- readonly "GPT-5": "GPT-5";
669
- readonly "GPT-5-low": "GPT-5-low";
670
- readonly "GPT-5-high": "GPT-5-high";
671
- readonly "GPT-51-chat-latest": "GPT-5.1-chat-latest";
672
- readonly "GPT-51-no-reasoning": "GPT-5.1-no-reasoning";
673
- readonly "GEMINI-15-flash": "GEMINI-1.5-flash";
674
- readonly "GEMINI-25-flash": "GEMINI-2.5-flash";
675
- readonly "GEMINI-25-flash-lite": "GEMINI-2.5-flash-lite";
676
- readonly "GEMINI-3-flash": "GEMINI-3-flash";
677
- };
678
-
679
- /**
680
- * Generated by orval v8.1.0 🍺
681
- * Do not edit manually.
682
- * Avallon API
683
- * OpenAPI spec version: 1.0.0
684
- */
685
- type ListAgents200DataAgentsItemSttModel = (typeof ListAgents200DataAgentsItemSttModel)[keyof typeof ListAgents200DataAgentsItemSttModel];
686
- declare const ListAgents200DataAgentsItemSttModel: {
687
- readonly "DEEPGRAM-NOVA-2-GENERAL": "DEEPGRAM-NOVA-2-GENERAL";
688
- readonly "DEEPGRAM-NOVA-3-GENERAL": "DEEPGRAM-NOVA-3-GENERAL";
689
- readonly "AWS-TRANSCRIBE": "AWS-TRANSCRIBE";
690
- };
691
-
692
- /**
693
- * Generated by orval v8.1.0 🍺
694
- * Do not edit manually.
695
- * Avallon API
696
- * OpenAPI spec version: 1.0.0
697
- */
698
- type ListAgents200DataAgentsItemTtsModel = (typeof ListAgents200DataAgentsItemTtsModel)[keyof typeof ListAgents200DataAgentsItemTtsModel];
699
- declare const ListAgents200DataAgentsItemTtsModel: {
700
- readonly eleven_flash_v2_5: "eleven_flash_v2_5";
701
- readonly eleven_turbo_v2_5: "eleven_turbo_v2_5";
702
- readonly "sonic-multilingual": "sonic-multilingual";
703
- readonly "sonic-3": "sonic-3";
704
- readonly chirp_3: "chirp_3";
705
- };
706
-
707
- /**
708
- * Generated by orval v8.1.0 🍺
709
- * Do not edit manually.
710
- * Avallon API
711
- * OpenAPI spec version: 1.0.0
712
- */
713
- type ListAgents200DataAgentsItemTtsProvider = (typeof ListAgents200DataAgentsItemTtsProvider)[keyof typeof ListAgents200DataAgentsItemTtsProvider];
714
- declare const ListAgents200DataAgentsItemTtsProvider: {
715
- readonly elevenlabs: "elevenlabs";
716
- readonly cartesia: "cartesia";
717
- readonly google: "google";
718
- };
719
-
720
- /**
721
- * Generated by orval v8.1.0 🍺
722
- * Do not edit manually.
723
- * Avallon API
724
- * OpenAPI spec version: 1.0.0
725
- */
726
-
727
- type ListAgents200DataAgentsItem = {
728
- id: string;
729
- tenant_id: string;
730
- agent_name: string;
731
- direction: ListAgents200DataAgentsItemDirection;
732
- llm_model: ListAgents200DataAgentsItemLlmModel;
733
- tts_provider: ListAgents200DataAgentsItemTtsProvider;
734
- tts_model: ListAgents200DataAgentsItemTtsModel;
735
- language: ListAgents200DataAgentsItemLanguage;
736
- tts_voice_id: string;
737
- stt_model: ListAgents200DataAgentsItemSttModel;
738
- transfer_phone_number: string | null;
739
- background_sounds: ListAgents200DataAgentsItemBackgroundSounds;
740
- created_at: string;
741
- updated_at: string;
742
- phone_number: string | null;
743
- dial_pad: boolean;
744
- end_call: boolean;
745
- };
746
-
747
- /**
748
- * Generated by orval v8.1.0 🍺
749
- * Do not edit manually.
750
- * Avallon API
751
- * OpenAPI spec version: 1.0.0
752
- */
753
-
754
- type ListAgents200Data = {
755
- agents: ListAgents200DataAgentsItem[];
756
- /**
757
- * Total number of agents
758
- * @minimum -9007199254740991
759
- * @maximum 9007199254740991
760
- */
761
- total: number;
762
- };
763
-
764
- /**
765
- * Generated by orval v8.1.0 🍺
766
- * Do not edit manually.
767
- * Avallon API
768
- * OpenAPI spec version: 1.0.0
769
- */
770
-
771
- type ListAgents200 = {
772
- data: ListAgents200Data;
773
- message: string;
774
- };
775
-
776
595
  /**
777
596
  * Generated by orval v8.1.0 🍺
778
597
  * Do not edit manually.
@@ -792,10 +611,10 @@ type ListAgentsParams = {
792
611
  * Avallon API
793
612
  * OpenAPI spec version: 1.0.0
794
613
  */
795
- type PostV1AuthRefreshToken200Data = {
796
- access_token: string;
797
- refresh_token: string;
798
- expires_at: string;
614
+ type ListApiKeysIncludeRevoked = (typeof ListApiKeysIncludeRevoked)[keyof typeof ListApiKeysIncludeRevoked];
615
+ declare const ListApiKeysIncludeRevoked: {
616
+ readonly true: "true";
617
+ readonly false: "false";
799
618
  };
800
619
 
801
620
  /**
@@ -805,9 +624,11 @@ type PostV1AuthRefreshToken200Data = {
805
624
  * OpenAPI spec version: 1.0.0
806
625
  */
807
626
 
808
- type PostV1AuthRefreshToken200 = {
809
- data: PostV1AuthRefreshToken200Data;
810
- message: string;
627
+ type ListApiKeysParams = {
628
+ /**
629
+ * Include revoked keys in the response
630
+ */
631
+ include_revoked?: ListApiKeysIncludeRevoked;
811
632
  };
812
633
 
813
634
  /**
@@ -816,10 +637,9 @@ type PostV1AuthRefreshToken200 = {
816
637
  * Avallon API
817
638
  * OpenAPI spec version: 1.0.0
818
639
  */
819
- type PostV1AuthRefreshTokenBody = {
820
- access_token: string;
821
- refresh_token: string;
822
- };
640
+ interface OAuthUrl {
641
+ url: string;
642
+ }
823
643
 
824
644
  /**
825
645
  * Generated by orval v8.1.0 🍺
@@ -827,22 +647,9 @@ type PostV1AuthRefreshTokenBody = {
827
647
  * Avallon API
828
648
  * OpenAPI spec version: 1.0.0
829
649
  */
830
- type PostV1AuthSignIn200Data = {
650
+ type PostV1AuthRefreshTokenBody = {
831
651
  access_token: string;
832
652
  refresh_token: string;
833
- expires_at: string;
834
- };
835
-
836
- /**
837
- * Generated by orval v8.1.0 🍺
838
- * Do not edit manually.
839
- * Avallon API
840
- * OpenAPI spec version: 1.0.0
841
- */
842
-
843
- type PostV1AuthSignIn200 = {
844
- data: PostV1AuthSignIn200Data;
845
- message: string;
846
653
  };
847
654
 
848
655
  /**
@@ -867,28 +674,6 @@ type PostV1AuthSignInBody = {
867
674
  token: string;
868
675
  };
869
676
 
870
- /**
871
- * Generated by orval v8.1.0 🍺
872
- * Do not edit manually.
873
- * Avallon API
874
- * OpenAPI spec version: 1.0.0
875
- */
876
- type PostV1AuthSignUp200Data = {
877
- [key: string]: unknown;
878
- };
879
-
880
- /**
881
- * Generated by orval v8.1.0 🍺
882
- * Do not edit manually.
883
- * Avallon API
884
- * OpenAPI spec version: 1.0.0
885
- */
886
-
887
- type PostV1AuthSignUp200 = {
888
- data: PostV1AuthSignUp200Data;
889
- message: string;
890
- };
891
-
892
677
  /**
893
678
  * Generated by orval v8.1.0 🍺
894
679
  * Do not edit manually.
@@ -901,7 +686,7 @@ type PostV1AuthSignUpBody = {
901
686
  password: string;
902
687
  };
903
688
 
904
- type SecondParameter$1<T extends (...args: never) => unknown> = Parameters<T>[1];
689
+ type SecondParameter$2<T extends (...args: never) => unknown> = Parameters<T>[1];
905
690
  /**
906
691
  * List all agents for your tenant.
907
692
 
@@ -914,46 +699,23 @@ Filter agents by name using the `agent_name` query parameter (exact match).
914
699
  Returns an array of all agents with their configurations and a total count.
915
700
  * @summary List agents
916
701
  */
917
- type listAgentsResponse200 = {
918
- data: ListAgents200;
919
- status: 200;
920
- };
921
- type listAgentsResponse400 = {
922
- data: ErrorResponse;
923
- status: 400;
924
- };
925
- type listAgentsResponse401 = {
926
- data: ErrorResponse;
927
- status: 401;
928
- };
929
- type listAgentsResponse500 = {
930
- data: ErrorResponse;
931
- status: 500;
932
- };
933
- type listAgentsResponseSuccess = listAgentsResponse200 & {
934
- headers: Headers;
935
- };
936
- type listAgentsResponseError = (listAgentsResponse400 | listAgentsResponse401 | listAgentsResponse500) & {
937
- headers: Headers;
938
- };
939
- type listAgentsResponse = listAgentsResponseSuccess | listAgentsResponseError;
940
702
  declare const getListAgentsUrl: (params?: ListAgentsParams) => string;
941
- declare const listAgents: (params?: ListAgentsParams, options?: RequestInit) => Promise<listAgentsResponse>;
703
+ declare const listAgents: (params?: ListAgentsParams, options?: RequestInit) => Promise<AgentList>;
942
704
  declare const getListAgentsKey: (params?: ListAgentsParams) => readonly ["/v1/agents", ...ListAgentsParams[]];
943
705
  type ListAgentsQueryResult = NonNullable<Awaited<ReturnType<typeof listAgents>>>;
944
706
  /**
945
707
  * @summary List agents
946
708
  */
947
- declare const useListAgents: <TError = ErrorResponse>(params?: ListAgentsParams, options?: {
709
+ declare const useListAgents: <TError = ErrorType<ErrorResponse>>(params?: ListAgentsParams, options?: {
948
710
  swr?: SWRConfiguration<Awaited<ReturnType<typeof listAgents>>, TError> & {
949
711
  swrKey?: Key;
950
712
  enabled?: boolean;
951
713
  };
952
- request?: SecondParameter$1<typeof customFetch>;
714
+ request?: SecondParameter$2<typeof customFetch>;
953
715
  }) => {
954
- data: listAgentsResponse | undefined;
716
+ data: AgentList | undefined;
955
717
  error: TError | undefined;
956
- mutate: swr.KeyedMutator<listAgentsResponse>;
718
+ mutate: swr.KeyedMutator<AgentList>;
957
719
  isValidating: boolean;
958
720
  isLoading: swr__internal.IsLoadingResponse<Data, Config>;
959
721
  swrKey: string | false | readonly [any, ...unknown[]] | Record<any, any> | (() => swr.Arguments);
@@ -970,275 +732,226 @@ All fields in the request body are required except `phone_number_id` and `transf
970
732
  Returns the created agent with its ID and configuration.
971
733
  * @summary Create agent
972
734
  */
973
- type createAgentResponse200 = {
974
- data: CreateAgent200;
975
- status: 200;
976
- };
977
- type createAgentResponse400 = {
978
- data: ErrorResponse;
979
- status: 400;
980
- };
981
- type createAgentResponse401 = {
982
- data: ErrorResponse;
983
- status: 401;
984
- };
985
- type createAgentResponse500 = {
986
- data: ErrorResponse;
987
- status: 500;
988
- };
989
- type createAgentResponseSuccess = createAgentResponse200 & {
990
- headers: Headers;
991
- };
992
- type createAgentResponseError = (createAgentResponse400 | createAgentResponse401 | createAgentResponse500) & {
993
- headers: Headers;
994
- };
995
- type createAgentResponse = createAgentResponseSuccess | createAgentResponseError;
996
735
  declare const getCreateAgentUrl: () => string;
997
- declare const createAgent: (createAgentBody: CreateAgentBody, options?: RequestInit) => Promise<createAgentResponse>;
998
- declare const getCreateAgentMutationFetcher: (options?: SecondParameter$1<typeof customFetch>) => (_: Key, { arg }: {
736
+ declare const createAgent: (createAgentBody: CreateAgentBody, options?: RequestInit) => Promise<CreateAgentResponse>;
737
+ declare const getCreateAgentMutationFetcher: (options?: SecondParameter$2<typeof customFetch>) => (_: Key, { arg }: {
999
738
  arg: CreateAgentBody;
1000
- }) => Promise<createAgentResponse>;
739
+ }) => Promise<CreateAgentResponse>;
1001
740
  declare const getCreateAgentMutationKey: () => readonly ["/v1/agents"];
1002
741
  type CreateAgentMutationResult = NonNullable<Awaited<ReturnType<typeof createAgent>>>;
1003
742
  /**
1004
743
  * @summary Create agent
1005
744
  */
1006
- declare const useCreateAgent: <TError = ErrorResponse>(options?: {
745
+ declare const useCreateAgent: <TError = ErrorType<ErrorResponse>>(options?: {
1007
746
  swr?: SWRMutationConfiguration<Awaited<ReturnType<typeof createAgent>>, TError, Key, CreateAgentBody, Awaited<ReturnType<typeof createAgent>>> & {
1008
747
  swrKey?: string;
1009
748
  };
1010
- request?: SecondParameter$1<typeof customFetch>;
749
+ request?: SecondParameter$2<typeof customFetch>;
1011
750
  }) => {
1012
751
  isMutating: boolean;
1013
- trigger: swr_mutation.TriggerWithArgs<createAgentResponse, TError, string | readonly ["/v1/agents"], CreateAgentBody>;
752
+ trigger: swr_mutation.TriggerWithArgs<CreateAgentResponse, TError, string | readonly ["/v1/agents"], CreateAgentBody>;
1014
753
  reset: () => void;
754
+ data: CreateAgentResponse | undefined;
1015
755
  error: TError | undefined;
1016
- data: createAgentResponse | undefined;
1017
756
  swrKey: string | readonly ["/v1/agents"];
1018
757
  };
1019
758
  /**
1020
759
  * Retrieve a single agent by ID.
1021
760
  * @summary Get agent
1022
761
  */
1023
- type getAgentResponse200 = {
1024
- data: GetAgent200;
1025
- status: 200;
1026
- };
1027
- type getAgentResponse400 = {
1028
- data: ErrorResponse;
1029
- status: 400;
1030
- };
1031
- type getAgentResponse401 = {
1032
- data: ErrorResponse;
1033
- status: 401;
1034
- };
1035
- type getAgentResponse404 = {
1036
- data: ErrorResponse;
1037
- status: 404;
1038
- };
1039
- type getAgentResponse500 = {
1040
- data: ErrorResponse;
1041
- status: 500;
1042
- };
1043
- type getAgentResponseSuccess = getAgentResponse200 & {
1044
- headers: Headers;
1045
- };
1046
- type getAgentResponseError = (getAgentResponse400 | getAgentResponse401 | getAgentResponse404 | getAgentResponse500) & {
1047
- headers: Headers;
1048
- };
1049
- type getAgentResponse = getAgentResponseSuccess | getAgentResponseError;
1050
762
  declare const getGetAgentUrl: (id: string) => string;
1051
- declare const getAgent: (id: string, options?: RequestInit) => Promise<getAgentResponse>;
763
+ declare const getAgent: (id: string, options?: RequestInit) => Promise<GetAgentResponse>;
1052
764
  declare const getGetAgentKey: (id: string) => readonly [`/v1/agents/${string}`];
1053
765
  type GetAgentQueryResult = NonNullable<Awaited<ReturnType<typeof getAgent>>>;
1054
766
  /**
1055
767
  * @summary Get agent
1056
768
  */
1057
- declare const useGetAgent: <TError = ErrorResponse>(id: string, options?: {
769
+ declare const useGetAgent: <TError = ErrorType<ErrorResponse>>(id: string, options?: {
1058
770
  swr?: SWRConfiguration<Awaited<ReturnType<typeof getAgent>>, TError> & {
1059
771
  swrKey?: Key;
1060
772
  enabled?: boolean;
1061
773
  };
1062
- request?: SecondParameter$1<typeof customFetch>;
774
+ request?: SecondParameter$2<typeof customFetch>;
1063
775
  }) => {
1064
- data: getAgentResponse | undefined;
776
+ data: GetAgentResponse | undefined;
1065
777
  error: TError | undefined;
1066
- mutate: swr.KeyedMutator<getAgentResponse>;
778
+ mutate: swr.KeyedMutator<GetAgentResponse>;
1067
779
  isValidating: boolean;
1068
780
  isLoading: swr__internal.IsLoadingResponse<Data, Config>;
1069
781
  swrKey: string | false | readonly [any, ...unknown[]] | Record<any, any> | (() => swr.Arguments);
1070
782
  };
1071
783
 
1072
- type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
1073
- type postV1AuthSignUpResponse200 = {
1074
- data: PostV1AuthSignUp200;
1075
- status: 200;
1076
- };
1077
- type postV1AuthSignUpResponse400 = {
1078
- data: ErrorResponse;
1079
- status: 400;
1080
- };
1081
- type postV1AuthSignUpResponse401 = {
1082
- data: ErrorResponse;
1083
- status: 401;
1084
- };
1085
- type postV1AuthSignUpResponse500 = {
1086
- data: ErrorResponse;
1087
- status: 500;
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);
1088
813
  };
1089
- type postV1AuthSignUpResponseSuccess = postV1AuthSignUpResponse200 & {
1090
- headers: Headers;
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"];
1091
844
  };
1092
- type postV1AuthSignUpResponseError = (postV1AuthSignUpResponse400 | postV1AuthSignUpResponse401 | postV1AuthSignUpResponse500) & {
1093
- headers: Headers;
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`];
1094
875
  };
1095
- type postV1AuthSignUpResponse = postV1AuthSignUpResponseSuccess | postV1AuthSignUpResponseError;
876
+
877
+ type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
1096
878
  declare const getPostV1AuthSignUpUrl: () => string;
1097
- declare const postV1AuthSignUp: (postV1AuthSignUpBody: PostV1AuthSignUpBody, options?: RequestInit) => Promise<postV1AuthSignUpResponse>;
879
+ declare const postV1AuthSignUp: (postV1AuthSignUpBody: PostV1AuthSignUpBody, options?: RequestInit) => Promise<EmptyResponse>;
1098
880
  declare const getPostV1AuthSignUpMutationFetcher: (options?: SecondParameter<typeof customFetchNoAuth>) => (_: Key, { arg }: {
1099
881
  arg: PostV1AuthSignUpBody;
1100
- }) => Promise<postV1AuthSignUpResponse>;
882
+ }) => Promise<EmptyResponse>;
1101
883
  declare const getPostV1AuthSignUpMutationKey: () => readonly ["/v1/auth/sign-up"];
1102
884
  type PostV1AuthSignUpMutationResult = NonNullable<Awaited<ReturnType<typeof postV1AuthSignUp>>>;
1103
- declare const usePostV1AuthSignUp: <TError = ErrorResponse>(options?: {
885
+ declare const usePostV1AuthSignUp: <TError = ErrorType<ErrorResponse>>(options?: {
1104
886
  swr?: SWRMutationConfiguration<Awaited<ReturnType<typeof postV1AuthSignUp>>, TError, Key, PostV1AuthSignUpBody, Awaited<ReturnType<typeof postV1AuthSignUp>>> & {
1105
887
  swrKey?: string;
1106
888
  };
1107
889
  request?: SecondParameter<typeof customFetchNoAuth>;
1108
890
  }) => {
1109
891
  isMutating: boolean;
1110
- trigger: swr_mutation.TriggerWithArgs<postV1AuthSignUpResponse, TError, string | readonly ["/v1/auth/sign-up"], PostV1AuthSignUpBody>;
892
+ trigger: swr_mutation.TriggerWithArgs<EmptyResponse, TError, string | readonly ["/v1/auth/sign-up"], PostV1AuthSignUpBody>;
1111
893
  reset: () => void;
894
+ data: EmptyResponse | undefined;
1112
895
  error: TError | undefined;
1113
- data: postV1AuthSignUpResponse | undefined;
1114
896
  swrKey: string | readonly ["/v1/auth/sign-up"];
1115
897
  };
1116
- type postV1AuthSignInResponse200 = {
1117
- data: PostV1AuthSignIn200;
1118
- status: 200;
1119
- };
1120
- type postV1AuthSignInResponse400 = {
1121
- data: ErrorResponse;
1122
- status: 400;
1123
- };
1124
- type postV1AuthSignInResponse401 = {
1125
- data: ErrorResponse;
1126
- status: 401;
1127
- };
1128
- type postV1AuthSignInResponse500 = {
1129
- data: ErrorResponse;
1130
- status: 500;
1131
- };
1132
- type postV1AuthSignInResponseSuccess = postV1AuthSignInResponse200 & {
1133
- headers: Headers;
1134
- };
1135
- type postV1AuthSignInResponseError = (postV1AuthSignInResponse400 | postV1AuthSignInResponse401 | postV1AuthSignInResponse500) & {
1136
- headers: Headers;
1137
- };
1138
- type postV1AuthSignInResponse = postV1AuthSignInResponseSuccess | postV1AuthSignInResponseError;
1139
898
  declare const getPostV1AuthSignInUrl: () => string;
1140
- declare const postV1AuthSignIn: (postV1AuthSignInBody: PostV1AuthSignInBody, options?: RequestInit) => Promise<postV1AuthSignInResponse>;
899
+ declare const postV1AuthSignIn: (postV1AuthSignInBody: PostV1AuthSignInBody, options?: RequestInit) => Promise<AuthTokens>;
1141
900
  declare const getPostV1AuthSignInMutationFetcher: (options?: SecondParameter<typeof customFetchNoAuth>) => (_: Key, { arg }: {
1142
901
  arg: PostV1AuthSignInBody;
1143
- }) => Promise<postV1AuthSignInResponse>;
902
+ }) => Promise<AuthTokens>;
1144
903
  declare const getPostV1AuthSignInMutationKey: () => readonly ["/v1/auth/sign-in"];
1145
904
  type PostV1AuthSignInMutationResult = NonNullable<Awaited<ReturnType<typeof postV1AuthSignIn>>>;
1146
- declare const usePostV1AuthSignIn: <TError = ErrorResponse>(options?: {
905
+ declare const usePostV1AuthSignIn: <TError = ErrorType<ErrorResponse>>(options?: {
1147
906
  swr?: SWRMutationConfiguration<Awaited<ReturnType<typeof postV1AuthSignIn>>, TError, Key, PostV1AuthSignInBody, Awaited<ReturnType<typeof postV1AuthSignIn>>> & {
1148
907
  swrKey?: string;
1149
908
  };
1150
909
  request?: SecondParameter<typeof customFetchNoAuth>;
1151
910
  }) => {
1152
911
  isMutating: boolean;
1153
- trigger: swr_mutation.TriggerWithArgs<postV1AuthSignInResponse, TError, string | readonly ["/v1/auth/sign-in"], PostV1AuthSignInBody>;
912
+ trigger: swr_mutation.TriggerWithArgs<AuthTokens, TError, string | readonly ["/v1/auth/sign-in"], PostV1AuthSignInBody>;
1154
913
  reset: () => void;
914
+ data: AuthTokens | undefined;
1155
915
  error: TError | undefined;
1156
- data: postV1AuthSignInResponse | undefined;
1157
916
  swrKey: string | readonly ["/v1/auth/sign-in"];
1158
917
  };
1159
- type postV1AuthRefreshTokenResponse200 = {
1160
- data: PostV1AuthRefreshToken200;
1161
- status: 200;
1162
- };
1163
- type postV1AuthRefreshTokenResponse400 = {
1164
- data: ErrorResponse;
1165
- status: 400;
1166
- };
1167
- type postV1AuthRefreshTokenResponse401 = {
1168
- data: ErrorResponse;
1169
- status: 401;
1170
- };
1171
- type postV1AuthRefreshTokenResponse500 = {
1172
- data: ErrorResponse;
1173
- status: 500;
1174
- };
1175
- type postV1AuthRefreshTokenResponseSuccess = postV1AuthRefreshTokenResponse200 & {
1176
- headers: Headers;
1177
- };
1178
- type postV1AuthRefreshTokenResponseError = (postV1AuthRefreshTokenResponse400 | postV1AuthRefreshTokenResponse401 | postV1AuthRefreshTokenResponse500) & {
1179
- headers: Headers;
1180
- };
1181
- type postV1AuthRefreshTokenResponse = postV1AuthRefreshTokenResponseSuccess | postV1AuthRefreshTokenResponseError;
1182
918
  declare const getPostV1AuthRefreshTokenUrl: () => string;
1183
- declare const postV1AuthRefreshToken: (postV1AuthRefreshTokenBody: PostV1AuthRefreshTokenBody, options?: RequestInit) => Promise<postV1AuthRefreshTokenResponse>;
919
+ declare const postV1AuthRefreshToken: (postV1AuthRefreshTokenBody: PostV1AuthRefreshTokenBody, options?: RequestInit) => Promise<AuthTokens>;
1184
920
  declare const getPostV1AuthRefreshTokenMutationFetcher: (options?: SecondParameter<typeof customFetchNoAuth>) => (_: Key, { arg }: {
1185
921
  arg: PostV1AuthRefreshTokenBody;
1186
- }) => Promise<postV1AuthRefreshTokenResponse>;
922
+ }) => Promise<AuthTokens>;
1187
923
  declare const getPostV1AuthRefreshTokenMutationKey: () => readonly ["/v1/auth/refresh-token"];
1188
924
  type PostV1AuthRefreshTokenMutationResult = NonNullable<Awaited<ReturnType<typeof postV1AuthRefreshToken>>>;
1189
- declare const usePostV1AuthRefreshToken: <TError = ErrorResponse>(options?: {
925
+ declare const usePostV1AuthRefreshToken: <TError = ErrorType<ErrorResponse>>(options?: {
1190
926
  swr?: SWRMutationConfiguration<Awaited<ReturnType<typeof postV1AuthRefreshToken>>, TError, Key, PostV1AuthRefreshTokenBody, Awaited<ReturnType<typeof postV1AuthRefreshToken>>> & {
1191
927
  swrKey?: string;
1192
928
  };
1193
929
  request?: SecondParameter<typeof customFetchNoAuth>;
1194
930
  }) => {
1195
931
  isMutating: boolean;
1196
- trigger: swr_mutation.TriggerWithArgs<postV1AuthRefreshTokenResponse, TError, string | readonly ["/v1/auth/refresh-token"], PostV1AuthRefreshTokenBody>;
932
+ trigger: swr_mutation.TriggerWithArgs<AuthTokens, TError, string | readonly ["/v1/auth/refresh-token"], PostV1AuthRefreshTokenBody>;
1197
933
  reset: () => void;
934
+ data: AuthTokens | undefined;
1198
935
  error: TError | undefined;
1199
- data: postV1AuthRefreshTokenResponse | undefined;
1200
936
  swrKey: string | readonly ["/v1/auth/refresh-token"];
1201
937
  };
1202
- type getV1AuthOauthUrlResponse200 = {
1203
- data: GetV1AuthOauthUrl200;
1204
- status: 200;
1205
- };
1206
- type getV1AuthOauthUrlResponse400 = {
1207
- data: ErrorResponse;
1208
- status: 400;
1209
- };
1210
- type getV1AuthOauthUrlResponse401 = {
1211
- data: ErrorResponse;
1212
- status: 401;
1213
- };
1214
- type getV1AuthOauthUrlResponse500 = {
1215
- data: ErrorResponse;
1216
- status: 500;
1217
- };
1218
- type getV1AuthOauthUrlResponseSuccess = getV1AuthOauthUrlResponse200 & {
1219
- headers: Headers;
1220
- };
1221
- type getV1AuthOauthUrlResponseError = (getV1AuthOauthUrlResponse400 | getV1AuthOauthUrlResponse401 | getV1AuthOauthUrlResponse500) & {
1222
- headers: Headers;
1223
- };
1224
- type getV1AuthOauthUrlResponse = getV1AuthOauthUrlResponseSuccess | getV1AuthOauthUrlResponseError;
1225
938
  declare const getGetV1AuthOauthUrlUrl: (params: GetV1AuthOauthUrlParams) => string;
1226
- declare const getV1AuthOauthUrl: (params: GetV1AuthOauthUrlParams, options?: RequestInit) => Promise<getV1AuthOauthUrlResponse>;
939
+ declare const getV1AuthOauthUrl: (params: GetV1AuthOauthUrlParams, options?: RequestInit) => Promise<OAuthUrl>;
1227
940
  declare const getGetV1AuthOauthUrlKey: (params: GetV1AuthOauthUrlParams) => readonly ["/v1/auth/oauth-url", ...GetV1AuthOauthUrlParams[]];
1228
941
  type GetV1AuthOauthUrlQueryResult = NonNullable<Awaited<ReturnType<typeof getV1AuthOauthUrl>>>;
1229
- declare const useGetV1AuthOauthUrl: <TError = ErrorResponse>(params: GetV1AuthOauthUrlParams, options?: {
942
+ declare const useGetV1AuthOauthUrl: <TError = ErrorType<ErrorResponse>>(params: GetV1AuthOauthUrlParams, options?: {
1230
943
  swr?: SWRConfiguration<Awaited<ReturnType<typeof getV1AuthOauthUrl>>, TError> & {
1231
944
  swrKey?: Key;
1232
945
  enabled?: boolean;
1233
946
  };
1234
947
  request?: SecondParameter<typeof customFetchNoAuth>;
1235
948
  }) => {
1236
- data: getV1AuthOauthUrlResponse | undefined;
949
+ data: OAuthUrl | undefined;
1237
950
  error: TError | undefined;
1238
- mutate: swr.KeyedMutator<getV1AuthOauthUrlResponse>;
951
+ mutate: swr.KeyedMutator<OAuthUrl>;
1239
952
  isValidating: boolean;
1240
953
  isLoading: swr__internal.IsLoadingResponse<Data, Config>;
1241
954
  swrKey: string | false | readonly [any, ...unknown[]] | Record<any, any> | (() => swr.Arguments);
1242
955
  };
1243
956
 
1244
- export { type AvallonConfig, AvallonError, type CreateAgent200, type CreateAgent200Data, type CreateAgent200DataAgent, CreateAgent200DataAgentBackgroundSounds, CreateAgent200DataAgentDirection, CreateAgent200DataAgentLanguage, CreateAgent200DataAgentLlmModel, CreateAgent200DataAgentSttModel, CreateAgent200DataAgentTtsModel, CreateAgent200DataAgentTtsProvider, type CreateAgentBody, CreateAgentBodyDirection, CreateAgentBodyLanguage, CreateAgentBodyLlmModel, CreateAgentBodySttModel, CreateAgentBodyTtsModel, CreateAgentBodyTtsProvider, type CreateAgentMutationResult, type ErrorResponse, type ErrorResponseData, type GetAgent200, type GetAgent200Data, type GetAgent200DataAgent, GetAgent200DataAgentBackgroundSounds, GetAgent200DataAgentDirection, GetAgent200DataAgentLanguage, GetAgent200DataAgentLlmModel, GetAgent200DataAgentSttModel, GetAgent200DataAgentTtsModel, GetAgent200DataAgentTtsProvider, type GetAgentQueryResult, type GetV1AuthOauthUrl200, type GetV1AuthOauthUrl200Data, GetV1AuthOauthUrlCodeChallengeMethod, type GetV1AuthOauthUrlParams, GetV1AuthOauthUrlProvider, type GetV1AuthOauthUrlQueryResult, type ListAgents200, type ListAgents200Data, type ListAgents200DataAgentsItem, ListAgents200DataAgentsItemBackgroundSounds, ListAgents200DataAgentsItemDirection, ListAgents200DataAgentsItemLanguage, ListAgents200DataAgentsItemLlmModel, ListAgents200DataAgentsItemSttModel, ListAgents200DataAgentsItemTtsModel, ListAgents200DataAgentsItemTtsProvider, type ListAgentsParams, type ListAgentsQueryResult, type PostV1AuthRefreshToken200, type PostV1AuthRefreshToken200Data, type PostV1AuthRefreshTokenBody, type PostV1AuthRefreshTokenMutationResult, type PostV1AuthSignIn200, type PostV1AuthSignIn200Data, type PostV1AuthSignInBody, type PostV1AuthSignInMutationResult, type PostV1AuthSignUp200, type PostV1AuthSignUp200Data, type PostV1AuthSignUpBody, type PostV1AuthSignUpMutationResult, configure, createAgent, type createAgentResponse, type createAgentResponse200, type createAgentResponse400, type createAgentResponse401, type createAgentResponse500, type createAgentResponseError, type createAgentResponseSuccess, generateCodeChallenge, generateCodeVerifier, getAgent, type getAgentResponse, type getAgentResponse200, type getAgentResponse400, type getAgentResponse401, type getAgentResponse404, type getAgentResponse500, type getAgentResponseError, type getAgentResponseSuccess, getConfig, getCreateAgentMutationFetcher, getCreateAgentMutationKey, getCreateAgentUrl, getGetAgentKey, getGetAgentUrl, getGetV1AuthOauthUrlKey, getGetV1AuthOauthUrlUrl, getListAgentsKey, getListAgentsUrl, getPostV1AuthRefreshTokenMutationFetcher, getPostV1AuthRefreshTokenMutationKey, getPostV1AuthRefreshTokenUrl, getPostV1AuthSignInMutationFetcher, getPostV1AuthSignInMutationKey, getPostV1AuthSignInUrl, getPostV1AuthSignUpMutationFetcher, getPostV1AuthSignUpMutationKey, getPostV1AuthSignUpUrl, getV1AuthOauthUrl, type getV1AuthOauthUrlResponse, type getV1AuthOauthUrlResponse200, type getV1AuthOauthUrlResponse400, type getV1AuthOauthUrlResponse401, type getV1AuthOauthUrlResponse500, type getV1AuthOauthUrlResponseError, type getV1AuthOauthUrlResponseSuccess, listAgents, type listAgentsResponse, type listAgentsResponse200, type listAgentsResponse400, type listAgentsResponse401, type listAgentsResponse500, type listAgentsResponseError, type listAgentsResponseSuccess, postV1AuthRefreshToken, type postV1AuthRefreshTokenResponse, type postV1AuthRefreshTokenResponse200, type postV1AuthRefreshTokenResponse400, type postV1AuthRefreshTokenResponse401, type postV1AuthRefreshTokenResponse500, type postV1AuthRefreshTokenResponseError, type postV1AuthRefreshTokenResponseSuccess, postV1AuthSignIn, type postV1AuthSignInResponse, type postV1AuthSignInResponse200, type postV1AuthSignInResponse400, type postV1AuthSignInResponse401, type postV1AuthSignInResponse500, type postV1AuthSignInResponseError, type postV1AuthSignInResponseSuccess, postV1AuthSignUp, type postV1AuthSignUpResponse, type postV1AuthSignUpResponse200, type postV1AuthSignUpResponse400, type postV1AuthSignUpResponse401, type postV1AuthSignUpResponse500, type postV1AuthSignUpResponseError, type postV1AuthSignUpResponseSuccess, useCreateAgent, useGetAgent, useGetV1AuthOauthUrl, useListAgents, usePostV1AuthRefreshToken, usePostV1AuthSignIn, usePostV1AuthSignUp };
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 };