@builderbot/manager 1.0.0

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.
@@ -0,0 +1,968 @@
1
+ /**
2
+ * OpenAPI 3.0 Specification for BotManager API
3
+ */
4
+ export declare const openApiSpec: {
5
+ openapi: string;
6
+ info: {
7
+ title: string;
8
+ description: string;
9
+ version: string;
10
+ contact: {
11
+ name: string;
12
+ };
13
+ };
14
+ servers: {
15
+ url: string;
16
+ description: string;
17
+ }[];
18
+ tags: {
19
+ name: string;
20
+ description: string;
21
+ }[];
22
+ paths: {
23
+ '/health': {
24
+ get: {
25
+ tags: string[];
26
+ summary: string;
27
+ description: string;
28
+ responses: {
29
+ '200': {
30
+ description: string;
31
+ content: {
32
+ 'application/json': {
33
+ schema: {
34
+ type: string;
35
+ properties: {
36
+ status: {
37
+ type: string;
38
+ example: string;
39
+ };
40
+ timestamp: {
41
+ type: string;
42
+ format: string;
43
+ };
44
+ botsCount: {
45
+ type: string;
46
+ example: number;
47
+ };
48
+ };
49
+ };
50
+ };
51
+ };
52
+ };
53
+ };
54
+ };
55
+ };
56
+ '/flows': {
57
+ get: {
58
+ tags: string[];
59
+ summary: string;
60
+ description: string;
61
+ responses: {
62
+ '200': {
63
+ description: string;
64
+ content: {
65
+ 'application/json': {
66
+ schema: {
67
+ type: string;
68
+ properties: {
69
+ count: {
70
+ type: string;
71
+ };
72
+ flows: {
73
+ type: string;
74
+ items: {
75
+ $ref: string;
76
+ };
77
+ };
78
+ };
79
+ };
80
+ };
81
+ };
82
+ };
83
+ };
84
+ };
85
+ post: {
86
+ tags: string[];
87
+ summary: string;
88
+ description: string;
89
+ requestBody: {
90
+ required: boolean;
91
+ content: {
92
+ 'application/json': {
93
+ schema: {
94
+ $ref: string;
95
+ };
96
+ examples: {
97
+ greeting: {
98
+ summary: string;
99
+ value: {
100
+ id: string;
101
+ name: string;
102
+ keyword: string[];
103
+ steps: ({
104
+ answer: string;
105
+ delay: number;
106
+ capture?: undefined;
107
+ } | {
108
+ answer: string;
109
+ capture: boolean;
110
+ delay?: undefined;
111
+ })[];
112
+ };
113
+ };
114
+ support: {
115
+ summary: string;
116
+ value: {
117
+ id: string;
118
+ name: string;
119
+ keyword: string;
120
+ steps: ({
121
+ answer: string;
122
+ capture?: undefined;
123
+ } | {
124
+ answer: string;
125
+ capture: boolean;
126
+ })[];
127
+ };
128
+ };
129
+ };
130
+ };
131
+ };
132
+ };
133
+ responses: {
134
+ '201': {
135
+ description: string;
136
+ content: {
137
+ 'application/json': {
138
+ schema: {
139
+ $ref: string;
140
+ };
141
+ };
142
+ };
143
+ };
144
+ '400': {
145
+ $ref: string;
146
+ };
147
+ '409': {
148
+ $ref: string;
149
+ };
150
+ };
151
+ };
152
+ };
153
+ '/flows/{flowId}': {
154
+ get: {
155
+ tags: string[];
156
+ summary: string;
157
+ parameters: {
158
+ $ref: string;
159
+ }[];
160
+ responses: {
161
+ '200': {
162
+ description: string;
163
+ content: {
164
+ 'application/json': {
165
+ schema: {
166
+ $ref: string;
167
+ };
168
+ };
169
+ };
170
+ };
171
+ '404': {
172
+ $ref: string;
173
+ };
174
+ };
175
+ };
176
+ put: {
177
+ tags: string[];
178
+ summary: string;
179
+ description: string;
180
+ parameters: {
181
+ $ref: string;
182
+ }[];
183
+ requestBody: {
184
+ required: boolean;
185
+ content: {
186
+ 'application/json': {
187
+ schema: {
188
+ $ref: string;
189
+ };
190
+ example: {
191
+ name: string;
192
+ steps: {
193
+ answer: string;
194
+ delay: number;
195
+ }[];
196
+ };
197
+ };
198
+ };
199
+ };
200
+ responses: {
201
+ '200': {
202
+ description: string;
203
+ content: {
204
+ 'application/json': {
205
+ schema: {
206
+ $ref: string;
207
+ };
208
+ };
209
+ };
210
+ };
211
+ '400': {
212
+ $ref: string;
213
+ };
214
+ '404': {
215
+ $ref: string;
216
+ };
217
+ };
218
+ };
219
+ delete: {
220
+ tags: string[];
221
+ summary: string;
222
+ description: string;
223
+ parameters: {
224
+ $ref: string;
225
+ }[];
226
+ responses: {
227
+ '200': {
228
+ description: string;
229
+ content: {
230
+ 'application/json': {
231
+ schema: {
232
+ type: string;
233
+ properties: {
234
+ message: {
235
+ type: string;
236
+ };
237
+ flowId: {
238
+ type: string;
239
+ };
240
+ };
241
+ };
242
+ };
243
+ };
244
+ };
245
+ '400': {
246
+ $ref: string;
247
+ };
248
+ '404': {
249
+ $ref: string;
250
+ };
251
+ };
252
+ };
253
+ };
254
+ '/bots': {
255
+ get: {
256
+ tags: string[];
257
+ summary: string;
258
+ responses: {
259
+ '200': {
260
+ description: string;
261
+ content: {
262
+ 'application/json': {
263
+ schema: {
264
+ type: string;
265
+ properties: {
266
+ count: {
267
+ type: string;
268
+ };
269
+ bots: {
270
+ type: string;
271
+ items: {
272
+ $ref: string;
273
+ };
274
+ };
275
+ };
276
+ };
277
+ };
278
+ };
279
+ };
280
+ };
281
+ };
282
+ post: {
283
+ tags: string[];
284
+ summary: string;
285
+ description: string;
286
+ requestBody: {
287
+ required: boolean;
288
+ content: {
289
+ 'application/json': {
290
+ schema: {
291
+ $ref: string;
292
+ };
293
+ examples: {
294
+ simpleBot: {
295
+ summary: string;
296
+ value: {
297
+ tenantId: string;
298
+ name: string;
299
+ flowIds: string[];
300
+ port: number;
301
+ };
302
+ };
303
+ minimalBot: {
304
+ summary: string;
305
+ value: {
306
+ tenantId: string;
307
+ flowIds: string[];
308
+ };
309
+ };
310
+ };
311
+ };
312
+ };
313
+ };
314
+ responses: {
315
+ '201': {
316
+ description: string;
317
+ content: {
318
+ 'application/json': {
319
+ schema: {
320
+ $ref: string;
321
+ };
322
+ };
323
+ };
324
+ };
325
+ '400': {
326
+ $ref: string;
327
+ };
328
+ '409': {
329
+ $ref: string;
330
+ };
331
+ };
332
+ };
333
+ };
334
+ '/bots/active': {
335
+ get: {
336
+ tags: string[];
337
+ summary: string;
338
+ responses: {
339
+ '200': {
340
+ description: string;
341
+ content: {
342
+ 'application/json': {
343
+ schema: {
344
+ type: string;
345
+ properties: {
346
+ count: {
347
+ type: string;
348
+ };
349
+ bots: {
350
+ type: string;
351
+ items: {
352
+ $ref: string;
353
+ };
354
+ };
355
+ };
356
+ };
357
+ };
358
+ };
359
+ };
360
+ };
361
+ };
362
+ };
363
+ '/bots/{tenantId}': {
364
+ get: {
365
+ tags: string[];
366
+ summary: string;
367
+ parameters: {
368
+ $ref: string;
369
+ }[];
370
+ responses: {
371
+ '200': {
372
+ description: string;
373
+ content: {
374
+ 'application/json': {
375
+ schema: {
376
+ $ref: string;
377
+ };
378
+ };
379
+ };
380
+ };
381
+ '404': {
382
+ $ref: string;
383
+ };
384
+ };
385
+ };
386
+ put: {
387
+ tags: string[];
388
+ summary: string;
389
+ parameters: {
390
+ $ref: string;
391
+ }[];
392
+ requestBody: {
393
+ required: boolean;
394
+ content: {
395
+ 'application/json': {
396
+ schema: {
397
+ $ref: string;
398
+ };
399
+ example: {
400
+ name: string;
401
+ };
402
+ };
403
+ };
404
+ };
405
+ responses: {
406
+ '200': {
407
+ description: string;
408
+ content: {
409
+ 'application/json': {
410
+ schema: {
411
+ $ref: string;
412
+ };
413
+ };
414
+ };
415
+ };
416
+ '404': {
417
+ $ref: string;
418
+ };
419
+ };
420
+ };
421
+ delete: {
422
+ tags: string[];
423
+ summary: string;
424
+ parameters: {
425
+ $ref: string;
426
+ }[];
427
+ responses: {
428
+ '200': {
429
+ description: string;
430
+ content: {
431
+ 'application/json': {
432
+ schema: {
433
+ type: string;
434
+ properties: {
435
+ message: {
436
+ type: string;
437
+ };
438
+ tenantId: {
439
+ type: string;
440
+ };
441
+ };
442
+ };
443
+ };
444
+ };
445
+ };
446
+ '404': {
447
+ $ref: string;
448
+ };
449
+ };
450
+ };
451
+ };
452
+ '/bots/{tenantId}/qr': {
453
+ get: {
454
+ tags: string[];
455
+ summary: string;
456
+ description: string;
457
+ parameters: {
458
+ $ref: string;
459
+ }[];
460
+ responses: {
461
+ '200': {
462
+ description: string;
463
+ content: {
464
+ 'application/json': {
465
+ schema: {
466
+ type: string;
467
+ properties: {
468
+ status: {
469
+ type: string;
470
+ enum: string[];
471
+ };
472
+ qr: {
473
+ type: string;
474
+ nullable: boolean;
475
+ };
476
+ message: {
477
+ type: string;
478
+ };
479
+ };
480
+ };
481
+ examples: {
482
+ pending: {
483
+ summary: string;
484
+ value: {
485
+ status: string;
486
+ qr: string;
487
+ message: string;
488
+ };
489
+ };
490
+ connected: {
491
+ summary: string;
492
+ value: {
493
+ status: string;
494
+ qr: any;
495
+ };
496
+ };
497
+ };
498
+ };
499
+ };
500
+ };
501
+ '404': {
502
+ $ref: string;
503
+ };
504
+ };
505
+ };
506
+ };
507
+ '/bots/{tenantId}/restart': {
508
+ post: {
509
+ tags: string[];
510
+ summary: string;
511
+ parameters: {
512
+ $ref: string;
513
+ }[];
514
+ requestBody: {
515
+ required: boolean;
516
+ content: {
517
+ 'application/json': {
518
+ schema: {
519
+ $ref: string;
520
+ };
521
+ example: {
522
+ flowIds: string[];
523
+ port: number;
524
+ };
525
+ };
526
+ };
527
+ };
528
+ responses: {
529
+ '200': {
530
+ description: string;
531
+ content: {
532
+ 'application/json': {
533
+ schema: {
534
+ type: string;
535
+ properties: {
536
+ message: {
537
+ type: string;
538
+ };
539
+ tenantId: {
540
+ type: string;
541
+ };
542
+ };
543
+ };
544
+ };
545
+ };
546
+ };
547
+ '400': {
548
+ $ref: string;
549
+ };
550
+ '404': {
551
+ $ref: string;
552
+ };
553
+ };
554
+ };
555
+ };
556
+ '/bots/{tenantId}/stop': {
557
+ post: {
558
+ tags: string[];
559
+ summary: string;
560
+ description: string;
561
+ parameters: {
562
+ $ref: string;
563
+ }[];
564
+ responses: {
565
+ '200': {
566
+ description: string;
567
+ content: {
568
+ 'application/json': {
569
+ schema: {
570
+ type: string;
571
+ properties: {
572
+ success: {
573
+ type: string;
574
+ };
575
+ message: {
576
+ type: string;
577
+ };
578
+ };
579
+ };
580
+ };
581
+ };
582
+ };
583
+ '404': {
584
+ $ref: string;
585
+ };
586
+ };
587
+ };
588
+ };
589
+ };
590
+ components: {
591
+ parameters: {
592
+ tenantId: {
593
+ name: string;
594
+ in: string;
595
+ required: boolean;
596
+ description: string;
597
+ schema: {
598
+ type: string;
599
+ };
600
+ example: string;
601
+ };
602
+ flowId: {
603
+ name: string;
604
+ in: string;
605
+ required: boolean;
606
+ description: string;
607
+ schema: {
608
+ type: string;
609
+ };
610
+ example: string;
611
+ };
612
+ };
613
+ schemas: {
614
+ FlowStep: {
615
+ type: string;
616
+ required: string[];
617
+ properties: {
618
+ answer: {
619
+ type: string;
620
+ description: string;
621
+ maxLength: number;
622
+ };
623
+ delay: {
624
+ type: string;
625
+ description: string;
626
+ minimum: number;
627
+ maximum: number;
628
+ };
629
+ media: {
630
+ type: string;
631
+ format: string;
632
+ description: string;
633
+ };
634
+ capture: {
635
+ type: string;
636
+ description: string;
637
+ };
638
+ };
639
+ };
640
+ CreateFlow: {
641
+ type: string;
642
+ required: string[];
643
+ properties: {
644
+ id: {
645
+ type: string;
646
+ pattern: string;
647
+ maxLength: number;
648
+ };
649
+ name: {
650
+ type: string;
651
+ maxLength: number;
652
+ };
653
+ keyword: {
654
+ oneOf: ({
655
+ type: string;
656
+ items?: undefined;
657
+ minItems?: undefined;
658
+ } | {
659
+ type: string;
660
+ items: {
661
+ type: string;
662
+ };
663
+ minItems: number;
664
+ })[];
665
+ };
666
+ steps: {
667
+ type: string;
668
+ items: {
669
+ $ref: string;
670
+ };
671
+ minItems: number;
672
+ };
673
+ };
674
+ };
675
+ UpdateFlow: {
676
+ type: string;
677
+ properties: {
678
+ name: {
679
+ type: string;
680
+ maxLength: number;
681
+ };
682
+ keyword: {
683
+ oneOf: ({
684
+ type: string;
685
+ items?: undefined;
686
+ minItems?: undefined;
687
+ } | {
688
+ type: string;
689
+ items: {
690
+ type: string;
691
+ };
692
+ minItems: number;
693
+ })[];
694
+ };
695
+ steps: {
696
+ type: string;
697
+ items: {
698
+ $ref: string;
699
+ };
700
+ minItems: number;
701
+ };
702
+ };
703
+ };
704
+ FlowInfo: {
705
+ type: string;
706
+ properties: {
707
+ id: {
708
+ type: string;
709
+ };
710
+ name: {
711
+ type: string;
712
+ };
713
+ dynamic: {
714
+ type: string;
715
+ };
716
+ config: {
717
+ $ref: string;
718
+ };
719
+ };
720
+ };
721
+ FlowResponse: {
722
+ type: string;
723
+ properties: {
724
+ message: {
725
+ type: string;
726
+ };
727
+ id: {
728
+ type: string;
729
+ };
730
+ name: {
731
+ type: string;
732
+ };
733
+ dynamic: {
734
+ type: string;
735
+ };
736
+ config: {
737
+ $ref: string;
738
+ };
739
+ };
740
+ };
741
+ CreateBot: {
742
+ type: string;
743
+ required: string[];
744
+ properties: {
745
+ tenantId: {
746
+ type: string;
747
+ pattern: string;
748
+ maxLength: number;
749
+ };
750
+ name: {
751
+ type: string;
752
+ maxLength: number;
753
+ };
754
+ flowIds: {
755
+ type: string;
756
+ items: {
757
+ type: string;
758
+ };
759
+ minItems: number;
760
+ description: string;
761
+ };
762
+ port: {
763
+ type: string;
764
+ minimum: number;
765
+ maximum: number;
766
+ };
767
+ providerOptions: {
768
+ type: string;
769
+ additionalProperties: boolean;
770
+ };
771
+ };
772
+ };
773
+ UpdateBot: {
774
+ type: string;
775
+ properties: {
776
+ name: {
777
+ type: string;
778
+ maxLength: number;
779
+ };
780
+ };
781
+ };
782
+ RestartBot: {
783
+ type: string;
784
+ required: string[];
785
+ properties: {
786
+ flowIds: {
787
+ type: string;
788
+ items: {
789
+ type: string;
790
+ };
791
+ minItems: number;
792
+ };
793
+ port: {
794
+ type: string;
795
+ minimum: number;
796
+ maximum: number;
797
+ };
798
+ name: {
799
+ type: string;
800
+ maxLength: number;
801
+ };
802
+ };
803
+ };
804
+ BotInfo: {
805
+ type: string;
806
+ properties: {
807
+ tenantId: {
808
+ type: string;
809
+ };
810
+ name: {
811
+ type: string;
812
+ };
813
+ status: {
814
+ type: string;
815
+ enum: string[];
816
+ };
817
+ port: {
818
+ type: string;
819
+ };
820
+ createdAt: {
821
+ type: string;
822
+ format: string;
823
+ };
824
+ uptime: {
825
+ type: string;
826
+ description: string;
827
+ };
828
+ };
829
+ };
830
+ BotResponse: {
831
+ type: string;
832
+ properties: {
833
+ message: {
834
+ type: string;
835
+ };
836
+ tenantId: {
837
+ type: string;
838
+ };
839
+ name: {
840
+ type: string;
841
+ };
842
+ status: {
843
+ type: string;
844
+ };
845
+ port: {
846
+ type: string;
847
+ };
848
+ };
849
+ };
850
+ Error: {
851
+ type: string;
852
+ properties: {
853
+ error: {
854
+ type: string;
855
+ };
856
+ details: {
857
+ type: string;
858
+ items: {
859
+ type: string;
860
+ properties: {
861
+ field: {
862
+ type: string;
863
+ };
864
+ message: {
865
+ type: string;
866
+ };
867
+ };
868
+ };
869
+ };
870
+ };
871
+ };
872
+ };
873
+ responses: {
874
+ NotFound: {
875
+ description: string;
876
+ content: {
877
+ 'application/json': {
878
+ schema: {
879
+ $ref: string;
880
+ };
881
+ example: {
882
+ error: string;
883
+ };
884
+ };
885
+ };
886
+ };
887
+ ValidationError: {
888
+ description: string;
889
+ content: {
890
+ 'application/json': {
891
+ schema: {
892
+ $ref: string;
893
+ };
894
+ example: {
895
+ error: string;
896
+ details: {
897
+ field: string;
898
+ message: string;
899
+ }[];
900
+ };
901
+ };
902
+ };
903
+ };
904
+ BadRequest: {
905
+ description: string;
906
+ content: {
907
+ 'application/json': {
908
+ schema: {
909
+ $ref: string;
910
+ };
911
+ example: {
912
+ error: string;
913
+ };
914
+ };
915
+ };
916
+ };
917
+ Conflict: {
918
+ description: string;
919
+ content: {
920
+ 'application/json': {
921
+ schema: {
922
+ $ref: string;
923
+ };
924
+ example: {
925
+ error: string;
926
+ };
927
+ };
928
+ };
929
+ };
930
+ Unauthorized: {
931
+ description: string;
932
+ content: {
933
+ 'application/json': {
934
+ schema: {
935
+ $ref: string;
936
+ };
937
+ example: {
938
+ error: string;
939
+ };
940
+ };
941
+ };
942
+ };
943
+ };
944
+ securitySchemes: {
945
+ ApiKeyAuth: {
946
+ type: string;
947
+ in: string;
948
+ name: string;
949
+ };
950
+ BearerAuth: {
951
+ type: string;
952
+ scheme: string;
953
+ };
954
+ };
955
+ };
956
+ security: ({
957
+ ApiKeyAuth: any[];
958
+ BearerAuth?: undefined;
959
+ } | {
960
+ BearerAuth: any[];
961
+ ApiKeyAuth?: undefined;
962
+ })[];
963
+ };
964
+ /**
965
+ * Generate Swagger UI HTML
966
+ */
967
+ export declare function generateSwaggerHtml(specUrl: string): string;
968
+ //# sourceMappingURL=swagger.d.ts.map