@bpinternal/billing-ui 0.24.0 → 0.25.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 +12 -8
- package/dist/index.js +4063 -3744
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -64,17 +64,17 @@ export declare type AddonsSummaryCardProps = {
|
|
|
64
64
|
|
|
65
65
|
export declare const AgentsIcon: ({ size, ...props }: IconProps) => JSX.Element;
|
|
66
66
|
|
|
67
|
-
export declare const
|
|
68
|
-
|
|
69
|
-
export declare const AutoRechargeDialog: ({ open, onOpenChange, onSuccess, onUpgrade }: AutoRechargeDialogProps) => JSX.Element | null;
|
|
67
|
+
export declare const AiCreditsDialog: ({ open, onOpenChange, onSuccess, onUpgrade }: AiCreditsDialogProps) => JSX.Element | null;
|
|
70
68
|
|
|
71
|
-
export declare type
|
|
69
|
+
export declare type AiCreditsDialogProps = {
|
|
72
70
|
open: boolean;
|
|
73
71
|
onOpenChange: (open: boolean) => void;
|
|
74
72
|
onSuccess?: () => void;
|
|
75
73
|
onUpgrade?: () => void;
|
|
76
74
|
};
|
|
77
75
|
|
|
76
|
+
export declare const ArrowRightIcon: ({ size, ...props }: IconProps) => JSX.Element;
|
|
77
|
+
|
|
78
78
|
export declare type AutoRechargeSetting = AutoRechargeSettings[string];
|
|
79
79
|
|
|
80
80
|
export declare type AutoRechargeSettingInput = {
|
|
@@ -92,7 +92,7 @@ export declare type AutoRechargeSettings = Awaited<ReturnType<BillingClient['get
|
|
|
92
92
|
/**
|
|
93
93
|
* Clickable summary of auto-recharge for the AI-spend credit wallet (on/off,
|
|
94
94
|
* and the recharge amount + monthly limit when on). Acts as a preview button
|
|
95
|
-
* that opens `
|
|
95
|
+
* that opens `AiCreditsDialog` — the settings themselves are edited there,
|
|
96
96
|
* not inline.
|
|
97
97
|
*/
|
|
98
98
|
export declare const AutoRechargeSummaryCard: ({ onManage, className }: AutoRechargeSummaryCardProps) => JSX.Element | null;
|
|
@@ -106,7 +106,7 @@ export declare type AutoRechargeSummaryCardProps = {
|
|
|
106
106
|
export declare const Badge: ({ variant, children, className }: BadgeProps) => JSX.Element;
|
|
107
107
|
|
|
108
108
|
export declare type BadgeProps = {
|
|
109
|
-
variant?: 'accent' | 'neutral' | 'success';
|
|
109
|
+
variant?: 'accent' | 'neutral' | 'success' | 'danger';
|
|
110
110
|
children: ReactNode;
|
|
111
111
|
className?: string;
|
|
112
112
|
};
|
|
@@ -170,7 +170,7 @@ export declare type BillingAnalyticsClient = {
|
|
|
170
170
|
};
|
|
171
171
|
|
|
172
172
|
export declare type BillingChangeEvent = {
|
|
173
|
-
type: 'subscription' | 'addons' | 'payment-method' | 'billing-address' | 'auto-recharge' | 'pending-upgrade';
|
|
173
|
+
type: 'subscription' | 'addons' | 'payment-method' | 'billing-address' | 'auto-recharge' | 'pending-upgrade' | 'credit-grant';
|
|
174
174
|
};
|
|
175
175
|
|
|
176
176
|
/**
|
|
@@ -182,7 +182,7 @@ export declare type BillingChangeEvent = {
|
|
|
182
182
|
* this interface over your own backend proxy (e.g. tRPC) — the shapes are the
|
|
183
183
|
* official wire shapes, the transport is yours.
|
|
184
184
|
*/
|
|
185
|
-
export declare type BillingClient = Pick<billing.Client, 'listPlans' | 'listAddons' | 'getSubscription' | 'previewSubscriptionUpdate' | 'setPlan' | 'setAddons' | 'getPaymentMethod' | 'createPaymentMethodIntent' | 'setPaymentMethod' | 'getCustomer' | 'setCustomer' | 'listInvoices' | 'getBillingReadonly' | 'getWorkspaceUsages' | 'getAutoRechargeSettings' | 'setAutoRechargeSettings' | 'payInvoice' | 'cancelPendingSubscriptionUpgrade'> &
|
|
185
|
+
export declare type BillingClient = Pick<billing.Client, 'listPlans' | 'listAddons' | 'getSubscription' | 'previewSubscriptionUpdate' | 'setPlan' | 'setAddons' | 'getPaymentMethod' | 'createPaymentMethodIntent' | 'setPaymentMethod' | 'getCustomer' | 'setCustomer' | 'listInvoices' | 'getBillingReadonly' | 'getWorkspaceUsages' | 'getAutoRechargeSettings' | 'setAutoRechargeSettings' | 'payInvoice' | 'cancelPendingSubscriptionUpgrade' | 'listCreditGrants' | 'createCreditGrant'> &
|
|
186
186
|
/**
|
|
187
187
|
* `getWorkspaceMember` and `saveWorkspaceCancellationReasons` live on the
|
|
188
188
|
* generic `@botpress/client`, not the billing client, but are REQUIRED here:
|
|
@@ -243,6 +243,7 @@ export declare const billingKeys: {
|
|
|
243
243
|
autoRecharge: (scope: string) => readonly ["bpb", string, "auto-recharge"];
|
|
244
244
|
usages: (scope: string, period: string) => readonly ["bpb", string, "usages", string];
|
|
245
245
|
bots: (scope: string) => readonly ["bpb", string, "bots"];
|
|
246
|
+
creditGrants: (scope: string) => readonly ["bpb", string, "credit-grants", "paged"];
|
|
246
247
|
usageByBot: (scope: string, type: string, period: string) => readonly ["bpb", string, "usage-by-bot", string, string];
|
|
247
248
|
};
|
|
248
249
|
|
|
@@ -1170,6 +1171,9 @@ export declare function useCreatePaymentMethodIntent(): UseMutationResult<{
|
|
|
1170
1171
|
|
|
1171
1172
|
export declare function useCustomer(options?: QueryOptions): UseQueryResult<Customer, Error>;
|
|
1172
1173
|
|
|
1174
|
+
/** Whether a payment needs attention: a pending plan/add-on upgrade or a failed auto-recharge. */
|
|
1175
|
+
export declare function useHasPaymentFailure(options?: QueryOptions): boolean;
|
|
1176
|
+
|
|
1173
1177
|
/** Whether the subscription has a plan/add-on change awaiting payment confirmation. */
|
|
1174
1178
|
export declare function useHasPendingUpgrade(options?: QueryOptions): boolean;
|
|
1175
1179
|
|