autumn-js 0.1.41 → 0.1.42
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/libraries/backend/better-auth.mjs +1 -0
- package/dist/libraries/backend/chunk-6DZX6EAA.mjs +37 -0
- package/dist/libraries/backend/constants.mjs +1 -0
- package/dist/libraries/backend/convex.mjs +1 -0
- package/dist/libraries/backend/elysia.mjs +1 -0
- package/dist/libraries/backend/express.mjs +1 -0
- package/dist/libraries/backend/fastify.mjs +1 -0
- package/dist/libraries/backend/hono.mjs +1 -0
- package/dist/libraries/backend/index.mjs +1 -0
- package/dist/libraries/backend/next.js +3500 -3
- package/dist/libraries/backend/next.mjs +3504 -5
- package/dist/libraries/backend/react-router.mjs +1 -0
- package/dist/libraries/backend/remix_dep.mjs +1 -0
- package/dist/libraries/backend/routes/backendRouter.mjs +1 -0
- package/dist/libraries/backend/routes/entityRoutes.mjs +1 -0
- package/dist/libraries/backend/routes/genRoutes.mjs +1 -0
- package/dist/libraries/backend/routes/productRoutes.mjs +1 -0
- package/dist/libraries/backend/routes/referralRoutes.mjs +1 -0
- package/dist/libraries/backend/schemas/zod.mjs +2 -0
- package/dist/libraries/backend/supabase.mjs +1 -0
- package/dist/libraries/backend/tanstack.js +96 -4
- package/dist/libraries/backend/tanstack.mjs +98 -1
- package/dist/libraries/backend/utils/backendRes.mjs +1 -0
- package/dist/libraries/backend/utils/betterAuth/middlewares.mjs +1 -0
- package/dist/libraries/backend/utils/logBackendErrors.mjs +1 -0
- package/dist/libraries/backend/utils/secretKeyCheck.mjs +1 -0
- package/dist/libraries/backend/utils/withAuth.mjs +1 -0
- package/dist/libraries/react/chunk-CBCX366C.mjs +743 -0
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.mjs +5 -5
- package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.mjs +5 -5
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +5 -5
- package/package.json +196 -196
- package/tsup.config.ts +193 -186
- package/dist/next/client/AutumnClientProvider.d.mts +0 -2
- package/dist/next/client/AutumnClientProvider.d.ts +0 -2
- package/dist/next/client/NextAutumnClient.d.mts +0 -253
- package/dist/next/client/NextAutumnClient.d.ts +0 -253
- package/dist/next/client/NextAutumnProvider.d.mts +0 -12
- package/dist/next/client/NextAutumnProvider.d.ts +0 -12
- package/dist/next/client/clientAttachTypes-BtZh00uu.d.ts +0 -121
- package/dist/next/client/clientAttachTypes-yOuJqDWt.d.mts +0 -121
- package/dist/next/client/clientEntTypes-Bsi7ciUF.d.ts +0 -73
- package/dist/next/client/clientEntTypes-aLfa3lyP.d.mts +0 -73
- package/dist/next/client/clientUtils.d.mts +0 -19
- package/dist/next/client/clientUtils.d.ts +0 -19
- package/dist/next/client/cusTypes-B-rJwpui.d.ts +0 -123
- package/dist/next/client/cusTypes-CXjHwB-c.d.mts +0 -123
- package/dist/next/client/entTypes-BkN-Puru.d.mts +0 -22
- package/dist/next/client/entTypes-DjKFS-Zk.d.ts +0 -22
- package/dist/next/client/error-DHbclCVh.d.mts +0 -17
- package/dist/next/client/error-DHbclCVh.d.ts +0 -17
- package/dist/next/client/hooks/useAutumn.d.mts +0 -19
- package/dist/next/client/hooks/useAutumn.d.ts +0 -19
- package/dist/next/client/hooks/useCustomer.d.mts +0 -87
- package/dist/next/client/hooks/useCustomer.d.ts +0 -87
- package/dist/next/client/hooks/useEntity.d.mts +0 -33
- package/dist/next/client/hooks/useEntity.d.ts +0 -33
- package/dist/next/client/hooks/usePricingTable.d.mts +0 -34
- package/dist/next/client/hooks/usePricingTable.d.ts +0 -34
- package/dist/next/client/prodTypes-B_VMILpU.d.mts +0 -162
- package/dist/next/client/prodTypes-B_VMILpU.d.ts +0 -162
- package/dist/next/client/types.d.mts +0 -75
- package/dist/next/client/types.d.ts +0 -75
- package/dist/next/server/auth/authPlugin.d.mts +0 -13
- package/dist/next/server/auth/authPlugin.d.ts +0 -13
- package/dist/next/server/auth/clerk-wrapper.d.mts +0 -3
- package/dist/next/server/auth/clerk-wrapper.d.ts +0 -3
- package/dist/next/server/auth/get-next-headers.d.mts +0 -6
- package/dist/next/server/auth/get-next-headers.d.ts +0 -6
- package/dist/next/server/auth/handleAuthProvider.d.mts +0 -44
- package/dist/next/server/auth/handleAuthProvider.d.ts +0 -44
- package/dist/next/server/auth/supabase-wrapper.d.mts +0 -3
- package/dist/next/server/auth/supabase-wrapper.d.ts +0 -3
- package/dist/next/server/auth/withNextAuth.d.mts +0 -16
- package/dist/next/server/auth/withNextAuth.d.ts +0 -16
- package/dist/next/server/componentActions.d.mts +0 -12
- package/dist/next/server/componentActions.d.ts +0 -12
- package/dist/next/server/cusActions.d.mts +0 -633
- package/dist/next/server/cusActions.d.ts +0 -633
- package/dist/next/server/cusTypes-CrLBF0Kx.d.mts +0 -327
- package/dist/next/server/cusTypes-CrLBF0Kx.d.ts +0 -327
- package/dist/next/server/genActions.d.mts +0 -84
- package/dist/next/server/genActions.d.ts +0 -84
- package/dist/next/server/response-eH4S4sg0.d.mts +0 -29
- package/dist/next/server/response-eH4S4sg0.d.ts +0 -29
- package/dist/next/server/utils.d.mts +0 -5
- package/dist/next/server/utils.d.ts +0 -5
- package/dist/utils/encryptUtils.d.mts +0 -4
- package/dist/utils/encryptUtils.d.ts +0 -4
- package/dist/utils/entityUtils.d.mts +0 -3
- package/dist/utils/entityUtils.d.ts +0 -3
- package/dist/utils/logger.d.mts +0 -45
- package/dist/utils/logger.d.ts +0 -45
- package/dist/utils/toSnakeCase.d.mts +0 -7
- package/dist/utils/toSnakeCase.d.ts +0 -7
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { C as CustomerData, B as BillingPortalParams } from './cusTypes-CrLBF0Kx.mjs';
|
|
2
|
-
import 'zod/v4';
|
|
3
|
-
|
|
4
|
-
declare const attachAction: (args: Omit<{
|
|
5
|
-
productId?: string | undefined;
|
|
6
|
-
entityId?: string | undefined;
|
|
7
|
-
options?: {
|
|
8
|
-
featureId: string;
|
|
9
|
-
quantity: number;
|
|
10
|
-
}[] | undefined;
|
|
11
|
-
productIds?: string[] | undefined;
|
|
12
|
-
freeTrial?: boolean | undefined;
|
|
13
|
-
successUrl?: string | undefined;
|
|
14
|
-
metadata?: Record<string, string> | undefined;
|
|
15
|
-
forceCheckout?: boolean | undefined;
|
|
16
|
-
dialog?: any;
|
|
17
|
-
entityData?: any;
|
|
18
|
-
openInNewTab?: boolean | undefined;
|
|
19
|
-
reward?: string | undefined;
|
|
20
|
-
checkoutSessionParams?: Record<string, any> | undefined;
|
|
21
|
-
} & {
|
|
22
|
-
customerId: string;
|
|
23
|
-
customerData?: CustomerData;
|
|
24
|
-
}, "customerId"> & {
|
|
25
|
-
encryptedCustomerId?: string;
|
|
26
|
-
}, request?: Request) => Promise<any>;
|
|
27
|
-
declare const cancelAction: (args: Omit<{
|
|
28
|
-
productId: string;
|
|
29
|
-
entityId?: string | undefined;
|
|
30
|
-
cancelImmediately?: boolean | undefined;
|
|
31
|
-
} & {
|
|
32
|
-
customerId: string;
|
|
33
|
-
}, "customerId"> & {
|
|
34
|
-
encryptedCustomerId?: string;
|
|
35
|
-
}, request?: Request) => Promise<any>;
|
|
36
|
-
declare const checkAction: (args: Omit<{
|
|
37
|
-
featureId?: string | undefined;
|
|
38
|
-
productId?: string | undefined;
|
|
39
|
-
entityId?: string | undefined;
|
|
40
|
-
requiredBalance?: number | undefined;
|
|
41
|
-
sendEvent?: boolean | undefined;
|
|
42
|
-
withPreview?: boolean | undefined;
|
|
43
|
-
dialog?: any;
|
|
44
|
-
entityData?: any;
|
|
45
|
-
properties?: Record<string, any> | undefined;
|
|
46
|
-
} & {
|
|
47
|
-
customerId: string;
|
|
48
|
-
customerData?: CustomerData;
|
|
49
|
-
}, "customerId"> & {
|
|
50
|
-
encryptedCustomerId?: string;
|
|
51
|
-
}, request?: Request) => Promise<any>;
|
|
52
|
-
declare const trackAction: (args: Omit<{
|
|
53
|
-
featureId?: string | undefined;
|
|
54
|
-
eventName?: string | undefined;
|
|
55
|
-
entityId?: string | undefined;
|
|
56
|
-
value?: number | undefined;
|
|
57
|
-
idempotencyKey?: string | undefined;
|
|
58
|
-
entityData?: any;
|
|
59
|
-
} & {
|
|
60
|
-
customerId: string;
|
|
61
|
-
customerData?: CustomerData;
|
|
62
|
-
}, "customerId"> & {
|
|
63
|
-
encryptedCustomerId?: string;
|
|
64
|
-
}, request?: Request) => Promise<any>;
|
|
65
|
-
declare const getBillingPortalAction: (args: Omit<{
|
|
66
|
-
customerId: string;
|
|
67
|
-
params?: BillingPortalParams;
|
|
68
|
-
}, "customerId"> & {
|
|
69
|
-
encryptedCustomerId?: string;
|
|
70
|
-
}, request?: Request) => Promise<any>;
|
|
71
|
-
declare const generateReferralCodeAction: (args: Omit<{
|
|
72
|
-
customerId: string;
|
|
73
|
-
programId: string;
|
|
74
|
-
}, "customerId"> & {
|
|
75
|
-
encryptedCustomerId?: string;
|
|
76
|
-
}, request?: Request) => Promise<any>;
|
|
77
|
-
declare const redeemReferralCodeAction: (args: Omit<{
|
|
78
|
-
code: string;
|
|
79
|
-
customerId: string;
|
|
80
|
-
}, "customerId"> & {
|
|
81
|
-
encryptedCustomerId?: string;
|
|
82
|
-
}, request?: Request) => Promise<any>;
|
|
83
|
-
|
|
84
|
-
export { attachAction, cancelAction, checkAction, generateReferralCodeAction, getBillingPortalAction, redeemReferralCodeAction, trackAction };
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { C as CustomerData, B as BillingPortalParams } from './cusTypes-CrLBF0Kx.js';
|
|
2
|
-
import 'zod/v4';
|
|
3
|
-
|
|
4
|
-
declare const attachAction: (args: Omit<{
|
|
5
|
-
productId?: string | undefined;
|
|
6
|
-
entityId?: string | undefined;
|
|
7
|
-
options?: {
|
|
8
|
-
featureId: string;
|
|
9
|
-
quantity: number;
|
|
10
|
-
}[] | undefined;
|
|
11
|
-
productIds?: string[] | undefined;
|
|
12
|
-
freeTrial?: boolean | undefined;
|
|
13
|
-
successUrl?: string | undefined;
|
|
14
|
-
metadata?: Record<string, string> | undefined;
|
|
15
|
-
forceCheckout?: boolean | undefined;
|
|
16
|
-
dialog?: any;
|
|
17
|
-
entityData?: any;
|
|
18
|
-
openInNewTab?: boolean | undefined;
|
|
19
|
-
reward?: string | undefined;
|
|
20
|
-
checkoutSessionParams?: Record<string, any> | undefined;
|
|
21
|
-
} & {
|
|
22
|
-
customerId: string;
|
|
23
|
-
customerData?: CustomerData;
|
|
24
|
-
}, "customerId"> & {
|
|
25
|
-
encryptedCustomerId?: string;
|
|
26
|
-
}, request?: Request) => Promise<any>;
|
|
27
|
-
declare const cancelAction: (args: Omit<{
|
|
28
|
-
productId: string;
|
|
29
|
-
entityId?: string | undefined;
|
|
30
|
-
cancelImmediately?: boolean | undefined;
|
|
31
|
-
} & {
|
|
32
|
-
customerId: string;
|
|
33
|
-
}, "customerId"> & {
|
|
34
|
-
encryptedCustomerId?: string;
|
|
35
|
-
}, request?: Request) => Promise<any>;
|
|
36
|
-
declare const checkAction: (args: Omit<{
|
|
37
|
-
featureId?: string | undefined;
|
|
38
|
-
productId?: string | undefined;
|
|
39
|
-
entityId?: string | undefined;
|
|
40
|
-
requiredBalance?: number | undefined;
|
|
41
|
-
sendEvent?: boolean | undefined;
|
|
42
|
-
withPreview?: boolean | undefined;
|
|
43
|
-
dialog?: any;
|
|
44
|
-
entityData?: any;
|
|
45
|
-
properties?: Record<string, any> | undefined;
|
|
46
|
-
} & {
|
|
47
|
-
customerId: string;
|
|
48
|
-
customerData?: CustomerData;
|
|
49
|
-
}, "customerId"> & {
|
|
50
|
-
encryptedCustomerId?: string;
|
|
51
|
-
}, request?: Request) => Promise<any>;
|
|
52
|
-
declare const trackAction: (args: Omit<{
|
|
53
|
-
featureId?: string | undefined;
|
|
54
|
-
eventName?: string | undefined;
|
|
55
|
-
entityId?: string | undefined;
|
|
56
|
-
value?: number | undefined;
|
|
57
|
-
idempotencyKey?: string | undefined;
|
|
58
|
-
entityData?: any;
|
|
59
|
-
} & {
|
|
60
|
-
customerId: string;
|
|
61
|
-
customerData?: CustomerData;
|
|
62
|
-
}, "customerId"> & {
|
|
63
|
-
encryptedCustomerId?: string;
|
|
64
|
-
}, request?: Request) => Promise<any>;
|
|
65
|
-
declare const getBillingPortalAction: (args: Omit<{
|
|
66
|
-
customerId: string;
|
|
67
|
-
params?: BillingPortalParams;
|
|
68
|
-
}, "customerId"> & {
|
|
69
|
-
encryptedCustomerId?: string;
|
|
70
|
-
}, request?: Request) => Promise<any>;
|
|
71
|
-
declare const generateReferralCodeAction: (args: Omit<{
|
|
72
|
-
customerId: string;
|
|
73
|
-
programId: string;
|
|
74
|
-
}, "customerId"> & {
|
|
75
|
-
encryptedCustomerId?: string;
|
|
76
|
-
}, request?: Request) => Promise<any>;
|
|
77
|
-
declare const redeemReferralCodeAction: (args: Omit<{
|
|
78
|
-
code: string;
|
|
79
|
-
customerId: string;
|
|
80
|
-
}, "customerId"> & {
|
|
81
|
-
encryptedCustomerId?: string;
|
|
82
|
-
}, request?: Request) => Promise<any>;
|
|
83
|
-
|
|
84
|
-
export { attachAction, cancelAction, checkAction, generateReferralCodeAction, getBillingPortalAction, redeemReferralCodeAction, trackAction };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
interface ErrorResponse {
|
|
2
|
-
message: string;
|
|
3
|
-
code: string;
|
|
4
|
-
}
|
|
5
|
-
declare class AutumnError extends Error {
|
|
6
|
-
readonly message: string;
|
|
7
|
-
readonly code: string;
|
|
8
|
-
constructor(response: ErrorResponse);
|
|
9
|
-
static fromError(error: any): AutumnError;
|
|
10
|
-
toString(): string;
|
|
11
|
-
toJSON(): {
|
|
12
|
-
message: string;
|
|
13
|
-
code: string;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
type Success<T> = {
|
|
18
|
-
data: T;
|
|
19
|
-
error: null;
|
|
20
|
-
statusCode?: number;
|
|
21
|
-
};
|
|
22
|
-
type Failure<E> = {
|
|
23
|
-
data: null;
|
|
24
|
-
error: E;
|
|
25
|
-
statusCode?: number;
|
|
26
|
-
};
|
|
27
|
-
type Result<T, E> = Success<T> | Failure<E>;
|
|
28
|
-
|
|
29
|
-
export { AutumnError as A, type ErrorResponse as E, type Result as R };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
interface ErrorResponse {
|
|
2
|
-
message: string;
|
|
3
|
-
code: string;
|
|
4
|
-
}
|
|
5
|
-
declare class AutumnError extends Error {
|
|
6
|
-
readonly message: string;
|
|
7
|
-
readonly code: string;
|
|
8
|
-
constructor(response: ErrorResponse);
|
|
9
|
-
static fromError(error: any): AutumnError;
|
|
10
|
-
toString(): string;
|
|
11
|
-
toJSON(): {
|
|
12
|
-
message: string;
|
|
13
|
-
code: string;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
type Success<T> = {
|
|
18
|
-
data: T;
|
|
19
|
-
error: null;
|
|
20
|
-
statusCode?: number;
|
|
21
|
-
};
|
|
22
|
-
type Failure<E> = {
|
|
23
|
-
data: null;
|
|
24
|
-
error: E;
|
|
25
|
-
statusCode?: number;
|
|
26
|
-
};
|
|
27
|
-
type Result<T, E> = Success<T> | Failure<E>;
|
|
28
|
-
|
|
29
|
-
export { AutumnError as A, type ErrorResponse as E, type Result as R };
|
package/dist/utils/logger.d.mts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import * as util from 'util';
|
|
2
|
-
|
|
3
|
-
declare const logger: {
|
|
4
|
-
level: string;
|
|
5
|
-
debug: (...args: any[]) => void;
|
|
6
|
-
log: (...args: any[]) => void;
|
|
7
|
-
info: (...args: any[]) => void;
|
|
8
|
-
warn: (...args: any[]) => void;
|
|
9
|
-
error: (...args: any[]) => void;
|
|
10
|
-
assert(condition?: boolean, ...data: any[]): void;
|
|
11
|
-
assert(value: any, message?: string, ...optionalParams: any[]): void;
|
|
12
|
-
clear(): void;
|
|
13
|
-
clear(): void;
|
|
14
|
-
count(label?: string): void;
|
|
15
|
-
count(label?: string): void;
|
|
16
|
-
countReset(label?: string): void;
|
|
17
|
-
countReset(label?: string): void;
|
|
18
|
-
dir(item?: any, options?: any): void;
|
|
19
|
-
dir(obj: any, options?: util.InspectOptions): void;
|
|
20
|
-
dirxml(...data: any[]): void;
|
|
21
|
-
dirxml(...data: any[]): void;
|
|
22
|
-
group(...data: any[]): void;
|
|
23
|
-
group(...label: any[]): void;
|
|
24
|
-
groupCollapsed(...data: any[]): void;
|
|
25
|
-
groupCollapsed(...label: any[]): void;
|
|
26
|
-
groupEnd(): void;
|
|
27
|
-
groupEnd(): void;
|
|
28
|
-
table(tabularData?: any, properties?: string[]): void;
|
|
29
|
-
table(tabularData: any, properties?: readonly string[]): void;
|
|
30
|
-
time(label?: string): void;
|
|
31
|
-
time(label?: string): void;
|
|
32
|
-
timeEnd(label?: string): void;
|
|
33
|
-
timeEnd(label?: string): void;
|
|
34
|
-
timeLog(label?: string, ...data: any[]): void;
|
|
35
|
-
timeLog(label?: string, ...data: any[]): void;
|
|
36
|
-
timeStamp(label?: string): void;
|
|
37
|
-
timeStamp(label?: string): void;
|
|
38
|
-
trace(...data: any[]): void;
|
|
39
|
-
trace(message?: any, ...optionalParams: any[]): void;
|
|
40
|
-
Console: console.ConsoleConstructor;
|
|
41
|
-
profile(label?: string): void;
|
|
42
|
-
profileEnd(label?: string): void;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export { logger };
|
package/dist/utils/logger.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import * as util from 'util';
|
|
2
|
-
|
|
3
|
-
declare const logger: {
|
|
4
|
-
level: string;
|
|
5
|
-
debug: (...args: any[]) => void;
|
|
6
|
-
log: (...args: any[]) => void;
|
|
7
|
-
info: (...args: any[]) => void;
|
|
8
|
-
warn: (...args: any[]) => void;
|
|
9
|
-
error: (...args: any[]) => void;
|
|
10
|
-
assert(condition?: boolean, ...data: any[]): void;
|
|
11
|
-
assert(value: any, message?: string, ...optionalParams: any[]): void;
|
|
12
|
-
clear(): void;
|
|
13
|
-
clear(): void;
|
|
14
|
-
count(label?: string): void;
|
|
15
|
-
count(label?: string): void;
|
|
16
|
-
countReset(label?: string): void;
|
|
17
|
-
countReset(label?: string): void;
|
|
18
|
-
dir(item?: any, options?: any): void;
|
|
19
|
-
dir(obj: any, options?: util.InspectOptions): void;
|
|
20
|
-
dirxml(...data: any[]): void;
|
|
21
|
-
dirxml(...data: any[]): void;
|
|
22
|
-
group(...data: any[]): void;
|
|
23
|
-
group(...label: any[]): void;
|
|
24
|
-
groupCollapsed(...data: any[]): void;
|
|
25
|
-
groupCollapsed(...label: any[]): void;
|
|
26
|
-
groupEnd(): void;
|
|
27
|
-
groupEnd(): void;
|
|
28
|
-
table(tabularData?: any, properties?: string[]): void;
|
|
29
|
-
table(tabularData: any, properties?: readonly string[]): void;
|
|
30
|
-
time(label?: string): void;
|
|
31
|
-
time(label?: string): void;
|
|
32
|
-
timeEnd(label?: string): void;
|
|
33
|
-
timeEnd(label?: string): void;
|
|
34
|
-
timeLog(label?: string, ...data: any[]): void;
|
|
35
|
-
timeLog(label?: string, ...data: any[]): void;
|
|
36
|
-
timeStamp(label?: string): void;
|
|
37
|
-
timeStamp(label?: string): void;
|
|
38
|
-
trace(...data: any[]): void;
|
|
39
|
-
trace(message?: any, ...optionalParams: any[]): void;
|
|
40
|
-
Console: console.ConsoleConstructor;
|
|
41
|
-
profile(label?: string): void;
|
|
42
|
-
profileEnd(label?: string): void;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export { logger };
|