@breign/client 1.0.0 → 1.0.2

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.
Files changed (77) hide show
  1. package/dist/apis/BrainApi.d.ts +290 -0
  2. package/dist/apis/BrainApi.js +637 -0
  3. package/dist/apis/index.d.ts +1 -0
  4. package/dist/apis/index.js +19 -0
  5. package/dist/index.d.ts +3 -0
  6. package/dist/index.js +21 -0
  7. package/dist/models/AdditionalUio.d.ts +44 -0
  8. package/dist/models/AdditionalUio.js +58 -0
  9. package/dist/models/BrainFlowCreateUio.d.ts +53 -0
  10. package/dist/models/BrainFlowCreateUio.js +57 -0
  11. package/dist/models/BrainFlowUio.d.ts +65 -0
  12. package/dist/models/BrainFlowUio.js +65 -0
  13. package/dist/models/BrainMetricsEventUio.d.ts +65 -0
  14. package/dist/models/BrainMetricsEventUio.js +69 -0
  15. package/dist/models/BrainMetricsOverviewUio.d.ts +64 -0
  16. package/dist/models/BrainMetricsOverviewUio.js +68 -0
  17. package/dist/models/BrainMetricsUnitsTypeUio.d.ts +27 -0
  18. package/dist/models/BrainMetricsUnitsTypeUio.js +53 -0
  19. package/dist/models/BrainMetricsValueUio.d.ts +57 -0
  20. package/dist/models/BrainMetricsValueUio.js +63 -0
  21. package/dist/models/BrainModuleTypeUio.d.ts +25 -0
  22. package/dist/models/BrainModuleTypeUio.js +51 -0
  23. package/dist/models/BrainModuleUio.d.ts +51 -0
  24. package/dist/models/BrainModuleUio.js +61 -0
  25. package/dist/models/BrainPatchUio.d.ts +166 -0
  26. package/dist/models/BrainPatchUio.js +108 -0
  27. package/dist/models/BrainRequestImageBrainUio.d.ts +50 -0
  28. package/dist/models/BrainRequestImageBrainUio.js +62 -0
  29. package/dist/models/BrainRequestUio.d.ts +114 -0
  30. package/dist/models/BrainRequestUio.js +88 -0
  31. package/dist/models/BrainSubscriptionTextInteractionsUio.d.ts +39 -0
  32. package/dist/models/BrainSubscriptionTextInteractionsUio.js +55 -0
  33. package/dist/models/BrainSubscriptionUio.d.ts +57 -0
  34. package/dist/models/BrainSubscriptionUio.js +63 -0
  35. package/dist/models/BrainUio.d.ts +166 -0
  36. package/dist/models/BrainUio.js +108 -0
  37. package/dist/models/BrainUsageMetricsIdUio.d.ts +44 -0
  38. package/dist/models/BrainUsageMetricsIdUio.js +52 -0
  39. package/dist/models/BrainUsageMetricsUio.d.ts +46 -0
  40. package/dist/models/BrainUsageMetricsUio.js +54 -0
  41. package/dist/models/ContentsToolsUio.d.ts +44 -0
  42. package/dist/models/ContentsToolsUio.js +52 -0
  43. package/dist/models/CostMetricUio.d.ts +45 -0
  44. package/dist/models/CostMetricUio.js +57 -0
  45. package/dist/models/EngineTypeUio.d.ts +25 -0
  46. package/dist/models/EngineTypeUio.js +51 -0
  47. package/dist/models/EngineUio.d.ts +41 -0
  48. package/dist/models/EngineUio.js +55 -0
  49. package/dist/models/FileCreationRequestUio.d.ts +50 -0
  50. package/dist/models/FileCreationRequestUio.js +62 -0
  51. package/dist/models/FileStatusUio.d.ts +25 -0
  52. package/dist/models/FileStatusUio.js +51 -0
  53. package/dist/models/FileUio.d.ts +75 -0
  54. package/dist/models/FileUio.js +79 -0
  55. package/dist/models/FlowContentsSuggestionUio.d.ts +38 -0
  56. package/dist/models/FlowContentsSuggestionUio.js +54 -0
  57. package/dist/models/FlowContentsUio.d.ts +64 -0
  58. package/dist/models/FlowContentsUio.js +60 -0
  59. package/dist/models/FlowEntrypointsUio.d.ts +38 -0
  60. package/dist/models/FlowEntrypointsUio.js +52 -0
  61. package/dist/models/FlowOptionsUio.d.ts +46 -0
  62. package/dist/models/FlowOptionsUio.js +54 -0
  63. package/dist/models/PersonaUio.d.ts +33 -0
  64. package/dist/models/PersonaUio.js +52 -0
  65. package/dist/models/PromptInitUio.d.ts +33 -0
  66. package/dist/models/PromptInitUio.js +52 -0
  67. package/dist/models/SubscriptionMetricUio.d.ts +56 -0
  68. package/dist/models/SubscriptionMetricUio.js +56 -0
  69. package/dist/models/TransactionUio.d.ts +38 -0
  70. package/dist/models/TransactionUio.js +54 -0
  71. package/dist/models/index.d.ts +32 -0
  72. package/dist/models/index.js +50 -0
  73. package/dist/openapi.json +1668 -0
  74. package/dist/runtime.d.ts +184 -0
  75. package/dist/runtime.js +338 -0
  76. package/package.json +11 -5
  77. package/README.md +0 -10
@@ -0,0 +1,1668 @@
1
+ {
2
+ "openapi" : "3.0.1",
3
+ "info" : {
4
+ "description" : "Api ands models for brain-app and brain-app",
5
+ "title" : "brain-client",
6
+ "version" : "0.0.0-SNAPSHOT"
7
+ },
8
+ "servers" : [ {
9
+ "description" : "Generated server url",
10
+ "url" : "http://localhost:8080/brain-client"
11
+ } ],
12
+ "tags" : [ {
13
+ "description" : "Brain management endpoints",
14
+ "name" : "brain"
15
+ } ],
16
+ "paths" : {
17
+ "/brains" : {
18
+ "get" : {
19
+ "description" : "Get all brains (admin only)",
20
+ "operationId" : "getBrains",
21
+ "responses" : {
22
+ "200" : {
23
+ "content" : {
24
+ "application/json" : {
25
+ "schema" : {
26
+ "items" : {
27
+ "$ref" : "#/components/schemas/Brain"
28
+ },
29
+ "type" : "array"
30
+ }
31
+ }
32
+ },
33
+ "description" : "Brains retrieved successfully"
34
+ }
35
+ },
36
+ "security" : [ {
37
+ "ApiKeyAuth" : [ ]
38
+ } ],
39
+ "summary" : "Get all brains",
40
+ "tags" : [ "brain" ]
41
+ },
42
+ "post" : {
43
+ "description" : "Creates a new brain with specified configuration (admin only)",
44
+ "operationId" : "createBrain",
45
+ "requestBody" : {
46
+ "content" : {
47
+ "application/json" : {
48
+ "schema" : {
49
+ "$ref" : "#/components/schemas/BrainRequest"
50
+ }
51
+ }
52
+ },
53
+ "required" : true
54
+ },
55
+ "responses" : {
56
+ "201" : {
57
+ "content" : {
58
+ "application/json" : {
59
+ "schema" : {
60
+ "$ref" : "#/components/schemas/Brain"
61
+ }
62
+ }
63
+ },
64
+ "description" : "Brain created successfully"
65
+ },
66
+ "400" : {
67
+ "description" : "Invalid request body"
68
+ },
69
+ "401" : {
70
+ "description" : "Unauthorized"
71
+ },
72
+ "403" : {
73
+ "description" : "Forbidden - User is not an admin"
74
+ }
75
+ },
76
+ "security" : [ {
77
+ "ApiKeyAuth" : [ ]
78
+ } ],
79
+ "summary" : "Create a new brain",
80
+ "tags" : [ "brain" ]
81
+ }
82
+ },
83
+ "/brains/{brainId}" : {
84
+ "delete" : {
85
+ "description" : "Deletes a brain and all its associated agents",
86
+ "operationId" : "deleteBrainById",
87
+ "parameters" : [ {
88
+ "description" : "ID of the brain",
89
+ "in" : "path",
90
+ "name" : "brainId",
91
+ "required" : true,
92
+ "schema" : {
93
+ "type" : "string"
94
+ }
95
+ } ],
96
+ "responses" : {
97
+ "204" : {
98
+ "description" : "Brain deleted successfully"
99
+ },
100
+ "401" : {
101
+ "description" : "Unauthorized"
102
+ },
103
+ "403" : {
104
+ "description" : "Forbidden - User doesn't have access to this brain"
105
+ },
106
+ "404" : {
107
+ "description" : "Brain not found"
108
+ }
109
+ },
110
+ "security" : [ {
111
+ "ApiKeyAuth" : [ ]
112
+ } ],
113
+ "summary" : "Delete a brain",
114
+ "tags" : [ "brain" ]
115
+ },
116
+ "get" : {
117
+ "operationId" : "getBrainById",
118
+ "parameters" : [ {
119
+ "description" : "ID of the brain",
120
+ "in" : "path",
121
+ "name" : "brainId",
122
+ "required" : true,
123
+ "schema" : {
124
+ "type" : "string"
125
+ }
126
+ } ],
127
+ "responses" : {
128
+ "200" : {
129
+ "content" : {
130
+ "application/json" : {
131
+ "schema" : {
132
+ "$ref" : "#/components/schemas/Brain"
133
+ }
134
+ }
135
+ },
136
+ "description" : "Brain details"
137
+ },
138
+ "404" : {
139
+ "description" : "Brain not found"
140
+ },
141
+ "401" : {
142
+ "description" : "Unauthorized"
143
+ },
144
+ "403" : {
145
+ "description" : "Forbidden - User cannot access this brain"
146
+ }
147
+ },
148
+ "security" : [ {
149
+ "ApiKeyAuth" : [ ]
150
+ } ],
151
+ "summary" : "Get a specific brain by ID",
152
+ "tags" : [ "brain" ]
153
+ },
154
+ "patch" : {
155
+ "description" : "Updates an existing brain's properties",
156
+ "operationId" : "updateBrainById",
157
+ "parameters" : [ {
158
+ "description" : "ID of the brain",
159
+ "in" : "path",
160
+ "name" : "brainId",
161
+ "required" : true,
162
+ "schema" : {
163
+ "type" : "string"
164
+ }
165
+ } ],
166
+ "requestBody" : {
167
+ "content" : {
168
+ "application/json" : {
169
+ "schema" : {
170
+ "$ref" : "#/components/schemas/BrainPatch"
171
+ }
172
+ }
173
+ },
174
+ "required" : true
175
+ },
176
+ "responses" : {
177
+ "200" : {
178
+ "content" : {
179
+ "application/json" : {
180
+ "schema" : {
181
+ "$ref" : "#/components/schemas/BrainPatch"
182
+ }
183
+ }
184
+ },
185
+ "description" : "Brain updated successfully"
186
+ },
187
+ "400" : {
188
+ "description" : "Invalid request body or flow not found"
189
+ },
190
+ "401" : {
191
+ "description" : "Unauthorized"
192
+ },
193
+ "403" : {
194
+ "description" : "Forbidden - User doesn't have access to this brain"
195
+ },
196
+ "404" : {
197
+ "description" : "Brain not found"
198
+ },
199
+ "500" : {
200
+ "description" : "Brain not found after update (server error)"
201
+ }
202
+ },
203
+ "security" : [ {
204
+ "ApiKeyAuth" : [ ]
205
+ } ],
206
+ "summary" : "Update a brain",
207
+ "tags" : [ "brain" ]
208
+ }
209
+ },
210
+ "/brains/{brainId}/modules" : {
211
+ "get" : {
212
+ "description" : "Retrieves all modules for a specific brain",
213
+ "operationId" : "getModules",
214
+ "parameters" : [ {
215
+ "description" : "ID of the brain",
216
+ "in" : "path",
217
+ "name" : "brainId",
218
+ "required" : true,
219
+ "schema" : {
220
+ "type" : "string"
221
+ }
222
+ } ],
223
+ "responses" : {
224
+ "200" : {
225
+ "content" : {
226
+ "application/json" : {
227
+ "schema" : {
228
+ "$ref" : "#/components/schemas/BrainModule"
229
+ }
230
+ }
231
+ },
232
+ "description" : "Brain modules retrieved successfully"
233
+ },
234
+ "401" : {
235
+ "description" : "Unauthorized"
236
+ },
237
+ "403" : {
238
+ "description" : "Forbidden - User doesn't have access to this brain"
239
+ },
240
+ "404" : {
241
+ "description" : "Brain not found"
242
+ },
243
+ "500" : {
244
+ "description" : "Internal server error"
245
+ }
246
+ },
247
+ "security" : [ {
248
+ "ApiKeyAuth" : [ ]
249
+ } ],
250
+ "summary" : "Get brain modules",
251
+ "tags" : [ "brain" ]
252
+ },
253
+ "post" : {
254
+ "description" : "Adds a new module to the specified brain",
255
+ "operationId" : "addModule",
256
+ "parameters" : [ {
257
+ "description" : "ID of the brain",
258
+ "in" : "path",
259
+ "name" : "brainId",
260
+ "required" : true,
261
+ "schema" : {
262
+ "type" : "string"
263
+ }
264
+ } ],
265
+ "requestBody" : {
266
+ "content" : {
267
+ "application/json" : {
268
+ "schema" : {
269
+ "$ref" : "#/components/schemas/BrainModule"
270
+ }
271
+ }
272
+ },
273
+ "required" : true
274
+ },
275
+ "responses" : {
276
+ "201" : {
277
+ "content" : {
278
+ "application/json" : {
279
+ "schema" : {
280
+ "$ref" : "#/components/schemas/BrainModule"
281
+ }
282
+ }
283
+ },
284
+ "description" : "Module added successfully"
285
+ },
286
+ "400" : {
287
+ "description" : "Invalid request body or module configuration"
288
+ },
289
+ "401" : {
290
+ "description" : "Unauthorized"
291
+ },
292
+ "403" : {
293
+ "description" : "Forbidden - User doesn't have access to this brain"
294
+ },
295
+ "404" : {
296
+ "description" : "Brain not found"
297
+ },
298
+ "500" : {
299
+ "description" : "Internal server error"
300
+ }
301
+ },
302
+ "security" : [ {
303
+ "ApiKeyAuth" : [ ]
304
+ } ],
305
+ "summary" : "Add a module to a brain",
306
+ "tags" : [ "brain" ]
307
+ }
308
+ },
309
+ "/brains/{brainId}/modules/{moduleName}" : {
310
+ "delete" : {
311
+ "description" : "Deletes a specific module from the brain",
312
+ "operationId" : "deleteModule",
313
+ "parameters" : [ {
314
+ "description" : "ID of the brain",
315
+ "in" : "path",
316
+ "name" : "brainId",
317
+ "required" : true,
318
+ "schema" : {
319
+ "type" : "string"
320
+ }
321
+ }, {
322
+ "description" : "Name of the module to remove",
323
+ "in" : "path",
324
+ "name" : "moduleName",
325
+ "required" : true,
326
+ "schema" : {
327
+ "type" : "string"
328
+ }
329
+ } ],
330
+ "responses" : {
331
+ "204" : {
332
+ "description" : "Module removed successfully"
333
+ },
334
+ "401" : {
335
+ "description" : "Unauthorized"
336
+ },
337
+ "403" : {
338
+ "description" : "Forbidden - User doesn't have access to this brain"
339
+ },
340
+ "404" : {
341
+ "description" : "Brain or module not found"
342
+ },
343
+ "500" : {
344
+ "description" : "Internal server error"
345
+ }
346
+ },
347
+ "security" : [ {
348
+ "ApiKeyAuth" : [ ]
349
+ } ],
350
+ "summary" : "Remove a module from a brain",
351
+ "tags" : [ "brain" ]
352
+ }
353
+ },
354
+ "/brains/{brainId}/metrics/overview" : {
355
+ "get" : {
356
+ "description" : "Retrieves usage metrics overview for a specific brain",
357
+ "operationId" : "getBrainMetricsOverview",
358
+ "parameters" : [ {
359
+ "description" : "ID of the brain",
360
+ "in" : "path",
361
+ "name" : "brainId",
362
+ "required" : true,
363
+ "schema" : {
364
+ "type" : "string"
365
+ }
366
+ }, {
367
+ "description" : "Start date for metrics (ISO format)",
368
+ "in" : "query",
369
+ "name" : "startDate",
370
+ "schema" : {
371
+ "format" : "date-time",
372
+ "type" : "string"
373
+ }
374
+ }, {
375
+ "description" : "End date for metrics (ISO format)",
376
+ "in" : "query",
377
+ "name" : "endDate",
378
+ "schema" : {
379
+ "format" : "date-time",
380
+ "type" : "string"
381
+ }
382
+ } ],
383
+ "responses" : {
384
+ "200" : {
385
+ "content" : {
386
+ "application/json" : {
387
+ "schema" : {
388
+ "$ref" : "#/components/schemas/BrainMetricsOverview"
389
+ }
390
+ }
391
+ },
392
+ "description" : "Metrics overview retrieved successfully"
393
+ },
394
+ "400" : {
395
+ "description" : "Invalid date format"
396
+ },
397
+ "401" : {
398
+ "description" : "Unauthorized"
399
+ },
400
+ "403" : {
401
+ "description" : "Forbidden - User doesn't have access to this brain"
402
+ },
403
+ "404" : {
404
+ "description" : "Brain not found"
405
+ },
406
+ "500" : {
407
+ "description" : "Internal server error"
408
+ }
409
+ },
410
+ "security" : [ {
411
+ "ApiKeyAuth" : [ ]
412
+ } ],
413
+ "summary" : "Get brain metrics overview",
414
+ "tags" : [ "brain" ]
415
+ }
416
+ },
417
+ "/brains/{brainId}/metrics" : {
418
+ "get" : {
419
+ "description" : "Retrieves detailed usage metrics for a specific brain (admin only)",
420
+ "operationId" : "getBrainMetrics",
421
+ "parameters" : [ {
422
+ "description" : "ID of the brain",
423
+ "in" : "path",
424
+ "name" : "brainId",
425
+ "required" : true,
426
+ "schema" : {
427
+ "type" : "string"
428
+ }
429
+ }, {
430
+ "description" : "Start date for metrics (ISO format)",
431
+ "in" : "query",
432
+ "name" : "startDate",
433
+ "schema" : {
434
+ "format" : "date-time",
435
+ "type" : "string"
436
+ }
437
+ }, {
438
+ "description" : "End date for metrics (ISO format)",
439
+ "in" : "query",
440
+ "name" : "endDate",
441
+ "schema" : {
442
+ "format" : "date-time",
443
+ "type" : "string"
444
+ }
445
+ } ],
446
+ "responses" : {
447
+ "200" : {
448
+ "content" : {
449
+ "application/json" : {
450
+ "schema" : {
451
+ "items" : {
452
+ "$ref" : "#/components/schemas/BrainUsageMetrics"
453
+ },
454
+ "type" : "array"
455
+ }
456
+ }
457
+ },
458
+ "description" : "Detailed metrics retrieved successfully"
459
+ },
460
+ "400" : {
461
+ "description" : "Invalid date format"
462
+ },
463
+ "401" : {
464
+ "description" : "Unauthorized"
465
+ },
466
+ "403" : {
467
+ "description" : "Forbidden - User is not an admin"
468
+ },
469
+ "500" : {
470
+ "description" : "Internal server error"
471
+ }
472
+ },
473
+ "security" : [ {
474
+ "ApiKeyAuth" : [ ]
475
+ } ],
476
+ "summary" : "Get detailed brain metrics",
477
+ "tags" : [ "brain" ]
478
+ }
479
+ },
480
+ "/brains/{brainId}/metrics/events" : {
481
+ "get" : {
482
+ "description" : "Retrieves detailed metric events for a specific brain (admin only)",
483
+ "operationId" : "getBrainMetricsEvents",
484
+ "parameters" : [ {
485
+ "description" : "ID of the brain",
486
+ "in" : "path",
487
+ "name" : "brainId",
488
+ "required" : true,
489
+ "schema" : {
490
+ "type" : "string"
491
+ }
492
+ }, {
493
+ "description" : "Number of events to skip",
494
+ "in" : "query",
495
+ "name" : "offset",
496
+ "schema" : {
497
+ "minimum" : 0,
498
+ "type" : "integer"
499
+ }
500
+ }, {
501
+ "description" : "Start date for metrics (ISO format)",
502
+ "in" : "query",
503
+ "name" : "startDate",
504
+ "schema" : {
505
+ "format" : "date-time",
506
+ "type" : "string"
507
+ }
508
+ }, {
509
+ "description" : "End date for metrics (ISO format)",
510
+ "in" : "query",
511
+ "name" : "endDate",
512
+ "schema" : {
513
+ "format" : "date-time",
514
+ "type" : "string"
515
+ }
516
+ } ],
517
+ "responses" : {
518
+ "200" : {
519
+ "content" : {
520
+ "application/json" : {
521
+ "schema" : {
522
+ "items" : {
523
+ "$ref" : "#/components/schemas/BrainMetricsEvent"
524
+ },
525
+ "type" : "array"
526
+ }
527
+ }
528
+ },
529
+ "description" : "Metric events retrieved successfully"
530
+ },
531
+ "400" : {
532
+ "description" : "Invalid parameters"
533
+ },
534
+ "401" : {
535
+ "description" : "Unauthorized"
536
+ },
537
+ "403" : {
538
+ "description" : "Forbidden - User is not an admin"
539
+ },
540
+ "500" : {
541
+ "description" : "Internal server error"
542
+ }
543
+ },
544
+ "security" : [ {
545
+ "ApiKeyAuth" : [ ]
546
+ } ],
547
+ "summary" : "Get brain metrics events",
548
+ "tags" : [ "brain" ]
549
+ }
550
+ },
551
+ "/brains/{brainId}/flows" : {
552
+ "get" : {
553
+ "description" : "Retrieves all conversation flows associated with a specific brain",
554
+ "operationId" : "getFlows",
555
+ "parameters" : [ {
556
+ "description" : "ID of the brain",
557
+ "in" : "path",
558
+ "name" : "brainId",
559
+ "required" : true,
560
+ "schema" : {
561
+ "type" : "string"
562
+ }
563
+ } ],
564
+ "responses" : {
565
+ "200" : {
566
+ "content" : {
567
+ "application/json" : {
568
+ "schema" : {
569
+ "items" : {
570
+ "$ref" : "#/components/schemas/BrainFlow"
571
+ },
572
+ "type" : "array"
573
+ }
574
+ }
575
+ },
576
+ "description" : "Flows retrieved successfully"
577
+ },
578
+ "401" : {
579
+ "description" : "Unauthorized"
580
+ },
581
+ "403" : {
582
+ "description" : "Forbidden - User doesn't have access to this brain"
583
+ },
584
+ "404" : {
585
+ "description" : "Brain not found"
586
+ },
587
+ "500" : {
588
+ "description" : "Internal server error"
589
+ }
590
+ },
591
+ "security" : [ {
592
+ "ApiKeyAuth" : [ ]
593
+ } ],
594
+ "summary" : "Get all flows for a brain",
595
+ "tags" : [ "brain" ]
596
+ },
597
+ "post" : {
598
+ "description" : "Creates a new conversation flow for a specific brain",
599
+ "operationId" : "createFlow",
600
+ "parameters" : [ {
601
+ "description" : "ID of the brain",
602
+ "in" : "path",
603
+ "name" : "brainId",
604
+ "required" : true,
605
+ "schema" : {
606
+ "type" : "string"
607
+ }
608
+ } ],
609
+ "requestBody" : {
610
+ "content" : {
611
+ "application/json" : {
612
+ "schema" : {
613
+ "$ref" : "#/components/schemas/BrainFlowCreate"
614
+ }
615
+ }
616
+ },
617
+ "required" : true
618
+ },
619
+ "responses" : {
620
+ "201" : {
621
+ "content" : {
622
+ "application/json" : {
623
+ "schema" : {
624
+ "$ref" : "#/components/schemas/BrainFlow"
625
+ }
626
+ }
627
+ },
628
+ "description" : "Flow created successfully"
629
+ },
630
+ "400" : {
631
+ "description" : "Invalid request body"
632
+ },
633
+ "401" : {
634
+ "description" : "Unauthorized"
635
+ },
636
+ "403" : {
637
+ "description" : "Forbidden - User doesn't have access to this brain"
638
+ },
639
+ "404" : {
640
+ "description" : "Brain not found"
641
+ },
642
+ "500" : {
643
+ "description" : "Internal server error"
644
+ }
645
+ },
646
+ "security" : [ {
647
+ "ApiKeyAuth" : [ ]
648
+ } ],
649
+ "summary" : "Create a new flow",
650
+ "tags" : [ "brain" ]
651
+ }
652
+ },
653
+ "/brains/{brainId}/flows/{flowId}" : {
654
+ "delete" : {
655
+ "description" : "Deletes a specific conversation flow",
656
+ "operationId" : "deleteFlow",
657
+ "parameters" : [ {
658
+ "description" : "ID of the brain",
659
+ "in" : "path",
660
+ "name" : "brainId",
661
+ "required" : true,
662
+ "schema" : {
663
+ "type" : "string"
664
+ }
665
+ }, {
666
+ "description" : "ID of the flow to retrieve",
667
+ "in" : "path",
668
+ "name" : "flowId",
669
+ "required" : true,
670
+ "schema" : {
671
+ "format" : "uuid",
672
+ "type" : "string"
673
+ }
674
+ } ],
675
+ "responses" : {
676
+ "204" : {
677
+ "description" : "Flow deleted successfully"
678
+ },
679
+ "401" : {
680
+ "description" : "Unauthorized"
681
+ },
682
+ "403" : {
683
+ "description" : "Forbidden - User doesn't have access to this brain"
684
+ },
685
+ "404" : {
686
+ "description" : "Flow not found"
687
+ },
688
+ "500" : {
689
+ "description" : "Internal server error"
690
+ }
691
+ },
692
+ "security" : [ {
693
+ "ApiKeyAuth" : [ ]
694
+ } ],
695
+ "summary" : "Delete a flow",
696
+ "tags" : [ "brain" ]
697
+ },
698
+ "get" : {
699
+ "description" : "Retrieves a specific conversation flow by ID",
700
+ "operationId" : "getFlow",
701
+ "parameters" : [ {
702
+ "description" : "ID of the brain",
703
+ "in" : "path",
704
+ "name" : "brainId",
705
+ "required" : true,
706
+ "schema" : {
707
+ "type" : "string"
708
+ }
709
+ }, {
710
+ "description" : "ID of the flow to retrieve",
711
+ "in" : "path",
712
+ "name" : "flowId",
713
+ "required" : true,
714
+ "schema" : {
715
+ "format" : "uuid",
716
+ "type" : "string"
717
+ }
718
+ } ],
719
+ "responses" : {
720
+ "200" : {
721
+ "content" : {
722
+ "application/json" : {
723
+ "schema" : {
724
+ "$ref" : "#/components/schemas/BrainFlow"
725
+ }
726
+ }
727
+ },
728
+ "description" : "Flow retrieved successfully"
729
+ },
730
+ "401" : {
731
+ "description" : "Unauthorized"
732
+ },
733
+ "403" : {
734
+ "description" : "Forbidden - User doesn't have access to this brain"
735
+ },
736
+ "404" : {
737
+ "description" : "Flow not found"
738
+ },
739
+ "500" : {
740
+ "description" : "Internal server error"
741
+ }
742
+ },
743
+ "security" : [ {
744
+ "ApiKeyAuth" : [ ]
745
+ } ],
746
+ "summary" : "Get a specific flow",
747
+ "tags" : [ "brain" ]
748
+ },
749
+ "put" : {
750
+ "description" : "Updates an existing conversation flow",
751
+ "operationId" : "updateFlow",
752
+ "parameters" : [ {
753
+ "description" : "ID of the brain",
754
+ "in" : "path",
755
+ "name" : "brainId",
756
+ "required" : true,
757
+ "schema" : {
758
+ "type" : "string"
759
+ }
760
+ }, {
761
+ "description" : "ID of the flow to retrieve",
762
+ "in" : "path",
763
+ "name" : "flowId",
764
+ "required" : true,
765
+ "schema" : {
766
+ "format" : "uuid",
767
+ "type" : "string"
768
+ }
769
+ } ],
770
+ "requestBody" : {
771
+ "content" : {
772
+ "application/json" : {
773
+ "schema" : {
774
+ "$ref" : "#/components/schemas/BrainFlow"
775
+ }
776
+ }
777
+ },
778
+ "required" : true
779
+ },
780
+ "responses" : {
781
+ "200" : {
782
+ "content" : {
783
+ "application/json" : {
784
+ "schema" : {
785
+ "$ref" : "#/components/schemas/BrainFlow"
786
+ }
787
+ }
788
+ },
789
+ "description" : "Flow updated successfully"
790
+ },
791
+ "400" : {
792
+ "description" : "Invalid request body"
793
+ },
794
+ "401" : {
795
+ "description" : "Unauthorized"
796
+ },
797
+ "403" : {
798
+ "description" : "Forbidden - User doesn't have access to this brain"
799
+ },
800
+ "404" : {
801
+ "description" : "Flow not found"
802
+ },
803
+ "500" : {
804
+ "description" : "Internal server error"
805
+ }
806
+ },
807
+ "security" : [ {
808
+ "ApiKeyAuth" : [ ]
809
+ } ],
810
+ "summary" : "Update a flow",
811
+ "tags" : [ "brain" ]
812
+ }
813
+ },
814
+ "/brains/{brainId}/subscription" : {
815
+ "delete" : {
816
+ "description" : "Removes the subscription plan from a brain (admin only)",
817
+ "operationId" : "removeBrainSubscription",
818
+ "parameters" : [ {
819
+ "description" : "ID of the brain",
820
+ "in" : "path",
821
+ "name" : "brainId",
822
+ "required" : true,
823
+ "schema" : {
824
+ "type" : "string"
825
+ }
826
+ } ],
827
+ "responses" : {
828
+ "204" : {
829
+ "description" : "Subscription removed successfully"
830
+ },
831
+ "401" : {
832
+ "description" : "Unauthorized"
833
+ },
834
+ "403" : {
835
+ "description" : "Forbidden - User is not an admin"
836
+ },
837
+ "404" : {
838
+ "description" : "Brain not found"
839
+ }
840
+ },
841
+ "security" : [ {
842
+ "ApiKeyAuth" : [ ]
843
+ } ],
844
+ "summary" : "Remove brain subscription",
845
+ "tags" : [ "brain" ]
846
+ },
847
+ "put" : {
848
+ "description" : "Sets or updates a subscription plan for a brain (admin only)",
849
+ "operationId" : "updateBrainSubscription",
850
+ "parameters" : [ {
851
+ "description" : "ID of the brain",
852
+ "in" : "path",
853
+ "name" : "brainId",
854
+ "required" : true,
855
+ "schema" : {
856
+ "type" : "string"
857
+ }
858
+ } ],
859
+ "requestBody" : {
860
+ "content" : {
861
+ "application/json" : {
862
+ "schema" : {
863
+ "$ref" : "#/components/schemas/BrainSubscription"
864
+ }
865
+ }
866
+ },
867
+ "required" : true
868
+ },
869
+ "responses" : {
870
+ "200" : {
871
+ "content" : {
872
+ "application/json" : {
873
+ "schema" : {
874
+ "$ref" : "#/components/schemas/BrainSubscription"
875
+ }
876
+ }
877
+ },
878
+ "description" : "Subscription set successfully"
879
+ },
880
+ "400" : {
881
+ "description" : "Invalid request body"
882
+ },
883
+ "401" : {
884
+ "description" : "Unauthorized"
885
+ },
886
+ "403" : {
887
+ "description" : "Forbidden - User is not an admin"
888
+ },
889
+ "404" : {
890
+ "description" : "Brain not found"
891
+ }
892
+ },
893
+ "security" : [ {
894
+ "ApiKeyAuth" : [ ]
895
+ } ],
896
+ "summary" : "Update brain subscription",
897
+ "tags" : [ "brain" ]
898
+ }
899
+ },
900
+ "/brains/{brainId}/files" : {
901
+ "delete" : {
902
+ "description" : "Removes the profile image for a brain",
903
+ "operationId" : "removeBrainProfileImage",
904
+ "parameters" : [ {
905
+ "description" : "ID of the brain",
906
+ "in" : "path",
907
+ "name" : "brainId",
908
+ "required" : true,
909
+ "schema" : {
910
+ "type" : "string"
911
+ }
912
+ } ],
913
+ "responses" : {
914
+ "204" : {
915
+ "description" : "Profile image removed successfully"
916
+ },
917
+ "401" : {
918
+ "description" : "Unauthorized"
919
+ },
920
+ "403" : {
921
+ "description" : "Forbidden - User doesn't have access to this brain"
922
+ },
923
+ "404" : {
924
+ "description" : "Brain not found"
925
+ },
926
+ "500" : {
927
+ "description" : "Failed to delete brain image"
928
+ }
929
+ },
930
+ "security" : [ {
931
+ "ApiKeyAuth" : [ ]
932
+ } ],
933
+ "summary" : "Remove brain profile image",
934
+ "tags" : [ "brain" ]
935
+ },
936
+ "post" : {
937
+ "description" : "Uploads a profile image for a brain and returns an upload URL",
938
+ "operationId" : "uploadBrainProfileImage",
939
+ "parameters" : [ {
940
+ "description" : "ID of the brain",
941
+ "in" : "path",
942
+ "name" : "brainId",
943
+ "required" : true,
944
+ "schema" : {
945
+ "type" : "string"
946
+ }
947
+ } ],
948
+ "requestBody" : {
949
+ "content" : {
950
+ "application/json" : {
951
+ "schema" : {
952
+ "$ref" : "#/components/schemas/FileCreationRequest"
953
+ }
954
+ }
955
+ },
956
+ "required" : true
957
+ },
958
+ "responses" : {
959
+ "201" : {
960
+ "content" : {
961
+ "application/json" : {
962
+ "schema" : {
963
+ "$ref" : "#/components/schemas/File"
964
+ }
965
+ }
966
+ },
967
+ "description" : "Profile image upload prepared successfully"
968
+ },
969
+ "400" : {
970
+ "description" : "Invalid request body"
971
+ },
972
+ "401" : {
973
+ "description" : "Unauthorized"
974
+ },
975
+ "403" : {
976
+ "description" : "Forbidden - User doesn't have access to this brain"
977
+ }
978
+ },
979
+ "security" : [ {
980
+ "ApiKeyAuth" : [ ]
981
+ } ],
982
+ "summary" : "Upload brain profile image",
983
+ "tags" : [ "brain" ]
984
+ }
985
+ }
986
+ },
987
+ "components" : {
988
+ "parameters" : {
989
+ "brainIdPath" : {
990
+ "description" : "ID of the brain",
991
+ "in" : "path",
992
+ "name" : "brainId",
993
+ "required" : true,
994
+ "schema" : {
995
+ "type" : "string"
996
+ }
997
+ },
998
+ "startDate" : {
999
+ "description" : "Start date for metrics (ISO format)",
1000
+ "in" : "query",
1001
+ "name" : "startDate",
1002
+ "schema" : {
1003
+ "format" : "date-time",
1004
+ "type" : "string"
1005
+ }
1006
+ },
1007
+ "endDate" : {
1008
+ "description" : "End date for metrics (ISO format)",
1009
+ "in" : "query",
1010
+ "name" : "endDate",
1011
+ "schema" : {
1012
+ "format" : "date-time",
1013
+ "type" : "string"
1014
+ }
1015
+ },
1016
+ "flowIdPath" : {
1017
+ "description" : "ID of the flow to retrieve",
1018
+ "in" : "path",
1019
+ "name" : "flowId",
1020
+ "required" : true,
1021
+ "schema" : {
1022
+ "format" : "uuid",
1023
+ "type" : "string"
1024
+ }
1025
+ }
1026
+ },
1027
+ "schemas" : {
1028
+ "Brain" : {
1029
+ "properties" : {
1030
+ "id" : {
1031
+ "type" : "string"
1032
+ },
1033
+ "name" : {
1034
+ "type" : "string"
1035
+ },
1036
+ "engine" : {
1037
+ "$ref" : "#/components/schemas/Engine"
1038
+ },
1039
+ "modules" : {
1040
+ "additionalProperties" : true,
1041
+ "type" : "object"
1042
+ },
1043
+ "persona" : {
1044
+ "$ref" : "#/components/schemas/Persona"
1045
+ },
1046
+ "promptInit" : {
1047
+ "$ref" : "#/components/schemas/PromptInit"
1048
+ },
1049
+ "flow" : {
1050
+ "type" : "string"
1051
+ },
1052
+ "subscription" : {
1053
+ "$ref" : "#/components/schemas/BrainSubscription"
1054
+ },
1055
+ "speechOverrides" : {
1056
+ "additionalProperties" : {
1057
+ "type" : "string"
1058
+ },
1059
+ "maxProperties" : 100,
1060
+ "type" : "object"
1061
+ },
1062
+ "imageBrain" : {
1063
+ "type" : "string"
1064
+ },
1065
+ "organisationId" : {
1066
+ "type" : "string"
1067
+ },
1068
+ "role" : {
1069
+ "type" : "string"
1070
+ },
1071
+ "defaultLanguage" : {
1072
+ "type" : "string"
1073
+ },
1074
+ "description" : {
1075
+ "type" : "string"
1076
+ },
1077
+ "template" : {
1078
+ "type" : "string"
1079
+ },
1080
+ "color" : {
1081
+ "type" : "string"
1082
+ },
1083
+ "picture" : {
1084
+ "type" : "string"
1085
+ },
1086
+ "createdAt" : {
1087
+ "type" : "string"
1088
+ },
1089
+ "isActivated" : {
1090
+ "type" : "boolean"
1091
+ },
1092
+ "knowledgeBaseId" : {
1093
+ "items" : {
1094
+ "type" : "string"
1095
+ },
1096
+ "type" : "array"
1097
+ },
1098
+ "isTemplate" : {
1099
+ "type" : "boolean"
1100
+ },
1101
+ "deleted" : {
1102
+ "type" : "boolean"
1103
+ }
1104
+ },
1105
+ "required" : [ "engine", "id", "modules", "name", "organisationId", "persona", "promptInit" ],
1106
+ "type" : "object"
1107
+ },
1108
+ "Engine" : {
1109
+ "properties" : {
1110
+ "type" : {
1111
+ "$ref" : "#/components/schemas/EngineType"
1112
+ },
1113
+ "configuration" : {
1114
+ "additionalProperties" : true,
1115
+ "type" : "object"
1116
+ }
1117
+ },
1118
+ "required" : [ "configuration", "type" ],
1119
+ "type" : "object"
1120
+ },
1121
+ "Persona" : {
1122
+ "additionalProperties" : {
1123
+ "type" : "string"
1124
+ },
1125
+ "maxProperties" : 200,
1126
+ "minProperties" : 1,
1127
+ "properties" : {
1128
+ "default" : {
1129
+ "maxLength" : 5000,
1130
+ "minLength" : 1,
1131
+ "type" : "string"
1132
+ }
1133
+ },
1134
+ "required" : [ "default" ],
1135
+ "type" : "object"
1136
+ },
1137
+ "PromptInit" : {
1138
+ "additionalProperties" : {
1139
+ "type" : "string"
1140
+ },
1141
+ "maxProperties" : 200,
1142
+ "minProperties" : 1,
1143
+ "properties" : {
1144
+ "default" : {
1145
+ "maxLength" : 50000,
1146
+ "minLength" : 1,
1147
+ "type" : "string"
1148
+ }
1149
+ },
1150
+ "required" : [ "default" ],
1151
+ "type" : "object"
1152
+ },
1153
+ "BrainSubscription" : {
1154
+ "properties" : {
1155
+ "textInteractions" : {
1156
+ "$ref" : "#/components/schemas/BrainSubscription_textInteractions"
1157
+ },
1158
+ "voiceInteractions" : {
1159
+ "$ref" : "#/components/schemas/BrainSubscription_textInteractions"
1160
+ },
1161
+ "canGoBeyondIncluded" : {
1162
+ "type" : "boolean"
1163
+ },
1164
+ "startDate" : {
1165
+ "format" : "date-time",
1166
+ "type" : "string"
1167
+ },
1168
+ "endDate" : {
1169
+ "format" : "date-time",
1170
+ "type" : "string"
1171
+ }
1172
+ },
1173
+ "required" : [ "canGoBeyondIncluded", "textInteractions", "voiceInteractions" ],
1174
+ "type" : "object"
1175
+ },
1176
+ "Additional" : {
1177
+ "properties" : {
1178
+ "price" : {
1179
+ "type" : "string"
1180
+ },
1181
+ "amountForPrice" : {
1182
+ "type" : "string"
1183
+ },
1184
+ "currency" : {
1185
+ "type" : "string"
1186
+ }
1187
+ },
1188
+ "required" : [ "amountForPrice", "currency", "price" ],
1189
+ "type" : "object"
1190
+ },
1191
+ "BrainRequest" : {
1192
+ "properties" : {
1193
+ "name" : {
1194
+ "type" : "string"
1195
+ },
1196
+ "persona" : {
1197
+ "$ref" : "#/components/schemas/Persona"
1198
+ },
1199
+ "engine" : {
1200
+ "$ref" : "#/components/schemas/Engine"
1201
+ },
1202
+ "promptInit" : {
1203
+ "$ref" : "#/components/schemas/PromptInit"
1204
+ },
1205
+ "imageBrain" : {
1206
+ "$ref" : "#/components/schemas/BrainRequest_imageBrain"
1207
+ },
1208
+ "organisationId" : {
1209
+ "type" : "string"
1210
+ },
1211
+ "role" : {
1212
+ "type" : "string"
1213
+ },
1214
+ "defaultLanguage" : {
1215
+ "type" : "string"
1216
+ },
1217
+ "description" : {
1218
+ "type" : "string"
1219
+ },
1220
+ "template" : {
1221
+ "type" : "string"
1222
+ },
1223
+ "color" : {
1224
+ "type" : "string"
1225
+ },
1226
+ "picture" : {
1227
+ "type" : "string"
1228
+ },
1229
+ "createdAt" : {
1230
+ "type" : "string"
1231
+ },
1232
+ "isActivated" : {
1233
+ "type" : "boolean"
1234
+ }
1235
+ },
1236
+ "required" : [ "engine", "name", "organisationId", "persona", "promptInit" ],
1237
+ "type" : "object"
1238
+ },
1239
+ "BrainPatch" : {
1240
+ "allOf" : [ {
1241
+ "$ref" : "#/components/schemas/Brain"
1242
+ }, {
1243
+ "properties" : {
1244
+ "flow" : {
1245
+ "format" : "uuid",
1246
+ "type" : "string"
1247
+ },
1248
+ "speechOverrides" : {
1249
+ "additionalProperties" : {
1250
+ "type" : "string"
1251
+ },
1252
+ "maxProperties" : 100,
1253
+ "type" : "object"
1254
+ }
1255
+ },
1256
+ "type" : "object"
1257
+ } ]
1258
+ },
1259
+ "BrainModule" : {
1260
+ "properties" : {
1261
+ "type" : {
1262
+ "$ref" : "#/components/schemas/BrainModuleType"
1263
+ },
1264
+ "name" : {
1265
+ "type" : "string"
1266
+ },
1267
+ "configuration" : {
1268
+ "type" : "object"
1269
+ },
1270
+ "restricted" : {
1271
+ "type" : "boolean"
1272
+ }
1273
+ },
1274
+ "required" : [ "configuration", "name", "type" ],
1275
+ "type" : "object"
1276
+ },
1277
+ "BrainMetricsOverview" : {
1278
+ "properties" : {
1279
+ "textConversationCount" : {
1280
+ "type" : "number"
1281
+ },
1282
+ "voiceConversationCount" : {
1283
+ "type" : "number"
1284
+ },
1285
+ "userTextMessagesCount" : {
1286
+ "type" : "number"
1287
+ },
1288
+ "userVoiceMessagesCount" : {
1289
+ "type" : "number"
1290
+ },
1291
+ "subscription" : {
1292
+ "$ref" : "#/components/schemas/SubscriptionMetric"
1293
+ },
1294
+ "costs" : {
1295
+ "$ref" : "#/components/schemas/CostMetric"
1296
+ }
1297
+ },
1298
+ "required" : [ "textConversationCount", "userTextMessagesCount", "userVoiceMessagesCount", "voiceConversationCount" ],
1299
+ "type" : "object"
1300
+ },
1301
+ "SubscriptionMetric" : {
1302
+ "properties" : {
1303
+ "textInteractions" : {
1304
+ "type" : "object"
1305
+ },
1306
+ "voiceInteractions" : {
1307
+ "type" : "object"
1308
+ },
1309
+ "canGoBeyondIncluded" : {
1310
+ "type" : "boolean"
1311
+ },
1312
+ "startDate" : {
1313
+ "format" : "date-time",
1314
+ "type" : "string"
1315
+ },
1316
+ "endDate" : {
1317
+ "format" : "date-time",
1318
+ "type" : "string"
1319
+ }
1320
+ },
1321
+ "type" : "object"
1322
+ },
1323
+ "CostMetric" : {
1324
+ "properties" : {
1325
+ "voiceInteractions" : {
1326
+ "$ref" : "#/components/schemas/Transaction"
1327
+ },
1328
+ "textInteractions" : {
1329
+ "$ref" : "#/components/schemas/Transaction"
1330
+ },
1331
+ "total" : {
1332
+ "$ref" : "#/components/schemas/Transaction"
1333
+ }
1334
+ },
1335
+ "required" : [ "textInteractions", "voiceInteractions" ],
1336
+ "type" : "object"
1337
+ },
1338
+ "Transaction" : {
1339
+ "properties" : {
1340
+ "amount" : {
1341
+ "type" : "string"
1342
+ },
1343
+ "currency" : {
1344
+ "type" : "string"
1345
+ }
1346
+ },
1347
+ "required" : [ "amount", "currency" ],
1348
+ "type" : "object"
1349
+ },
1350
+ "BrainUsageMetrics" : {
1351
+ "properties" : {
1352
+ "_id" : {
1353
+ "$ref" : "#/components/schemas/BrainUsageMetricsId"
1354
+ },
1355
+ "total" : {
1356
+ "type" : "number"
1357
+ },
1358
+ "cost" : {
1359
+ "$ref" : "#/components/schemas/Transaction"
1360
+ }
1361
+ },
1362
+ "type" : "object"
1363
+ },
1364
+ "BrainUsageMetricsId" : {
1365
+ "properties" : {
1366
+ "provider" : {
1367
+ "type" : "string"
1368
+ },
1369
+ "model" : {
1370
+ "type" : "string"
1371
+ },
1372
+ "type" : {
1373
+ "type" : "string"
1374
+ }
1375
+ },
1376
+ "type" : "object"
1377
+ },
1378
+ "BrainMetricsEvent" : {
1379
+ "properties" : {
1380
+ "brainId" : {
1381
+ "type" : "string"
1382
+ },
1383
+ "agentId" : {
1384
+ "type" : "string"
1385
+ },
1386
+ "source" : {
1387
+ "additionalProperties" : true,
1388
+ "type" : "object"
1389
+ },
1390
+ "timestamp" : {
1391
+ "type" : "string"
1392
+ },
1393
+ "task" : {
1394
+ "type" : "string"
1395
+ },
1396
+ "value" : {
1397
+ "items" : {
1398
+ "$ref" : "#/components/schemas/BrainMetricsValue"
1399
+ },
1400
+ "type" : "array"
1401
+ }
1402
+ },
1403
+ "required" : [ "brainId", "source", "task", "timestamp", "value" ],
1404
+ "type" : "object"
1405
+ },
1406
+ "BrainMetricsValue" : {
1407
+ "properties" : {
1408
+ "units" : {
1409
+ "$ref" : "#/components/schemas/BrainMetricsUnitsType"
1410
+ },
1411
+ "type" : {
1412
+ "type" : "string"
1413
+ },
1414
+ "amount" : {
1415
+ "type" : "number"
1416
+ },
1417
+ "model" : {
1418
+ "type" : "string"
1419
+ },
1420
+ "provider" : {
1421
+ "type" : "string"
1422
+ }
1423
+ },
1424
+ "required" : [ "amount", "type", "units" ],
1425
+ "type" : "object"
1426
+ },
1427
+ "BrainFlow" : {
1428
+ "allOf" : [ {
1429
+ "$ref" : "#/components/schemas/BrainFlowCreate"
1430
+ }, {
1431
+ "properties" : {
1432
+ "id" : {
1433
+ "format" : "uuid",
1434
+ "type" : "string"
1435
+ },
1436
+ "brainId" : {
1437
+ "type" : "string"
1438
+ }
1439
+ },
1440
+ "required" : [ "brainId", "id" ],
1441
+ "type" : "object"
1442
+ } ],
1443
+ "type" : "object"
1444
+ },
1445
+ "BrainFlowCreate" : {
1446
+ "properties" : {
1447
+ "entrypoints" : {
1448
+ "$ref" : "#/components/schemas/FlowEntrypoints"
1449
+ },
1450
+ "exits" : {
1451
+ "type" : "object"
1452
+ },
1453
+ "contents" : {
1454
+ "$ref" : "#/components/schemas/FlowContents"
1455
+ },
1456
+ "options" : {
1457
+ "items" : {
1458
+ "$ref" : "#/components/schemas/FlowOptions"
1459
+ },
1460
+ "type" : "array"
1461
+ }
1462
+ },
1463
+ "type" : "object"
1464
+ },
1465
+ "FlowEntrypoints" : {
1466
+ "properties" : {
1467
+ "intents" : {
1468
+ "items" : {
1469
+ "type" : "string"
1470
+ },
1471
+ "type" : "array"
1472
+ },
1473
+ "nodes" : {
1474
+ "items" : {
1475
+ "type" : "string"
1476
+ },
1477
+ "type" : "array"
1478
+ }
1479
+ },
1480
+ "required" : [ "intents" ],
1481
+ "type" : "object"
1482
+ },
1483
+ "FlowContents" : {
1484
+ "properties" : {
1485
+ "rephrase" : {
1486
+ "type" : "boolean"
1487
+ },
1488
+ "text" : {
1489
+ "type" : "string"
1490
+ },
1491
+ "texts" : {
1492
+ "items" : {
1493
+ "type" : "string"
1494
+ },
1495
+ "type" : "array"
1496
+ },
1497
+ "instructions" : {
1498
+ "type" : "string"
1499
+ },
1500
+ "tools" : {
1501
+ "$ref" : "#/components/schemas/ContentsTools"
1502
+ },
1503
+ "suggestions" : {
1504
+ "items" : {
1505
+ "$ref" : "#/components/schemas/FlowContentsSuggestion"
1506
+ },
1507
+ "type" : "array"
1508
+ }
1509
+ },
1510
+ "type" : "object"
1511
+ },
1512
+ "ContentsTools" : {
1513
+ "properties" : {
1514
+ "exclusive" : {
1515
+ "items" : {
1516
+ "type" : "string"
1517
+ },
1518
+ "type" : "array"
1519
+ },
1520
+ "forbidden" : {
1521
+ "items" : {
1522
+ "type" : "string"
1523
+ },
1524
+ "type" : "array"
1525
+ },
1526
+ "allowed" : {
1527
+ "items" : {
1528
+ "type" : "string"
1529
+ },
1530
+ "type" : "array"
1531
+ }
1532
+ },
1533
+ "type" : "object"
1534
+ },
1535
+ "FlowContentsSuggestion" : {
1536
+ "properties" : {
1537
+ "id" : {
1538
+ "type" : "string"
1539
+ },
1540
+ "text" : {
1541
+ "type" : "string"
1542
+ }
1543
+ },
1544
+ "required" : [ "id", "text" ],
1545
+ "type" : "object"
1546
+ },
1547
+ "FlowOptions" : {
1548
+ "properties" : {
1549
+ "conditions" : {
1550
+ "additionalProperties" : {
1551
+ "type" : "object"
1552
+ },
1553
+ "type" : "object"
1554
+ },
1555
+ "exits" : {
1556
+ "type" : "object"
1557
+ },
1558
+ "contents" : {
1559
+ "type" : "object"
1560
+ }
1561
+ },
1562
+ "required" : [ "conditions" ],
1563
+ "type" : "object"
1564
+ },
1565
+ "FileCreationRequest" : {
1566
+ "properties" : {
1567
+ "contentType" : {
1568
+ "description" : "MIME type of the image file",
1569
+ "type" : "string"
1570
+ },
1571
+ "ext" : {
1572
+ "description" : "File extension",
1573
+ "pattern" : "^[a-zA-Z0-9]{1,10}$",
1574
+ "type" : "string"
1575
+ },
1576
+ "size" : {
1577
+ "description" : "File size in bytes",
1578
+ "type" : "number"
1579
+ },
1580
+ "hash" : {
1581
+ "description" : "File hash",
1582
+ "type" : "string"
1583
+ }
1584
+ },
1585
+ "required" : [ "contentType", "ext", "hash", "size" ],
1586
+ "type" : "object"
1587
+ },
1588
+ "File" : {
1589
+ "properties" : {
1590
+ "id" : {
1591
+ "type" : "string"
1592
+ },
1593
+ "contentType" : {
1594
+ "type" : "string"
1595
+ },
1596
+ "ext" : {
1597
+ "type" : "string"
1598
+ },
1599
+ "key" : {
1600
+ "type" : "string"
1601
+ },
1602
+ "size" : {
1603
+ "type" : "number"
1604
+ },
1605
+ "createdAt" : {
1606
+ "format" : "date-time",
1607
+ "type" : "string"
1608
+ },
1609
+ "status" : {
1610
+ "$ref" : "#/components/schemas/FileStatus"
1611
+ },
1612
+ "postURL" : {
1613
+ "description" : "URL to upload the image to",
1614
+ "type" : "string"
1615
+ }
1616
+ },
1617
+ "required" : [ "contentType", "createdAt", "ext", "id", "key", "postURL", "size", "status" ],
1618
+ "type" : "object"
1619
+ },
1620
+ "EngineType" : {
1621
+ "enum" : [ "llamacpp", "openai" ],
1622
+ "type" : "string"
1623
+ },
1624
+ "BrainModuleType" : {
1625
+ "enum" : [ "ContextualKnowledgeWeaviate", "External" ],
1626
+ "type" : "string"
1627
+ },
1628
+ "BrainMetricsUnitsType" : {
1629
+ "enum" : [ "TOKENS", "CURRENCY", "MILLISECONDS", "CHARACTERS" ],
1630
+ "type" : "string"
1631
+ },
1632
+ "FileStatus" : {
1633
+ "enum" : [ "PENDING", "UPLOADED" ],
1634
+ "type" : "string"
1635
+ },
1636
+ "BrainSubscription_textInteractions" : {
1637
+ "properties" : {
1638
+ "included" : {
1639
+ "type" : "number"
1640
+ },
1641
+ "additional" : {
1642
+ "$ref" : "#/components/schemas/Additional"
1643
+ }
1644
+ },
1645
+ "required" : [ "additional", "included" ],
1646
+ "type" : "object"
1647
+ },
1648
+ "BrainRequest_imageBrain" : {
1649
+ "properties" : {
1650
+ "hash" : {
1651
+ "type" : "string"
1652
+ },
1653
+ "size" : {
1654
+ "type" : "number"
1655
+ },
1656
+ "contentType" : {
1657
+ "type" : "string"
1658
+ },
1659
+ "ext" : {
1660
+ "type" : "string"
1661
+ }
1662
+ },
1663
+ "required" : [ "contentType", "ext", "hash", "size" ],
1664
+ "type" : "object"
1665
+ }
1666
+ }
1667
+ }
1668
+ }