@botpress/client 2.6.0 → 2.8.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
@@ -16560,7 +16560,7 @@ interface GetAutoRechargeSettingsResponse {
16560
16560
  addonId?: string;
16561
16561
  chunkSize?: number | null;
16562
16562
  maxAmount?: number | null;
16563
- disabledReason?: string;
16563
+ disabledReason?: "payment_failed" | "disabled_by_plan";
16564
16564
  };
16565
16565
  };
16566
16566
  }
@@ -16595,7 +16595,7 @@ interface SetAutoRechargeSettingsResponse {
16595
16595
  addonId?: string;
16596
16596
  chunkSize?: number | null;
16597
16597
  maxAmount?: number | null;
16598
- disabledReason?: string;
16598
+ disabledReason?: "payment_failed" | "disabled_by_plan";
16599
16599
  };
16600
16600
  };
16601
16601
  }
@@ -16658,10 +16658,11 @@ interface CreateCreditGrantRequestParams {
16658
16658
  }
16659
16659
  interface CreateCreditGrantRequestBody {
16660
16660
  /**
16661
- * Nanodollar value of the credit grant, must be at least $5 and a whole dollar amount
16661
+ * Nanodollar value of the credit grant, must be at least $5 and a whole number of cents
16662
16662
  */
16663
16663
  amount: number;
16664
16664
  feature: "ai_spend";
16665
+ idempotencyKey?: string;
16665
16666
  }
16666
16667
  type CreateCreditGrantInput = CreateCreditGrantRequestBody & CreateCreditGrantRequestHeaders & CreateCreditGrantRequestQuery & CreateCreditGrantRequestParams;
16667
16668
  interface CreateCreditGrantResponse {
@@ -16685,6 +16686,54 @@ interface CreateCreditGrantResponse {
16685
16686
  createdAt: string;
16686
16687
  }
16687
16688
 
16689
+ interface ListCreditGrantsRequestHeaders {
16690
+ }
16691
+ interface ListCreditGrantsRequestQuery {
16692
+ nextToken?: string;
16693
+ pageSize?: number;
16694
+ }
16695
+ interface ListCreditGrantsRequestParams {
16696
+ }
16697
+ interface ListCreditGrantsRequestBody {
16698
+ }
16699
+ type ListCreditGrantsInput = ListCreditGrantsRequestBody & ListCreditGrantsRequestHeaders & ListCreditGrantsRequestQuery & ListCreditGrantsRequestParams;
16700
+ interface ListCreditGrantsResponse {
16701
+ creditGrants: {
16702
+ id: string;
16703
+ workspace_id: string;
16704
+ invoice_id: string | null;
16705
+ /**
16706
+ * Nanodollar value of the credit grant
16707
+ */
16708
+ amount: number;
16709
+ feature: "incoming_messages_events" | "integration_spend" | "table_rows" | "bot_count" | "collaborator_count" | "file_storage" | "vector_db_storage" | "saved_versions" | "indexed_file_count" | "conversation_sessions" | "ai_spend";
16710
+ /**
16711
+ * Start of the period (inclusive)
16712
+ */
16713
+ period_start: string;
16714
+ /**
16715
+ * End of the period (exclusive)
16716
+ */
16717
+ period_end: string;
16718
+ updatedAt: string;
16719
+ createdAt: string;
16720
+ /**
16721
+ * Nanodollar value left on the credit grant, not including usage of the current period (consumed at period end)
16722
+ */
16723
+ remaining_amount: number;
16724
+ /**
16725
+ * Nanodollar value of the credit grant used so far in the current monthly usage period
16726
+ */
16727
+ current_period_usage: number;
16728
+ }[];
16729
+ meta: {
16730
+ /**
16731
+ * The token to use to retrieve the next page of results, passed as a query string parameter (value should be URL-encoded) to this API endpoint.
16732
+ */
16733
+ nextToken?: string;
16734
+ };
16735
+ }
16736
+
16688
16737
  interface ListInvoicesRequestHeaders {
16689
16738
  }
16690
16739
  interface ListInvoicesRequestQuery {
@@ -16917,6 +16966,7 @@ declare class Client$7 {
16917
16966
  readonly createTrial: (input: CreateTrialInput) => Promise<CreateTrialResponse>;
16918
16967
  readonly removeTrial: (input: RemoveTrialInput) => Promise<RemoveTrialResponse>;
16919
16968
  readonly createCreditGrant: (input: CreateCreditGrantInput) => Promise<CreateCreditGrantResponse>;
16969
+ readonly listCreditGrants: (input: ListCreditGrantsInput) => Promise<ListCreditGrantsResponse>;
16920
16970
  readonly listInvoices: (input: ListInvoicesInput) => Promise<ListInvoicesResponse>;
16921
16971
  readonly payInvoice: (input: PayInvoiceInput) => Promise<PayInvoiceResponse>;
16922
16972
  readonly getPaymentMethod: (input: GetPaymentMethodInput) => Promise<GetPaymentMethodResponse>;