@avallon-labs/sdk 0.0.0-4d940829

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/openapi.yaml ADDED
@@ -0,0 +1,925 @@
1
+ openapi: 3.1.0
2
+ info:
3
+ title: Avallon API
4
+ version: 1.0.0
5
+ servers:
6
+ - url: https://api.avallon.ai
7
+ description: US Region (Virginia)
8
+ - url: https://api.eu.avallon.ai
9
+ description: EU Region (Frankfurt)
10
+ security:
11
+ - ApiKeyAuth: []
12
+ paths:
13
+ /v1/agents:
14
+ get:
15
+ summary: List agents
16
+ description: |-
17
+ List all agents for your tenant.
18
+
19
+ **Filtering:**
20
+
21
+ Filter agents by name using the `agent_name` query parameter (exact match).
22
+
23
+ **Response:**
24
+
25
+ Returns an array of all agents with their configurations and a total count.
26
+ operationId: listAgents
27
+ tags:
28
+ - Agents
29
+ parameters:
30
+ - in: query
31
+ name: agent_name
32
+ schema:
33
+ description: Filter by exact agent name
34
+ example: customer-support-agent
35
+ type: string
36
+ description: Filter by exact agent name
37
+ responses:
38
+ "200":
39
+ description: List of agents
40
+ content:
41
+ application/json:
42
+ schema:
43
+ type: object
44
+ properties:
45
+ data:
46
+ type: object
47
+ properties:
48
+ agents:
49
+ type: array
50
+ items:
51
+ type: object
52
+ properties:
53
+ id:
54
+ type: string
55
+ tenant_id:
56
+ type: string
57
+ agent_name:
58
+ type: string
59
+ direction:
60
+ type: string
61
+ enum:
62
+ - INBOUND
63
+ - OUTBOUND
64
+ llm_model:
65
+ type: string
66
+ enum:
67
+ - GPT4.1
68
+ - AZURE-GPT4o
69
+ - AZURE-GPT4.1
70
+ - GPT-5
71
+ - GPT-5-low
72
+ - GPT-5-high
73
+ - GPT-5.1-chat-latest
74
+ - GPT-5.1-no-reasoning
75
+ - GEMINI-1.5-flash
76
+ - GEMINI-2.5-flash
77
+ - GEMINI-2.5-flash-lite
78
+ - GEMINI-3-flash
79
+ tts_provider:
80
+ type: string
81
+ enum:
82
+ - elevenlabs
83
+ - cartesia
84
+ - google
85
+ tts_model:
86
+ type: string
87
+ enum:
88
+ - eleven_flash_v2_5
89
+ - eleven_turbo_v2_5
90
+ - sonic-multilingual
91
+ - sonic-3
92
+ - chirp_3
93
+ language:
94
+ type: string
95
+ enum:
96
+ - en-US
97
+ - de-DE
98
+ tts_voice_id:
99
+ type: string
100
+ stt_model:
101
+ type: string
102
+ enum:
103
+ - DEEPGRAM-NOVA-2-GENERAL
104
+ - DEEPGRAM-NOVA-3-GENERAL
105
+ - AWS-TRANSCRIBE
106
+ transfer_phone_number:
107
+ anyOf:
108
+ - type: string
109
+ - type: "null"
110
+ background_sounds:
111
+ type: string
112
+ enum:
113
+ - enabled
114
+ - disabled
115
+ created_at:
116
+ type: string
117
+ format: date-time
118
+ updated_at:
119
+ type: string
120
+ format: date-time
121
+ phone_number:
122
+ anyOf:
123
+ - type: string
124
+ - type: "null"
125
+ dial_pad:
126
+ type: boolean
127
+ end_call:
128
+ type: boolean
129
+ required:
130
+ - id
131
+ - tenant_id
132
+ - agent_name
133
+ - direction
134
+ - llm_model
135
+ - tts_provider
136
+ - tts_model
137
+ - language
138
+ - tts_voice_id
139
+ - stt_model
140
+ - transfer_phone_number
141
+ - background_sounds
142
+ - created_at
143
+ - updated_at
144
+ - phone_number
145
+ - dial_pad
146
+ - end_call
147
+ additionalProperties: false
148
+ total:
149
+ type: integer
150
+ minimum: -9007199254740991
151
+ maximum: 9007199254740991
152
+ description: Total number of agents
153
+ example: 2
154
+ required:
155
+ - agents
156
+ - total
157
+ additionalProperties: false
158
+ message:
159
+ type: string
160
+ required:
161
+ - data
162
+ - message
163
+ additionalProperties: false
164
+ "400":
165
+ description: Bad request
166
+ content:
167
+ application/json:
168
+ schema:
169
+ $ref: "#/components/schemas/ErrorResponse"
170
+ "401":
171
+ description: Unauthorized
172
+ content:
173
+ application/json:
174
+ schema:
175
+ $ref: "#/components/schemas/ErrorResponse"
176
+ "500":
177
+ description: Internal server error
178
+ content:
179
+ application/json:
180
+ schema:
181
+ $ref: "#/components/schemas/ErrorResponse"
182
+ post:
183
+ summary: Create agent
184
+ description: |-
185
+ Create a new voice agent with the specified configuration.
186
+
187
+ **Required fields:**
188
+
189
+ All fields in the request body are required except `phone_number_id` and `transfer_phone_number`.
190
+
191
+ **Response:**
192
+
193
+ Returns the created agent with its ID and configuration.
194
+ operationId: createAgent
195
+ tags:
196
+ - Agents
197
+ requestBody:
198
+ content:
199
+ application/json:
200
+ schema:
201
+ type: object
202
+ properties:
203
+ agent_name:
204
+ type: string
205
+ minLength: 1
206
+ description: Name for the agent
207
+ example: customer-support-agent
208
+ direction:
209
+ type: string
210
+ enum:
211
+ - OUTBOUND
212
+ - INBOUND
213
+ description: Call direction the agent handles
214
+ example: INBOUND
215
+ llm_model:
216
+ type: string
217
+ enum:
218
+ - GPT4.1
219
+ - AZURE-GPT4o
220
+ - AZURE-GPT4.1
221
+ - GPT-5
222
+ - GPT-5-low
223
+ - GPT-5-high
224
+ - GPT-5.1-chat-latest
225
+ - GPT-5.1-no-reasoning
226
+ - GEMINI-1.5-flash
227
+ - GEMINI-2.5-flash
228
+ - GEMINI-2.5-flash-lite
229
+ - GEMINI-3-flash
230
+ description: LLM model for conversation
231
+ example: GPT-5
232
+ tts_provider:
233
+ type: string
234
+ enum:
235
+ - elevenlabs
236
+ - cartesia
237
+ - google
238
+ description: Text-to-speech provider
239
+ example: elevenlabs
240
+ tts_model:
241
+ type: string
242
+ enum:
243
+ - eleven_flash_v2_5
244
+ - eleven_turbo_v2_5
245
+ - sonic-multilingual
246
+ - sonic-3
247
+ - chirp_3
248
+ description: Text-to-speech model
249
+ example: eleven_flash_v2_5
250
+ tts_voice_id:
251
+ anyOf:
252
+ - anyOf:
253
+ - type: string
254
+ enum:
255
+ - Achernar
256
+ - Achird
257
+ - type: string
258
+ enum:
259
+ - v3V1d2rk6528UrLKRuy8
260
+ - type: string
261
+ enum:
262
+ - 5c42302c-194b-4d0c-ba1a-8cb485c84ab9
263
+ - e8e5fffb-252c-436d-b842-8879b84445b6
264
+ - f786b574-daa5-4673-aa0c-cbe3e8534c02
265
+ - 8d8ce8c9-44a4-46c4-b10f-9a927b99a853
266
+ - 5ee9feff-1265-424a-9d7f-8e4d431a12c7
267
+ - b9de4a89-2257-424b-94c2-db18ba68c81a
268
+ description: Voice ID from the TTS provider
269
+ example: 21m00Tcm4TlvDq8ikWAM
270
+ stt_model:
271
+ type: string
272
+ enum:
273
+ - DEEPGRAM-NOVA-2-GENERAL
274
+ - DEEPGRAM-NOVA-3-GENERAL
275
+ - AWS-TRANSCRIBE
276
+ description: Speech-to-text model
277
+ example: DEEPGRAM-NOVA-3-GENERAL
278
+ transfer_phone_number:
279
+ anyOf:
280
+ - type: string
281
+ - type: "null"
282
+ description: Phone number to transfer calls to
283
+ example: null
284
+ phone_number_id:
285
+ description: ID of phone number to assign to agent
286
+ example: pn_123456
287
+ type: string
288
+ language:
289
+ type: string
290
+ enum:
291
+ - en-US
292
+ - de-DE
293
+ description: Language for the agent
294
+ example: en-US
295
+ dial_pad:
296
+ description: Whether the agent supports DTMF dial pad input
297
+ example: false
298
+ type: boolean
299
+ end_call:
300
+ description: Whether the agent can end the call
301
+ example: false
302
+ type: boolean
303
+ required:
304
+ - agent_name
305
+ - direction
306
+ - llm_model
307
+ - tts_provider
308
+ - tts_model
309
+ - tts_voice_id
310
+ - stt_model
311
+ - transfer_phone_number
312
+ - language
313
+ responses:
314
+ "200":
315
+ description: Created agent
316
+ content:
317
+ application/json:
318
+ schema:
319
+ type: object
320
+ properties:
321
+ data:
322
+ type: object
323
+ properties:
324
+ agent:
325
+ type: object
326
+ properties:
327
+ id:
328
+ type: string
329
+ tenant_id:
330
+ type: string
331
+ agent_name:
332
+ type: string
333
+ direction:
334
+ type: string
335
+ enum:
336
+ - INBOUND
337
+ - OUTBOUND
338
+ llm_model:
339
+ type: string
340
+ enum:
341
+ - GPT4.1
342
+ - AZURE-GPT4o
343
+ - AZURE-GPT4.1
344
+ - GPT-5
345
+ - GPT-5-low
346
+ - GPT-5-high
347
+ - GPT-5.1-chat-latest
348
+ - GPT-5.1-no-reasoning
349
+ - GEMINI-1.5-flash
350
+ - GEMINI-2.5-flash
351
+ - GEMINI-2.5-flash-lite
352
+ - GEMINI-3-flash
353
+ tts_provider:
354
+ type: string
355
+ enum:
356
+ - elevenlabs
357
+ - cartesia
358
+ - google
359
+ tts_model:
360
+ type: string
361
+ enum:
362
+ - eleven_flash_v2_5
363
+ - eleven_turbo_v2_5
364
+ - sonic-multilingual
365
+ - sonic-3
366
+ - chirp_3
367
+ language:
368
+ type: string
369
+ enum:
370
+ - en-US
371
+ - de-DE
372
+ tts_voice_id:
373
+ type: string
374
+ stt_model:
375
+ type: string
376
+ enum:
377
+ - DEEPGRAM-NOVA-2-GENERAL
378
+ - DEEPGRAM-NOVA-3-GENERAL
379
+ - AWS-TRANSCRIBE
380
+ transfer_phone_number:
381
+ anyOf:
382
+ - type: string
383
+ - type: "null"
384
+ background_sounds:
385
+ type: string
386
+ enum:
387
+ - enabled
388
+ - disabled
389
+ created_at:
390
+ type: string
391
+ format: date-time
392
+ updated_at:
393
+ type: string
394
+ format: date-time
395
+ phone_number:
396
+ anyOf:
397
+ - type: string
398
+ - type: "null"
399
+ dial_pad:
400
+ type: boolean
401
+ end_call:
402
+ type: boolean
403
+ required:
404
+ - id
405
+ - tenant_id
406
+ - agent_name
407
+ - direction
408
+ - llm_model
409
+ - tts_provider
410
+ - tts_model
411
+ - language
412
+ - tts_voice_id
413
+ - stt_model
414
+ - transfer_phone_number
415
+ - background_sounds
416
+ - created_at
417
+ - updated_at
418
+ - phone_number
419
+ - dial_pad
420
+ - end_call
421
+ additionalProperties: false
422
+ required:
423
+ - agent
424
+ additionalProperties: false
425
+ message:
426
+ type: string
427
+ required:
428
+ - data
429
+ - message
430
+ additionalProperties: false
431
+ "400":
432
+ description: Bad request
433
+ content:
434
+ application/json:
435
+ schema:
436
+ $ref: "#/components/schemas/ErrorResponse"
437
+ "401":
438
+ description: Unauthorized
439
+ content:
440
+ application/json:
441
+ schema:
442
+ $ref: "#/components/schemas/ErrorResponse"
443
+ "500":
444
+ description: Internal server error
445
+ content:
446
+ application/json:
447
+ schema:
448
+ $ref: "#/components/schemas/ErrorResponse"
449
+ /v1/agents/{id}:
450
+ get:
451
+ summary: Get agent
452
+ description: Retrieve a single agent by ID.
453
+ operationId: getAgent
454
+ tags:
455
+ - Agents
456
+ parameters:
457
+ - in: path
458
+ name: id
459
+ schema:
460
+ type: string
461
+ minLength: 1
462
+ description: Agent ID
463
+ example: 550e8400-e29b-41d4-a716-446655440000
464
+ required: true
465
+ description: Agent ID
466
+ responses:
467
+ "200":
468
+ description: Agent details
469
+ content:
470
+ application/json:
471
+ schema:
472
+ type: object
473
+ properties:
474
+ data:
475
+ type: object
476
+ properties:
477
+ agent:
478
+ type: object
479
+ properties:
480
+ id:
481
+ type: string
482
+ tenant_id:
483
+ type: string
484
+ agent_name:
485
+ type: string
486
+ direction:
487
+ type: string
488
+ enum:
489
+ - INBOUND
490
+ - OUTBOUND
491
+ llm_model:
492
+ type: string
493
+ enum:
494
+ - GPT4.1
495
+ - AZURE-GPT4o
496
+ - AZURE-GPT4.1
497
+ - GPT-5
498
+ - GPT-5-low
499
+ - GPT-5-high
500
+ - GPT-5.1-chat-latest
501
+ - GPT-5.1-no-reasoning
502
+ - GEMINI-1.5-flash
503
+ - GEMINI-2.5-flash
504
+ - GEMINI-2.5-flash-lite
505
+ - GEMINI-3-flash
506
+ tts_provider:
507
+ type: string
508
+ enum:
509
+ - elevenlabs
510
+ - cartesia
511
+ - google
512
+ tts_model:
513
+ type: string
514
+ enum:
515
+ - eleven_flash_v2_5
516
+ - eleven_turbo_v2_5
517
+ - sonic-multilingual
518
+ - sonic-3
519
+ - chirp_3
520
+ language:
521
+ type: string
522
+ enum:
523
+ - en-US
524
+ - de-DE
525
+ tts_voice_id:
526
+ type: string
527
+ stt_model:
528
+ type: string
529
+ enum:
530
+ - DEEPGRAM-NOVA-2-GENERAL
531
+ - DEEPGRAM-NOVA-3-GENERAL
532
+ - AWS-TRANSCRIBE
533
+ transfer_phone_number:
534
+ anyOf:
535
+ - type: string
536
+ - type: "null"
537
+ background_sounds:
538
+ type: string
539
+ enum:
540
+ - enabled
541
+ - disabled
542
+ created_at:
543
+ type: string
544
+ format: date-time
545
+ updated_at:
546
+ type: string
547
+ format: date-time
548
+ phone_number:
549
+ anyOf:
550
+ - type: string
551
+ - type: "null"
552
+ dial_pad:
553
+ type: boolean
554
+ end_call:
555
+ type: boolean
556
+ required:
557
+ - id
558
+ - tenant_id
559
+ - agent_name
560
+ - direction
561
+ - llm_model
562
+ - tts_provider
563
+ - tts_model
564
+ - language
565
+ - tts_voice_id
566
+ - stt_model
567
+ - transfer_phone_number
568
+ - background_sounds
569
+ - created_at
570
+ - updated_at
571
+ - phone_number
572
+ - dial_pad
573
+ - end_call
574
+ additionalProperties: false
575
+ required:
576
+ - agent
577
+ additionalProperties: false
578
+ message:
579
+ type: string
580
+ required:
581
+ - data
582
+ - message
583
+ additionalProperties: false
584
+ "400":
585
+ description: Bad request
586
+ content:
587
+ application/json:
588
+ schema:
589
+ $ref: "#/components/schemas/ErrorResponse"
590
+ "401":
591
+ description: Unauthorized
592
+ content:
593
+ application/json:
594
+ schema:
595
+ $ref: "#/components/schemas/ErrorResponse"
596
+ "404":
597
+ description: Not found
598
+ content:
599
+ application/json:
600
+ schema:
601
+ $ref: "#/components/schemas/ErrorResponse"
602
+ "500":
603
+ description: Internal server error
604
+ content:
605
+ application/json:
606
+ schema:
607
+ $ref: "#/components/schemas/ErrorResponse"
608
+ /v1/auth/sign-up:
609
+ post:
610
+ tags:
611
+ - Auth
612
+ security: []
613
+ requestBody:
614
+ content:
615
+ application/json:
616
+ schema:
617
+ type: object
618
+ properties:
619
+ email:
620
+ type: string
621
+ format: email
622
+ pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
623
+ password:
624
+ type: string
625
+ required:
626
+ - email
627
+ - password
628
+ responses:
629
+ "200":
630
+ description: Success
631
+ content:
632
+ application/json:
633
+ schema:
634
+ type: object
635
+ properties:
636
+ data:
637
+ type: object
638
+ properties: {}
639
+ additionalProperties: false
640
+ message:
641
+ type: string
642
+ required:
643
+ - data
644
+ - message
645
+ additionalProperties: false
646
+ "400":
647
+ description: Bad request
648
+ content:
649
+ application/json:
650
+ schema:
651
+ $ref: "#/components/schemas/ErrorResponse"
652
+ "401":
653
+ description: Unauthorized
654
+ content:
655
+ application/json:
656
+ schema:
657
+ $ref: "#/components/schemas/ErrorResponse"
658
+ "500":
659
+ description: Internal server error
660
+ content:
661
+ application/json:
662
+ schema:
663
+ $ref: "#/components/schemas/ErrorResponse"
664
+ /v1/auth/sign-in:
665
+ post:
666
+ tags:
667
+ - Auth
668
+ security: []
669
+ requestBody:
670
+ content:
671
+ application/json:
672
+ schema:
673
+ oneOf:
674
+ - type: object
675
+ properties:
676
+ type:
677
+ type: string
678
+ const: password
679
+ email:
680
+ type: string
681
+ password:
682
+ type: string
683
+ required:
684
+ - type
685
+ - email
686
+ - password
687
+ - type: object
688
+ properties:
689
+ type:
690
+ type: string
691
+ const: oauth
692
+ code:
693
+ type: string
694
+ verifier:
695
+ type: string
696
+ required:
697
+ - type
698
+ - code
699
+ - verifier
700
+ - type: object
701
+ properties:
702
+ type:
703
+ type: string
704
+ const: email_otp
705
+ email:
706
+ type: string
707
+ format: email
708
+ pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
709
+ token:
710
+ type: string
711
+ minLength: 1
712
+ required:
713
+ - type
714
+ - email
715
+ - token
716
+ type: object
717
+ responses:
718
+ "200":
719
+ description: Success
720
+ content:
721
+ application/json:
722
+ schema:
723
+ type: object
724
+ properties:
725
+ data:
726
+ type: object
727
+ properties:
728
+ access_token:
729
+ type: string
730
+ refresh_token:
731
+ type: string
732
+ expires_at:
733
+ type: string
734
+ format: date-time
735
+ required:
736
+ - access_token
737
+ - refresh_token
738
+ - expires_at
739
+ additionalProperties: false
740
+ message:
741
+ type: string
742
+ required:
743
+ - data
744
+ - message
745
+ additionalProperties: false
746
+ "400":
747
+ description: Bad request
748
+ content:
749
+ application/json:
750
+ schema:
751
+ $ref: "#/components/schemas/ErrorResponse"
752
+ "401":
753
+ description: Unauthorized
754
+ content:
755
+ application/json:
756
+ schema:
757
+ $ref: "#/components/schemas/ErrorResponse"
758
+ "500":
759
+ description: Internal server error
760
+ content:
761
+ application/json:
762
+ schema:
763
+ $ref: "#/components/schemas/ErrorResponse"
764
+ /v1/auth/refresh-token:
765
+ post:
766
+ tags:
767
+ - Auth
768
+ security: []
769
+ requestBody:
770
+ content:
771
+ application/json:
772
+ schema:
773
+ type: object
774
+ properties:
775
+ access_token:
776
+ type: string
777
+ refresh_token:
778
+ type: string
779
+ required:
780
+ - access_token
781
+ - refresh_token
782
+ responses:
783
+ "200":
784
+ description: Success
785
+ content:
786
+ application/json:
787
+ schema:
788
+ type: object
789
+ properties:
790
+ data:
791
+ type: object
792
+ properties:
793
+ access_token:
794
+ type: string
795
+ refresh_token:
796
+ type: string
797
+ expires_at:
798
+ type: string
799
+ format: date-time
800
+ required:
801
+ - access_token
802
+ - refresh_token
803
+ - expires_at
804
+ additionalProperties: false
805
+ message:
806
+ type: string
807
+ required:
808
+ - data
809
+ - message
810
+ additionalProperties: false
811
+ "400":
812
+ description: Bad request
813
+ content:
814
+ application/json:
815
+ schema:
816
+ $ref: "#/components/schemas/ErrorResponse"
817
+ "401":
818
+ description: Unauthorized
819
+ content:
820
+ application/json:
821
+ schema:
822
+ $ref: "#/components/schemas/ErrorResponse"
823
+ "500":
824
+ description: Internal server error
825
+ content:
826
+ application/json:
827
+ schema:
828
+ $ref: "#/components/schemas/ErrorResponse"
829
+ /v1/auth/oauth-url:
830
+ get:
831
+ tags:
832
+ - Auth
833
+ security: []
834
+ parameters:
835
+ - in: query
836
+ name: provider
837
+ schema:
838
+ type: string
839
+ enum:
840
+ - google
841
+ - microsoft
842
+ required: true
843
+ - in: query
844
+ name: redirect_uri
845
+ schema:
846
+ type: string
847
+ format: uri
848
+ required: true
849
+ - in: query
850
+ name: code_challenge_method
851
+ schema:
852
+ type: string
853
+ enum:
854
+ - plain
855
+ - s256
856
+ required: true
857
+ - in: query
858
+ name: code_challenge
859
+ schema:
860
+ type: string
861
+ minLength: 1
862
+ required: true
863
+ responses:
864
+ "200":
865
+ description: Success
866
+ content:
867
+ application/json:
868
+ schema:
869
+ type: object
870
+ properties:
871
+ data:
872
+ type: object
873
+ properties:
874
+ url:
875
+ type: string
876
+ format: uri
877
+ required:
878
+ - url
879
+ additionalProperties: false
880
+ message:
881
+ type: string
882
+ required:
883
+ - data
884
+ - message
885
+ additionalProperties: false
886
+ "400":
887
+ description: Bad request
888
+ content:
889
+ application/json:
890
+ schema:
891
+ $ref: "#/components/schemas/ErrorResponse"
892
+ "401":
893
+ description: Unauthorized
894
+ content:
895
+ application/json:
896
+ schema:
897
+ $ref: "#/components/schemas/ErrorResponse"
898
+ "500":
899
+ description: Internal server error
900
+ content:
901
+ application/json:
902
+ schema:
903
+ $ref: "#/components/schemas/ErrorResponse"
904
+ components:
905
+ schemas:
906
+ ErrorResponse:
907
+ type: object
908
+ properties:
909
+ data:
910
+ type: object
911
+ properties: {}
912
+ additionalProperties: false
913
+ message:
914
+ type: string
915
+ description: Human-readable error message
916
+ required:
917
+ - data
918
+ - message
919
+ additionalProperties: false
920
+ securitySchemes:
921
+ ApiKeyAuth:
922
+ type: apiKey
923
+ in: header
924
+ name: x-api-key
925
+ description: API key for authentication