@avallon-labs/sdk 0.0.0-40188bf9

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,1259 @@
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
+ "409":
177
+ description: Conflict
178
+ content:
179
+ application/json:
180
+ schema:
181
+ $ref: "#/components/schemas/ErrorResponse"
182
+ "500":
183
+ description: Internal server error
184
+ content:
185
+ application/json:
186
+ schema:
187
+ $ref: "#/components/schemas/ErrorResponse"
188
+ post:
189
+ summary: Create agent
190
+ description: |-
191
+ Create a new voice agent with the specified configuration.
192
+
193
+ **Required fields:**
194
+
195
+ All fields in the request body are required except `phone_number_id` and `transfer_phone_number`.
196
+
197
+ **Response:**
198
+
199
+ Returns the created agent with its ID and configuration.
200
+ operationId: createAgent
201
+ tags:
202
+ - Agents
203
+ requestBody:
204
+ content:
205
+ application/json:
206
+ schema:
207
+ type: object
208
+ properties:
209
+ agent_name:
210
+ type: string
211
+ minLength: 1
212
+ description: Name for the agent
213
+ example: customer-support-agent
214
+ direction:
215
+ type: string
216
+ enum:
217
+ - OUTBOUND
218
+ - INBOUND
219
+ description: Call direction the agent handles
220
+ example: INBOUND
221
+ llm_model:
222
+ type: string
223
+ enum:
224
+ - GPT4.1
225
+ - AZURE-GPT4o
226
+ - AZURE-GPT4.1
227
+ - GPT-5
228
+ - GPT-5-low
229
+ - GPT-5-high
230
+ - GPT-5.1-chat-latest
231
+ - GPT-5.1-no-reasoning
232
+ - GEMINI-1.5-flash
233
+ - GEMINI-2.5-flash
234
+ - GEMINI-2.5-flash-lite
235
+ - GEMINI-3-flash
236
+ description: LLM model for conversation
237
+ example: GPT-5
238
+ tts_provider:
239
+ type: string
240
+ enum:
241
+ - elevenlabs
242
+ - cartesia
243
+ - google
244
+ description: Text-to-speech provider
245
+ example: elevenlabs
246
+ tts_model:
247
+ type: string
248
+ enum:
249
+ - eleven_flash_v2_5
250
+ - eleven_turbo_v2_5
251
+ - sonic-multilingual
252
+ - sonic-3
253
+ - chirp_3
254
+ description: Text-to-speech model
255
+ example: eleven_flash_v2_5
256
+ tts_voice_id:
257
+ anyOf:
258
+ - anyOf:
259
+ - type: string
260
+ enum:
261
+ - Achernar
262
+ - Achird
263
+ - type: string
264
+ enum:
265
+ - v3V1d2rk6528UrLKRuy8
266
+ - type: string
267
+ enum:
268
+ - 5c42302c-194b-4d0c-ba1a-8cb485c84ab9
269
+ - e8e5fffb-252c-436d-b842-8879b84445b6
270
+ - f786b574-daa5-4673-aa0c-cbe3e8534c02
271
+ - 8d8ce8c9-44a4-46c4-b10f-9a927b99a853
272
+ - 5ee9feff-1265-424a-9d7f-8e4d431a12c7
273
+ - b9de4a89-2257-424b-94c2-db18ba68c81a
274
+ description: Voice ID from the TTS provider
275
+ example: 21m00Tcm4TlvDq8ikWAM
276
+ stt_model:
277
+ type: string
278
+ enum:
279
+ - DEEPGRAM-NOVA-2-GENERAL
280
+ - DEEPGRAM-NOVA-3-GENERAL
281
+ - AWS-TRANSCRIBE
282
+ description: Speech-to-text model
283
+ example: DEEPGRAM-NOVA-3-GENERAL
284
+ transfer_phone_number:
285
+ anyOf:
286
+ - type: string
287
+ - type: "null"
288
+ description: Phone number to transfer calls to
289
+ example: null
290
+ phone_number_id:
291
+ description: ID of phone number to assign to agent
292
+ example: pn_123456
293
+ type: string
294
+ language:
295
+ type: string
296
+ enum:
297
+ - en-US
298
+ - de-DE
299
+ description: Language for the agent
300
+ example: en-US
301
+ dial_pad:
302
+ description: Whether the agent supports DTMF dial pad input
303
+ example: false
304
+ type: boolean
305
+ end_call:
306
+ description: Whether the agent can end the call
307
+ example: false
308
+ type: boolean
309
+ required:
310
+ - agent_name
311
+ - direction
312
+ - llm_model
313
+ - tts_provider
314
+ - tts_model
315
+ - tts_voice_id
316
+ - stt_model
317
+ - transfer_phone_number
318
+ - language
319
+ responses:
320
+ "200":
321
+ description: Created agent
322
+ content:
323
+ application/json:
324
+ schema:
325
+ type: object
326
+ properties:
327
+ data:
328
+ type: object
329
+ properties:
330
+ agent:
331
+ type: object
332
+ properties:
333
+ id:
334
+ type: string
335
+ tenant_id:
336
+ type: string
337
+ agent_name:
338
+ type: string
339
+ direction:
340
+ type: string
341
+ enum:
342
+ - INBOUND
343
+ - OUTBOUND
344
+ llm_model:
345
+ type: string
346
+ enum:
347
+ - GPT4.1
348
+ - AZURE-GPT4o
349
+ - AZURE-GPT4.1
350
+ - GPT-5
351
+ - GPT-5-low
352
+ - GPT-5-high
353
+ - GPT-5.1-chat-latest
354
+ - GPT-5.1-no-reasoning
355
+ - GEMINI-1.5-flash
356
+ - GEMINI-2.5-flash
357
+ - GEMINI-2.5-flash-lite
358
+ - GEMINI-3-flash
359
+ tts_provider:
360
+ type: string
361
+ enum:
362
+ - elevenlabs
363
+ - cartesia
364
+ - google
365
+ tts_model:
366
+ type: string
367
+ enum:
368
+ - eleven_flash_v2_5
369
+ - eleven_turbo_v2_5
370
+ - sonic-multilingual
371
+ - sonic-3
372
+ - chirp_3
373
+ language:
374
+ type: string
375
+ enum:
376
+ - en-US
377
+ - de-DE
378
+ tts_voice_id:
379
+ type: string
380
+ stt_model:
381
+ type: string
382
+ enum:
383
+ - DEEPGRAM-NOVA-2-GENERAL
384
+ - DEEPGRAM-NOVA-3-GENERAL
385
+ - AWS-TRANSCRIBE
386
+ transfer_phone_number:
387
+ anyOf:
388
+ - type: string
389
+ - type: "null"
390
+ background_sounds:
391
+ type: string
392
+ enum:
393
+ - enabled
394
+ - disabled
395
+ created_at:
396
+ type: string
397
+ format: date-time
398
+ updated_at:
399
+ type: string
400
+ format: date-time
401
+ phone_number:
402
+ anyOf:
403
+ - type: string
404
+ - type: "null"
405
+ dial_pad:
406
+ type: boolean
407
+ end_call:
408
+ type: boolean
409
+ required:
410
+ - id
411
+ - tenant_id
412
+ - agent_name
413
+ - direction
414
+ - llm_model
415
+ - tts_provider
416
+ - tts_model
417
+ - language
418
+ - tts_voice_id
419
+ - stt_model
420
+ - transfer_phone_number
421
+ - background_sounds
422
+ - created_at
423
+ - updated_at
424
+ - phone_number
425
+ - dial_pad
426
+ - end_call
427
+ additionalProperties: false
428
+ required:
429
+ - agent
430
+ additionalProperties: false
431
+ message:
432
+ type: string
433
+ required:
434
+ - data
435
+ - message
436
+ additionalProperties: false
437
+ "400":
438
+ description: Bad request
439
+ content:
440
+ application/json:
441
+ schema:
442
+ $ref: "#/components/schemas/ErrorResponse"
443
+ "401":
444
+ description: Unauthorized
445
+ content:
446
+ application/json:
447
+ schema:
448
+ $ref: "#/components/schemas/ErrorResponse"
449
+ "409":
450
+ description: Conflict
451
+ content:
452
+ application/json:
453
+ schema:
454
+ $ref: "#/components/schemas/ErrorResponse"
455
+ "500":
456
+ description: Internal server error
457
+ content:
458
+ application/json:
459
+ schema:
460
+ $ref: "#/components/schemas/ErrorResponse"
461
+ /v1/agents/{id}:
462
+ get:
463
+ summary: Get agent
464
+ description: Retrieve a single agent by ID.
465
+ operationId: getAgent
466
+ tags:
467
+ - Agents
468
+ parameters:
469
+ - in: path
470
+ name: id
471
+ schema:
472
+ type: string
473
+ minLength: 1
474
+ description: Agent ID
475
+ example: 550e8400-e29b-41d4-a716-446655440000
476
+ required: true
477
+ description: Agent ID
478
+ responses:
479
+ "200":
480
+ description: Agent details
481
+ content:
482
+ application/json:
483
+ schema:
484
+ type: object
485
+ properties:
486
+ data:
487
+ type: object
488
+ properties:
489
+ agent:
490
+ type: object
491
+ properties:
492
+ id:
493
+ type: string
494
+ tenant_id:
495
+ type: string
496
+ agent_name:
497
+ type: string
498
+ direction:
499
+ type: string
500
+ enum:
501
+ - INBOUND
502
+ - OUTBOUND
503
+ llm_model:
504
+ type: string
505
+ enum:
506
+ - GPT4.1
507
+ - AZURE-GPT4o
508
+ - AZURE-GPT4.1
509
+ - GPT-5
510
+ - GPT-5-low
511
+ - GPT-5-high
512
+ - GPT-5.1-chat-latest
513
+ - GPT-5.1-no-reasoning
514
+ - GEMINI-1.5-flash
515
+ - GEMINI-2.5-flash
516
+ - GEMINI-2.5-flash-lite
517
+ - GEMINI-3-flash
518
+ tts_provider:
519
+ type: string
520
+ enum:
521
+ - elevenlabs
522
+ - cartesia
523
+ - google
524
+ tts_model:
525
+ type: string
526
+ enum:
527
+ - eleven_flash_v2_5
528
+ - eleven_turbo_v2_5
529
+ - sonic-multilingual
530
+ - sonic-3
531
+ - chirp_3
532
+ language:
533
+ type: string
534
+ enum:
535
+ - en-US
536
+ - de-DE
537
+ tts_voice_id:
538
+ type: string
539
+ stt_model:
540
+ type: string
541
+ enum:
542
+ - DEEPGRAM-NOVA-2-GENERAL
543
+ - DEEPGRAM-NOVA-3-GENERAL
544
+ - AWS-TRANSCRIBE
545
+ transfer_phone_number:
546
+ anyOf:
547
+ - type: string
548
+ - type: "null"
549
+ background_sounds:
550
+ type: string
551
+ enum:
552
+ - enabled
553
+ - disabled
554
+ created_at:
555
+ type: string
556
+ format: date-time
557
+ updated_at:
558
+ type: string
559
+ format: date-time
560
+ phone_number:
561
+ anyOf:
562
+ - type: string
563
+ - type: "null"
564
+ dial_pad:
565
+ type: boolean
566
+ end_call:
567
+ type: boolean
568
+ required:
569
+ - id
570
+ - tenant_id
571
+ - agent_name
572
+ - direction
573
+ - llm_model
574
+ - tts_provider
575
+ - tts_model
576
+ - language
577
+ - tts_voice_id
578
+ - stt_model
579
+ - transfer_phone_number
580
+ - background_sounds
581
+ - created_at
582
+ - updated_at
583
+ - phone_number
584
+ - dial_pad
585
+ - end_call
586
+ additionalProperties: false
587
+ required:
588
+ - agent
589
+ additionalProperties: false
590
+ message:
591
+ type: string
592
+ required:
593
+ - data
594
+ - message
595
+ additionalProperties: false
596
+ "400":
597
+ description: Bad request
598
+ content:
599
+ application/json:
600
+ schema:
601
+ $ref: "#/components/schemas/ErrorResponse"
602
+ "401":
603
+ description: Unauthorized
604
+ content:
605
+ application/json:
606
+ schema:
607
+ $ref: "#/components/schemas/ErrorResponse"
608
+ "404":
609
+ description: Not found
610
+ content:
611
+ application/json:
612
+ schema:
613
+ $ref: "#/components/schemas/ErrorResponse"
614
+ "409":
615
+ description: Conflict
616
+ content:
617
+ application/json:
618
+ schema:
619
+ $ref: "#/components/schemas/ErrorResponse"
620
+ "500":
621
+ description: Internal server error
622
+ content:
623
+ application/json:
624
+ schema:
625
+ $ref: "#/components/schemas/ErrorResponse"
626
+ /platform/api-keys:
627
+ get:
628
+ summary: List API keys
629
+ description: |-
630
+ List all API keys for your tenant.
631
+
632
+ By default, revoked keys are excluded. Set `include_revoked=true` to include them.
633
+
634
+ **Note:** The full API key value is never returned — only the key prefix is shown.
635
+ operationId: listApiKeys
636
+ tags:
637
+ - API Keys
638
+ parameters:
639
+ - in: query
640
+ name: include_revoked
641
+ schema:
642
+ description: Include revoked keys in the response
643
+ type: string
644
+ enum:
645
+ - "true"
646
+ - "false"
647
+ description: Include revoked keys in the response
648
+ responses:
649
+ "200":
650
+ description: List of API keys
651
+ content:
652
+ application/json:
653
+ schema:
654
+ type: object
655
+ properties:
656
+ data:
657
+ type: object
658
+ properties:
659
+ data:
660
+ type: array
661
+ items:
662
+ type: object
663
+ properties:
664
+ id:
665
+ type: string
666
+ description: Unique identifier for the API key
667
+ name:
668
+ type: string
669
+ description: Human-readable name for the API key
670
+ key_prefix:
671
+ type: string
672
+ description: First 12 characters of the key (e.g. ak_live_abc1)
673
+ last_used_at:
674
+ description: Last usage timestamp, if ever used
675
+ type: string
676
+ format: date-time
677
+ expires_at:
678
+ description: Expiration date, if set
679
+ type: string
680
+ format: date-time
681
+ revoked_at:
682
+ description: Revocation timestamp, if revoked
683
+ type: string
684
+ format: date-time
685
+ created_at:
686
+ type: string
687
+ format: date-time
688
+ description: Creation timestamp
689
+ updated_at:
690
+ type: string
691
+ format: date-time
692
+ description: Last update timestamp
693
+ required:
694
+ - id
695
+ - name
696
+ - key_prefix
697
+ - created_at
698
+ - updated_at
699
+ additionalProperties: false
700
+ count:
701
+ type: number
702
+ description: Total number of keys returned
703
+ required:
704
+ - data
705
+ - count
706
+ additionalProperties: false
707
+ message:
708
+ type: string
709
+ required:
710
+ - data
711
+ - message
712
+ additionalProperties: false
713
+ "400":
714
+ description: Bad request
715
+ content:
716
+ application/json:
717
+ schema:
718
+ $ref: "#/components/schemas/ErrorResponse"
719
+ "401":
720
+ description: Unauthorized
721
+ content:
722
+ application/json:
723
+ schema:
724
+ $ref: "#/components/schemas/ErrorResponse"
725
+ "409":
726
+ description: Conflict
727
+ content:
728
+ application/json:
729
+ schema:
730
+ $ref: "#/components/schemas/ErrorResponse"
731
+ "500":
732
+ description: Internal server error
733
+ content:
734
+ application/json:
735
+ schema:
736
+ $ref: "#/components/schemas/ErrorResponse"
737
+ post:
738
+ summary: Create an API key
739
+ description: >-
740
+ Create a new API key for authenticating with the Avallon API.
741
+
742
+
743
+ **Important:** The full API key is only returned once in the response. Store it securely — it cannot be
744
+ retrieved again.
745
+
746
+
747
+ Keys are scoped to an environment (`test` or `live`) and optionally accept an expiration date.
748
+ operationId: createApiKey
749
+ tags:
750
+ - API Keys
751
+ requestBody:
752
+ content:
753
+ application/json:
754
+ schema:
755
+ type: object
756
+ properties:
757
+ name:
758
+ type: string
759
+ minLength: 1
760
+ maxLength: 100
761
+ description: Human-readable name for the API key
762
+ expires_at:
763
+ description: Optional expiration date (ISO 8601)
764
+ type: string
765
+ format: date-time
766
+ environment:
767
+ default: live
768
+ description: Target environment for the key
769
+ type: string
770
+ enum:
771
+ - test
772
+ - live
773
+ required:
774
+ - name
775
+ responses:
776
+ "200":
777
+ description: The created API key (includes the full key — only shown once)
778
+ content:
779
+ application/json:
780
+ schema:
781
+ type: object
782
+ properties:
783
+ data:
784
+ type: object
785
+ properties:
786
+ id:
787
+ type: string
788
+ description: Unique identifier for the API key
789
+ name:
790
+ type: string
791
+ description: Human-readable name for the API key
792
+ key_prefix:
793
+ type: string
794
+ description: First 12 characters of the key (e.g. ak_live_abc1)
795
+ expires_at:
796
+ description: Expiration date, if set
797
+ type: string
798
+ format: date-time
799
+ created_at:
800
+ type: string
801
+ format: date-time
802
+ description: Creation timestamp
803
+ api_key:
804
+ type: string
805
+ description: The full API key — only returned once at creation
806
+ required:
807
+ - id
808
+ - name
809
+ - key_prefix
810
+ - created_at
811
+ - api_key
812
+ additionalProperties: false
813
+ message:
814
+ type: string
815
+ required:
816
+ - data
817
+ - message
818
+ additionalProperties: false
819
+ "400":
820
+ description: Bad request
821
+ content:
822
+ application/json:
823
+ schema:
824
+ $ref: "#/components/schemas/ErrorResponse"
825
+ "401":
826
+ description: Unauthorized
827
+ content:
828
+ application/json:
829
+ schema:
830
+ $ref: "#/components/schemas/ErrorResponse"
831
+ "409":
832
+ description: Conflict
833
+ content:
834
+ application/json:
835
+ schema:
836
+ $ref: "#/components/schemas/ErrorResponse"
837
+ "500":
838
+ description: Internal server error
839
+ content:
840
+ application/json:
841
+ schema:
842
+ $ref: "#/components/schemas/ErrorResponse"
843
+ /platform/api-keys/{id}/revoke:
844
+ post:
845
+ summary: Revoke an API key
846
+ description: |-
847
+ Revoke an existing API key. Once revoked, the key can no longer be used for authentication.
848
+
849
+ This operation is irreversible — revoked keys cannot be re-enabled. Create a new key if needed.
850
+
851
+ Returns 409 if the key is already revoked, 404 if the key does not exist.
852
+ operationId: revokeApiKey
853
+ tags:
854
+ - API Keys
855
+ parameters:
856
+ - in: path
857
+ name: id
858
+ schema:
859
+ type: string
860
+ format: uuid
861
+ pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
862
+ description: The API key ID to revoke
863
+ required: true
864
+ description: The API key ID to revoke
865
+ responses:
866
+ "200":
867
+ description: Revocation confirmation
868
+ content:
869
+ application/json:
870
+ schema:
871
+ type: object
872
+ properties:
873
+ data:
874
+ type: object
875
+ properties:
876
+ message:
877
+ type: string
878
+ description: Confirmation message
879
+ required:
880
+ - message
881
+ additionalProperties: false
882
+ message:
883
+ type: string
884
+ required:
885
+ - data
886
+ - message
887
+ additionalProperties: false
888
+ "400":
889
+ description: Bad request
890
+ content:
891
+ application/json:
892
+ schema:
893
+ $ref: "#/components/schemas/ErrorResponse"
894
+ "401":
895
+ description: Unauthorized
896
+ content:
897
+ application/json:
898
+ schema:
899
+ $ref: "#/components/schemas/ErrorResponse"
900
+ "404":
901
+ description: Not found
902
+ content:
903
+ application/json:
904
+ schema:
905
+ $ref: "#/components/schemas/ErrorResponse"
906
+ "409":
907
+ description: Conflict
908
+ content:
909
+ application/json:
910
+ schema:
911
+ $ref: "#/components/schemas/ErrorResponse"
912
+ "500":
913
+ description: Internal server error
914
+ content:
915
+ application/json:
916
+ schema:
917
+ $ref: "#/components/schemas/ErrorResponse"
918
+ /v1/auth/sign-up:
919
+ post:
920
+ tags:
921
+ - Auth
922
+ security: []
923
+ requestBody:
924
+ content:
925
+ application/json:
926
+ schema:
927
+ type: object
928
+ properties:
929
+ email:
930
+ type: string
931
+ format: email
932
+ pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
933
+ password:
934
+ type: string
935
+ required:
936
+ - email
937
+ - password
938
+ responses:
939
+ "200":
940
+ description: Success
941
+ content:
942
+ application/json:
943
+ schema:
944
+ type: object
945
+ properties:
946
+ data:
947
+ type: object
948
+ properties: {}
949
+ additionalProperties: false
950
+ message:
951
+ type: string
952
+ required:
953
+ - data
954
+ - message
955
+ additionalProperties: false
956
+ "400":
957
+ description: Bad request
958
+ content:
959
+ application/json:
960
+ schema:
961
+ $ref: "#/components/schemas/ErrorResponse"
962
+ "401":
963
+ description: Unauthorized
964
+ content:
965
+ application/json:
966
+ schema:
967
+ $ref: "#/components/schemas/ErrorResponse"
968
+ "409":
969
+ description: Conflict
970
+ content:
971
+ application/json:
972
+ schema:
973
+ $ref: "#/components/schemas/ErrorResponse"
974
+ "500":
975
+ description: Internal server error
976
+ content:
977
+ application/json:
978
+ schema:
979
+ $ref: "#/components/schemas/ErrorResponse"
980
+ /v1/auth/sign-in:
981
+ post:
982
+ tags:
983
+ - Auth
984
+ security: []
985
+ requestBody:
986
+ content:
987
+ application/json:
988
+ schema:
989
+ oneOf:
990
+ - type: object
991
+ properties:
992
+ type:
993
+ type: string
994
+ const: password
995
+ email:
996
+ type: string
997
+ password:
998
+ type: string
999
+ required:
1000
+ - type
1001
+ - email
1002
+ - password
1003
+ - type: object
1004
+ properties:
1005
+ type:
1006
+ type: string
1007
+ const: oauth
1008
+ code:
1009
+ type: string
1010
+ verifier:
1011
+ type: string
1012
+ required:
1013
+ - type
1014
+ - code
1015
+ - verifier
1016
+ - type: object
1017
+ properties:
1018
+ type:
1019
+ type: string
1020
+ const: email_otp
1021
+ email:
1022
+ type: string
1023
+ format: email
1024
+ pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
1025
+ token:
1026
+ type: string
1027
+ minLength: 1
1028
+ required:
1029
+ - type
1030
+ - email
1031
+ - token
1032
+ type: object
1033
+ responses:
1034
+ "200":
1035
+ description: Success
1036
+ content:
1037
+ application/json:
1038
+ schema:
1039
+ type: object
1040
+ properties:
1041
+ data:
1042
+ type: object
1043
+ properties:
1044
+ access_token:
1045
+ type: string
1046
+ refresh_token:
1047
+ type: string
1048
+ expires_at:
1049
+ type: string
1050
+ format: date-time
1051
+ required:
1052
+ - access_token
1053
+ - refresh_token
1054
+ - expires_at
1055
+ additionalProperties: false
1056
+ message:
1057
+ type: string
1058
+ required:
1059
+ - data
1060
+ - message
1061
+ additionalProperties: false
1062
+ "400":
1063
+ description: Bad request
1064
+ content:
1065
+ application/json:
1066
+ schema:
1067
+ $ref: "#/components/schemas/ErrorResponse"
1068
+ "401":
1069
+ description: Unauthorized
1070
+ content:
1071
+ application/json:
1072
+ schema:
1073
+ $ref: "#/components/schemas/ErrorResponse"
1074
+ "409":
1075
+ description: Conflict
1076
+ content:
1077
+ application/json:
1078
+ schema:
1079
+ $ref: "#/components/schemas/ErrorResponse"
1080
+ "500":
1081
+ description: Internal server error
1082
+ content:
1083
+ application/json:
1084
+ schema:
1085
+ $ref: "#/components/schemas/ErrorResponse"
1086
+ /v1/auth/refresh-token:
1087
+ post:
1088
+ tags:
1089
+ - Auth
1090
+ security: []
1091
+ requestBody:
1092
+ content:
1093
+ application/json:
1094
+ schema:
1095
+ type: object
1096
+ properties:
1097
+ access_token:
1098
+ type: string
1099
+ refresh_token:
1100
+ type: string
1101
+ required:
1102
+ - access_token
1103
+ - refresh_token
1104
+ responses:
1105
+ "200":
1106
+ description: Success
1107
+ content:
1108
+ application/json:
1109
+ schema:
1110
+ type: object
1111
+ properties:
1112
+ data:
1113
+ type: object
1114
+ properties:
1115
+ access_token:
1116
+ type: string
1117
+ refresh_token:
1118
+ type: string
1119
+ expires_at:
1120
+ type: string
1121
+ format: date-time
1122
+ required:
1123
+ - access_token
1124
+ - refresh_token
1125
+ - expires_at
1126
+ additionalProperties: false
1127
+ message:
1128
+ type: string
1129
+ required:
1130
+ - data
1131
+ - message
1132
+ additionalProperties: false
1133
+ "400":
1134
+ description: Bad request
1135
+ content:
1136
+ application/json:
1137
+ schema:
1138
+ $ref: "#/components/schemas/ErrorResponse"
1139
+ "401":
1140
+ description: Unauthorized
1141
+ content:
1142
+ application/json:
1143
+ schema:
1144
+ $ref: "#/components/schemas/ErrorResponse"
1145
+ "409":
1146
+ description: Conflict
1147
+ content:
1148
+ application/json:
1149
+ schema:
1150
+ $ref: "#/components/schemas/ErrorResponse"
1151
+ "500":
1152
+ description: Internal server error
1153
+ content:
1154
+ application/json:
1155
+ schema:
1156
+ $ref: "#/components/schemas/ErrorResponse"
1157
+ /v1/auth/oauth-url:
1158
+ get:
1159
+ tags:
1160
+ - Auth
1161
+ security: []
1162
+ parameters:
1163
+ - in: query
1164
+ name: provider
1165
+ schema:
1166
+ type: string
1167
+ enum:
1168
+ - google
1169
+ - microsoft
1170
+ required: true
1171
+ - in: query
1172
+ name: redirect_uri
1173
+ schema:
1174
+ type: string
1175
+ format: uri
1176
+ required: true
1177
+ - in: query
1178
+ name: code_challenge_method
1179
+ schema:
1180
+ type: string
1181
+ enum:
1182
+ - plain
1183
+ - s256
1184
+ required: true
1185
+ - in: query
1186
+ name: code_challenge
1187
+ schema:
1188
+ type: string
1189
+ minLength: 1
1190
+ required: true
1191
+ responses:
1192
+ "200":
1193
+ description: Success
1194
+ content:
1195
+ application/json:
1196
+ schema:
1197
+ type: object
1198
+ properties:
1199
+ data:
1200
+ type: object
1201
+ properties:
1202
+ url:
1203
+ type: string
1204
+ format: uri
1205
+ required:
1206
+ - url
1207
+ additionalProperties: false
1208
+ message:
1209
+ type: string
1210
+ required:
1211
+ - data
1212
+ - message
1213
+ additionalProperties: false
1214
+ "400":
1215
+ description: Bad request
1216
+ content:
1217
+ application/json:
1218
+ schema:
1219
+ $ref: "#/components/schemas/ErrorResponse"
1220
+ "401":
1221
+ description: Unauthorized
1222
+ content:
1223
+ application/json:
1224
+ schema:
1225
+ $ref: "#/components/schemas/ErrorResponse"
1226
+ "409":
1227
+ description: Conflict
1228
+ content:
1229
+ application/json:
1230
+ schema:
1231
+ $ref: "#/components/schemas/ErrorResponse"
1232
+ "500":
1233
+ description: Internal server error
1234
+ content:
1235
+ application/json:
1236
+ schema:
1237
+ $ref: "#/components/schemas/ErrorResponse"
1238
+ components:
1239
+ schemas:
1240
+ ErrorResponse:
1241
+ type: object
1242
+ properties:
1243
+ data:
1244
+ type: object
1245
+ properties: {}
1246
+ additionalProperties: false
1247
+ message:
1248
+ type: string
1249
+ description: Human-readable error message
1250
+ required:
1251
+ - data
1252
+ - message
1253
+ additionalProperties: false
1254
+ securitySchemes:
1255
+ ApiKeyAuth:
1256
+ type: apiKey
1257
+ in: header
1258
+ name: x-api-key
1259
+ description: API key for authentication