@botpress/api 1.63.0 → 1.66.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,791 @@
1
+ import * as opapi from '@bpinternal/opapi';
2
+ export type State = opapi.State<'Invoice', 'x-workspace-id', 'invoice'>;
3
+ export declare const state: {
4
+ operations: {
5
+ getPlan: {
6
+ name: string;
7
+ description: string;
8
+ method: "get";
9
+ path: string;
10
+ disableDefaultParameters: {
11
+ "x-workspace-id": true;
12
+ };
13
+ parameters: {
14
+ planId: {
15
+ in: "path";
16
+ type: "string";
17
+ description: string;
18
+ };
19
+ };
20
+ response: {
21
+ description: string;
22
+ status: 200;
23
+ schema: {
24
+ type: "object";
25
+ properties: {
26
+ id: {
27
+ type: "string";
28
+ };
29
+ name: {
30
+ type: "string";
31
+ };
32
+ description: {
33
+ type: "string";
34
+ };
35
+ providerProductId: {
36
+ type: "string";
37
+ };
38
+ prices: {
39
+ type: "object";
40
+ additionalProperties: {
41
+ type: "object";
42
+ properties: {
43
+ providerPriceId: {
44
+ type: "string";
45
+ };
46
+ amount: {
47
+ type: "number";
48
+ };
49
+ currency: {
50
+ type: "string";
51
+ enum: string[];
52
+ };
53
+ interval: {
54
+ type: "string";
55
+ enum: string[];
56
+ };
57
+ metadata: {
58
+ type: "object";
59
+ additionalProperties: {
60
+ type: "string";
61
+ };
62
+ };
63
+ };
64
+ required: string[];
65
+ additionalProperties: false;
66
+ };
67
+ };
68
+ features: {
69
+ type: "object";
70
+ additionalProperties: {
71
+ nullable: true;
72
+ };
73
+ };
74
+ metadata: {
75
+ type: "object";
76
+ additionalProperties: {
77
+ type: "string";
78
+ };
79
+ };
80
+ };
81
+ required: string[];
82
+ title: string;
83
+ additionalProperties: false;
84
+ };
85
+ };
86
+ };
87
+ listPlans: {
88
+ name: string;
89
+ description: string;
90
+ method: "get";
91
+ path: string;
92
+ disableDefaultParameters: {
93
+ "x-workspace-id": true;
94
+ };
95
+ response: {
96
+ description: string;
97
+ status: 200;
98
+ schema: {
99
+ type: "array";
100
+ items: {
101
+ type: "object";
102
+ properties: {
103
+ id: {
104
+ type: "string";
105
+ };
106
+ name: {
107
+ type: "string";
108
+ };
109
+ description: {
110
+ type: "string";
111
+ };
112
+ providerProductId: {
113
+ type: "string";
114
+ };
115
+ prices: {
116
+ type: "object";
117
+ additionalProperties: {
118
+ type: "object";
119
+ properties: {
120
+ providerPriceId: {
121
+ type: "string";
122
+ };
123
+ amount: {
124
+ type: "number";
125
+ };
126
+ currency: {
127
+ type: "string";
128
+ enum: string[];
129
+ };
130
+ interval: {
131
+ type: "string";
132
+ enum: string[];
133
+ };
134
+ metadata: {
135
+ type: "object";
136
+ additionalProperties: {
137
+ type: "string";
138
+ };
139
+ };
140
+ };
141
+ required: string[];
142
+ };
143
+ };
144
+ features: {
145
+ type: "object";
146
+ additionalProperties: {
147
+ nullable: true;
148
+ };
149
+ };
150
+ metadata: {
151
+ type: "object";
152
+ additionalProperties: {
153
+ type: "string";
154
+ };
155
+ };
156
+ };
157
+ required: string[];
158
+ };
159
+ title: string;
160
+ };
161
+ };
162
+ parameters: {};
163
+ };
164
+ getAddon: {
165
+ name: string;
166
+ description: string;
167
+ method: "get";
168
+ path: string;
169
+ disableDefaultParameters: {
170
+ "x-workspace-id": true;
171
+ };
172
+ parameters: {
173
+ addonId: {
174
+ in: "path";
175
+ type: "string";
176
+ description: string;
177
+ };
178
+ };
179
+ response: {
180
+ description: string;
181
+ status: 200;
182
+ schema: {
183
+ type: "object";
184
+ properties: {
185
+ id: {
186
+ type: "string";
187
+ };
188
+ name: {
189
+ type: "string";
190
+ };
191
+ description: {
192
+ type: "string";
193
+ };
194
+ providerProductId: {
195
+ type: "string";
196
+ };
197
+ prices: {
198
+ type: "object";
199
+ additionalProperties: {
200
+ type: "object";
201
+ properties: {
202
+ providerPriceId: {
203
+ type: "string";
204
+ };
205
+ amount: {
206
+ type: "number";
207
+ };
208
+ currency: {
209
+ type: "string";
210
+ enum: string[];
211
+ };
212
+ interval: {
213
+ type: "string";
214
+ enum: string[];
215
+ };
216
+ metadata: {
217
+ type: "object";
218
+ additionalProperties: {
219
+ type: "string";
220
+ };
221
+ };
222
+ };
223
+ required: string[];
224
+ additionalProperties: false;
225
+ };
226
+ };
227
+ feature: {
228
+ type: "string";
229
+ enum: string[];
230
+ };
231
+ increment: {
232
+ type: "number";
233
+ };
234
+ metadata: {
235
+ type: "object";
236
+ additionalProperties: {
237
+ type: "string";
238
+ };
239
+ };
240
+ };
241
+ required: string[];
242
+ title: string;
243
+ additionalProperties: false;
244
+ };
245
+ };
246
+ };
247
+ listAddons: {
248
+ name: string;
249
+ description: string;
250
+ method: "get";
251
+ path: string;
252
+ disableDefaultParameters: {
253
+ "x-workspace-id": true;
254
+ };
255
+ response: {
256
+ description: string;
257
+ status: 200;
258
+ schema: {
259
+ type: "array";
260
+ items: {
261
+ type: "object";
262
+ properties: {
263
+ id: {
264
+ type: "string";
265
+ };
266
+ name: {
267
+ type: "string";
268
+ };
269
+ description: {
270
+ type: "string";
271
+ };
272
+ providerProductId: {
273
+ type: "string";
274
+ };
275
+ prices: {
276
+ type: "object";
277
+ additionalProperties: {
278
+ type: "object";
279
+ properties: {
280
+ providerPriceId: {
281
+ type: "string";
282
+ };
283
+ amount: {
284
+ type: "number";
285
+ };
286
+ currency: {
287
+ type: "string";
288
+ enum: string[];
289
+ };
290
+ interval: {
291
+ type: "string";
292
+ enum: string[];
293
+ };
294
+ metadata: {
295
+ type: "object";
296
+ additionalProperties: {
297
+ type: "string";
298
+ };
299
+ };
300
+ };
301
+ required: string[];
302
+ };
303
+ };
304
+ feature: {
305
+ type: "string";
306
+ enum: string[];
307
+ };
308
+ increment: {
309
+ type: "number";
310
+ };
311
+ metadata: {
312
+ type: "object";
313
+ additionalProperties: {
314
+ type: "string";
315
+ };
316
+ };
317
+ };
318
+ required: string[];
319
+ };
320
+ title: string;
321
+ };
322
+ };
323
+ parameters: {};
324
+ };
325
+ listInvoices: {
326
+ name: string;
327
+ description: string;
328
+ method: "get";
329
+ path: string;
330
+ parameters: {
331
+ nextToken: {
332
+ in: "query";
333
+ description: string;
334
+ type: "string";
335
+ };
336
+ "x-workspace-id": {
337
+ in: "header";
338
+ type: "string";
339
+ description: string;
340
+ required: true;
341
+ };
342
+ };
343
+ response: {
344
+ description: string;
345
+ status: 200;
346
+ schema: {
347
+ type: "object";
348
+ properties: {
349
+ invoices: {
350
+ type: "array";
351
+ items: {
352
+ type: "object";
353
+ properties: {
354
+ id: {
355
+ type: "string";
356
+ };
357
+ amount: {
358
+ type: "number";
359
+ };
360
+ currency: {
361
+ type: "string";
362
+ };
363
+ status: {
364
+ type: "string";
365
+ enum: string[];
366
+ };
367
+ createdAt: {
368
+ type: "string";
369
+ };
370
+ periodStart: {
371
+ type: "string";
372
+ nullable: true;
373
+ };
374
+ periodEnd: {
375
+ type: "string";
376
+ nullable: true;
377
+ };
378
+ dueDate: {
379
+ type: "string";
380
+ nullable: true;
381
+ };
382
+ pdfUrl: {
383
+ type: "string";
384
+ nullable: true;
385
+ };
386
+ };
387
+ required: string[];
388
+ };
389
+ };
390
+ meta: {
391
+ type: "object";
392
+ properties: {
393
+ nextToken: {
394
+ type: "string";
395
+ description: string;
396
+ };
397
+ };
398
+ additionalProperties: false;
399
+ };
400
+ };
401
+ required: string[];
402
+ description: string;
403
+ title: string;
404
+ additionalProperties: false;
405
+ };
406
+ };
407
+ };
408
+ payInvoice: {
409
+ name: string;
410
+ description: string;
411
+ method: "post";
412
+ path: string;
413
+ parameters: {
414
+ invoiceId: {
415
+ in: "path";
416
+ type: "string";
417
+ description: string;
418
+ };
419
+ "x-workspace-id": {
420
+ in: "header";
421
+ type: "string";
422
+ description: string;
423
+ required: true;
424
+ };
425
+ };
426
+ requestBody: {
427
+ description: string;
428
+ schema: {
429
+ type: "object";
430
+ properties: {
431
+ idempotencyKey: {
432
+ type: "string";
433
+ };
434
+ };
435
+ title: string;
436
+ additionalProperties: false;
437
+ };
438
+ };
439
+ response: {
440
+ description: string;
441
+ status: 200;
442
+ schema: {
443
+ type: "object";
444
+ properties: {
445
+ id: {
446
+ type: "string";
447
+ };
448
+ amount: {
449
+ type: "number";
450
+ };
451
+ currency: {
452
+ type: "string";
453
+ };
454
+ status: {
455
+ type: "string";
456
+ enum: string[];
457
+ };
458
+ createdAt: {
459
+ type: "string";
460
+ };
461
+ periodStart: {
462
+ type: "string";
463
+ nullable: true;
464
+ };
465
+ periodEnd: {
466
+ type: "string";
467
+ nullable: true;
468
+ };
469
+ dueDate: {
470
+ type: "string";
471
+ nullable: true;
472
+ };
473
+ pdfUrl: {
474
+ type: "string";
475
+ nullable: true;
476
+ };
477
+ };
478
+ required: string[];
479
+ title: string;
480
+ additionalProperties: false;
481
+ };
482
+ };
483
+ };
484
+ getPaymentMethod: {
485
+ name: string;
486
+ description: string;
487
+ method: "get";
488
+ path: string;
489
+ response: {
490
+ description: string;
491
+ status: 200;
492
+ schema: {
493
+ type: "object";
494
+ properties: {
495
+ paymentMethod: {
496
+ type: "object";
497
+ properties: {
498
+ id: {
499
+ type: "string";
500
+ };
501
+ type: {
502
+ type: "string";
503
+ };
504
+ card: {
505
+ type: "object";
506
+ properties: {
507
+ brand: {
508
+ type: "string";
509
+ };
510
+ lastFour: {
511
+ type: "string";
512
+ };
513
+ expMonth: {
514
+ type: "number";
515
+ };
516
+ expYear: {
517
+ type: "number";
518
+ };
519
+ };
520
+ required: string[];
521
+ nullable: true;
522
+ additionalProperties: false;
523
+ };
524
+ };
525
+ required: string[];
526
+ nullable: true;
527
+ additionalProperties: false;
528
+ };
529
+ };
530
+ required: string[];
531
+ title: string;
532
+ additionalProperties: false;
533
+ };
534
+ };
535
+ parameters: {
536
+ "x-workspace-id": {
537
+ in: "header";
538
+ type: "string";
539
+ description: string;
540
+ required: true;
541
+ };
542
+ };
543
+ };
544
+ setPaymentMethod: {
545
+ name: string;
546
+ description: string;
547
+ method: "post";
548
+ path: string;
549
+ requestBody: {
550
+ description: string;
551
+ schema: {
552
+ type: "object";
553
+ properties: {
554
+ paymentMethodId: {
555
+ type: "string";
556
+ description: string;
557
+ };
558
+ };
559
+ required: string[];
560
+ title: string;
561
+ additionalProperties: false;
562
+ };
563
+ };
564
+ response: {
565
+ description: string;
566
+ status: 200;
567
+ schema: {
568
+ type: "object";
569
+ properties: {
570
+ id: {
571
+ type: "string";
572
+ };
573
+ type: {
574
+ type: "string";
575
+ };
576
+ card: {
577
+ type: "object";
578
+ properties: {
579
+ brand: {
580
+ type: "string";
581
+ };
582
+ lastFour: {
583
+ type: "string";
584
+ };
585
+ expMonth: {
586
+ type: "number";
587
+ };
588
+ expYear: {
589
+ type: "number";
590
+ };
591
+ };
592
+ required: string[];
593
+ nullable: true;
594
+ additionalProperties: false;
595
+ };
596
+ };
597
+ required: string[];
598
+ title: string;
599
+ additionalProperties: false;
600
+ };
601
+ };
602
+ parameters: {
603
+ "x-workspace-id": {
604
+ in: "header";
605
+ type: "string";
606
+ description: string;
607
+ required: true;
608
+ };
609
+ };
610
+ };
611
+ createPaymentMethodIntent: {
612
+ name: string;
613
+ description: string;
614
+ method: "post";
615
+ path: string;
616
+ requestBody: {
617
+ description: string;
618
+ schema: {
619
+ type: "object";
620
+ title: string;
621
+ additionalProperties: false;
622
+ };
623
+ };
624
+ response: {
625
+ description: string;
626
+ status: 200;
627
+ schema: {
628
+ type: "object";
629
+ properties: {
630
+ clientSecret: {
631
+ type: "string";
632
+ };
633
+ };
634
+ required: string[];
635
+ title: string;
636
+ additionalProperties: false;
637
+ };
638
+ };
639
+ parameters: {
640
+ "x-workspace-id": {
641
+ in: "header";
642
+ type: "string";
643
+ description: string;
644
+ required: true;
645
+ };
646
+ };
647
+ };
648
+ };
649
+ metadata: {
650
+ title: string;
651
+ description: string;
652
+ server: string;
653
+ version: string;
654
+ prefix: string;
655
+ };
656
+ defaultParameters: {
657
+ "x-workspace-id": {
658
+ in: "header";
659
+ type: "string";
660
+ description: string;
661
+ required: true;
662
+ };
663
+ };
664
+ errors: ({
665
+ status: 500;
666
+ type: string;
667
+ description: string;
668
+ } | {
669
+ status: 401;
670
+ type: string;
671
+ description: string;
672
+ } | {
673
+ status: 403;
674
+ type: string;
675
+ description: string;
676
+ } | {
677
+ status: 413;
678
+ type: string;
679
+ description: string;
680
+ } | {
681
+ status: 400;
682
+ type: string;
683
+ description: string;
684
+ } | {
685
+ status: 415;
686
+ type: string;
687
+ description: string;
688
+ } | {
689
+ status: 405;
690
+ type: string;
691
+ description: string;
692
+ } | {
693
+ status: 404;
694
+ type: string;
695
+ description: string;
696
+ } | {
697
+ status: 409;
698
+ type: string;
699
+ description: string;
700
+ } | {
701
+ status: 410;
702
+ type: string;
703
+ description: string;
704
+ } | {
705
+ status: 429;
706
+ type: string;
707
+ description: string;
708
+ } | {
709
+ status: 402;
710
+ type: string;
711
+ description: string;
712
+ })[];
713
+ refs: {
714
+ parameters: {};
715
+ requestBodies: {
716
+ payInvoiceBody: true;
717
+ setPaymentMethodBody: true;
718
+ createPaymentMethodIntentBody: true;
719
+ };
720
+ responses: {
721
+ getPlanResponse: true;
722
+ listPlansResponse: true;
723
+ getAddonResponse: true;
724
+ listAddonsResponse: true;
725
+ listInvoicesResponse: true;
726
+ payInvoiceResponse: true;
727
+ getPaymentMethodResponse: true;
728
+ setPaymentMethodResponse: true;
729
+ createPaymentMethodIntentResponse: true;
730
+ };
731
+ schemas: {
732
+ Invoice: true;
733
+ };
734
+ };
735
+ schemas: {
736
+ Invoice: {
737
+ section: "invoice";
738
+ schema: {
739
+ type: "object";
740
+ properties: {
741
+ id: {
742
+ type: "string";
743
+ };
744
+ amount: {
745
+ type: "number";
746
+ };
747
+ currency: {
748
+ type: "string";
749
+ };
750
+ status: {
751
+ type: "string";
752
+ enum: string[];
753
+ };
754
+ createdAt: {
755
+ type: "string";
756
+ };
757
+ periodStart: {
758
+ type: "string";
759
+ nullable: true;
760
+ };
761
+ periodEnd: {
762
+ type: "string";
763
+ nullable: true;
764
+ };
765
+ dueDate: {
766
+ type: "string";
767
+ nullable: true;
768
+ };
769
+ pdfUrl: {
770
+ type: "string";
771
+ nullable: true;
772
+ };
773
+ };
774
+ required: string[];
775
+ description: string;
776
+ additionalProperties: false;
777
+ };
778
+ };
779
+ };
780
+ sections: {
781
+ description: string;
782
+ title: string;
783
+ name: "invoice";
784
+ operations: never[];
785
+ schema: string;
786
+ }[];
787
+ options: {
788
+ allowUnions: false;
789
+ };
790
+ security: "BearerAuth"[];
791
+ };