autumn-js 0.1.1 → 0.1.2
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.d.mts +144 -9
- package/dist/libraries/backend/better-auth.d.ts +144 -9
- package/dist/libraries/backend/better-auth.js +12 -0
- package/dist/libraries/backend/better-auth.mjs +20 -7
- package/dist/libraries/backend/{chunk-J2VSPYGM.mjs → chunk-F4A665AR.mjs} +1 -1
- package/dist/libraries/backend/{chunk-XB7LGW7G.mjs → chunk-GVPYJINB.mjs} +1 -1
- package/dist/libraries/backend/{chunk-KTOGBCW7.mjs → chunk-IG3DW6CW.mjs} +1 -1
- package/dist/libraries/backend/{chunk-TMPFQRFY.mjs → chunk-JARFSM7F.mjs} +1 -1
- package/dist/libraries/backend/{chunk-K4QNWERT.mjs → chunk-KYMRM3HV.mjs} +1 -1
- package/dist/libraries/backend/{chunk-DXWCLQ3N.mjs → chunk-LYDMLZB7.mjs} +1 -0
- package/dist/libraries/backend/{chunk-M74V7TUF.mjs → chunk-UZ7WFRWB.mjs} +6 -6
- package/dist/libraries/backend/convex.d.mts +0 -1
- package/dist/libraries/backend/convex.d.ts +0 -1
- package/dist/libraries/backend/convex.js +2 -2
- package/dist/libraries/backend/convex.mjs +9 -9
- package/dist/libraries/backend/elysia.mjs +7 -7
- package/dist/libraries/backend/express.d.mts +1 -1
- package/dist/libraries/backend/express.d.ts +1 -1
- package/dist/libraries/backend/express.mjs +7 -7
- package/dist/libraries/backend/fastify.mjs +7 -7
- package/dist/libraries/backend/hono.mjs +7 -7
- package/dist/libraries/backend/index.d.mts +1 -1
- package/dist/libraries/backend/index.d.ts +1 -1
- package/dist/libraries/backend/index.mjs +7 -7
- package/dist/libraries/backend/next.mjs +7 -7
- package/dist/libraries/backend/react-router.mjs +7 -7
- package/dist/libraries/backend/remix_dep.mjs +7 -7
- package/dist/libraries/backend/routes/backendRouter.mjs +7 -7
- package/dist/libraries/backend/routes/entityRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/genRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/productRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/referralRoutes.mjs +3 -3
- package/dist/libraries/backend/supabase.mjs +7 -7
- package/dist/libraries/backend/tanstack.mjs +7 -7
- package/dist/libraries/backend/utils/backendRes.mjs +1 -1
- package/dist/libraries/backend/utils/withAuth.d.mts +1 -1
- package/dist/libraries/backend/utils/withAuth.d.ts +1 -1
- package/dist/libraries/backend/utils/withAuth.mjs +2 -2
- package/dist/libraries/react/{chunk-FEISQQNM.mjs → chunk-5K2M3CQZ.mjs} +1 -1
- package/dist/libraries/react/{chunk-FJWZPMWU.mjs → chunk-BXMZYHE7.mjs} +3 -3
- package/dist/libraries/react/{chunk-HJI7QUTD.mjs → chunk-KIKDDSHG.mjs} +424 -422
- package/dist/libraries/react/{chunk-KUS3X33V.mjs → chunk-M7SUFZ42.mjs} +1 -1
- package/dist/libraries/react/{chunk-OTZ65PCT.mjs → chunk-MN66ZM7X.mjs} +6 -6
- package/dist/libraries/react/{chunk-YWQTQ72B.mjs → chunk-NHDZWWMZ.mjs} +2 -2
- package/dist/libraries/react/{chunk-I2A7PK2L.mjs → chunk-WT5K3J2K.mjs} +17 -17
- package/dist/libraries/react/{chunk-JGDTNJTR.mjs → chunk-YCDNQZT5.mjs} +2 -2
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.mjs +14 -14
- package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.mjs +14 -14
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +14 -14
- package/dist/libraries/react/components/ui/accordion.mjs +3 -3
- package/dist/libraries/react/components/ui/button.d.mts +1 -1
- package/dist/libraries/react/components/ui/button.d.ts +1 -1
- package/dist/libraries/react/components/ui/dialog.mjs +4 -4
- package/dist/libraries/react/components/ui/popover.mjs +5 -5
- package/dist/libraries/react/components/ui/switch.mjs +3 -3
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.mts +1 -1
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.ts +1 -1
- package/dist/libraries/react/hooks/useEntity.d.mts +2 -2
- package/dist/libraries/react/hooks/useEntity.d.ts +2 -2
- package/dist/libraries/react/hooks/useEntityBase.d.mts +2 -2
- package/dist/libraries/react/hooks/useEntityBase.d.ts +2 -2
- package/dist/next/client/NextAutumnClient.d.mts +6 -6
- package/dist/next/client/NextAutumnClient.d.ts +6 -6
- package/dist/next/client/NextAutumnProvider.d.mts +1 -1
- package/dist/next/client/NextAutumnProvider.d.ts +1 -1
- package/dist/next/client/clientUtils.d.mts +2 -2
- package/dist/next/client/clientUtils.d.ts +2 -2
- package/dist/next/client/{entTypes-DC0vr4aU.d.mts → entTypes-BcoGsNYC.d.mts} +1 -1
- package/dist/next/client/{entTypes-BRilmNmx.d.ts → entTypes-sKOZyw0N.d.ts} +1 -1
- package/dist/next/client/hooks/useAutumn.d.mts +3 -3
- package/dist/next/client/hooks/useAutumn.d.ts +3 -3
- package/dist/next/client/hooks/useCustomer.d.mts +4 -4
- package/dist/next/client/hooks/useCustomer.d.ts +4 -4
- package/dist/next/client/hooks/useEntity.d.mts +3 -3
- package/dist/next/client/hooks/useEntity.d.ts +3 -3
- package/dist/next/client/types.d.mts +2 -2
- package/dist/next/client/types.d.ts +2 -2
- package/dist/next/server/auth/withNextAuth.d.mts +1 -1
- package/dist/next/server/auth/withNextAuth.d.ts +1 -1
- package/dist/next/server/componentActions.d.mts +1 -1
- package/dist/next/server/componentActions.d.ts +1 -1
- package/dist/next/server/cusActions.d.mts +17 -17
- package/dist/next/server/cusActions.d.ts +17 -17
- package/dist/next/server/genActions.d.mts +1 -1
- package/dist/next/server/genActions.d.ts +1 -1
- package/package.json +1 -1
- package/dist/libraries/backend/{referralTypes-CQf4mX3z.d.ts → referralTypes-C4KG2r29.d.ts} +6 -6
- package/dist/libraries/backend/{referralTypes-Bxe9iJlv.d.mts → referralTypes-DA9Hp6Bm.d.mts} +6 -6
- package/dist/libraries/react/{chunk-7TYAAD2T.mjs → chunk-KWNH6C27.mjs} +11 -11
- package/dist/next/client/{attachTypes-B1E-U8us.d.mts → attachTypes-CAvqbMDV.d.mts} +2 -2
- package/dist/next/client/{attachTypes-92MRramY.d.ts → attachTypes-zg5EhNcS.d.ts} +2 -2
- package/dist/next/client/{clientAttachTypes-CBBghfgO.d.mts → clientAttachTypes-B-zWythK.d.mts} +2 -2
- package/dist/next/client/{clientAttachTypes-D6mgEcpb.d.ts → clientAttachTypes-DLh_8bIG.d.ts} +2 -2
- package/dist/next/client/{cusTypes-BVKU6cVB.d.ts → cusTypes-Crh2qzWb.d.ts} +2 -2
- package/dist/next/client/{cusTypes-BZtsQdTQ.d.mts → cusTypes-XE8bnuf2.d.mts} +2 -2
- package/dist/next/server/{cusTypes-Cy5gmwaq.d.ts → cusTypes-DUjCLJ7f.d.mts} +4 -4
- package/dist/next/server/{cusTypes-Cy5gmwaq.d.mts → cusTypes-DUjCLJ7f.d.ts} +4 -4
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { g as CheckParams, C as CheckResult, A as AttachParams, R as Result, c as CancelParams, a as AutumnPromise, T as TrackParams } from '../clientAttachTypes-
|
|
1
|
+
import { g as CheckParams, C as CheckResult, A as AttachParams, R as Result, c as CancelParams, a as AutumnPromise, T as TrackParams } from '../clientAttachTypes-B-zWythK.mjs';
|
|
2
2
|
import { A as AutumnError } from '../error-DHbclCVh.mjs';
|
|
3
|
-
import { G as GetEntityParams, E as Entity } from '../entTypes-
|
|
3
|
+
import { G as GetEntityParams, E as Entity } from '../entTypes-BcoGsNYC.mjs';
|
|
4
4
|
import * as swr from 'swr';
|
|
5
5
|
import '../prodTypes-CER0agHK.mjs';
|
|
6
6
|
import 'zod';
|
|
7
|
-
import '../cusTypes-
|
|
7
|
+
import '../cusTypes-XE8bnuf2.mjs';
|
|
8
8
|
|
|
9
9
|
declare const useEntity: (entityId: string | null, params?: GetEntityParams) => {
|
|
10
10
|
entity: Entity | null;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { g as CheckParams, C as CheckResult, A as AttachParams, R as Result, c as CancelParams, a as AutumnPromise, T as TrackParams } from '../clientAttachTypes-
|
|
1
|
+
import { g as CheckParams, C as CheckResult, A as AttachParams, R as Result, c as CancelParams, a as AutumnPromise, T as TrackParams } from '../clientAttachTypes-DLh_8bIG.js';
|
|
2
2
|
import { A as AutumnError } from '../error-DHbclCVh.js';
|
|
3
|
-
import { G as GetEntityParams, E as Entity } from '../entTypes-
|
|
3
|
+
import { G as GetEntityParams, E as Entity } from '../entTypes-sKOZyw0N.js';
|
|
4
4
|
import * as swr from 'swr';
|
|
5
5
|
import '../prodTypes-CER0agHK.js';
|
|
6
6
|
import 'zod';
|
|
7
|
-
import '../cusTypes-
|
|
7
|
+
import '../cusTypes-Crh2qzWb.js';
|
|
8
8
|
|
|
9
9
|
declare const useEntity: (entityId: string | null, params?: GetEntityParams) => {
|
|
10
10
|
entity: Entity | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CustomerData, a as Customer } from './cusTypes-
|
|
2
|
-
import { E as Entity } from './entTypes-
|
|
1
|
+
import { C as CustomerData, a as Customer } from './cusTypes-XE8bnuf2.mjs';
|
|
2
|
+
import { E as Entity } from './entTypes-BcoGsNYC.mjs';
|
|
3
3
|
import './prodTypes-CER0agHK.mjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CustomerData, a as Customer } from './cusTypes-
|
|
2
|
-
import { E as Entity } from './entTypes-
|
|
1
|
+
import { C as CustomerData, a as Customer } from './cusTypes-Crh2qzWb.js';
|
|
2
|
+
import { E as Entity } from './entTypes-sKOZyw0N.js';
|
|
3
3
|
import './prodTypes-CER0agHK.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, P as ProductItem, c as Product, G as GetCustomerParams, d as Customer, e as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, f as BillingPortalResult, g as UpdateBalancesParams, h as UpdateBalancesResult, i as CreateProductParams, L as ListProductsParams, j as CustomerProduct, k as CustomerFeature, l as CustomerInvoice } from './cusTypes-
|
|
1
|
+
import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, P as ProductItem, c as Product, G as GetCustomerParams, d as Customer, e as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, f as BillingPortalResult, g as UpdateBalancesParams, h as UpdateBalancesResult, i as CreateProductParams, L as ListProductsParams, j as CustomerProduct, k as CustomerFeature, l as CustomerInvoice } from './cusTypes-DUjCLJ7f.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { R as Result, A as AutumnError } from './response-eH4S4sg0.mjs';
|
|
4
4
|
|
|
@@ -8,13 +8,13 @@ declare const CancelParamsSchema: z.ZodObject<{
|
|
|
8
8
|
entity_id: z.ZodOptional<z.ZodString>;
|
|
9
9
|
cancel_immediately: z.ZodOptional<z.ZodBoolean>;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
product_id: string;
|
|
12
11
|
customer_id: string;
|
|
12
|
+
product_id: string;
|
|
13
13
|
entity_id?: string | undefined;
|
|
14
14
|
cancel_immediately?: boolean | undefined;
|
|
15
15
|
}, {
|
|
16
|
-
product_id: string;
|
|
17
16
|
customer_id: string;
|
|
17
|
+
product_id: string;
|
|
18
18
|
entity_id?: string | undefined;
|
|
19
19
|
cancel_immediately?: boolean | undefined;
|
|
20
20
|
}>;
|
|
@@ -70,9 +70,9 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
70
70
|
}, "strip", z.ZodTypeAny, {
|
|
71
71
|
customer_id: string;
|
|
72
72
|
feature_id?: string | undefined;
|
|
73
|
-
product_id?: string | undefined;
|
|
74
73
|
entity_id?: string | undefined;
|
|
75
74
|
required_balance?: number | undefined;
|
|
75
|
+
product_id?: string | undefined;
|
|
76
76
|
customer_data?: any;
|
|
77
77
|
entity_data?: {
|
|
78
78
|
feature_id: string;
|
|
@@ -83,9 +83,9 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
83
83
|
}, {
|
|
84
84
|
customer_id: string;
|
|
85
85
|
feature_id?: string | undefined;
|
|
86
|
-
product_id?: string | undefined;
|
|
87
86
|
entity_id?: string | undefined;
|
|
88
87
|
required_balance?: number | undefined;
|
|
88
|
+
product_id?: string | undefined;
|
|
89
89
|
customer_data?: any;
|
|
90
90
|
entity_data?: {
|
|
91
91
|
feature_id: string;
|
|
@@ -121,12 +121,12 @@ declare const QueryParamsSchema: z.ZodObject<{
|
|
|
121
121
|
feature_id: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
122
122
|
range: z.ZodOptional<z.ZodEnum<["24h", "7d", "30d", "90d", "last_cycle"]>>;
|
|
123
123
|
}, "strip", z.ZodTypeAny, {
|
|
124
|
-
feature_id: string | string[];
|
|
125
124
|
customer_id: string;
|
|
125
|
+
feature_id: string | string[];
|
|
126
126
|
range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
|
|
127
127
|
}, {
|
|
128
|
-
feature_id: string | string[];
|
|
129
128
|
customer_id: string;
|
|
129
|
+
feature_id: string | string[];
|
|
130
130
|
range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
|
|
131
131
|
}>;
|
|
132
132
|
type QueryParams = z.infer<typeof QueryParamsSchema>;
|
|
@@ -190,9 +190,9 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
190
190
|
feature_id: string;
|
|
191
191
|
quantity: number;
|
|
192
192
|
}[] | undefined;
|
|
193
|
+
entity_id?: string | undefined;
|
|
193
194
|
metadata?: Record<string, string> | undefined;
|
|
194
195
|
product_id?: string | undefined;
|
|
195
|
-
entity_id?: string | undefined;
|
|
196
196
|
product_ids?: string[] | undefined;
|
|
197
197
|
free_trial?: boolean | undefined;
|
|
198
198
|
success_url?: string | undefined;
|
|
@@ -211,9 +211,9 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
211
211
|
feature_id: string;
|
|
212
212
|
quantity: number;
|
|
213
213
|
}[] | undefined;
|
|
214
|
+
entity_id?: string | undefined;
|
|
214
215
|
metadata?: Record<string, string> | undefined;
|
|
215
216
|
product_id?: string | undefined;
|
|
216
|
-
entity_id?: string | undefined;
|
|
217
217
|
product_ids?: string[] | undefined;
|
|
218
218
|
free_trial?: boolean | undefined;
|
|
219
219
|
success_url?: string | undefined;
|
|
@@ -260,8 +260,8 @@ declare const CheckoutParamsSchema: z.ZodObject<{
|
|
|
260
260
|
checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
261
261
|
reward: z.ZodOptional<z.ZodString>;
|
|
262
262
|
}, "strip", z.ZodTypeAny, {
|
|
263
|
-
product_id: string;
|
|
264
263
|
customer_id: string;
|
|
264
|
+
product_id: string;
|
|
265
265
|
options?: {
|
|
266
266
|
feature_id: string;
|
|
267
267
|
quantity: number;
|
|
@@ -277,8 +277,8 @@ declare const CheckoutParamsSchema: z.ZodObject<{
|
|
|
277
277
|
checkout_session_params?: Record<string, any> | undefined;
|
|
278
278
|
reward?: string | undefined;
|
|
279
279
|
}, {
|
|
280
|
-
product_id: string;
|
|
281
280
|
customer_id: string;
|
|
281
|
+
product_id: string;
|
|
282
282
|
options?: {
|
|
283
283
|
feature_id: string;
|
|
284
284
|
quantity: number;
|
|
@@ -404,28 +404,28 @@ declare class Autumn {
|
|
|
404
404
|
static setupPayment: (params: SetupPaymentParams) => Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
405
405
|
setupPayment(params: SetupPaymentParams): Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
406
406
|
static cancel: (params: CancelParams) => Promise<Result<{
|
|
407
|
-
product_id: string;
|
|
408
407
|
customer_id: string;
|
|
408
|
+
product_id: string;
|
|
409
409
|
success: boolean;
|
|
410
410
|
}, AutumnError>>;
|
|
411
411
|
cancel(params: CancelParams): Promise<Result<{
|
|
412
|
-
product_id: string;
|
|
413
412
|
customer_id: string;
|
|
413
|
+
product_id: string;
|
|
414
414
|
success: boolean;
|
|
415
415
|
}, AutumnError>>;
|
|
416
416
|
static check: (params: CheckParams) => Promise<Result<CheckResult, AutumnError>>;
|
|
417
417
|
check(params: CheckParams): Promise<Result<CheckResult, AutumnError>>;
|
|
418
418
|
static track: (params: TrackParams) => Promise<Result<{
|
|
419
419
|
code: string;
|
|
420
|
-
id: string;
|
|
421
420
|
customer_id: string;
|
|
421
|
+
id: string;
|
|
422
422
|
feature_id?: string | undefined;
|
|
423
423
|
event_name?: string | undefined;
|
|
424
424
|
}, AutumnError>>;
|
|
425
425
|
track(params: TrackParams): Promise<Result<{
|
|
426
426
|
code: string;
|
|
427
|
-
id: string;
|
|
428
427
|
customer_id: string;
|
|
428
|
+
id: string;
|
|
429
429
|
feature_id?: string | undefined;
|
|
430
430
|
event_name?: string | undefined;
|
|
431
431
|
}, AutumnError>>;
|
|
@@ -466,13 +466,13 @@ declare const TransferProductParamsSchema: z.ZodObject<{
|
|
|
466
466
|
to_entity_id: z.ZodString;
|
|
467
467
|
product_id: z.ZodString;
|
|
468
468
|
}, "strip", z.ZodTypeAny, {
|
|
469
|
+
product_id: string;
|
|
469
470
|
from_entity_id: string;
|
|
470
471
|
to_entity_id: string;
|
|
471
|
-
product_id: string;
|
|
472
472
|
}, {
|
|
473
|
+
product_id: string;
|
|
473
474
|
from_entity_id: string;
|
|
474
475
|
to_entity_id: string;
|
|
475
|
-
product_id: string;
|
|
476
476
|
}>;
|
|
477
477
|
type TransferProductParams = z.infer<typeof TransferProductParamsSchema>;
|
|
478
478
|
type TransferProductResult = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, P as ProductItem, c as Product, G as GetCustomerParams, d as Customer, e as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, f as BillingPortalResult, g as UpdateBalancesParams, h as UpdateBalancesResult, i as CreateProductParams, L as ListProductsParams, j as CustomerProduct, k as CustomerFeature, l as CustomerInvoice } from './cusTypes-
|
|
1
|
+
import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, P as ProductItem, c as Product, G as GetCustomerParams, d as Customer, e as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, f as BillingPortalResult, g as UpdateBalancesParams, h as UpdateBalancesResult, i as CreateProductParams, L as ListProductsParams, j as CustomerProduct, k as CustomerFeature, l as CustomerInvoice } from './cusTypes-DUjCLJ7f.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { R as Result, A as AutumnError } from './response-eH4S4sg0.js';
|
|
4
4
|
|
|
@@ -8,13 +8,13 @@ declare const CancelParamsSchema: z.ZodObject<{
|
|
|
8
8
|
entity_id: z.ZodOptional<z.ZodString>;
|
|
9
9
|
cancel_immediately: z.ZodOptional<z.ZodBoolean>;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
product_id: string;
|
|
12
11
|
customer_id: string;
|
|
12
|
+
product_id: string;
|
|
13
13
|
entity_id?: string | undefined;
|
|
14
14
|
cancel_immediately?: boolean | undefined;
|
|
15
15
|
}, {
|
|
16
|
-
product_id: string;
|
|
17
16
|
customer_id: string;
|
|
17
|
+
product_id: string;
|
|
18
18
|
entity_id?: string | undefined;
|
|
19
19
|
cancel_immediately?: boolean | undefined;
|
|
20
20
|
}>;
|
|
@@ -70,9 +70,9 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
70
70
|
}, "strip", z.ZodTypeAny, {
|
|
71
71
|
customer_id: string;
|
|
72
72
|
feature_id?: string | undefined;
|
|
73
|
-
product_id?: string | undefined;
|
|
74
73
|
entity_id?: string | undefined;
|
|
75
74
|
required_balance?: number | undefined;
|
|
75
|
+
product_id?: string | undefined;
|
|
76
76
|
customer_data?: any;
|
|
77
77
|
entity_data?: {
|
|
78
78
|
feature_id: string;
|
|
@@ -83,9 +83,9 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
83
83
|
}, {
|
|
84
84
|
customer_id: string;
|
|
85
85
|
feature_id?: string | undefined;
|
|
86
|
-
product_id?: string | undefined;
|
|
87
86
|
entity_id?: string | undefined;
|
|
88
87
|
required_balance?: number | undefined;
|
|
88
|
+
product_id?: string | undefined;
|
|
89
89
|
customer_data?: any;
|
|
90
90
|
entity_data?: {
|
|
91
91
|
feature_id: string;
|
|
@@ -121,12 +121,12 @@ declare const QueryParamsSchema: z.ZodObject<{
|
|
|
121
121
|
feature_id: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
122
122
|
range: z.ZodOptional<z.ZodEnum<["24h", "7d", "30d", "90d", "last_cycle"]>>;
|
|
123
123
|
}, "strip", z.ZodTypeAny, {
|
|
124
|
-
feature_id: string | string[];
|
|
125
124
|
customer_id: string;
|
|
125
|
+
feature_id: string | string[];
|
|
126
126
|
range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
|
|
127
127
|
}, {
|
|
128
|
-
feature_id: string | string[];
|
|
129
128
|
customer_id: string;
|
|
129
|
+
feature_id: string | string[];
|
|
130
130
|
range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
|
|
131
131
|
}>;
|
|
132
132
|
type QueryParams = z.infer<typeof QueryParamsSchema>;
|
|
@@ -190,9 +190,9 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
190
190
|
feature_id: string;
|
|
191
191
|
quantity: number;
|
|
192
192
|
}[] | undefined;
|
|
193
|
+
entity_id?: string | undefined;
|
|
193
194
|
metadata?: Record<string, string> | undefined;
|
|
194
195
|
product_id?: string | undefined;
|
|
195
|
-
entity_id?: string | undefined;
|
|
196
196
|
product_ids?: string[] | undefined;
|
|
197
197
|
free_trial?: boolean | undefined;
|
|
198
198
|
success_url?: string | undefined;
|
|
@@ -211,9 +211,9 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
211
211
|
feature_id: string;
|
|
212
212
|
quantity: number;
|
|
213
213
|
}[] | undefined;
|
|
214
|
+
entity_id?: string | undefined;
|
|
214
215
|
metadata?: Record<string, string> | undefined;
|
|
215
216
|
product_id?: string | undefined;
|
|
216
|
-
entity_id?: string | undefined;
|
|
217
217
|
product_ids?: string[] | undefined;
|
|
218
218
|
free_trial?: boolean | undefined;
|
|
219
219
|
success_url?: string | undefined;
|
|
@@ -260,8 +260,8 @@ declare const CheckoutParamsSchema: z.ZodObject<{
|
|
|
260
260
|
checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
261
261
|
reward: z.ZodOptional<z.ZodString>;
|
|
262
262
|
}, "strip", z.ZodTypeAny, {
|
|
263
|
-
product_id: string;
|
|
264
263
|
customer_id: string;
|
|
264
|
+
product_id: string;
|
|
265
265
|
options?: {
|
|
266
266
|
feature_id: string;
|
|
267
267
|
quantity: number;
|
|
@@ -277,8 +277,8 @@ declare const CheckoutParamsSchema: z.ZodObject<{
|
|
|
277
277
|
checkout_session_params?: Record<string, any> | undefined;
|
|
278
278
|
reward?: string | undefined;
|
|
279
279
|
}, {
|
|
280
|
-
product_id: string;
|
|
281
280
|
customer_id: string;
|
|
281
|
+
product_id: string;
|
|
282
282
|
options?: {
|
|
283
283
|
feature_id: string;
|
|
284
284
|
quantity: number;
|
|
@@ -404,28 +404,28 @@ declare class Autumn {
|
|
|
404
404
|
static setupPayment: (params: SetupPaymentParams) => Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
405
405
|
setupPayment(params: SetupPaymentParams): Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
406
406
|
static cancel: (params: CancelParams) => Promise<Result<{
|
|
407
|
-
product_id: string;
|
|
408
407
|
customer_id: string;
|
|
408
|
+
product_id: string;
|
|
409
409
|
success: boolean;
|
|
410
410
|
}, AutumnError>>;
|
|
411
411
|
cancel(params: CancelParams): Promise<Result<{
|
|
412
|
-
product_id: string;
|
|
413
412
|
customer_id: string;
|
|
413
|
+
product_id: string;
|
|
414
414
|
success: boolean;
|
|
415
415
|
}, AutumnError>>;
|
|
416
416
|
static check: (params: CheckParams) => Promise<Result<CheckResult, AutumnError>>;
|
|
417
417
|
check(params: CheckParams): Promise<Result<CheckResult, AutumnError>>;
|
|
418
418
|
static track: (params: TrackParams) => Promise<Result<{
|
|
419
419
|
code: string;
|
|
420
|
-
id: string;
|
|
421
420
|
customer_id: string;
|
|
421
|
+
id: string;
|
|
422
422
|
feature_id?: string | undefined;
|
|
423
423
|
event_name?: string | undefined;
|
|
424
424
|
}, AutumnError>>;
|
|
425
425
|
track(params: TrackParams): Promise<Result<{
|
|
426
426
|
code: string;
|
|
427
|
-
id: string;
|
|
428
427
|
customer_id: string;
|
|
428
|
+
id: string;
|
|
429
429
|
feature_id?: string | undefined;
|
|
430
430
|
event_name?: string | undefined;
|
|
431
431
|
}, AutumnError>>;
|
|
@@ -466,13 +466,13 @@ declare const TransferProductParamsSchema: z.ZodObject<{
|
|
|
466
466
|
to_entity_id: z.ZodString;
|
|
467
467
|
product_id: z.ZodString;
|
|
468
468
|
}, "strip", z.ZodTypeAny, {
|
|
469
|
+
product_id: string;
|
|
469
470
|
from_entity_id: string;
|
|
470
471
|
to_entity_id: string;
|
|
471
|
-
product_id: string;
|
|
472
472
|
}, {
|
|
473
|
+
product_id: string;
|
|
473
474
|
from_entity_id: string;
|
|
474
475
|
to_entity_id: string;
|
|
475
|
-
product_id: string;
|
|
476
476
|
}>;
|
|
477
477
|
type TransferProductParams = z.infer<typeof TransferProductParamsSchema>;
|
|
478
478
|
type TransferProductResult = {
|
package/package.json
CHANGED
|
@@ -678,10 +678,7 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
678
678
|
metadata?: Record<string, string> | undefined;
|
|
679
679
|
product_id?: string | undefined;
|
|
680
680
|
entity_id?: string | undefined;
|
|
681
|
-
product_ids?: string[] | undefined;
|
|
682
|
-
free_trial?: boolean | undefined;
|
|
683
681
|
success_url?: string | undefined;
|
|
684
|
-
force_checkout?: boolean | undefined;
|
|
685
682
|
customer_data?: {
|
|
686
683
|
name?: string | null | undefined;
|
|
687
684
|
email?: string | null | undefined;
|
|
@@ -690,6 +687,9 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
690
687
|
entity_data?: any;
|
|
691
688
|
checkout_session_params?: Record<string, any> | undefined;
|
|
692
689
|
reward?: string | undefined;
|
|
690
|
+
product_ids?: string[] | undefined;
|
|
691
|
+
free_trial?: boolean | undefined;
|
|
692
|
+
force_checkout?: boolean | undefined;
|
|
693
693
|
}, {
|
|
694
694
|
customer_id: string;
|
|
695
695
|
options?: {
|
|
@@ -699,10 +699,7 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
699
699
|
metadata?: Record<string, string> | undefined;
|
|
700
700
|
product_id?: string | undefined;
|
|
701
701
|
entity_id?: string | undefined;
|
|
702
|
-
product_ids?: string[] | undefined;
|
|
703
|
-
free_trial?: boolean | undefined;
|
|
704
702
|
success_url?: string | undefined;
|
|
705
|
-
force_checkout?: boolean | undefined;
|
|
706
703
|
customer_data?: {
|
|
707
704
|
name?: string | null | undefined;
|
|
708
705
|
email?: string | null | undefined;
|
|
@@ -711,6 +708,9 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
711
708
|
entity_data?: any;
|
|
712
709
|
checkout_session_params?: Record<string, any> | undefined;
|
|
713
710
|
reward?: string | undefined;
|
|
711
|
+
product_ids?: string[] | undefined;
|
|
712
|
+
free_trial?: boolean | undefined;
|
|
713
|
+
force_checkout?: boolean | undefined;
|
|
714
714
|
}>;
|
|
715
715
|
type AttachParams = z.infer<typeof AttachParamsSchema>;
|
|
716
716
|
declare const CheckoutParamsSchema: z.ZodObject<{
|
package/dist/libraries/backend/{referralTypes-Bxe9iJlv.d.mts → referralTypes-DA9Hp6Bm.d.mts}
RENAMED
|
@@ -678,10 +678,7 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
678
678
|
metadata?: Record<string, string> | undefined;
|
|
679
679
|
product_id?: string | undefined;
|
|
680
680
|
entity_id?: string | undefined;
|
|
681
|
-
product_ids?: string[] | undefined;
|
|
682
|
-
free_trial?: boolean | undefined;
|
|
683
681
|
success_url?: string | undefined;
|
|
684
|
-
force_checkout?: boolean | undefined;
|
|
685
682
|
customer_data?: {
|
|
686
683
|
name?: string | null | undefined;
|
|
687
684
|
email?: string | null | undefined;
|
|
@@ -690,6 +687,9 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
690
687
|
entity_data?: any;
|
|
691
688
|
checkout_session_params?: Record<string, any> | undefined;
|
|
692
689
|
reward?: string | undefined;
|
|
690
|
+
product_ids?: string[] | undefined;
|
|
691
|
+
free_trial?: boolean | undefined;
|
|
692
|
+
force_checkout?: boolean | undefined;
|
|
693
693
|
}, {
|
|
694
694
|
customer_id: string;
|
|
695
695
|
options?: {
|
|
@@ -699,10 +699,7 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
699
699
|
metadata?: Record<string, string> | undefined;
|
|
700
700
|
product_id?: string | undefined;
|
|
701
701
|
entity_id?: string | undefined;
|
|
702
|
-
product_ids?: string[] | undefined;
|
|
703
|
-
free_trial?: boolean | undefined;
|
|
704
702
|
success_url?: string | undefined;
|
|
705
|
-
force_checkout?: boolean | undefined;
|
|
706
703
|
customer_data?: {
|
|
707
704
|
name?: string | null | undefined;
|
|
708
705
|
email?: string | null | undefined;
|
|
@@ -711,6 +708,9 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
711
708
|
entity_data?: any;
|
|
712
709
|
checkout_session_params?: Record<string, any> | undefined;
|
|
713
710
|
reward?: string | undefined;
|
|
711
|
+
product_ids?: string[] | undefined;
|
|
712
|
+
free_trial?: boolean | undefined;
|
|
713
|
+
force_checkout?: boolean | undefined;
|
|
714
714
|
}>;
|
|
715
715
|
type AttachParams = z.infer<typeof AttachParamsSchema>;
|
|
716
716
|
declare const CheckoutParamsSchema: z.ZodObject<{
|
|
@@ -4,6 +4,16 @@ import {
|
|
|
4
4
|
createSlot
|
|
5
5
|
} from "./chunk-RPEGNKJH.mjs";
|
|
6
6
|
|
|
7
|
+
// ../node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
8
|
+
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
9
|
+
return function handleEvent(event) {
|
|
10
|
+
originalEventHandler?.(event);
|
|
11
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
12
|
+
return ourEventHandler?.(event);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
7
17
|
// ../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.8_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
8
18
|
import * as React from "react";
|
|
9
19
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -81,16 +91,6 @@ function composeContextScopes(...scopes) {
|
|
|
81
91
|
return createScope;
|
|
82
92
|
}
|
|
83
93
|
|
|
84
|
-
// ../node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
85
|
-
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
86
|
-
return function handleEvent(event) {
|
|
87
|
-
originalEventHandler?.(event);
|
|
88
|
-
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
89
|
-
return ourEventHandler?.(event);
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
|
|
94
94
|
// ../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.8_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
95
95
|
import * as React3 from "react";
|
|
96
96
|
|
|
@@ -208,9 +208,9 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
export {
|
|
211
|
+
composeEventHandlers,
|
|
211
212
|
createContext2,
|
|
212
213
|
createContextScope,
|
|
213
|
-
composeEventHandlers,
|
|
214
214
|
useLayoutEffect2,
|
|
215
215
|
useControllableState,
|
|
216
216
|
Primitive,
|
|
@@ -20,16 +20,16 @@ declare const AttachResultSchema: z.ZodObject<{
|
|
|
20
20
|
message: z.ZodString;
|
|
21
21
|
customer_data: z.ZodOptional<z.ZodAny>;
|
|
22
22
|
}, "strip", z.ZodTypeAny, {
|
|
23
|
-
customer_id: string;
|
|
24
23
|
code: string;
|
|
25
24
|
message: string;
|
|
25
|
+
customer_id: string;
|
|
26
26
|
product_ids: string[];
|
|
27
27
|
checkout_url?: string | undefined;
|
|
28
28
|
customer_data?: any;
|
|
29
29
|
}, {
|
|
30
|
-
customer_id: string;
|
|
31
30
|
code: string;
|
|
32
31
|
message: string;
|
|
32
|
+
customer_id: string;
|
|
33
33
|
product_ids: string[];
|
|
34
34
|
checkout_url?: string | undefined;
|
|
35
35
|
customer_data?: any;
|
|
@@ -20,16 +20,16 @@ declare const AttachResultSchema: z.ZodObject<{
|
|
|
20
20
|
message: z.ZodString;
|
|
21
21
|
customer_data: z.ZodOptional<z.ZodAny>;
|
|
22
22
|
}, "strip", z.ZodTypeAny, {
|
|
23
|
-
customer_id: string;
|
|
24
23
|
code: string;
|
|
25
24
|
message: string;
|
|
25
|
+
customer_id: string;
|
|
26
26
|
product_ids: string[];
|
|
27
27
|
checkout_url?: string | undefined;
|
|
28
28
|
customer_data?: any;
|
|
29
29
|
}, {
|
|
30
|
-
customer_id: string;
|
|
31
30
|
code: string;
|
|
32
31
|
message: string;
|
|
32
|
+
customer_id: string;
|
|
33
33
|
product_ids: string[];
|
|
34
34
|
checkout_url?: string | undefined;
|
|
35
35
|
customer_data?: any;
|
package/dist/next/client/{clientAttachTypes-CBBghfgO.d.mts → clientAttachTypes-B-zWythK.d.mts}
RENAMED
|
@@ -23,15 +23,15 @@ declare const TrackResultSchema: z.ZodObject<{
|
|
|
23
23
|
feature_id: z.ZodOptional<z.ZodString>;
|
|
24
24
|
event_name: z.ZodOptional<z.ZodString>;
|
|
25
25
|
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
code: string;
|
|
26
27
|
id: string;
|
|
27
28
|
customer_id: string;
|
|
28
|
-
code: string;
|
|
29
29
|
feature_id?: string | undefined;
|
|
30
30
|
event_name?: string | undefined;
|
|
31
31
|
}, {
|
|
32
|
+
code: string;
|
|
32
33
|
id: string;
|
|
33
34
|
customer_id: string;
|
|
34
|
-
code: string;
|
|
35
35
|
feature_id?: string | undefined;
|
|
36
36
|
event_name?: string | undefined;
|
|
37
37
|
}>;
|
package/dist/next/client/{clientAttachTypes-D6mgEcpb.d.ts → clientAttachTypes-DLh_8bIG.d.ts}
RENAMED
|
@@ -23,15 +23,15 @@ declare const TrackResultSchema: z.ZodObject<{
|
|
|
23
23
|
feature_id: z.ZodOptional<z.ZodString>;
|
|
24
24
|
event_name: z.ZodOptional<z.ZodString>;
|
|
25
25
|
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
code: string;
|
|
26
27
|
id: string;
|
|
27
28
|
customer_id: string;
|
|
28
|
-
code: string;
|
|
29
29
|
feature_id?: string | undefined;
|
|
30
30
|
event_name?: string | undefined;
|
|
31
31
|
}, {
|
|
32
|
+
code: string;
|
|
32
33
|
id: string;
|
|
33
34
|
customer_id: string;
|
|
34
|
-
code: string;
|
|
35
35
|
feature_id?: string | undefined;
|
|
36
36
|
event_name?: string | undefined;
|
|
37
37
|
}>;
|
|
@@ -165,17 +165,17 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
165
165
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
166
166
|
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
|
|
167
167
|
}, "strip", z.ZodTypeAny, {
|
|
168
|
-
id?: string | null | undefined;
|
|
169
168
|
name?: string | null | undefined;
|
|
170
169
|
email?: string | null | undefined;
|
|
171
170
|
fingerprint?: string | null | undefined;
|
|
171
|
+
id?: string | null | undefined;
|
|
172
172
|
metadata?: Record<string, any> | undefined;
|
|
173
173
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
174
174
|
}, {
|
|
175
|
-
id?: string | null | undefined;
|
|
176
175
|
name?: string | null | undefined;
|
|
177
176
|
email?: string | null | undefined;
|
|
178
177
|
fingerprint?: string | null | undefined;
|
|
178
|
+
id?: string | null | undefined;
|
|
179
179
|
metadata?: Record<string, any> | undefined;
|
|
180
180
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
181
181
|
}>;
|
|
@@ -165,17 +165,17 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
165
165
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
166
166
|
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
|
|
167
167
|
}, "strip", z.ZodTypeAny, {
|
|
168
|
-
id?: string | null | undefined;
|
|
169
168
|
name?: string | null | undefined;
|
|
170
169
|
email?: string | null | undefined;
|
|
171
170
|
fingerprint?: string | null | undefined;
|
|
171
|
+
id?: string | null | undefined;
|
|
172
172
|
metadata?: Record<string, any> | undefined;
|
|
173
173
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
174
174
|
}, {
|
|
175
|
-
id?: string | null | undefined;
|
|
176
175
|
name?: string | null | undefined;
|
|
177
176
|
email?: string | null | undefined;
|
|
178
177
|
fingerprint?: string | null | undefined;
|
|
178
|
+
id?: string | null | undefined;
|
|
179
179
|
metadata?: Record<string, any> | undefined;
|
|
180
180
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
181
181
|
}>;
|