@botpress/client 2.3.0 → 2.5.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.
package/dist/index.d.ts CHANGED
@@ -8600,7 +8600,7 @@ interface CreateWorkspaceRequestParams$1 {
8600
8600
  }
8601
8601
  interface CreateWorkspaceRequestBody$1 {
8602
8602
  name: string;
8603
- billingVersion?: "v4";
8603
+ billingVersion?: "v4" | "v5";
8604
8604
  }
8605
8605
  type CreateWorkspaceInput$1 = CreateWorkspaceRequestBody$1 & CreateWorkspaceRequestHeaders$1 & CreateWorkspaceRequestQuery$1 & CreateWorkspaceRequestParams$1;
8606
8606
  interface CreateWorkspaceResponse$1 {
@@ -8610,7 +8610,7 @@ interface CreateWorkspaceResponse$1 {
8610
8610
  createdAt: string;
8611
8611
  updatedAt: string;
8612
8612
  botCount: number;
8613
- billingVersion: "v1" | "v2" | "v3" | "v4";
8613
+ billingVersion: "v1" | "v2" | "v3" | "v4" | "v5";
8614
8614
  plan: "community" | "team" | "enterprise" | "plus" | "managed";
8615
8615
  blocked: boolean;
8616
8616
  spendingLimit: number;
@@ -8664,7 +8664,7 @@ interface GetWorkspaceResponse$1 {
8664
8664
  createdAt: string;
8665
8665
  updatedAt: string;
8666
8666
  botCount: number;
8667
- billingVersion: "v1" | "v2" | "v3" | "v4";
8667
+ billingVersion: "v1" | "v2" | "v3" | "v4" | "v5";
8668
8668
  plan: "community" | "team" | "enterprise" | "plus" | "managed";
8669
8669
  blocked: boolean;
8670
8670
  spendingLimit: number;
@@ -8836,7 +8836,7 @@ interface UpdateWorkspaceResponse$3 {
8836
8836
  createdAt: string;
8837
8837
  updatedAt: string;
8838
8838
  botCount: number;
8839
- billingVersion: "v1" | "v2" | "v3" | "v4";
8839
+ billingVersion: "v1" | "v2" | "v3" | "v4" | "v5";
8840
8840
  plan: "community" | "team" | "enterprise" | "plus" | "managed";
8841
8841
  blocked: boolean;
8842
8842
  spendingLimit: number;
@@ -8894,7 +8894,7 @@ interface UpdateWorkspaceResponse$2 {
8894
8894
  createdAt: string;
8895
8895
  updatedAt: string;
8896
8896
  botCount: number;
8897
- billingVersion: "v1" | "v2" | "v3" | "v4";
8897
+ billingVersion: "v1" | "v2" | "v3" | "v4" | "v5";
8898
8898
  plan: "community" | "team" | "enterprise" | "plus" | "managed";
8899
8899
  blocked: boolean;
8900
8900
  spendingLimit: number;
@@ -16059,6 +16059,18 @@ interface GetSubscriptionResponse {
16059
16059
  start: string;
16060
16060
  end: string | null;
16061
16061
  }[];
16062
+ /**
16063
+ * A plan/addon change awaiting payment confirmation, if any
16064
+ */
16065
+ pendingUpgrade: {
16066
+ planId: string | null;
16067
+ interval: ("month" | "year") | null;
16068
+ addons: {
16069
+ [k: string]: number;
16070
+ };
16071
+ invoiceId: string;
16072
+ expiresAt: string;
16073
+ } | null;
16062
16074
  }
16063
16075
 
16064
16076
  interface PreviewSubscriptionUpdateRequestHeaders {
@@ -16252,6 +16264,18 @@ interface SetPlanResponse {
16252
16264
  start: string;
16253
16265
  end: string | null;
16254
16266
  }[];
16267
+ /**
16268
+ * A plan/addon change awaiting payment confirmation, if any
16269
+ */
16270
+ pendingUpgrade: {
16271
+ planId: string | null;
16272
+ interval: ("month" | "year") | null;
16273
+ addons: {
16274
+ [k: string]: number;
16275
+ };
16276
+ invoiceId: string;
16277
+ expiresAt: string;
16278
+ } | null;
16255
16279
  }
16256
16280
 
16257
16281
  interface SetAddonsRequestHeaders {
@@ -16327,6 +16351,18 @@ interface SetAddonsResponse {
16327
16351
  start: string;
16328
16352
  end: string | null;
16329
16353
  }[];
16354
+ /**
16355
+ * A plan/addon change awaiting payment confirmation, if any
16356
+ */
16357
+ pendingUpgrade: {
16358
+ planId: string | null;
16359
+ interval: ("month" | "year") | null;
16360
+ addons: {
16361
+ [k: string]: number;
16362
+ };
16363
+ invoiceId: string;
16364
+ expiresAt: string;
16365
+ } | null;
16330
16366
  }
16331
16367
 
16332
16368
  interface SetCancelAtPeriodEndRequestHeaders {
@@ -16392,6 +16428,95 @@ interface SetCancelAtPeriodEndResponse {
16392
16428
  start: string;
16393
16429
  end: string | null;
16394
16430
  }[];
16431
+ /**
16432
+ * A plan/addon change awaiting payment confirmation, if any
16433
+ */
16434
+ pendingUpgrade: {
16435
+ planId: string | null;
16436
+ interval: ("month" | "year") | null;
16437
+ addons: {
16438
+ [k: string]: number;
16439
+ };
16440
+ invoiceId: string;
16441
+ expiresAt: string;
16442
+ } | null;
16443
+ }
16444
+
16445
+ interface CancelPendingSubscriptionUpgradeRequestHeaders {
16446
+ }
16447
+ interface CancelPendingSubscriptionUpgradeRequestQuery {
16448
+ }
16449
+ interface CancelPendingSubscriptionUpgradeRequestParams {
16450
+ }
16451
+ interface CancelPendingSubscriptionUpgradeRequestBody {
16452
+ }
16453
+ type CancelPendingSubscriptionUpgradeInput = CancelPendingSubscriptionUpgradeRequestBody & CancelPendingSubscriptionUpgradeRequestHeaders & CancelPendingSubscriptionUpgradeRequestQuery & CancelPendingSubscriptionUpgradeRequestParams;
16454
+ /**
16455
+ * Subscription details including current plan, addons, and costs
16456
+ */
16457
+ interface CancelPendingSubscriptionUpgradeResponse {
16458
+ plan: {
16459
+ current: {
16460
+ status: "active" | "canceled" | "past_due" | "action_required" | "incomplete" | "grace_period";
16461
+ planId: string;
16462
+ interval: "month" | "year";
16463
+ price: number;
16464
+ proratedPrice?: number;
16465
+ cancelAtPeriodEnd: boolean;
16466
+ periodEnd: string;
16467
+ };
16468
+ next: {
16469
+ planId: string;
16470
+ interval: "month" | "year";
16471
+ price: number | null;
16472
+ effectiveDate: string;
16473
+ } | null;
16474
+ };
16475
+ addons: {
16476
+ [k: string]: {
16477
+ current: {
16478
+ quantity: number;
16479
+ price: number;
16480
+ proratedPrice?: number;
16481
+ };
16482
+ next: {
16483
+ quantity: number;
16484
+ price: number;
16485
+ effectiveDate: string;
16486
+ } | null;
16487
+ };
16488
+ };
16489
+ /**
16490
+ * Active discounts applied to the subscription
16491
+ */
16492
+ discounts: {
16493
+ id: string;
16494
+ couponId: string;
16495
+ promotionCode: string | null;
16496
+ name: string | null;
16497
+ percentOff: number | null;
16498
+ /**
16499
+ * Discount amount in dollars, or null if percent-based
16500
+ */
16501
+ amountOff: number | null;
16502
+ currency: string | null;
16503
+ duration: "forever" | "once" | "repeating";
16504
+ durationInMonths: number | null;
16505
+ start: string;
16506
+ end: string | null;
16507
+ }[];
16508
+ /**
16509
+ * A plan/addon change awaiting payment confirmation, if any
16510
+ */
16511
+ pendingUpgrade: {
16512
+ planId: string | null;
16513
+ interval: ("month" | "year") | null;
16514
+ addons: {
16515
+ [k: string]: number;
16516
+ };
16517
+ invoiceId: string;
16518
+ expiresAt: string;
16519
+ } | null;
16395
16520
  }
16396
16521
 
16397
16522
  interface GetAutoRechargeSettingsRequestHeaders {
@@ -16427,7 +16552,7 @@ interface SetAutoRechargeSettingsRequestParams {
16427
16552
  interface SetAutoRechargeSettingsRequestBody {
16428
16553
  settings: {
16429
16554
  [k: string]: {
16430
- enabled: boolean;
16555
+ enabled?: boolean;
16431
16556
  targetType?: "addon" | "credit_grant";
16432
16557
  thresholdType?: "percentage" | "remaining_amount";
16433
16558
  threshold?: number;
@@ -16763,6 +16888,7 @@ declare class Client$7 {
16763
16888
  readonly setPlan: (input: SetPlanInput) => Promise<SetPlanResponse>;
16764
16889
  readonly setAddons: (input: SetAddonsInput) => Promise<SetAddonsResponse>;
16765
16890
  readonly setCancelAtPeriodEnd: (input: SetCancelAtPeriodEndInput) => Promise<SetCancelAtPeriodEndResponse>;
16891
+ readonly cancelPendingSubscriptionUpgrade: (input: CancelPendingSubscriptionUpgradeInput) => Promise<CancelPendingSubscriptionUpgradeResponse>;
16766
16892
  readonly getAutoRechargeSettings: (input: GetAutoRechargeSettingsInput) => Promise<GetAutoRechargeSettingsResponse>;
16767
16893
  readonly setAutoRechargeSettings: (input: SetAutoRechargeSettingsInput) => Promise<SetAutoRechargeSettingsResponse>;
16768
16894
  readonly getTrials: (input: GetTrialsInput) => Promise<GetTrialsResponse>;
@@ -17085,9 +17211,9 @@ interface UpsertFileResponse$1 {
17085
17211
  alias?: string;
17086
17212
  };
17087
17213
  /**
17088
- * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed. A value of "v2" denotes the latest stack, "v1" denotes the legacy stack.
17214
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed.
17089
17215
  */
17090
- indexingStack?: "v1" | "v2";
17216
+ indexingStack?: "v1" | "v2" | "v3";
17091
17217
  /**
17092
17218
  * URL to upload the file content. File content needs to be sent to this URL via a PUT request.
17093
17219
  */
@@ -17217,9 +17343,9 @@ interface ListFilesResponse$1 {
17217
17343
  alias?: string;
17218
17344
  };
17219
17345
  /**
17220
- * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed. A value of "v2" denotes the latest stack, "v1" denotes the legacy stack.
17346
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed.
17221
17347
  */
17222
- indexingStack?: "v1" | "v2";
17348
+ indexingStack?: "v1" | "v2" | "v3";
17223
17349
  }[];
17224
17350
  meta: {
17225
17351
  /**
@@ -17329,9 +17455,9 @@ interface GetFileResponse$1 {
17329
17455
  alias?: string;
17330
17456
  };
17331
17457
  /**
17332
- * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed. A value of "v2" denotes the latest stack, "v1" denotes the legacy stack.
17458
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed.
17333
17459
  */
17334
- indexingStack?: "v1" | "v2";
17460
+ indexingStack?: "v1" | "v2" | "v3";
17335
17461
  };
17336
17462
  }
17337
17463
 
@@ -17455,9 +17581,9 @@ interface UpdateFileMetadataResponse$1 {
17455
17581
  alias?: string;
17456
17582
  };
17457
17583
  /**
17458
- * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed. A value of "v2" denotes the latest stack, "v1" denotes the legacy stack.
17584
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed.
17459
17585
  */
17460
- indexingStack?: "v1" | "v2";
17586
+ indexingStack?: "v1" | "v2" | "v3";
17461
17587
  };
17462
17588
  }
17463
17589
 
@@ -17569,9 +17695,9 @@ interface CopyFileResponse$1 {
17569
17695
  alias?: string;
17570
17696
  };
17571
17697
  /**
17572
- * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed. A value of "v2" denotes the latest stack, "v1" denotes the legacy stack.
17698
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed.
17573
17699
  */
17574
- indexingStack?: "v1" | "v2";
17700
+ indexingStack?: "v1" | "v2" | "v3";
17575
17701
  };
17576
17702
  }
17577
17703
 
@@ -18040,7 +18166,7 @@ declare class Client$4 extends Client$5 implements IClient$2 {
18040
18166
  name?: string;
18041
18167
  alias?: string;
18042
18168
  };
18043
- indexingStack?: "v1" | "v2";
18169
+ indexingStack?: "v1" | "v2" | "v3";
18044
18170
  }>;
18045
18171
  filePassages: (props: {
18046
18172
  id: string;
@@ -28093,7 +28219,7 @@ interface CreateWorkspaceRequestParams {
28093
28219
  }
28094
28220
  interface CreateWorkspaceRequestBody {
28095
28221
  name: string;
28096
- billingVersion?: "v4";
28222
+ billingVersion?: "v4" | "v5";
28097
28223
  }
28098
28224
  type CreateWorkspaceInput = CreateWorkspaceRequestBody & CreateWorkspaceRequestHeaders & CreateWorkspaceRequestQuery & CreateWorkspaceRequestParams;
28099
28225
  interface CreateWorkspaceResponse {
@@ -28103,7 +28229,7 @@ interface CreateWorkspaceResponse {
28103
28229
  createdAt: string;
28104
28230
  updatedAt: string;
28105
28231
  botCount: number;
28106
- billingVersion: "v1" | "v2" | "v3" | "v4";
28232
+ billingVersion: "v1" | "v2" | "v3" | "v4" | "v5";
28107
28233
  plan: "community" | "team" | "enterprise" | "plus" | "managed";
28108
28234
  blocked: boolean;
28109
28235
  spendingLimit: number;
@@ -28157,7 +28283,7 @@ interface GetWorkspaceResponse {
28157
28283
  createdAt: string;
28158
28284
  updatedAt: string;
28159
28285
  botCount: number;
28160
- billingVersion: "v1" | "v2" | "v3" | "v4";
28286
+ billingVersion: "v1" | "v2" | "v3" | "v4" | "v5";
28161
28287
  plan: "community" | "team" | "enterprise" | "plus" | "managed";
28162
28288
  blocked: boolean;
28163
28289
  spendingLimit: number;
@@ -28329,7 +28455,7 @@ interface UpdateWorkspaceResponse$1 {
28329
28455
  createdAt: string;
28330
28456
  updatedAt: string;
28331
28457
  botCount: number;
28332
- billingVersion: "v1" | "v2" | "v3" | "v4";
28458
+ billingVersion: "v1" | "v2" | "v3" | "v4" | "v5";
28333
28459
  plan: "community" | "team" | "enterprise" | "plus" | "managed";
28334
28460
  blocked: boolean;
28335
28461
  spendingLimit: number;
@@ -28387,7 +28513,7 @@ interface UpdateWorkspaceResponse {
28387
28513
  createdAt: string;
28388
28514
  updatedAt: string;
28389
28515
  botCount: number;
28390
- billingVersion: "v1" | "v2" | "v3" | "v4";
28516
+ billingVersion: "v1" | "v2" | "v3" | "v4" | "v5";
28391
28517
  plan: "community" | "team" | "enterprise" | "plus" | "managed";
28392
28518
  blocked: boolean;
28393
28519
  spendingLimit: number;
@@ -35101,9 +35227,9 @@ interface UpsertFileResponse {
35101
35227
  alias?: string;
35102
35228
  };
35103
35229
  /**
35104
- * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed. A value of "v2" denotes the latest stack, "v1" denotes the legacy stack.
35230
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed.
35105
35231
  */
35106
- indexingStack?: "v1" | "v2";
35232
+ indexingStack?: "v1" | "v2" | "v3";
35107
35233
  /**
35108
35234
  * URL to upload the file content. File content needs to be sent to this URL via a PUT request.
35109
35235
  */
@@ -35233,9 +35359,9 @@ interface ListFilesResponse {
35233
35359
  alias?: string;
35234
35360
  };
35235
35361
  /**
35236
- * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed. A value of "v2" denotes the latest stack, "v1" denotes the legacy stack.
35362
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed.
35237
35363
  */
35238
- indexingStack?: "v1" | "v2";
35364
+ indexingStack?: "v1" | "v2" | "v3";
35239
35365
  }[];
35240
35366
  meta: {
35241
35367
  /**
@@ -35345,9 +35471,9 @@ interface GetFileResponse {
35345
35471
  alias?: string;
35346
35472
  };
35347
35473
  /**
35348
- * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed. A value of "v2" denotes the latest stack, "v1" denotes the legacy stack.
35474
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed.
35349
35475
  */
35350
- indexingStack?: "v1" | "v2";
35476
+ indexingStack?: "v1" | "v2" | "v3";
35351
35477
  };
35352
35478
  }
35353
35479
 
@@ -35471,9 +35597,9 @@ interface UpdateFileMetadataResponse {
35471
35597
  alias?: string;
35472
35598
  };
35473
35599
  /**
35474
- * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed. A value of "v2" denotes the latest stack, "v1" denotes the legacy stack.
35600
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed.
35475
35601
  */
35476
- indexingStack?: "v1" | "v2";
35602
+ indexingStack?: "v1" | "v2" | "v3";
35477
35603
  };
35478
35604
  }
35479
35605
 
@@ -35585,9 +35711,9 @@ interface CopyFileResponse {
35585
35711
  alias?: string;
35586
35712
  };
35587
35713
  /**
35588
- * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed. A value of "v2" denotes the latest stack, "v1" denotes the legacy stack.
35714
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed.
35589
35715
  */
35590
- indexingStack?: "v1" | "v2";
35716
+ indexingStack?: "v1" | "v2" | "v3";
35591
35717
  };
35592
35718
  }
35593
35719
 
@@ -38886,7 +39012,7 @@ interface Workspace {
38886
39012
  createdAt: string;
38887
39013
  updatedAt: string;
38888
39014
  botCount: number;
38889
- billingVersion: "v1" | "v2" | "v3" | "v4";
39015
+ billingVersion: "v1" | "v2" | "v3" | "v4" | "v5";
38890
39016
  plan: "community" | "team" | "enterprise" | "plus" | "managed";
38891
39017
  blocked: boolean;
38892
39018
  spendingLimit: number;
@@ -39588,9 +39714,9 @@ interface File {
39588
39714
  alias?: string;
39589
39715
  };
39590
39716
  /**
39591
- * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed. A value of "v2" denotes the latest stack, "v1" denotes the legacy stack.
39717
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed.
39592
39718
  */
39593
- indexingStack?: "v1" | "v2";
39719
+ indexingStack?: "v1" | "v2" | "v3";
39594
39720
  }
39595
39721
 
39596
39722
  type HttpResponse<T> = {
@@ -40197,7 +40323,7 @@ declare class Client extends Client$1 implements IClient {
40197
40323
  name?: string;
40198
40324
  alias?: string;
40199
40325
  };
40200
- indexingStack?: "v1" | "v2";
40326
+ indexingStack?: "v1" | "v2" | "v3";
40201
40327
  }>;
40202
40328
  filePassages: (props: {
40203
40329
  id: string;