autumn-js 0.0.115 → 0.0.116
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/README.md +1 -139
- package/dist/libraries/backend/better-auth.d.mts +18 -18
- package/dist/libraries/backend/better-auth.d.ts +18 -18
- package/dist/libraries/backend/better-auth.js +17 -0
- package/dist/libraries/backend/better-auth.mjs +7 -7
- package/dist/libraries/backend/{chunk-VJTYMTEE.mjs → chunk-BDMGQV75.mjs} +1 -1
- package/dist/libraries/backend/{chunk-CZIMXJXT.mjs → chunk-BX2LACTF.mjs} +1 -1
- package/dist/libraries/backend/{chunk-5OVGQBAX.mjs → chunk-EIP7LDKF.mjs} +1 -1
- package/dist/libraries/backend/{chunk-FV6S6G2B.mjs → chunk-N4PGGU3D.mjs} +1 -1
- package/dist/libraries/backend/{chunk-SLHP34YX.mjs → chunk-O6KXYXQN.mjs} +1 -1
- package/dist/libraries/backend/{chunk-BBXZMPWZ.mjs → chunk-QGX7ZACH.mjs} +17 -0
- package/dist/libraries/backend/{chunk-RZCIKER6.mjs → chunk-WTKY2U3S.mjs} +10 -10
- package/dist/libraries/backend/convex.js +17 -0
- package/dist/libraries/backend/convex.mjs +7 -7
- package/dist/libraries/backend/elysia.js +17 -0
- 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 +17 -0
- package/dist/libraries/backend/express.mjs +7 -7
- package/dist/libraries/backend/fastify.js +17 -0
- package/dist/libraries/backend/fastify.mjs +7 -7
- package/dist/libraries/backend/hono.js +17 -0
- package/dist/libraries/backend/hono.mjs +7 -7
- package/dist/libraries/backend/index.d.mts +1 -1
- package/dist/libraries/backend/index.d.ts +1 -1
- package/dist/libraries/backend/index.js +17 -0
- package/dist/libraries/backend/index.mjs +7 -7
- package/dist/libraries/backend/next.js +17 -0
- package/dist/libraries/backend/next.mjs +7 -7
- package/dist/libraries/backend/react-router.js +17 -0
- package/dist/libraries/backend/react-router.mjs +7 -7
- package/dist/libraries/backend/{referralTypes-Tn4tzWbT.d.ts → referralTypes-DXhjwazw.d.ts} +90 -35
- package/dist/libraries/backend/{referralTypes-CxBMvbW7.d.mts → referralTypes-Dxn4bOpT.d.mts} +90 -35
- package/dist/libraries/backend/remix_dep.js +17 -0
- package/dist/libraries/backend/remix_dep.mjs +7 -7
- package/dist/libraries/backend/routes/backendRouter.js +17 -0
- package/dist/libraries/backend/routes/backendRouter.mjs +7 -7
- package/dist/libraries/backend/routes/entityRoutes.js +17 -0
- package/dist/libraries/backend/routes/entityRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/genRoutes.js +17 -0
- package/dist/libraries/backend/routes/genRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/productRoutes.js +17 -0
- package/dist/libraries/backend/routes/productRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/referralRoutes.js +17 -0
- package/dist/libraries/backend/routes/referralRoutes.mjs +3 -3
- package/dist/libraries/backend/supabase.js +17 -0
- package/dist/libraries/backend/supabase.mjs +7 -7
- package/dist/libraries/backend/tanstack.js +17 -0
- package/dist/libraries/backend/tanstack.mjs +7 -7
- package/dist/libraries/backend/utils/backendRes.js +17 -0
- 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 +17 -0
- package/dist/libraries/backend/utils/withAuth.mjs +2 -2
- package/dist/libraries/react/AutumnContext.d.mts +6 -6
- package/dist/libraries/react/AutumnContext.d.ts +6 -6
- package/dist/libraries/react/AutumnContext.js +17 -0
- package/dist/libraries/react/AutumnContext.mjs +5 -5
- package/dist/libraries/react/BaseAutumnProvider.d.mts +6 -6
- package/dist/libraries/react/BaseAutumnProvider.d.ts +6 -6
- package/dist/libraries/react/BaseAutumnProvider.js +17 -0
- package/dist/libraries/react/BaseAutumnProvider.mjs +10 -10
- package/dist/libraries/react/{ReactAutumnClient-DWq3CtTo.d.ts → ReactAutumnClient-5mFEwitR.d.ts} +8 -8
- package/dist/libraries/react/{ReactAutumnClient-Deg9KIoK.d.mts → ReactAutumnClient-DooIpMm0.d.mts} +8 -8
- package/dist/libraries/react/ReactAutumnProvider.d.mts +2 -2
- package/dist/libraries/react/ReactAutumnProvider.d.ts +2 -2
- package/dist/libraries/react/ReactAutumnProvider.js +17 -0
- package/dist/libraries/react/ReactAutumnProvider.mjs +11 -11
- package/dist/libraries/react/{attachTypes-BfITg8QI.d.mts → attachTypes-By0coJIV.d.mts} +3 -3
- package/dist/{next/client/attachTypes-D1J8GKaX.d.ts → libraries/react/attachTypes-CSutLgVn.d.ts} +5 -5
- package/dist/libraries/react/{chunk-JKCNFNPN.mjs → chunk-77DMPCGK.mjs} +28 -30
- package/dist/libraries/react/{chunk-WLMUN7LO.mjs → chunk-7RICWVXV.mjs} +2 -2
- package/dist/libraries/react/{chunk-2ZJIVJC3.mjs → chunk-AXHU3KAH.mjs} +3 -3
- package/dist/libraries/react/{chunk-HRD7CMV2.mjs → chunk-CZBWEEWD.mjs} +17 -0
- package/dist/libraries/react/{chunk-TTQ2JFWO.mjs → chunk-EXUNRZTP.mjs} +3 -3
- package/dist/libraries/react/{chunk-UO4CQY4C.mjs → chunk-H4J73SMR.mjs} +1 -1
- package/dist/libraries/react/{chunk-SQETBIDZ.mjs → chunk-IFZCH7DR.mjs} +2 -2
- package/dist/libraries/react/{chunk-GB3FANSE.mjs → chunk-LFLX6NJU.mjs} +1 -1
- package/dist/libraries/react/{chunk-WEOR6KVG.mjs → chunk-LMQMA7VL.mjs} +7 -7
- package/dist/libraries/react/{chunk-YOP5NTBJ.mjs → chunk-MPA65MFU.mjs} +1 -1
- package/dist/libraries/react/{chunk-MRJXFGYA.mjs → chunk-MRZA4JWN.mjs} +1 -1
- package/dist/libraries/react/{chunk-GUN6SIBL.mjs → chunk-PFN52PHR.mjs} +2 -2
- package/dist/libraries/react/{chunk-ID6R6YXN.mjs → chunk-QJJC6MB3.mjs} +2 -2
- package/dist/libraries/react/{chunk-IJNOJKLD.mjs → chunk-UAK4XMNC.mjs} +1 -1
- package/dist/libraries/react/{chunk-6ZNJROK5.mjs → chunk-UCUAGLCJ.mjs} +1 -1
- package/dist/libraries/react/{chunk-3TWEC5VD.mjs → chunk-WZG3QTZI.mjs} +3 -3
- package/dist/libraries/react/client/ReactAutumnClient.d.mts +6 -6
- package/dist/libraries/react/client/ReactAutumnClient.d.ts +6 -6
- package/dist/libraries/react/client/ReactAutumnClient.js +17 -0
- package/dist/libraries/react/client/ReactAutumnClient.mjs +4 -4
- package/dist/libraries/react/client/clientCompMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientCompMethods.d.ts +6 -6
- package/dist/libraries/react/client/clientCusMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientCusMethods.d.ts +6 -6
- package/dist/libraries/react/client/clientEntityMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientEntityMethods.d.ts +6 -6
- package/dist/libraries/react/client/clientGenMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientGenMethods.d.ts +6 -6
- package/dist/libraries/react/client/clientProdMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientProdMethods.d.ts +6 -6
- package/dist/libraries/react/client/clientReferralMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientReferralMethods.d.ts +6 -6
- package/dist/libraries/react/client/types/clientGenTypes.js +17 -0
- package/dist/libraries/react/client/types/clientGenTypes.mjs +1 -1
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.d.mts +2 -2
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.d.ts +2 -2
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.js +17 -0
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.mjs +27 -27
- package/dist/libraries/react/components/checkout-dialog/lib/checkout-content.d.mts +2 -2
- package/dist/libraries/react/components/checkout-dialog/lib/checkout-content.d.ts +2 -2
- package/dist/libraries/react/components/paywall-dialog/lib/paywall-content.d.mts +1 -1
- package/dist/libraries/react/components/paywall-dialog/lib/paywall-content.d.ts +1 -1
- package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.js +17 -0
- package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.mjs +27 -27
- package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.mts +1 -1
- package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.ts +1 -1
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.mts +4 -4
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.ts +4 -4
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +18 -3
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +27 -27
- 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/dialog.mjs +2 -2
- package/dist/libraries/react/components/ui/popover.mjs +2 -2
- package/dist/libraries/react/{cusTypes-CMj2sP-4.d.ts → cusTypes-Bbmd8V3j.d.mts} +23 -5
- package/dist/libraries/react/{cusTypes-Dj2tcwg7.d.mts → cusTypes-d_DR9uFs.d.ts} +23 -5
- package/dist/libraries/react/{entTypes-Cltx_-C_.d.mts → entTypes-B2DgO6PV.d.mts} +1 -1
- package/dist/libraries/react/{entTypes-fYtiTl7W.d.ts → entTypes-D6eoGCKH.d.ts} +1 -1
- package/dist/libraries/react/{genTypes-A2nf2M_h.d.ts → genTypes-BNXXZTFn.d.ts} +5 -5
- package/dist/libraries/react/{genTypes-CH9EbOfb.d.mts → genTypes-C2VFQqmX.d.mts} +5 -5
- package/dist/libraries/react/hooks/helpers/handleCheck.d.mts +6 -6
- package/dist/libraries/react/hooks/helpers/handleCheck.d.ts +6 -6
- package/dist/libraries/react/hooks/helpers/handleCheck.js +17 -0
- package/dist/libraries/react/hooks/helpers/handleCheck.mjs +2 -2
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.mts +6 -6
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.ts +6 -6
- package/dist/libraries/react/hooks/helpers/useAutumnBase.js +17 -0
- package/dist/libraries/react/hooks/helpers/useAutumnBase.mjs +3 -3
- package/dist/libraries/react/hooks/useAnalytics.d.mts +2 -2
- package/dist/libraries/react/hooks/useAnalytics.d.ts +2 -2
- package/dist/libraries/react/hooks/useAnalytics.js +17 -0
- package/dist/libraries/react/hooks/useAnalytics.mjs +6 -6
- package/dist/libraries/react/hooks/useCustomer.d.mts +6 -6
- package/dist/libraries/react/hooks/useCustomer.d.ts +6 -6
- package/dist/libraries/react/hooks/useCustomer.js +17 -0
- package/dist/libraries/react/hooks/useCustomer.mjs +10 -10
- package/dist/libraries/react/hooks/useCustomerBase.d.mts +6 -6
- package/dist/libraries/react/hooks/useCustomerBase.d.ts +6 -6
- package/dist/libraries/react/hooks/useCustomerBase.js +17 -0
- package/dist/libraries/react/hooks/useCustomerBase.mjs +9 -9
- package/dist/libraries/react/hooks/useEntity.d.mts +4 -4
- package/dist/libraries/react/hooks/useEntity.d.ts +4 -4
- package/dist/libraries/react/hooks/useEntity.js +17 -0
- package/dist/libraries/react/hooks/useEntity.mjs +10 -10
- package/dist/libraries/react/hooks/useEntityBase.d.mts +6 -6
- package/dist/libraries/react/hooks/useEntityBase.d.ts +6 -6
- package/dist/libraries/react/hooks/useEntityBase.js +17 -0
- package/dist/libraries/react/hooks/useEntityBase.mjs +9 -9
- package/dist/libraries/react/hooks/usePaywall.d.mts +1 -1
- package/dist/libraries/react/hooks/usePaywall.d.ts +1 -1
- package/dist/libraries/react/hooks/usePaywall.js +17 -0
- package/dist/libraries/react/hooks/usePaywall.mjs +6 -6
- 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 +17 -0
- 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 +17 -0
- package/dist/libraries/react/hooks/usePricingTableBase.mjs +2 -2
- package/dist/libraries/react/hooks/useProductsBase.d.mts +6 -6
- package/dist/libraries/react/hooks/useProductsBase.d.ts +6 -6
- package/dist/libraries/react/index.d.mts +37 -1
- package/dist/libraries/react/index.d.ts +37 -1
- package/dist/libraries/react/index.js +18 -3
- package/dist/libraries/react/index.mjs +18 -3
- package/dist/libraries/react/{prodTypes-DZUJPsRN.d.mts → prodTypes-B3iWy6kz.d.mts} +21 -3
- package/dist/libraries/react/{prodTypes-DZUJPsRN.d.ts → prodTypes-B3iWy6kz.d.ts} +21 -3
- package/dist/next/client/NextAutumnClient.d.mts +7 -7
- package/dist/next/client/NextAutumnClient.d.ts +7 -7
- package/dist/next/client/NextAutumnProvider.d.mts +2 -2
- package/dist/next/client/NextAutumnProvider.d.ts +2 -2
- package/dist/{libraries/react/attachTypes-ZMWuxpzI.d.ts → next/client/attachTypes-BCt7D8ym.d.ts} +5 -5
- package/dist/next/client/{attachTypes-Ds4c3m_f.d.mts → attachTypes-BThbMcvF.d.mts} +3 -3
- package/dist/next/client/{clientAttachTypes-CTlrbiN0.d.ts → clientAttachTypes-Df5FVGkw.d.ts} +3 -3
- package/dist/next/client/{clientAttachTypes-BkPjc5Md.d.mts → clientAttachTypes-whHUVrE3.d.mts} +3 -3
- package/dist/next/client/clientUtils.d.mts +3 -3
- package/dist/next/client/clientUtils.d.ts +3 -3
- package/dist/next/client/{cusTypes-cin7tsQv.d.mts → cusTypes-BuLw67IH.d.mts} +21 -3
- package/dist/next/client/{cusTypes-7rPpQ98G.d.ts → cusTypes-CqAsUZEp.d.ts} +21 -3
- package/dist/next/client/{entTypes-Nr9DDaGQ.d.ts → entTypes-BLLymqnn.d.ts} +1 -1
- package/dist/next/client/{entTypes-DhVNxsHB.d.mts → entTypes-DTRFxh07.d.mts} +1 -1
- package/dist/next/client/hooks/useAutumn.d.mts +4 -4
- package/dist/next/client/hooks/useAutumn.d.ts +4 -4
- package/dist/next/client/hooks/useCustomer.d.mts +5 -5
- package/dist/next/client/hooks/useCustomer.d.ts +5 -5
- package/dist/next/client/hooks/useEntity.d.mts +4 -4
- package/dist/next/client/hooks/useEntity.d.ts +4 -4
- package/dist/next/client/hooks/usePricingTable.d.mts +1 -1
- package/dist/next/client/hooks/usePricingTable.d.ts +1 -1
- package/dist/next/client/{prodTypes-CYd9Q1Rw.d.mts → prodTypes-UFM-PYm-.d.mts} +18 -0
- package/dist/next/client/{prodTypes-CYd9Q1Rw.d.ts → prodTypes-UFM-PYm-.d.ts} +18 -0
- package/dist/next/client/types.d.mts +3 -3
- package/dist/next/client/types.d.ts +3 -3
- 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 +20 -1
- package/dist/next/server/cusActions.d.ts +20 -1
- package/dist/next/server/{cusTypes-wfx--BDG.d.mts → cusTypes-MnneoF1F.d.mts} +36 -0
- package/dist/next/server/{cusTypes-wfx--BDG.d.ts → cusTypes-MnneoF1F.d.ts} +36 -0
- package/dist/next/server/genActions.d.mts +1 -1
- package/dist/next/server/genActions.d.ts +1 -1
- package/dist/sdk/index.d.mts +56 -1
- package/dist/sdk/index.d.ts +56 -1
- package/dist/sdk/index.js +18 -0
- package/dist/sdk/index.mjs +18 -1
- package/dist/utils/encryptUtils.js +17 -0
- package/dist/utils/encryptUtils.mjs +17 -0
- package/package.json +1 -1
- package/dist/libraries/react/{chunk-7JNU5ABT.mjs → chunk-FJWZPMWU.mjs} +3 -3
- package/dist/libraries/react/{chunk-LCWL3TIT.mjs → chunk-OTZ65PCT.mjs} +3 -3
|
@@ -38,6 +38,16 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
38
38
|
next_reset_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
39
39
|
overage_allowed: z.ZodOptional<z.ZodBoolean>;
|
|
40
40
|
usage_limit: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
rollovers: z.ZodOptional<z.ZodObject<{
|
|
42
|
+
balance: z.ZodNumber;
|
|
43
|
+
expires_at: z.ZodNumber;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
balance: number;
|
|
46
|
+
expires_at: number;
|
|
47
|
+
}, {
|
|
48
|
+
balance: number;
|
|
49
|
+
expires_at: number;
|
|
50
|
+
}>>;
|
|
41
51
|
breakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
42
52
|
interval: z.ZodNativeEnum<typeof ProductItemInterval>;
|
|
43
53
|
balance: z.ZodOptional<z.ZodNumber>;
|
|
@@ -68,12 +78,12 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
68
78
|
credit_amount: number;
|
|
69
79
|
}>, "many">>;
|
|
70
80
|
}, "strip", z.ZodTypeAny, {
|
|
71
|
-
allowed: boolean;
|
|
72
|
-
feature_id: string;
|
|
73
81
|
customer_id: string;
|
|
82
|
+
feature_id: string;
|
|
74
83
|
required_balance: number;
|
|
75
|
-
|
|
84
|
+
allowed: boolean;
|
|
76
85
|
entity_id?: string | undefined;
|
|
86
|
+
usage_limit?: number | undefined;
|
|
77
87
|
unlimited?: boolean | undefined;
|
|
78
88
|
interval?: ProductItemInterval | undefined;
|
|
79
89
|
balance?: number | null | undefined;
|
|
@@ -81,6 +91,10 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
81
91
|
included_usage?: number | undefined;
|
|
82
92
|
next_reset_at?: number | null | undefined;
|
|
83
93
|
overage_allowed?: boolean | undefined;
|
|
94
|
+
rollovers?: {
|
|
95
|
+
balance: number;
|
|
96
|
+
expires_at: number;
|
|
97
|
+
} | undefined;
|
|
84
98
|
breakdown?: {
|
|
85
99
|
interval: ProductItemInterval;
|
|
86
100
|
balance?: number | undefined;
|
|
@@ -93,12 +107,12 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
93
107
|
credit_amount: number;
|
|
94
108
|
}[] | undefined;
|
|
95
109
|
}, {
|
|
96
|
-
allowed: boolean;
|
|
97
|
-
feature_id: string;
|
|
98
110
|
customer_id: string;
|
|
111
|
+
feature_id: string;
|
|
99
112
|
required_balance: number;
|
|
100
|
-
|
|
113
|
+
allowed: boolean;
|
|
101
114
|
entity_id?: string | undefined;
|
|
115
|
+
usage_limit?: number | undefined;
|
|
102
116
|
unlimited?: boolean | undefined;
|
|
103
117
|
interval?: ProductItemInterval | undefined;
|
|
104
118
|
balance?: number | null | undefined;
|
|
@@ -106,6 +120,10 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
106
120
|
included_usage?: number | undefined;
|
|
107
121
|
next_reset_at?: number | null | undefined;
|
|
108
122
|
overage_allowed?: boolean | undefined;
|
|
123
|
+
rollovers?: {
|
|
124
|
+
balance: number;
|
|
125
|
+
expires_at: number;
|
|
126
|
+
} | undefined;
|
|
109
127
|
breakdown?: {
|
|
110
128
|
interval: ProductItemInterval;
|
|
111
129
|
balance?: number | undefined;
|
|
@@ -254,6 +272,16 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
254
272
|
next_reset_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
255
273
|
overage_allowed: z.ZodOptional<z.ZodBoolean>;
|
|
256
274
|
usage_limit: z.ZodOptional<z.ZodNumber>;
|
|
275
|
+
rollovers: z.ZodOptional<z.ZodObject<{
|
|
276
|
+
balance: z.ZodNumber;
|
|
277
|
+
expires_at: z.ZodNumber;
|
|
278
|
+
}, "strip", z.ZodTypeAny, {
|
|
279
|
+
balance: number;
|
|
280
|
+
expires_at: number;
|
|
281
|
+
}, {
|
|
282
|
+
balance: number;
|
|
283
|
+
expires_at: number;
|
|
284
|
+
}>>;
|
|
257
285
|
breakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
258
286
|
interval: z.ZodNativeEnum<typeof ProductItemInterval>;
|
|
259
287
|
balance: z.ZodOptional<z.ZodNumber>;
|
|
@@ -292,6 +320,10 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
292
320
|
included_usage?: number | undefined;
|
|
293
321
|
next_reset_at?: number | null | undefined;
|
|
294
322
|
overage_allowed?: boolean | undefined;
|
|
323
|
+
rollovers?: {
|
|
324
|
+
balance: number;
|
|
325
|
+
expires_at: number;
|
|
326
|
+
} | undefined;
|
|
295
327
|
breakdown?: {
|
|
296
328
|
interval: ProductItemInterval;
|
|
297
329
|
balance?: number | undefined;
|
|
@@ -312,6 +344,10 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
312
344
|
included_usage?: number | undefined;
|
|
313
345
|
next_reset_at?: number | null | undefined;
|
|
314
346
|
overage_allowed?: boolean | undefined;
|
|
347
|
+
rollovers?: {
|
|
348
|
+
balance: number;
|
|
349
|
+
expires_at: number;
|
|
350
|
+
} | undefined;
|
|
315
351
|
breakdown?: {
|
|
316
352
|
interval: ProductItemInterval;
|
|
317
353
|
balance?: number | undefined;
|
|
@@ -385,19 +421,19 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
385
421
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
386
422
|
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
|
|
387
423
|
}, "strip", z.ZodTypeAny, {
|
|
388
|
-
|
|
424
|
+
metadata?: Record<string, any> | undefined;
|
|
425
|
+
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
389
426
|
name?: string | null | undefined;
|
|
390
427
|
email?: string | null | undefined;
|
|
391
428
|
fingerprint?: string | null | undefined;
|
|
429
|
+
id?: string | null | undefined;
|
|
430
|
+
}, {
|
|
392
431
|
metadata?: Record<string, any> | undefined;
|
|
393
432
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
394
|
-
}, {
|
|
395
|
-
id?: string | null | undefined;
|
|
396
433
|
name?: string | null | undefined;
|
|
397
434
|
email?: string | null | undefined;
|
|
398
435
|
fingerprint?: string | null | undefined;
|
|
399
|
-
|
|
400
|
-
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
436
|
+
id?: string | null | undefined;
|
|
401
437
|
}>;
|
|
402
438
|
type CreateCustomerParams = z.infer<typeof CreateCustomerParamsSchema>;
|
|
403
439
|
interface UpdateCustomerParams {
|
|
@@ -456,18 +492,18 @@ declare const TrackParamsSchema: z.ZodObject<{
|
|
|
456
492
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
457
493
|
}, "strip", z.ZodTypeAny, {
|
|
458
494
|
customer_id: string;
|
|
459
|
-
feature_id?: string | undefined;
|
|
460
|
-
entity_id?: string | undefined;
|
|
461
495
|
value?: number | undefined;
|
|
496
|
+
entity_id?: string | undefined;
|
|
497
|
+
feature_id?: string | undefined;
|
|
462
498
|
customer_data?: any;
|
|
463
499
|
entity_data?: any;
|
|
464
500
|
event_name?: string | undefined;
|
|
465
501
|
idempotency_key?: string | undefined;
|
|
466
502
|
}, {
|
|
467
503
|
customer_id: string;
|
|
468
|
-
feature_id?: string | undefined;
|
|
469
|
-
entity_id?: string | undefined;
|
|
470
504
|
value?: number | undefined;
|
|
505
|
+
entity_id?: string | undefined;
|
|
506
|
+
feature_id?: string | undefined;
|
|
471
507
|
customer_data?: any;
|
|
472
508
|
entity_data?: any;
|
|
473
509
|
event_name?: string | undefined;
|
|
@@ -495,28 +531,28 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
495
531
|
}>>;
|
|
496
532
|
}, "strip", z.ZodTypeAny, {
|
|
497
533
|
customer_id: string;
|
|
498
|
-
feature_id?: string | undefined;
|
|
499
|
-
entity_id?: string | undefined;
|
|
500
|
-
required_balance?: number | undefined;
|
|
501
534
|
product_id?: string | undefined;
|
|
535
|
+
entity_id?: string | undefined;
|
|
536
|
+
feature_id?: string | undefined;
|
|
502
537
|
customer_data?: any;
|
|
503
538
|
entity_data?: {
|
|
504
539
|
feature_id: string;
|
|
505
540
|
name?: string | undefined;
|
|
506
541
|
} | undefined;
|
|
542
|
+
required_balance?: number | undefined;
|
|
507
543
|
send_event?: boolean | undefined;
|
|
508
544
|
with_preview?: boolean | undefined;
|
|
509
545
|
}, {
|
|
510
546
|
customer_id: string;
|
|
511
|
-
feature_id?: string | undefined;
|
|
512
|
-
entity_id?: string | undefined;
|
|
513
|
-
required_balance?: number | undefined;
|
|
514
547
|
product_id?: string | undefined;
|
|
548
|
+
entity_id?: string | undefined;
|
|
549
|
+
feature_id?: string | undefined;
|
|
515
550
|
customer_data?: any;
|
|
516
551
|
entity_data?: {
|
|
517
552
|
feature_id: string;
|
|
518
553
|
name?: string | undefined;
|
|
519
554
|
} | undefined;
|
|
555
|
+
required_balance?: number | undefined;
|
|
520
556
|
send_event?: boolean | undefined;
|
|
521
557
|
with_preview?: boolean | undefined;
|
|
522
558
|
}>;
|
|
@@ -547,12 +583,12 @@ declare const QueryParamsSchema: z.ZodObject<{
|
|
|
547
583
|
feature_id: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
548
584
|
range: z.ZodOptional<z.ZodEnum<["24h", "7d", "30d", "90d", "last_cycle"]>>;
|
|
549
585
|
}, "strip", z.ZodTypeAny, {
|
|
550
|
-
feature_id: string | string[];
|
|
551
586
|
customer_id: string;
|
|
587
|
+
feature_id: string | string[];
|
|
552
588
|
range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
|
|
553
589
|
}, {
|
|
554
|
-
feature_id: string | string[];
|
|
555
590
|
customer_id: string;
|
|
591
|
+
feature_id: string | string[];
|
|
556
592
|
range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
|
|
557
593
|
}>;
|
|
558
594
|
type QueryParams = z.infer<typeof QueryParamsSchema>;
|
|
@@ -612,13 +648,13 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
612
648
|
reward: z.ZodOptional<z.ZodString>;
|
|
613
649
|
}, "strip", z.ZodTypeAny, {
|
|
614
650
|
customer_id: string;
|
|
615
|
-
entity_id?: string | undefined;
|
|
616
651
|
options?: {
|
|
617
652
|
feature_id: string;
|
|
618
653
|
quantity: number;
|
|
619
654
|
}[] | undefined;
|
|
620
655
|
metadata?: Record<string, string> | undefined;
|
|
621
656
|
product_id?: string | undefined;
|
|
657
|
+
entity_id?: string | undefined;
|
|
622
658
|
product_ids?: string[] | undefined;
|
|
623
659
|
free_trial?: boolean | undefined;
|
|
624
660
|
success_url?: string | undefined;
|
|
@@ -633,13 +669,13 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
633
669
|
reward?: string | undefined;
|
|
634
670
|
}, {
|
|
635
671
|
customer_id: string;
|
|
636
|
-
entity_id?: string | undefined;
|
|
637
672
|
options?: {
|
|
638
673
|
feature_id: string;
|
|
639
674
|
quantity: number;
|
|
640
675
|
}[] | undefined;
|
|
641
676
|
metadata?: Record<string, string> | undefined;
|
|
642
677
|
product_id?: string | undefined;
|
|
678
|
+
entity_id?: string | undefined;
|
|
643
679
|
product_ids?: string[] | undefined;
|
|
644
680
|
free_trial?: boolean | undefined;
|
|
645
681
|
success_url?: string | undefined;
|
|
@@ -688,11 +724,11 @@ declare const CheckoutParamsSchema: z.ZodObject<{
|
|
|
688
724
|
}, "strip", z.ZodTypeAny, {
|
|
689
725
|
customer_id: string;
|
|
690
726
|
product_id: string;
|
|
691
|
-
entity_id?: string | undefined;
|
|
692
727
|
options?: {
|
|
693
728
|
feature_id: string;
|
|
694
729
|
quantity: number;
|
|
695
730
|
}[] | undefined;
|
|
731
|
+
entity_id?: string | undefined;
|
|
696
732
|
success_url?: string | undefined;
|
|
697
733
|
customer_data?: {
|
|
698
734
|
name?: string | null | undefined;
|
|
@@ -705,11 +741,11 @@ declare const CheckoutParamsSchema: z.ZodObject<{
|
|
|
705
741
|
}, {
|
|
706
742
|
customer_id: string;
|
|
707
743
|
product_id: string;
|
|
708
|
-
entity_id?: string | undefined;
|
|
709
744
|
options?: {
|
|
710
745
|
feature_id: string;
|
|
711
746
|
quantity: number;
|
|
712
747
|
}[] | undefined;
|
|
748
|
+
entity_id?: string | undefined;
|
|
713
749
|
success_url?: string | undefined;
|
|
714
750
|
customer_data?: {
|
|
715
751
|
name?: string | null | undefined;
|
|
@@ -775,6 +811,7 @@ declare class Autumn {
|
|
|
775
811
|
static entities: {
|
|
776
812
|
get: (customer_id: string, entity_id: string, params?: GetEntityParams) => Promise<Result<Entity, AutumnError>>;
|
|
777
813
|
create: (customer_id: string, params?: CreateEntityParams | CreateEntityParams[]) => Promise<Result<CreateEntityResult, AutumnError>>;
|
|
814
|
+
transfer: (customer_id: string, params: TransferProductParams) => Promise<Result<TransferProductResult, AutumnError>>;
|
|
778
815
|
delete: (customer_id: string, entity_id: string) => Promise<Result<DeleteEntityResult, AutumnError>>;
|
|
779
816
|
};
|
|
780
817
|
static referrals: {
|
|
@@ -798,6 +835,7 @@ declare class Autumn {
|
|
|
798
835
|
entities: {
|
|
799
836
|
get: (customer_id: string, entity_id: string, params?: GetEntityParams) => Promise<Result<Entity, AutumnError>>;
|
|
800
837
|
create: (customer_id: string, params?: CreateEntityParams | CreateEntityParams[]) => Promise<Result<CreateEntityResult, AutumnError>>;
|
|
838
|
+
transfer: (customer_id: string, params: TransferProductParams) => Promise<Result<TransferProductResult, AutumnError>>;
|
|
801
839
|
delete: (customer_id: string, entity_id: string) => Promise<Result<DeleteEntityResult, AutumnError>>;
|
|
802
840
|
};
|
|
803
841
|
referrals: {
|
|
@@ -807,18 +845,18 @@ declare class Autumn {
|
|
|
807
845
|
static checkout: (params: CheckoutParams) => Promise<Result<CheckoutResult, AutumnError>>;
|
|
808
846
|
checkout(params: CheckoutParams): Promise<Result<CheckoutResult, AutumnError>>;
|
|
809
847
|
static attach: (params: AttachParams) => Promise<Result<{
|
|
810
|
-
customer_id: string;
|
|
811
|
-
code: string;
|
|
812
848
|
message: string;
|
|
849
|
+
code: string;
|
|
850
|
+
customer_id: string;
|
|
813
851
|
product_ids: string[];
|
|
814
852
|
customer_data?: any;
|
|
815
853
|
checkout_url?: string | undefined;
|
|
816
854
|
}, AutumnError>>;
|
|
817
855
|
static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
|
|
818
856
|
attach(params: AttachParams): Promise<Result<{
|
|
819
|
-
customer_id: string;
|
|
820
|
-
code: string;
|
|
821
857
|
message: string;
|
|
858
|
+
code: string;
|
|
859
|
+
customer_id: string;
|
|
822
860
|
product_ids: string[];
|
|
823
861
|
customer_data?: any;
|
|
824
862
|
checkout_url?: string | undefined;
|
|
@@ -838,15 +876,15 @@ declare class Autumn {
|
|
|
838
876
|
static check: (params: CheckParams) => Promise<Result<CheckResult, AutumnError>>;
|
|
839
877
|
check(params: CheckParams): Promise<Result<CheckResult, AutumnError>>;
|
|
840
878
|
static track: (params: TrackParams) => Promise<Result<{
|
|
841
|
-
customer_id: string;
|
|
842
879
|
code: string;
|
|
880
|
+
customer_id: string;
|
|
843
881
|
id: string;
|
|
844
882
|
feature_id?: string | undefined;
|
|
845
883
|
event_name?: string | undefined;
|
|
846
884
|
}, AutumnError>>;
|
|
847
885
|
track(params: TrackParams): Promise<Result<{
|
|
848
|
-
customer_id: string;
|
|
849
886
|
code: string;
|
|
887
|
+
customer_id: string;
|
|
850
888
|
id: string;
|
|
851
889
|
feature_id?: string | undefined;
|
|
852
890
|
event_name?: string | undefined;
|
|
@@ -883,6 +921,23 @@ interface Entity {
|
|
|
883
921
|
features: Record<string, CustomerFeature>;
|
|
884
922
|
invoices?: CustomerInvoice[];
|
|
885
923
|
}
|
|
924
|
+
declare const TransferProductParamsSchema: z.ZodObject<{
|
|
925
|
+
from_entity_id: z.ZodString;
|
|
926
|
+
to_entity_id: z.ZodString;
|
|
927
|
+
product_id: z.ZodString;
|
|
928
|
+
}, "strip", z.ZodTypeAny, {
|
|
929
|
+
product_id: string;
|
|
930
|
+
from_entity_id: string;
|
|
931
|
+
to_entity_id: string;
|
|
932
|
+
}, {
|
|
933
|
+
product_id: string;
|
|
934
|
+
from_entity_id: string;
|
|
935
|
+
to_entity_id: string;
|
|
936
|
+
}>;
|
|
937
|
+
type TransferProductParams = z.infer<typeof TransferProductParamsSchema>;
|
|
938
|
+
type TransferProductResult = {
|
|
939
|
+
success: boolean;
|
|
940
|
+
};
|
|
886
941
|
|
|
887
942
|
declare const CreateReferralCodeParamsSchema: z.ZodObject<{
|
|
888
943
|
customer_id: z.ZodString;
|
|
@@ -899,11 +954,11 @@ declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
|
|
|
899
954
|
code: z.ZodString;
|
|
900
955
|
customer_id: z.ZodString;
|
|
901
956
|
}, "strip", z.ZodTypeAny, {
|
|
902
|
-
customer_id: string;
|
|
903
957
|
code: string;
|
|
904
|
-
}, {
|
|
905
958
|
customer_id: string;
|
|
959
|
+
}, {
|
|
906
960
|
code: string;
|
|
961
|
+
customer_id: string;
|
|
907
962
|
}>;
|
|
908
963
|
type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
|
|
909
964
|
|