autumn-js 0.0.102 → 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-NW6B7QXB.mjs → chunk-2RZ2FZX2.mjs} +6 -6
- 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 +284 -268
- package/dist/libraries/backend/next.mjs +216 -193
- package/dist/libraries/backend/react-router.js +73 -80
- package/dist/libraries/backend/react-router.mjs +7 -7
- package/dist/libraries/backend/{referralTypes-D1Q2i3mG.d.ts → referralTypes-CnYanpMd.d.ts} +205 -104
- package/dist/libraries/backend/{referralTypes-Dfg6if8j.d.mts → referralTypes-jA7MQ1y5.d.mts} +205 -104
- 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 +5 -5
- 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 +9 -9
- package/dist/libraries/react/{ReactAutumnClient-YzfxjqPK.d.mts → ReactAutumnClient-BGI56QI_.d.mts} +21 -10
- package/dist/libraries/react/{ReactAutumnClient-DBbq29Nn.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 +10 -10
- 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-5NDO7C7R.mjs → chunk-3N6WLQH3.mjs} +1 -1
- package/dist/libraries/react/{chunk-H2NGSCWI.mjs → chunk-473LVTGN.mjs} +2 -2
- package/dist/libraries/react/{chunk-LXSKONN2.mjs → chunk-4A53GN44.mjs} +5 -5
- package/dist/libraries/react/{chunk-TPKQIL3N.mjs → chunk-4BQDSIWM.mjs} +5 -8
- package/dist/libraries/react/{chunk-X6RY6VG5.mjs → chunk-4VXBAIPC.mjs} +2 -2
- package/dist/libraries/react/{chunk-OAWFFAKA.mjs → chunk-6EZVNJHQ.mjs} +6 -6
- package/dist/libraries/react/{chunk-3VHO7VUQ.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-ALIGIMSK.mjs → chunk-E5EYSQYJ.mjs} +65 -87
- package/dist/libraries/react/{chunk-5URK7LI3.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-JI7WQ6AC.mjs → chunk-MNOH7Q3B.mjs} +2 -2
- package/dist/libraries/react/{chunk-SY5GNYZ7.mjs → chunk-P5MIFIIO.mjs} +2 -2
- package/dist/libraries/react/{chunk-T73WQC2X.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-GQ3TAHSV.mjs → chunk-ZFIJI37N.mjs} +1 -1
- package/dist/libraries/react/{chunk-CE33P32V.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 +4 -4
- 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 +28 -31
- 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 +27 -24
- 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-CFofdxsA.d.ts → cusTypes-DCeNEQLu.d.mts} +30 -12
- package/dist/libraries/react/{cusTypes-CFofdxsA.d.mts → cusTypes-DCeNEQLu.d.ts} +30 -12
- package/dist/libraries/react/{entTypes-BhUZh8uE.d.ts → entTypes-BJD_Hxbp.d.ts} +1 -1
- package/dist/libraries/react/{entTypes-BeWtfIqo.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 +8 -8
- 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 +7 -7
- 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 +9 -9
- 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 +8 -8
- 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 +9 -9
- 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 +8 -8
- 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 +7 -7
- 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 +6 -6
- package/dist/libraries/react/hooks/useProductsBase.js +63 -82
- package/dist/libraries/react/hooks/useProductsBase.mjs +5 -5
- 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-CxMWdpyl.d.ts → response-Dek2TEnE.d.ts} +2 -25
- package/dist/libraries/react/{response-AGK9KlYm.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 +25 -14
- package/dist/next/client/NextAutumnClient.d.ts +25 -14
- 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-D8f8BwMo.d.ts → clientAttachTypes-Dj6U8D7o.d.ts} +114 -96
- package/dist/next/client/{clientGenTypes-BcRfHmUS.d.mts → clientAttachTypes-fN66J754.d.mts} +114 -96
- package/dist/next/client/clientUtils.d.mts +2 -2
- package/dist/next/client/clientUtils.d.ts +2 -2
- package/dist/next/client/{cusTypes-Gh2wfcmj.d.mts → cusTypes-BoVZ2omf.d.mts} +30 -12
- package/dist/next/client/{cusTypes-Gh2wfcmj.d.ts → cusTypes-BoVZ2omf.d.ts} +30 -12
- package/dist/next/client/{entTypes-B_w6I3y-.d.ts → entTypes-BrHkjvC9.d.ts} +1 -1
- package/dist/next/client/{entTypes-C_xS1VPE.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 +12 -6
- package/dist/next/client/hooks/useEntity.d.ts +12 -6
- 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 +185 -106
- package/dist/next/server/cusActions.d.ts +185 -106
- package/dist/next/server/{cusTypes-DVA6iu7V.d.mts → cusTypes-Bh_pVAJp.d.mts} +34 -12
- package/dist/next/server/{cusTypes-DVA6iu7V.d.ts → cusTypes-Bh_pVAJp.d.ts} +34 -12
- package/dist/next/server/genActions.d.mts +3 -4
- package/dist/next/server/genActions.d.ts +3 -4
- package/dist/sdk/index.d.mts +223 -137
- package/dist/sdk/index.d.ts +223 -137
- 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 +10 -15
- package/dist/libraries/react/chunk-LKV32IPT.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
|
|
|
@@ -63,43 +63,54 @@ declare class AutumnClient {
|
|
|
63
63
|
}, AutumnError>>;
|
|
64
64
|
attach: (params: {
|
|
65
65
|
options?: {
|
|
66
|
-
quantity: number;
|
|
67
66
|
featureId: string;
|
|
67
|
+
quantity: number;
|
|
68
68
|
}[] | undefined;
|
|
69
69
|
metadata?: Record<string, string> | undefined;
|
|
70
|
-
reward?: string | undefined;
|
|
71
70
|
productId?: string | undefined;
|
|
72
71
|
entityId?: string | undefined;
|
|
73
72
|
productIds?: string[] | undefined;
|
|
74
73
|
freeTrial?: boolean | undefined;
|
|
75
74
|
successUrl?: string | undefined;
|
|
76
75
|
forceCheckout?: boolean | undefined;
|
|
77
|
-
dialog?:
|
|
76
|
+
dialog?: any;
|
|
78
77
|
entityData?: any;
|
|
79
78
|
openInNewTab?: boolean | undefined;
|
|
79
|
+
reward?: string | undefined;
|
|
80
80
|
checkoutSessionParams?: Record<string, any> | undefined;
|
|
81
81
|
}) => AutumnPromise<{
|
|
82
|
-
customer_id: string;
|
|
83
82
|
code: string;
|
|
84
83
|
message: string;
|
|
84
|
+
customer_id: string;
|
|
85
85
|
product_ids: string[];
|
|
86
|
-
customer_data?: any;
|
|
87
86
|
checkout_url?: string | undefined;
|
|
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;
|
|
92
103
|
cancelImmediately?: boolean | undefined;
|
|
93
104
|
}) => AutumnPromise<{
|
|
94
105
|
customer_id: string;
|
|
95
|
-
product_id: string;
|
|
96
106
|
success: boolean;
|
|
107
|
+
product_id: string;
|
|
97
108
|
}>;
|
|
98
109
|
check: (params: {
|
|
99
|
-
featureId?: string | undefined;
|
|
100
110
|
productId?: string | undefined;
|
|
101
111
|
entityId?: string | undefined;
|
|
102
|
-
|
|
112
|
+
featureId?: string | undefined;
|
|
113
|
+
dialog?: any;
|
|
103
114
|
entityData?: any;
|
|
104
115
|
requiredBalance?: number | undefined;
|
|
105
116
|
sendEvent?: boolean | undefined;
|
|
@@ -107,15 +118,15 @@ declare class AutumnClient {
|
|
|
107
118
|
}) => AutumnPromise<CheckResult>;
|
|
108
119
|
track: (params: {
|
|
109
120
|
value?: number | undefined;
|
|
110
|
-
featureId?: string | undefined;
|
|
111
121
|
entityId?: string | undefined;
|
|
122
|
+
featureId?: string | undefined;
|
|
112
123
|
entityData?: any;
|
|
113
124
|
eventName?: string | undefined;
|
|
114
125
|
idempotencyKey?: string | undefined;
|
|
115
126
|
}) => AutumnPromise<{
|
|
116
|
-
customer_id: string;
|
|
117
127
|
code: string;
|
|
118
128
|
id: string;
|
|
129
|
+
customer_id: string;
|
|
119
130
|
feature_id?: string | undefined;
|
|
120
131
|
event_name?: string | undefined;
|
|
121
132
|
}>;
|
|
@@ -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
|
|
|
@@ -63,43 +63,54 @@ declare class AutumnClient {
|
|
|
63
63
|
}, AutumnError>>;
|
|
64
64
|
attach: (params: {
|
|
65
65
|
options?: {
|
|
66
|
-
quantity: number;
|
|
67
66
|
featureId: string;
|
|
67
|
+
quantity: number;
|
|
68
68
|
}[] | undefined;
|
|
69
69
|
metadata?: Record<string, string> | undefined;
|
|
70
|
-
reward?: string | undefined;
|
|
71
70
|
productId?: string | undefined;
|
|
72
71
|
entityId?: string | undefined;
|
|
73
72
|
productIds?: string[] | undefined;
|
|
74
73
|
freeTrial?: boolean | undefined;
|
|
75
74
|
successUrl?: string | undefined;
|
|
76
75
|
forceCheckout?: boolean | undefined;
|
|
77
|
-
dialog?:
|
|
76
|
+
dialog?: any;
|
|
78
77
|
entityData?: any;
|
|
79
78
|
openInNewTab?: boolean | undefined;
|
|
79
|
+
reward?: string | undefined;
|
|
80
80
|
checkoutSessionParams?: Record<string, any> | undefined;
|
|
81
81
|
}) => AutumnPromise<{
|
|
82
|
-
customer_id: string;
|
|
83
82
|
code: string;
|
|
84
83
|
message: string;
|
|
84
|
+
customer_id: string;
|
|
85
85
|
product_ids: string[];
|
|
86
|
-
customer_data?: any;
|
|
87
86
|
checkout_url?: string | undefined;
|
|
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;
|
|
92
103
|
cancelImmediately?: boolean | undefined;
|
|
93
104
|
}) => AutumnPromise<{
|
|
94
105
|
customer_id: string;
|
|
95
|
-
product_id: string;
|
|
96
106
|
success: boolean;
|
|
107
|
+
product_id: string;
|
|
97
108
|
}>;
|
|
98
109
|
check: (params: {
|
|
99
|
-
featureId?: string | undefined;
|
|
100
110
|
productId?: string | undefined;
|
|
101
111
|
entityId?: string | undefined;
|
|
102
|
-
|
|
112
|
+
featureId?: string | undefined;
|
|
113
|
+
dialog?: any;
|
|
103
114
|
entityData?: any;
|
|
104
115
|
requiredBalance?: number | undefined;
|
|
105
116
|
sendEvent?: boolean | undefined;
|
|
@@ -107,15 +118,15 @@ declare class AutumnClient {
|
|
|
107
118
|
}) => AutumnPromise<CheckResult>;
|
|
108
119
|
track: (params: {
|
|
109
120
|
value?: number | undefined;
|
|
110
|
-
featureId?: string | undefined;
|
|
111
121
|
entityId?: string | undefined;
|
|
122
|
+
featureId?: string | undefined;
|
|
112
123
|
entityData?: any;
|
|
113
124
|
eventName?: string | undefined;
|
|
114
125
|
idempotencyKey?: string | undefined;
|
|
115
126
|
}) => AutumnPromise<{
|
|
116
|
-
customer_id: string;
|
|
117
127
|
code: string;
|
|
118
128
|
id: string;
|
|
129
|
+
customer_id: string;
|
|
119
130
|
feature_id?: string | undefined;
|
|
120
131
|
event_name?: string | undefined;
|
|
121
132
|
}>;
|
|
@@ -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 };
|