@better-auth-ui/core
Version:
Authentication components and data utilities for [Better Auth](https://better-auth.com), available for React and Solid.
46 lines (45 loc) • 2.35 kB
TypeScript
import { BillingActionResult, BillingAdapter, BillingCheckoutInput, BillingScope } from './billing-adapter';
export declare const billingMutationKeys: {
readonly all: readonly ["auth", "billing"];
readonly checkout: (scope: BillingScope) => readonly ["auth", "billing", string, "checkout"];
readonly portal: (scope: BillingScope) => readonly ["auth", "billing", string, "portal"];
readonly cancel: (scope: BillingScope) => readonly ["auth", "billing", string, "cancel"];
readonly restore: (scope: BillingScope) => readonly ["auth", "billing", string, "restore"];
readonly seats: (scope: BillingScope) => readonly ["auth", "billing", string, "seats"];
};
export declare const billingCheckoutOptions: (adapter: BillingAdapter, scope: BillingScope) => {
mutationKey: readonly ["auth", "billing", string, "checkout"];
mutationFn: (input: BillingCheckoutInput) => Promise<BillingActionResult>;
meta: {
awaits: (readonly ["auth", "billing", string, "state"])[];
};
};
export declare const billingPortalOptions: (adapter: BillingAdapter, scope: BillingScope) => {
mutationKey: readonly ["auth", "billing", string, "portal"];
mutationFn: () => Promise<BillingActionResult>;
};
export declare const cancelBillingSubscriptionOptions: (adapter: BillingAdapter, scope: BillingScope) => {
mutationKey: readonly ["auth", "billing", string, "cancel"];
mutationFn: (subscriptionId: string) => Promise<BillingActionResult>;
meta: {
awaits: (readonly ["auth", "billing", string, "state"])[];
};
};
export declare const restoreBillingSubscriptionOptions: (adapter: BillingAdapter, scope: BillingScope) => {
mutationKey: readonly ["auth", "billing", string, "restore"];
mutationFn: (subscriptionId: string) => Promise<BillingActionResult>;
meta: {
awaits: (readonly ["auth", "billing", string, "state"])[];
};
};
export type UpdateBillingSeatsVariables = {
subscriptionId: string;
seats: number;
};
export declare const updateBillingSeatsOptions: (adapter: BillingAdapter, scope: BillingScope) => {
mutationKey: readonly ["auth", "billing", string, "seats"];
mutationFn: ({ subscriptionId, seats }: UpdateBillingSeatsVariables) => Promise<BillingActionResult>;
meta: {
awaits: (readonly ["auth", "billing", string, "state"])[];
};
};