@botpress/api 1.71.0 → 1.72.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.
@@ -1,5 +1,5 @@
1
1
  import * as opapi from '@bpinternal/opapi';
2
- export type State = opapi.State<'Invoice', 'x-workspace-id', 'invoice'>;
2
+ export type State = opapi.State<'Invoice' | 'Subscription' | 'SubscriptionPreview' | 'SubscriptionUpdateParams' | 'SubscriptionDetails' | 'SetPlanParams' | 'SetAddonsParams', 'x-workspace-id', 'invoice' | 'subscription'>;
3
3
  export declare const state: {
4
4
  operations: {
5
5
  getBillingReadonly: {
@@ -61,43 +61,42 @@ export declare const state: {
61
61
  description: {
62
62
  type: "string";
63
63
  };
64
- providerProductId: {
65
- type: "string";
66
- };
67
64
  prices: {
68
65
  type: "object";
69
- additionalProperties: {
70
- type: "object";
71
- properties: {
72
- providerPriceId: {
73
- type: "string";
74
- };
75
- amount: {
76
- type: "number";
77
- };
78
- currency: {
79
- type: "string";
80
- enum: string[];
81
- };
82
- interval: {
83
- type: "string";
84
- enum: string[];
66
+ properties: {
67
+ month: {
68
+ type: "object";
69
+ properties: {
70
+ amount: {
71
+ type: "number";
72
+ };
73
+ currency: {
74
+ type: "string";
75
+ };
85
76
  };
86
- metadata: {
87
- type: "object";
88
- additionalProperties: {
77
+ required: string[];
78
+ additionalProperties: false;
79
+ };
80
+ year: {
81
+ type: "object";
82
+ properties: {
83
+ amount: {
84
+ type: "number";
85
+ };
86
+ currency: {
89
87
  type: "string";
90
88
  };
91
89
  };
90
+ required: string[];
91
+ additionalProperties: false;
92
92
  };
93
- required: string[];
94
- additionalProperties: false;
95
93
  };
94
+ additionalProperties: false;
96
95
  };
97
96
  features: {
98
97
  type: "object";
99
98
  additionalProperties: {
100
- nullable: true;
99
+ type: "number";
101
100
  };
102
101
  };
103
102
  metadata: {
@@ -138,42 +137,39 @@ export declare const state: {
138
137
  description: {
139
138
  type: "string";
140
139
  };
141
- providerProductId: {
142
- type: "string";
143
- };
144
140
  prices: {
145
141
  type: "object";
146
- additionalProperties: {
147
- type: "object";
148
- properties: {
149
- providerPriceId: {
150
- type: "string";
151
- };
152
- amount: {
153
- type: "number";
154
- };
155
- currency: {
156
- type: "string";
157
- enum: string[];
158
- };
159
- interval: {
160
- type: "string";
161
- enum: string[];
142
+ properties: {
143
+ month: {
144
+ type: "object";
145
+ properties: {
146
+ amount: {
147
+ type: "number";
148
+ };
149
+ currency: {
150
+ type: "string";
151
+ };
162
152
  };
163
- metadata: {
164
- type: "object";
165
- additionalProperties: {
153
+ required: string[];
154
+ };
155
+ year: {
156
+ type: "object";
157
+ properties: {
158
+ amount: {
159
+ type: "number";
160
+ };
161
+ currency: {
166
162
  type: "string";
167
163
  };
168
164
  };
165
+ required: string[];
169
166
  };
170
- required: string[];
171
167
  };
172
168
  };
173
169
  features: {
174
170
  type: "object";
175
171
  additionalProperties: {
176
- nullable: true;
172
+ type: "number";
177
173
  };
178
174
  };
179
175
  metadata: {
@@ -184,6 +180,7 @@ export declare const state: {
184
180
  };
185
181
  };
186
182
  required: string[];
183
+ title: string;
187
184
  };
188
185
  title: string;
189
186
  };
@@ -220,38 +217,8 @@ export declare const state: {
220
217
  description: {
221
218
  type: "string";
222
219
  };
223
- providerProductId: {
224
- type: "string";
225
- };
226
- prices: {
227
- type: "object";
228
- additionalProperties: {
229
- type: "object";
230
- properties: {
231
- providerPriceId: {
232
- type: "string";
233
- };
234
- amount: {
235
- type: "number";
236
- };
237
- currency: {
238
- type: "string";
239
- enum: string[];
240
- };
241
- interval: {
242
- type: "string";
243
- enum: string[];
244
- };
245
- metadata: {
246
- type: "object";
247
- additionalProperties: {
248
- type: "string";
249
- };
250
- };
251
- };
252
- required: string[];
253
- additionalProperties: false;
254
- };
220
+ price: {
221
+ type: "number";
255
222
  };
256
223
  feature: {
257
224
  type: "string";
@@ -298,37 +265,8 @@ export declare const state: {
298
265
  description: {
299
266
  type: "string";
300
267
  };
301
- providerProductId: {
302
- type: "string";
303
- };
304
- prices: {
305
- type: "object";
306
- additionalProperties: {
307
- type: "object";
308
- properties: {
309
- providerPriceId: {
310
- type: "string";
311
- };
312
- amount: {
313
- type: "number";
314
- };
315
- currency: {
316
- type: "string";
317
- enum: string[];
318
- };
319
- interval: {
320
- type: "string";
321
- enum: string[];
322
- };
323
- metadata: {
324
- type: "object";
325
- additionalProperties: {
326
- type: "string";
327
- };
328
- };
329
- };
330
- required: string[];
331
- };
268
+ price: {
269
+ type: "number";
332
270
  };
333
271
  feature: {
334
272
  type: "string";
@@ -345,106 +283,133 @@ export declare const state: {
345
283
  };
346
284
  };
347
285
  required: string[];
286
+ title: string;
348
287
  };
349
288
  title: string;
350
289
  };
351
290
  };
352
291
  parameters: {};
353
292
  };
354
- listInvoices: {
293
+ getCurrentSubscription: {
355
294
  name: string;
356
295
  description: string;
357
296
  method: "get";
358
297
  path: string;
359
- parameters: {
360
- nextToken: {
361
- in: "query";
362
- description: string;
363
- type: "string";
364
- };
365
- "x-workspace-id": {
366
- in: "header";
367
- type: "string";
368
- description: string;
369
- required: true;
370
- };
371
- };
372
298
  response: {
373
299
  description: string;
374
300
  status: 200;
375
301
  schema: {
376
302
  type: "object";
377
303
  properties: {
378
- invoices: {
379
- type: "array";
380
- items: {
381
- type: "object";
382
- properties: {
383
- id: {
384
- type: "string";
385
- };
386
- amount: {
387
- type: "number";
388
- };
389
- currency: {
390
- type: "string";
391
- };
392
- status: {
393
- type: "string";
394
- enum: string[];
395
- };
396
- createdAt: {
397
- type: "string";
398
- };
399
- periodStart: {
400
- type: "string";
401
- nullable: true;
402
- };
403
- periodEnd: {
404
- type: "string";
405
- nullable: true;
406
- };
407
- dueDate: {
408
- type: "string";
409
- nullable: true;
304
+ plan: {
305
+ type: "object";
306
+ properties: {
307
+ current: {
308
+ type: "object";
309
+ properties: {
310
+ status: {
311
+ type: "string";
312
+ enum: string[];
313
+ };
314
+ planId: {
315
+ type: "string";
316
+ };
317
+ interval: {
318
+ type: "string";
319
+ enum: string[];
320
+ };
321
+ price: {
322
+ type: "number";
323
+ };
324
+ proratedPrice: {
325
+ type: "number";
326
+ };
327
+ cancelAtPeriodEnd: {
328
+ type: "boolean";
329
+ };
330
+ periodEnd: {
331
+ type: "string";
332
+ };
410
333
  };
411
- pdfUrl: {
412
- type: "string";
413
- nullable: true;
334
+ required: string[];
335
+ additionalProperties: false;
336
+ };
337
+ next: {
338
+ type: "object";
339
+ properties: {
340
+ planId: {
341
+ type: "string";
342
+ };
343
+ interval: {
344
+ type: "string";
345
+ enum: string[];
346
+ };
347
+ price: {
348
+ type: "number";
349
+ nullable: true;
350
+ };
351
+ effectiveDate: {
352
+ type: "string";
353
+ };
414
354
  };
355
+ required: string[];
356
+ nullable: true;
357
+ additionalProperties: false;
415
358
  };
416
- required: string[];
417
359
  };
360
+ required: string[];
361
+ additionalProperties: false;
418
362
  };
419
- meta: {
363
+ addons: {
420
364
  type: "object";
421
- properties: {
422
- nextToken: {
423
- type: "string";
424
- description: string;
365
+ additionalProperties: {
366
+ type: "object";
367
+ properties: {
368
+ current: {
369
+ type: "object";
370
+ properties: {
371
+ quantity: {
372
+ type: "number";
373
+ };
374
+ price: {
375
+ type: "number";
376
+ };
377
+ proratedPrice: {
378
+ type: "number";
379
+ };
380
+ };
381
+ required: string[];
382
+ additionalProperties: false;
383
+ };
384
+ next: {
385
+ type: "object";
386
+ properties: {
387
+ quantity: {
388
+ type: "number";
389
+ };
390
+ price: {
391
+ type: "number";
392
+ };
393
+ effectiveDate: {
394
+ type: "string";
395
+ };
396
+ };
397
+ required: string[];
398
+ nullable: true;
399
+ additionalProperties: false;
400
+ };
425
401
  };
402
+ required: string[];
403
+ additionalProperties: false;
426
404
  };
427
- additionalProperties: false;
428
405
  };
429
406
  };
430
407
  required: string[];
431
- description: string;
432
408
  title: string;
433
409
  additionalProperties: false;
434
410
  };
435
411
  };
436
- };
437
- payInvoice: {
438
- name: string;
439
- description: string;
440
- method: "post";
441
- path: string;
442
412
  parameters: {
443
- invoiceId: {
444
- in: "path";
445
- type: "string";
446
- description: string;
447
- };
448
413
  "x-workspace-id": {
449
414
  in: "header";
450
415
  type: "string";
@@ -452,65 +417,8 @@ export declare const state: {
452
417
  required: true;
453
418
  };
454
419
  };
455
- requestBody: {
456
- description: string;
457
- schema: {
458
- type: "object";
459
- properties: {
460
- idempotencyKey: {
461
- type: "string";
462
- };
463
- };
464
- title: string;
465
- additionalProperties: false;
466
- };
467
- };
468
- response: {
469
- description: string;
470
- status: 200;
471
- schema: {
472
- type: "object";
473
- properties: {
474
- id: {
475
- type: "string";
476
- };
477
- amount: {
478
- type: "number";
479
- };
480
- currency: {
481
- type: "string";
482
- };
483
- status: {
484
- type: "string";
485
- enum: string[];
486
- };
487
- createdAt: {
488
- type: "string";
489
- };
490
- periodStart: {
491
- type: "string";
492
- nullable: true;
493
- };
494
- periodEnd: {
495
- type: "string";
496
- nullable: true;
497
- };
498
- dueDate: {
499
- type: "string";
500
- nullable: true;
501
- };
502
- pdfUrl: {
503
- type: "string";
504
- nullable: true;
505
- };
506
- };
507
- required: string[];
508
- title: string;
509
- additionalProperties: false;
510
- };
511
- };
512
420
  };
513
- getPaymentMethod: {
421
+ getNextSubscription: {
514
422
  name: string;
515
423
  description: string;
516
424
  method: "get";
@@ -521,29 +429,55 @@ export declare const state: {
521
429
  schema: {
522
430
  type: "object";
523
431
  properties: {
524
- paymentMethod: {
432
+ plan: {
525
433
  type: "object";
526
434
  properties: {
527
- id: {
528
- type: "string";
529
- };
530
- type: {
531
- type: "string";
532
- };
533
- card: {
435
+ current: {
534
436
  type: "object";
535
437
  properties: {
536
- brand: {
438
+ status: {
537
439
  type: "string";
440
+ enum: string[];
538
441
  };
539
- lastFour: {
442
+ planId: {
540
443
  type: "string";
541
444
  };
542
- expMonth: {
445
+ interval: {
446
+ type: "string";
447
+ enum: string[];
448
+ };
449
+ price: {
543
450
  type: "number";
544
451
  };
545
- expYear: {
452
+ proratedPrice: {
453
+ type: "number";
454
+ };
455
+ cancelAtPeriodEnd: {
456
+ type: "boolean";
457
+ };
458
+ periodEnd: {
459
+ type: "string";
460
+ };
461
+ };
462
+ required: string[];
463
+ additionalProperties: false;
464
+ };
465
+ next: {
466
+ type: "object";
467
+ properties: {
468
+ planId: {
469
+ type: "string";
470
+ };
471
+ interval: {
472
+ type: "string";
473
+ enum: string[];
474
+ };
475
+ price: {
546
476
  type: "number";
477
+ nullable: true;
478
+ };
479
+ effectiveDate: {
480
+ type: "string";
547
481
  };
548
482
  };
549
483
  required: string[];
@@ -552,9 +486,51 @@ export declare const state: {
552
486
  };
553
487
  };
554
488
  required: string[];
555
- nullable: true;
556
489
  additionalProperties: false;
557
490
  };
491
+ addons: {
492
+ type: "object";
493
+ additionalProperties: {
494
+ type: "object";
495
+ properties: {
496
+ current: {
497
+ type: "object";
498
+ properties: {
499
+ quantity: {
500
+ type: "number";
501
+ };
502
+ price: {
503
+ type: "number";
504
+ };
505
+ proratedPrice: {
506
+ type: "number";
507
+ };
508
+ };
509
+ required: string[];
510
+ additionalProperties: false;
511
+ };
512
+ next: {
513
+ type: "object";
514
+ properties: {
515
+ quantity: {
516
+ type: "number";
517
+ };
518
+ price: {
519
+ type: "number";
520
+ };
521
+ effectiveDate: {
522
+ type: "string";
523
+ };
524
+ };
525
+ required: string[];
526
+ nullable: true;
527
+ additionalProperties: false;
528
+ };
529
+ };
530
+ required: string[];
531
+ additionalProperties: false;
532
+ };
533
+ };
558
534
  };
559
535
  required: string[];
560
536
  title: string;
@@ -570,7 +546,7 @@ export declare const state: {
570
546
  };
571
547
  };
572
548
  };
573
- setPaymentMethod: {
549
+ previewSubscriptionUpdate: {
574
550
  name: string;
575
551
  description: string;
576
552
  method: "post";
@@ -580,8 +556,27 @@ export declare const state: {
580
556
  schema: {
581
557
  type: "object";
582
558
  properties: {
583
- paymentMethodId: {
584
- type: "string";
559
+ plan: {
560
+ type: "object";
561
+ properties: {
562
+ planId: {
563
+ type: "string";
564
+ description: string;
565
+ };
566
+ interval: {
567
+ type: "string";
568
+ enum: string[];
569
+ description: string;
570
+ };
571
+ };
572
+ required: string[];
573
+ additionalProperties: false;
574
+ };
575
+ addons: {
576
+ type: "object";
577
+ additionalProperties: {
578
+ type: "number";
579
+ };
585
580
  description: string;
586
581
  };
587
582
  };
@@ -596,34 +591,174 @@ export declare const state: {
596
591
  schema: {
597
592
  type: "object";
598
593
  properties: {
599
- id: {
600
- type: "string";
594
+ subscription: {
595
+ type: "object";
596
+ properties: {
597
+ plan: {
598
+ type: "object";
599
+ properties: {
600
+ planId: {
601
+ type: "string";
602
+ };
603
+ interval: {
604
+ type: "string";
605
+ enum: string[];
606
+ };
607
+ effectiveDate: {
608
+ type: "string";
609
+ };
610
+ };
611
+ required: string[];
612
+ additionalProperties: false;
613
+ };
614
+ addons: {
615
+ type: "object";
616
+ additionalProperties: {
617
+ type: "object";
618
+ properties: {
619
+ quantity: {
620
+ type: "number";
621
+ };
622
+ effectiveDate: {
623
+ type: "string";
624
+ };
625
+ };
626
+ required: string[];
627
+ additionalProperties: false;
628
+ };
629
+ };
630
+ };
631
+ required: string[];
632
+ additionalProperties: false;
601
633
  };
602
- type: {
634
+ changeType: {
603
635
  type: "string";
636
+ enum: string[];
604
637
  };
605
- card: {
638
+ costs: {
606
639
  type: "object";
607
640
  properties: {
608
- brand: {
609
- type: "string";
610
- };
611
- lastFour: {
612
- type: "string";
641
+ immediate: {
642
+ type: "object";
643
+ properties: {
644
+ total: {
645
+ type: "number";
646
+ };
647
+ lineItems: {
648
+ type: "array";
649
+ items: {
650
+ type: "object";
651
+ properties: {
652
+ type: {
653
+ type: "string";
654
+ enum: string[];
655
+ };
656
+ id: {
657
+ type: "string";
658
+ };
659
+ description: {
660
+ type: "string";
661
+ };
662
+ amount: {
663
+ type: "number";
664
+ };
665
+ quantity: {
666
+ type: "number";
667
+ };
668
+ };
669
+ required: string[];
670
+ description: string;
671
+ };
672
+ };
673
+ };
674
+ required: string[];
675
+ description: string;
676
+ additionalProperties: false;
613
677
  };
614
- expMonth: {
615
- type: "number";
678
+ monthly: {
679
+ type: "object";
680
+ properties: {
681
+ total: {
682
+ type: "number";
683
+ };
684
+ lineItems: {
685
+ type: "array";
686
+ items: {
687
+ type: "object";
688
+ properties: {
689
+ type: {
690
+ type: "string";
691
+ enum: string[];
692
+ };
693
+ id: {
694
+ type: "string";
695
+ };
696
+ description: {
697
+ type: "string";
698
+ };
699
+ amount: {
700
+ type: "number";
701
+ };
702
+ quantity: {
703
+ type: "number";
704
+ };
705
+ };
706
+ required: string[];
707
+ description: string;
708
+ };
709
+ };
710
+ };
711
+ required: string[];
712
+ description: string;
713
+ additionalProperties: false;
616
714
  };
617
- expYear: {
618
- type: "number";
715
+ yearly: {
716
+ type: "object";
717
+ properties: {
718
+ total: {
719
+ type: "number";
720
+ };
721
+ lineItems: {
722
+ type: "array";
723
+ items: {
724
+ type: "object";
725
+ properties: {
726
+ type: {
727
+ type: "string";
728
+ enum: string[];
729
+ };
730
+ id: {
731
+ type: "string";
732
+ };
733
+ description: {
734
+ type: "string";
735
+ };
736
+ amount: {
737
+ type: "number";
738
+ };
739
+ quantity: {
740
+ type: "number";
741
+ };
742
+ };
743
+ required: string[];
744
+ description: string;
745
+ };
746
+ };
747
+ };
748
+ required: string[];
749
+ description: string;
750
+ additionalProperties: false;
619
751
  };
620
752
  };
621
753
  required: string[];
622
- nullable: true;
623
754
  additionalProperties: false;
624
755
  };
756
+ currentPeriodEnd: {
757
+ type: "string";
758
+ };
625
759
  };
626
760
  required: string[];
761
+ description: string;
627
762
  title: string;
628
763
  additionalProperties: false;
629
764
  };
@@ -637,15 +772,29 @@ export declare const state: {
637
772
  };
638
773
  };
639
774
  };
640
- createPaymentMethodIntent: {
775
+ setPlan: {
641
776
  name: string;
642
777
  description: string;
643
- method: "post";
778
+ method: "put";
644
779
  path: string;
645
780
  requestBody: {
646
781
  description: string;
647
782
  schema: {
648
783
  type: "object";
784
+ properties: {
785
+ planId: {
786
+ type: "string";
787
+ };
788
+ interval: {
789
+ type: "string";
790
+ enum: string[];
791
+ };
792
+ testReferenceTime: {
793
+ type: "number";
794
+ };
795
+ };
796
+ required: string[];
797
+ description: string;
649
798
  title: string;
650
799
  additionalProperties: false;
651
800
  };
@@ -656,39 +805,633 @@ export declare const state: {
656
805
  schema: {
657
806
  type: "object";
658
807
  properties: {
659
- clientSecret: {
660
- type: "string";
661
- };
662
- };
663
- required: string[];
664
- title: string;
665
- additionalProperties: false;
666
- };
667
- };
668
- parameters: {
669
- "x-workspace-id": {
670
- in: "header";
671
- type: "string";
672
- description: string;
673
- required: true;
674
- };
675
- };
676
- };
677
- };
678
- metadata: {
679
- title: string;
680
- description: string;
681
- server: string;
682
- version: string;
683
- prefix: string;
684
- };
685
- defaultParameters: {
686
- "x-workspace-id": {
687
- in: "header";
688
- type: "string";
689
- description: string;
690
- required: true;
691
- };
808
+ plan: {
809
+ type: "object";
810
+ properties: {
811
+ current: {
812
+ type: "object";
813
+ properties: {
814
+ status: {
815
+ type: "string";
816
+ enum: string[];
817
+ };
818
+ planId: {
819
+ type: "string";
820
+ };
821
+ interval: {
822
+ type: "string";
823
+ enum: string[];
824
+ };
825
+ price: {
826
+ type: "number";
827
+ };
828
+ proratedPrice: {
829
+ type: "number";
830
+ };
831
+ cancelAtPeriodEnd: {
832
+ type: "boolean";
833
+ };
834
+ periodEnd: {
835
+ type: "string";
836
+ };
837
+ };
838
+ required: string[];
839
+ additionalProperties: false;
840
+ };
841
+ next: {
842
+ type: "object";
843
+ properties: {
844
+ planId: {
845
+ type: "string";
846
+ };
847
+ interval: {
848
+ type: "string";
849
+ enum: string[];
850
+ };
851
+ price: {
852
+ type: "number";
853
+ nullable: true;
854
+ };
855
+ effectiveDate: {
856
+ type: "string";
857
+ };
858
+ };
859
+ required: string[];
860
+ nullable: true;
861
+ additionalProperties: false;
862
+ };
863
+ };
864
+ required: string[];
865
+ additionalProperties: false;
866
+ };
867
+ addons: {
868
+ type: "object";
869
+ additionalProperties: {
870
+ type: "object";
871
+ properties: {
872
+ current: {
873
+ type: "object";
874
+ properties: {
875
+ quantity: {
876
+ type: "number";
877
+ };
878
+ price: {
879
+ type: "number";
880
+ };
881
+ proratedPrice: {
882
+ type: "number";
883
+ };
884
+ };
885
+ required: string[];
886
+ additionalProperties: false;
887
+ };
888
+ next: {
889
+ type: "object";
890
+ properties: {
891
+ quantity: {
892
+ type: "number";
893
+ };
894
+ price: {
895
+ type: "number";
896
+ };
897
+ effectiveDate: {
898
+ type: "string";
899
+ };
900
+ };
901
+ required: string[];
902
+ nullable: true;
903
+ additionalProperties: false;
904
+ };
905
+ };
906
+ required: string[];
907
+ additionalProperties: false;
908
+ };
909
+ };
910
+ };
911
+ required: string[];
912
+ description: string;
913
+ title: string;
914
+ additionalProperties: false;
915
+ };
916
+ };
917
+ parameters: {
918
+ "x-workspace-id": {
919
+ in: "header";
920
+ type: "string";
921
+ description: string;
922
+ required: true;
923
+ };
924
+ };
925
+ };
926
+ setAddons: {
927
+ name: string;
928
+ description: string;
929
+ method: "patch";
930
+ path: string;
931
+ requestBody: {
932
+ description: string;
933
+ schema: {
934
+ type: "object";
935
+ properties: {
936
+ addons: {
937
+ type: "object";
938
+ additionalProperties: {
939
+ type: "number";
940
+ };
941
+ };
942
+ };
943
+ required: string[];
944
+ description: string;
945
+ title: string;
946
+ additionalProperties: false;
947
+ };
948
+ };
949
+ response: {
950
+ description: string;
951
+ status: 200;
952
+ schema: {
953
+ type: "object";
954
+ properties: {
955
+ plan: {
956
+ type: "object";
957
+ properties: {
958
+ current: {
959
+ type: "object";
960
+ properties: {
961
+ status: {
962
+ type: "string";
963
+ enum: string[];
964
+ };
965
+ planId: {
966
+ type: "string";
967
+ };
968
+ interval: {
969
+ type: "string";
970
+ enum: string[];
971
+ };
972
+ price: {
973
+ type: "number";
974
+ };
975
+ proratedPrice: {
976
+ type: "number";
977
+ };
978
+ cancelAtPeriodEnd: {
979
+ type: "boolean";
980
+ };
981
+ periodEnd: {
982
+ type: "string";
983
+ };
984
+ };
985
+ required: string[];
986
+ additionalProperties: false;
987
+ };
988
+ next: {
989
+ type: "object";
990
+ properties: {
991
+ planId: {
992
+ type: "string";
993
+ };
994
+ interval: {
995
+ type: "string";
996
+ enum: string[];
997
+ };
998
+ price: {
999
+ type: "number";
1000
+ nullable: true;
1001
+ };
1002
+ effectiveDate: {
1003
+ type: "string";
1004
+ };
1005
+ };
1006
+ required: string[];
1007
+ nullable: true;
1008
+ additionalProperties: false;
1009
+ };
1010
+ };
1011
+ required: string[];
1012
+ additionalProperties: false;
1013
+ };
1014
+ addons: {
1015
+ type: "object";
1016
+ additionalProperties: {
1017
+ type: "object";
1018
+ properties: {
1019
+ current: {
1020
+ type: "object";
1021
+ properties: {
1022
+ quantity: {
1023
+ type: "number";
1024
+ };
1025
+ price: {
1026
+ type: "number";
1027
+ };
1028
+ proratedPrice: {
1029
+ type: "number";
1030
+ };
1031
+ };
1032
+ required: string[];
1033
+ additionalProperties: false;
1034
+ };
1035
+ next: {
1036
+ type: "object";
1037
+ properties: {
1038
+ quantity: {
1039
+ type: "number";
1040
+ };
1041
+ price: {
1042
+ type: "number";
1043
+ };
1044
+ effectiveDate: {
1045
+ type: "string";
1046
+ };
1047
+ };
1048
+ required: string[];
1049
+ nullable: true;
1050
+ additionalProperties: false;
1051
+ };
1052
+ };
1053
+ required: string[];
1054
+ additionalProperties: false;
1055
+ };
1056
+ };
1057
+ };
1058
+ required: string[];
1059
+ description: string;
1060
+ title: string;
1061
+ additionalProperties: false;
1062
+ };
1063
+ };
1064
+ parameters: {
1065
+ "x-workspace-id": {
1066
+ in: "header";
1067
+ type: "string";
1068
+ description: string;
1069
+ required: true;
1070
+ };
1071
+ };
1072
+ };
1073
+ listInvoices: {
1074
+ name: string;
1075
+ description: string;
1076
+ method: "get";
1077
+ path: string;
1078
+ parameters: {
1079
+ nextToken: {
1080
+ in: "query";
1081
+ description: string;
1082
+ type: "string";
1083
+ };
1084
+ "x-workspace-id": {
1085
+ in: "header";
1086
+ type: "string";
1087
+ description: string;
1088
+ required: true;
1089
+ };
1090
+ };
1091
+ response: {
1092
+ description: string;
1093
+ status: 200;
1094
+ schema: {
1095
+ type: "object";
1096
+ properties: {
1097
+ invoices: {
1098
+ type: "array";
1099
+ items: {
1100
+ type: "object";
1101
+ properties: {
1102
+ id: {
1103
+ type: "string";
1104
+ };
1105
+ amount: {
1106
+ type: "number";
1107
+ };
1108
+ currency: {
1109
+ type: "string";
1110
+ };
1111
+ status: {
1112
+ type: "string";
1113
+ enum: string[];
1114
+ };
1115
+ createdAt: {
1116
+ type: "string";
1117
+ };
1118
+ periodStart: {
1119
+ type: "string";
1120
+ nullable: true;
1121
+ };
1122
+ periodEnd: {
1123
+ type: "string";
1124
+ nullable: true;
1125
+ };
1126
+ dueDate: {
1127
+ type: "string";
1128
+ nullable: true;
1129
+ };
1130
+ pdfUrl: {
1131
+ type: "string";
1132
+ nullable: true;
1133
+ };
1134
+ };
1135
+ required: string[];
1136
+ };
1137
+ };
1138
+ meta: {
1139
+ type: "object";
1140
+ properties: {
1141
+ nextToken: {
1142
+ type: "string";
1143
+ description: string;
1144
+ };
1145
+ };
1146
+ additionalProperties: false;
1147
+ };
1148
+ };
1149
+ required: string[];
1150
+ title: string;
1151
+ additionalProperties: false;
1152
+ };
1153
+ };
1154
+ };
1155
+ payInvoice: {
1156
+ name: string;
1157
+ description: string;
1158
+ method: "post";
1159
+ path: string;
1160
+ parameters: {
1161
+ invoiceId: {
1162
+ in: "path";
1163
+ type: "string";
1164
+ description: string;
1165
+ };
1166
+ "x-workspace-id": {
1167
+ in: "header";
1168
+ type: "string";
1169
+ description: string;
1170
+ required: true;
1171
+ };
1172
+ };
1173
+ requestBody: {
1174
+ description: string;
1175
+ schema: {
1176
+ type: "object";
1177
+ properties: {
1178
+ idempotencyKey: {
1179
+ type: "string";
1180
+ };
1181
+ };
1182
+ title: string;
1183
+ additionalProperties: false;
1184
+ };
1185
+ };
1186
+ response: {
1187
+ description: string;
1188
+ status: 200;
1189
+ schema: {
1190
+ type: "object";
1191
+ properties: {
1192
+ id: {
1193
+ type: "string";
1194
+ };
1195
+ amount: {
1196
+ type: "number";
1197
+ };
1198
+ currency: {
1199
+ type: "string";
1200
+ };
1201
+ status: {
1202
+ type: "string";
1203
+ enum: string[];
1204
+ };
1205
+ createdAt: {
1206
+ type: "string";
1207
+ };
1208
+ periodStart: {
1209
+ type: "string";
1210
+ nullable: true;
1211
+ };
1212
+ periodEnd: {
1213
+ type: "string";
1214
+ nullable: true;
1215
+ };
1216
+ dueDate: {
1217
+ type: "string";
1218
+ nullable: true;
1219
+ };
1220
+ pdfUrl: {
1221
+ type: "string";
1222
+ nullable: true;
1223
+ };
1224
+ };
1225
+ required: string[];
1226
+ title: string;
1227
+ additionalProperties: false;
1228
+ };
1229
+ };
1230
+ };
1231
+ getPaymentMethod: {
1232
+ name: string;
1233
+ description: string;
1234
+ method: "get";
1235
+ path: string;
1236
+ response: {
1237
+ description: string;
1238
+ status: 200;
1239
+ schema: {
1240
+ type: "object";
1241
+ properties: {
1242
+ paymentMethod: {
1243
+ type: "object";
1244
+ properties: {
1245
+ id: {
1246
+ type: "string";
1247
+ };
1248
+ type: {
1249
+ type: "string";
1250
+ };
1251
+ card: {
1252
+ type: "object";
1253
+ properties: {
1254
+ brand: {
1255
+ type: "string";
1256
+ };
1257
+ lastFour: {
1258
+ type: "string";
1259
+ };
1260
+ expMonth: {
1261
+ type: "number";
1262
+ };
1263
+ expYear: {
1264
+ type: "number";
1265
+ };
1266
+ };
1267
+ required: string[];
1268
+ nullable: true;
1269
+ additionalProperties: false;
1270
+ };
1271
+ };
1272
+ required: string[];
1273
+ nullable: true;
1274
+ additionalProperties: false;
1275
+ };
1276
+ };
1277
+ required: string[];
1278
+ title: string;
1279
+ additionalProperties: false;
1280
+ };
1281
+ };
1282
+ parameters: {
1283
+ "x-workspace-id": {
1284
+ in: "header";
1285
+ type: "string";
1286
+ description: string;
1287
+ required: true;
1288
+ };
1289
+ };
1290
+ };
1291
+ setPaymentMethod: {
1292
+ name: string;
1293
+ description: string;
1294
+ method: "post";
1295
+ path: string;
1296
+ requestBody: {
1297
+ description: string;
1298
+ schema: {
1299
+ type: "object";
1300
+ properties: {
1301
+ paymentMethodId: {
1302
+ type: "string";
1303
+ description: string;
1304
+ };
1305
+ };
1306
+ required: string[];
1307
+ title: string;
1308
+ additionalProperties: false;
1309
+ };
1310
+ };
1311
+ response: {
1312
+ description: string;
1313
+ status: 200;
1314
+ schema: {
1315
+ type: "object";
1316
+ properties: {
1317
+ id: {
1318
+ type: "string";
1319
+ };
1320
+ type: {
1321
+ type: "string";
1322
+ };
1323
+ card: {
1324
+ type: "object";
1325
+ properties: {
1326
+ brand: {
1327
+ type: "string";
1328
+ };
1329
+ lastFour: {
1330
+ type: "string";
1331
+ };
1332
+ expMonth: {
1333
+ type: "number";
1334
+ };
1335
+ expYear: {
1336
+ type: "number";
1337
+ };
1338
+ };
1339
+ required: string[];
1340
+ nullable: true;
1341
+ additionalProperties: false;
1342
+ };
1343
+ };
1344
+ required: string[];
1345
+ title: string;
1346
+ additionalProperties: false;
1347
+ };
1348
+ };
1349
+ parameters: {
1350
+ "x-workspace-id": {
1351
+ in: "header";
1352
+ type: "string";
1353
+ description: string;
1354
+ required: true;
1355
+ };
1356
+ };
1357
+ };
1358
+ createPaymentMethodIntent: {
1359
+ name: string;
1360
+ description: string;
1361
+ method: "post";
1362
+ path: string;
1363
+ requestBody: {
1364
+ description: string;
1365
+ schema: {
1366
+ type: "object";
1367
+ title: string;
1368
+ additionalProperties: false;
1369
+ };
1370
+ };
1371
+ response: {
1372
+ description: string;
1373
+ status: 200;
1374
+ schema: {
1375
+ type: "object";
1376
+ properties: {
1377
+ clientSecret: {
1378
+ type: "string";
1379
+ };
1380
+ };
1381
+ required: string[];
1382
+ title: string;
1383
+ additionalProperties: false;
1384
+ };
1385
+ };
1386
+ parameters: {
1387
+ "x-workspace-id": {
1388
+ in: "header";
1389
+ type: "string";
1390
+ description: string;
1391
+ required: true;
1392
+ };
1393
+ };
1394
+ };
1395
+ getQuotas: {
1396
+ name: string;
1397
+ description: string;
1398
+ method: "get";
1399
+ path: string;
1400
+ response: {
1401
+ description: string;
1402
+ status: 200;
1403
+ schema: {
1404
+ type: "object";
1405
+ additionalProperties: {
1406
+ type: "number";
1407
+ };
1408
+ title: string;
1409
+ };
1410
+ };
1411
+ parameters: {
1412
+ "x-workspace-id": {
1413
+ in: "header";
1414
+ type: "string";
1415
+ description: string;
1416
+ required: true;
1417
+ };
1418
+ };
1419
+ };
1420
+ };
1421
+ metadata: {
1422
+ title: string;
1423
+ description: string;
1424
+ server: string;
1425
+ version: string;
1426
+ prefix: string;
1427
+ };
1428
+ defaultParameters: {
1429
+ "x-workspace-id": {
1430
+ in: "header";
1431
+ type: "string";
1432
+ description: string;
1433
+ required: true;
1434
+ };
692
1435
  };
693
1436
  errors: ({
694
1437
  status: 500;
@@ -746,6 +1489,9 @@ export declare const state: {
746
1489
  refs: {
747
1490
  parameters: {};
748
1491
  requestBodies: {
1492
+ previewSubscriptionUpdateBody: true;
1493
+ setPlanBody: true;
1494
+ setAddonsBody: true;
749
1495
  payInvoiceBody: true;
750
1496
  setPaymentMethodBody: true;
751
1497
  createPaymentMethodIntentBody: true;
@@ -756,53 +1502,472 @@ export declare const state: {
756
1502
  listPlansResponse: true;
757
1503
  getAddonResponse: true;
758
1504
  listAddonsResponse: true;
1505
+ getCurrentSubscriptionResponse: true;
1506
+ getNextSubscriptionResponse: true;
1507
+ previewSubscriptionUpdateResponse: true;
1508
+ setPlanResponse: true;
1509
+ setAddonsResponse: true;
759
1510
  listInvoicesResponse: true;
760
1511
  payInvoiceResponse: true;
761
1512
  getPaymentMethodResponse: true;
762
1513
  setPaymentMethodResponse: true;
763
1514
  createPaymentMethodIntentResponse: true;
1515
+ getQuotasResponse: true;
764
1516
  };
765
1517
  schemas: {
766
1518
  Invoice: true;
1519
+ Subscription: true;
1520
+ SubscriptionPreview: true;
1521
+ SubscriptionUpdateParams: true;
1522
+ SubscriptionDetails: true;
1523
+ SetPlanParams: true;
1524
+ SetAddonsParams: true;
1525
+ };
1526
+ };
1527
+ schemas: {
1528
+ Invoice: {
1529
+ section: "invoice";
1530
+ schema: {
1531
+ type: "object";
1532
+ properties: {
1533
+ id: {
1534
+ type: "string";
1535
+ };
1536
+ amount: {
1537
+ type: "number";
1538
+ };
1539
+ currency: {
1540
+ type: "string";
1541
+ };
1542
+ status: {
1543
+ type: "string";
1544
+ enum: string[];
1545
+ };
1546
+ createdAt: {
1547
+ type: "string";
1548
+ };
1549
+ periodStart: {
1550
+ type: "string";
1551
+ nullable: true;
1552
+ };
1553
+ periodEnd: {
1554
+ type: "string";
1555
+ nullable: true;
1556
+ };
1557
+ dueDate: {
1558
+ type: "string";
1559
+ nullable: true;
1560
+ };
1561
+ pdfUrl: {
1562
+ type: "string";
1563
+ nullable: true;
1564
+ };
1565
+ };
1566
+ required: string[];
1567
+ additionalProperties: false;
1568
+ };
1569
+ };
1570
+ Subscription: {
1571
+ section: "subscription";
1572
+ schema: {
1573
+ type: "object";
1574
+ properties: {
1575
+ plan: {
1576
+ type: "object";
1577
+ properties: {
1578
+ current: {
1579
+ type: "object";
1580
+ properties: {
1581
+ status: {
1582
+ type: "string";
1583
+ enum: string[];
1584
+ };
1585
+ planId: {
1586
+ type: "string";
1587
+ };
1588
+ interval: {
1589
+ type: "string";
1590
+ enum: string[];
1591
+ };
1592
+ price: {
1593
+ type: "number";
1594
+ };
1595
+ proratedPrice: {
1596
+ type: "number";
1597
+ };
1598
+ cancelAtPeriodEnd: {
1599
+ type: "boolean";
1600
+ };
1601
+ periodEnd: {
1602
+ type: "string";
1603
+ };
1604
+ };
1605
+ required: string[];
1606
+ additionalProperties: false;
1607
+ };
1608
+ next: {
1609
+ type: "object";
1610
+ properties: {
1611
+ planId: {
1612
+ type: "string";
1613
+ };
1614
+ interval: {
1615
+ type: "string";
1616
+ enum: string[];
1617
+ };
1618
+ price: {
1619
+ type: "number";
1620
+ nullable: true;
1621
+ };
1622
+ effectiveDate: {
1623
+ type: "string";
1624
+ };
1625
+ };
1626
+ required: string[];
1627
+ nullable: true;
1628
+ additionalProperties: false;
1629
+ };
1630
+ };
1631
+ required: string[];
1632
+ additionalProperties: false;
1633
+ };
1634
+ addons: {
1635
+ type: "object";
1636
+ additionalProperties: {
1637
+ type: "object";
1638
+ properties: {
1639
+ current: {
1640
+ type: "object";
1641
+ properties: {
1642
+ quantity: {
1643
+ type: "number";
1644
+ };
1645
+ price: {
1646
+ type: "number";
1647
+ };
1648
+ proratedPrice: {
1649
+ type: "number";
1650
+ };
1651
+ };
1652
+ required: string[];
1653
+ additionalProperties: false;
1654
+ };
1655
+ next: {
1656
+ type: "object";
1657
+ properties: {
1658
+ quantity: {
1659
+ type: "number";
1660
+ };
1661
+ price: {
1662
+ type: "number";
1663
+ };
1664
+ effectiveDate: {
1665
+ type: "string";
1666
+ };
1667
+ };
1668
+ required: string[];
1669
+ nullable: true;
1670
+ additionalProperties: false;
1671
+ };
1672
+ };
1673
+ required: string[];
1674
+ additionalProperties: false;
1675
+ };
1676
+ };
1677
+ };
1678
+ required: string[];
1679
+ additionalProperties: false;
1680
+ };
767
1681
  };
768
- };
769
- schemas: {
770
- Invoice: {
771
- section: "invoice";
1682
+ SubscriptionPreview: {
1683
+ section: "subscription";
772
1684
  schema: {
773
1685
  type: "object";
774
1686
  properties: {
775
- id: {
776
- type: "string";
1687
+ plan: {
1688
+ type: "object";
1689
+ properties: {
1690
+ current: {
1691
+ type: "object";
1692
+ properties: {
1693
+ status: {
1694
+ type: "string";
1695
+ enum: string[];
1696
+ };
1697
+ planId: {
1698
+ type: "string";
1699
+ };
1700
+ interval: {
1701
+ type: "string";
1702
+ enum: string[];
1703
+ };
1704
+ price: {
1705
+ type: "number";
1706
+ };
1707
+ proratedPrice: {
1708
+ type: "number";
1709
+ };
1710
+ cancelAtPeriodEnd: {
1711
+ type: "boolean";
1712
+ };
1713
+ periodEnd: {
1714
+ type: "string";
1715
+ };
1716
+ };
1717
+ required: string[];
1718
+ additionalProperties: false;
1719
+ };
1720
+ next: {
1721
+ type: "object";
1722
+ properties: {
1723
+ planId: {
1724
+ type: "string";
1725
+ };
1726
+ interval: {
1727
+ type: "string";
1728
+ enum: string[];
1729
+ };
1730
+ price: {
1731
+ type: "number";
1732
+ nullable: true;
1733
+ };
1734
+ effectiveDate: {
1735
+ type: "string";
1736
+ };
1737
+ };
1738
+ required: string[];
1739
+ nullable: true;
1740
+ additionalProperties: false;
1741
+ };
1742
+ };
1743
+ required: string[];
1744
+ additionalProperties: false;
777
1745
  };
778
- amount: {
779
- type: "number";
1746
+ addons: {
1747
+ type: "object";
1748
+ additionalProperties: {
1749
+ type: "object";
1750
+ properties: {
1751
+ current: {
1752
+ type: "object";
1753
+ properties: {
1754
+ quantity: {
1755
+ type: "number";
1756
+ };
1757
+ price: {
1758
+ type: "number";
1759
+ };
1760
+ proratedPrice: {
1761
+ type: "number";
1762
+ };
1763
+ };
1764
+ required: string[];
1765
+ additionalProperties: false;
1766
+ };
1767
+ next: {
1768
+ type: "object";
1769
+ properties: {
1770
+ quantity: {
1771
+ type: "number";
1772
+ };
1773
+ price: {
1774
+ type: "number";
1775
+ };
1776
+ effectiveDate: {
1777
+ type: "string";
1778
+ };
1779
+ };
1780
+ required: string[];
1781
+ nullable: true;
1782
+ additionalProperties: false;
1783
+ };
1784
+ };
1785
+ required: string[];
1786
+ additionalProperties: false;
1787
+ };
780
1788
  };
781
- currency: {
782
- type: "string";
1789
+ };
1790
+ required: string[];
1791
+ additionalProperties: false;
1792
+ };
1793
+ };
1794
+ SubscriptionUpdateParams: {
1795
+ section: "subscription";
1796
+ schema: {
1797
+ type: "object";
1798
+ properties: {
1799
+ plan: {
1800
+ type: "object";
1801
+ properties: {
1802
+ planId: {
1803
+ type: "string";
1804
+ description: string;
1805
+ };
1806
+ interval: {
1807
+ type: "string";
1808
+ enum: string[];
1809
+ description: string;
1810
+ };
1811
+ };
1812
+ required: string[];
1813
+ additionalProperties: false;
783
1814
  };
784
- status: {
785
- type: "string";
786
- enum: string[];
1815
+ addons: {
1816
+ type: "object";
1817
+ additionalProperties: {
1818
+ type: "number";
1819
+ };
1820
+ description: string;
787
1821
  };
788
- createdAt: {
789
- type: "string";
1822
+ };
1823
+ required: string[];
1824
+ additionalProperties: false;
1825
+ };
1826
+ };
1827
+ SubscriptionDetails: {
1828
+ section: "subscription";
1829
+ schema: {
1830
+ type: "object";
1831
+ properties: {
1832
+ plan: {
1833
+ type: "object";
1834
+ properties: {
1835
+ current: {
1836
+ type: "object";
1837
+ properties: {
1838
+ status: {
1839
+ type: "string";
1840
+ enum: string[];
1841
+ };
1842
+ planId: {
1843
+ type: "string";
1844
+ };
1845
+ interval: {
1846
+ type: "string";
1847
+ enum: string[];
1848
+ };
1849
+ price: {
1850
+ type: "number";
1851
+ };
1852
+ proratedPrice: {
1853
+ type: "number";
1854
+ };
1855
+ cancelAtPeriodEnd: {
1856
+ type: "boolean";
1857
+ };
1858
+ periodEnd: {
1859
+ type: "string";
1860
+ };
1861
+ };
1862
+ required: string[];
1863
+ additionalProperties: false;
1864
+ };
1865
+ next: {
1866
+ type: "object";
1867
+ properties: {
1868
+ planId: {
1869
+ type: "string";
1870
+ };
1871
+ interval: {
1872
+ type: "string";
1873
+ enum: string[];
1874
+ };
1875
+ price: {
1876
+ type: "number";
1877
+ nullable: true;
1878
+ };
1879
+ effectiveDate: {
1880
+ type: "string";
1881
+ };
1882
+ };
1883
+ required: string[];
1884
+ nullable: true;
1885
+ additionalProperties: false;
1886
+ };
1887
+ };
1888
+ required: string[];
1889
+ additionalProperties: false;
790
1890
  };
791
- periodStart: {
792
- type: "string";
793
- nullable: true;
1891
+ addons: {
1892
+ type: "object";
1893
+ additionalProperties: {
1894
+ type: "object";
1895
+ properties: {
1896
+ current: {
1897
+ type: "object";
1898
+ properties: {
1899
+ quantity: {
1900
+ type: "number";
1901
+ };
1902
+ price: {
1903
+ type: "number";
1904
+ };
1905
+ proratedPrice: {
1906
+ type: "number";
1907
+ };
1908
+ };
1909
+ required: string[];
1910
+ additionalProperties: false;
1911
+ };
1912
+ next: {
1913
+ type: "object";
1914
+ properties: {
1915
+ quantity: {
1916
+ type: "number";
1917
+ };
1918
+ price: {
1919
+ type: "number";
1920
+ };
1921
+ effectiveDate: {
1922
+ type: "string";
1923
+ };
1924
+ };
1925
+ required: string[];
1926
+ nullable: true;
1927
+ additionalProperties: false;
1928
+ };
1929
+ };
1930
+ required: string[];
1931
+ additionalProperties: false;
1932
+ };
794
1933
  };
795
- periodEnd: {
1934
+ };
1935
+ required: string[];
1936
+ description: string;
1937
+ additionalProperties: false;
1938
+ };
1939
+ };
1940
+ SetPlanParams: {
1941
+ section: "subscription";
1942
+ schema: {
1943
+ type: "object";
1944
+ properties: {
1945
+ planId: {
796
1946
  type: "string";
797
- nullable: true;
798
1947
  };
799
- dueDate: {
1948
+ interval: {
800
1949
  type: "string";
801
- nullable: true;
1950
+ enum: string[];
802
1951
  };
803
- pdfUrl: {
804
- type: "string";
805
- nullable: true;
1952
+ testReferenceTime: {
1953
+ type: "number";
1954
+ };
1955
+ };
1956
+ required: string[];
1957
+ description: string;
1958
+ additionalProperties: false;
1959
+ };
1960
+ };
1961
+ SetAddonsParams: {
1962
+ section: "subscription";
1963
+ schema: {
1964
+ type: "object";
1965
+ properties: {
1966
+ addons: {
1967
+ type: "object";
1968
+ additionalProperties: {
1969
+ type: "number";
1970
+ };
806
1971
  };
807
1972
  };
808
1973
  required: string[];
@@ -811,13 +1976,19 @@ export declare const state: {
811
1976
  };
812
1977
  };
813
1978
  };
814
- sections: {
1979
+ sections: ({
815
1980
  description: string;
816
1981
  title: string;
817
1982
  name: "invoice";
818
1983
  operations: never[];
819
1984
  schema: string;
820
- }[];
1985
+ } | {
1986
+ description: string;
1987
+ title: string;
1988
+ name: "subscription";
1989
+ operations: never[];
1990
+ schema: string;
1991
+ })[];
821
1992
  options: {
822
1993
  allowUnions: false;
823
1994
  };