@foldspace-fe/casdoor-next-auth-kit 0.1.1

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.
Files changed (40) hide show
  1. package/dist/billing/index.d.ts +16 -0
  2. package/dist/billing/index.js +28 -0
  3. package/dist/billing/index.js.map +1 -0
  4. package/dist/callback-BTzHQK_r.d.ts +12 -0
  5. package/dist/casdoor/index.d.ts +28 -0
  6. package/dist/casdoor/index.js +40 -0
  7. package/dist/casdoor/index.js.map +1 -0
  8. package/dist/chunk-6E27SZ7V.js +291 -0
  9. package/dist/chunk-6E27SZ7V.js.map +1 -0
  10. package/dist/chunk-DONQHN4U.js +56 -0
  11. package/dist/chunk-DONQHN4U.js.map +1 -0
  12. package/dist/chunk-IQEVUR77.js +909 -0
  13. package/dist/chunk-IQEVUR77.js.map +1 -0
  14. package/dist/chunk-RGTVPBH7.js +182 -0
  15. package/dist/chunk-RGTVPBH7.js.map +1 -0
  16. package/dist/chunk-T2M5MVPE.js +20 -0
  17. package/dist/chunk-T2M5MVPE.js.map +1 -0
  18. package/dist/chunk-XMBHIEYL.js +1 -0
  19. package/dist/chunk-XMBHIEYL.js.map +1 -0
  20. package/dist/chunk-Y4GJ2AEI.js +192 -0
  21. package/dist/chunk-Y4GJ2AEI.js.map +1 -0
  22. package/dist/cli.d.ts +2 -0
  23. package/dist/cli.js +437 -0
  24. package/dist/cli.js.map +1 -0
  25. package/dist/index.d.ts +77 -0
  26. package/dist/index.js +148 -0
  27. package/dist/index.js.map +1 -0
  28. package/dist/next/index.d.ts +17 -0
  29. package/dist/next/index.js +24 -0
  30. package/dist/next/index.js.map +1 -0
  31. package/dist/options-JUwZSXu2.d.ts +40 -0
  32. package/dist/react/index.d.ts +242 -0
  33. package/dist/react/index.js +774 -0
  34. package/dist/react/index.js.map +1 -0
  35. package/dist/skills/casdoor-next-auth-kit/SKILL.md +158 -0
  36. package/dist/skills/casdoor-next-auth-kit/references/casdoor-api-reference.md +2387 -0
  37. package/dist/skills/casdoor-next-auth-kit/references/swagger.json +3686 -0
  38. package/dist/types-BPsPs5Rv.d.ts +337 -0
  39. package/dist/types-DqVXdUge.d.ts +121 -0
  40. package/package.json +69 -0
package/dist/index.js ADDED
@@ -0,0 +1,148 @@
1
+ import {
2
+ AUTH_KIT_ENV_FILES,
3
+ AUTH_KIT_ENV_VARIABLES,
4
+ AUTH_PRISMA_SCHEMA_MODELS,
5
+ buildAuthPrismaSchemaTemplate,
6
+ buildManagedEnvTemplate,
7
+ getManagedEnvValue,
8
+ getMissingManagedEnvKeys,
9
+ sanitizeExistingEnvContent
10
+ } from "./chunk-6E27SZ7V.js";
11
+ import "./chunk-XMBHIEYL.js";
12
+ import {
13
+ createCasdoorApiProxyHandler,
14
+ createCasdoorCommerceProxyHandler,
15
+ createCasdoorPageProxyHandler
16
+ } from "./chunk-DONQHN4U.js";
17
+ import {
18
+ createAuthorizeRouteHandler,
19
+ createLoginRouteHandler,
20
+ createLogoutHandler,
21
+ createNextAuthOptions,
22
+ createNextAuthRouteHandler,
23
+ createSignupRouteHandler
24
+ } from "./chunk-Y4GJ2AEI.js";
25
+ import {
26
+ AUTH_INDEX_HTML,
27
+ AUTH_REDIRECT_COOKIE_NAME,
28
+ PUBLIC_ORIGIN_COOKIE_NAME,
29
+ clearAuthRedirectCookie,
30
+ clearPublicOriginCookie,
31
+ createAuthIndexHtml,
32
+ createAuthorizeEntryResponse,
33
+ createCallbackHandler,
34
+ createCallbackResponse,
35
+ createLoginEntryResponse,
36
+ createSignupEntryResponse,
37
+ decodeCasdoorAccessToken,
38
+ decodeSessionToken,
39
+ encodeSessionToken,
40
+ exchangeCasdoorOAuthToken,
41
+ exchangeCodeForToken,
42
+ fetchCasdoorUserInfo,
43
+ generateStateToken,
44
+ getAuthRedirectTarget,
45
+ getCasdoorAuthorizeUrl,
46
+ getCasdoorConfig,
47
+ getCasdoorTokenUrl,
48
+ getCasdoorUserInfoUrl,
49
+ getGlobalAdminEmails,
50
+ getPkceCookieName,
51
+ getRequestOrigin,
52
+ getStoredPublicOrigin,
53
+ isGlobalAdminEmail,
54
+ isSecureRequest,
55
+ normalizeAuthKitConfig,
56
+ parseStateToken,
57
+ pkceCookiePrefix,
58
+ setAuthRedirectCookie,
59
+ setPublicOriginCookie,
60
+ verifyState,
61
+ verifyStateToken
62
+ } from "./chunk-IQEVUR77.js";
63
+ import {
64
+ buildBillingActionPayload,
65
+ deriveBillingCreditsState,
66
+ deriveBillingEntitlements,
67
+ filterProductsByKind,
68
+ normalizeBillingCatalogConfig,
69
+ normalizeBillingPurchaseStatus,
70
+ normalizeBillingRuntimeConfig,
71
+ resolveBillingInterval,
72
+ resolveBillingItem,
73
+ resolveBillingProductSnapshot,
74
+ resolveBillingSubscriptionProduct
75
+ } from "./chunk-RGTVPBH7.js";
76
+ import {
77
+ buildAuthJumpHref,
78
+ resolvePostLoginRedirect
79
+ } from "./chunk-T2M5MVPE.js";
80
+ export {
81
+ AUTH_INDEX_HTML,
82
+ AUTH_KIT_ENV_FILES,
83
+ AUTH_KIT_ENV_VARIABLES,
84
+ AUTH_PRISMA_SCHEMA_MODELS,
85
+ AUTH_REDIRECT_COOKIE_NAME,
86
+ PUBLIC_ORIGIN_COOKIE_NAME,
87
+ buildAuthJumpHref,
88
+ buildAuthPrismaSchemaTemplate,
89
+ buildBillingActionPayload,
90
+ buildManagedEnvTemplate,
91
+ clearAuthRedirectCookie,
92
+ clearPublicOriginCookie,
93
+ createAuthIndexHtml,
94
+ createAuthorizeEntryResponse,
95
+ createAuthorizeRouteHandler,
96
+ createCallbackHandler,
97
+ createCallbackResponse,
98
+ createCasdoorApiProxyHandler,
99
+ createCasdoorCommerceProxyHandler,
100
+ createCasdoorPageProxyHandler,
101
+ createLoginEntryResponse,
102
+ createLoginRouteHandler,
103
+ createLogoutHandler,
104
+ createNextAuthOptions,
105
+ createNextAuthRouteHandler,
106
+ createSignupEntryResponse,
107
+ createSignupRouteHandler,
108
+ decodeCasdoorAccessToken,
109
+ decodeSessionToken,
110
+ deriveBillingCreditsState,
111
+ deriveBillingEntitlements,
112
+ encodeSessionToken,
113
+ exchangeCasdoorOAuthToken,
114
+ exchangeCodeForToken,
115
+ fetchCasdoorUserInfo,
116
+ filterProductsByKind,
117
+ generateStateToken,
118
+ getAuthRedirectTarget,
119
+ getCasdoorAuthorizeUrl,
120
+ getCasdoorConfig,
121
+ getCasdoorTokenUrl,
122
+ getCasdoorUserInfoUrl,
123
+ getGlobalAdminEmails,
124
+ getManagedEnvValue,
125
+ getMissingManagedEnvKeys,
126
+ getPkceCookieName,
127
+ getRequestOrigin,
128
+ getStoredPublicOrigin,
129
+ isGlobalAdminEmail,
130
+ isSecureRequest,
131
+ normalizeAuthKitConfig,
132
+ normalizeBillingCatalogConfig,
133
+ normalizeBillingPurchaseStatus,
134
+ normalizeBillingRuntimeConfig,
135
+ parseStateToken,
136
+ pkceCookiePrefix,
137
+ resolveBillingInterval,
138
+ resolveBillingItem,
139
+ resolveBillingProductSnapshot,
140
+ resolveBillingSubscriptionProduct,
141
+ resolvePostLoginRedirect,
142
+ sanitizeExistingEnvContent,
143
+ setAuthRedirectCookie,
144
+ setPublicOriginCookie,
145
+ verifyState,
146
+ verifyStateToken
147
+ };
148
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,17 @@
1
+ import * as next_server from 'next/server';
2
+ import { NextRequest, NextResponse } from 'next/server';
3
+ import { A as AuthKitConfig } from '../types-DqVXdUge.js';
4
+ export { C as CallbackHandlerOptions, c as createCallbackHandler, a as createCallbackResponse } from '../callback-BTzHQK_r.js';
5
+ export { A as AuthSession, a as AuthSessionUser, b as AuthTokenPayload, N as NextAuthRouteOptions, c as createNextAuthOptions, d as createNextAuthRouteHandler } from '../options-JUwZSXu2.js';
6
+ import 'next-auth';
7
+ import 'next-auth/jwt';
8
+
9
+ declare function createLoginRouteHandler(config: AuthKitConfig): (request: NextRequest) => Promise<next_server.NextResponse<unknown>>;
10
+
11
+ declare function createSignupRouteHandler(config: AuthKitConfig): (request: NextRequest) => Promise<next_server.NextResponse<unknown>>;
12
+
13
+ declare function createAuthorizeRouteHandler(config: AuthKitConfig): (request: NextRequest) => Promise<next_server.NextResponse<unknown>>;
14
+
15
+ declare function createLogoutHandler(config: AuthKitConfig): (request: NextRequest) => Promise<NextResponse<unknown>>;
16
+
17
+ export { createAuthorizeRouteHandler, createLoginRouteHandler, createLogoutHandler, createSignupRouteHandler };
@@ -0,0 +1,24 @@
1
+ import {
2
+ createAuthorizeRouteHandler,
3
+ createLoginRouteHandler,
4
+ createLogoutHandler,
5
+ createNextAuthOptions,
6
+ createNextAuthRouteHandler,
7
+ createSignupRouteHandler
8
+ } from "../chunk-Y4GJ2AEI.js";
9
+ import {
10
+ createCallbackHandler,
11
+ createCallbackResponse
12
+ } from "../chunk-IQEVUR77.js";
13
+ import "../chunk-T2M5MVPE.js";
14
+ export {
15
+ createAuthorizeRouteHandler,
16
+ createCallbackHandler,
17
+ createCallbackResponse,
18
+ createLoginRouteHandler,
19
+ createLogoutHandler,
20
+ createNextAuthOptions,
21
+ createNextAuthRouteHandler,
22
+ createSignupRouteHandler
23
+ };
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,40 @@
1
+ import { Session, NextAuthOptions } from 'next-auth';
2
+ import { JWT } from 'next-auth/jwt';
3
+ import { A as AuthKitConfig, a as AuthBusinessAdapter, b as AuthPersistenceAdapter } from './types-DqVXdUge.js';
4
+
5
+ interface NextAuthRouteOptions {
6
+ config: AuthKitConfig;
7
+ adapter?: AuthBusinessAdapter;
8
+ persistence?: AuthPersistenceAdapter;
9
+ providers?: NextAuthOptions['providers'];
10
+ }
11
+ interface AuthTokenPayload extends JWT {
12
+ id?: string;
13
+ name?: string;
14
+ email?: string;
15
+ picture?: string | null;
16
+ userId?: string;
17
+ accessToken?: string;
18
+ expiresAt?: number;
19
+ tokenBalance?: number;
20
+ isVip?: boolean;
21
+ isAdmin?: boolean;
22
+ }
23
+ interface AuthSessionUser {
24
+ id?: string;
25
+ isAdmin?: boolean;
26
+ tokenBalance?: number;
27
+ isVip?: boolean;
28
+ }
29
+ interface AuthSession extends Session {
30
+ accessToken?: string;
31
+ expiresAt?: number;
32
+ user?: AuthSessionUser & NonNullable<Session['user']>;
33
+ }
34
+ declare function createNextAuthOptions(options: NextAuthRouteOptions): NextAuthOptions;
35
+ declare function createNextAuthRouteHandler(options: NextAuthRouteOptions): {
36
+ GET: any;
37
+ POST: any;
38
+ };
39
+
40
+ export { type AuthSession as A, type NextAuthRouteOptions as N, type AuthSessionUser as a, type AuthTokenPayload as b, createNextAuthOptions as c, createNextAuthRouteHandler as d };
@@ -0,0 +1,242 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+ import { Session } from 'next-auth';
4
+ export { Session } from 'next-auth';
5
+ import { useSession } from 'next-auth/react';
6
+ import { A as AuthSession } from '../options-JUwZSXu2.js';
7
+ export { a as AuthSessionUser, b as AuthTokenPayload } from '../options-JUwZSXu2.js';
8
+ import { B as BillingActionPayload, a as BillingItem, b as BillingRuntimeConfig, c as BillingCatalogConfig, d as BillingApiClient, e as BillingLoaders, f as BillingActionExecutor, g as BillingDefaults, h as BillingSubscriptionState, i as BillingSubscriptionHistoryItem, j as BillingProductState, k as BillingOrderHistoryItem, l as BillingPaymentHistoryItem, m as BillingCreditsState, n as BillingEntitlementState, o as BillingStatusState, p as BillingPurchaseStatus, q as BillingProductSnapshot, r as BillingCoreContextValue } from '../types-BPsPs5Rv.js';
9
+ import 'next-auth/jwt';
10
+ import '../types-DqVXdUge.js';
11
+
12
+ declare function AuthProvider({ children, session, }: {
13
+ children: ReactNode;
14
+ session?: Session | null;
15
+ }): react_jsx_runtime.JSX.Element;
16
+
17
+ type AuthRole = 'guest' | 'user' | 'admin';
18
+ interface AuthUserSummary {
19
+ id: string | null;
20
+ name: string;
21
+ email: string | null;
22
+ image: string | null;
23
+ isAuthenticated: boolean;
24
+ isAdmin: boolean;
25
+ tokenBalance: number;
26
+ isVip: boolean;
27
+ role: AuthRole;
28
+ }
29
+ interface AuthActions {
30
+ loginHref: string;
31
+ signupHref: string;
32
+ logoutHref: string;
33
+ accountHref: string;
34
+ adminHref: string;
35
+ }
36
+ interface AuthActionsOptions {
37
+ redirect?: string | null;
38
+ }
39
+ declare function useAuthSession(): ReturnType<typeof useSession> & {
40
+ data: AuthSession | null | undefined;
41
+ };
42
+ declare function useAuthUser(): AuthUserSummary;
43
+ declare function useAuthRole(): AuthRole;
44
+ declare function useAuthActions(options?: AuthActionsOptions): AuthActions;
45
+
46
+ interface BillingProviderProps {
47
+ children: ReactNode;
48
+ apiClient: BillingApiClient;
49
+ loaders?: BillingLoaders;
50
+ runtimeConfigLoader?: BillingLoaders['runtimeConfigLoader'];
51
+ actionExecutor?: BillingActionExecutor;
52
+ defaults?: BillingDefaults;
53
+ runtimeConfig?: BillingRuntimeConfig | BillingCatalogConfig;
54
+ subscription?: BillingSubscriptionState;
55
+ subscriptionHistory?: BillingSubscriptionHistoryItem[];
56
+ products?: BillingProductState[];
57
+ orderHistory?: BillingOrderHistoryItem[];
58
+ paymentHistory?: BillingPaymentHistoryItem[];
59
+ credits?: BillingCreditsState;
60
+ entitlements?: BillingEntitlementState;
61
+ status?: BillingStatusState;
62
+ purchaseStatus?: BillingPurchaseStatus;
63
+ autoRefresh?: boolean;
64
+ }
65
+ type BillingCoreProviderProps = BillingProviderProps;
66
+ interface BillingSubscriptionProviderProps {
67
+ children: ReactNode;
68
+ availablePlans?: BillingItem[];
69
+ subscription?: BillingSubscriptionState;
70
+ subscriptionHistory?: BillingSubscriptionHistoryItem[];
71
+ entitlements?: BillingEntitlementState;
72
+ status?: BillingStatusState;
73
+ }
74
+ interface BillingProductProviderProps {
75
+ children: ReactNode;
76
+ availableProducts?: BillingItem[];
77
+ products?: BillingProductState[];
78
+ orderHistory?: BillingOrderHistoryItem[];
79
+ paymentHistory?: BillingPaymentHistoryItem[];
80
+ status?: BillingStatusState;
81
+ }
82
+ interface BillingCreditsProviderProps {
83
+ children: ReactNode;
84
+ credits?: BillingCreditsState;
85
+ status?: BillingStatusState;
86
+ }
87
+ interface BillingPipelineOptions {
88
+ onBeforeAction?: (payload: BillingActionPayload) => Promise<BillingActionPayload>;
89
+ onAfterAction?: (result: {
90
+ redirectTo?: string;
91
+ nextAction?: string;
92
+ }) => Promise<void>;
93
+ onError?: (error: unknown) => Promise<void>;
94
+ }
95
+ declare function BillingProvider({ children, apiClient, loaders, runtimeConfigLoader, actionExecutor, defaults, runtimeConfig: runtimeConfigProp, subscription: subscriptionProp, subscriptionHistory: subscriptionHistoryProp, products: productsProp, orderHistory: orderHistoryProp, paymentHistory: paymentHistoryProp, credits: creditsProp, entitlements: entitlementsProp, status: statusProp, purchaseStatus: purchaseStatusProp, autoRefresh, }: BillingProviderProps): react_jsx_runtime.JSX.Element;
96
+ declare function BillingCoreProvider(props: BillingCoreProviderProps): react_jsx_runtime.JSX.Element;
97
+ declare function SubscriptionProvider({ children, availablePlans, subscription, subscriptionHistory, entitlements, status, }: BillingSubscriptionProviderProps): react_jsx_runtime.JSX.Element;
98
+ declare function ProductProvider({ children, availableProducts, products, orderHistory, paymentHistory, status, }: BillingProductProviderProps): react_jsx_runtime.JSX.Element;
99
+ declare function CreditsProvider({ children, credits, status }: BillingCreditsProviderProps): react_jsx_runtime.JSX.Element;
100
+ interface BillingCatalogState {
101
+ catalog?: BillingRuntimeConfig | BillingCatalogConfig;
102
+ loading: boolean;
103
+ error: string | null;
104
+ refresh: () => Promise<void>;
105
+ }
106
+ declare function useBillingContext(): BillingCoreContextValue;
107
+ declare function useBillingCatalog(): BillingCatalogState;
108
+ interface BillingItemState {
109
+ item?: BillingProductSnapshot;
110
+ loading: boolean;
111
+ error: string | null;
112
+ refresh: () => Promise<void>;
113
+ }
114
+ declare function useBillingItem(itemKey: string): BillingItemState;
115
+ interface BillingProductsState {
116
+ products: BillingProductState[];
117
+ loading: boolean;
118
+ error: string | null;
119
+ refresh: () => Promise<void>;
120
+ }
121
+ declare function useBillingProducts(options?: {
122
+ userId?: string;
123
+ catalogKey?: string;
124
+ kind?: 'product' | 'credits';
125
+ }): BillingProductsState;
126
+ interface BillingAvailablePlansState {
127
+ plans: BillingItem[];
128
+ loading: boolean;
129
+ error: string | null;
130
+ refresh: () => Promise<void>;
131
+ }
132
+ declare function useBillingAvailablePlans(): BillingAvailablePlansState;
133
+ interface BillingAvailableProductsState {
134
+ items: BillingItem[];
135
+ loading: boolean;
136
+ error: string | null;
137
+ refresh: () => Promise<void>;
138
+ }
139
+ declare function useBillingAvailableProducts(): BillingAvailableProductsState;
140
+ interface BillingOrderHistoryState {
141
+ orders: BillingOrderHistoryItem[];
142
+ loading: boolean;
143
+ error: string | null;
144
+ refresh: () => Promise<void>;
145
+ }
146
+ declare function useBillingOrderHistory(_options?: {
147
+ userId?: string;
148
+ catalogKey?: string;
149
+ productKey?: string;
150
+ }): BillingOrderHistoryState;
151
+ interface BillingPaymentHistoryState {
152
+ payments: BillingPaymentHistoryItem[];
153
+ loading: boolean;
154
+ error: string | null;
155
+ refresh: () => Promise<void>;
156
+ }
157
+ declare function useBillingPaymentHistory(_options?: {
158
+ userId?: string;
159
+ catalogKey?: string;
160
+ }): BillingPaymentHistoryState;
161
+ interface BillingSubscriptionStateView {
162
+ subscription?: BillingSubscriptionState;
163
+ loading: boolean;
164
+ error: string | null;
165
+ refresh: () => Promise<void>;
166
+ }
167
+ declare function useBillingSubscription(): BillingSubscriptionStateView;
168
+ interface BillingSubscriptionProductState {
169
+ product?: BillingProductSnapshot;
170
+ loading: boolean;
171
+ error: string | null;
172
+ refresh: () => Promise<void>;
173
+ }
174
+ declare function useBillingSubscriptionProduct(): BillingSubscriptionProductState;
175
+ interface BillingSubscriptionHistoryState {
176
+ history: BillingSubscriptionHistoryItem[];
177
+ loading: boolean;
178
+ error: string | null;
179
+ refresh: () => Promise<void>;
180
+ }
181
+ declare function useBillingSubscriptionHistory(_options?: {
182
+ userId?: string;
183
+ catalogKey?: string;
184
+ }): BillingSubscriptionHistoryState;
185
+ interface BillingCreditsStateView {
186
+ credits?: BillingCreditsState;
187
+ loading: boolean;
188
+ error: string | null;
189
+ refresh: () => Promise<void>;
190
+ }
191
+ declare function useBillingCredits(): BillingCreditsStateView;
192
+ interface BillingEntitlementsStateView {
193
+ entitlements?: BillingEntitlementState;
194
+ loading: boolean;
195
+ error: string | null;
196
+ refresh: () => Promise<void>;
197
+ }
198
+ declare function useBillingEntitlements(): BillingEntitlementsStateView;
199
+ interface BillingPurchaseStatusView {
200
+ purchaseStatus?: BillingPurchaseStatus;
201
+ loading: boolean;
202
+ error: string | null;
203
+ refresh: () => Promise<void>;
204
+ }
205
+ declare function useBillingPurchaseStatus(): BillingPurchaseStatusView;
206
+ interface BillingStatusView {
207
+ status: BillingStatusState;
208
+ }
209
+ declare function useBillingStatus(): BillingStatusView;
210
+ interface BillingRefreshView {
211
+ refresh: () => Promise<void>;
212
+ }
213
+ declare function useBillingRefresh(): BillingRefreshView;
214
+ interface BillingPipelineResult {
215
+ run: (payload: BillingActionPayload) => Promise<void>;
216
+ loading: boolean;
217
+ error: string | null;
218
+ purchaseStatus?: BillingPurchaseStatus;
219
+ refresh: () => Promise<void>;
220
+ }
221
+ declare function useBillingPipeline(options?: BillingPipelineOptions): BillingPipelineResult;
222
+ interface BillingActionHookResult {
223
+ run: (payload: BillingActionPayload) => Promise<void>;
224
+ loading: boolean;
225
+ error: string | null;
226
+ }
227
+ declare function useSubscribePlan(): BillingActionHookResult;
228
+ declare function useManageSubscription(): BillingActionHookResult;
229
+ declare function useUpgradePlan(): BillingActionHookResult;
230
+ declare function useCancelSubscription(): BillingActionHookResult;
231
+ declare function usePurchaseCredits(): BillingActionHookResult;
232
+ declare function usePurchaseProduct(): BillingActionHookResult;
233
+ interface BillingProductStateView {
234
+ product?: BillingProductState;
235
+ loading: boolean;
236
+ error: string | null;
237
+ refresh: () => Promise<void>;
238
+ }
239
+ declare function useBillingProduct(productKey: string): BillingProductStateView;
240
+ declare function useBillingCatalogConfig(): BillingCatalogState;
241
+
242
+ export { type AuthActions, type AuthActionsOptions, AuthProvider, type AuthRole, AuthSession, type AuthUserSummary, type BillingActionHookResult, type BillingAvailablePlansState, type BillingAvailableProductsState, type BillingCatalogState, BillingCoreProvider, type BillingCoreProviderProps, type BillingCreditsProviderProps, type BillingCreditsStateView, type BillingEntitlementsStateView, type BillingItemState, type BillingOrderHistoryState, type BillingPaymentHistoryState, type BillingPipelineOptions, type BillingPipelineResult, type BillingProductProviderProps, type BillingProductStateView, type BillingProductsState, BillingProvider, type BillingProviderProps, type BillingPurchaseStatusView, type BillingRefreshView, type BillingStatusView, type BillingSubscriptionHistoryState, type BillingSubscriptionProductState, type BillingSubscriptionProviderProps, type BillingSubscriptionStateView, CreditsProvider, ProductProvider, SubscriptionProvider, useAuthActions, useAuthRole, useAuthSession, useAuthUser, useBillingAvailablePlans, useBillingAvailableProducts, useBillingCatalog, useBillingCatalogConfig, useBillingContext, useBillingCredits, useBillingEntitlements, useBillingItem, useBillingOrderHistory, useBillingPaymentHistory, useBillingPipeline, useBillingProduct, useBillingProducts, useBillingPurchaseStatus, useBillingRefresh, useBillingStatus, useBillingSubscription, useBillingSubscriptionHistory, useBillingSubscriptionProduct, useCancelSubscription, useManageSubscription, usePurchaseCredits, usePurchaseProduct, useSubscribePlan, useUpgradePlan };