@botpress/api 1.70.2 → 1.71.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -279357,13 +279357,95 @@ var state = {
279357
279357
  "required": false
279358
279358
  }
279359
279359
  }
279360
+ },
279361
+ "captureObservation": {
279362
+ "name": "captureObservation",
279363
+ "description": "Capture a bot runtime observation. Does not support integration observations yet.",
279364
+ "method": "post",
279365
+ "path": "/v1/chat/observations",
279366
+ "requestBody": {
279367
+ "description": "Add an event to the analytics",
279368
+ "schema": {
279369
+ "type": "object",
279370
+ "properties": {
279371
+ "name": {
279372
+ "type": "string",
279373
+ "description": "Name of the observation"
279374
+ },
279375
+ "data": {
279376
+ "type": "object",
279377
+ "additionalProperties": true,
279378
+ "description": "Data of the observation"
279379
+ },
279380
+ "messageId": {
279381
+ "type": "string",
279382
+ "description": "ID of the message associated with the observation"
279383
+ },
279384
+ "eventId": {
279385
+ "type": "string",
279386
+ "description": "ID of the event associated with the observation"
279387
+ },
279388
+ "conversationId": {
279389
+ "type": "string",
279390
+ "description": "ID of the conversation associated with the observation"
279391
+ },
279392
+ "userId": {
279393
+ "type": "string",
279394
+ "description": "ID of the user associated with the observation"
279395
+ },
279396
+ "errorId": {
279397
+ "type": "string",
279398
+ "description": "ID of the error associated with the observation"
279399
+ },
279400
+ "traceId": {
279401
+ "type": "string",
279402
+ "description": "ID of the trace associated with the observation"
279403
+ }
279404
+ },
279405
+ "required": [
279406
+ "name",
279407
+ "data"
279408
+ ],
279409
+ "title": "captureObservationBody",
279410
+ "additionalProperties": false
279411
+ }
279412
+ },
279413
+ "response": {
279414
+ "description": "Success",
279415
+ "status": 200,
279416
+ "schema": {
279417
+ "type": "object",
279418
+ "title": "captureObservationResponse",
279419
+ "additionalProperties": false
279420
+ }
279421
+ },
279422
+ "parameters": {
279423
+ "x-bot-id": {
279424
+ "in": "header",
279425
+ "description": "Bot id",
279426
+ "type": "string",
279427
+ "required": true
279428
+ },
279429
+ "x-integration-id": {
279430
+ "in": "header",
279431
+ "description": "Integration id",
279432
+ "type": "string",
279433
+ "required": false
279434
+ },
279435
+ "x-integration-alias": {
279436
+ "in": "header",
279437
+ "description": "Integration alias",
279438
+ "type": "string",
279439
+ "required": false
279440
+ }
279441
+ }
279360
279442
  }
279361
279443
  },
279362
279444
  "metadata": {
279363
279445
  "title": "Botpress Runtime API",
279364
279446
  "description": "API for Botpress Runtime",
279365
279447
  "server": "https://api.botpress.cloud",
279366
- "version": "1.70.2",
279448
+ "version": "1.71.1",
279367
279449
  "prefix": "v1"
279368
279450
  },
279369
279451
  "defaultParameters": {
@@ -279545,7 +279627,8 @@ var state = {
279545
279627
  "createWorkflowBody": true,
279546
279628
  "updateWorkflowBody": true,
279547
279629
  "getOrCreateWorkflowBody": true,
279548
- "trackAnalyticsBody": true
279630
+ "trackAnalyticsBody": true,
279631
+ "captureObservationBody": true
279549
279632
  },
279550
279633
  "responses": {
279551
279634
  "createConversationResponse": true,
@@ -279595,7 +279678,8 @@ var state = {
279595
279678
  "listWorkflowsResponse": true,
279596
279679
  "getOrCreateWorkflowResponse": true,
279597
279680
  "listTagValuesResponse": true,
279598
- "trackAnalyticsResponse": true
279681
+ "trackAnalyticsResponse": true,
279682
+ "captureObservationResponse": true
279599
279683
  },
279600
279684
  "schemas": {
279601
279685
  "User": true,
@@ -295787,7 +295871,7 @@ var state2 = {
295787
295871
  "title": "Botpress Admin API",
295788
295872
  "description": "API for Botpress Cloud Manager",
295789
295873
  "server": "https://api.botpress.cloud",
295790
- "version": "1.70.2",
295874
+ "version": "1.71.1",
295791
295875
  "prefix": "v1"
295792
295876
  },
295793
295877
  "defaultParameters": {
@@ -301296,7 +301380,7 @@ var state3 = {
301296
301380
  "title": "Botpress Files API",
301297
301381
  "description": "API for Botpress Files",
301298
301382
  "server": "https://api.botpress.cloud",
301299
- "version": "1.70.2",
301383
+ "version": "1.71.1",
301300
301384
  "prefix": "v1"
301301
301385
  },
301302
301386
  "defaultParameters": {
@@ -303592,7 +303676,7 @@ var state4 = {
303592
303676
  "title": "Botpress Tables API",
303593
303677
  "description": "API for Botpress Tables",
303594
303678
  "server": "https://api.botpress.cloud",
303595
- "version": "1.70.2",
303679
+ "version": "1.71.1",
303596
303680
  "prefix": "v1"
303597
303681
  },
303598
303682
  "defaultParameters": {
@@ -307370,6 +307454,69 @@ var state5 = {
307370
307454
  },
307371
307455
  "parameters": {}
307372
307456
  },
307457
+ "captureObservation": {
307458
+ "name": "captureObservation",
307459
+ "description": "Capture a bot runtime observation. Does not support integration observations yet.",
307460
+ "method": "post",
307461
+ "path": "/v1/chat/observations",
307462
+ "requestBody": {
307463
+ "description": "Add an event to the analytics",
307464
+ "schema": {
307465
+ "type": "object",
307466
+ "properties": {
307467
+ "name": {
307468
+ "type": "string",
307469
+ "description": "Name of the observation"
307470
+ },
307471
+ "data": {
307472
+ "type": "object",
307473
+ "additionalProperties": true,
307474
+ "description": "Data of the observation"
307475
+ },
307476
+ "messageId": {
307477
+ "type": "string",
307478
+ "description": "ID of the message associated with the observation"
307479
+ },
307480
+ "eventId": {
307481
+ "type": "string",
307482
+ "description": "ID of the event associated with the observation"
307483
+ },
307484
+ "conversationId": {
307485
+ "type": "string",
307486
+ "description": "ID of the conversation associated with the observation"
307487
+ },
307488
+ "userId": {
307489
+ "type": "string",
307490
+ "description": "ID of the user associated with the observation"
307491
+ },
307492
+ "errorId": {
307493
+ "type": "string",
307494
+ "description": "ID of the error associated with the observation"
307495
+ },
307496
+ "traceId": {
307497
+ "type": "string",
307498
+ "description": "ID of the trace associated with the observation"
307499
+ }
307500
+ },
307501
+ "required": [
307502
+ "name",
307503
+ "data"
307504
+ ],
307505
+ "title": "captureObservationBody",
307506
+ "additionalProperties": false
307507
+ }
307508
+ },
307509
+ "response": {
307510
+ "description": "Success",
307511
+ "status": 200,
307512
+ "schema": {
307513
+ "type": "object",
307514
+ "title": "captureObservationResponse",
307515
+ "additionalProperties": false
307516
+ }
307517
+ },
307518
+ "parameters": {}
307519
+ },
307373
307520
  "runVrl": {
307374
307521
  "name": "runVrl",
307375
307522
  "description": "Run a VRL script",
@@ -325003,7 +325150,7 @@ var state5 = {
325003
325150
  "title": "Botpress API",
325004
325151
  "description": "API for Botpress Cloud",
325005
325152
  "server": "https://api.botpress.cloud",
325006
- "version": "1.70.2",
325153
+ "version": "1.71.1",
325007
325154
  "prefix": "v1"
325008
325155
  },
325009
325156
  "errors": [
@@ -325166,6 +325313,7 @@ var state5 = {
325166
325313
  "updateWorkflowBody": true,
325167
325314
  "getOrCreateWorkflowBody": true,
325168
325315
  "trackAnalyticsBody": true,
325316
+ "captureObservationBody": true,
325169
325317
  "runVrlBody": true,
325170
325318
  "updateAccountBody": true,
325171
325319
  "deleteAccountBody": true,
@@ -325266,6 +325414,7 @@ var state5 = {
325266
325414
  "getOrCreateWorkflowResponse": true,
325267
325415
  "listTagValuesResponse": true,
325268
325416
  "trackAnalyticsResponse": true,
325417
+ "captureObservationResponse": true,
325269
325418
  "runVrlResponse": true,
325270
325419
  "getAccountResponse": true,
325271
325420
  "updateAccountResponse": true,
@@ -329507,53 +329656,48 @@ var state6 = {
329507
329656
  "description": {
329508
329657
  "type": "string"
329509
329658
  },
329510
- "providerProductId": {
329511
- "type": "string"
329512
- },
329513
329659
  "prices": {
329514
329660
  "type": "object",
329515
- "additionalProperties": {
329516
- "type": "object",
329517
- "properties": {
329518
- "providerPriceId": {
329519
- "type": "string"
329520
- },
329521
- "amount": {
329522
- "type": "number"
329523
- },
329524
- "currency": {
329525
- "type": "string",
329526
- "enum": [
329527
- "usd"
329528
- ]
329529
- },
329530
- "interval": {
329531
- "type": "string",
329532
- "enum": [
329533
- "month",
329534
- "year"
329535
- ]
329536
- },
329537
- "metadata": {
329538
- "type": "object",
329539
- "additionalProperties": {
329661
+ "properties": {
329662
+ "month": {
329663
+ "type": "object",
329664
+ "properties": {
329665
+ "amount": {
329666
+ "type": "number"
329667
+ },
329668
+ "currency": {
329540
329669
  "type": "string"
329541
329670
  }
329542
- }
329671
+ },
329672
+ "required": [
329673
+ "amount",
329674
+ "currency"
329675
+ ],
329676
+ "additionalProperties": false
329543
329677
  },
329544
- "required": [
329545
- "providerPriceId",
329546
- "amount",
329547
- "currency",
329548
- "interval"
329549
- ],
329550
- "additionalProperties": false
329551
- }
329678
+ "year": {
329679
+ "type": "object",
329680
+ "properties": {
329681
+ "amount": {
329682
+ "type": "number"
329683
+ },
329684
+ "currency": {
329685
+ "type": "string"
329686
+ }
329687
+ },
329688
+ "required": [
329689
+ "amount",
329690
+ "currency"
329691
+ ],
329692
+ "additionalProperties": false
329693
+ }
329694
+ },
329695
+ "additionalProperties": false
329552
329696
  },
329553
329697
  "features": {
329554
329698
  "type": "object",
329555
329699
  "additionalProperties": {
329556
- "nullable": true
329700
+ "type": "number"
329557
329701
  }
329558
329702
  },
329559
329703
  "metadata": {
@@ -329567,7 +329711,6 @@ var state6 = {
329567
329711
  "id",
329568
329712
  "name",
329569
329713
  "description",
329570
- "providerProductId",
329571
329714
  "prices",
329572
329715
  "features"
329573
329716
  ],
@@ -329601,52 +329744,45 @@ var state6 = {
329601
329744
  "description": {
329602
329745
  "type": "string"
329603
329746
  },
329604
- "providerProductId": {
329605
- "type": "string"
329606
- },
329607
329747
  "prices": {
329608
329748
  "type": "object",
329609
- "additionalProperties": {
329610
- "type": "object",
329611
- "properties": {
329612
- "providerPriceId": {
329613
- "type": "string"
329614
- },
329615
- "amount": {
329616
- "type": "number"
329617
- },
329618
- "currency": {
329619
- "type": "string",
329620
- "enum": [
329621
- "usd"
329622
- ]
329623
- },
329624
- "interval": {
329625
- "type": "string",
329626
- "enum": [
329627
- "month",
329628
- "year"
329629
- ]
329630
- },
329631
- "metadata": {
329632
- "type": "object",
329633
- "additionalProperties": {
329749
+ "properties": {
329750
+ "month": {
329751
+ "type": "object",
329752
+ "properties": {
329753
+ "amount": {
329754
+ "type": "number"
329755
+ },
329756
+ "currency": {
329634
329757
  "type": "string"
329635
329758
  }
329636
- }
329759
+ },
329760
+ "required": [
329761
+ "amount",
329762
+ "currency"
329763
+ ]
329637
329764
  },
329638
- "required": [
329639
- "providerPriceId",
329640
- "amount",
329641
- "currency",
329642
- "interval"
329643
- ]
329765
+ "year": {
329766
+ "type": "object",
329767
+ "properties": {
329768
+ "amount": {
329769
+ "type": "number"
329770
+ },
329771
+ "currency": {
329772
+ "type": "string"
329773
+ }
329774
+ },
329775
+ "required": [
329776
+ "amount",
329777
+ "currency"
329778
+ ]
329779
+ }
329644
329780
  }
329645
329781
  },
329646
329782
  "features": {
329647
329783
  "type": "object",
329648
329784
  "additionalProperties": {
329649
- "nullable": true
329785
+ "type": "number"
329650
329786
  }
329651
329787
  },
329652
329788
  "metadata": {
@@ -329660,10 +329796,10 @@ var state6 = {
329660
329796
  "id",
329661
329797
  "name",
329662
329798
  "description",
329663
- "providerProductId",
329664
329799
  "prices",
329665
329800
  "features"
329666
- ]
329801
+ ],
329802
+ "title": "getPlanResponse"
329667
329803
  },
329668
329804
  "title": "listPlansResponse"
329669
329805
  }
@@ -329700,48 +329836,8 @@ var state6 = {
329700
329836
  "description": {
329701
329837
  "type": "string"
329702
329838
  },
329703
- "providerProductId": {
329704
- "type": "string"
329705
- },
329706
- "prices": {
329707
- "type": "object",
329708
- "additionalProperties": {
329709
- "type": "object",
329710
- "properties": {
329711
- "providerPriceId": {
329712
- "type": "string"
329713
- },
329714
- "amount": {
329715
- "type": "number"
329716
- },
329717
- "currency": {
329718
- "type": "string",
329719
- "enum": [
329720
- "usd"
329721
- ]
329722
- },
329723
- "interval": {
329724
- "type": "string",
329725
- "enum": [
329726
- "month",
329727
- "year"
329728
- ]
329729
- },
329730
- "metadata": {
329731
- "type": "object",
329732
- "additionalProperties": {
329733
- "type": "string"
329734
- }
329735
- }
329736
- },
329737
- "required": [
329738
- "providerPriceId",
329739
- "amount",
329740
- "currency",
329741
- "interval"
329742
- ],
329743
- "additionalProperties": false
329744
- }
329839
+ "price": {
329840
+ "type": "number"
329745
329841
  },
329746
329842
  "feature": {
329747
329843
  "type": "string",
@@ -329775,8 +329871,7 @@ var state6 = {
329775
329871
  "id",
329776
329872
  "name",
329777
329873
  "description",
329778
- "providerProductId",
329779
- "prices",
329874
+ "price",
329780
329875
  "feature",
329781
329876
  "increment"
329782
329877
  ],
@@ -329810,26 +329905,262 @@ var state6 = {
329810
329905
  "description": {
329811
329906
  "type": "string"
329812
329907
  },
329813
- "providerProductId": {
329814
- "type": "string"
329908
+ "price": {
329909
+ "type": "number"
329815
329910
  },
329816
- "prices": {
329911
+ "feature": {
329912
+ "type": "string",
329913
+ "enum": [
329914
+ "human_in_the_loop",
329915
+ "ratelimit",
329916
+ "incoming_messages_events",
329917
+ "integration_spend",
329918
+ "integration_subscription",
329919
+ "table_rows",
329920
+ "bot_count",
329921
+ "always_alive_count",
329922
+ "always_alive_concurrency",
329923
+ "collaborator_count",
329924
+ "file_storage",
329925
+ "vector_db_storage",
329926
+ "saved_versions"
329927
+ ]
329928
+ },
329929
+ "increment": {
329930
+ "type": "number"
329931
+ },
329932
+ "metadata": {
329817
329933
  "type": "object",
329818
329934
  "additionalProperties": {
329935
+ "type": "string"
329936
+ }
329937
+ }
329938
+ },
329939
+ "required": [
329940
+ "id",
329941
+ "name",
329942
+ "description",
329943
+ "price",
329944
+ "feature",
329945
+ "increment"
329946
+ ],
329947
+ "title": "getAddonResponse"
329948
+ },
329949
+ "title": "listAddonsResponse"
329950
+ }
329951
+ },
329952
+ "parameters": {}
329953
+ },
329954
+ "getCurrentSubscription": {
329955
+ "name": "getCurrentSubscription",
329956
+ "description": "Get current subscription for a workspace",
329957
+ "method": "get",
329958
+ "path": "/v2/billing/subscriptions/current",
329959
+ "response": {
329960
+ "description": "Current subscription details",
329961
+ "status": 200,
329962
+ "schema": {
329963
+ "type": "object",
329964
+ "properties": {
329965
+ "plan": {
329966
+ "type": "object",
329967
+ "properties": {
329968
+ "current": {
329819
329969
  "type": "object",
329820
329970
  "properties": {
329821
- "providerPriceId": {
329971
+ "status": {
329972
+ "type": "string",
329973
+ "enum": [
329974
+ "active",
329975
+ "canceled",
329976
+ "past_due",
329977
+ "action_required",
329978
+ "grace_period"
329979
+ ]
329980
+ },
329981
+ "planId": {
329822
329982
  "type": "string"
329823
329983
  },
329824
- "amount": {
329984
+ "interval": {
329985
+ "type": "string",
329986
+ "enum": [
329987
+ "month",
329988
+ "year"
329989
+ ]
329990
+ },
329991
+ "price": {
329825
329992
  "type": "number"
329826
329993
  },
329827
- "currency": {
329994
+ "proratedPrice": {
329995
+ "type": "number"
329996
+ },
329997
+ "cancelAtPeriodEnd": {
329998
+ "type": "boolean"
329999
+ },
330000
+ "periodEnd": {
330001
+ "type": "string"
330002
+ }
330003
+ },
330004
+ "required": [
330005
+ "status",
330006
+ "planId",
330007
+ "interval",
330008
+ "price",
330009
+ "cancelAtPeriodEnd",
330010
+ "periodEnd"
330011
+ ],
330012
+ "additionalProperties": false
330013
+ },
330014
+ "next": {
330015
+ "type": "object",
330016
+ "properties": {
330017
+ "planId": {
330018
+ "type": "string"
330019
+ },
330020
+ "interval": {
330021
+ "type": "string",
330022
+ "enum": [
330023
+ "month",
330024
+ "year"
330025
+ ]
330026
+ },
330027
+ "price": {
330028
+ "type": "number",
330029
+ "nullable": true
330030
+ },
330031
+ "effectiveDate": {
330032
+ "type": "string"
330033
+ }
330034
+ },
330035
+ "required": [
330036
+ "planId",
330037
+ "interval",
330038
+ "price",
330039
+ "effectiveDate"
330040
+ ],
330041
+ "nullable": true,
330042
+ "additionalProperties": false
330043
+ }
330044
+ },
330045
+ "required": [
330046
+ "current",
330047
+ "next"
330048
+ ],
330049
+ "additionalProperties": false
330050
+ },
330051
+ "addons": {
330052
+ "type": "object",
330053
+ "additionalProperties": {
330054
+ "type": "object",
330055
+ "properties": {
330056
+ "current": {
330057
+ "type": "object",
330058
+ "properties": {
330059
+ "quantity": {
330060
+ "type": "number"
330061
+ },
330062
+ "price": {
330063
+ "type": "number"
330064
+ },
330065
+ "proratedPrice": {
330066
+ "type": "number"
330067
+ }
330068
+ },
330069
+ "required": [
330070
+ "quantity",
330071
+ "price"
330072
+ ],
330073
+ "additionalProperties": false
330074
+ },
330075
+ "next": {
330076
+ "type": "object",
330077
+ "properties": {
330078
+ "quantity": {
330079
+ "type": "number"
330080
+ },
330081
+ "price": {
330082
+ "type": "number"
330083
+ },
330084
+ "effectiveDate": {
330085
+ "type": "string"
330086
+ }
330087
+ },
330088
+ "required": [
330089
+ "quantity",
330090
+ "price",
330091
+ "effectiveDate"
330092
+ ],
330093
+ "nullable": true,
330094
+ "additionalProperties": false
330095
+ }
330096
+ },
330097
+ "required": [
330098
+ "current",
330099
+ "next"
330100
+ ],
330101
+ "additionalProperties": false
330102
+ }
330103
+ },
330104
+ "yearlyTotal": {
330105
+ "type": "number"
330106
+ },
330107
+ "monthlyTotal": {
330108
+ "type": "number"
330109
+ },
330110
+ "proratedTotal": {
330111
+ "type": "number"
330112
+ }
330113
+ },
330114
+ "required": [
330115
+ "plan",
330116
+ "addons",
330117
+ "yearlyTotal",
330118
+ "monthlyTotal",
330119
+ "proratedTotal"
330120
+ ],
330121
+ "title": "getCurrentSubscriptionResponse",
330122
+ "additionalProperties": false
330123
+ }
330124
+ },
330125
+ "parameters": {
330126
+ "x-workspace-id": {
330127
+ "in": "header",
330128
+ "type": "string",
330129
+ "description": "Workspace ID",
330130
+ "required": true
330131
+ }
330132
+ }
330133
+ },
330134
+ "getNextSubscription": {
330135
+ "name": "getNextSubscription",
330136
+ "description": "Get next subscription details for a workspace",
330137
+ "method": "get",
330138
+ "path": "/v2/billing/subscriptions/next",
330139
+ "response": {
330140
+ "description": "Next subscription details",
330141
+ "status": 200,
330142
+ "schema": {
330143
+ "type": "object",
330144
+ "properties": {
330145
+ "plan": {
330146
+ "type": "object",
330147
+ "properties": {
330148
+ "current": {
330149
+ "type": "object",
330150
+ "properties": {
330151
+ "status": {
329828
330152
  "type": "string",
329829
330153
  "enum": [
329830
- "usd"
330154
+ "active",
330155
+ "canceled",
330156
+ "past_due",
330157
+ "action_required",
330158
+ "grace_period"
329831
330159
  ]
329832
330160
  },
330161
+ "planId": {
330162
+ "type": "string"
330163
+ },
329833
330164
  "interval": {
329834
330165
  "type": "string",
329835
330166
  "enum": [
@@ -329837,63 +330168,854 @@ var state6 = {
329837
330168
  "year"
329838
330169
  ]
329839
330170
  },
329840
- "metadata": {
329841
- "type": "object",
329842
- "additionalProperties": {
330171
+ "price": {
330172
+ "type": "number"
330173
+ },
330174
+ "proratedPrice": {
330175
+ "type": "number"
330176
+ },
330177
+ "cancelAtPeriodEnd": {
330178
+ "type": "boolean"
330179
+ },
330180
+ "periodEnd": {
330181
+ "type": "string"
330182
+ }
330183
+ },
330184
+ "required": [
330185
+ "status",
330186
+ "planId",
330187
+ "interval",
330188
+ "price",
330189
+ "cancelAtPeriodEnd",
330190
+ "periodEnd"
330191
+ ],
330192
+ "additionalProperties": false
330193
+ },
330194
+ "next": {
330195
+ "type": "object",
330196
+ "properties": {
330197
+ "planId": {
330198
+ "type": "string"
330199
+ },
330200
+ "interval": {
330201
+ "type": "string",
330202
+ "enum": [
330203
+ "month",
330204
+ "year"
330205
+ ]
330206
+ },
330207
+ "price": {
330208
+ "type": "number",
330209
+ "nullable": true
330210
+ },
330211
+ "effectiveDate": {
330212
+ "type": "string"
330213
+ }
330214
+ },
330215
+ "required": [
330216
+ "planId",
330217
+ "interval",
330218
+ "price",
330219
+ "effectiveDate"
330220
+ ],
330221
+ "nullable": true,
330222
+ "additionalProperties": false
330223
+ }
330224
+ },
330225
+ "required": [
330226
+ "current",
330227
+ "next"
330228
+ ],
330229
+ "additionalProperties": false
330230
+ },
330231
+ "addons": {
330232
+ "type": "object",
330233
+ "additionalProperties": {
330234
+ "type": "object",
330235
+ "properties": {
330236
+ "current": {
330237
+ "type": "object",
330238
+ "properties": {
330239
+ "quantity": {
330240
+ "type": "number"
330241
+ },
330242
+ "price": {
330243
+ "type": "number"
330244
+ },
330245
+ "proratedPrice": {
330246
+ "type": "number"
330247
+ }
330248
+ },
330249
+ "required": [
330250
+ "quantity",
330251
+ "price"
330252
+ ],
330253
+ "additionalProperties": false
330254
+ },
330255
+ "next": {
330256
+ "type": "object",
330257
+ "properties": {
330258
+ "quantity": {
330259
+ "type": "number"
330260
+ },
330261
+ "price": {
330262
+ "type": "number"
330263
+ },
330264
+ "effectiveDate": {
330265
+ "type": "string"
330266
+ }
330267
+ },
330268
+ "required": [
330269
+ "quantity",
330270
+ "price",
330271
+ "effectiveDate"
330272
+ ],
330273
+ "nullable": true,
330274
+ "additionalProperties": false
330275
+ }
330276
+ },
330277
+ "required": [
330278
+ "current",
330279
+ "next"
330280
+ ],
330281
+ "additionalProperties": false
330282
+ }
330283
+ },
330284
+ "yearlyTotal": {
330285
+ "type": "number"
330286
+ },
330287
+ "monthlyTotal": {
330288
+ "type": "number"
330289
+ },
330290
+ "proratedTotal": {
330291
+ "type": "number"
330292
+ }
330293
+ },
330294
+ "required": [
330295
+ "plan",
330296
+ "addons",
330297
+ "yearlyTotal",
330298
+ "monthlyTotal",
330299
+ "proratedTotal"
330300
+ ],
330301
+ "title": "getNextSubscriptionResponse",
330302
+ "additionalProperties": false
330303
+ }
330304
+ },
330305
+ "parameters": {
330306
+ "x-workspace-id": {
330307
+ "in": "header",
330308
+ "type": "string",
330309
+ "description": "Workspace ID",
330310
+ "required": true
330311
+ }
330312
+ }
330313
+ },
330314
+ "previewSubscriptionUpdate": {
330315
+ "name": "previewSubscriptionUpdate",
330316
+ "description": "Preview subscription update costs (dry run)",
330317
+ "method": "post",
330318
+ "path": "/v2/billing/subscriptions/preview",
330319
+ "requestBody": {
330320
+ "description": "Subscription update parameters to preview",
330321
+ "schema": {
330322
+ "type": "object",
330323
+ "properties": {
330324
+ "plan": {
330325
+ "type": "object",
330326
+ "properties": {
330327
+ "planId": {
330328
+ "type": "string",
330329
+ "description": "New plan ID (optional)"
330330
+ },
330331
+ "interval": {
330332
+ "type": "string",
330333
+ "enum": [
330334
+ "month",
330335
+ "year"
330336
+ ],
330337
+ "description": "New billing interval (optional)"
330338
+ }
330339
+ },
330340
+ "required": [
330341
+ "planId",
330342
+ "interval"
330343
+ ],
330344
+ "additionalProperties": false
330345
+ },
330346
+ "addons": {
330347
+ "type": "object",
330348
+ "additionalProperties": {
330349
+ "type": "number"
330350
+ },
330351
+ "description": "Map of addon IDs to quantities (optional). Set quantity to 0 to remove addon."
330352
+ }
330353
+ },
330354
+ "required": [
330355
+ "plan"
330356
+ ],
330357
+ "title": "previewSubscriptionUpdateBody",
330358
+ "additionalProperties": false
330359
+ }
330360
+ },
330361
+ "response": {
330362
+ "description": "Preview of subscription update costs",
330363
+ "status": 200,
330364
+ "schema": {
330365
+ "type": "object",
330366
+ "properties": {
330367
+ "subscription": {
330368
+ "type": "object",
330369
+ "properties": {
330370
+ "plan": {
330371
+ "type": "object",
330372
+ "properties": {
330373
+ "planId": {
330374
+ "type": "string"
330375
+ },
330376
+ "interval": {
330377
+ "type": "string",
330378
+ "enum": [
330379
+ "month",
330380
+ "year"
330381
+ ]
330382
+ },
330383
+ "effectiveDate": {
330384
+ "type": "string"
330385
+ }
330386
+ },
330387
+ "required": [
330388
+ "planId",
330389
+ "interval",
330390
+ "effectiveDate"
330391
+ ],
330392
+ "additionalProperties": false
330393
+ },
330394
+ "addons": {
330395
+ "type": "object",
330396
+ "additionalProperties": {
330397
+ "type": "object",
330398
+ "properties": {
330399
+ "quantity": {
330400
+ "type": "number"
330401
+ },
330402
+ "effectiveDate": {
330403
+ "type": "string"
330404
+ }
330405
+ },
330406
+ "required": [
330407
+ "quantity",
330408
+ "effectiveDate"
330409
+ ],
330410
+ "additionalProperties": false
330411
+ }
330412
+ }
330413
+ },
330414
+ "required": [
330415
+ "plan",
330416
+ "addons"
330417
+ ],
330418
+ "additionalProperties": false
330419
+ },
330420
+ "changeType": {
330421
+ "type": "string",
330422
+ "enum": [
330423
+ "upgrade",
330424
+ "downgrade",
330425
+ "same"
330426
+ ]
330427
+ },
330428
+ "costs": {
330429
+ "type": "object",
330430
+ "properties": {
330431
+ "immediate": {
330432
+ "type": "object",
330433
+ "properties": {
330434
+ "total": {
330435
+ "type": "number"
330436
+ },
330437
+ "lineItems": {
330438
+ "type": "array",
330439
+ "items": {
330440
+ "type": "object",
330441
+ "properties": {
330442
+ "type": {
330443
+ "type": "string",
330444
+ "enum": [
330445
+ "plan",
330446
+ "addon",
330447
+ "proration_credit"
330448
+ ]
330449
+ },
330450
+ "id": {
330451
+ "type": "string"
330452
+ },
330453
+ "description": {
330454
+ "type": "string"
330455
+ },
330456
+ "amount": {
330457
+ "type": "number"
330458
+ },
330459
+ "quantity": {
330460
+ "type": "number"
330461
+ }
330462
+ },
330463
+ "required": [
330464
+ "type",
330465
+ "id",
330466
+ "description",
330467
+ "amount"
330468
+ ],
330469
+ "description": "A line item in the cost breakdown"
330470
+ }
330471
+ }
330472
+ },
330473
+ "required": [
330474
+ "total",
330475
+ "lineItems"
330476
+ ],
330477
+ "description": "Prorated charges due immediately (0 for downgrades)",
330478
+ "additionalProperties": false
330479
+ },
330480
+ "monthly": {
330481
+ "type": "object",
330482
+ "properties": {
330483
+ "total": {
330484
+ "type": "number"
330485
+ },
330486
+ "lineItems": {
330487
+ "type": "array",
330488
+ "items": {
330489
+ "type": "object",
330490
+ "properties": {
330491
+ "type": {
330492
+ "type": "string",
330493
+ "enum": [
330494
+ "plan",
330495
+ "addon",
330496
+ "proration_credit"
330497
+ ]
330498
+ },
330499
+ "id": {
330500
+ "type": "string"
330501
+ },
330502
+ "description": {
330503
+ "type": "string"
330504
+ },
330505
+ "amount": {
330506
+ "type": "number"
330507
+ },
330508
+ "quantity": {
330509
+ "type": "number"
330510
+ }
330511
+ },
330512
+ "required": [
330513
+ "type",
330514
+ "id",
330515
+ "description",
330516
+ "amount"
330517
+ ],
330518
+ "description": "A line item in the cost breakdown"
330519
+ }
330520
+ }
330521
+ },
330522
+ "required": [
330523
+ "total",
330524
+ "lineItems"
330525
+ ],
330526
+ "description": "Monthly recurring cost (addons, or plan if monthly interval)",
330527
+ "additionalProperties": false
330528
+ },
330529
+ "yearly": {
330530
+ "type": "object",
330531
+ "properties": {
330532
+ "total": {
330533
+ "type": "number"
330534
+ },
330535
+ "lineItems": {
330536
+ "type": "array",
330537
+ "items": {
330538
+ "type": "object",
330539
+ "properties": {
330540
+ "type": {
330541
+ "type": "string",
330542
+ "enum": [
330543
+ "plan",
330544
+ "addon",
330545
+ "proration_credit"
330546
+ ]
330547
+ },
330548
+ "id": {
330549
+ "type": "string"
330550
+ },
330551
+ "description": {
330552
+ "type": "string"
330553
+ },
330554
+ "amount": {
330555
+ "type": "number"
330556
+ },
330557
+ "quantity": {
330558
+ "type": "number"
330559
+ }
330560
+ },
330561
+ "required": [
330562
+ "type",
330563
+ "id",
330564
+ "description",
330565
+ "amount"
330566
+ ],
330567
+ "description": "A line item in the cost breakdown"
330568
+ }
330569
+ }
330570
+ },
330571
+ "required": [
330572
+ "total",
330573
+ "lineItems"
330574
+ ],
330575
+ "description": "Yearly recurring cost (plan if yearly interval)",
330576
+ "additionalProperties": false
330577
+ }
330578
+ },
330579
+ "required": [
330580
+ "immediate",
330581
+ "monthly",
330582
+ "yearly"
330583
+ ],
330584
+ "additionalProperties": false
330585
+ },
330586
+ "currentPeriodEnd": {
330587
+ "type": "string"
330588
+ }
330589
+ },
330590
+ "required": [
330591
+ "subscription",
330592
+ "changeType",
330593
+ "costs",
330594
+ "currentPeriodEnd"
330595
+ ],
330596
+ "description": "Preview of subscription update costs",
330597
+ "title": "previewSubscriptionUpdateResponse",
330598
+ "additionalProperties": false
330599
+ }
330600
+ },
330601
+ "parameters": {
330602
+ "x-workspace-id": {
330603
+ "in": "header",
330604
+ "type": "string",
330605
+ "description": "Workspace ID",
330606
+ "required": true
330607
+ }
330608
+ }
330609
+ },
330610
+ "setPlan": {
330611
+ "name": "setPlan",
330612
+ "description": "Update the plan for a workspace subscription",
330613
+ "method": "put",
330614
+ "path": "/v2/billing/plans",
330615
+ "requestBody": {
330616
+ "description": "Plan update parameters",
330617
+ "schema": {
330618
+ "type": "object",
330619
+ "properties": {
330620
+ "planId": {
330621
+ "type": "string"
330622
+ },
330623
+ "interval": {
330624
+ "type": "string",
330625
+ "enum": [
330626
+ "month",
330627
+ "year"
330628
+ ]
330629
+ },
330630
+ "testReferenceTime": {
330631
+ "type": "number"
330632
+ }
330633
+ },
330634
+ "required": [
330635
+ "planId",
330636
+ "interval"
330637
+ ],
330638
+ "description": "Plan update parameters",
330639
+ "title": "setPlanBody",
330640
+ "additionalProperties": false
330641
+ }
330642
+ },
330643
+ "response": {
330644
+ "description": "Updated subscription details",
330645
+ "status": 200,
330646
+ "schema": {
330647
+ "type": "object",
330648
+ "properties": {
330649
+ "plan": {
330650
+ "type": "object",
330651
+ "properties": {
330652
+ "current": {
330653
+ "type": "object",
330654
+ "properties": {
330655
+ "status": {
330656
+ "type": "string",
330657
+ "enum": [
330658
+ "active",
330659
+ "canceled",
330660
+ "past_due",
330661
+ "action_required",
330662
+ "grace_period"
330663
+ ]
330664
+ },
330665
+ "planId": {
330666
+ "type": "string"
330667
+ },
330668
+ "interval": {
330669
+ "type": "string",
330670
+ "enum": [
330671
+ "month",
330672
+ "year"
330673
+ ]
330674
+ },
330675
+ "price": {
330676
+ "type": "number"
330677
+ },
330678
+ "proratedPrice": {
330679
+ "type": "number"
330680
+ },
330681
+ "cancelAtPeriodEnd": {
330682
+ "type": "boolean"
330683
+ },
330684
+ "periodEnd": {
330685
+ "type": "string"
330686
+ }
330687
+ },
330688
+ "required": [
330689
+ "status",
330690
+ "planId",
330691
+ "interval",
330692
+ "price",
330693
+ "cancelAtPeriodEnd",
330694
+ "periodEnd"
330695
+ ],
330696
+ "additionalProperties": false
330697
+ },
330698
+ "next": {
330699
+ "type": "object",
330700
+ "properties": {
330701
+ "planId": {
330702
+ "type": "string"
330703
+ },
330704
+ "interval": {
330705
+ "type": "string",
330706
+ "enum": [
330707
+ "month",
330708
+ "year"
330709
+ ]
330710
+ },
330711
+ "price": {
330712
+ "type": "number",
330713
+ "nullable": true
330714
+ },
330715
+ "effectiveDate": {
330716
+ "type": "string"
330717
+ }
330718
+ },
330719
+ "required": [
330720
+ "planId",
330721
+ "interval",
330722
+ "price",
330723
+ "effectiveDate"
330724
+ ],
330725
+ "nullable": true,
330726
+ "additionalProperties": false
330727
+ }
330728
+ },
330729
+ "required": [
330730
+ "current",
330731
+ "next"
330732
+ ],
330733
+ "additionalProperties": false
330734
+ },
330735
+ "addons": {
330736
+ "type": "object",
330737
+ "additionalProperties": {
330738
+ "type": "object",
330739
+ "properties": {
330740
+ "current": {
330741
+ "type": "object",
330742
+ "properties": {
330743
+ "quantity": {
330744
+ "type": "number"
330745
+ },
330746
+ "price": {
330747
+ "type": "number"
330748
+ },
330749
+ "proratedPrice": {
330750
+ "type": "number"
330751
+ }
330752
+ },
330753
+ "required": [
330754
+ "quantity",
330755
+ "price"
330756
+ ],
330757
+ "additionalProperties": false
330758
+ },
330759
+ "next": {
330760
+ "type": "object",
330761
+ "properties": {
330762
+ "quantity": {
330763
+ "type": "number"
330764
+ },
330765
+ "price": {
330766
+ "type": "number"
330767
+ },
330768
+ "effectiveDate": {
330769
+ "type": "string"
330770
+ }
330771
+ },
330772
+ "required": [
330773
+ "quantity",
330774
+ "price",
330775
+ "effectiveDate"
330776
+ ],
330777
+ "nullable": true,
330778
+ "additionalProperties": false
330779
+ }
330780
+ },
330781
+ "required": [
330782
+ "current",
330783
+ "next"
330784
+ ],
330785
+ "additionalProperties": false
330786
+ }
330787
+ },
330788
+ "yearlyTotal": {
330789
+ "type": "number"
330790
+ },
330791
+ "monthlyTotal": {
330792
+ "type": "number"
330793
+ },
330794
+ "proratedTotal": {
330795
+ "type": "number"
330796
+ }
330797
+ },
330798
+ "required": [
330799
+ "plan",
330800
+ "addons",
330801
+ "yearlyTotal",
330802
+ "monthlyTotal",
330803
+ "proratedTotal"
330804
+ ],
330805
+ "description": "Subscription details including current plan, addons, and costs",
330806
+ "title": "setPlanResponse",
330807
+ "additionalProperties": false
330808
+ }
330809
+ },
330810
+ "parameters": {
330811
+ "x-workspace-id": {
330812
+ "in": "header",
330813
+ "type": "string",
330814
+ "description": "Workspace ID",
330815
+ "required": true
330816
+ }
330817
+ }
330818
+ },
330819
+ "setAddons": {
330820
+ "name": "setAddons",
330821
+ "description": "Update addons for a workspace subscription",
330822
+ "method": "patch",
330823
+ "path": "/v2/billing/addons",
330824
+ "requestBody": {
330825
+ "description": "Addons update parameters. Set quantity to 0 to remove an addon.",
330826
+ "schema": {
330827
+ "type": "object",
330828
+ "properties": {
330829
+ "addons": {
330830
+ "type": "object",
330831
+ "additionalProperties": {
330832
+ "type": "number"
330833
+ }
330834
+ }
330835
+ },
330836
+ "required": [
330837
+ "addons"
330838
+ ],
330839
+ "description": "Addons update parameters. Set quantity to 0 to remove an addon.",
330840
+ "title": "setAddonsBody",
330841
+ "additionalProperties": false
330842
+ }
330843
+ },
330844
+ "response": {
330845
+ "description": "Updated subscription details",
330846
+ "status": 200,
330847
+ "schema": {
330848
+ "type": "object",
330849
+ "properties": {
330850
+ "plan": {
330851
+ "type": "object",
330852
+ "properties": {
330853
+ "current": {
330854
+ "type": "object",
330855
+ "properties": {
330856
+ "status": {
330857
+ "type": "string",
330858
+ "enum": [
330859
+ "active",
330860
+ "canceled",
330861
+ "past_due",
330862
+ "action_required",
330863
+ "grace_period"
330864
+ ]
330865
+ },
330866
+ "planId": {
330867
+ "type": "string"
330868
+ },
330869
+ "interval": {
330870
+ "type": "string",
330871
+ "enum": [
330872
+ "month",
330873
+ "year"
330874
+ ]
330875
+ },
330876
+ "price": {
330877
+ "type": "number"
330878
+ },
330879
+ "proratedPrice": {
330880
+ "type": "number"
330881
+ },
330882
+ "cancelAtPeriodEnd": {
330883
+ "type": "boolean"
330884
+ },
330885
+ "periodEnd": {
330886
+ "type": "string"
330887
+ }
330888
+ },
330889
+ "required": [
330890
+ "status",
330891
+ "planId",
330892
+ "interval",
330893
+ "price",
330894
+ "cancelAtPeriodEnd",
330895
+ "periodEnd"
330896
+ ],
330897
+ "additionalProperties": false
330898
+ },
330899
+ "next": {
330900
+ "type": "object",
330901
+ "properties": {
330902
+ "planId": {
330903
+ "type": "string"
330904
+ },
330905
+ "interval": {
330906
+ "type": "string",
330907
+ "enum": [
330908
+ "month",
330909
+ "year"
330910
+ ]
330911
+ },
330912
+ "price": {
330913
+ "type": "number",
330914
+ "nullable": true
330915
+ },
330916
+ "effectiveDate": {
330917
+ "type": "string"
330918
+ }
330919
+ },
330920
+ "required": [
330921
+ "planId",
330922
+ "interval",
330923
+ "price",
330924
+ "effectiveDate"
330925
+ ],
330926
+ "nullable": true,
330927
+ "additionalProperties": false
330928
+ }
330929
+ },
330930
+ "required": [
330931
+ "current",
330932
+ "next"
330933
+ ],
330934
+ "additionalProperties": false
330935
+ },
330936
+ "addons": {
330937
+ "type": "object",
330938
+ "additionalProperties": {
330939
+ "type": "object",
330940
+ "properties": {
330941
+ "current": {
330942
+ "type": "object",
330943
+ "properties": {
330944
+ "quantity": {
330945
+ "type": "number"
330946
+ },
330947
+ "price": {
330948
+ "type": "number"
330949
+ },
330950
+ "proratedPrice": {
330951
+ "type": "number"
330952
+ }
330953
+ },
330954
+ "required": [
330955
+ "quantity",
330956
+ "price"
330957
+ ],
330958
+ "additionalProperties": false
330959
+ },
330960
+ "next": {
330961
+ "type": "object",
330962
+ "properties": {
330963
+ "quantity": {
330964
+ "type": "number"
330965
+ },
330966
+ "price": {
330967
+ "type": "number"
330968
+ },
330969
+ "effectiveDate": {
329843
330970
  "type": "string"
329844
330971
  }
329845
- }
329846
- },
329847
- "required": [
329848
- "providerPriceId",
329849
- "amount",
329850
- "currency",
329851
- "interval"
329852
- ]
329853
- }
329854
- },
329855
- "feature": {
329856
- "type": "string",
329857
- "enum": [
329858
- "human_in_the_loop",
329859
- "ratelimit",
329860
- "incoming_messages_events",
329861
- "integration_spend",
329862
- "integration_subscription",
329863
- "table_rows",
329864
- "bot_count",
329865
- "always_alive_count",
329866
- "always_alive_concurrency",
329867
- "collaborator_count",
329868
- "file_storage",
329869
- "vector_db_storage",
329870
- "saved_versions"
329871
- ]
329872
- },
329873
- "increment": {
329874
- "type": "number"
329875
- },
329876
- "metadata": {
329877
- "type": "object",
329878
- "additionalProperties": {
329879
- "type": "string"
329880
- }
330972
+ },
330973
+ "required": [
330974
+ "quantity",
330975
+ "price",
330976
+ "effectiveDate"
330977
+ ],
330978
+ "nullable": true,
330979
+ "additionalProperties": false
330980
+ }
330981
+ },
330982
+ "required": [
330983
+ "current",
330984
+ "next"
330985
+ ],
330986
+ "additionalProperties": false
329881
330987
  }
329882
330988
  },
329883
- "required": [
329884
- "id",
329885
- "name",
329886
- "description",
329887
- "providerProductId",
329888
- "prices",
329889
- "feature",
329890
- "increment"
329891
- ]
330989
+ "yearlyTotal": {
330990
+ "type": "number"
330991
+ },
330992
+ "monthlyTotal": {
330993
+ "type": "number"
330994
+ },
330995
+ "proratedTotal": {
330996
+ "type": "number"
330997
+ }
329892
330998
  },
329893
- "title": "listAddonsResponse"
330999
+ "required": [
331000
+ "plan",
331001
+ "addons",
331002
+ "yearlyTotal",
331003
+ "monthlyTotal",
331004
+ "proratedTotal"
331005
+ ],
331006
+ "description": "Subscription details including current plan, addons, and costs",
331007
+ "title": "setAddonsResponse",
331008
+ "additionalProperties": false
329894
331009
  }
329895
331010
  },
329896
- "parameters": {}
331011
+ "parameters": {
331012
+ "x-workspace-id": {
331013
+ "in": "header",
331014
+ "type": "string",
331015
+ "description": "Workspace ID",
331016
+ "required": true
331017
+ }
331018
+ }
329897
331019
  },
329898
331020
  "listInvoices": {
329899
331021
  "name": "listInvoices",
@@ -329991,7 +331113,6 @@ var state6 = {
329991
331113
  "invoices",
329992
331114
  "meta"
329993
331115
  ],
329994
- "description": "List of invoices with pagination.",
329995
331116
  "title": "listInvoicesResponse",
329996
331117
  "additionalProperties": false
329997
331118
  }
@@ -330276,13 +331397,38 @@ var state6 = {
330276
331397
  "required": true
330277
331398
  }
330278
331399
  }
331400
+ },
331401
+ "getQuotas": {
331402
+ "name": "getQuotas",
331403
+ "description": "Get calculated quotas for the authenticated workspace based on plan and addons",
331404
+ "method": "get",
331405
+ "path": "/v2/billing/quotas",
331406
+ "response": {
331407
+ "description": "Calculated quotas for the workspace (featureId -> value)",
331408
+ "status": 200,
331409
+ "schema": {
331410
+ "type": "object",
331411
+ "additionalProperties": {
331412
+ "type": "number"
331413
+ },
331414
+ "title": "getQuotasResponse"
331415
+ }
331416
+ },
331417
+ "parameters": {
331418
+ "x-workspace-id": {
331419
+ "in": "header",
331420
+ "type": "string",
331421
+ "description": "Workspace ID",
331422
+ "required": true
331423
+ }
331424
+ }
330279
331425
  }
330280
331426
  },
330281
331427
  "metadata": {
330282
331428
  "title": "Botpress Billing Public API",
330283
331429
  "description": "API for Botpress Billing",
330284
331430
  "server": "https://api.botpress.cloud",
330285
- "version": "1.70.2",
331431
+ "version": "1.71.1",
330286
331432
  "prefix": "v2"
330287
331433
  },
330288
331434
  "defaultParameters": {
@@ -330428,6 +331574,9 @@ var state6 = {
330428
331574
  "refs": {
330429
331575
  "parameters": {},
330430
331576
  "requestBodies": {
331577
+ "previewSubscriptionUpdateBody": true,
331578
+ "setPlanBody": true,
331579
+ "setAddonsBody": true,
330431
331580
  "payInvoiceBody": true,
330432
331581
  "setPaymentMethodBody": true,
330433
331582
  "createPaymentMethodIntentBody": true
@@ -330438,14 +331587,26 @@ var state6 = {
330438
331587
  "listPlansResponse": true,
330439
331588
  "getAddonResponse": true,
330440
331589
  "listAddonsResponse": true,
331590
+ "getCurrentSubscriptionResponse": true,
331591
+ "getNextSubscriptionResponse": true,
331592
+ "previewSubscriptionUpdateResponse": true,
331593
+ "setPlanResponse": true,
331594
+ "setAddonsResponse": true,
330441
331595
  "listInvoicesResponse": true,
330442
331596
  "payInvoiceResponse": true,
330443
331597
  "getPaymentMethodResponse": true,
330444
331598
  "setPaymentMethodResponse": true,
330445
- "createPaymentMethodIntentResponse": true
331599
+ "createPaymentMethodIntentResponse": true,
331600
+ "getQuotasResponse": true
330446
331601
  },
330447
331602
  "schemas": {
330448
- "Invoice": true
331603
+ "Invoice": true,
331604
+ "Subscription": true,
331605
+ "SubscriptionPreview": true,
331606
+ "SubscriptionUpdateParams": true,
331607
+ "SubscriptionDetails": true,
331608
+ "SetPlanParams": true,
331609
+ "SetAddonsParams": true
330449
331610
  }
330450
331611
  },
330451
331612
  "schemas": {
@@ -330504,7 +331665,586 @@ var state6 = {
330504
331665
  "dueDate",
330505
331666
  "pdfUrl"
330506
331667
  ],
330507
- "description": "The invoice object.",
331668
+ "additionalProperties": false
331669
+ }
331670
+ },
331671
+ "Subscription": {
331672
+ "section": "subscription",
331673
+ "schema": {
331674
+ "type": "object",
331675
+ "properties": {
331676
+ "plan": {
331677
+ "type": "object",
331678
+ "properties": {
331679
+ "current": {
331680
+ "type": "object",
331681
+ "properties": {
331682
+ "status": {
331683
+ "type": "string",
331684
+ "enum": [
331685
+ "active",
331686
+ "canceled",
331687
+ "past_due",
331688
+ "action_required",
331689
+ "grace_period"
331690
+ ]
331691
+ },
331692
+ "planId": {
331693
+ "type": "string"
331694
+ },
331695
+ "interval": {
331696
+ "type": "string",
331697
+ "enum": [
331698
+ "month",
331699
+ "year"
331700
+ ]
331701
+ },
331702
+ "price": {
331703
+ "type": "number"
331704
+ },
331705
+ "proratedPrice": {
331706
+ "type": "number"
331707
+ },
331708
+ "cancelAtPeriodEnd": {
331709
+ "type": "boolean"
331710
+ },
331711
+ "periodEnd": {
331712
+ "type": "string"
331713
+ }
331714
+ },
331715
+ "required": [
331716
+ "status",
331717
+ "planId",
331718
+ "interval",
331719
+ "price",
331720
+ "cancelAtPeriodEnd",
331721
+ "periodEnd"
331722
+ ],
331723
+ "additionalProperties": false
331724
+ },
331725
+ "next": {
331726
+ "type": "object",
331727
+ "properties": {
331728
+ "planId": {
331729
+ "type": "string"
331730
+ },
331731
+ "interval": {
331732
+ "type": "string",
331733
+ "enum": [
331734
+ "month",
331735
+ "year"
331736
+ ]
331737
+ },
331738
+ "price": {
331739
+ "type": "number",
331740
+ "nullable": true
331741
+ },
331742
+ "effectiveDate": {
331743
+ "type": "string"
331744
+ }
331745
+ },
331746
+ "required": [
331747
+ "planId",
331748
+ "interval",
331749
+ "price",
331750
+ "effectiveDate"
331751
+ ],
331752
+ "nullable": true,
331753
+ "additionalProperties": false
331754
+ }
331755
+ },
331756
+ "required": [
331757
+ "current",
331758
+ "next"
331759
+ ],
331760
+ "additionalProperties": false
331761
+ },
331762
+ "addons": {
331763
+ "type": "object",
331764
+ "additionalProperties": {
331765
+ "type": "object",
331766
+ "properties": {
331767
+ "current": {
331768
+ "type": "object",
331769
+ "properties": {
331770
+ "quantity": {
331771
+ "type": "number"
331772
+ },
331773
+ "price": {
331774
+ "type": "number"
331775
+ },
331776
+ "proratedPrice": {
331777
+ "type": "number"
331778
+ }
331779
+ },
331780
+ "required": [
331781
+ "quantity",
331782
+ "price"
331783
+ ],
331784
+ "additionalProperties": false
331785
+ },
331786
+ "next": {
331787
+ "type": "object",
331788
+ "properties": {
331789
+ "quantity": {
331790
+ "type": "number"
331791
+ },
331792
+ "price": {
331793
+ "type": "number"
331794
+ },
331795
+ "effectiveDate": {
331796
+ "type": "string"
331797
+ }
331798
+ },
331799
+ "required": [
331800
+ "quantity",
331801
+ "price",
331802
+ "effectiveDate"
331803
+ ],
331804
+ "nullable": true,
331805
+ "additionalProperties": false
331806
+ }
331807
+ },
331808
+ "required": [
331809
+ "current",
331810
+ "next"
331811
+ ],
331812
+ "additionalProperties": false
331813
+ }
331814
+ },
331815
+ "yearlyTotal": {
331816
+ "type": "number"
331817
+ },
331818
+ "monthlyTotal": {
331819
+ "type": "number"
331820
+ },
331821
+ "proratedTotal": {
331822
+ "type": "number"
331823
+ }
331824
+ },
331825
+ "required": [
331826
+ "plan",
331827
+ "addons",
331828
+ "yearlyTotal",
331829
+ "monthlyTotal",
331830
+ "proratedTotal"
331831
+ ],
331832
+ "additionalProperties": false
331833
+ }
331834
+ },
331835
+ "SubscriptionPreview": {
331836
+ "section": "subscription",
331837
+ "schema": {
331838
+ "type": "object",
331839
+ "properties": {
331840
+ "plan": {
331841
+ "type": "object",
331842
+ "properties": {
331843
+ "current": {
331844
+ "type": "object",
331845
+ "properties": {
331846
+ "status": {
331847
+ "type": "string",
331848
+ "enum": [
331849
+ "active",
331850
+ "canceled",
331851
+ "past_due",
331852
+ "action_required",
331853
+ "grace_period"
331854
+ ]
331855
+ },
331856
+ "planId": {
331857
+ "type": "string"
331858
+ },
331859
+ "interval": {
331860
+ "type": "string",
331861
+ "enum": [
331862
+ "month",
331863
+ "year"
331864
+ ]
331865
+ },
331866
+ "price": {
331867
+ "type": "number"
331868
+ },
331869
+ "proratedPrice": {
331870
+ "type": "number"
331871
+ },
331872
+ "cancelAtPeriodEnd": {
331873
+ "type": "boolean"
331874
+ },
331875
+ "periodEnd": {
331876
+ "type": "string"
331877
+ }
331878
+ },
331879
+ "required": [
331880
+ "status",
331881
+ "planId",
331882
+ "interval",
331883
+ "price",
331884
+ "cancelAtPeriodEnd",
331885
+ "periodEnd"
331886
+ ],
331887
+ "additionalProperties": false
331888
+ },
331889
+ "next": {
331890
+ "type": "object",
331891
+ "properties": {
331892
+ "planId": {
331893
+ "type": "string"
331894
+ },
331895
+ "interval": {
331896
+ "type": "string",
331897
+ "enum": [
331898
+ "month",
331899
+ "year"
331900
+ ]
331901
+ },
331902
+ "price": {
331903
+ "type": "number",
331904
+ "nullable": true
331905
+ },
331906
+ "effectiveDate": {
331907
+ "type": "string"
331908
+ }
331909
+ },
331910
+ "required": [
331911
+ "planId",
331912
+ "interval",
331913
+ "price",
331914
+ "effectiveDate"
331915
+ ],
331916
+ "nullable": true,
331917
+ "additionalProperties": false
331918
+ }
331919
+ },
331920
+ "required": [
331921
+ "current",
331922
+ "next"
331923
+ ],
331924
+ "additionalProperties": false
331925
+ },
331926
+ "addons": {
331927
+ "type": "object",
331928
+ "additionalProperties": {
331929
+ "type": "object",
331930
+ "properties": {
331931
+ "current": {
331932
+ "type": "object",
331933
+ "properties": {
331934
+ "quantity": {
331935
+ "type": "number"
331936
+ },
331937
+ "price": {
331938
+ "type": "number"
331939
+ },
331940
+ "proratedPrice": {
331941
+ "type": "number"
331942
+ }
331943
+ },
331944
+ "required": [
331945
+ "quantity",
331946
+ "price"
331947
+ ],
331948
+ "additionalProperties": false
331949
+ },
331950
+ "next": {
331951
+ "type": "object",
331952
+ "properties": {
331953
+ "quantity": {
331954
+ "type": "number"
331955
+ },
331956
+ "price": {
331957
+ "type": "number"
331958
+ },
331959
+ "effectiveDate": {
331960
+ "type": "string"
331961
+ }
331962
+ },
331963
+ "required": [
331964
+ "quantity",
331965
+ "price",
331966
+ "effectiveDate"
331967
+ ],
331968
+ "nullable": true,
331969
+ "additionalProperties": false
331970
+ }
331971
+ },
331972
+ "required": [
331973
+ "current",
331974
+ "next"
331975
+ ],
331976
+ "additionalProperties": false
331977
+ }
331978
+ },
331979
+ "yearlyTotal": {
331980
+ "type": "number"
331981
+ },
331982
+ "monthlyTotal": {
331983
+ "type": "number"
331984
+ },
331985
+ "proratedTotal": {
331986
+ "type": "number"
331987
+ }
331988
+ },
331989
+ "required": [
331990
+ "plan",
331991
+ "addons",
331992
+ "yearlyTotal",
331993
+ "monthlyTotal",
331994
+ "proratedTotal"
331995
+ ],
331996
+ "additionalProperties": false
331997
+ }
331998
+ },
331999
+ "SubscriptionUpdateParams": {
332000
+ "section": "subscription",
332001
+ "schema": {
332002
+ "type": "object",
332003
+ "properties": {
332004
+ "plan": {
332005
+ "type": "object",
332006
+ "properties": {
332007
+ "planId": {
332008
+ "type": "string",
332009
+ "description": "New plan ID (optional)"
332010
+ },
332011
+ "interval": {
332012
+ "type": "string",
332013
+ "enum": [
332014
+ "month",
332015
+ "year"
332016
+ ],
332017
+ "description": "New billing interval (optional)"
332018
+ }
332019
+ },
332020
+ "required": [
332021
+ "planId",
332022
+ "interval"
332023
+ ],
332024
+ "additionalProperties": false
332025
+ },
332026
+ "addons": {
332027
+ "type": "object",
332028
+ "additionalProperties": {
332029
+ "type": "number"
332030
+ },
332031
+ "description": "Map of addon IDs to quantities (optional). Set quantity to 0 to remove addon."
332032
+ }
332033
+ },
332034
+ "required": [
332035
+ "plan"
332036
+ ],
332037
+ "additionalProperties": false
332038
+ }
332039
+ },
332040
+ "SubscriptionDetails": {
332041
+ "section": "subscription",
332042
+ "schema": {
332043
+ "type": "object",
332044
+ "properties": {
332045
+ "plan": {
332046
+ "type": "object",
332047
+ "properties": {
332048
+ "current": {
332049
+ "type": "object",
332050
+ "properties": {
332051
+ "status": {
332052
+ "type": "string",
332053
+ "enum": [
332054
+ "active",
332055
+ "canceled",
332056
+ "past_due",
332057
+ "action_required",
332058
+ "grace_period"
332059
+ ]
332060
+ },
332061
+ "planId": {
332062
+ "type": "string"
332063
+ },
332064
+ "interval": {
332065
+ "type": "string",
332066
+ "enum": [
332067
+ "month",
332068
+ "year"
332069
+ ]
332070
+ },
332071
+ "price": {
332072
+ "type": "number"
332073
+ },
332074
+ "proratedPrice": {
332075
+ "type": "number"
332076
+ },
332077
+ "cancelAtPeriodEnd": {
332078
+ "type": "boolean"
332079
+ },
332080
+ "periodEnd": {
332081
+ "type": "string"
332082
+ }
332083
+ },
332084
+ "required": [
332085
+ "status",
332086
+ "planId",
332087
+ "interval",
332088
+ "price",
332089
+ "cancelAtPeriodEnd",
332090
+ "periodEnd"
332091
+ ],
332092
+ "additionalProperties": false
332093
+ },
332094
+ "next": {
332095
+ "type": "object",
332096
+ "properties": {
332097
+ "planId": {
332098
+ "type": "string"
332099
+ },
332100
+ "interval": {
332101
+ "type": "string",
332102
+ "enum": [
332103
+ "month",
332104
+ "year"
332105
+ ]
332106
+ },
332107
+ "price": {
332108
+ "type": "number",
332109
+ "nullable": true
332110
+ },
332111
+ "effectiveDate": {
332112
+ "type": "string"
332113
+ }
332114
+ },
332115
+ "required": [
332116
+ "planId",
332117
+ "interval",
332118
+ "price",
332119
+ "effectiveDate"
332120
+ ],
332121
+ "nullable": true,
332122
+ "additionalProperties": false
332123
+ }
332124
+ },
332125
+ "required": [
332126
+ "current",
332127
+ "next"
332128
+ ],
332129
+ "additionalProperties": false
332130
+ },
332131
+ "addons": {
332132
+ "type": "object",
332133
+ "additionalProperties": {
332134
+ "type": "object",
332135
+ "properties": {
332136
+ "current": {
332137
+ "type": "object",
332138
+ "properties": {
332139
+ "quantity": {
332140
+ "type": "number"
332141
+ },
332142
+ "price": {
332143
+ "type": "number"
332144
+ },
332145
+ "proratedPrice": {
332146
+ "type": "number"
332147
+ }
332148
+ },
332149
+ "required": [
332150
+ "quantity",
332151
+ "price"
332152
+ ],
332153
+ "additionalProperties": false
332154
+ },
332155
+ "next": {
332156
+ "type": "object",
332157
+ "properties": {
332158
+ "quantity": {
332159
+ "type": "number"
332160
+ },
332161
+ "price": {
332162
+ "type": "number"
332163
+ },
332164
+ "effectiveDate": {
332165
+ "type": "string"
332166
+ }
332167
+ },
332168
+ "required": [
332169
+ "quantity",
332170
+ "price",
332171
+ "effectiveDate"
332172
+ ],
332173
+ "nullable": true,
332174
+ "additionalProperties": false
332175
+ }
332176
+ },
332177
+ "required": [
332178
+ "current",
332179
+ "next"
332180
+ ],
332181
+ "additionalProperties": false
332182
+ }
332183
+ },
332184
+ "yearlyTotal": {
332185
+ "type": "number"
332186
+ },
332187
+ "monthlyTotal": {
332188
+ "type": "number"
332189
+ },
332190
+ "proratedTotal": {
332191
+ "type": "number"
332192
+ }
332193
+ },
332194
+ "required": [
332195
+ "plan",
332196
+ "addons",
332197
+ "yearlyTotal",
332198
+ "monthlyTotal",
332199
+ "proratedTotal"
332200
+ ],
332201
+ "description": "Subscription details including current plan, addons, and costs",
332202
+ "additionalProperties": false
332203
+ }
332204
+ },
332205
+ "SetPlanParams": {
332206
+ "section": "subscription",
332207
+ "schema": {
332208
+ "type": "object",
332209
+ "properties": {
332210
+ "planId": {
332211
+ "type": "string"
332212
+ },
332213
+ "interval": {
332214
+ "type": "string",
332215
+ "enum": [
332216
+ "month",
332217
+ "year"
332218
+ ]
332219
+ },
332220
+ "testReferenceTime": {
332221
+ "type": "number"
332222
+ }
332223
+ },
332224
+ "required": [
332225
+ "planId",
332226
+ "interval"
332227
+ ],
332228
+ "description": "Plan update parameters",
332229
+ "additionalProperties": false
332230
+ }
332231
+ },
332232
+ "SetAddonsParams": {
332233
+ "section": "subscription",
332234
+ "schema": {
332235
+ "type": "object",
332236
+ "properties": {
332237
+ "addons": {
332238
+ "type": "object",
332239
+ "additionalProperties": {
332240
+ "type": "number"
332241
+ }
332242
+ }
332243
+ },
332244
+ "required": [
332245
+ "addons"
332246
+ ],
332247
+ "description": "Addons update parameters. Set quantity to 0 to remove an addon.",
330508
332248
  "additionalProperties": false
330509
332249
  }
330510
332250
  }
@@ -330516,6 +332256,13 @@ var state6 = {
330516
332256
  "name": "invoice",
330517
332257
  "operations": [],
330518
332258
  "schema": "Invoice"
332259
+ },
332260
+ {
332261
+ "description": "",
332262
+ "title": "Subscription",
332263
+ "name": "subscription",
332264
+ "operations": [],
332265
+ "schema": "Subscription"
330519
332266
  }
330520
332267
  ],
330521
332268
  "options": {