autumn-js 0.1.7 → 0.1.9
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 +37 -33
- package/dist/libraries/backend/better-auth.d.ts +37 -33
- package/dist/libraries/backend/better-auth.js +10 -2
- package/dist/libraries/backend/better-auth.mjs +7 -7
- package/dist/libraries/backend/{chunk-33ET4N4V.mjs → chunk-274BIVOC.mjs} +1 -1
- package/dist/libraries/backend/{chunk-3OVRYTZX.mjs → chunk-7WWKVE4J.mjs} +6 -6
- package/dist/libraries/backend/{chunk-GO7TVFSN.mjs → chunk-EJBD5GH7.mjs} +1 -1
- package/dist/libraries/backend/{chunk-TFYLV3GN.mjs → chunk-I43OU64D.mjs} +1 -1
- package/dist/libraries/backend/{chunk-VBHBF3GP.mjs → chunk-JN4ULI5R.mjs} +1 -1
- package/dist/libraries/backend/{chunk-AREWK25J.mjs → chunk-KY3RLTE7.mjs} +10 -2
- package/dist/libraries/backend/{chunk-LL53FE2Z.mjs → chunk-YN334O74.mjs} +1 -1
- package/dist/libraries/backend/convex.js +10 -2
- package/dist/libraries/backend/convex.mjs +7 -7
- package/dist/libraries/backend/elysia.js +10 -2
- 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.js +10 -2
- package/dist/libraries/backend/express.mjs +7 -7
- package/dist/libraries/backend/fastify.js +10 -2
- package/dist/libraries/backend/fastify.mjs +7 -7
- package/dist/libraries/backend/hono.js +10 -2
- 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.js +10 -2
- package/dist/libraries/backend/index.mjs +7 -7
- package/dist/libraries/backend/next.js +10 -2
- package/dist/libraries/backend/next.mjs +7 -7
- package/dist/libraries/backend/react-router.js +10 -2
- package/dist/libraries/backend/react-router.mjs +7 -7
- package/dist/libraries/backend/{referralTypes-B50JL4PY.d.mts → referralTypes-BEcapeWf.d.mts} +60 -43
- package/dist/libraries/backend/{referralTypes-dW2HaxKV.d.ts → referralTypes-DuAlUwev.d.ts} +60 -43
- package/dist/libraries/backend/remix_dep.js +10 -2
- package/dist/libraries/backend/remix_dep.mjs +7 -7
- package/dist/libraries/backend/routes/backendRouter.js +10 -2
- package/dist/libraries/backend/routes/backendRouter.mjs +7 -7
- package/dist/libraries/backend/routes/entityRoutes.js +10 -2
- package/dist/libraries/backend/routes/entityRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/genRoutes.js +10 -2
- package/dist/libraries/backend/routes/genRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/productRoutes.js +10 -2
- package/dist/libraries/backend/routes/productRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/referralRoutes.js +10 -2
- package/dist/libraries/backend/routes/referralRoutes.mjs +3 -3
- package/dist/libraries/backend/supabase.js +10 -2
- package/dist/libraries/backend/supabase.mjs +7 -7
- package/dist/libraries/backend/tanstack.js +10 -2
- package/dist/libraries/backend/tanstack.mjs +7 -7
- package/dist/libraries/backend/utils/backendRes.js +10 -2
- 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.js +10 -2
- package/dist/libraries/backend/utils/withAuth.mjs +2 -2
- package/dist/libraries/react/AutumnContext.d.mts +4 -4
- package/dist/libraries/react/AutumnContext.d.ts +4 -4
- package/dist/libraries/react/AutumnContext.js +10 -2
- package/dist/libraries/react/AutumnContext.mjs +5 -5
- package/dist/libraries/react/BaseAutumnProvider.d.mts +4 -4
- package/dist/libraries/react/BaseAutumnProvider.d.ts +4 -4
- package/dist/libraries/react/BaseAutumnProvider.js +15 -3
- package/dist/libraries/react/BaseAutumnProvider.mjs +10 -10
- package/dist/libraries/react/{ReactAutumnClient-BUq9E84_.d.ts → ReactAutumnClient-DCMQEadM.d.ts} +10 -3
- package/dist/libraries/react/{ReactAutumnClient-CpAGyyur.d.mts → ReactAutumnClient-Dm14G99_.d.mts} +10 -3
- package/dist/libraries/react/ReactAutumnProvider.d.mts +1 -1
- package/dist/libraries/react/ReactAutumnProvider.d.ts +1 -1
- package/dist/libraries/react/ReactAutumnProvider.js +15 -3
- package/dist/libraries/react/ReactAutumnProvider.mjs +11 -11
- package/dist/libraries/react/{attachTypes-CcB6xjSF.d.ts → attachTypes-QTf_JXj7.d.ts} +33 -0
- package/dist/libraries/react/{attachTypes-DqUN3q8s.d.mts → attachTypes-Sv_paJZ2.d.mts} +33 -0
- package/dist/libraries/react/{chunk-HMZZIUCF.mjs → chunk-3YIV3N5Y.mjs} +1 -1
- package/dist/libraries/react/{chunk-KYZ3DYMI.mjs → chunk-4UPD6W4L.mjs} +16 -15
- package/dist/libraries/react/{chunk-56PEGK2Z.mjs → chunk-7LOW3KZ3.mjs} +2 -2
- package/dist/libraries/react/{chunk-QQKJE2ND.mjs → chunk-CPN2LD2I.mjs} +2 -2
- package/dist/libraries/react/{chunk-ECOBNPRU.mjs → chunk-DRUVAAUW.mjs} +3 -3
- package/dist/libraries/react/{chunk-JFTZRU2U.mjs → chunk-E2BEY4ZP.mjs} +1 -1
- package/dist/libraries/react/{chunk-SFGXTDMX.mjs → chunk-IRTAGYDD.mjs} +2 -2
- package/dist/libraries/react/{chunk-WQXUZO6K.mjs → chunk-JIWMNR2E.mjs} +10 -2
- package/dist/libraries/react/{chunk-FMRBH4CP.mjs → chunk-JJVQIA5V.mjs} +1 -1
- package/dist/libraries/react/{chunk-HIC6P67K.mjs → chunk-KG2NPWAE.mjs} +7 -7
- package/dist/libraries/react/{chunk-JNR7QAPG.mjs → chunk-MKP43WD6.mjs} +1 -1
- package/dist/libraries/react/{chunk-SZJOMZTC.mjs → chunk-QZPMYB2V.mjs} +2 -2
- package/dist/libraries/react/{chunk-GWVZB5GK.mjs → chunk-TBRYCVBL.mjs} +3 -3
- package/dist/libraries/react/{chunk-ULIUD6YP.mjs → chunk-UQ5HI732.mjs} +3 -3
- package/dist/libraries/react/{chunk-ZJBEC254.mjs → chunk-URFTKUL2.mjs} +6 -2
- package/dist/libraries/react/{chunk-MW2FSYG3.mjs → chunk-XTONWQ65.mjs} +1 -1
- package/dist/libraries/react/client/ReactAutumnClient.d.mts +4 -4
- package/dist/libraries/react/client/ReactAutumnClient.d.ts +4 -4
- package/dist/libraries/react/client/ReactAutumnClient.js +10 -2
- package/dist/libraries/react/client/ReactAutumnClient.mjs +4 -4
- package/dist/libraries/react/client/clientCompMethods.d.mts +4 -4
- package/dist/libraries/react/client/clientCompMethods.d.ts +4 -4
- package/dist/libraries/react/client/clientCusMethods.d.mts +4 -4
- package/dist/libraries/react/client/clientCusMethods.d.ts +4 -4
- package/dist/libraries/react/client/clientEntityMethods.d.mts +4 -4
- package/dist/libraries/react/client/clientEntityMethods.d.ts +4 -4
- package/dist/libraries/react/client/clientGenMethods.d.mts +4 -4
- package/dist/libraries/react/client/clientGenMethods.d.ts +4 -4
- package/dist/libraries/react/client/clientProdMethods.d.mts +4 -4
- package/dist/libraries/react/client/clientProdMethods.d.ts +4 -4
- package/dist/libraries/react/client/clientReferralMethods.d.mts +4 -4
- package/dist/libraries/react/client/clientReferralMethods.d.ts +4 -4
- package/dist/libraries/react/client/types/clientGenTypes.js +10 -2
- package/dist/libraries/react/client/types/clientGenTypes.mjs +1 -1
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.d.mts +1 -1
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.d.ts +1 -1
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.js +18 -5
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.mjs +21 -21
- package/dist/libraries/react/components/checkout-dialog/lib/checkout-content.d.mts +1 -1
- package/dist/libraries/react/components/checkout-dialog/lib/checkout-content.d.ts +1 -1
- package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.js +10 -2
- package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.mjs +21 -21
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +18 -5
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +21 -21
- 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/{entTypes-CoF9enrR.d.ts → entTypes-0CBBecul.d.ts} +1 -1
- package/dist/libraries/react/{entTypes-S4hkh1RG.d.mts → entTypes-kVUQcah5.d.mts} +1 -1
- package/dist/libraries/react/hooks/helpers/handleCheck.d.mts +4 -4
- package/dist/libraries/react/hooks/helpers/handleCheck.d.ts +4 -4
- package/dist/libraries/react/hooks/helpers/handleCheck.js +10 -2
- package/dist/libraries/react/hooks/helpers/handleCheck.mjs +2 -2
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.mts +11 -4
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.ts +11 -4
- package/dist/libraries/react/hooks/helpers/useAutumnBase.js +15 -3
- package/dist/libraries/react/hooks/helpers/useAutumnBase.mjs +3 -3
- package/dist/libraries/react/hooks/useAnalytics.js +10 -2
- package/dist/libraries/react/hooks/useAnalytics.mjs +6 -6
- package/dist/libraries/react/hooks/useCustomer.d.mts +4 -4
- package/dist/libraries/react/hooks/useCustomer.d.ts +4 -4
- package/dist/libraries/react/hooks/useCustomer.js +15 -3
- package/dist/libraries/react/hooks/useCustomer.mjs +10 -10
- package/dist/libraries/react/hooks/useCustomerBase.d.mts +4 -4
- package/dist/libraries/react/hooks/useCustomerBase.d.ts +4 -4
- package/dist/libraries/react/hooks/useCustomerBase.js +15 -3
- package/dist/libraries/react/hooks/useCustomerBase.mjs +9 -9
- package/dist/libraries/react/hooks/useEntity.d.mts +9 -2
- package/dist/libraries/react/hooks/useEntity.d.ts +9 -2
- package/dist/libraries/react/hooks/useEntity.js +15 -3
- package/dist/libraries/react/hooks/useEntity.mjs +10 -10
- package/dist/libraries/react/hooks/useEntityBase.d.mts +11 -4
- package/dist/libraries/react/hooks/useEntityBase.d.ts +11 -4
- package/dist/libraries/react/hooks/useEntityBase.js +15 -3
- package/dist/libraries/react/hooks/useEntityBase.mjs +9 -9
- package/dist/libraries/react/hooks/usePaywall.js +10 -2
- package/dist/libraries/react/hooks/usePaywall.mjs +6 -6
- package/dist/libraries/react/hooks/usePricingTable.js +10 -2
- package/dist/libraries/react/hooks/usePricingTable.mjs +7 -7
- package/dist/libraries/react/hooks/usePricingTableBase.d.mts +4 -4
- package/dist/libraries/react/hooks/usePricingTableBase.d.ts +4 -4
- package/dist/libraries/react/hooks/usePricingTableBase.js +10 -2
- package/dist/libraries/react/hooks/usePricingTableBase.mjs +2 -2
- package/dist/libraries/react/hooks/useProductsBase.d.mts +4 -4
- package/dist/libraries/react/hooks/useProductsBase.d.ts +4 -4
- package/dist/libraries/react/index.d.mts +40 -0
- package/dist/libraries/react/index.d.ts +40 -0
- package/dist/libraries/react/index.js +18 -5
- package/dist/libraries/react/index.mjs +18 -5
- package/dist/next/client/NextAutumnClient.d.mts +25 -18
- package/dist/next/client/NextAutumnClient.d.ts +25 -18
- package/dist/next/client/NextAutumnProvider.d.mts +2 -2
- package/dist/next/client/NextAutumnProvider.d.ts +2 -2
- package/dist/next/client/{attachTypes-EvdK0fPK.d.mts → attachTypes-CReq8zJ_.d.ts} +38 -5
- package/dist/next/client/{attachTypes-DKlQexnQ.d.ts → attachTypes-DUUIHTBt.d.mts} +38 -5
- package/dist/next/client/{clientAttachTypes-CZFjz8Rq.d.mts → clientAttachTypes-BzsPgggN.d.mts} +27 -27
- package/dist/next/client/{clientAttachTypes-CGPjsdPk.d.ts → clientAttachTypes-umadXlvp.d.ts} +27 -27
- package/dist/next/client/clientUtils.d.mts +3 -3
- package/dist/next/client/clientUtils.d.ts +3 -3
- package/dist/next/client/{cusTypes-y5wEmx07.d.mts → cusTypes-CIGvysWL.d.mts} +5 -5
- package/dist/next/client/{cusTypes-DEURYNg4.d.ts → cusTypes-CYojUJSJ.d.ts} +5 -5
- package/dist/next/client/{entTypes-CRFgWhOr.d.ts → entTypes-BAD1NMvb.d.ts} +1 -1
- package/dist/next/client/{entTypes-KRxjcMFv.d.mts → entTypes-mOI7WnPZ.d.mts} +1 -1
- package/dist/next/client/hooks/useAutumn.d.mts +12 -5
- package/dist/next/client/hooks/useAutumn.d.ts +12 -5
- package/dist/next/client/hooks/useCustomer.d.mts +5 -5
- package/dist/next/client/hooks/useCustomer.d.ts +5 -5
- package/dist/next/client/hooks/useEntity.d.mts +14 -7
- package/dist/next/client/hooks/useEntity.d.ts +14 -7
- package/dist/next/client/hooks/usePricingTable.d.mts +1 -1
- package/dist/next/client/hooks/usePricingTable.d.ts +1 -1
- package/dist/next/client/types.d.mts +3 -3
- package/dist/next/client/types.d.ts +3 -3
- package/dist/next/server/cusActions.d.mts +17 -0
- package/dist/next/server/cusActions.d.ts +17 -0
- package/dist/sdk/index.d.mts +50 -0
- package/dist/sdk/index.d.ts +50 -0
- package/dist/sdk/index.js +10 -2
- package/dist/sdk/index.mjs +10 -2
- package/dist/utils/encryptUtils.js +10 -2
- package/dist/utils/encryptUtils.mjs +10 -2
- package/package.json +1 -1
- package/dist/libraries/react/{cusTypes-DHjT-9rV.d.ts → cusTypes-BeSXIQ6P.d.ts} +2 -2
- package/dist/libraries/react/{cusTypes-CSmAk5io.d.mts → cusTypes-DbCQV8Sj.d.mts} +2 -2
- package/dist/next/client/{prodTypes-DzTLP57C.d.mts → prodTypes-CxvB1YY3.d.mts} +8 -8
- package/dist/next/client/{prodTypes-DzTLP57C.d.ts → prodTypes-CxvB1YY3.d.ts} +8 -8
package/dist/libraries/backend/{referralTypes-B50JL4PY.d.mts → referralTypes-BEcapeWf.d.mts}
RENAMED
|
@@ -78,12 +78,12 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
78
78
|
credit_amount: number;
|
|
79
79
|
}>, "many">>;
|
|
80
80
|
}, "strip", z.ZodTypeAny, {
|
|
81
|
-
|
|
81
|
+
allowed: boolean;
|
|
82
82
|
feature_id: string;
|
|
83
|
+
customer_id: string;
|
|
83
84
|
required_balance: number;
|
|
84
|
-
allowed: boolean;
|
|
85
|
-
entity_id?: string | undefined;
|
|
86
85
|
usage_limit?: number | undefined;
|
|
86
|
+
entity_id?: string | undefined;
|
|
87
87
|
unlimited?: boolean | undefined;
|
|
88
88
|
interval?: ProductItemInterval | undefined;
|
|
89
89
|
balance?: number | null | undefined;
|
|
@@ -107,12 +107,12 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
107
107
|
credit_amount: number;
|
|
108
108
|
}[] | undefined;
|
|
109
109
|
}, {
|
|
110
|
-
|
|
110
|
+
allowed: boolean;
|
|
111
111
|
feature_id: string;
|
|
112
|
+
customer_id: string;
|
|
112
113
|
required_balance: number;
|
|
113
|
-
allowed: boolean;
|
|
114
|
-
entity_id?: string | undefined;
|
|
115
114
|
usage_limit?: number | undefined;
|
|
115
|
+
entity_id?: string | undefined;
|
|
116
116
|
unlimited?: boolean | undefined;
|
|
117
117
|
interval?: ProductItemInterval | undefined;
|
|
118
118
|
balance?: number | null | undefined;
|
|
@@ -421,19 +421,19 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
421
421
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
422
422
|
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
|
|
423
423
|
}, "strip", z.ZodTypeAny, {
|
|
424
|
-
|
|
425
|
-
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
424
|
+
id?: string | null | undefined;
|
|
426
425
|
name?: string | null | undefined;
|
|
427
426
|
email?: string | null | undefined;
|
|
428
427
|
fingerprint?: string | null | undefined;
|
|
429
|
-
id?: string | null | undefined;
|
|
430
|
-
}, {
|
|
431
428
|
metadata?: Record<string, any> | undefined;
|
|
432
429
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
430
|
+
}, {
|
|
431
|
+
id?: string | null | undefined;
|
|
433
432
|
name?: string | null | undefined;
|
|
434
433
|
email?: string | null | undefined;
|
|
435
434
|
fingerprint?: string | null | undefined;
|
|
436
|
-
|
|
435
|
+
metadata?: Record<string, any> | undefined;
|
|
436
|
+
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
437
437
|
}>;
|
|
438
438
|
type CreateCustomerParams = z.infer<typeof CreateCustomerParamsSchema>;
|
|
439
439
|
interface UpdateCustomerParams {
|
|
@@ -515,18 +515,18 @@ declare const TrackParamsSchema: z.ZodObject<{
|
|
|
515
515
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
516
516
|
}, "strip", z.ZodTypeAny, {
|
|
517
517
|
customer_id: string;
|
|
518
|
-
value?: number | undefined;
|
|
519
|
-
entity_id?: string | undefined;
|
|
520
518
|
feature_id?: string | undefined;
|
|
519
|
+
entity_id?: string | undefined;
|
|
520
|
+
value?: number | undefined;
|
|
521
521
|
customer_data?: any;
|
|
522
522
|
entity_data?: any;
|
|
523
523
|
event_name?: string | undefined;
|
|
524
524
|
idempotency_key?: string | undefined;
|
|
525
525
|
}, {
|
|
526
526
|
customer_id: string;
|
|
527
|
-
value?: number | undefined;
|
|
528
|
-
entity_id?: string | undefined;
|
|
529
527
|
feature_id?: string | undefined;
|
|
528
|
+
entity_id?: string | undefined;
|
|
529
|
+
value?: number | undefined;
|
|
530
530
|
customer_data?: any;
|
|
531
531
|
entity_data?: any;
|
|
532
532
|
event_name?: string | undefined;
|
|
@@ -554,28 +554,28 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
554
554
|
}>>;
|
|
555
555
|
}, "strip", z.ZodTypeAny, {
|
|
556
556
|
customer_id: string;
|
|
557
|
-
product_id?: string | undefined;
|
|
558
|
-
entity_id?: string | undefined;
|
|
559
557
|
feature_id?: string | undefined;
|
|
558
|
+
entity_id?: string | undefined;
|
|
559
|
+
required_balance?: number | undefined;
|
|
560
|
+
product_id?: string | undefined;
|
|
560
561
|
customer_data?: any;
|
|
561
562
|
entity_data?: {
|
|
562
563
|
feature_id: string;
|
|
563
564
|
name?: string | undefined;
|
|
564
565
|
} | undefined;
|
|
565
|
-
required_balance?: number | undefined;
|
|
566
566
|
send_event?: boolean | undefined;
|
|
567
567
|
with_preview?: boolean | undefined;
|
|
568
568
|
}, {
|
|
569
569
|
customer_id: string;
|
|
570
|
-
product_id?: string | undefined;
|
|
571
|
-
entity_id?: string | undefined;
|
|
572
570
|
feature_id?: string | undefined;
|
|
571
|
+
entity_id?: string | undefined;
|
|
572
|
+
required_balance?: number | undefined;
|
|
573
|
+
product_id?: string | undefined;
|
|
573
574
|
customer_data?: any;
|
|
574
575
|
entity_data?: {
|
|
575
576
|
feature_id: string;
|
|
576
577
|
name?: string | undefined;
|
|
577
578
|
} | undefined;
|
|
578
|
-
required_balance?: number | undefined;
|
|
579
579
|
send_event?: boolean | undefined;
|
|
580
580
|
with_preview?: boolean | undefined;
|
|
581
581
|
}>;
|
|
@@ -606,12 +606,12 @@ declare const QueryParamsSchema: z.ZodObject<{
|
|
|
606
606
|
feature_id: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
607
607
|
range: z.ZodOptional<z.ZodEnum<["24h", "7d", "30d", "90d", "last_cycle"]>>;
|
|
608
608
|
}, "strip", z.ZodTypeAny, {
|
|
609
|
-
customer_id: string;
|
|
610
609
|
feature_id: string | string[];
|
|
610
|
+
customer_id: string;
|
|
611
611
|
range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
|
|
612
612
|
}, {
|
|
613
|
-
customer_id: string;
|
|
614
613
|
feature_id: string | string[];
|
|
614
|
+
customer_id: string;
|
|
615
615
|
range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
|
|
616
616
|
}>;
|
|
617
617
|
type QueryParams = z.infer<typeof QueryParamsSchema>;
|
|
@@ -669,16 +669,20 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
669
669
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
670
670
|
checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
671
671
|
reward: z.ZodOptional<z.ZodString>;
|
|
672
|
+
invoice: z.ZodOptional<z.ZodBoolean>;
|
|
672
673
|
}, "strip", z.ZodTypeAny, {
|
|
673
674
|
customer_id: string;
|
|
675
|
+
entity_id?: string | undefined;
|
|
674
676
|
options?: {
|
|
675
677
|
feature_id: string;
|
|
676
678
|
quantity: number;
|
|
677
679
|
}[] | undefined;
|
|
678
680
|
metadata?: Record<string, string> | undefined;
|
|
679
681
|
product_id?: string | undefined;
|
|
680
|
-
|
|
682
|
+
product_ids?: string[] | undefined;
|
|
683
|
+
free_trial?: boolean | undefined;
|
|
681
684
|
success_url?: string | undefined;
|
|
685
|
+
force_checkout?: boolean | undefined;
|
|
682
686
|
customer_data?: {
|
|
683
687
|
name?: string | null | undefined;
|
|
684
688
|
email?: string | null | undefined;
|
|
@@ -687,19 +691,20 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
687
691
|
entity_data?: any;
|
|
688
692
|
checkout_session_params?: Record<string, any> | undefined;
|
|
689
693
|
reward?: string | undefined;
|
|
690
|
-
|
|
691
|
-
free_trial?: boolean | undefined;
|
|
692
|
-
force_checkout?: boolean | undefined;
|
|
694
|
+
invoice?: boolean | undefined;
|
|
693
695
|
}, {
|
|
694
696
|
customer_id: string;
|
|
697
|
+
entity_id?: string | undefined;
|
|
695
698
|
options?: {
|
|
696
699
|
feature_id: string;
|
|
697
700
|
quantity: number;
|
|
698
701
|
}[] | undefined;
|
|
699
702
|
metadata?: Record<string, string> | undefined;
|
|
700
703
|
product_id?: string | undefined;
|
|
701
|
-
|
|
704
|
+
product_ids?: string[] | undefined;
|
|
705
|
+
free_trial?: boolean | undefined;
|
|
702
706
|
success_url?: string | undefined;
|
|
707
|
+
force_checkout?: boolean | undefined;
|
|
703
708
|
customer_data?: {
|
|
704
709
|
name?: string | null | undefined;
|
|
705
710
|
email?: string | null | undefined;
|
|
@@ -708,9 +713,7 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
708
713
|
entity_data?: any;
|
|
709
714
|
checkout_session_params?: Record<string, any> | undefined;
|
|
710
715
|
reward?: string | undefined;
|
|
711
|
-
|
|
712
|
-
free_trial?: boolean | undefined;
|
|
713
|
-
force_checkout?: boolean | undefined;
|
|
716
|
+
invoice?: boolean | undefined;
|
|
714
717
|
}>;
|
|
715
718
|
type AttachParams = z.infer<typeof AttachParamsSchema>;
|
|
716
719
|
declare const CheckoutParamsSchema: z.ZodObject<{
|
|
@@ -747,11 +750,11 @@ declare const CheckoutParamsSchema: z.ZodObject<{
|
|
|
747
750
|
}, "strip", z.ZodTypeAny, {
|
|
748
751
|
customer_id: string;
|
|
749
752
|
product_id: string;
|
|
753
|
+
entity_id?: string | undefined;
|
|
750
754
|
options?: {
|
|
751
755
|
feature_id: string;
|
|
752
756
|
quantity: number;
|
|
753
757
|
}[] | undefined;
|
|
754
|
-
entity_id?: string | undefined;
|
|
755
758
|
success_url?: string | undefined;
|
|
756
759
|
customer_data?: {
|
|
757
760
|
name?: string | null | undefined;
|
|
@@ -764,11 +767,11 @@ declare const CheckoutParamsSchema: z.ZodObject<{
|
|
|
764
767
|
}, {
|
|
765
768
|
customer_id: string;
|
|
766
769
|
product_id: string;
|
|
770
|
+
entity_id?: string | undefined;
|
|
767
771
|
options?: {
|
|
768
772
|
feature_id: string;
|
|
769
773
|
quantity: number;
|
|
770
774
|
}[] | undefined;
|
|
771
|
-
entity_id?: string | undefined;
|
|
772
775
|
success_url?: string | undefined;
|
|
773
776
|
customer_data?: {
|
|
774
777
|
name?: string | null | undefined;
|
|
@@ -833,11 +836,11 @@ declare const FeatureSchema: z.ZodObject<{
|
|
|
833
836
|
}, "strip", z.ZodTypeAny, {
|
|
834
837
|
type: FeatureType;
|
|
835
838
|
id: string;
|
|
836
|
-
name?: string | null | undefined;
|
|
837
839
|
credit_schema?: {
|
|
838
840
|
metered_feature_id: string;
|
|
839
841
|
credit_cost: number;
|
|
840
842
|
}[] | null | undefined;
|
|
843
|
+
name?: string | null | undefined;
|
|
841
844
|
display?: {
|
|
842
845
|
singular: string;
|
|
843
846
|
plural: string;
|
|
@@ -845,11 +848,11 @@ declare const FeatureSchema: z.ZodObject<{
|
|
|
845
848
|
}, {
|
|
846
849
|
type: FeatureType;
|
|
847
850
|
id: string;
|
|
848
|
-
name?: string | null | undefined;
|
|
849
851
|
credit_schema?: {
|
|
850
852
|
metered_feature_id: string;
|
|
851
853
|
credit_cost: number;
|
|
852
854
|
}[] | null | undefined;
|
|
855
|
+
name?: string | null | undefined;
|
|
853
856
|
display?: {
|
|
854
857
|
singular: string;
|
|
855
858
|
plural: string;
|
|
@@ -937,20 +940,34 @@ declare class Autumn {
|
|
|
937
940
|
static checkout: (params: CheckoutParams) => Promise<Result<CheckoutResult, AutumnError>>;
|
|
938
941
|
checkout(params: CheckoutParams): Promise<Result<CheckoutResult, AutumnError>>;
|
|
939
942
|
static attach: (params: AttachParams) => Promise<Result<{
|
|
940
|
-
message: string;
|
|
941
|
-
code: string;
|
|
942
943
|
customer_id: string;
|
|
944
|
+
code: string;
|
|
945
|
+
message: string;
|
|
943
946
|
product_ids: string[];
|
|
944
947
|
customer_data?: any;
|
|
948
|
+
invoice?: {
|
|
949
|
+
status: string;
|
|
950
|
+
stripe_id: string;
|
|
951
|
+
hosted_invoice_url: string | null;
|
|
952
|
+
total: number;
|
|
953
|
+
currency: string;
|
|
954
|
+
} | undefined;
|
|
945
955
|
checkout_url?: string | undefined;
|
|
946
956
|
}, AutumnError>>;
|
|
947
957
|
static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
|
|
948
958
|
attach(params: AttachParams): Promise<Result<{
|
|
949
|
-
message: string;
|
|
950
|
-
code: string;
|
|
951
959
|
customer_id: string;
|
|
960
|
+
code: string;
|
|
961
|
+
message: string;
|
|
952
962
|
product_ids: string[];
|
|
953
963
|
customer_data?: any;
|
|
964
|
+
invoice?: {
|
|
965
|
+
status: string;
|
|
966
|
+
stripe_id: string;
|
|
967
|
+
hosted_invoice_url: string | null;
|
|
968
|
+
total: number;
|
|
969
|
+
currency: string;
|
|
970
|
+
} | undefined;
|
|
954
971
|
checkout_url?: string | undefined;
|
|
955
972
|
}, AutumnError>>;
|
|
956
973
|
static setupPayment: (params: SetupPaymentParams) => Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
@@ -968,15 +985,15 @@ declare class Autumn {
|
|
|
968
985
|
static check: (params: CheckParams) => Promise<Result<CheckResult, AutumnError>>;
|
|
969
986
|
check(params: CheckParams): Promise<Result<CheckResult, AutumnError>>;
|
|
970
987
|
static track: (params: TrackParams) => Promise<Result<{
|
|
971
|
-
code: string;
|
|
972
988
|
customer_id: string;
|
|
989
|
+
code: string;
|
|
973
990
|
id: string;
|
|
974
991
|
feature_id?: string | undefined;
|
|
975
992
|
event_name?: string | undefined;
|
|
976
993
|
}, AutumnError>>;
|
|
977
994
|
track(params: TrackParams): Promise<Result<{
|
|
978
|
-
code: string;
|
|
979
995
|
customer_id: string;
|
|
996
|
+
code: string;
|
|
980
997
|
id: string;
|
|
981
998
|
feature_id?: string | undefined;
|
|
982
999
|
event_name?: string | undefined;
|
|
@@ -1046,11 +1063,11 @@ declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
|
|
|
1046
1063
|
code: z.ZodString;
|
|
1047
1064
|
customer_id: z.ZodString;
|
|
1048
1065
|
}, "strip", z.ZodTypeAny, {
|
|
1049
|
-
code: string;
|
|
1050
1066
|
customer_id: string;
|
|
1051
|
-
}, {
|
|
1052
1067
|
code: string;
|
|
1068
|
+
}, {
|
|
1053
1069
|
customer_id: string;
|
|
1070
|
+
code: string;
|
|
1054
1071
|
}>;
|
|
1055
1072
|
type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
|
|
1056
1073
|
|
|
@@ -78,12 +78,12 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
78
78
|
credit_amount: number;
|
|
79
79
|
}>, "many">>;
|
|
80
80
|
}, "strip", z.ZodTypeAny, {
|
|
81
|
-
|
|
81
|
+
allowed: boolean;
|
|
82
82
|
feature_id: string;
|
|
83
|
+
customer_id: string;
|
|
83
84
|
required_balance: number;
|
|
84
|
-
allowed: boolean;
|
|
85
|
-
entity_id?: string | undefined;
|
|
86
85
|
usage_limit?: number | undefined;
|
|
86
|
+
entity_id?: string | undefined;
|
|
87
87
|
unlimited?: boolean | undefined;
|
|
88
88
|
interval?: ProductItemInterval | undefined;
|
|
89
89
|
balance?: number | null | undefined;
|
|
@@ -107,12 +107,12 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
107
107
|
credit_amount: number;
|
|
108
108
|
}[] | undefined;
|
|
109
109
|
}, {
|
|
110
|
-
|
|
110
|
+
allowed: boolean;
|
|
111
111
|
feature_id: string;
|
|
112
|
+
customer_id: string;
|
|
112
113
|
required_balance: number;
|
|
113
|
-
allowed: boolean;
|
|
114
|
-
entity_id?: string | undefined;
|
|
115
114
|
usage_limit?: number | undefined;
|
|
115
|
+
entity_id?: string | undefined;
|
|
116
116
|
unlimited?: boolean | undefined;
|
|
117
117
|
interval?: ProductItemInterval | undefined;
|
|
118
118
|
balance?: number | null | undefined;
|
|
@@ -421,19 +421,19 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
421
421
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
422
422
|
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
|
|
423
423
|
}, "strip", z.ZodTypeAny, {
|
|
424
|
-
|
|
425
|
-
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
424
|
+
id?: string | null | undefined;
|
|
426
425
|
name?: string | null | undefined;
|
|
427
426
|
email?: string | null | undefined;
|
|
428
427
|
fingerprint?: string | null | undefined;
|
|
429
|
-
id?: string | null | undefined;
|
|
430
|
-
}, {
|
|
431
428
|
metadata?: Record<string, any> | undefined;
|
|
432
429
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
430
|
+
}, {
|
|
431
|
+
id?: string | null | undefined;
|
|
433
432
|
name?: string | null | undefined;
|
|
434
433
|
email?: string | null | undefined;
|
|
435
434
|
fingerprint?: string | null | undefined;
|
|
436
|
-
|
|
435
|
+
metadata?: Record<string, any> | undefined;
|
|
436
|
+
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
437
437
|
}>;
|
|
438
438
|
type CreateCustomerParams = z.infer<typeof CreateCustomerParamsSchema>;
|
|
439
439
|
interface UpdateCustomerParams {
|
|
@@ -515,18 +515,18 @@ declare const TrackParamsSchema: z.ZodObject<{
|
|
|
515
515
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
516
516
|
}, "strip", z.ZodTypeAny, {
|
|
517
517
|
customer_id: string;
|
|
518
|
-
value?: number | undefined;
|
|
519
|
-
entity_id?: string | undefined;
|
|
520
518
|
feature_id?: string | undefined;
|
|
519
|
+
entity_id?: string | undefined;
|
|
520
|
+
value?: number | undefined;
|
|
521
521
|
customer_data?: any;
|
|
522
522
|
entity_data?: any;
|
|
523
523
|
event_name?: string | undefined;
|
|
524
524
|
idempotency_key?: string | undefined;
|
|
525
525
|
}, {
|
|
526
526
|
customer_id: string;
|
|
527
|
-
value?: number | undefined;
|
|
528
|
-
entity_id?: string | undefined;
|
|
529
527
|
feature_id?: string | undefined;
|
|
528
|
+
entity_id?: string | undefined;
|
|
529
|
+
value?: number | undefined;
|
|
530
530
|
customer_data?: any;
|
|
531
531
|
entity_data?: any;
|
|
532
532
|
event_name?: string | undefined;
|
|
@@ -554,28 +554,28 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
554
554
|
}>>;
|
|
555
555
|
}, "strip", z.ZodTypeAny, {
|
|
556
556
|
customer_id: string;
|
|
557
|
-
product_id?: string | undefined;
|
|
558
|
-
entity_id?: string | undefined;
|
|
559
557
|
feature_id?: string | undefined;
|
|
558
|
+
entity_id?: string | undefined;
|
|
559
|
+
required_balance?: number | undefined;
|
|
560
|
+
product_id?: string | undefined;
|
|
560
561
|
customer_data?: any;
|
|
561
562
|
entity_data?: {
|
|
562
563
|
feature_id: string;
|
|
563
564
|
name?: string | undefined;
|
|
564
565
|
} | undefined;
|
|
565
|
-
required_balance?: number | undefined;
|
|
566
566
|
send_event?: boolean | undefined;
|
|
567
567
|
with_preview?: boolean | undefined;
|
|
568
568
|
}, {
|
|
569
569
|
customer_id: string;
|
|
570
|
-
product_id?: string | undefined;
|
|
571
|
-
entity_id?: string | undefined;
|
|
572
570
|
feature_id?: string | undefined;
|
|
571
|
+
entity_id?: string | undefined;
|
|
572
|
+
required_balance?: number | undefined;
|
|
573
|
+
product_id?: string | undefined;
|
|
573
574
|
customer_data?: any;
|
|
574
575
|
entity_data?: {
|
|
575
576
|
feature_id: string;
|
|
576
577
|
name?: string | undefined;
|
|
577
578
|
} | undefined;
|
|
578
|
-
required_balance?: number | undefined;
|
|
579
579
|
send_event?: boolean | undefined;
|
|
580
580
|
with_preview?: boolean | undefined;
|
|
581
581
|
}>;
|
|
@@ -606,12 +606,12 @@ declare const QueryParamsSchema: z.ZodObject<{
|
|
|
606
606
|
feature_id: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
607
607
|
range: z.ZodOptional<z.ZodEnum<["24h", "7d", "30d", "90d", "last_cycle"]>>;
|
|
608
608
|
}, "strip", z.ZodTypeAny, {
|
|
609
|
-
customer_id: string;
|
|
610
609
|
feature_id: string | string[];
|
|
610
|
+
customer_id: string;
|
|
611
611
|
range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
|
|
612
612
|
}, {
|
|
613
|
-
customer_id: string;
|
|
614
613
|
feature_id: string | string[];
|
|
614
|
+
customer_id: string;
|
|
615
615
|
range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
|
|
616
616
|
}>;
|
|
617
617
|
type QueryParams = z.infer<typeof QueryParamsSchema>;
|
|
@@ -669,16 +669,20 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
669
669
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
670
670
|
checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
671
671
|
reward: z.ZodOptional<z.ZodString>;
|
|
672
|
+
invoice: z.ZodOptional<z.ZodBoolean>;
|
|
672
673
|
}, "strip", z.ZodTypeAny, {
|
|
673
674
|
customer_id: string;
|
|
675
|
+
entity_id?: string | undefined;
|
|
674
676
|
options?: {
|
|
675
677
|
feature_id: string;
|
|
676
678
|
quantity: number;
|
|
677
679
|
}[] | undefined;
|
|
678
680
|
metadata?: Record<string, string> | undefined;
|
|
679
681
|
product_id?: string | undefined;
|
|
680
|
-
|
|
682
|
+
product_ids?: string[] | undefined;
|
|
683
|
+
free_trial?: boolean | undefined;
|
|
681
684
|
success_url?: string | undefined;
|
|
685
|
+
force_checkout?: boolean | undefined;
|
|
682
686
|
customer_data?: {
|
|
683
687
|
name?: string | null | undefined;
|
|
684
688
|
email?: string | null | undefined;
|
|
@@ -687,19 +691,20 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
687
691
|
entity_data?: any;
|
|
688
692
|
checkout_session_params?: Record<string, any> | undefined;
|
|
689
693
|
reward?: string | undefined;
|
|
690
|
-
|
|
691
|
-
free_trial?: boolean | undefined;
|
|
692
|
-
force_checkout?: boolean | undefined;
|
|
694
|
+
invoice?: boolean | undefined;
|
|
693
695
|
}, {
|
|
694
696
|
customer_id: string;
|
|
697
|
+
entity_id?: string | undefined;
|
|
695
698
|
options?: {
|
|
696
699
|
feature_id: string;
|
|
697
700
|
quantity: number;
|
|
698
701
|
}[] | undefined;
|
|
699
702
|
metadata?: Record<string, string> | undefined;
|
|
700
703
|
product_id?: string | undefined;
|
|
701
|
-
|
|
704
|
+
product_ids?: string[] | undefined;
|
|
705
|
+
free_trial?: boolean | undefined;
|
|
702
706
|
success_url?: string | undefined;
|
|
707
|
+
force_checkout?: boolean | undefined;
|
|
703
708
|
customer_data?: {
|
|
704
709
|
name?: string | null | undefined;
|
|
705
710
|
email?: string | null | undefined;
|
|
@@ -708,9 +713,7 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
708
713
|
entity_data?: any;
|
|
709
714
|
checkout_session_params?: Record<string, any> | undefined;
|
|
710
715
|
reward?: string | undefined;
|
|
711
|
-
|
|
712
|
-
free_trial?: boolean | undefined;
|
|
713
|
-
force_checkout?: boolean | undefined;
|
|
716
|
+
invoice?: boolean | undefined;
|
|
714
717
|
}>;
|
|
715
718
|
type AttachParams = z.infer<typeof AttachParamsSchema>;
|
|
716
719
|
declare const CheckoutParamsSchema: z.ZodObject<{
|
|
@@ -747,11 +750,11 @@ declare const CheckoutParamsSchema: z.ZodObject<{
|
|
|
747
750
|
}, "strip", z.ZodTypeAny, {
|
|
748
751
|
customer_id: string;
|
|
749
752
|
product_id: string;
|
|
753
|
+
entity_id?: string | undefined;
|
|
750
754
|
options?: {
|
|
751
755
|
feature_id: string;
|
|
752
756
|
quantity: number;
|
|
753
757
|
}[] | undefined;
|
|
754
|
-
entity_id?: string | undefined;
|
|
755
758
|
success_url?: string | undefined;
|
|
756
759
|
customer_data?: {
|
|
757
760
|
name?: string | null | undefined;
|
|
@@ -764,11 +767,11 @@ declare const CheckoutParamsSchema: z.ZodObject<{
|
|
|
764
767
|
}, {
|
|
765
768
|
customer_id: string;
|
|
766
769
|
product_id: string;
|
|
770
|
+
entity_id?: string | undefined;
|
|
767
771
|
options?: {
|
|
768
772
|
feature_id: string;
|
|
769
773
|
quantity: number;
|
|
770
774
|
}[] | undefined;
|
|
771
|
-
entity_id?: string | undefined;
|
|
772
775
|
success_url?: string | undefined;
|
|
773
776
|
customer_data?: {
|
|
774
777
|
name?: string | null | undefined;
|
|
@@ -833,11 +836,11 @@ declare const FeatureSchema: z.ZodObject<{
|
|
|
833
836
|
}, "strip", z.ZodTypeAny, {
|
|
834
837
|
type: FeatureType;
|
|
835
838
|
id: string;
|
|
836
|
-
name?: string | null | undefined;
|
|
837
839
|
credit_schema?: {
|
|
838
840
|
metered_feature_id: string;
|
|
839
841
|
credit_cost: number;
|
|
840
842
|
}[] | null | undefined;
|
|
843
|
+
name?: string | null | undefined;
|
|
841
844
|
display?: {
|
|
842
845
|
singular: string;
|
|
843
846
|
plural: string;
|
|
@@ -845,11 +848,11 @@ declare const FeatureSchema: z.ZodObject<{
|
|
|
845
848
|
}, {
|
|
846
849
|
type: FeatureType;
|
|
847
850
|
id: string;
|
|
848
|
-
name?: string | null | undefined;
|
|
849
851
|
credit_schema?: {
|
|
850
852
|
metered_feature_id: string;
|
|
851
853
|
credit_cost: number;
|
|
852
854
|
}[] | null | undefined;
|
|
855
|
+
name?: string | null | undefined;
|
|
853
856
|
display?: {
|
|
854
857
|
singular: string;
|
|
855
858
|
plural: string;
|
|
@@ -937,20 +940,34 @@ declare class Autumn {
|
|
|
937
940
|
static checkout: (params: CheckoutParams) => Promise<Result<CheckoutResult, AutumnError>>;
|
|
938
941
|
checkout(params: CheckoutParams): Promise<Result<CheckoutResult, AutumnError>>;
|
|
939
942
|
static attach: (params: AttachParams) => Promise<Result<{
|
|
940
|
-
message: string;
|
|
941
|
-
code: string;
|
|
942
943
|
customer_id: string;
|
|
944
|
+
code: string;
|
|
945
|
+
message: string;
|
|
943
946
|
product_ids: string[];
|
|
944
947
|
customer_data?: any;
|
|
948
|
+
invoice?: {
|
|
949
|
+
status: string;
|
|
950
|
+
stripe_id: string;
|
|
951
|
+
hosted_invoice_url: string | null;
|
|
952
|
+
total: number;
|
|
953
|
+
currency: string;
|
|
954
|
+
} | undefined;
|
|
945
955
|
checkout_url?: string | undefined;
|
|
946
956
|
}, AutumnError>>;
|
|
947
957
|
static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
|
|
948
958
|
attach(params: AttachParams): Promise<Result<{
|
|
949
|
-
message: string;
|
|
950
|
-
code: string;
|
|
951
959
|
customer_id: string;
|
|
960
|
+
code: string;
|
|
961
|
+
message: string;
|
|
952
962
|
product_ids: string[];
|
|
953
963
|
customer_data?: any;
|
|
964
|
+
invoice?: {
|
|
965
|
+
status: string;
|
|
966
|
+
stripe_id: string;
|
|
967
|
+
hosted_invoice_url: string | null;
|
|
968
|
+
total: number;
|
|
969
|
+
currency: string;
|
|
970
|
+
} | undefined;
|
|
954
971
|
checkout_url?: string | undefined;
|
|
955
972
|
}, AutumnError>>;
|
|
956
973
|
static setupPayment: (params: SetupPaymentParams) => Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
@@ -968,15 +985,15 @@ declare class Autumn {
|
|
|
968
985
|
static check: (params: CheckParams) => Promise<Result<CheckResult, AutumnError>>;
|
|
969
986
|
check(params: CheckParams): Promise<Result<CheckResult, AutumnError>>;
|
|
970
987
|
static track: (params: TrackParams) => Promise<Result<{
|
|
971
|
-
code: string;
|
|
972
988
|
customer_id: string;
|
|
989
|
+
code: string;
|
|
973
990
|
id: string;
|
|
974
991
|
feature_id?: string | undefined;
|
|
975
992
|
event_name?: string | undefined;
|
|
976
993
|
}, AutumnError>>;
|
|
977
994
|
track(params: TrackParams): Promise<Result<{
|
|
978
|
-
code: string;
|
|
979
995
|
customer_id: string;
|
|
996
|
+
code: string;
|
|
980
997
|
id: string;
|
|
981
998
|
feature_id?: string | undefined;
|
|
982
999
|
event_name?: string | undefined;
|
|
@@ -1046,11 +1063,11 @@ declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
|
|
|
1046
1063
|
code: z.ZodString;
|
|
1047
1064
|
customer_id: z.ZodString;
|
|
1048
1065
|
}, "strip", z.ZodTypeAny, {
|
|
1049
|
-
code: string;
|
|
1050
1066
|
customer_id: string;
|
|
1051
|
-
}, {
|
|
1052
1067
|
code: string;
|
|
1068
|
+
}, {
|
|
1053
1069
|
customer_id: string;
|
|
1070
|
+
code: string;
|
|
1054
1071
|
}>;
|
|
1055
1072
|
type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
|
|
1056
1073
|
|
|
@@ -739,7 +739,8 @@ var AttachParamsSchema = import_zod7.z.object({
|
|
|
739
739
|
customer_data: CustomerDataSchema.optional(),
|
|
740
740
|
entity_data: import_zod7.z.any().optional(),
|
|
741
741
|
checkout_session_params: import_zod7.z.record(import_zod7.z.any()).optional(),
|
|
742
|
-
reward: import_zod7.z.string().optional()
|
|
742
|
+
reward: import_zod7.z.string().optional(),
|
|
743
|
+
invoice: import_zod7.z.boolean().optional()
|
|
743
744
|
});
|
|
744
745
|
var AttachResultSchema = import_zod7.z.object({
|
|
745
746
|
checkout_url: import_zod7.z.string().optional(),
|
|
@@ -747,7 +748,14 @@ var AttachResultSchema = import_zod7.z.object({
|
|
|
747
748
|
product_ids: import_zod7.z.array(import_zod7.z.string()),
|
|
748
749
|
code: import_zod7.z.string(),
|
|
749
750
|
message: import_zod7.z.string(),
|
|
750
|
-
customer_data: import_zod7.z.any().optional()
|
|
751
|
+
customer_data: import_zod7.z.any().optional(),
|
|
752
|
+
invoice: import_zod7.z.object({
|
|
753
|
+
status: import_zod7.z.string(),
|
|
754
|
+
stripe_id: import_zod7.z.string(),
|
|
755
|
+
hosted_invoice_url: import_zod7.z.string().nullable(),
|
|
756
|
+
total: import_zod7.z.number(),
|
|
757
|
+
currency: import_zod7.z.string()
|
|
758
|
+
}).optional()
|
|
751
759
|
});
|
|
752
760
|
var CheckoutParamsSchema = import_zod7.z.object({
|
|
753
761
|
customer_id: import_zod7.z.string(),
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRouterWithOptions
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-7WWKVE4J.mjs";
|
|
4
|
+
import "./chunk-JN4ULI5R.mjs";
|
|
5
|
+
import "./chunk-EJBD5GH7.mjs";
|
|
6
|
+
import "./chunk-I43OU64D.mjs";
|
|
7
|
+
import "./chunk-YN334O74.mjs";
|
|
8
|
+
import "./chunk-274BIVOC.mjs";
|
|
9
9
|
import {
|
|
10
10
|
Autumn
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-KY3RLTE7.mjs";
|
|
12
12
|
import "./chunk-2TEL6LR5.mjs";
|
|
13
13
|
import {
|
|
14
14
|
autumnApiUrl
|
|
@@ -739,7 +739,8 @@ var AttachParamsSchema = import_zod7.z.object({
|
|
|
739
739
|
customer_data: CustomerDataSchema.optional(),
|
|
740
740
|
entity_data: import_zod7.z.any().optional(),
|
|
741
741
|
checkout_session_params: import_zod7.z.record(import_zod7.z.any()).optional(),
|
|
742
|
-
reward: import_zod7.z.string().optional()
|
|
742
|
+
reward: import_zod7.z.string().optional(),
|
|
743
|
+
invoice: import_zod7.z.boolean().optional()
|
|
743
744
|
});
|
|
744
745
|
var AttachResultSchema = import_zod7.z.object({
|
|
745
746
|
checkout_url: import_zod7.z.string().optional(),
|
|
@@ -747,7 +748,14 @@ var AttachResultSchema = import_zod7.z.object({
|
|
|
747
748
|
product_ids: import_zod7.z.array(import_zod7.z.string()),
|
|
748
749
|
code: import_zod7.z.string(),
|
|
749
750
|
message: import_zod7.z.string(),
|
|
750
|
-
customer_data: import_zod7.z.any().optional()
|
|
751
|
+
customer_data: import_zod7.z.any().optional(),
|
|
752
|
+
invoice: import_zod7.z.object({
|
|
753
|
+
status: import_zod7.z.string(),
|
|
754
|
+
stripe_id: import_zod7.z.string(),
|
|
755
|
+
hosted_invoice_url: import_zod7.z.string().nullable(),
|
|
756
|
+
total: import_zod7.z.number(),
|
|
757
|
+
currency: import_zod7.z.string()
|
|
758
|
+
}).optional()
|
|
751
759
|
});
|
|
752
760
|
var CheckoutParamsSchema = import_zod7.z.object({
|
|
753
761
|
customer_id: import_zod7.z.string(),
|