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
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
usePricingTableBase
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-4BQDSIWM.mjs";
|
|
6
6
|
import {
|
|
7
7
|
AutumnContext
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZFIJI37N.mjs";
|
|
9
9
|
|
|
10
10
|
// src/libraries/react/hooks/usePricingTable.tsx
|
|
11
11
|
var usePricingTable = (params) => {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
getCheckContent
|
|
5
|
-
} from "./chunk-MY2ODATB.mjs";
|
|
6
3
|
import {
|
|
7
4
|
Button
|
|
8
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EV5RNY5U.mjs";
|
|
9
6
|
import {
|
|
10
7
|
Dialog,
|
|
11
8
|
DialogContent,
|
|
12
9
|
DialogFooter,
|
|
13
10
|
DialogTitle
|
|
14
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WAFSQH6N.mjs";
|
|
12
|
+
import {
|
|
13
|
+
getCheckContent
|
|
14
|
+
} from "./chunk-MY2ODATB.mjs";
|
|
15
15
|
import {
|
|
16
16
|
cn
|
|
17
17
|
} from "./chunk-4J6OC4ZQ.mjs";
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
useAutumnContext
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZFIJI37N.mjs";
|
|
6
6
|
import {
|
|
7
7
|
AutumnError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-E5EYSQYJ.mjs";
|
|
9
9
|
|
|
10
10
|
// src/libraries/react/hooks/usePricingTableBase.tsx
|
|
11
11
|
import useSWR from "swr";
|
|
@@ -169,15 +169,13 @@ var defaultSWRConfig = {
|
|
|
169
169
|
};
|
|
170
170
|
var usePricingTableBase = ({
|
|
171
171
|
AutumnContext,
|
|
172
|
-
params
|
|
173
|
-
authClient
|
|
172
|
+
params
|
|
174
173
|
}) => {
|
|
175
174
|
const context = useAutumnContext({
|
|
176
175
|
AutumnContext,
|
|
177
|
-
name: "usePricingTable"
|
|
178
|
-
errorIfNotInitialized: !authClient
|
|
176
|
+
name: "usePricingTable"
|
|
179
177
|
});
|
|
180
|
-
const client =
|
|
178
|
+
const client = context.client;
|
|
181
179
|
const fetcher = async () => {
|
|
182
180
|
try {
|
|
183
181
|
const { data: data2, error: error2 } = await client.products.list();
|
|
@@ -197,7 +195,6 @@ var usePricingTableBase = ({
|
|
|
197
195
|
);
|
|
198
196
|
return {
|
|
199
197
|
products: mergeProductDetails(data || [], params?.productDetails),
|
|
200
|
-
// products: data || [],
|
|
201
198
|
isLoading: !error && !data,
|
|
202
199
|
error,
|
|
203
200
|
refetch: mutate
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
useAutumnBase
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZITEHPEQ.mjs";
|
|
6
6
|
import {
|
|
7
7
|
AutumnContext
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZFIJI37N.mjs";
|
|
9
9
|
|
|
10
10
|
// src/libraries/react/hooks/useAutumn.tsx
|
|
11
11
|
var useAutumn = () => {
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
createContextScope,
|
|
7
7
|
useControllableState,
|
|
8
8
|
useLayoutEffect2
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KWNH6C27.mjs";
|
|
10
10
|
import {
|
|
11
11
|
useComposedRefs
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RPEGNKJH.mjs";
|
|
13
13
|
import {
|
|
14
14
|
cn
|
|
15
15
|
} from "./chunk-4J6OC4ZQ.mjs";
|
|
@@ -17,10 +17,10 @@ import {
|
|
|
17
17
|
// src/libraries/react/components/ui/switch.tsx
|
|
18
18
|
import * as React4 from "react";
|
|
19
19
|
|
|
20
|
-
// ../node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.6_@types+react@
|
|
20
|
+
// ../node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.6_@types+react@19.1.8__@types+react@19.1.8_uhx276sbw7dr3tfricp4xfbxsq/node_modules/@radix-ui/react-switch/dist/index.mjs
|
|
21
21
|
import * as React3 from "react";
|
|
22
22
|
|
|
23
|
-
// ../node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@
|
|
23
|
+
// ../node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.8_react@19.1.0/node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
|
24
24
|
import * as React from "react";
|
|
25
25
|
function usePrevious(value) {
|
|
26
26
|
const ref = React.useRef({ value, previous: value });
|
|
@@ -33,7 +33,7 @@ function usePrevious(value) {
|
|
|
33
33
|
}, [value]);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
// ../node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@
|
|
36
|
+
// ../node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.8_react@19.1.0/node_modules/@radix-ui/react-use-size/dist/index.mjs
|
|
37
37
|
import * as React2 from "react";
|
|
38
38
|
function useSize(element) {
|
|
39
39
|
const [size, setSize] = React2.useState(void 0);
|
|
@@ -70,7 +70,7 @@ function useSize(element) {
|
|
|
70
70
|
return size;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
// ../node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.6_@types+react@
|
|
73
|
+
// ../node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.6_@types+react@19.1.8__@types+react@19.1.8_uhx276sbw7dr3tfricp4xfbxsq/node_modules/@radix-ui/react-switch/dist/index.mjs
|
|
74
74
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
75
75
|
var SWITCH_NAME = "Switch";
|
|
76
76
|
var [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
} from "./chunk-3JJC2VU5.mjs";
|
|
6
6
|
import {
|
|
7
7
|
useAutumnBase
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZITEHPEQ.mjs";
|
|
9
9
|
import {
|
|
10
10
|
useAutumnContext
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZFIJI37N.mjs";
|
|
12
12
|
|
|
13
13
|
// src/libraries/react/hooks/useCustomerBase.tsx
|
|
14
14
|
import useSWR from "swr";
|
|
@@ -18,7 +18,8 @@ var emptyDefaultFunctions = {
|
|
|
18
18
|
track: "",
|
|
19
19
|
cancel: "",
|
|
20
20
|
openBillingPortal: "",
|
|
21
|
-
setupPayment: ""
|
|
21
|
+
setupPayment: "",
|
|
22
|
+
checkout: ""
|
|
22
23
|
};
|
|
23
24
|
var useCustomerBase = ({
|
|
24
25
|
params,
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
// src/libraries/react/components/pricing-table/lib/pricing-table-content.tsx
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
var getPricingTableContent = (product) => {
|
|
7
|
-
const { scenario, free_trial } = product;
|
|
8
|
-
|
|
7
|
+
const { scenario, free_trial, properties } = product;
|
|
8
|
+
const { is_one_off, has_prepaid, has_trial } = properties;
|
|
9
|
+
if (has_trial) {
|
|
9
10
|
return {
|
|
10
11
|
buttonText: /* @__PURE__ */ jsx("p", { children: "Start Free Trial" })
|
|
11
12
|
};
|
|
@@ -16,19 +17,23 @@ var getPricingTableContent = (product) => {
|
|
|
16
17
|
buttonText: /* @__PURE__ */ jsx("p", { children: "Plan Scheduled" })
|
|
17
18
|
};
|
|
18
19
|
case "active":
|
|
20
|
+
if (has_prepaid) {
|
|
21
|
+
return {
|
|
22
|
+
buttonText: /* @__PURE__ */ jsx("p", { children: "Update Plan" })
|
|
23
|
+
};
|
|
24
|
+
}
|
|
19
25
|
return {
|
|
20
26
|
buttonText: /* @__PURE__ */ jsx("p", { children: "Current Plan" })
|
|
21
27
|
};
|
|
22
28
|
case "new":
|
|
23
|
-
if (
|
|
29
|
+
if (is_one_off) {
|
|
24
30
|
return {
|
|
25
31
|
buttonText: /* @__PURE__ */ jsx("p", { children: "Purchase" })
|
|
26
32
|
};
|
|
27
|
-
} else {
|
|
28
|
-
return {
|
|
29
|
-
buttonText: /* @__PURE__ */ jsx("p", { children: "Get started" })
|
|
30
|
-
};
|
|
31
33
|
}
|
|
34
|
+
return {
|
|
35
|
+
buttonText: /* @__PURE__ */ jsx("p", { children: "Get started" })
|
|
36
|
+
};
|
|
32
37
|
case "renew":
|
|
33
38
|
return {
|
|
34
39
|
buttonText: /* @__PURE__ */ jsx("p", { children: "Renew" })
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
cn
|
|
5
|
+
} from "./chunk-4J6OC4ZQ.mjs";
|
|
6
|
+
|
|
7
|
+
// src/libraries/react/components/ui/accordion.tsx
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
10
|
+
|
|
11
|
+
// ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.0/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
12
|
+
import { forwardRef as forwardRef2, createElement as createElement2 } from "react";
|
|
13
|
+
|
|
14
|
+
// ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.0/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
15
|
+
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
16
|
+
var toCamelCase = (string) => string.replace(
|
|
17
|
+
/^([A-Z])|[\s-_]+(\w)/g,
|
|
18
|
+
(match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
|
|
19
|
+
);
|
|
20
|
+
var toPascalCase = (string) => {
|
|
21
|
+
const camelCase = toCamelCase(string);
|
|
22
|
+
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
23
|
+
};
|
|
24
|
+
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
25
|
+
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
|
|
26
|
+
}).join(" ").trim();
|
|
27
|
+
var hasA11yProp = (props) => {
|
|
28
|
+
for (const prop in props) {
|
|
29
|
+
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.0/node_modules/lucide-react/dist/esm/Icon.js
|
|
36
|
+
import { forwardRef, createElement } from "react";
|
|
37
|
+
|
|
38
|
+
// ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.0/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
39
|
+
var defaultAttributes = {
|
|
40
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
41
|
+
width: 24,
|
|
42
|
+
height: 24,
|
|
43
|
+
viewBox: "0 0 24 24",
|
|
44
|
+
fill: "none",
|
|
45
|
+
stroke: "currentColor",
|
|
46
|
+
strokeWidth: 2,
|
|
47
|
+
strokeLinecap: "round",
|
|
48
|
+
strokeLinejoin: "round"
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
// ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.0/node_modules/lucide-react/dist/esm/Icon.js
|
|
52
|
+
var Icon = forwardRef(
|
|
53
|
+
({
|
|
54
|
+
color = "currentColor",
|
|
55
|
+
size = 24,
|
|
56
|
+
strokeWidth = 2,
|
|
57
|
+
absoluteStrokeWidth,
|
|
58
|
+
className = "",
|
|
59
|
+
children,
|
|
60
|
+
iconNode,
|
|
61
|
+
...rest
|
|
62
|
+
}, ref) => createElement(
|
|
63
|
+
"svg",
|
|
64
|
+
{
|
|
65
|
+
ref,
|
|
66
|
+
...defaultAttributes,
|
|
67
|
+
width: size,
|
|
68
|
+
height: size,
|
|
69
|
+
stroke: color,
|
|
70
|
+
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
|
|
71
|
+
className: mergeClasses("lucide", className),
|
|
72
|
+
...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
|
|
73
|
+
...rest
|
|
74
|
+
},
|
|
75
|
+
[
|
|
76
|
+
...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),
|
|
77
|
+
...Array.isArray(children) ? children : [children]
|
|
78
|
+
]
|
|
79
|
+
)
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
// ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.0/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
83
|
+
var createLucideIcon = (iconName, iconNode) => {
|
|
84
|
+
const Component = forwardRef2(
|
|
85
|
+
({ className, ...props }, ref) => createElement2(Icon, {
|
|
86
|
+
ref,
|
|
87
|
+
iconNode,
|
|
88
|
+
className: mergeClasses(
|
|
89
|
+
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
|
90
|
+
`lucide-${iconName}`,
|
|
91
|
+
className
|
|
92
|
+
),
|
|
93
|
+
...props
|
|
94
|
+
})
|
|
95
|
+
);
|
|
96
|
+
Component.displayName = toPascalCase(iconName);
|
|
97
|
+
return Component;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
// ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/arrow-right.js
|
|
101
|
+
var __iconNode = [
|
|
102
|
+
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
103
|
+
["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
|
|
104
|
+
];
|
|
105
|
+
var ArrowRight = createLucideIcon("arrow-right", __iconNode);
|
|
106
|
+
|
|
107
|
+
// ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/chevron-down.js
|
|
108
|
+
var __iconNode2 = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
109
|
+
var ChevronDown = createLucideIcon("chevron-down", __iconNode2);
|
|
110
|
+
|
|
111
|
+
// ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/loader-circle.js
|
|
112
|
+
var __iconNode3 = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
|
|
113
|
+
var LoaderCircle = createLucideIcon("loader-circle", __iconNode3);
|
|
114
|
+
|
|
115
|
+
// src/libraries/react/components/ui/accordion.tsx
|
|
116
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
117
|
+
var Accordion = AccordionPrimitive.Root;
|
|
118
|
+
var AccordionItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
119
|
+
AccordionPrimitive.Item,
|
|
120
|
+
{
|
|
121
|
+
ref,
|
|
122
|
+
className: cn("au-border-b", className),
|
|
123
|
+
...props
|
|
124
|
+
}
|
|
125
|
+
));
|
|
126
|
+
AccordionItem.displayName = "AccordionItem";
|
|
127
|
+
var AccordionTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "au-flex", children: /* @__PURE__ */ jsxs(
|
|
128
|
+
AccordionPrimitive.Trigger,
|
|
129
|
+
{
|
|
130
|
+
ref,
|
|
131
|
+
className: cn(
|
|
132
|
+
"au-flex au-flex-1 au-items-center au-justify-between au-py-4 au-text-sm au-font-medium au-transition-all hover:au-underline au-text-left [&[data-state=open]>svg]:au-rotate-180",
|
|
133
|
+
className
|
|
134
|
+
),
|
|
135
|
+
...props,
|
|
136
|
+
children: [
|
|
137
|
+
children,
|
|
138
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "au-h-4 au-w-4 au-shrink-0 au-text-muted-foreground au-transition-transform au-duration-200" })
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
) }));
|
|
142
|
+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
143
|
+
var AccordionContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
144
|
+
AccordionPrimitive.Content,
|
|
145
|
+
{
|
|
146
|
+
ref,
|
|
147
|
+
className: "au-overflow-hidden au-text-sm data-[state=closed]:au-animate-accordion-up data-[state=open]:au-animate-accordion-down",
|
|
148
|
+
...props,
|
|
149
|
+
children: /* @__PURE__ */ jsx("div", { className: cn("au-pb-4 au-pt-0", className), children })
|
|
150
|
+
}
|
|
151
|
+
));
|
|
152
|
+
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
153
|
+
|
|
154
|
+
export {
|
|
155
|
+
ArrowRight,
|
|
156
|
+
ChevronDown,
|
|
157
|
+
LoaderCircle,
|
|
158
|
+
Accordion,
|
|
159
|
+
AccordionItem,
|
|
160
|
+
AccordionTrigger,
|
|
161
|
+
AccordionContent
|
|
162
|
+
};
|
|
163
|
+
/*! Bundled license information:
|
|
164
|
+
|
|
165
|
+
lucide-react/dist/esm/shared/src/utils.js:
|
|
166
|
+
lucide-react/dist/esm/defaultAttributes.js:
|
|
167
|
+
lucide-react/dist/esm/Icon.js:
|
|
168
|
+
lucide-react/dist/esm/createLucideIcon.js:
|
|
169
|
+
lucide-react/dist/esm/icons/arrow-right.js:
|
|
170
|
+
lucide-react/dist/esm/icons/chevron-down.js:
|
|
171
|
+
lucide-react/dist/esm/icons/loader-circle.js:
|
|
172
|
+
lucide-react/dist/esm/lucide-react.js:
|
|
173
|
+
(**
|
|
174
|
+
* @license lucide-react v0.523.0 - ISC
|
|
175
|
+
*
|
|
176
|
+
* This source code is licensed under the ISC license.
|
|
177
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
178
|
+
*)
|
|
179
|
+
*/
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
cn
|
|
5
|
+
} from "./chunk-4J6OC4ZQ.mjs";
|
|
6
|
+
|
|
7
|
+
// src/libraries/react/components/ui/popover.tsx
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
10
|
+
import { jsx } from "react/jsx-runtime";
|
|
11
|
+
var Popover = PopoverPrimitive.Root;
|
|
12
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
13
|
+
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
14
|
+
var PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
15
|
+
PopoverPrimitive.Content,
|
|
16
|
+
{
|
|
17
|
+
ref,
|
|
18
|
+
align,
|
|
19
|
+
sideOffset,
|
|
20
|
+
className: cn(
|
|
21
|
+
"au-z-50 au-w-72 au-rounded-md au-border au-bg-popover au-p-4 au-text-popover-foreground au-shadow-md au-outline-none data-[state=open]:au-animate-in data-[state=closed]:au-animate-out data-[state=closed]:au-fade-out-0 data-[state=open]:au-fade-in-0 data-[state=closed]:au-zoom-out-95 data-[state=open]:au-zoom-in-95 data-[side=bottom]:au-slide-in-from-top-2 data-[side=left]:au-slide-in-from-right-2 data-[side=right]:au-slide-in-from-left-2 data-[side=top]:au-slide-in-from-bottom-2 au-origin-[--radix-popover-content-transform-origin]",
|
|
22
|
+
className
|
|
23
|
+
),
|
|
24
|
+
...props
|
|
25
|
+
}
|
|
26
|
+
) }));
|
|
27
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
28
|
+
|
|
29
|
+
export {
|
|
30
|
+
Popover,
|
|
31
|
+
PopoverTrigger,
|
|
32
|
+
PopoverAnchor,
|
|
33
|
+
PopoverContent
|
|
34
|
+
};
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
+
import {
|
|
4
|
+
logAuthError
|
|
5
|
+
} from "./chunk-JVCOY7ZL.mjs";
|
|
6
|
+
import {
|
|
7
|
+
logFetchError
|
|
8
|
+
} from "./chunk-CIBQ4BJU.mjs";
|
|
3
9
|
import {
|
|
4
10
|
listProductsMethod
|
|
5
11
|
} from "./chunk-V575SGOW.mjs";
|
|
@@ -7,12 +13,6 @@ import {
|
|
|
7
13
|
createCode,
|
|
8
14
|
redeemCode
|
|
9
15
|
} from "./chunk-ZV4RPZTM.mjs";
|
|
10
|
-
import {
|
|
11
|
-
logAuthError
|
|
12
|
-
} from "./chunk-JVCOY7ZL.mjs";
|
|
13
|
-
import {
|
|
14
|
-
logFetchError
|
|
15
|
-
} from "./chunk-CIBQ4BJU.mjs";
|
|
16
16
|
import {
|
|
17
17
|
getPricingTableMethod
|
|
18
18
|
} from "./chunk-VTGR7VVK.mjs";
|
|
@@ -28,10 +28,11 @@ import {
|
|
|
28
28
|
attachMethod,
|
|
29
29
|
cancelMethod,
|
|
30
30
|
checkMethod,
|
|
31
|
+
checkoutMethod,
|
|
31
32
|
openBillingPortalMethod,
|
|
32
33
|
setupPaymentMethod,
|
|
33
34
|
trackMethod
|
|
34
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-253MTZP3.mjs";
|
|
35
36
|
|
|
36
37
|
// src/sdk/error.ts
|
|
37
38
|
var AutumnError = class _AutumnError extends Error {
|
|
@@ -60,6 +61,12 @@ var AutumnError = class _AutumnError extends Error {
|
|
|
60
61
|
};
|
|
61
62
|
|
|
62
63
|
// src/sdk/general/genMethods.ts
|
|
64
|
+
var handleCheckout = async ({
|
|
65
|
+
instance,
|
|
66
|
+
params
|
|
67
|
+
}) => {
|
|
68
|
+
return instance.post("/checkout", params);
|
|
69
|
+
};
|
|
63
70
|
var handleAttach = async ({
|
|
64
71
|
instance,
|
|
65
72
|
params
|
|
@@ -78,18 +85,6 @@ var handleCancel = async ({
|
|
|
78
85
|
}) => {
|
|
79
86
|
return instance.post("/cancel", params);
|
|
80
87
|
};
|
|
81
|
-
var handleEntitled = async ({
|
|
82
|
-
instance,
|
|
83
|
-
params
|
|
84
|
-
}) => {
|
|
85
|
-
return instance.post("/entitled", params);
|
|
86
|
-
};
|
|
87
|
-
var handleEvent = async ({
|
|
88
|
-
instance,
|
|
89
|
-
params
|
|
90
|
-
}) => {
|
|
91
|
-
return instance.post("/events", params);
|
|
92
|
-
};
|
|
93
88
|
var handleTrack = async ({
|
|
94
89
|
instance,
|
|
95
90
|
params
|
|
@@ -436,6 +431,13 @@ var Autumn = class {
|
|
|
436
431
|
products = productMethods(this);
|
|
437
432
|
entities = entityMethods(this);
|
|
438
433
|
referrals = referralMethods(this);
|
|
434
|
+
static checkout = (params) => staticWrapper(handleCheckout, void 0, { params });
|
|
435
|
+
async checkout(params) {
|
|
436
|
+
return handleCheckout({
|
|
437
|
+
instance: this,
|
|
438
|
+
params
|
|
439
|
+
});
|
|
440
|
+
}
|
|
439
441
|
static attach = (params) => staticWrapper(handleAttach, void 0, { params });
|
|
440
442
|
static usage = (params) => staticWrapper(handleUsage, void 0, { params });
|
|
441
443
|
async attach(params) {
|
|
@@ -458,21 +460,6 @@ var Autumn = class {
|
|
|
458
460
|
params
|
|
459
461
|
});
|
|
460
462
|
}
|
|
461
|
-
/**
|
|
462
|
-
* @deprecated This method is deprecated and will be removed in a future version.
|
|
463
|
-
* Please use the new check() method instead.
|
|
464
|
-
*/
|
|
465
|
-
static entitled = (params) => staticWrapper(handleEntitled, void 0, { params });
|
|
466
|
-
/**
|
|
467
|
-
* @deprecated This method is deprecated and will be removed in a future version.
|
|
468
|
-
* Please use the new check() method instead.
|
|
469
|
-
*/
|
|
470
|
-
async entitled(params) {
|
|
471
|
-
return handleEntitled({
|
|
472
|
-
instance: this,
|
|
473
|
-
params
|
|
474
|
-
});
|
|
475
|
-
}
|
|
476
463
|
static check = (params) => staticWrapper(handleCheck, void 0, { params });
|
|
477
464
|
async check(params) {
|
|
478
465
|
return handleCheck({
|
|
@@ -480,21 +467,6 @@ var Autumn = class {
|
|
|
480
467
|
params
|
|
481
468
|
});
|
|
482
469
|
}
|
|
483
|
-
/**
|
|
484
|
-
* @deprecated This method is deprecated and will be removed in a future version.
|
|
485
|
-
* Please use the new track() method instead.
|
|
486
|
-
*/
|
|
487
|
-
static event = (params) => staticWrapper(handleEvent, void 0, { params });
|
|
488
|
-
/**
|
|
489
|
-
* @deprecated This method is deprecated and will be removed in a future version.
|
|
490
|
-
* Please use the new track() method instead.
|
|
491
|
-
*/
|
|
492
|
-
async event(params) {
|
|
493
|
-
return handleEvent({
|
|
494
|
-
instance: this,
|
|
495
|
-
params
|
|
496
|
-
});
|
|
497
|
-
}
|
|
498
470
|
static track = (params) => staticWrapper(handleTrack, void 0, { params });
|
|
499
471
|
async track(params) {
|
|
500
472
|
return handleTrack({
|
|
@@ -519,44 +491,6 @@ var EntityDataSchema = z.object({
|
|
|
519
491
|
|
|
520
492
|
// src/sdk/general/genTypes.ts
|
|
521
493
|
import { z as z2 } from "zod";
|
|
522
|
-
var AttachFeatureOptionsSchema = z2.object({
|
|
523
|
-
feature_id: z2.string(),
|
|
524
|
-
quantity: z2.number()
|
|
525
|
-
});
|
|
526
|
-
var AttachParamsSchema = z2.object({
|
|
527
|
-
customer_id: z2.string(),
|
|
528
|
-
product_id: z2.string().optional(),
|
|
529
|
-
entity_id: z2.string().optional(),
|
|
530
|
-
options: z2.array(
|
|
531
|
-
z2.object({
|
|
532
|
-
feature_id: z2.string(),
|
|
533
|
-
quantity: z2.number()
|
|
534
|
-
})
|
|
535
|
-
).optional(),
|
|
536
|
-
product_ids: z2.array(z2.string()).optional(),
|
|
537
|
-
// If set, will attach multiple products to the customer (cannot be used with product_id)
|
|
538
|
-
free_trial: z2.boolean().optional(),
|
|
539
|
-
// Default is true -- if set to false, will bypass product free trial
|
|
540
|
-
success_url: z2.string().optional(),
|
|
541
|
-
// Passed to Stripe
|
|
542
|
-
metadata: z2.record(z2.string()).optional(),
|
|
543
|
-
// Passed to Stripe
|
|
544
|
-
force_checkout: z2.boolean().optional(),
|
|
545
|
-
// Default is false -- if set to true, will force the customer to checkout (not allowed for upgrades / downgrades)
|
|
546
|
-
customer_data: z2.any().optional(),
|
|
547
|
-
entity_data: z2.any().optional(),
|
|
548
|
-
checkout_session_params: z2.record(z2.any()).optional(),
|
|
549
|
-
// Passed to Stripe
|
|
550
|
-
reward: z2.string().optional()
|
|
551
|
-
});
|
|
552
|
-
var AttachResultSchema = z2.object({
|
|
553
|
-
checkout_url: z2.string().optional(),
|
|
554
|
-
customer_id: z2.string(),
|
|
555
|
-
product_ids: z2.array(z2.string()),
|
|
556
|
-
code: z2.string(),
|
|
557
|
-
message: z2.string(),
|
|
558
|
-
customer_data: z2.any().optional()
|
|
559
|
-
});
|
|
560
494
|
var CancelParamsSchema = z2.object({
|
|
561
495
|
customer_id: z2.string(),
|
|
562
496
|
product_id: z2.string(),
|
|
@@ -610,6 +544,11 @@ var CustomerExpandEnum = z3.enum([
|
|
|
610
544
|
|
|
611
545
|
// src/sdk/customers/cusTypes.ts
|
|
612
546
|
import { z as z4 } from "zod";
|
|
547
|
+
var CustomerDataSchema = z4.object({
|
|
548
|
+
name: z4.string().nullish(),
|
|
549
|
+
email: z4.string().nullish(),
|
|
550
|
+
fingerprint: z4.string().nullish()
|
|
551
|
+
});
|
|
613
552
|
var CreateCustomerParamsSchema = z4.object({
|
|
614
553
|
id: z4.string().nullish(),
|
|
615
554
|
email: z4.string().nullish(),
|
|
@@ -633,6 +572,44 @@ var RedeemReferralCodeParamsSchema = z5.object({
|
|
|
633
572
|
customer_id: z5.string()
|
|
634
573
|
});
|
|
635
574
|
|
|
575
|
+
// src/sdk/general/attachTypes.ts
|
|
576
|
+
import { z as z6 } from "zod";
|
|
577
|
+
var AttachFeatureOptionsSchema = z6.object({
|
|
578
|
+
feature_id: z6.string(),
|
|
579
|
+
quantity: z6.number()
|
|
580
|
+
});
|
|
581
|
+
var AttachParamsSchema = z6.object({
|
|
582
|
+
customer_id: z6.string(),
|
|
583
|
+
product_id: z6.string().optional(),
|
|
584
|
+
entity_id: z6.string().optional(),
|
|
585
|
+
options: z6.array(AttachFeatureOptionsSchema).optional(),
|
|
586
|
+
product_ids: z6.array(z6.string()).optional(),
|
|
587
|
+
free_trial: z6.boolean().optional(),
|
|
588
|
+
success_url: z6.string().optional(),
|
|
589
|
+
metadata: z6.record(z6.string()).optional(),
|
|
590
|
+
force_checkout: z6.boolean().optional(),
|
|
591
|
+
customer_data: CustomerDataSchema.optional(),
|
|
592
|
+
entity_data: z6.any().optional(),
|
|
593
|
+
checkout_session_params: z6.record(z6.any()).optional(),
|
|
594
|
+
reward: z6.string().optional()
|
|
595
|
+
});
|
|
596
|
+
var AttachResultSchema = z6.object({
|
|
597
|
+
checkout_url: z6.string().optional(),
|
|
598
|
+
customer_id: z6.string(),
|
|
599
|
+
product_ids: z6.array(z6.string()),
|
|
600
|
+
code: z6.string(),
|
|
601
|
+
message: z6.string(),
|
|
602
|
+
customer_data: z6.any().optional()
|
|
603
|
+
});
|
|
604
|
+
var CheckoutParamsSchema = z6.object({
|
|
605
|
+
customer_id: z6.string(),
|
|
606
|
+
product_id: z6.string(),
|
|
607
|
+
entity_id: z6.string().optional(),
|
|
608
|
+
success_url: z6.string().optional(),
|
|
609
|
+
customer_data: CustomerDataSchema.optional(),
|
|
610
|
+
options: z6.array(AttachFeatureOptionsSchema).optional()
|
|
611
|
+
});
|
|
612
|
+
|
|
636
613
|
// src/libraries/react/client/ReactAutumnClient.tsx
|
|
637
614
|
var AutumnClient = class {
|
|
638
615
|
backendUrl;
|
|
@@ -791,6 +768,7 @@ var AutumnClient = class {
|
|
|
791
768
|
return await getPricingTableMethod.bind(this)();
|
|
792
769
|
}
|
|
793
770
|
attach = attachMethod.bind(this);
|
|
771
|
+
checkout = checkoutMethod.bind(this);
|
|
794
772
|
cancel = cancelMethod.bind(this);
|
|
795
773
|
check = checkMethod.bind(this);
|
|
796
774
|
track = trackMethod.bind(this);
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
BaseAutumnProvider
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3N6WLQH3.mjs";
|
|
6
6
|
import {
|
|
7
7
|
AutumnContext
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZFIJI37N.mjs";
|
|
9
9
|
import {
|
|
10
10
|
AutumnClient
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-E5EYSQYJ.mjs";
|
|
12
12
|
|
|
13
13
|
// src/libraries/react/ReactAutumnProvider.tsx
|
|
14
14
|
import { jsx } from "react/jsx-runtime";
|