@botpress/client 2.4.0 → 2.6.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
@@ -8592,6 +8592,27 @@ interface ChargeWorkspaceUnpaidInvoicesResponse$1 {
8592
8592
  }[];
8593
8593
  }
8594
8594
 
8595
+ interface SaveWorkspaceCancellationReasonsRequestHeaders$1 {
8596
+ }
8597
+ interface SaveWorkspaceCancellationReasonsRequestQuery$1 {
8598
+ }
8599
+ interface SaveWorkspaceCancellationReasonsRequestParams$1 {
8600
+ id: string;
8601
+ }
8602
+ interface SaveWorkspaceCancellationReasonsRequestBody$1 {
8603
+ /**
8604
+ * Reasons for canceling the subscription
8605
+ */
8606
+ reasons: ("too_expensive" | "not_using_enough" | "missing_feature" | "switched_tool" | "technical_issues" | "support_expectations" | "temporary_need")[];
8607
+ /**
8608
+ * Additional comment on the cancellation
8609
+ */
8610
+ comment?: string;
8611
+ }
8612
+ type SaveWorkspaceCancellationReasonsInput$1 = SaveWorkspaceCancellationReasonsRequestBody$1 & SaveWorkspaceCancellationReasonsRequestHeaders$1 & SaveWorkspaceCancellationReasonsRequestQuery$1 & SaveWorkspaceCancellationReasonsRequestParams$1;
8613
+ interface SaveWorkspaceCancellationReasonsResponse$1 {
8614
+ }
8615
+
8595
8616
  interface CreateWorkspaceRequestHeaders$1 {
8596
8617
  }
8597
8618
  interface CreateWorkspaceRequestQuery$1 {
@@ -8600,7 +8621,7 @@ interface CreateWorkspaceRequestParams$1 {
8600
8621
  }
8601
8622
  interface CreateWorkspaceRequestBody$1 {
8602
8623
  name: string;
8603
- billingVersion?: "v4";
8624
+ billingVersion?: "v4" | "v5";
8604
8625
  }
8605
8626
  type CreateWorkspaceInput$1 = CreateWorkspaceRequestBody$1 & CreateWorkspaceRequestHeaders$1 & CreateWorkspaceRequestQuery$1 & CreateWorkspaceRequestParams$1;
8606
8627
  interface CreateWorkspaceResponse$1 {
@@ -15432,6 +15453,7 @@ declare class Client$9 {
15432
15453
  readonly listWorkspaceInvoices: (input: ListWorkspaceInvoicesInput$1) => Promise<ListWorkspaceInvoicesResponse$1>;
15433
15454
  readonly getUpcomingInvoice: (input: GetUpcomingInvoiceInput$1) => Promise<GetUpcomingInvoiceResponse$1>;
15434
15455
  readonly chargeWorkspaceUnpaidInvoices: (input: ChargeWorkspaceUnpaidInvoicesInput$1) => Promise<ChargeWorkspaceUnpaidInvoicesResponse$1>;
15456
+ readonly saveWorkspaceCancellationReasons: (input: SaveWorkspaceCancellationReasonsInput$1) => Promise<SaveWorkspaceCancellationReasonsResponse$1>;
15435
15457
  readonly createWorkspace: (input: CreateWorkspaceInput$1) => Promise<CreateWorkspaceResponse$1>;
15436
15458
  readonly getPublicWorkspace: (input: GetPublicWorkspaceInput$1) => Promise<GetPublicWorkspaceResponse$3>;
15437
15459
  readonly getWorkspace: (input: GetWorkspaceInput$1) => Promise<GetWorkspaceResponse$1>;
@@ -16059,6 +16081,18 @@ interface GetSubscriptionResponse {
16059
16081
  start: string;
16060
16082
  end: string | null;
16061
16083
  }[];
16084
+ /**
16085
+ * A plan/addon change awaiting payment confirmation, if any
16086
+ */
16087
+ pendingUpgrade: {
16088
+ planId: string | null;
16089
+ interval: ("month" | "year") | null;
16090
+ addons: {
16091
+ [k: string]: number;
16092
+ };
16093
+ invoiceId: string;
16094
+ expiresAt: string;
16095
+ } | null;
16062
16096
  }
16063
16097
 
16064
16098
  interface PreviewSubscriptionUpdateRequestHeaders {
@@ -16252,6 +16286,18 @@ interface SetPlanResponse {
16252
16286
  start: string;
16253
16287
  end: string | null;
16254
16288
  }[];
16289
+ /**
16290
+ * A plan/addon change awaiting payment confirmation, if any
16291
+ */
16292
+ pendingUpgrade: {
16293
+ planId: string | null;
16294
+ interval: ("month" | "year") | null;
16295
+ addons: {
16296
+ [k: string]: number;
16297
+ };
16298
+ invoiceId: string;
16299
+ expiresAt: string;
16300
+ } | null;
16255
16301
  }
16256
16302
 
16257
16303
  interface SetAddonsRequestHeaders {
@@ -16327,6 +16373,18 @@ interface SetAddonsResponse {
16327
16373
  start: string;
16328
16374
  end: string | null;
16329
16375
  }[];
16376
+ /**
16377
+ * A plan/addon change awaiting payment confirmation, if any
16378
+ */
16379
+ pendingUpgrade: {
16380
+ planId: string | null;
16381
+ interval: ("month" | "year") | null;
16382
+ addons: {
16383
+ [k: string]: number;
16384
+ };
16385
+ invoiceId: string;
16386
+ expiresAt: string;
16387
+ } | null;
16330
16388
  }
16331
16389
 
16332
16390
  interface SetCancelAtPeriodEndRequestHeaders {
@@ -16392,6 +16450,95 @@ interface SetCancelAtPeriodEndResponse {
16392
16450
  start: string;
16393
16451
  end: string | null;
16394
16452
  }[];
16453
+ /**
16454
+ * A plan/addon change awaiting payment confirmation, if any
16455
+ */
16456
+ pendingUpgrade: {
16457
+ planId: string | null;
16458
+ interval: ("month" | "year") | null;
16459
+ addons: {
16460
+ [k: string]: number;
16461
+ };
16462
+ invoiceId: string;
16463
+ expiresAt: string;
16464
+ } | null;
16465
+ }
16466
+
16467
+ interface CancelPendingSubscriptionUpgradeRequestHeaders {
16468
+ }
16469
+ interface CancelPendingSubscriptionUpgradeRequestQuery {
16470
+ }
16471
+ interface CancelPendingSubscriptionUpgradeRequestParams {
16472
+ }
16473
+ interface CancelPendingSubscriptionUpgradeRequestBody {
16474
+ }
16475
+ type CancelPendingSubscriptionUpgradeInput = CancelPendingSubscriptionUpgradeRequestBody & CancelPendingSubscriptionUpgradeRequestHeaders & CancelPendingSubscriptionUpgradeRequestQuery & CancelPendingSubscriptionUpgradeRequestParams;
16476
+ /**
16477
+ * Subscription details including current plan, addons, and costs
16478
+ */
16479
+ interface CancelPendingSubscriptionUpgradeResponse {
16480
+ plan: {
16481
+ current: {
16482
+ status: "active" | "canceled" | "past_due" | "action_required" | "incomplete" | "grace_period";
16483
+ planId: string;
16484
+ interval: "month" | "year";
16485
+ price: number;
16486
+ proratedPrice?: number;
16487
+ cancelAtPeriodEnd: boolean;
16488
+ periodEnd: string;
16489
+ };
16490
+ next: {
16491
+ planId: string;
16492
+ interval: "month" | "year";
16493
+ price: number | null;
16494
+ effectiveDate: string;
16495
+ } | null;
16496
+ };
16497
+ addons: {
16498
+ [k: string]: {
16499
+ current: {
16500
+ quantity: number;
16501
+ price: number;
16502
+ proratedPrice?: number;
16503
+ };
16504
+ next: {
16505
+ quantity: number;
16506
+ price: number;
16507
+ effectiveDate: string;
16508
+ } | null;
16509
+ };
16510
+ };
16511
+ /**
16512
+ * Active discounts applied to the subscription
16513
+ */
16514
+ discounts: {
16515
+ id: string;
16516
+ couponId: string;
16517
+ promotionCode: string | null;
16518
+ name: string | null;
16519
+ percentOff: number | null;
16520
+ /**
16521
+ * Discount amount in dollars, or null if percent-based
16522
+ */
16523
+ amountOff: number | null;
16524
+ currency: string | null;
16525
+ duration: "forever" | "once" | "repeating";
16526
+ durationInMonths: number | null;
16527
+ start: string;
16528
+ end: string | null;
16529
+ }[];
16530
+ /**
16531
+ * A plan/addon change awaiting payment confirmation, if any
16532
+ */
16533
+ pendingUpgrade: {
16534
+ planId: string | null;
16535
+ interval: ("month" | "year") | null;
16536
+ addons: {
16537
+ [k: string]: number;
16538
+ };
16539
+ invoiceId: string;
16540
+ expiresAt: string;
16541
+ } | null;
16395
16542
  }
16396
16543
 
16397
16544
  interface GetAutoRechargeSettingsRequestHeaders {
@@ -16763,6 +16910,7 @@ declare class Client$7 {
16763
16910
  readonly setPlan: (input: SetPlanInput) => Promise<SetPlanResponse>;
16764
16911
  readonly setAddons: (input: SetAddonsInput) => Promise<SetAddonsResponse>;
16765
16912
  readonly setCancelAtPeriodEnd: (input: SetCancelAtPeriodEndInput) => Promise<SetCancelAtPeriodEndResponse>;
16913
+ readonly cancelPendingSubscriptionUpgrade: (input: CancelPendingSubscriptionUpgradeInput) => Promise<CancelPendingSubscriptionUpgradeResponse>;
16766
16914
  readonly getAutoRechargeSettings: (input: GetAutoRechargeSettingsInput) => Promise<GetAutoRechargeSettingsResponse>;
16767
16915
  readonly setAutoRechargeSettings: (input: SetAutoRechargeSettingsInput) => Promise<SetAutoRechargeSettingsResponse>;
16768
16916
  readonly getTrials: (input: GetTrialsInput) => Promise<GetTrialsResponse>;
@@ -17085,9 +17233,9 @@ interface UpsertFileResponse$1 {
17085
17233
  alias?: string;
17086
17234
  };
17087
17235
  /**
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.
17236
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed.
17089
17237
  */
17090
- indexingStack?: "v1" | "v2";
17238
+ indexingStack?: "v1" | "v2" | "v3";
17091
17239
  /**
17092
17240
  * URL to upload the file content. File content needs to be sent to this URL via a PUT request.
17093
17241
  */
@@ -17217,9 +17365,9 @@ interface ListFilesResponse$1 {
17217
17365
  alias?: string;
17218
17366
  };
17219
17367
  /**
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.
17368
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed.
17221
17369
  */
17222
- indexingStack?: "v1" | "v2";
17370
+ indexingStack?: "v1" | "v2" | "v3";
17223
17371
  }[];
17224
17372
  meta: {
17225
17373
  /**
@@ -17329,9 +17477,9 @@ interface GetFileResponse$1 {
17329
17477
  alias?: string;
17330
17478
  };
17331
17479
  /**
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.
17480
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed.
17333
17481
  */
17334
- indexingStack?: "v1" | "v2";
17482
+ indexingStack?: "v1" | "v2" | "v3";
17335
17483
  };
17336
17484
  }
17337
17485
 
@@ -17455,9 +17603,9 @@ interface UpdateFileMetadataResponse$1 {
17455
17603
  alias?: string;
17456
17604
  };
17457
17605
  /**
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.
17606
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed.
17459
17607
  */
17460
- indexingStack?: "v1" | "v2";
17608
+ indexingStack?: "v1" | "v2" | "v3";
17461
17609
  };
17462
17610
  }
17463
17611
 
@@ -17569,9 +17717,9 @@ interface CopyFileResponse$1 {
17569
17717
  alias?: string;
17570
17718
  };
17571
17719
  /**
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.
17720
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed.
17573
17721
  */
17574
- indexingStack?: "v1" | "v2";
17722
+ indexingStack?: "v1" | "v2" | "v3";
17575
17723
  };
17576
17724
  }
17577
17725
 
@@ -18040,7 +18188,7 @@ declare class Client$4 extends Client$5 implements IClient$2 {
18040
18188
  name?: string;
18041
18189
  alias?: string;
18042
18190
  };
18043
- indexingStack?: "v1" | "v2";
18191
+ indexingStack?: "v1" | "v2" | "v3";
18044
18192
  }>;
18045
18193
  filePassages: (props: {
18046
18194
  id: string;
@@ -28085,6 +28233,27 @@ interface ChargeWorkspaceUnpaidInvoicesResponse {
28085
28233
  }[];
28086
28234
  }
28087
28235
 
28236
+ interface SaveWorkspaceCancellationReasonsRequestHeaders {
28237
+ }
28238
+ interface SaveWorkspaceCancellationReasonsRequestQuery {
28239
+ }
28240
+ interface SaveWorkspaceCancellationReasonsRequestParams {
28241
+ id: string;
28242
+ }
28243
+ interface SaveWorkspaceCancellationReasonsRequestBody {
28244
+ /**
28245
+ * Reasons for canceling the subscription
28246
+ */
28247
+ reasons: ("too_expensive" | "not_using_enough" | "missing_feature" | "switched_tool" | "technical_issues" | "support_expectations" | "temporary_need")[];
28248
+ /**
28249
+ * Additional comment on the cancellation
28250
+ */
28251
+ comment?: string;
28252
+ }
28253
+ type SaveWorkspaceCancellationReasonsInput = SaveWorkspaceCancellationReasonsRequestBody & SaveWorkspaceCancellationReasonsRequestHeaders & SaveWorkspaceCancellationReasonsRequestQuery & SaveWorkspaceCancellationReasonsRequestParams;
28254
+ interface SaveWorkspaceCancellationReasonsResponse {
28255
+ }
28256
+
28088
28257
  interface CreateWorkspaceRequestHeaders {
28089
28258
  }
28090
28259
  interface CreateWorkspaceRequestQuery {
@@ -28093,7 +28262,7 @@ interface CreateWorkspaceRequestParams {
28093
28262
  }
28094
28263
  interface CreateWorkspaceRequestBody {
28095
28264
  name: string;
28096
- billingVersion?: "v4";
28265
+ billingVersion?: "v4" | "v5";
28097
28266
  }
28098
28267
  type CreateWorkspaceInput = CreateWorkspaceRequestBody & CreateWorkspaceRequestHeaders & CreateWorkspaceRequestQuery & CreateWorkspaceRequestParams;
28099
28268
  interface CreateWorkspaceResponse {
@@ -35101,9 +35270,9 @@ interface UpsertFileResponse {
35101
35270
  alias?: string;
35102
35271
  };
35103
35272
  /**
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.
35273
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed.
35105
35274
  */
35106
- indexingStack?: "v1" | "v2";
35275
+ indexingStack?: "v1" | "v2" | "v3";
35107
35276
  /**
35108
35277
  * URL to upload the file content. File content needs to be sent to this URL via a PUT request.
35109
35278
  */
@@ -35233,9 +35402,9 @@ interface ListFilesResponse {
35233
35402
  alias?: string;
35234
35403
  };
35235
35404
  /**
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.
35405
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed.
35237
35406
  */
35238
- indexingStack?: "v1" | "v2";
35407
+ indexingStack?: "v1" | "v2" | "v3";
35239
35408
  }[];
35240
35409
  meta: {
35241
35410
  /**
@@ -35345,9 +35514,9 @@ interface GetFileResponse {
35345
35514
  alias?: string;
35346
35515
  };
35347
35516
  /**
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.
35517
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed.
35349
35518
  */
35350
- indexingStack?: "v1" | "v2";
35519
+ indexingStack?: "v1" | "v2" | "v3";
35351
35520
  };
35352
35521
  }
35353
35522
 
@@ -35471,9 +35640,9 @@ interface UpdateFileMetadataResponse {
35471
35640
  alias?: string;
35472
35641
  };
35473
35642
  /**
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.
35643
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed.
35475
35644
  */
35476
- indexingStack?: "v1" | "v2";
35645
+ indexingStack?: "v1" | "v2" | "v3";
35477
35646
  };
35478
35647
  }
35479
35648
 
@@ -35585,9 +35754,9 @@ interface CopyFileResponse {
35585
35754
  alias?: string;
35586
35755
  };
35587
35756
  /**
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.
35757
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed.
35589
35758
  */
35590
- indexingStack?: "v1" | "v2";
35759
+ indexingStack?: "v1" | "v2" | "v3";
35591
35760
  };
35592
35761
  }
35593
35762
 
@@ -39588,9 +39757,9 @@ interface File {
39588
39757
  alias?: string;
39589
39758
  };
39590
39759
  /**
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.
39760
+ * Indicates the indexing stack used to index this file. Present only when file has been successfully indexed.
39592
39761
  */
39593
- indexingStack?: "v1" | "v2";
39762
+ indexingStack?: "v1" | "v2" | "v3";
39594
39763
  }
39595
39764
 
39596
39765
  type HttpResponse<T> = {
@@ -39714,6 +39883,7 @@ declare class Client$1 {
39714
39883
  readonly listWorkspaceInvoices: (input: ListWorkspaceInvoicesInput) => Promise<ListWorkspaceInvoicesResponse>;
39715
39884
  readonly getUpcomingInvoice: (input: GetUpcomingInvoiceInput) => Promise<GetUpcomingInvoiceResponse>;
39716
39885
  readonly chargeWorkspaceUnpaidInvoices: (input: ChargeWorkspaceUnpaidInvoicesInput) => Promise<ChargeWorkspaceUnpaidInvoicesResponse>;
39886
+ readonly saveWorkspaceCancellationReasons: (input: SaveWorkspaceCancellationReasonsInput) => Promise<SaveWorkspaceCancellationReasonsResponse>;
39717
39887
  readonly createWorkspace: (input: CreateWorkspaceInput) => Promise<CreateWorkspaceResponse>;
39718
39888
  readonly getPublicWorkspace: (input: GetPublicWorkspaceInput) => Promise<GetPublicWorkspaceResponse$1>;
39719
39889
  readonly getWorkspace: (input: GetWorkspaceInput) => Promise<GetWorkspaceResponse>;
@@ -40197,7 +40367,7 @@ declare class Client extends Client$1 implements IClient {
40197
40367
  name?: string;
40198
40368
  alias?: string;
40199
40369
  };
40200
- indexingStack?: "v1" | "v2";
40370
+ indexingStack?: "v1" | "v2" | "v3";
40201
40371
  }>;
40202
40372
  filePassages: (props: {
40203
40373
  id: string;