autumn-js 0.0.103 → 0.0.104
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 +28 -4
- package/dist/libraries/backend/better-auth.d.ts +28 -4
- package/dist/libraries/backend/better-auth.js +76 -83
- package/dist/libraries/backend/better-auth.mjs +7 -7
- package/dist/libraries/backend/{chunk-YFWJ6E4U.mjs → chunk-2RZ2FZX2.mjs} +10 -10
- package/dist/libraries/backend/{chunk-33NT3WE5.mjs → chunk-3OLXYDCU.mjs} +1 -1
- package/dist/libraries/backend/{chunk-AKV5N4WO.mjs → chunk-5EKNB4IJ.mjs} +1 -1
- package/dist/libraries/backend/{chunk-CEZHD5H6.mjs → chunk-5H6HVCOP.mjs} +1 -1
- package/dist/libraries/backend/{chunk-J3L3OBSS.mjs → chunk-HHMIVOXX.mjs} +18 -1
- package/dist/libraries/backend/{chunk-6VS7TU7O.mjs → chunk-IOSEAUDJ.mjs} +57 -81
- package/dist/libraries/backend/{chunk-RA4AC56B.mjs → chunk-K7JGEYUX.mjs} +1 -1
- package/dist/libraries/backend/convex.js +73 -80
- package/dist/libraries/backend/convex.mjs +7 -7
- package/dist/libraries/backend/elysia.js +73 -80
- 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 +73 -80
- package/dist/libraries/backend/express.mjs +7 -7
- package/dist/libraries/backend/fastify.js +73 -80
- package/dist/libraries/backend/fastify.mjs +7 -7
- package/dist/libraries/backend/hono.js +73 -80
- package/dist/libraries/backend/hono.mjs +7 -7
- package/dist/libraries/backend/next.js +169 -176
- package/dist/libraries/backend/next.mjs +101 -101
- package/dist/libraries/backend/react-router.js +73 -80
- package/dist/libraries/backend/react-router.mjs +7 -7
- package/dist/libraries/backend/{referralTypes-DV8s1h8w.d.ts → referralTypes-CnYanpMd.d.ts} +199 -102
- package/dist/libraries/backend/{referralTypes-DcDxMGTp.d.mts → referralTypes-jA7MQ1y5.d.mts} +199 -102
- package/dist/libraries/backend/remix_dep.js +73 -80
- package/dist/libraries/backend/remix_dep.mjs +7 -7
- package/dist/libraries/backend/routes/backendRouter.js +73 -80
- package/dist/libraries/backend/routes/backendRouter.mjs +7 -7
- package/dist/libraries/backend/routes/entityRoutes.js +56 -80
- package/dist/libraries/backend/routes/entityRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/genRoutes.js +73 -80
- package/dist/libraries/backend/routes/genRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/productRoutes.js +56 -80
- package/dist/libraries/backend/routes/productRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/referralRoutes.js +56 -80
- package/dist/libraries/backend/routes/referralRoutes.mjs +3 -3
- package/dist/libraries/backend/supabase.js +73 -80
- package/dist/libraries/backend/supabase.mjs +7 -7
- package/dist/libraries/backend/tanstack.js +73 -80
- package/dist/libraries/backend/tanstack.mjs +7 -7
- package/dist/libraries/backend/utils/backendRes.js +56 -80
- 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 +56 -80
- package/dist/libraries/backend/utils/withAuth.mjs +2 -2
- package/dist/libraries/react/AutumnContext.d.mts +5 -4
- package/dist/libraries/react/AutumnContext.d.ts +5 -4
- package/dist/libraries/react/AutumnContext.js +63 -82
- package/dist/libraries/react/AutumnContext.mjs +6 -6
- package/dist/libraries/react/BaseAutumnProvider.d.mts +5 -4
- package/dist/libraries/react/BaseAutumnProvider.d.ts +5 -4
- package/dist/libraries/react/BaseAutumnProvider.js +96 -111
- package/dist/libraries/react/BaseAutumnProvider.mjs +10 -10
- package/dist/libraries/react/{ReactAutumnClient-C8Nt-pqu.d.mts → ReactAutumnClient-BGI56QI_.d.mts} +21 -10
- package/dist/libraries/react/{ReactAutumnClient-BlxQQOXE.d.ts → ReactAutumnClient-CEv9YGLM.d.ts} +21 -10
- package/dist/libraries/react/ReactAutumnProvider.d.mts +1 -1
- package/dist/libraries/react/ReactAutumnProvider.d.ts +1 -1
- package/dist/libraries/react/ReactAutumnProvider.js +96 -111
- package/dist/libraries/react/ReactAutumnProvider.mjs +11 -11
- package/dist/libraries/react/attachTypes-Cexub7bN.d.ts +58 -0
- package/dist/libraries/react/attachTypes-DqI7qtXD.d.mts +58 -0
- package/dist/libraries/react/{chunk-VUBJ6JM3.mjs → chunk-253MTZP3.mjs} +7 -2
- package/dist/libraries/react/{chunk-RQN4VDAE.mjs → chunk-3N6WLQH3.mjs} +3 -3
- package/dist/libraries/react/{chunk-DHJ36QEV.mjs → chunk-473LVTGN.mjs} +2 -2
- package/dist/libraries/react/{chunk-LXSKONN2.mjs → chunk-4A53GN44.mjs} +5 -5
- package/dist/libraries/react/{chunk-EHOBTSZ7.mjs → chunk-4BQDSIWM.mjs} +5 -8
- package/dist/libraries/react/{chunk-S6JUZ43Q.mjs → chunk-4VXBAIPC.mjs} +2 -2
- package/dist/libraries/react/{chunk-OAWFFAKA.mjs → chunk-6EZVNJHQ.mjs} +6 -6
- package/dist/libraries/react/{chunk-DBGTWERW.mjs → chunk-ASL5VH2W.mjs} +4 -3
- package/dist/libraries/react/{chunk-QBBE72EF.mjs → chunk-CBPZVSMZ.mjs} +12 -7
- package/dist/libraries/react/chunk-CUWUAQML.mjs +179 -0
- package/dist/libraries/react/chunk-DJIRJJNG.mjs +34 -0
- package/dist/libraries/react/{chunk-CYW4LNFZ.mjs → chunk-E5EYSQYJ.mjs} +68 -90
- package/dist/libraries/react/{chunk-GQIE3MFB.mjs → chunk-EBQBPZCM.mjs} +3 -3
- package/dist/libraries/react/{chunk-AL3VJLFU.mjs → chunk-EV5RNY5U.mjs} +1 -1
- package/dist/libraries/react/chunk-G6NOGGDA.mjs +695 -0
- package/dist/libraries/react/{chunk-OAPUYXBO.mjs → chunk-KWNH6C27.mjs} +6 -6
- package/dist/libraries/react/{chunk-X4R3V6O6.mjs → chunk-MNOH7Q3B.mjs} +2 -2
- package/dist/libraries/react/{chunk-3SGSKYJ7.mjs → chunk-P5MIFIIO.mjs} +2 -2
- package/dist/libraries/react/{chunk-PZJQBCVG.mjs → chunk-PIENO233.mjs} +1 -1
- package/dist/libraries/react/chunk-QUO2CYKM.mjs +30 -0
- package/dist/libraries/react/{chunk-BCMBFJ7E.mjs → chunk-RCTILKK3.mjs} +70 -37
- package/dist/libraries/react/{chunk-ZVQKDPUP.mjs → chunk-RPEGNKJH.mjs} +3 -3
- package/dist/libraries/react/{chunk-SDMBKRAI.mjs → chunk-WAFSQH6N.mjs} +37 -37
- package/dist/libraries/react/{chunk-CGWNDUYV.mjs → chunk-ZFIJI37N.mjs} +1 -1
- package/dist/libraries/react/{chunk-KYSWTOMQ.mjs → chunk-ZITEHPEQ.mjs} +30 -24
- package/dist/libraries/react/client/ReactAutumnClient.d.mts +5 -5
- package/dist/libraries/react/client/ReactAutumnClient.d.ts +5 -5
- package/dist/libraries/react/client/ReactAutumnClient.js +63 -82
- package/dist/libraries/react/client/ReactAutumnClient.mjs +5 -5
- package/dist/libraries/react/client/clientCompMethods.d.mts +5 -5
- package/dist/libraries/react/client/clientCompMethods.d.ts +5 -5
- package/dist/libraries/react/client/clientCusMethods.d.mts +5 -5
- package/dist/libraries/react/client/clientCusMethods.d.ts +5 -5
- package/dist/libraries/react/client/clientEntityMethods.d.mts +5 -5
- package/dist/libraries/react/client/clientEntityMethods.d.ts +5 -5
- package/dist/libraries/react/client/clientGenMethods.d.mts +9 -7
- package/dist/libraries/react/client/clientGenMethods.d.ts +9 -7
- package/dist/libraries/react/client/clientGenMethods.js +8 -2
- package/dist/libraries/react/client/clientGenMethods.mjs +3 -1
- package/dist/libraries/react/client/clientProdMethods.d.mts +5 -5
- package/dist/libraries/react/client/clientProdMethods.d.ts +5 -5
- package/dist/libraries/react/client/clientReferralMethods.d.mts +5 -5
- package/dist/libraries/react/client/clientReferralMethods.d.ts +5 -5
- package/dist/libraries/react/client/types/clientAttachTypes.d.mts +115 -0
- package/dist/libraries/react/client/types/clientAttachTypes.d.ts +115 -0
- package/dist/libraries/react/client/types/clientAttachTypes.js +68 -0
- package/dist/libraries/react/client/types/clientAttachTypes.mjs +42 -0
- package/dist/libraries/react/client/types/clientGenTypes.d.mts +10 -81
- package/dist/libraries/react/client/types/clientGenTypes.d.ts +10 -81
- package/dist/libraries/react/client/types/clientGenTypes.js +1 -24
- package/dist/libraries/react/client/types/clientGenTypes.mjs +1 -22
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.css +213 -4
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.mts +5 -32
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.ts +5 -32
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.js +720 -371
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.mjs +30 -33
- package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.mts +3 -2
- package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.ts +3 -2
- package/dist/libraries/react/components/attach-dialog/lib/attach-content.js +70 -37
- package/dist/libraries/react/components/attach-dialog/lib/attach-content.mjs +1 -1
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.mts +1 -1
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.ts +1 -1
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.js +43 -43
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.mjs +5 -5
- package/dist/libraries/react/components/check-dialog/lib/check-content.d.mts +1 -1
- package/dist/libraries/react/components/check-dialog/lib/check-content.d.ts +1 -1
- package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.mts +3 -1
- package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.ts +3 -1
- package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.js +12 -7
- package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.mjs +1 -1
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.css +213 -4
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.mts +1 -1
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.ts +1 -1
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +794 -456
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +29 -26
- package/dist/libraries/react/components/ui/accordion.d.mts +9 -0
- package/dist/libraries/react/components/ui/accordion.d.ts +9 -0
- package/dist/libraries/react/components/ui/accordion.js +2721 -0
- package/dist/libraries/react/components/ui/accordion.mjs +15 -0
- 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/button.js +3 -3
- package/dist/libraries/react/components/ui/button.mjs +2 -2
- package/dist/libraries/react/components/ui/dialog.js +43 -43
- package/dist/libraries/react/components/ui/dialog.mjs +3 -3
- package/dist/libraries/react/components/ui/input.d.mts +5 -0
- package/dist/libraries/react/components/ui/input.d.ts +5 -0
- package/dist/libraries/react/components/ui/input.js +2587 -0
- package/dist/libraries/react/components/ui/input.mjs +9 -0
- package/dist/libraries/react/components/ui/popover.d.mts +9 -0
- package/dist/libraries/react/components/ui/popover.d.ts +9 -0
- package/dist/libraries/react/components/ui/popover.js +2594 -0
- package/dist/libraries/react/components/ui/popover.mjs +15 -0
- package/dist/libraries/react/components/ui/switch.js +12 -12
- package/dist/libraries/react/components/ui/switch.mjs +3 -3
- package/dist/libraries/react/{cusTypes-CHcG59KG.d.mts → cusTypes-DCeNEQLu.d.mts} +28 -10
- package/dist/libraries/react/{cusTypes-CHcG59KG.d.ts → cusTypes-DCeNEQLu.d.ts} +28 -10
- package/dist/libraries/react/{entTypes-8-4TWxee.d.ts → entTypes-BJD_Hxbp.d.ts} +1 -1
- package/dist/libraries/react/{entTypes-3t7AbNhm.d.mts → entTypes-CJhJFCKD.d.mts} +1 -1
- package/dist/libraries/react/hooks/handleAllowed.d.mts +2 -2
- package/dist/libraries/react/hooks/handleAllowed.d.ts +2 -2
- package/dist/libraries/react/hooks/useAutumn.d.mts +21 -6
- package/dist/libraries/react/hooks/useAutumn.d.ts +21 -6
- package/dist/libraries/react/hooks/useAutumn.js +94 -110
- package/dist/libraries/react/hooks/useAutumn.mjs +9 -9
- package/dist/libraries/react/hooks/useAutumnBase.d.mts +24 -9
- package/dist/libraries/react/hooks/useAutumnBase.d.ts +24 -9
- package/dist/libraries/react/hooks/useAutumnBase.js +94 -110
- package/dist/libraries/react/hooks/useAutumnBase.mjs +8 -8
- package/dist/libraries/react/hooks/useCustomer.d.mts +7 -5
- package/dist/libraries/react/hooks/useCustomer.d.ts +7 -5
- package/dist/libraries/react/hooks/useCustomer.js +96 -111
- package/dist/libraries/react/hooks/useCustomer.mjs +10 -10
- package/dist/libraries/react/hooks/useCustomerBase.d.mts +8 -5
- package/dist/libraries/react/hooks/useCustomerBase.d.ts +8 -5
- package/dist/libraries/react/hooks/useCustomerBase.js +96 -111
- package/dist/libraries/react/hooks/useCustomerBase.mjs +9 -9
- package/dist/libraries/react/hooks/useEntity.d.mts +14 -7
- package/dist/libraries/react/hooks/useEntity.d.ts +14 -7
- package/dist/libraries/react/hooks/useEntity.js +94 -110
- package/dist/libraries/react/hooks/useEntity.mjs +10 -10
- package/dist/libraries/react/hooks/useEntityBase.d.mts +16 -7
- package/dist/libraries/react/hooks/useEntityBase.d.ts +16 -7
- package/dist/libraries/react/hooks/useEntityBase.js +94 -110
- package/dist/libraries/react/hooks/useEntityBase.mjs +9 -9
- package/dist/libraries/react/hooks/usePricingTable.d.mts +1 -1
- package/dist/libraries/react/hooks/usePricingTable.d.ts +1 -1
- package/dist/libraries/react/hooks/usePricingTable.js +66 -88
- package/dist/libraries/react/hooks/usePricingTable.mjs +8 -8
- package/dist/libraries/react/hooks/usePricingTableBase.d.mts +6 -6
- package/dist/libraries/react/hooks/usePricingTableBase.d.ts +6 -6
- package/dist/libraries/react/hooks/usePricingTableBase.js +66 -88
- package/dist/libraries/react/hooks/usePricingTableBase.mjs +7 -7
- package/dist/libraries/react/hooks/useProductsBase.js +63 -82
- package/dist/libraries/react/hooks/useProductsBase.mjs +6 -6
- package/dist/libraries/react/index.d.mts +217 -106
- package/dist/libraries/react/index.d.ts +217 -106
- package/dist/libraries/react/index.js +801 -463
- package/dist/libraries/react/index.mjs +792 -454
- package/dist/libraries/react/{response-DnJCkvfc.d.ts → response-Dek2TEnE.d.ts} +2 -25
- package/dist/libraries/react/{response-B8MYd86O.d.mts → response-HZAWTgGp.d.mts} +2 -25
- package/dist/next/{AutumnProvider-Xl1mqxls.d.mts → AutumnProvider-CHFySjFm.d.mts} +30 -12
- package/dist/next/{AutumnProvider-Xl1mqxls.d.ts → AutumnProvider-CHFySjFm.d.ts} +30 -12
- package/dist/next/AutumnProvider.d.mts +1 -1
- package/dist/next/AutumnProvider.d.ts +1 -1
- package/dist/next/client/NextAutumnClient.d.mts +18 -7
- package/dist/next/client/NextAutumnClient.d.ts +18 -7
- package/dist/next/client/NextAutumnClient.js +13 -2
- package/dist/next/client/NextAutumnClient.mjs +13 -2
- package/dist/next/client/NextAutumnProvider.d.mts +1 -1
- package/dist/next/client/NextAutumnProvider.d.ts +1 -1
- package/dist/next/client/attachTypes-BL6x9Zbx.d.ts +58 -0
- package/dist/next/client/attachTypes-BPYeJ6E4.d.mts +58 -0
- package/dist/next/client/{clientGenTypes-Dx1TULjb.d.ts → clientAttachTypes-Dj6U8D7o.d.ts} +108 -90
- package/dist/next/client/{clientGenTypes-tE8HbEdV.d.mts → clientAttachTypes-fN66J754.d.mts} +108 -90
- package/dist/next/client/clientUtils.d.mts +2 -2
- package/dist/next/client/clientUtils.d.ts +2 -2
- package/dist/next/client/{cusTypes-nWQygxXu.d.mts → cusTypes-BoVZ2omf.d.mts} +32 -14
- package/dist/next/client/{cusTypes-nWQygxXu.d.ts → cusTypes-BoVZ2omf.d.ts} +32 -14
- package/dist/next/client/{entTypes-DDZyYuom.d.ts → entTypes-BrHkjvC9.d.ts} +1 -1
- package/dist/next/client/{entTypes-DusU3WqD.d.mts → entTypes-Li6ZrG0C.d.mts} +1 -1
- package/dist/next/client/hooks/useAutumn.d.mts +19 -5
- package/dist/next/client/hooks/useAutumn.d.ts +19 -5
- package/dist/next/client/hooks/useCustomer.d.mts +5 -4
- package/dist/next/client/hooks/useCustomer.d.ts +5 -4
- package/dist/next/client/hooks/useEntity.d.mts +14 -8
- package/dist/next/client/hooks/useEntity.d.ts +14 -8
- 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 +2 -2
- package/dist/next/client/types.d.ts +2 -2
- package/dist/next/index.d.mts +213 -107
- package/dist/next/index.d.ts +213 -107
- 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 +173 -94
- package/dist/next/server/cusActions.d.ts +173 -94
- package/dist/next/server/{cusTypes-Tc189V9T.d.mts → cusTypes-Bh_pVAJp.d.mts} +32 -14
- package/dist/next/server/{cusTypes-Tc189V9T.d.ts → cusTypes-Bh_pVAJp.d.ts} +32 -14
- package/dist/next/server/genActions.d.mts +3 -4
- package/dist/next/server/genActions.d.ts +3 -4
- package/dist/sdk/index.d.mts +221 -135
- package/dist/sdk/index.d.ts +221 -135
- package/dist/sdk/index.js +55 -80
- package/dist/sdk/index.mjs +54 -81
- package/dist/styles/global.css +213 -4
- package/dist/utils/encryptUtils.js +56 -80
- package/dist/utils/encryptUtils.mjs +56 -80
- package/package.json +7 -4
- package/dist/libraries/react/chunk-ZEVKOP7Z.mjs +0 -548
|
@@ -1,30 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as CheckFeatureResult, j as CheckProductResult } from './cusTypes-DCeNEQLu.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { A as AutumnError } from './error-DHbclCVh.js';
|
|
4
4
|
|
|
5
|
-
declare const AttachResultSchema: z.ZodObject<{
|
|
6
|
-
checkout_url: z.ZodOptional<z.ZodString>;
|
|
7
|
-
customer_id: z.ZodString;
|
|
8
|
-
product_ids: z.ZodArray<z.ZodString, "many">;
|
|
9
|
-
code: z.ZodString;
|
|
10
|
-
message: z.ZodString;
|
|
11
|
-
customer_data: z.ZodOptional<z.ZodAny>;
|
|
12
|
-
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
customer_id: string;
|
|
14
|
-
code: string;
|
|
15
|
-
message: string;
|
|
16
|
-
product_ids: string[];
|
|
17
|
-
customer_data?: any;
|
|
18
|
-
checkout_url?: string | undefined;
|
|
19
|
-
}, {
|
|
20
|
-
customer_id: string;
|
|
21
|
-
code: string;
|
|
22
|
-
message: string;
|
|
23
|
-
product_ids: string[];
|
|
24
|
-
customer_data?: any;
|
|
25
|
-
checkout_url?: string | undefined;
|
|
26
|
-
}>;
|
|
27
|
-
type AttachResult = z.infer<typeof AttachResultSchema>;
|
|
28
5
|
declare const CancelResultSchema: z.ZodObject<{
|
|
29
6
|
success: z.ZodBoolean;
|
|
30
7
|
customer_id: z.ZodString;
|
|
@@ -78,4 +55,4 @@ type Failure<E> = {
|
|
|
78
55
|
type Result<T, E> = Success<T> | Failure<E>;
|
|
79
56
|
type AutumnPromise<T> = Promise<Result<T, AutumnError>>;
|
|
80
57
|
|
|
81
|
-
export type { AutumnPromise as A, CancelResult as C, Result as R, SetupPaymentResult as S, TrackResult as T,
|
|
58
|
+
export type { AutumnPromise as A, CancelResult as C, Result as R, SetupPaymentResult as S, TrackResult as T, CheckResult as a };
|
|
@@ -1,30 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as CheckFeatureResult, j as CheckProductResult } from './cusTypes-DCeNEQLu.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { A as AutumnError } from './error-DHbclCVh.mjs';
|
|
4
4
|
|
|
5
|
-
declare const AttachResultSchema: z.ZodObject<{
|
|
6
|
-
checkout_url: z.ZodOptional<z.ZodString>;
|
|
7
|
-
customer_id: z.ZodString;
|
|
8
|
-
product_ids: z.ZodArray<z.ZodString, "many">;
|
|
9
|
-
code: z.ZodString;
|
|
10
|
-
message: z.ZodString;
|
|
11
|
-
customer_data: z.ZodOptional<z.ZodAny>;
|
|
12
|
-
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
customer_id: string;
|
|
14
|
-
code: string;
|
|
15
|
-
message: string;
|
|
16
|
-
product_ids: string[];
|
|
17
|
-
customer_data?: any;
|
|
18
|
-
checkout_url?: string | undefined;
|
|
19
|
-
}, {
|
|
20
|
-
customer_id: string;
|
|
21
|
-
code: string;
|
|
22
|
-
message: string;
|
|
23
|
-
product_ids: string[];
|
|
24
|
-
customer_data?: any;
|
|
25
|
-
checkout_url?: string | undefined;
|
|
26
|
-
}>;
|
|
27
|
-
type AttachResult = z.infer<typeof AttachResultSchema>;
|
|
28
5
|
declare const CancelResultSchema: z.ZodObject<{
|
|
29
6
|
success: z.ZodBoolean;
|
|
30
7
|
customer_id: z.ZodString;
|
|
@@ -78,4 +55,4 @@ type Failure<E> = {
|
|
|
78
55
|
type Result<T, E> = Success<T> | Failure<E>;
|
|
79
56
|
type AutumnPromise<T> = Promise<Result<T, AutumnError>>;
|
|
80
57
|
|
|
81
|
-
export type { AutumnPromise as A, CancelResult as C, Result as R, SetupPaymentResult as S, TrackResult as T,
|
|
58
|
+
export type { AutumnPromise as A, CancelResult as C, Result as R, SetupPaymentResult as S, TrackResult as T, CheckResult as a };
|
|
@@ -89,10 +89,17 @@ declare enum AppEnv {
|
|
|
89
89
|
Live = "live"
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
interface Feature {
|
|
93
|
+
id: string;
|
|
94
|
+
name: string;
|
|
95
|
+
type: "boolean" | "continuous_use" | "single_use" | "credit_system";
|
|
96
|
+
}
|
|
92
97
|
interface ProductItem {
|
|
98
|
+
type?: "feature" | "priced_feature" | "price";
|
|
93
99
|
feature_id?: string;
|
|
94
100
|
included_usage?: number | typeof Infinite;
|
|
95
101
|
interval?: ProductItemIntervalType;
|
|
102
|
+
feature?: Feature;
|
|
96
103
|
usage_model?: UsageModel;
|
|
97
104
|
price?: number;
|
|
98
105
|
billing_units?: number;
|
|
@@ -124,10 +131,12 @@ interface Product {
|
|
|
124
131
|
free_trial: FreeTrial | null;
|
|
125
132
|
scenario?: ProductScenario;
|
|
126
133
|
base_variant_id: string | null;
|
|
127
|
-
properties
|
|
128
|
-
is_free
|
|
129
|
-
is_one_off
|
|
130
|
-
interval_group
|
|
134
|
+
properties: {
|
|
135
|
+
is_free: boolean;
|
|
136
|
+
is_one_off: boolean;
|
|
137
|
+
interval_group: string;
|
|
138
|
+
has_trial: boolean;
|
|
139
|
+
has_prepaid: boolean;
|
|
131
140
|
};
|
|
132
141
|
display?: {
|
|
133
142
|
name?: string;
|
|
@@ -204,11 +213,20 @@ interface Customer {
|
|
|
204
213
|
features: Record<string, CustomerFeature>;
|
|
205
214
|
invoices?: CustomerInvoice[];
|
|
206
215
|
}
|
|
207
|
-
|
|
208
|
-
name
|
|
209
|
-
email
|
|
210
|
-
fingerprint
|
|
211
|
-
}
|
|
216
|
+
declare const CustomerDataSchema: z.ZodObject<{
|
|
217
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
218
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
219
|
+
fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
220
|
+
}, "strip", z.ZodTypeAny, {
|
|
221
|
+
name?: string | null | undefined;
|
|
222
|
+
email?: string | null | undefined;
|
|
223
|
+
fingerprint?: string | null | undefined;
|
|
224
|
+
}, {
|
|
225
|
+
name?: string | null | undefined;
|
|
226
|
+
email?: string | null | undefined;
|
|
227
|
+
fingerprint?: string | null | undefined;
|
|
228
|
+
}>;
|
|
229
|
+
type CustomerData = z.infer<typeof CustomerDataSchema>;
|
|
212
230
|
declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
213
231
|
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
214
232
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -217,17 +235,17 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
217
235
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
218
236
|
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
|
|
219
237
|
}, "strip", z.ZodTypeAny, {
|
|
220
|
-
id?: string | null | undefined;
|
|
221
238
|
name?: string | null | undefined;
|
|
222
239
|
email?: string | null | undefined;
|
|
223
240
|
fingerprint?: string | null | undefined;
|
|
241
|
+
id?: string | null | undefined;
|
|
224
242
|
metadata?: Record<string, any> | undefined;
|
|
225
243
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
226
244
|
}, {
|
|
227
|
-
id?: string | null | undefined;
|
|
228
245
|
name?: string | null | undefined;
|
|
229
246
|
email?: string | null | undefined;
|
|
230
247
|
fingerprint?: string | null | undefined;
|
|
248
|
+
id?: string | null | undefined;
|
|
231
249
|
metadata?: Record<string, any> | undefined;
|
|
232
250
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
233
251
|
}>;
|
|
@@ -264,4 +282,4 @@ interface AutumnProviderProps {
|
|
|
264
282
|
}
|
|
265
283
|
declare const AutumnProvider: ({ customerId, customerData, authPlugin, children, }: AutumnProviderProps) => react_jsx_runtime.JSX.Element;
|
|
266
284
|
|
|
267
|
-
export { AutumnProvider as A, type BillingPortalResult as B, type CheckFeatureResult as C, type ProductItem as P, type CheckProductResult as a, type
|
|
285
|
+
export { AutumnProvider as A, type BillingPortalResult as B, type CheckFeatureResult as C, type ProductItem as P, type CheckProductResult as a, type Product as b, type ProductScenario as c, type CustomerProduct as d, type CustomerFeature as e, type CustomerInvoice as f, type CustomerData as g, type CreateCustomerParams as h, type Customer as i, type CustomerExpandOption as j };
|
|
@@ -89,10 +89,17 @@ declare enum AppEnv {
|
|
|
89
89
|
Live = "live"
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
interface Feature {
|
|
93
|
+
id: string;
|
|
94
|
+
name: string;
|
|
95
|
+
type: "boolean" | "continuous_use" | "single_use" | "credit_system";
|
|
96
|
+
}
|
|
92
97
|
interface ProductItem {
|
|
98
|
+
type?: "feature" | "priced_feature" | "price";
|
|
93
99
|
feature_id?: string;
|
|
94
100
|
included_usage?: number | typeof Infinite;
|
|
95
101
|
interval?: ProductItemIntervalType;
|
|
102
|
+
feature?: Feature;
|
|
96
103
|
usage_model?: UsageModel;
|
|
97
104
|
price?: number;
|
|
98
105
|
billing_units?: number;
|
|
@@ -124,10 +131,12 @@ interface Product {
|
|
|
124
131
|
free_trial: FreeTrial | null;
|
|
125
132
|
scenario?: ProductScenario;
|
|
126
133
|
base_variant_id: string | null;
|
|
127
|
-
properties
|
|
128
|
-
is_free
|
|
129
|
-
is_one_off
|
|
130
|
-
interval_group
|
|
134
|
+
properties: {
|
|
135
|
+
is_free: boolean;
|
|
136
|
+
is_one_off: boolean;
|
|
137
|
+
interval_group: string;
|
|
138
|
+
has_trial: boolean;
|
|
139
|
+
has_prepaid: boolean;
|
|
131
140
|
};
|
|
132
141
|
display?: {
|
|
133
142
|
name?: string;
|
|
@@ -204,11 +213,20 @@ interface Customer {
|
|
|
204
213
|
features: Record<string, CustomerFeature>;
|
|
205
214
|
invoices?: CustomerInvoice[];
|
|
206
215
|
}
|
|
207
|
-
|
|
208
|
-
name
|
|
209
|
-
email
|
|
210
|
-
fingerprint
|
|
211
|
-
}
|
|
216
|
+
declare const CustomerDataSchema: z.ZodObject<{
|
|
217
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
218
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
219
|
+
fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
220
|
+
}, "strip", z.ZodTypeAny, {
|
|
221
|
+
name?: string | null | undefined;
|
|
222
|
+
email?: string | null | undefined;
|
|
223
|
+
fingerprint?: string | null | undefined;
|
|
224
|
+
}, {
|
|
225
|
+
name?: string | null | undefined;
|
|
226
|
+
email?: string | null | undefined;
|
|
227
|
+
fingerprint?: string | null | undefined;
|
|
228
|
+
}>;
|
|
229
|
+
type CustomerData = z.infer<typeof CustomerDataSchema>;
|
|
212
230
|
declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
213
231
|
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
214
232
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -217,17 +235,17 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
217
235
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
218
236
|
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
|
|
219
237
|
}, "strip", z.ZodTypeAny, {
|
|
220
|
-
id?: string | null | undefined;
|
|
221
238
|
name?: string | null | undefined;
|
|
222
239
|
email?: string | null | undefined;
|
|
223
240
|
fingerprint?: string | null | undefined;
|
|
241
|
+
id?: string | null | undefined;
|
|
224
242
|
metadata?: Record<string, any> | undefined;
|
|
225
243
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
226
244
|
}, {
|
|
227
|
-
id?: string | null | undefined;
|
|
228
245
|
name?: string | null | undefined;
|
|
229
246
|
email?: string | null | undefined;
|
|
230
247
|
fingerprint?: string | null | undefined;
|
|
248
|
+
id?: string | null | undefined;
|
|
231
249
|
metadata?: Record<string, any> | undefined;
|
|
232
250
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
233
251
|
}>;
|
|
@@ -264,4 +282,4 @@ interface AutumnProviderProps {
|
|
|
264
282
|
}
|
|
265
283
|
declare const AutumnProvider: ({ customerId, customerData, authPlugin, children, }: AutumnProviderProps) => react_jsx_runtime.JSX.Element;
|
|
266
284
|
|
|
267
|
-
export { AutumnProvider as A, type BillingPortalResult as B, type CheckFeatureResult as C, type ProductItem as P, type CheckProductResult as a, type
|
|
285
|
+
export { AutumnProvider as A, type BillingPortalResult as B, type CheckFeatureResult as C, type ProductItem as P, type CheckProductResult as a, type Product as b, type ProductScenario as c, type CustomerProduct as d, type CustomerFeature as e, type CustomerInvoice as f, type CustomerData as g, type CreateCustomerParams as h, type Customer as i, type CustomerExpandOption as j };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { R as Result,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { R as Result, b as AutumnPromise, C as CheckResult, O as OpenBillingPortalParams, S as SetupPaymentParams, f as SetupPaymentResult, A as AttachParams, d as CancelParams, e as CancelResult, a as CheckParams, T as TrackParams, c as TrackResult } from './clientAttachTypes-fN66J754.mjs';
|
|
2
|
+
import { C as CheckoutResult, A as AttachResult } from './attachTypes-BPYeJ6E4.mjs';
|
|
3
|
+
import { P as ProductItem, f as ProductScenario, C as CustomerData, g as CreateCustomerParams, a as Customer, B as BillingPortalResult, b as Product } from './cusTypes-BoVZ2omf.mjs';
|
|
4
|
+
import { E as Entity, D as DeleteEntityResult } from './entTypes-Li6ZrG0C.mjs';
|
|
4
5
|
import { C as CreateEntityParams, G as GetEntityParams, a as CreateReferralCodeResult, R as RedeemReferralCodeResult } from './clientEntTypes-BFkleT6a.mjs';
|
|
5
|
-
import * as react from 'react';
|
|
6
6
|
import { A as AutumnError } from './error-DHbclCVh.mjs';
|
|
7
7
|
import 'zod';
|
|
8
8
|
|
|
@@ -73,7 +73,7 @@ declare class AutumnClient {
|
|
|
73
73
|
freeTrial?: boolean | undefined;
|
|
74
74
|
successUrl?: string | undefined;
|
|
75
75
|
forceCheckout?: boolean | undefined;
|
|
76
|
-
dialog?:
|
|
76
|
+
dialog?: any;
|
|
77
77
|
entityData?: any;
|
|
78
78
|
openInNewTab?: boolean | undefined;
|
|
79
79
|
reward?: string | undefined;
|
|
@@ -86,6 +86,17 @@ declare class AutumnClient {
|
|
|
86
86
|
checkout_url?: string | undefined;
|
|
87
87
|
customer_data?: any;
|
|
88
88
|
}>;
|
|
89
|
+
checkout: (params: {
|
|
90
|
+
productId: string;
|
|
91
|
+
options?: {
|
|
92
|
+
featureId: string;
|
|
93
|
+
quantity: number;
|
|
94
|
+
}[] | undefined;
|
|
95
|
+
entityId?: string | undefined;
|
|
96
|
+
successUrl?: string | undefined;
|
|
97
|
+
dialog?: any;
|
|
98
|
+
openInNewTab?: boolean | undefined;
|
|
99
|
+
}) => AutumnPromise<CheckoutResult>;
|
|
89
100
|
cancel: (params: {
|
|
90
101
|
productId: string;
|
|
91
102
|
entityId?: string | undefined;
|
|
@@ -99,7 +110,7 @@ declare class AutumnClient {
|
|
|
99
110
|
productId?: string | undefined;
|
|
100
111
|
entityId?: string | undefined;
|
|
101
112
|
featureId?: string | undefined;
|
|
102
|
-
dialog?:
|
|
113
|
+
dialog?: any;
|
|
103
114
|
entityData?: any;
|
|
104
115
|
requiredBalance?: number | undefined;
|
|
105
116
|
sendEvent?: boolean | undefined;
|
|
@@ -113,8 +124,8 @@ declare class AutumnClient {
|
|
|
113
124
|
eventName?: string | undefined;
|
|
114
125
|
idempotencyKey?: string | undefined;
|
|
115
126
|
}) => AutumnPromise<{
|
|
116
|
-
id: string;
|
|
117
127
|
code: string;
|
|
128
|
+
id: string;
|
|
118
129
|
customer_id: string;
|
|
119
130
|
feature_id?: string | undefined;
|
|
120
131
|
event_name?: string | undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { R as Result,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { R as Result, b as AutumnPromise, C as CheckResult, O as OpenBillingPortalParams, S as SetupPaymentParams, f as SetupPaymentResult, A as AttachParams, d as CancelParams, e as CancelResult, a as CheckParams, T as TrackParams, c as TrackResult } from './clientAttachTypes-Dj6U8D7o.js';
|
|
2
|
+
import { C as CheckoutResult, A as AttachResult } from './attachTypes-BL6x9Zbx.js';
|
|
3
|
+
import { P as ProductItem, f as ProductScenario, C as CustomerData, g as CreateCustomerParams, a as Customer, B as BillingPortalResult, b as Product } from './cusTypes-BoVZ2omf.js';
|
|
4
|
+
import { E as Entity, D as DeleteEntityResult } from './entTypes-BrHkjvC9.js';
|
|
4
5
|
import { C as CreateEntityParams, G as GetEntityParams, a as CreateReferralCodeResult, R as RedeemReferralCodeResult } from './clientEntTypes-BFkleT6a.js';
|
|
5
|
-
import * as react from 'react';
|
|
6
6
|
import { A as AutumnError } from './error-DHbclCVh.js';
|
|
7
7
|
import 'zod';
|
|
8
8
|
|
|
@@ -73,7 +73,7 @@ declare class AutumnClient {
|
|
|
73
73
|
freeTrial?: boolean | undefined;
|
|
74
74
|
successUrl?: string | undefined;
|
|
75
75
|
forceCheckout?: boolean | undefined;
|
|
76
|
-
dialog?:
|
|
76
|
+
dialog?: any;
|
|
77
77
|
entityData?: any;
|
|
78
78
|
openInNewTab?: boolean | undefined;
|
|
79
79
|
reward?: string | undefined;
|
|
@@ -86,6 +86,17 @@ declare class AutumnClient {
|
|
|
86
86
|
checkout_url?: string | undefined;
|
|
87
87
|
customer_data?: any;
|
|
88
88
|
}>;
|
|
89
|
+
checkout: (params: {
|
|
90
|
+
productId: string;
|
|
91
|
+
options?: {
|
|
92
|
+
featureId: string;
|
|
93
|
+
quantity: number;
|
|
94
|
+
}[] | undefined;
|
|
95
|
+
entityId?: string | undefined;
|
|
96
|
+
successUrl?: string | undefined;
|
|
97
|
+
dialog?: any;
|
|
98
|
+
openInNewTab?: boolean | undefined;
|
|
99
|
+
}) => AutumnPromise<CheckoutResult>;
|
|
89
100
|
cancel: (params: {
|
|
90
101
|
productId: string;
|
|
91
102
|
entityId?: string | undefined;
|
|
@@ -99,7 +110,7 @@ declare class AutumnClient {
|
|
|
99
110
|
productId?: string | undefined;
|
|
100
111
|
entityId?: string | undefined;
|
|
101
112
|
featureId?: string | undefined;
|
|
102
|
-
dialog?:
|
|
113
|
+
dialog?: any;
|
|
103
114
|
entityData?: any;
|
|
104
115
|
requiredBalance?: number | undefined;
|
|
105
116
|
sendEvent?: boolean | undefined;
|
|
@@ -113,8 +124,8 @@ declare class AutumnClient {
|
|
|
113
124
|
eventName?: string | undefined;
|
|
114
125
|
idempotencyKey?: string | undefined;
|
|
115
126
|
}) => AutumnPromise<{
|
|
116
|
-
id: string;
|
|
117
127
|
code: string;
|
|
128
|
+
id: string;
|
|
118
129
|
customer_id: string;
|
|
119
130
|
feature_id?: string | undefined;
|
|
120
131
|
event_name?: string | undefined;
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { AutumnClient } from "../../libraries/react/client/ReactAutumnClient";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
createCusAction,
|
|
6
|
+
createEntityAction,
|
|
7
|
+
deleteEntityAction,
|
|
8
|
+
getEntityAction
|
|
9
|
+
} from "../server/cusActions";
|
|
5
10
|
import { getPricingTableAction } from "../server/componentActions";
|
|
6
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
attachAction,
|
|
13
|
+
cancelAction,
|
|
14
|
+
checkAction,
|
|
15
|
+
getBillingPortalAction,
|
|
16
|
+
trackAction
|
|
17
|
+
} from "../server/genActions";
|
|
7
18
|
class NextAutumnClient extends AutumnClient {
|
|
8
19
|
encryptedCustomerId;
|
|
9
20
|
constructor({ encryptedCustomerId, customerData }) {
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { AutumnClient } from "../../libraries/react/client/ReactAutumnClient";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
createCusAction,
|
|
6
|
+
createEntityAction,
|
|
7
|
+
deleteEntityAction,
|
|
8
|
+
getEntityAction
|
|
9
|
+
} from "../server/cusActions";
|
|
5
10
|
import { getPricingTableAction } from "../server/componentActions";
|
|
6
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
attachAction,
|
|
13
|
+
cancelAction,
|
|
14
|
+
checkAction,
|
|
15
|
+
getBillingPortalAction,
|
|
16
|
+
trackAction
|
|
17
|
+
} from "../server/genActions";
|
|
7
18
|
class NextAutumnClient extends AutumnClient {
|
|
8
19
|
encryptedCustomerId;
|
|
9
20
|
constructor({ encryptedCustomerId, customerData }) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as CustomerData } from './cusTypes-
|
|
2
|
+
import { C as CustomerData } from './cusTypes-BoVZ2omf.mjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
declare const NextAutumnProvider: ({ encryptedCustomerId, customerData, children, }: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as CustomerData } from './cusTypes-
|
|
2
|
+
import { C as CustomerData } from './cusTypes-BoVZ2omf.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
declare const NextAutumnProvider: ({ encryptedCustomerId, customerData, children, }: {
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { P as ProductItem, b as Product } from './cusTypes-BoVZ2omf.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
declare const AttachFeatureOptionsSchema: z.ZodObject<{
|
|
5
|
+
feature_id: z.ZodString;
|
|
6
|
+
quantity: z.ZodNumber;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
quantity: number;
|
|
9
|
+
feature_id: string;
|
|
10
|
+
}, {
|
|
11
|
+
quantity: number;
|
|
12
|
+
feature_id: string;
|
|
13
|
+
}>;
|
|
14
|
+
type AttachFeatureOptions = z.infer<typeof AttachFeatureOptionsSchema>;
|
|
15
|
+
declare const AttachResultSchema: z.ZodObject<{
|
|
16
|
+
checkout_url: z.ZodOptional<z.ZodString>;
|
|
17
|
+
customer_id: z.ZodString;
|
|
18
|
+
product_ids: z.ZodArray<z.ZodString, "many">;
|
|
19
|
+
code: z.ZodString;
|
|
20
|
+
message: z.ZodString;
|
|
21
|
+
customer_data: z.ZodOptional<z.ZodAny>;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
code: string;
|
|
24
|
+
message: string;
|
|
25
|
+
customer_id: string;
|
|
26
|
+
product_ids: string[];
|
|
27
|
+
checkout_url?: string | undefined;
|
|
28
|
+
customer_data?: any;
|
|
29
|
+
}, {
|
|
30
|
+
code: string;
|
|
31
|
+
message: string;
|
|
32
|
+
customer_id: string;
|
|
33
|
+
product_ids: string[];
|
|
34
|
+
checkout_url?: string | undefined;
|
|
35
|
+
customer_data?: any;
|
|
36
|
+
}>;
|
|
37
|
+
type AttachResult = z.infer<typeof AttachResultSchema>;
|
|
38
|
+
type CheckoutResult = {
|
|
39
|
+
url?: string;
|
|
40
|
+
customer_id: string;
|
|
41
|
+
has_prorations: boolean;
|
|
42
|
+
lines: {
|
|
43
|
+
description: string;
|
|
44
|
+
amount: number;
|
|
45
|
+
item: ProductItem;
|
|
46
|
+
}[];
|
|
47
|
+
total: number;
|
|
48
|
+
currency: string;
|
|
49
|
+
options: AttachFeatureOptions[];
|
|
50
|
+
product: Product;
|
|
51
|
+
current_product: Product;
|
|
52
|
+
next_cycle?: {
|
|
53
|
+
starts_at: number;
|
|
54
|
+
total: number;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export type { AttachResult as A, CheckoutResult as C };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { P as ProductItem, b as Product } from './cusTypes-BoVZ2omf.mjs';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
declare const AttachFeatureOptionsSchema: z.ZodObject<{
|
|
5
|
+
feature_id: z.ZodString;
|
|
6
|
+
quantity: z.ZodNumber;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
quantity: number;
|
|
9
|
+
feature_id: string;
|
|
10
|
+
}, {
|
|
11
|
+
quantity: number;
|
|
12
|
+
feature_id: string;
|
|
13
|
+
}>;
|
|
14
|
+
type AttachFeatureOptions = z.infer<typeof AttachFeatureOptionsSchema>;
|
|
15
|
+
declare const AttachResultSchema: z.ZodObject<{
|
|
16
|
+
checkout_url: z.ZodOptional<z.ZodString>;
|
|
17
|
+
customer_id: z.ZodString;
|
|
18
|
+
product_ids: z.ZodArray<z.ZodString, "many">;
|
|
19
|
+
code: z.ZodString;
|
|
20
|
+
message: z.ZodString;
|
|
21
|
+
customer_data: z.ZodOptional<z.ZodAny>;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
code: string;
|
|
24
|
+
message: string;
|
|
25
|
+
customer_id: string;
|
|
26
|
+
product_ids: string[];
|
|
27
|
+
checkout_url?: string | undefined;
|
|
28
|
+
customer_data?: any;
|
|
29
|
+
}, {
|
|
30
|
+
code: string;
|
|
31
|
+
message: string;
|
|
32
|
+
customer_id: string;
|
|
33
|
+
product_ids: string[];
|
|
34
|
+
checkout_url?: string | undefined;
|
|
35
|
+
customer_data?: any;
|
|
36
|
+
}>;
|
|
37
|
+
type AttachResult = z.infer<typeof AttachResultSchema>;
|
|
38
|
+
type CheckoutResult = {
|
|
39
|
+
url?: string;
|
|
40
|
+
customer_id: string;
|
|
41
|
+
has_prorations: boolean;
|
|
42
|
+
lines: {
|
|
43
|
+
description: string;
|
|
44
|
+
amount: number;
|
|
45
|
+
item: ProductItem;
|
|
46
|
+
}[];
|
|
47
|
+
total: number;
|
|
48
|
+
currency: string;
|
|
49
|
+
options: AttachFeatureOptions[];
|
|
50
|
+
product: Product;
|
|
51
|
+
current_product: Product;
|
|
52
|
+
next_cycle?: {
|
|
53
|
+
starts_at: number;
|
|
54
|
+
total: number;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export type { AttachResult as A, CheckoutResult as C };
|