@bpinternal/billing-ui 0.8.2 → 0.9.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 +8 -9
- package/dist/index.js +2628 -2637
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -184,7 +184,6 @@ export declare const billingKeys: {
|
|
|
184
184
|
subscription: (scope: string) => readonly ["bpb", string, "subscription"];
|
|
185
185
|
preview: (scope: string, update: SubscriptionUpdate) => readonly ["bpb", string, "preview", SubscriptionUpdate];
|
|
186
186
|
paymentMethod: (scope: string) => readonly ["bpb", string, "payment-method"];
|
|
187
|
-
billingAddress: (scope: string) => readonly ["bpb", string, "billing-address"];
|
|
188
187
|
customer: (scope: string) => readonly ["bpb", string, "customer"];
|
|
189
188
|
invoices: (scope: string) => readonly ["bpb", string, "invoices"];
|
|
190
189
|
readonly: (scope: string) => readonly ["bpb", string, "billing-readonly"];
|
|
@@ -878,7 +877,7 @@ export declare const USAGE_METRICS: {
|
|
|
878
877
|
* by default), on billing v4. Renders nothing otherwise (and on legacy billing),
|
|
879
878
|
* so it's safe to mount unconditionally on any page.
|
|
880
879
|
*/
|
|
881
|
-
export declare const UsageBanner: ({ position, threshold, onUpgrade, dismissible, ctaLabel, period, className, }: UsageBannerProps) => JSX.Element | null;
|
|
880
|
+
export declare const UsageBanner: ({ position, threshold, onUpgrade, dismissible, cta, ctaLabel, period, className, }: UsageBannerProps) => JSX.Element | null;
|
|
882
881
|
|
|
883
882
|
export declare type UsageBannerProps = {
|
|
884
883
|
/**
|
|
@@ -901,7 +900,13 @@ export declare type UsageBannerProps = {
|
|
|
901
900
|
* different metric crosses the threshold. Default true.
|
|
902
901
|
*/
|
|
903
902
|
dismissible?: boolean;
|
|
904
|
-
/**
|
|
903
|
+
/**
|
|
904
|
+
* Which built-in (localized) CTA to show: 'upgrade' (default) → "Upgrade plan",
|
|
905
|
+
* for banners that open the upgrade flow; 'manage' → "Manage plan", for banners
|
|
906
|
+
* that navigate to billing management.
|
|
907
|
+
*/
|
|
908
|
+
cta?: 'upgrade' | 'manage';
|
|
909
|
+
/** Raw CTA label override — takes precedence over `cta` and skips localization. */
|
|
905
910
|
ctaLabel?: string;
|
|
906
911
|
/** Period (any datetime in the billing month) to evaluate; defaults to current month. */
|
|
907
912
|
period?: string;
|
|
@@ -1017,10 +1022,6 @@ export declare function useAddons(): UseQueryResult<Addon[], Error>;
|
|
|
1017
1022
|
|
|
1018
1023
|
export declare function useBilling(): BillingContextValue;
|
|
1019
1024
|
|
|
1020
|
-
export declare function useBillingAddress(options?: QueryOptions): UseQueryResult<{
|
|
1021
|
-
address: BillingAddress | null;
|
|
1022
|
-
}, Error>;
|
|
1023
|
-
|
|
1024
1025
|
/** Managed/enterprise locks — when planReadonly, plan changes go through sales. */
|
|
1025
1026
|
export declare function useBillingReadonly(options?: QueryOptions): UseQueryResult<{
|
|
1026
1027
|
planReadonly: boolean;
|
|
@@ -1054,8 +1055,6 @@ export declare function useSetAddons(): UseMutationResult<void, Error, {
|
|
|
1054
1055
|
couponCode?: string;
|
|
1055
1056
|
}>;
|
|
1056
1057
|
|
|
1057
|
-
export declare function useSetBillingAddress(): UseMutationResult<void, Error, BillingAddress>;
|
|
1058
|
-
|
|
1059
1058
|
export declare function useSetCustomer(): UseMutationResult<Customer, Error, SetCustomerInput>;
|
|
1060
1059
|
|
|
1061
1060
|
export declare function useSetPaymentMethod(): UseMutationResult<PaymentMethod, Error, {
|