autumn-js 0.0.83 → 0.0.92-beta.1
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 +764 -4
- package/dist/libraries/backend/better-auth.d.ts +764 -4
- package/dist/libraries/backend/better-auth.js +341 -19184
- package/dist/libraries/backend/better-auth.mjs +232 -19135
- package/dist/libraries/backend/{chunk-XGB3TDIC.mjs → chunk-6DZX6EAA.mjs} +0 -5
- package/dist/libraries/backend/{chunk-J3QM5KFT.mjs → chunk-7QSJB2C5.mjs} +1 -1
- package/dist/libraries/backend/{chunk-UJQBHXII.mjs → chunk-FCEB2GBS.mjs} +1 -1
- package/dist/libraries/backend/{chunk-A46IKTLH.mjs → chunk-JPNRDMMC.mjs} +1 -1
- package/dist/libraries/backend/{chunk-52OTZ4SQ.mjs → chunk-NTFR7Z2G.mjs} +8 -8
- package/dist/libraries/backend/{chunk-DG3FZZQH.mjs → chunk-U7335VZS.mjs} +1 -1
- package/dist/libraries/backend/{chunk-VCEQ3QBX.mjs → chunk-V6M7KRGN.mjs} +57 -0
- package/dist/libraries/backend/{chunk-WDRHQJKV.mjs → chunk-VFTHGJ5N.mjs} +1 -1
- package/dist/libraries/backend/constants.mjs +1 -1
- package/dist/libraries/backend/convex.d.mts +10 -0
- package/dist/libraries/backend/convex.d.ts +10 -0
- package/dist/libraries/backend/convex.js +1045 -0
- package/dist/libraries/backend/convex.mjs +80 -0
- package/dist/libraries/backend/express.d.mts +2 -1
- package/dist/libraries/backend/express.d.ts +2 -1
- package/dist/libraries/backend/express.js +57 -0
- package/dist/libraries/backend/express.mjs +8 -8
- package/dist/libraries/backend/fastify.js +57 -0
- package/dist/libraries/backend/fastify.mjs +8 -8
- package/dist/libraries/backend/hono.js +57 -0
- package/dist/libraries/backend/hono.mjs +8 -8
- package/dist/libraries/backend/next.js +59 -2
- package/dist/libraries/backend/next.mjs +8 -8
- package/dist/libraries/backend/react-router.js +57 -0
- package/dist/libraries/backend/react-router.mjs +8 -8
- package/dist/libraries/backend/{referralTypes-BZ4WOVK5.d.ts → referralTypes-BAYl5TR1.d.ts} +101 -36
- package/dist/libraries/backend/{referralTypes-C6ao6j-_.d.mts → referralTypes-ecz_wESO.d.mts} +101 -36
- package/dist/libraries/backend/remix_dep.js +57 -0
- package/dist/libraries/backend/remix_dep.mjs +8 -8
- package/dist/libraries/backend/routes/backendRouter.js +57 -0
- package/dist/libraries/backend/routes/backendRouter.mjs +8 -8
- package/dist/libraries/backend/routes/entityRoutes.js +57 -0
- package/dist/libraries/backend/routes/entityRoutes.mjs +4 -4
- package/dist/libraries/backend/routes/genRoutes.js +57 -0
- package/dist/libraries/backend/routes/genRoutes.mjs +4 -4
- package/dist/libraries/backend/routes/productRoutes.js +57 -0
- package/dist/libraries/backend/routes/productRoutes.mjs +4 -4
- package/dist/libraries/backend/routes/referralRoutes.js +57 -0
- package/dist/libraries/backend/routes/referralRoutes.mjs +4 -4
- package/dist/libraries/backend/schemas/zod.d.mts +208 -0
- package/dist/libraries/backend/schemas/zod.d.ts +208 -0
- package/dist/libraries/backend/schemas/zod.js +100 -0
- package/dist/libraries/backend/schemas/zod.mjs +69 -0
- package/dist/libraries/backend/supabase.js +57 -0
- package/dist/libraries/backend/supabase.mjs +8 -8
- package/dist/libraries/backend/tanstack.js +57 -0
- package/dist/libraries/backend/tanstack.mjs +8 -8
- package/dist/libraries/backend/utils/backendRes.js +57 -0
- package/dist/libraries/backend/utils/backendRes.mjs +2 -2
- package/dist/libraries/backend/utils/logBackendErrors.mjs +1 -1
- package/dist/libraries/backend/utils/secretKeyCheck.mjs +1 -1
- package/dist/libraries/backend/utils/withAuth.d.mts +2 -1
- package/dist/libraries/backend/utils/withAuth.d.ts +2 -1
- package/dist/libraries/backend/utils/withAuth.js +57 -0
- package/dist/libraries/backend/utils/withAuth.mjs +3 -3
- package/dist/libraries/react/AutumnContext.d.mts +7 -6
- package/dist/libraries/react/AutumnContext.d.ts +7 -6
- package/dist/libraries/react/AutumnContext.js +59 -4
- package/dist/libraries/react/AutumnContext.mjs +2 -2
- package/dist/libraries/react/BaseAutumnProvider.d.mts +6 -7
- package/dist/libraries/react/BaseAutumnProvider.d.ts +6 -7
- package/dist/libraries/react/BaseAutumnProvider.js +149 -32
- package/dist/libraries/react/BaseAutumnProvider.mjs +7 -7
- package/dist/libraries/react/{ReactAutumnClient-DS-MPWXt.d.ts → ReactAutumnClient-BTNcA_3b.d.ts} +59 -11
- package/dist/libraries/react/{ReactAutumnClient-Cj2h9TXJ.d.mts → ReactAutumnClient-BiipnfQn.d.mts} +59 -11
- package/dist/libraries/react/ReactAutumnProvider.d.mts +3 -3
- package/dist/libraries/react/ReactAutumnProvider.d.ts +3 -3
- package/dist/libraries/react/ReactAutumnProvider.js +160 -46
- package/dist/libraries/react/ReactAutumnProvider.mjs +8 -8
- package/dist/libraries/react/{chunk-JFXBUWKA.mjs → chunk-3JJC2VU5.mjs} +22 -5
- package/dist/libraries/react/{chunk-CQMTU2M4.mjs → chunk-3WP2MI55.mjs} +25 -6
- package/dist/libraries/react/{chunk-6ULRUGQO.mjs → chunk-4AYEAAQU.mjs} +2 -2
- package/dist/libraries/react/{chunk-UO2PX7P3.mjs → chunk-67Y4DFV2.mjs} +14 -17
- package/dist/libraries/react/{chunk-EWMKQDQ6.mjs → chunk-6JOSRG5Z.mjs} +2 -2
- package/dist/libraries/react/{chunk-JOY6LN3M.mjs → chunk-CHQRTGXF.mjs} +25 -7
- package/dist/libraries/react/{chunk-KVGD37VB.mjs → chunk-G3XBGOHR.mjs} +4 -6
- package/dist/libraries/react/{chunk-S4VDT54B.mjs → chunk-GK75OJJJ.mjs} +2 -2
- package/dist/libraries/react/{chunk-MH2YTNJL.mjs → chunk-ITN754AD.mjs} +3 -5
- package/dist/libraries/react/{chunk-Z7MRLSU3.mjs → chunk-LKBUMRHE.mjs} +9 -9
- package/dist/libraries/react/{chunk-UDRQNZZS.mjs → chunk-QAHVMSK4.mjs} +57 -0
- package/dist/libraries/react/{chunk-SCT4E6YW.mjs → chunk-SJAAUTL2.mjs} +2 -2
- package/dist/libraries/react/{chunk-L55GLFAX.mjs → chunk-TBKIB6DH.mjs} +2 -2
- package/dist/libraries/react/{chunk-GEIECHWI.mjs → chunk-TINC2IR4.mjs} +24 -14
- package/dist/libraries/react/{chunk-OWFX3JFF.mjs → chunk-WVKYZYFT.mjs} +14 -0
- package/dist/libraries/react/client/ReactAutumnClient.d.mts +6 -5
- package/dist/libraries/react/client/ReactAutumnClient.d.ts +6 -5
- package/dist/libraries/react/client/ReactAutumnClient.js +57 -0
- package/dist/libraries/react/client/ReactAutumnClient.mjs +1 -1
- package/dist/libraries/react/client/clientCompMethods.d.mts +6 -5
- package/dist/libraries/react/client/clientCompMethods.d.ts +6 -5
- package/dist/libraries/react/client/clientCusMethods.d.mts +6 -5
- package/dist/libraries/react/client/clientCusMethods.d.ts +6 -5
- package/dist/libraries/react/client/clientEntityMethods.d.mts +6 -5
- package/dist/libraries/react/client/clientEntityMethods.d.ts +6 -5
- package/dist/libraries/react/client/clientGenMethods.d.mts +6 -5
- package/dist/libraries/react/client/clientGenMethods.d.ts +6 -5
- package/dist/libraries/react/client/clientProdMethods.d.mts +6 -5
- package/dist/libraries/react/client/clientProdMethods.d.ts +6 -5
- package/dist/libraries/react/client/clientReferralMethods.d.mts +6 -4
- package/dist/libraries/react/client/clientReferralMethods.d.ts +6 -4
- package/dist/libraries/react/client/types/clientGenTypes.d.mts +136 -41
- package/dist/libraries/react/client/types/clientGenTypes.d.ts +136 -41
- package/dist/libraries/react/client/types/clientGenTypes.js +62 -0
- package/dist/libraries/react/client/types/clientGenTypes.mjs +52 -0
- package/dist/libraries/react/client/types/clientReferralTypes.d.mts +17 -5
- package/dist/libraries/react/client/types/clientReferralTypes.d.ts +17 -5
- package/dist/libraries/react/client/types/clientReferralTypes.js +20 -0
- package/dist/libraries/react/client/types/clientReferralTypes.mjs +13 -0
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.mts +2 -1
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.ts +2 -1
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.js +164 -29
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.mjs +17 -17
- package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.mts +2 -1
- package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.ts +2 -1
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.mts +2 -1
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.ts +2 -1
- package/dist/libraries/react/components/check-dialog/lib/check-content.d.mts +2 -1
- package/dist/libraries/react/components/check-dialog/lib/check-content.d.ts +2 -1
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.mts +2 -1
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.ts +2 -1
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +163 -30
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +17 -17
- 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/{cusTypes-CO4FwQ_s.d.ts → cusTypes-Bf1qr9iE.d.mts} +29 -9
- package/dist/libraries/react/{cusTypes-CO4FwQ_s.d.mts → cusTypes-Bf1qr9iE.d.ts} +29 -9
- package/dist/libraries/react/{entTypes-DPTZOorv.d.mts → entTypes-CscyyE1A.d.mts} +1 -1
- package/dist/libraries/react/{entTypes-UxZ5bRqE.d.ts → entTypes-O8YXxhrA.d.ts} +1 -1
- package/dist/libraries/react/hooks/handleAllowed.d.mts +4 -3
- package/dist/libraries/react/hooks/handleAllowed.d.ts +4 -3
- package/dist/libraries/react/hooks/handleAllowed.js +22 -5
- package/dist/libraries/react/hooks/handleAllowed.mjs +1 -1
- package/dist/libraries/react/hooks/useAutumn.d.mts +6 -5
- package/dist/libraries/react/hooks/useAutumn.d.ts +6 -5
- package/dist/libraries/react/hooks/useAutumn.js +105 -13
- package/dist/libraries/react/hooks/useAutumn.mjs +5 -5
- package/dist/libraries/react/hooks/useAutumnBase.d.mts +9 -8
- package/dist/libraries/react/hooks/useAutumnBase.d.ts +9 -8
- package/dist/libraries/react/hooks/useAutumnBase.js +105 -13
- package/dist/libraries/react/hooks/useAutumnBase.mjs +4 -4
- 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 +148 -29
- package/dist/libraries/react/hooks/useCustomer.mjs +7 -7
- package/dist/libraries/react/hooks/useCustomerBase.d.mts +8 -4
- package/dist/libraries/react/hooks/useCustomerBase.d.ts +8 -4
- package/dist/libraries/react/hooks/useCustomerBase.js +148 -29
- package/dist/libraries/react/hooks/useCustomerBase.mjs +6 -6
- package/dist/libraries/react/hooks/useEntity.d.mts +7 -5
- package/dist/libraries/react/hooks/useEntity.d.ts +7 -5
- package/dist/libraries/react/hooks/useEntity.js +127 -18
- package/dist/libraries/react/hooks/useEntity.mjs +7 -7
- package/dist/libraries/react/hooks/useEntityBase.d.mts +7 -7
- package/dist/libraries/react/hooks/useEntityBase.d.ts +7 -7
- package/dist/libraries/react/hooks/useEntityBase.js +127 -18
- package/dist/libraries/react/hooks/useEntityBase.mjs +6 -6
- package/dist/libraries/react/hooks/usePricingTable.d.mts +2 -1
- package/dist/libraries/react/hooks/usePricingTable.d.ts +2 -1
- package/dist/libraries/react/hooks/usePricingTable.js +82 -9
- package/dist/libraries/react/hooks/usePricingTable.mjs +4 -4
- package/dist/libraries/react/hooks/usePricingTableBase.d.mts +7 -6
- package/dist/libraries/react/hooks/usePricingTableBase.d.ts +7 -6
- package/dist/libraries/react/hooks/usePricingTableBase.js +82 -9
- package/dist/libraries/react/hooks/usePricingTableBase.mjs +3 -3
- package/dist/libraries/react/hooks/useProductsBase.js +59 -4
- package/dist/libraries/react/hooks/useProductsBase.mjs +2 -2
- package/dist/libraries/react/index.d.mts +611 -0
- package/dist/libraries/react/index.d.ts +168 -57
- package/dist/libraries/react/index.js +175 -72
- package/dist/libraries/react/index.mjs +175 -72
- package/dist/libraries/react/{response-Z4Yeokd8.d.ts → response-BHqAAnND.d.ts} +21 -5
- package/dist/libraries/react/{response-CxtkXvb4.d.mts → response-CDZ_R5pb.d.mts} +21 -5
- package/dist/libraries/react/utils/inject-styles.js +14 -0
- package/dist/libraries/react/utils/inject-styles.mjs +1 -1
- package/dist/next/{AutumnProvider-DPcEuE_Q.d.ts → AutumnProvider-DtLqoQp6.d.mts} +28 -9
- package/dist/next/{AutumnProvider-DPcEuE_Q.d.mts → AutumnProvider-DtLqoQp6.d.ts} +28 -9
- package/dist/next/AutumnProvider.d.mts +2 -1
- package/dist/next/AutumnProvider.d.ts +2 -1
- package/dist/next/client/NextAutumnClient.d.mts +60 -10
- package/dist/next/client/NextAutumnClient.d.ts +60 -10
- package/dist/next/client/NextAutumnProvider.d.mts +2 -1
- package/dist/next/client/NextAutumnProvider.d.ts +2 -1
- package/dist/next/client/clientEntTypes-BFkleT6a.d.mts +22 -0
- package/dist/next/client/clientEntTypes-BFkleT6a.d.ts +22 -0
- package/dist/next/client/clientGenTypes-B28imYzT.d.mts +195 -0
- package/dist/next/client/clientGenTypes-D46edNj5.d.ts +195 -0
- package/dist/next/client/clientUtils.d.mts +3 -2
- package/dist/next/client/clientUtils.d.ts +3 -2
- package/dist/next/client/{cusTypes-CJI8rdlY.d.mts → cusTypes-CGXuXu_Y.d.mts} +29 -9
- package/dist/next/client/{cusTypes-CJI8rdlY.d.ts → cusTypes-CGXuXu_Y.d.ts} +29 -9
- package/dist/next/client/{entTypes-okM0aeOM.d.mts → entTypes-CJx3GLTt.d.mts} +1 -1
- package/dist/next/client/{entTypes-CqHWTcCX.d.ts → entTypes-qYfQsZ9u.d.ts} +1 -1
- package/dist/next/client/hooks/useAutumn.d.mts +6 -4
- package/dist/next/client/hooks/useAutumn.d.ts +6 -4
- package/dist/next/client/hooks/useCustomer.d.mts +26 -4
- package/dist/next/client/hooks/useCustomer.d.ts +26 -4
- package/dist/next/client/hooks/useCustomer.js +3 -1
- package/dist/next/client/hooks/useCustomer.mjs +3 -1
- package/dist/next/client/hooks/useEntity.d.mts +7 -5
- package/dist/next/client/hooks/useEntity.d.ts +7 -5
- package/dist/next/client/hooks/usePricingTable.d.mts +2 -1
- package/dist/next/client/hooks/usePricingTable.d.ts +2 -1
- package/dist/next/client/types.d.mts +3 -2
- package/dist/next/client/types.d.ts +3 -2
- package/dist/next/index.d.mts +221 -65
- package/dist/next/index.d.ts +221 -65
- package/dist/next/server/auth/withNextAuth.d.mts +2 -1
- package/dist/next/server/auth/withNextAuth.d.ts +2 -1
- package/dist/next/server/componentActions.d.mts +2 -1
- package/dist/next/server/componentActions.d.ts +2 -1
- package/dist/next/server/cusActions.d.mts +93 -38
- package/dist/next/server/cusActions.d.ts +93 -38
- package/dist/next/server/{cusTypes-DuSwXVmp.d.mts → cusTypes-H4mqijcm.d.mts} +28 -8
- package/dist/next/server/{cusTypes-DuSwXVmp.d.ts → cusTypes-H4mqijcm.d.ts} +28 -8
- package/dist/next/server/genActions.d.mts +44 -49
- package/dist/next/server/genActions.d.ts +44 -49
- package/dist/sdk/index.d.mts +123 -29
- package/dist/sdk/index.d.ts +123 -29
- package/dist/sdk/index.js +60 -9
- package/dist/sdk/index.mjs +57 -10
- package/dist/styles/global.css +42 -4
- package/dist/utils/encryptUtils.js +57 -0
- package/dist/utils/encryptUtils.mjs +57 -0
- package/package.json +33 -4
- package/tsup.config.ts +1 -22
- package/components.json +0 -21
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.css +0 -1271
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.css +0 -1271
- package/dist/next/client/clientGenTypes-CAv4hwb4.d.ts +0 -108
- package/dist/next/client/clientGenTypes-Dlpw9wy_.d.mts +0 -108
- package/dist/next/client/clientReferralTypes-C9JiOk2s.d.mts +0 -20
- package/dist/next/client/clientReferralTypes-C9JiOk2s.d.ts +0 -20
- package/dist/next/server/clientEntTypes-BOVTwIKv.d.mts +0 -14
- package/dist/next/server/clientEntTypes-BOVTwIKv.d.ts +0 -14
- package/postcss.config.js +0 -25
- package/publish.sh +0 -18
- package/scripts/css-transform-plugin.js +0 -28
- package/scripts/post-build.js +0 -91
- package/scripts/sync-registry.ts +0 -190
- package/tailwind.config.ts +0 -96
- package/tsup.dev.config.ts +0 -199
|
@@ -3,20 +3,20 @@ import {
|
|
|
3
3
|
} from "./chunk-UNZHJTEY.mjs";
|
|
4
4
|
import {
|
|
5
5
|
createRouterWithOptions
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-NTFR7Z2G.mjs";
|
|
7
|
+
import "./chunk-VFTHGJ5N.mjs";
|
|
8
|
+
import "./chunk-U7335VZS.mjs";
|
|
9
|
+
import "./chunk-FCEB2GBS.mjs";
|
|
10
|
+
import "./chunk-JPNRDMMC.mjs";
|
|
11
|
+
import "./chunk-7QSJB2C5.mjs";
|
|
12
12
|
import {
|
|
13
13
|
Autumn
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-V6M7KRGN.mjs";
|
|
15
15
|
import "./chunk-45WVZY23.mjs";
|
|
16
16
|
import {
|
|
17
17
|
autumnApiUrl
|
|
18
18
|
} from "./chunk-KSG3E4Q2.mjs";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-6DZX6EAA.mjs";
|
|
20
20
|
|
|
21
21
|
// src/libraries/backend/react-router.ts
|
|
22
22
|
import { findRoute } from "rou3";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import { R as Result, A as AutumnError } from './response-CV6KGWH5.js';
|
|
2
3
|
|
|
3
4
|
declare const Infinite = "inf";
|
|
@@ -30,6 +31,7 @@ interface CheckFeatureResult extends CoreCustomerFeature {
|
|
|
30
31
|
entity_id?: string;
|
|
31
32
|
required_balance: number;
|
|
32
33
|
code: string;
|
|
34
|
+
usage_limit?: number;
|
|
33
35
|
preview?: CheckFeaturePreview;
|
|
34
36
|
}
|
|
35
37
|
interface CheckFeaturePreview {
|
|
@@ -165,6 +167,7 @@ interface CoreCustomerFeature {
|
|
|
165
167
|
included_usage?: number;
|
|
166
168
|
next_reset_at?: number | null;
|
|
167
169
|
overage_allowed?: boolean;
|
|
170
|
+
usage_limit?: number;
|
|
168
171
|
breakdown?: {
|
|
169
172
|
interval: ProductItemInterval;
|
|
170
173
|
balance?: number;
|
|
@@ -219,14 +222,29 @@ interface CustomerData {
|
|
|
219
222
|
interface GetCustomerParams {
|
|
220
223
|
expand?: CustomerExpandOption[];
|
|
221
224
|
}
|
|
222
|
-
|
|
223
|
-
id
|
|
224
|
-
email
|
|
225
|
-
name
|
|
226
|
-
fingerprint
|
|
227
|
-
metadata
|
|
228
|
-
expand
|
|
229
|
-
}
|
|
225
|
+
declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
226
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
227
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
228
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
229
|
+
fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
230
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
231
|
+
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
|
|
232
|
+
}, "strip", z.ZodTypeAny, {
|
|
233
|
+
metadata?: Record<string, any> | undefined;
|
|
234
|
+
id?: string | null | undefined;
|
|
235
|
+
name?: string | null | undefined;
|
|
236
|
+
email?: string | null | undefined;
|
|
237
|
+
fingerprint?: string | null | undefined;
|
|
238
|
+
expand?: ("referrals" | "invoices" | "rewards" | "trials_used" | "entities" | "payment_method")[] | undefined;
|
|
239
|
+
}, {
|
|
240
|
+
metadata?: Record<string, any> | undefined;
|
|
241
|
+
id?: string | null | undefined;
|
|
242
|
+
name?: string | null | undefined;
|
|
243
|
+
email?: string | null | undefined;
|
|
244
|
+
fingerprint?: string | null | undefined;
|
|
245
|
+
expand?: ("referrals" | "invoices" | "rewards" | "trials_used" | "entities" | "payment_method")[] | undefined;
|
|
246
|
+
}>;
|
|
247
|
+
type CreateCustomerParams = z.infer<typeof CreateCustomerParamsSchema>;
|
|
230
248
|
interface UpdateCustomerParams {
|
|
231
249
|
id?: string | null;
|
|
232
250
|
name?: string | null;
|
|
@@ -243,6 +261,7 @@ interface CustomerInvoice {
|
|
|
243
261
|
total: number;
|
|
244
262
|
currency: string;
|
|
245
263
|
created_at: number;
|
|
264
|
+
hosted_invoice_url: string;
|
|
246
265
|
}
|
|
247
266
|
|
|
248
267
|
type EntityExpandOption = "invoices";
|
|
@@ -277,25 +296,65 @@ interface EntityData {
|
|
|
277
296
|
feature_id: string;
|
|
278
297
|
}
|
|
279
298
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
299
|
+
declare const AttachParamsSchema: z.ZodObject<{
|
|
300
|
+
customer_id: z.ZodString;
|
|
301
|
+
product_id: z.ZodOptional<z.ZodString>;
|
|
302
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
303
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
304
|
+
feature_id: z.ZodString;
|
|
305
|
+
quantity: z.ZodNumber;
|
|
306
|
+
}, "strip", z.ZodTypeAny, {
|
|
307
|
+
quantity: number;
|
|
308
|
+
feature_id: string;
|
|
309
|
+
}, {
|
|
310
|
+
quantity: number;
|
|
311
|
+
feature_id: string;
|
|
312
|
+
}>, "many">>;
|
|
313
|
+
product_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
314
|
+
free_trial: z.ZodOptional<z.ZodBoolean>;
|
|
315
|
+
success_url: z.ZodOptional<z.ZodString>;
|
|
316
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
317
|
+
force_checkout: z.ZodOptional<z.ZodBoolean>;
|
|
318
|
+
customer_data: z.ZodOptional<z.ZodAny>;
|
|
319
|
+
entity_data: z.ZodOptional<z.ZodAny>;
|
|
320
|
+
checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
321
|
+
reward: z.ZodOptional<z.ZodString>;
|
|
322
|
+
}, "strip", z.ZodTypeAny, {
|
|
285
323
|
customer_id: string;
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
324
|
+
metadata?: Record<string, string> | undefined;
|
|
325
|
+
options?: {
|
|
326
|
+
quantity: number;
|
|
327
|
+
feature_id: string;
|
|
328
|
+
}[] | undefined;
|
|
329
|
+
reward?: string | undefined;
|
|
330
|
+
entity_id?: string | undefined;
|
|
331
|
+
product_id?: string | undefined;
|
|
332
|
+
product_ids?: string[] | undefined;
|
|
333
|
+
free_trial?: boolean | undefined;
|
|
334
|
+
success_url?: string | undefined;
|
|
335
|
+
force_checkout?: boolean | undefined;
|
|
336
|
+
customer_data?: any;
|
|
337
|
+
entity_data?: any;
|
|
338
|
+
checkout_session_params?: Record<string, any> | undefined;
|
|
339
|
+
}, {
|
|
340
|
+
customer_id: string;
|
|
341
|
+
metadata?: Record<string, string> | undefined;
|
|
342
|
+
options?: {
|
|
343
|
+
quantity: number;
|
|
344
|
+
feature_id: string;
|
|
345
|
+
}[] | undefined;
|
|
346
|
+
reward?: string | undefined;
|
|
347
|
+
entity_id?: string | undefined;
|
|
348
|
+
product_id?: string | undefined;
|
|
349
|
+
product_ids?: string[] | undefined;
|
|
350
|
+
free_trial?: boolean | undefined;
|
|
351
|
+
success_url?: string | undefined;
|
|
352
|
+
force_checkout?: boolean | undefined;
|
|
353
|
+
customer_data?: any;
|
|
354
|
+
entity_data?: any;
|
|
355
|
+
checkout_session_params?: Record<string, any> | undefined;
|
|
356
|
+
}>;
|
|
357
|
+
type AttachParams = z.infer<typeof AttachParamsSchema>;
|
|
299
358
|
interface CancelParams {
|
|
300
359
|
customer_id: string;
|
|
301
360
|
product_id: string;
|
|
@@ -307,14 +366,6 @@ interface CancelResult {
|
|
|
307
366
|
customer_id: string;
|
|
308
367
|
product_id: string;
|
|
309
368
|
}
|
|
310
|
-
interface AttachResult {
|
|
311
|
-
checkout_url?: string;
|
|
312
|
-
customer_id: string;
|
|
313
|
-
product_ids: string[];
|
|
314
|
-
code: string;
|
|
315
|
-
message: string;
|
|
316
|
-
customer_data?: CustomerData;
|
|
317
|
-
}
|
|
318
369
|
interface TrackParams {
|
|
319
370
|
customer_id: string;
|
|
320
371
|
value?: number;
|
|
@@ -428,9 +479,23 @@ declare class Autumn {
|
|
|
428
479
|
createCode: (params: CreateReferralCodeParams) => Promise<Result<any, AutumnError>>;
|
|
429
480
|
redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<any, AutumnError>>;
|
|
430
481
|
};
|
|
431
|
-
static attach: (params: AttachParams) => Promise<Result<
|
|
482
|
+
static attach: (params: AttachParams) => Promise<Result<{
|
|
483
|
+
message: string;
|
|
484
|
+
code: string;
|
|
485
|
+
customer_id: string;
|
|
486
|
+
product_ids: string[];
|
|
487
|
+
customer_data?: any;
|
|
488
|
+
checkout_url?: string | undefined;
|
|
489
|
+
}, AutumnError>>;
|
|
432
490
|
static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
|
|
433
|
-
attach(params: AttachParams): Promise<Result<
|
|
491
|
+
attach(params: AttachParams): Promise<Result<{
|
|
492
|
+
message: string;
|
|
493
|
+
code: string;
|
|
494
|
+
customer_id: string;
|
|
495
|
+
product_ids: string[];
|
|
496
|
+
customer_data?: any;
|
|
497
|
+
checkout_url?: string | undefined;
|
|
498
|
+
}, AutumnError>>;
|
|
434
499
|
static setupPayment: (params: SetupPaymentParams) => Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
435
500
|
setupPayment(params: SetupPaymentParams): Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
436
501
|
static cancel: (params: CancelParams) => Promise<Result<CancelResult, AutumnError>>;
|
package/dist/libraries/backend/{referralTypes-C6ao6j-_.d.mts → referralTypes-ecz_wESO.d.mts}
RENAMED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import { R as Result, A as AutumnError } from './response-CV6KGWH5.mjs';
|
|
2
3
|
|
|
3
4
|
declare const Infinite = "inf";
|
|
@@ -30,6 +31,7 @@ interface CheckFeatureResult extends CoreCustomerFeature {
|
|
|
30
31
|
entity_id?: string;
|
|
31
32
|
required_balance: number;
|
|
32
33
|
code: string;
|
|
34
|
+
usage_limit?: number;
|
|
33
35
|
preview?: CheckFeaturePreview;
|
|
34
36
|
}
|
|
35
37
|
interface CheckFeaturePreview {
|
|
@@ -165,6 +167,7 @@ interface CoreCustomerFeature {
|
|
|
165
167
|
included_usage?: number;
|
|
166
168
|
next_reset_at?: number | null;
|
|
167
169
|
overage_allowed?: boolean;
|
|
170
|
+
usage_limit?: number;
|
|
168
171
|
breakdown?: {
|
|
169
172
|
interval: ProductItemInterval;
|
|
170
173
|
balance?: number;
|
|
@@ -219,14 +222,29 @@ interface CustomerData {
|
|
|
219
222
|
interface GetCustomerParams {
|
|
220
223
|
expand?: CustomerExpandOption[];
|
|
221
224
|
}
|
|
222
|
-
|
|
223
|
-
id
|
|
224
|
-
email
|
|
225
|
-
name
|
|
226
|
-
fingerprint
|
|
227
|
-
metadata
|
|
228
|
-
expand
|
|
229
|
-
}
|
|
225
|
+
declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
226
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
227
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
228
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
229
|
+
fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
230
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
231
|
+
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
|
|
232
|
+
}, "strip", z.ZodTypeAny, {
|
|
233
|
+
metadata?: Record<string, any> | undefined;
|
|
234
|
+
id?: string | null | undefined;
|
|
235
|
+
name?: string | null | undefined;
|
|
236
|
+
email?: string | null | undefined;
|
|
237
|
+
fingerprint?: string | null | undefined;
|
|
238
|
+
expand?: ("referrals" | "invoices" | "rewards" | "trials_used" | "entities" | "payment_method")[] | undefined;
|
|
239
|
+
}, {
|
|
240
|
+
metadata?: Record<string, any> | undefined;
|
|
241
|
+
id?: string | null | undefined;
|
|
242
|
+
name?: string | null | undefined;
|
|
243
|
+
email?: string | null | undefined;
|
|
244
|
+
fingerprint?: string | null | undefined;
|
|
245
|
+
expand?: ("referrals" | "invoices" | "rewards" | "trials_used" | "entities" | "payment_method")[] | undefined;
|
|
246
|
+
}>;
|
|
247
|
+
type CreateCustomerParams = z.infer<typeof CreateCustomerParamsSchema>;
|
|
230
248
|
interface UpdateCustomerParams {
|
|
231
249
|
id?: string | null;
|
|
232
250
|
name?: string | null;
|
|
@@ -243,6 +261,7 @@ interface CustomerInvoice {
|
|
|
243
261
|
total: number;
|
|
244
262
|
currency: string;
|
|
245
263
|
created_at: number;
|
|
264
|
+
hosted_invoice_url: string;
|
|
246
265
|
}
|
|
247
266
|
|
|
248
267
|
type EntityExpandOption = "invoices";
|
|
@@ -277,25 +296,65 @@ interface EntityData {
|
|
|
277
296
|
feature_id: string;
|
|
278
297
|
}
|
|
279
298
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
299
|
+
declare const AttachParamsSchema: z.ZodObject<{
|
|
300
|
+
customer_id: z.ZodString;
|
|
301
|
+
product_id: z.ZodOptional<z.ZodString>;
|
|
302
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
303
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
304
|
+
feature_id: z.ZodString;
|
|
305
|
+
quantity: z.ZodNumber;
|
|
306
|
+
}, "strip", z.ZodTypeAny, {
|
|
307
|
+
quantity: number;
|
|
308
|
+
feature_id: string;
|
|
309
|
+
}, {
|
|
310
|
+
quantity: number;
|
|
311
|
+
feature_id: string;
|
|
312
|
+
}>, "many">>;
|
|
313
|
+
product_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
314
|
+
free_trial: z.ZodOptional<z.ZodBoolean>;
|
|
315
|
+
success_url: z.ZodOptional<z.ZodString>;
|
|
316
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
317
|
+
force_checkout: z.ZodOptional<z.ZodBoolean>;
|
|
318
|
+
customer_data: z.ZodOptional<z.ZodAny>;
|
|
319
|
+
entity_data: z.ZodOptional<z.ZodAny>;
|
|
320
|
+
checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
321
|
+
reward: z.ZodOptional<z.ZodString>;
|
|
322
|
+
}, "strip", z.ZodTypeAny, {
|
|
285
323
|
customer_id: string;
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
324
|
+
metadata?: Record<string, string> | undefined;
|
|
325
|
+
options?: {
|
|
326
|
+
quantity: number;
|
|
327
|
+
feature_id: string;
|
|
328
|
+
}[] | undefined;
|
|
329
|
+
reward?: string | undefined;
|
|
330
|
+
entity_id?: string | undefined;
|
|
331
|
+
product_id?: string | undefined;
|
|
332
|
+
product_ids?: string[] | undefined;
|
|
333
|
+
free_trial?: boolean | undefined;
|
|
334
|
+
success_url?: string | undefined;
|
|
335
|
+
force_checkout?: boolean | undefined;
|
|
336
|
+
customer_data?: any;
|
|
337
|
+
entity_data?: any;
|
|
338
|
+
checkout_session_params?: Record<string, any> | undefined;
|
|
339
|
+
}, {
|
|
340
|
+
customer_id: string;
|
|
341
|
+
metadata?: Record<string, string> | undefined;
|
|
342
|
+
options?: {
|
|
343
|
+
quantity: number;
|
|
344
|
+
feature_id: string;
|
|
345
|
+
}[] | undefined;
|
|
346
|
+
reward?: string | undefined;
|
|
347
|
+
entity_id?: string | undefined;
|
|
348
|
+
product_id?: string | undefined;
|
|
349
|
+
product_ids?: string[] | undefined;
|
|
350
|
+
free_trial?: boolean | undefined;
|
|
351
|
+
success_url?: string | undefined;
|
|
352
|
+
force_checkout?: boolean | undefined;
|
|
353
|
+
customer_data?: any;
|
|
354
|
+
entity_data?: any;
|
|
355
|
+
checkout_session_params?: Record<string, any> | undefined;
|
|
356
|
+
}>;
|
|
357
|
+
type AttachParams = z.infer<typeof AttachParamsSchema>;
|
|
299
358
|
interface CancelParams {
|
|
300
359
|
customer_id: string;
|
|
301
360
|
product_id: string;
|
|
@@ -307,14 +366,6 @@ interface CancelResult {
|
|
|
307
366
|
customer_id: string;
|
|
308
367
|
product_id: string;
|
|
309
368
|
}
|
|
310
|
-
interface AttachResult {
|
|
311
|
-
checkout_url?: string;
|
|
312
|
-
customer_id: string;
|
|
313
|
-
product_ids: string[];
|
|
314
|
-
code: string;
|
|
315
|
-
message: string;
|
|
316
|
-
customer_data?: CustomerData;
|
|
317
|
-
}
|
|
318
369
|
interface TrackParams {
|
|
319
370
|
customer_id: string;
|
|
320
371
|
value?: number;
|
|
@@ -428,9 +479,23 @@ declare class Autumn {
|
|
|
428
479
|
createCode: (params: CreateReferralCodeParams) => Promise<Result<any, AutumnError>>;
|
|
429
480
|
redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<any, AutumnError>>;
|
|
430
481
|
};
|
|
431
|
-
static attach: (params: AttachParams) => Promise<Result<
|
|
482
|
+
static attach: (params: AttachParams) => Promise<Result<{
|
|
483
|
+
message: string;
|
|
484
|
+
code: string;
|
|
485
|
+
customer_id: string;
|
|
486
|
+
product_ids: string[];
|
|
487
|
+
customer_data?: any;
|
|
488
|
+
checkout_url?: string | undefined;
|
|
489
|
+
}, AutumnError>>;
|
|
432
490
|
static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
|
|
433
|
-
attach(params: AttachParams): Promise<Result<
|
|
491
|
+
attach(params: AttachParams): Promise<Result<{
|
|
492
|
+
message: string;
|
|
493
|
+
code: string;
|
|
494
|
+
customer_id: string;
|
|
495
|
+
product_ids: string[];
|
|
496
|
+
customer_data?: any;
|
|
497
|
+
checkout_url?: string | undefined;
|
|
498
|
+
}, AutumnError>>;
|
|
434
499
|
static setupPayment: (params: SetupPaymentParams) => Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
435
500
|
setupPayment(params: SetupPaymentParams): Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
436
501
|
static cancel: (params: CancelParams) => Promise<Result<CancelResult, AutumnError>>;
|
|
@@ -512,6 +512,63 @@ var Autumn = class {
|
|
|
512
512
|
}
|
|
513
513
|
};
|
|
514
514
|
|
|
515
|
+
// src/sdk/general/genTypes.ts
|
|
516
|
+
var import_zod = require("zod");
|
|
517
|
+
var AttachParamsSchema = import_zod.z.object({
|
|
518
|
+
customer_id: import_zod.z.string(),
|
|
519
|
+
product_id: import_zod.z.string().optional(),
|
|
520
|
+
entity_id: import_zod.z.string().optional(),
|
|
521
|
+
options: import_zod.z.array(import_zod.z.object({
|
|
522
|
+
feature_id: import_zod.z.string(),
|
|
523
|
+
quantity: import_zod.z.number()
|
|
524
|
+
})).optional(),
|
|
525
|
+
product_ids: import_zod.z.array(import_zod.z.string()).optional(),
|
|
526
|
+
// If set, will attach multiple products to the customer (cannot be used with product_id)
|
|
527
|
+
free_trial: import_zod.z.boolean().optional(),
|
|
528
|
+
// Default is true -- if set to false, will bypass product free trial
|
|
529
|
+
success_url: import_zod.z.string().optional(),
|
|
530
|
+
// Passed to Stripe
|
|
531
|
+
metadata: import_zod.z.record(import_zod.z.string()).optional(),
|
|
532
|
+
// Passed to Stripe
|
|
533
|
+
force_checkout: import_zod.z.boolean().optional(),
|
|
534
|
+
// Default is false -- if set to true, will force the customer to checkout (not allowed for upgrades / downgrades)
|
|
535
|
+
customer_data: import_zod.z.any().optional(),
|
|
536
|
+
entity_data: import_zod.z.any().optional(),
|
|
537
|
+
checkout_session_params: import_zod.z.record(import_zod.z.any()).optional(),
|
|
538
|
+
// Passed to Stripe
|
|
539
|
+
reward: import_zod.z.string().optional()
|
|
540
|
+
});
|
|
541
|
+
var AttachResultSchema = import_zod.z.object({
|
|
542
|
+
checkout_url: import_zod.z.string().optional(),
|
|
543
|
+
customer_id: import_zod.z.string(),
|
|
544
|
+
product_ids: import_zod.z.array(import_zod.z.string()),
|
|
545
|
+
code: import_zod.z.string(),
|
|
546
|
+
message: import_zod.z.string(),
|
|
547
|
+
customer_data: import_zod.z.any().optional()
|
|
548
|
+
});
|
|
549
|
+
|
|
550
|
+
// src/sdk/customers/cusEnums.ts
|
|
551
|
+
var import_zod2 = require("zod");
|
|
552
|
+
var CustomerExpandEnum = import_zod2.z.enum([
|
|
553
|
+
"invoices",
|
|
554
|
+
"rewards",
|
|
555
|
+
"trials_used",
|
|
556
|
+
"entities",
|
|
557
|
+
"referrals",
|
|
558
|
+
"payment_method"
|
|
559
|
+
]);
|
|
560
|
+
|
|
561
|
+
// src/sdk/customers/cusTypes.ts
|
|
562
|
+
var import_zod3 = require("zod");
|
|
563
|
+
var CreateCustomerParamsSchema = import_zod3.z.object({
|
|
564
|
+
id: import_zod3.z.string().nullish(),
|
|
565
|
+
email: import_zod3.z.string().nullish(),
|
|
566
|
+
name: import_zod3.z.string().nullish(),
|
|
567
|
+
fingerprint: import_zod3.z.string().nullish(),
|
|
568
|
+
metadata: import_zod3.z.record(import_zod3.z.any()).optional(),
|
|
569
|
+
expand: import_zod3.z.array(CustomerExpandEnum).optional()
|
|
570
|
+
});
|
|
571
|
+
|
|
515
572
|
// src/sdk/components/componentMethods.ts
|
|
516
573
|
var fetchPricingTable = async ({
|
|
517
574
|
instance,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRouterWithOptions
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-NTFR7Z2G.mjs";
|
|
4
|
+
import "./chunk-VFTHGJ5N.mjs";
|
|
5
|
+
import "./chunk-U7335VZS.mjs";
|
|
6
|
+
import "./chunk-FCEB2GBS.mjs";
|
|
7
|
+
import "./chunk-JPNRDMMC.mjs";
|
|
8
|
+
import "./chunk-7QSJB2C5.mjs";
|
|
9
9
|
import {
|
|
10
10
|
Autumn
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-V6M7KRGN.mjs";
|
|
12
12
|
import "./chunk-45WVZY23.mjs";
|
|
13
13
|
import {
|
|
14
14
|
autumnApiUrl
|
|
15
15
|
} from "./chunk-KSG3E4Q2.mjs";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-6DZX6EAA.mjs";
|
|
17
17
|
|
|
18
18
|
// src/libraries/backend/remix_dep.ts
|
|
19
19
|
import { findRoute } from "rou3";
|
|
@@ -512,6 +512,63 @@ var Autumn = class {
|
|
|
512
512
|
}
|
|
513
513
|
};
|
|
514
514
|
|
|
515
|
+
// src/sdk/general/genTypes.ts
|
|
516
|
+
var import_zod = require("zod");
|
|
517
|
+
var AttachParamsSchema = import_zod.z.object({
|
|
518
|
+
customer_id: import_zod.z.string(),
|
|
519
|
+
product_id: import_zod.z.string().optional(),
|
|
520
|
+
entity_id: import_zod.z.string().optional(),
|
|
521
|
+
options: import_zod.z.array(import_zod.z.object({
|
|
522
|
+
feature_id: import_zod.z.string(),
|
|
523
|
+
quantity: import_zod.z.number()
|
|
524
|
+
})).optional(),
|
|
525
|
+
product_ids: import_zod.z.array(import_zod.z.string()).optional(),
|
|
526
|
+
// If set, will attach multiple products to the customer (cannot be used with product_id)
|
|
527
|
+
free_trial: import_zod.z.boolean().optional(),
|
|
528
|
+
// Default is true -- if set to false, will bypass product free trial
|
|
529
|
+
success_url: import_zod.z.string().optional(),
|
|
530
|
+
// Passed to Stripe
|
|
531
|
+
metadata: import_zod.z.record(import_zod.z.string()).optional(),
|
|
532
|
+
// Passed to Stripe
|
|
533
|
+
force_checkout: import_zod.z.boolean().optional(),
|
|
534
|
+
// Default is false -- if set to true, will force the customer to checkout (not allowed for upgrades / downgrades)
|
|
535
|
+
customer_data: import_zod.z.any().optional(),
|
|
536
|
+
entity_data: import_zod.z.any().optional(),
|
|
537
|
+
checkout_session_params: import_zod.z.record(import_zod.z.any()).optional(),
|
|
538
|
+
// Passed to Stripe
|
|
539
|
+
reward: import_zod.z.string().optional()
|
|
540
|
+
});
|
|
541
|
+
var AttachResultSchema = import_zod.z.object({
|
|
542
|
+
checkout_url: import_zod.z.string().optional(),
|
|
543
|
+
customer_id: import_zod.z.string(),
|
|
544
|
+
product_ids: import_zod.z.array(import_zod.z.string()),
|
|
545
|
+
code: import_zod.z.string(),
|
|
546
|
+
message: import_zod.z.string(),
|
|
547
|
+
customer_data: import_zod.z.any().optional()
|
|
548
|
+
});
|
|
549
|
+
|
|
550
|
+
// src/sdk/customers/cusEnums.ts
|
|
551
|
+
var import_zod2 = require("zod");
|
|
552
|
+
var CustomerExpandEnum = import_zod2.z.enum([
|
|
553
|
+
"invoices",
|
|
554
|
+
"rewards",
|
|
555
|
+
"trials_used",
|
|
556
|
+
"entities",
|
|
557
|
+
"referrals",
|
|
558
|
+
"payment_method"
|
|
559
|
+
]);
|
|
560
|
+
|
|
561
|
+
// src/sdk/customers/cusTypes.ts
|
|
562
|
+
var import_zod3 = require("zod");
|
|
563
|
+
var CreateCustomerParamsSchema = import_zod3.z.object({
|
|
564
|
+
id: import_zod3.z.string().nullish(),
|
|
565
|
+
email: import_zod3.z.string().nullish(),
|
|
566
|
+
name: import_zod3.z.string().nullish(),
|
|
567
|
+
fingerprint: import_zod3.z.string().nullish(),
|
|
568
|
+
metadata: import_zod3.z.record(import_zod3.z.any()).optional(),
|
|
569
|
+
expand: import_zod3.z.array(CustomerExpandEnum).optional()
|
|
570
|
+
});
|
|
571
|
+
|
|
515
572
|
// src/sdk/components/componentMethods.ts
|
|
516
573
|
var fetchPricingTable = async ({
|
|
517
574
|
instance,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRouterWithOptions
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-NTFR7Z2G.mjs";
|
|
4
|
+
import "../chunk-VFTHGJ5N.mjs";
|
|
5
|
+
import "../chunk-U7335VZS.mjs";
|
|
6
|
+
import "../chunk-FCEB2GBS.mjs";
|
|
7
|
+
import "../chunk-JPNRDMMC.mjs";
|
|
8
|
+
import "../chunk-7QSJB2C5.mjs";
|
|
9
|
+
import "../chunk-V6M7KRGN.mjs";
|
|
10
10
|
import "../chunk-45WVZY23.mjs";
|
|
11
11
|
import "../chunk-KSG3E4Q2.mjs";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-6DZX6EAA.mjs";
|
|
13
13
|
export {
|
|
14
14
|
createRouterWithOptions
|
|
15
15
|
};
|
|
@@ -512,6 +512,63 @@ var Autumn = class {
|
|
|
512
512
|
}
|
|
513
513
|
};
|
|
514
514
|
|
|
515
|
+
// src/sdk/general/genTypes.ts
|
|
516
|
+
var import_zod = require("zod");
|
|
517
|
+
var AttachParamsSchema = import_zod.z.object({
|
|
518
|
+
customer_id: import_zod.z.string(),
|
|
519
|
+
product_id: import_zod.z.string().optional(),
|
|
520
|
+
entity_id: import_zod.z.string().optional(),
|
|
521
|
+
options: import_zod.z.array(import_zod.z.object({
|
|
522
|
+
feature_id: import_zod.z.string(),
|
|
523
|
+
quantity: import_zod.z.number()
|
|
524
|
+
})).optional(),
|
|
525
|
+
product_ids: import_zod.z.array(import_zod.z.string()).optional(),
|
|
526
|
+
// If set, will attach multiple products to the customer (cannot be used with product_id)
|
|
527
|
+
free_trial: import_zod.z.boolean().optional(),
|
|
528
|
+
// Default is true -- if set to false, will bypass product free trial
|
|
529
|
+
success_url: import_zod.z.string().optional(),
|
|
530
|
+
// Passed to Stripe
|
|
531
|
+
metadata: import_zod.z.record(import_zod.z.string()).optional(),
|
|
532
|
+
// Passed to Stripe
|
|
533
|
+
force_checkout: import_zod.z.boolean().optional(),
|
|
534
|
+
// Default is false -- if set to true, will force the customer to checkout (not allowed for upgrades / downgrades)
|
|
535
|
+
customer_data: import_zod.z.any().optional(),
|
|
536
|
+
entity_data: import_zod.z.any().optional(),
|
|
537
|
+
checkout_session_params: import_zod.z.record(import_zod.z.any()).optional(),
|
|
538
|
+
// Passed to Stripe
|
|
539
|
+
reward: import_zod.z.string().optional()
|
|
540
|
+
});
|
|
541
|
+
var AttachResultSchema = import_zod.z.object({
|
|
542
|
+
checkout_url: import_zod.z.string().optional(),
|
|
543
|
+
customer_id: import_zod.z.string(),
|
|
544
|
+
product_ids: import_zod.z.array(import_zod.z.string()),
|
|
545
|
+
code: import_zod.z.string(),
|
|
546
|
+
message: import_zod.z.string(),
|
|
547
|
+
customer_data: import_zod.z.any().optional()
|
|
548
|
+
});
|
|
549
|
+
|
|
550
|
+
// src/sdk/customers/cusEnums.ts
|
|
551
|
+
var import_zod2 = require("zod");
|
|
552
|
+
var CustomerExpandEnum = import_zod2.z.enum([
|
|
553
|
+
"invoices",
|
|
554
|
+
"rewards",
|
|
555
|
+
"trials_used",
|
|
556
|
+
"entities",
|
|
557
|
+
"referrals",
|
|
558
|
+
"payment_method"
|
|
559
|
+
]);
|
|
560
|
+
|
|
561
|
+
// src/sdk/customers/cusTypes.ts
|
|
562
|
+
var import_zod3 = require("zod");
|
|
563
|
+
var CreateCustomerParamsSchema = import_zod3.z.object({
|
|
564
|
+
id: import_zod3.z.string().nullish(),
|
|
565
|
+
email: import_zod3.z.string().nullish(),
|
|
566
|
+
name: import_zod3.z.string().nullish(),
|
|
567
|
+
fingerprint: import_zod3.z.string().nullish(),
|
|
568
|
+
metadata: import_zod3.z.record(import_zod3.z.any()).optional(),
|
|
569
|
+
expand: import_zod3.z.array(CustomerExpandEnum).optional()
|
|
570
|
+
});
|
|
571
|
+
|
|
515
572
|
// src/libraries/backend/utils/backendRes.ts
|
|
516
573
|
var toBackendRes = ({ res }) => {
|
|
517
574
|
let statusCode = res.statusCode ? res.statusCode : res.error ? 500 : 200;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addEntityRoutes
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-U7335VZS.mjs";
|
|
4
|
+
import "../chunk-7QSJB2C5.mjs";
|
|
5
|
+
import "../chunk-V6M7KRGN.mjs";
|
|
6
6
|
import "../chunk-45WVZY23.mjs";
|
|
7
7
|
import "../chunk-KSG3E4Q2.mjs";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-6DZX6EAA.mjs";
|
|
9
9
|
export {
|
|
10
10
|
addEntityRoutes
|
|
11
11
|
};
|