autumn-js 0.1.0 → 0.1.2
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 +162 -27
- package/dist/libraries/backend/better-auth.d.ts +162 -27
- package/dist/libraries/backend/better-auth.js +34 -1
- package/dist/libraries/backend/better-auth.mjs +20 -7
- package/dist/libraries/backend/{chunk-O6KXYXQN.mjs → chunk-F4A665AR.mjs} +1 -1
- package/dist/libraries/backend/{chunk-EIP7LDKF.mjs → chunk-GVPYJINB.mjs} +1 -1
- package/dist/libraries/backend/{chunk-N4PGGU3D.mjs → chunk-IG3DW6CW.mjs} +1 -1
- package/dist/libraries/backend/{chunk-BDMGQV75.mjs → chunk-JARFSM7F.mjs} +1 -1
- package/dist/libraries/backend/{chunk-BX2LACTF.mjs → chunk-KYMRM3HV.mjs} +1 -1
- package/dist/libraries/backend/{chunk-QGX7ZACH.mjs → chunk-LYDMLZB7.mjs} +23 -1
- package/dist/libraries/backend/{chunk-WTKY2U3S.mjs → chunk-UZ7WFRWB.mjs} +6 -6
- package/dist/libraries/backend/convex.d.mts +0 -1
- package/dist/libraries/backend/convex.d.ts +0 -1
- package/dist/libraries/backend/convex.js +24 -3
- package/dist/libraries/backend/convex.mjs +9 -9
- package/dist/libraries/backend/elysia.js +22 -1
- package/dist/libraries/backend/elysia.mjs +7 -7
- package/dist/libraries/backend/express.d.mts +2 -2
- package/dist/libraries/backend/express.d.ts +2 -2
- package/dist/libraries/backend/express.js +23 -2
- package/dist/libraries/backend/express.mjs +8 -8
- package/dist/libraries/backend/fastify.js +22 -1
- package/dist/libraries/backend/fastify.mjs +7 -7
- package/dist/libraries/backend/hono.js +22 -1
- 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 +22 -1
- package/dist/libraries/backend/index.mjs +7 -7
- package/dist/libraries/backend/next.js +22 -1
- package/dist/libraries/backend/next.mjs +7 -7
- package/dist/libraries/backend/react-router.d.mts +3 -12
- package/dist/libraries/backend/react-router.d.ts +3 -12
- package/dist/libraries/backend/react-router.js +34 -19
- package/dist/libraries/backend/react-router.mjs +19 -25
- package/dist/libraries/backend/{referralTypes-DHs1hY4_.d.ts → referralTypes-C4KG2r29.d.ts} +66 -41
- package/dist/libraries/backend/{referralTypes-DRsv8not.d.mts → referralTypes-DA9Hp6Bm.d.mts} +66 -41
- package/dist/libraries/backend/remix_dep.js +22 -1
- package/dist/libraries/backend/remix_dep.mjs +7 -7
- package/dist/libraries/backend/routes/backendRouter.js +22 -1
- package/dist/libraries/backend/routes/backendRouter.mjs +7 -7
- package/dist/libraries/backend/routes/entityRoutes.js +22 -1
- package/dist/libraries/backend/routes/entityRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/genRoutes.js +22 -1
- package/dist/libraries/backend/routes/genRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/productRoutes.js +22 -1
- package/dist/libraries/backend/routes/productRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/referralRoutes.js +22 -1
- package/dist/libraries/backend/routes/referralRoutes.mjs +3 -3
- package/dist/libraries/backend/supabase.js +22 -1
- package/dist/libraries/backend/supabase.mjs +7 -7
- package/dist/libraries/backend/tanstack.js +22 -1
- package/dist/libraries/backend/tanstack.mjs +7 -7
- package/dist/libraries/backend/utils/backendRes.js +22 -1
- 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 +22 -1
- 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 +22 -1
- package/dist/libraries/react/AutumnContext.mjs +3 -3
- package/dist/libraries/react/BaseAutumnProvider.d.mts +6 -6
- package/dist/libraries/react/BaseAutumnProvider.d.ts +6 -6
- package/dist/libraries/react/BaseAutumnProvider.js +28 -2
- package/dist/libraries/react/BaseAutumnProvider.mjs +8 -8
- package/dist/libraries/react/{ReactAutumnClient-BK3wjb-u.d.mts → ReactAutumnClient-BHjd9Tw5.d.mts} +17 -17
- package/dist/libraries/react/{ReactAutumnClient-Bh0Sgw6f.d.ts → ReactAutumnClient-DM5ZRTfX.d.ts} +17 -17
- package/dist/libraries/react/ReactAutumnProvider.d.mts +2 -2
- package/dist/libraries/react/ReactAutumnProvider.d.ts +2 -2
- package/dist/libraries/react/ReactAutumnProvider.js +28 -2
- package/dist/libraries/react/ReactAutumnProvider.mjs +9 -9
- package/dist/{next/client/attachTypes-BCt7D8ym.d.ts → libraries/react/attachTypes-Bz1_JTvk.d.ts} +5 -5
- package/dist/{next/client/attachTypes-BThbMcvF.d.mts → libraries/react/attachTypes-C9FJTCo6.d.mts} +5 -5
- package/dist/libraries/react/{chunk-WZG3QTZI.mjs → chunk-4V7CDINI.mjs} +3 -3
- package/dist/libraries/react/{chunk-FEISQQNM.mjs → chunk-5K2M3CQZ.mjs} +1 -1
- package/dist/libraries/react/{chunk-PFN52PHR.mjs → chunk-6D7DZEP5.mjs} +2 -2
- package/dist/libraries/react/{chunk-H4J73SMR.mjs → chunk-B7RO2OAP.mjs} +1 -1
- package/dist/libraries/react/{chunk-FJWZPMWU.mjs → chunk-BXMZYHE7.mjs} +3 -3
- package/dist/libraries/react/{chunk-UCUAGLCJ.mjs → chunk-C5OYITSR.mjs} +1 -1
- package/dist/libraries/react/{chunk-IFZCH7DR.mjs → chunk-F52BIZ4N.mjs} +2 -2
- package/dist/libraries/react/{chunk-4NCB2TMQ.mjs → chunk-G2GXS74H.mjs} +3 -3
- package/dist/libraries/react/{chunk-JLJPPCQJ.mjs → chunk-GKHVCED5.mjs} +2 -2
- package/dist/libraries/react/{chunk-LFLX6NJU.mjs → chunk-JOAOLY2Z.mjs} +1 -1
- package/dist/libraries/react/{chunk-53HYUF2F.mjs → chunk-JZQQJNF6.mjs} +9 -4
- package/dist/libraries/react/{chunk-BGLWB5O2.mjs → chunk-KIKDDSHG.mjs} +428 -425
- package/dist/libraries/react/{chunk-TM3NBNVM.mjs → chunk-KVTXABQL.mjs} +1 -1
- package/dist/libraries/react/{chunk-KUS3X33V.mjs → chunk-M7SUFZ42.mjs} +1 -1
- package/dist/libraries/react/{chunk-OTZ65PCT.mjs → chunk-MN66ZM7X.mjs} +6 -6
- package/dist/libraries/react/{chunk-YWQTQ72B.mjs → chunk-NHDZWWMZ.mjs} +2 -2
- package/dist/libraries/react/{chunk-7RICWVXV.mjs → chunk-NOUNCJRC.mjs} +2 -2
- package/dist/libraries/react/{chunk-UAK4XMNC.mjs → chunk-O2GKDKV5.mjs} +1 -1
- package/dist/libraries/react/{chunk-LMQMA7VL.mjs → chunk-S75NZSTG.mjs} +1 -1
- package/dist/libraries/react/{chunk-CZBWEEWD.mjs → chunk-SRYI4NMF.mjs} +22 -1
- package/dist/libraries/react/{chunk-I2A7PK2L.mjs → chunk-WT5K3J2K.mjs} +17 -17
- package/dist/libraries/react/{chunk-JGDTNJTR.mjs → chunk-YCDNQZT5.mjs} +2 -2
- package/dist/libraries/react/{chunk-MRZA4JWN.mjs → chunk-YI6OTBFN.mjs} +1 -1
- 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 +22 -1
- package/dist/libraries/react/client/ReactAutumnClient.mjs +2 -2
- 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/clientAttachTypes.d.mts +20 -20
- package/dist/libraries/react/client/types/clientAttachTypes.d.ts +20 -20
- package/dist/libraries/react/client/types/clientGenTypes.d.mts +4 -4
- package/dist/libraries/react/client/types/clientGenTypes.d.ts +4 -4
- package/dist/libraries/react/client/types/clientGenTypes.js +22 -1
- 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 +30 -3
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.mjs +28 -28
- 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 +22 -1
- package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.mjs +28 -28
- 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 +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 +30 -3
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +28 -28
- package/dist/libraries/react/components/ui/accordion.mjs +3 -3
- 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 +4 -4
- package/dist/libraries/react/components/ui/popover.mjs +5 -5
- package/dist/libraries/react/components/ui/switch.mjs +3 -3
- package/dist/libraries/react/{cusTypes-Dlt0fQmq.d.mts → cusTypes-DT-gAUL9.d.mts} +5 -5
- package/dist/libraries/react/{cusTypes-eNmWJ2rC.d.ts → cusTypes-yJ0fSxbq.d.ts} +5 -5
- package/dist/libraries/react/{entTypes-B_DvaeRL.d.ts → entTypes-BPdjCunj.d.ts} +1 -1
- package/dist/libraries/react/{entTypes-BDZUfZE_.d.mts → entTypes-D79XPrxo.d.mts} +1 -1
- package/dist/libraries/react/{genTypes-BIPS92_Q.d.mts → genTypes-BV-Jc6Q1.d.mts} +5 -5
- package/dist/libraries/react/{genTypes-Rn-oq2sc.d.ts → genTypes-DJUAkD36.d.ts} +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 +22 -1
- package/dist/libraries/react/hooks/helpers/handleCheck.mjs +2 -2
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.mts +7 -7
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.ts +7 -7
- package/dist/libraries/react/hooks/helpers/useAutumnBase.js +22 -1
- 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 +22 -1
- package/dist/libraries/react/hooks/useAnalytics.mjs +4 -4
- 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 +28 -2
- package/dist/libraries/react/hooks/useCustomer.mjs +8 -8
- 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 +28 -2
- package/dist/libraries/react/hooks/useCustomerBase.mjs +7 -7
- package/dist/libraries/react/hooks/useEntity.d.mts +6 -6
- package/dist/libraries/react/hooks/useEntity.d.ts +6 -6
- package/dist/libraries/react/hooks/useEntity.js +22 -1
- package/dist/libraries/react/hooks/useEntity.mjs +8 -8
- package/dist/libraries/react/hooks/useEntityBase.d.mts +8 -8
- package/dist/libraries/react/hooks/useEntityBase.d.ts +8 -8
- package/dist/libraries/react/hooks/useEntityBase.js +22 -1
- package/dist/libraries/react/hooks/useEntityBase.mjs +7 -7
- 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 +22 -1
- package/dist/libraries/react/hooks/usePaywall.mjs +4 -4
- 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 +22 -1
- package/dist/libraries/react/hooks/usePricingTable.mjs +5 -5
- 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 +22 -1
- 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.js +30 -3
- package/dist/libraries/react/index.mjs +30 -3
- package/dist/libraries/react/{prodTypes-DuLXGCiA.d.mts → prodTypes-2tlu9Pyz.d.mts} +5 -5
- package/dist/libraries/react/{prodTypes-DuLXGCiA.d.ts → prodTypes-2tlu9Pyz.d.ts} +5 -5
- 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-DKmoXHQO.d.mts → next/client/attachTypes-CAvqbMDV.d.mts} +5 -5
- package/dist/{libraries/react/attachTypes-Cy6WgUas.d.ts → next/client/attachTypes-zg5EhNcS.d.ts} +5 -5
- package/dist/next/client/{clientAttachTypes-whHUVrE3.d.mts → clientAttachTypes-B-zWythK.d.mts} +3 -3
- package/dist/next/client/{clientAttachTypes-Df5FVGkw.d.ts → clientAttachTypes-DLh_8bIG.d.ts} +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-CqAsUZEp.d.ts → cusTypes-Crh2qzWb.d.ts} +3 -3
- package/dist/next/client/{cusTypes-BuLw67IH.d.mts → cusTypes-XE8bnuf2.d.mts} +3 -3
- package/dist/next/client/{entTypes-DTRFxh07.d.mts → entTypes-BcoGsNYC.d.mts} +1 -1
- package/dist/next/client/{entTypes-BLLymqnn.d.ts → entTypes-sKOZyw0N.d.ts} +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/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 +17 -15
- package/dist/next/server/cusActions.d.ts +17 -15
- package/dist/next/server/{cusTypes-B0zde-Pl.d.ts → cusTypes-DUjCLJ7f.d.mts} +28 -5
- package/dist/next/server/{cusTypes-B0zde-Pl.d.mts → cusTypes-DUjCLJ7f.d.ts} +28 -5
- package/dist/next/server/genActions.d.mts +1 -1
- package/dist/next/server/genActions.d.ts +1 -1
- package/dist/sdk/index.d.mts +26 -1
- package/dist/sdk/index.d.ts +26 -1
- package/dist/sdk/index.js +23 -1
- package/dist/sdk/index.mjs +23 -2
- package/dist/utils/encryptUtils.js +22 -1
- package/dist/utils/encryptUtils.mjs +22 -1
- package/package.json +2 -1
- package/dist/libraries/react/{chunk-7TYAAD2T.mjs → chunk-KWNH6C27.mjs} +11 -11
- package/dist/next/client/{prodTypes-UFM-PYm-.d.mts → prodTypes-CER0agHK.d.mts} +2 -2
- package/dist/next/client/{prodTypes-UFM-PYm-.d.ts → prodTypes-CER0agHK.d.ts} +2 -2
|
@@ -78,12 +78,12 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
78
78
|
credit_amount: number;
|
|
79
79
|
}>, "many">>;
|
|
80
80
|
}, "strip", z.ZodTypeAny, {
|
|
81
|
-
allowed: boolean;
|
|
82
|
-
feature_id: string;
|
|
83
81
|
customer_id: string;
|
|
82
|
+
feature_id: string;
|
|
84
83
|
required_balance: number;
|
|
85
|
-
|
|
84
|
+
allowed: boolean;
|
|
86
85
|
entity_id?: string | undefined;
|
|
86
|
+
usage_limit?: number | undefined;
|
|
87
87
|
unlimited?: boolean | undefined;
|
|
88
88
|
interval?: ProductItemInterval | undefined;
|
|
89
89
|
balance?: number | null | undefined;
|
|
@@ -107,12 +107,12 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
107
107
|
credit_amount: number;
|
|
108
108
|
}[] | undefined;
|
|
109
109
|
}, {
|
|
110
|
-
allowed: boolean;
|
|
111
|
-
feature_id: string;
|
|
112
110
|
customer_id: string;
|
|
111
|
+
feature_id: string;
|
|
113
112
|
required_balance: number;
|
|
114
|
-
|
|
113
|
+
allowed: boolean;
|
|
115
114
|
entity_id?: string | undefined;
|
|
115
|
+
usage_limit?: number | undefined;
|
|
116
116
|
unlimited?: boolean | undefined;
|
|
117
117
|
interval?: ProductItemInterval | undefined;
|
|
118
118
|
balance?: number | null | undefined;
|
|
@@ -421,19 +421,19 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
421
421
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
422
422
|
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
|
|
423
423
|
}, "strip", z.ZodTypeAny, {
|
|
424
|
-
|
|
424
|
+
metadata?: Record<string, any> | undefined;
|
|
425
|
+
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
425
426
|
name?: string | null | undefined;
|
|
426
427
|
email?: string | null | undefined;
|
|
427
428
|
fingerprint?: string | null | undefined;
|
|
429
|
+
id?: string | null | undefined;
|
|
430
|
+
}, {
|
|
428
431
|
metadata?: Record<string, any> | undefined;
|
|
429
432
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
430
|
-
}, {
|
|
431
|
-
id?: string | null | undefined;
|
|
432
433
|
name?: string | null | undefined;
|
|
433
434
|
email?: string | null | undefined;
|
|
434
435
|
fingerprint?: string | null | undefined;
|
|
435
|
-
|
|
436
|
-
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
436
|
+
id?: string | null | undefined;
|
|
437
437
|
}>;
|
|
438
438
|
type CreateCustomerParams = z.infer<typeof CreateCustomerParamsSchema>;
|
|
439
439
|
interface UpdateCustomerParams {
|
|
@@ -463,6 +463,29 @@ interface CustomerInvoice {
|
|
|
463
463
|
created_at: number;
|
|
464
464
|
hosted_invoice_url: string;
|
|
465
465
|
}
|
|
466
|
+
declare const UpdateBalancesParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
467
|
+
feature_id: z.ZodString;
|
|
468
|
+
value: z.ZodNumber;
|
|
469
|
+
}, "strip", z.ZodTypeAny, {
|
|
470
|
+
value: number;
|
|
471
|
+
feature_id: string;
|
|
472
|
+
}, {
|
|
473
|
+
value: number;
|
|
474
|
+
feature_id: string;
|
|
475
|
+
}>, z.ZodArray<z.ZodObject<{
|
|
476
|
+
feature_id: z.ZodString;
|
|
477
|
+
value: z.ZodNumber;
|
|
478
|
+
}, "strip", z.ZodTypeAny, {
|
|
479
|
+
value: number;
|
|
480
|
+
feature_id: string;
|
|
481
|
+
}, {
|
|
482
|
+
value: number;
|
|
483
|
+
feature_id: string;
|
|
484
|
+
}>, "many">]>;
|
|
485
|
+
type UpdateBalancesParams = z.infer<typeof UpdateBalancesParamsSchema>;
|
|
486
|
+
type UpdateBalancesResult = {
|
|
487
|
+
success: boolean;
|
|
488
|
+
};
|
|
466
489
|
|
|
467
490
|
declare const CancelParamsSchema: z.ZodObject<{
|
|
468
491
|
customer_id: z.ZodString;
|
|
@@ -492,18 +515,18 @@ declare const TrackParamsSchema: z.ZodObject<{
|
|
|
492
515
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
493
516
|
}, "strip", z.ZodTypeAny, {
|
|
494
517
|
customer_id: string;
|
|
495
|
-
feature_id?: string | undefined;
|
|
496
|
-
entity_id?: string | undefined;
|
|
497
518
|
value?: number | undefined;
|
|
519
|
+
entity_id?: string | undefined;
|
|
520
|
+
feature_id?: string | undefined;
|
|
498
521
|
customer_data?: any;
|
|
499
522
|
entity_data?: any;
|
|
500
523
|
event_name?: string | undefined;
|
|
501
524
|
idempotency_key?: string | undefined;
|
|
502
525
|
}, {
|
|
503
526
|
customer_id: string;
|
|
504
|
-
feature_id?: string | undefined;
|
|
505
|
-
entity_id?: string | undefined;
|
|
506
527
|
value?: number | undefined;
|
|
528
|
+
entity_id?: string | undefined;
|
|
529
|
+
feature_id?: string | undefined;
|
|
507
530
|
customer_data?: any;
|
|
508
531
|
entity_data?: any;
|
|
509
532
|
event_name?: string | undefined;
|
|
@@ -531,28 +554,28 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
531
554
|
}>>;
|
|
532
555
|
}, "strip", z.ZodTypeAny, {
|
|
533
556
|
customer_id: string;
|
|
534
|
-
feature_id?: string | undefined;
|
|
535
|
-
entity_id?: string | undefined;
|
|
536
|
-
required_balance?: number | undefined;
|
|
537
557
|
product_id?: string | undefined;
|
|
558
|
+
entity_id?: string | undefined;
|
|
559
|
+
feature_id?: string | undefined;
|
|
538
560
|
customer_data?: any;
|
|
539
561
|
entity_data?: {
|
|
540
562
|
feature_id: string;
|
|
541
563
|
name?: string | undefined;
|
|
542
564
|
} | undefined;
|
|
565
|
+
required_balance?: number | undefined;
|
|
543
566
|
send_event?: boolean | undefined;
|
|
544
567
|
with_preview?: boolean | undefined;
|
|
545
568
|
}, {
|
|
546
569
|
customer_id: string;
|
|
547
|
-
feature_id?: string | undefined;
|
|
548
|
-
entity_id?: string | undefined;
|
|
549
|
-
required_balance?: number | undefined;
|
|
550
570
|
product_id?: string | undefined;
|
|
571
|
+
entity_id?: string | undefined;
|
|
572
|
+
feature_id?: string | undefined;
|
|
551
573
|
customer_data?: any;
|
|
552
574
|
entity_data?: {
|
|
553
575
|
feature_id: string;
|
|
554
576
|
name?: string | undefined;
|
|
555
577
|
} | undefined;
|
|
578
|
+
required_balance?: number | undefined;
|
|
556
579
|
send_event?: boolean | undefined;
|
|
557
580
|
with_preview?: boolean | undefined;
|
|
558
581
|
}>;
|
|
@@ -583,12 +606,12 @@ declare const QueryParamsSchema: z.ZodObject<{
|
|
|
583
606
|
feature_id: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
584
607
|
range: z.ZodOptional<z.ZodEnum<["24h", "7d", "30d", "90d", "last_cycle"]>>;
|
|
585
608
|
}, "strip", z.ZodTypeAny, {
|
|
586
|
-
feature_id: string | string[];
|
|
587
609
|
customer_id: string;
|
|
610
|
+
feature_id: string | string[];
|
|
588
611
|
range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
|
|
589
612
|
}, {
|
|
590
|
-
feature_id: string | string[];
|
|
591
613
|
customer_id: string;
|
|
614
|
+
feature_id: string | string[];
|
|
592
615
|
range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
|
|
593
616
|
}>;
|
|
594
617
|
type QueryParams = z.infer<typeof QueryParamsSchema>;
|
|
@@ -648,17 +671,14 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
648
671
|
reward: z.ZodOptional<z.ZodString>;
|
|
649
672
|
}, "strip", z.ZodTypeAny, {
|
|
650
673
|
customer_id: string;
|
|
651
|
-
entity_id?: string | undefined;
|
|
652
674
|
options?: {
|
|
653
675
|
feature_id: string;
|
|
654
676
|
quantity: number;
|
|
655
677
|
}[] | undefined;
|
|
656
678
|
metadata?: Record<string, string> | undefined;
|
|
657
679
|
product_id?: string | undefined;
|
|
658
|
-
|
|
659
|
-
free_trial?: boolean | undefined;
|
|
680
|
+
entity_id?: string | undefined;
|
|
660
681
|
success_url?: string | undefined;
|
|
661
|
-
force_checkout?: boolean | undefined;
|
|
662
682
|
customer_data?: {
|
|
663
683
|
name?: string | null | undefined;
|
|
664
684
|
email?: string | null | undefined;
|
|
@@ -667,19 +687,19 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
667
687
|
entity_data?: any;
|
|
668
688
|
checkout_session_params?: Record<string, any> | undefined;
|
|
669
689
|
reward?: string | undefined;
|
|
690
|
+
product_ids?: string[] | undefined;
|
|
691
|
+
free_trial?: boolean | undefined;
|
|
692
|
+
force_checkout?: boolean | undefined;
|
|
670
693
|
}, {
|
|
671
694
|
customer_id: string;
|
|
672
|
-
entity_id?: string | undefined;
|
|
673
695
|
options?: {
|
|
674
696
|
feature_id: string;
|
|
675
697
|
quantity: number;
|
|
676
698
|
}[] | undefined;
|
|
677
699
|
metadata?: Record<string, string> | undefined;
|
|
678
700
|
product_id?: string | undefined;
|
|
679
|
-
|
|
680
|
-
free_trial?: boolean | undefined;
|
|
701
|
+
entity_id?: string | undefined;
|
|
681
702
|
success_url?: string | undefined;
|
|
682
|
-
force_checkout?: boolean | undefined;
|
|
683
703
|
customer_data?: {
|
|
684
704
|
name?: string | null | undefined;
|
|
685
705
|
email?: string | null | undefined;
|
|
@@ -688,6 +708,9 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
688
708
|
entity_data?: any;
|
|
689
709
|
checkout_session_params?: Record<string, any> | undefined;
|
|
690
710
|
reward?: string | undefined;
|
|
711
|
+
product_ids?: string[] | undefined;
|
|
712
|
+
free_trial?: boolean | undefined;
|
|
713
|
+
force_checkout?: boolean | undefined;
|
|
691
714
|
}>;
|
|
692
715
|
type AttachParams = z.infer<typeof AttachParamsSchema>;
|
|
693
716
|
declare const CheckoutParamsSchema: z.ZodObject<{
|
|
@@ -724,11 +747,11 @@ declare const CheckoutParamsSchema: z.ZodObject<{
|
|
|
724
747
|
}, "strip", z.ZodTypeAny, {
|
|
725
748
|
customer_id: string;
|
|
726
749
|
product_id: string;
|
|
727
|
-
entity_id?: string | undefined;
|
|
728
750
|
options?: {
|
|
729
751
|
feature_id: string;
|
|
730
752
|
quantity: number;
|
|
731
753
|
}[] | undefined;
|
|
754
|
+
entity_id?: string | undefined;
|
|
732
755
|
success_url?: string | undefined;
|
|
733
756
|
customer_data?: {
|
|
734
757
|
name?: string | null | undefined;
|
|
@@ -741,11 +764,11 @@ declare const CheckoutParamsSchema: z.ZodObject<{
|
|
|
741
764
|
}, {
|
|
742
765
|
customer_id: string;
|
|
743
766
|
product_id: string;
|
|
744
|
-
entity_id?: string | undefined;
|
|
745
767
|
options?: {
|
|
746
768
|
feature_id: string;
|
|
747
769
|
quantity: number;
|
|
748
770
|
}[] | undefined;
|
|
771
|
+
entity_id?: string | undefined;
|
|
749
772
|
success_url?: string | undefined;
|
|
750
773
|
customer_data?: {
|
|
751
774
|
name?: string | null | undefined;
|
|
@@ -800,6 +823,7 @@ declare class Autumn {
|
|
|
800
823
|
update: (id: string, params: UpdateCustomerParams) => Promise<Result<Customer, AutumnError>>;
|
|
801
824
|
delete: (id: string) => Promise<Result<Customer, AutumnError>>;
|
|
802
825
|
billingPortal: (id: string, params?: BillingPortalParams) => Promise<Result<BillingPortalResult, AutumnError>>;
|
|
826
|
+
updateBalances: (id: string, params: UpdateBalancesParams) => Promise<Result<UpdateBalancesResult, AutumnError>>;
|
|
803
827
|
};
|
|
804
828
|
static products: {
|
|
805
829
|
get: (id: string) => Promise<Result<Product, AutumnError>>;
|
|
@@ -824,6 +848,7 @@ declare class Autumn {
|
|
|
824
848
|
update: (id: string, params: UpdateCustomerParams) => Promise<Result<Customer, AutumnError>>;
|
|
825
849
|
delete: (id: string) => Promise<Result<Customer, AutumnError>>;
|
|
826
850
|
billingPortal: (id: string, params?: BillingPortalParams) => Promise<Result<BillingPortalResult, AutumnError>>;
|
|
851
|
+
updateBalances: (id: string, params: UpdateBalancesParams) => Promise<Result<UpdateBalancesResult, AutumnError>>;
|
|
827
852
|
};
|
|
828
853
|
products: {
|
|
829
854
|
get: (id: string) => Promise<Result<Product, AutumnError>>;
|
|
@@ -845,18 +870,18 @@ declare class Autumn {
|
|
|
845
870
|
static checkout: (params: CheckoutParams) => Promise<Result<CheckoutResult, AutumnError>>;
|
|
846
871
|
checkout(params: CheckoutParams): Promise<Result<CheckoutResult, AutumnError>>;
|
|
847
872
|
static attach: (params: AttachParams) => Promise<Result<{
|
|
848
|
-
customer_id: string;
|
|
849
|
-
code: string;
|
|
850
873
|
message: string;
|
|
874
|
+
code: string;
|
|
875
|
+
customer_id: string;
|
|
851
876
|
product_ids: string[];
|
|
852
877
|
customer_data?: any;
|
|
853
878
|
checkout_url?: string | undefined;
|
|
854
879
|
}, AutumnError>>;
|
|
855
880
|
static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
|
|
856
881
|
attach(params: AttachParams): Promise<Result<{
|
|
857
|
-
customer_id: string;
|
|
858
|
-
code: string;
|
|
859
882
|
message: string;
|
|
883
|
+
code: string;
|
|
884
|
+
customer_id: string;
|
|
860
885
|
product_ids: string[];
|
|
861
886
|
customer_data?: any;
|
|
862
887
|
checkout_url?: string | undefined;
|
|
@@ -876,15 +901,15 @@ declare class Autumn {
|
|
|
876
901
|
static check: (params: CheckParams) => Promise<Result<CheckResult, AutumnError>>;
|
|
877
902
|
check(params: CheckParams): Promise<Result<CheckResult, AutumnError>>;
|
|
878
903
|
static track: (params: TrackParams) => Promise<Result<{
|
|
879
|
-
customer_id: string;
|
|
880
904
|
code: string;
|
|
905
|
+
customer_id: string;
|
|
881
906
|
id: string;
|
|
882
907
|
feature_id?: string | undefined;
|
|
883
908
|
event_name?: string | undefined;
|
|
884
909
|
}, AutumnError>>;
|
|
885
910
|
track(params: TrackParams): Promise<Result<{
|
|
886
|
-
customer_id: string;
|
|
887
911
|
code: string;
|
|
912
|
+
customer_id: string;
|
|
888
913
|
id: string;
|
|
889
914
|
feature_id?: string | undefined;
|
|
890
915
|
event_name?: string | undefined;
|
|
@@ -954,11 +979,11 @@ declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
|
|
|
954
979
|
code: z.ZodString;
|
|
955
980
|
customer_id: z.ZodString;
|
|
956
981
|
}, "strip", z.ZodTypeAny, {
|
|
957
|
-
customer_id: string;
|
|
958
982
|
code: string;
|
|
959
|
-
}, {
|
|
960
983
|
customer_id: string;
|
|
984
|
+
}, {
|
|
961
985
|
code: string;
|
|
986
|
+
customer_id: string;
|
|
962
987
|
}>;
|
|
963
988
|
type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
|
|
964
989
|
|
package/dist/libraries/backend/{referralTypes-DRsv8not.d.mts → referralTypes-DA9Hp6Bm.d.mts}
RENAMED
|
@@ -78,12 +78,12 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
78
78
|
credit_amount: number;
|
|
79
79
|
}>, "many">>;
|
|
80
80
|
}, "strip", z.ZodTypeAny, {
|
|
81
|
-
allowed: boolean;
|
|
82
|
-
feature_id: string;
|
|
83
81
|
customer_id: string;
|
|
82
|
+
feature_id: string;
|
|
84
83
|
required_balance: number;
|
|
85
|
-
|
|
84
|
+
allowed: boolean;
|
|
86
85
|
entity_id?: string | undefined;
|
|
86
|
+
usage_limit?: number | undefined;
|
|
87
87
|
unlimited?: boolean | undefined;
|
|
88
88
|
interval?: ProductItemInterval | undefined;
|
|
89
89
|
balance?: number | null | undefined;
|
|
@@ -107,12 +107,12 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
107
107
|
credit_amount: number;
|
|
108
108
|
}[] | undefined;
|
|
109
109
|
}, {
|
|
110
|
-
allowed: boolean;
|
|
111
|
-
feature_id: string;
|
|
112
110
|
customer_id: string;
|
|
111
|
+
feature_id: string;
|
|
113
112
|
required_balance: number;
|
|
114
|
-
|
|
113
|
+
allowed: boolean;
|
|
115
114
|
entity_id?: string | undefined;
|
|
115
|
+
usage_limit?: number | undefined;
|
|
116
116
|
unlimited?: boolean | undefined;
|
|
117
117
|
interval?: ProductItemInterval | undefined;
|
|
118
118
|
balance?: number | null | undefined;
|
|
@@ -421,19 +421,19 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
421
421
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
422
422
|
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
|
|
423
423
|
}, "strip", z.ZodTypeAny, {
|
|
424
|
-
|
|
424
|
+
metadata?: Record<string, any> | undefined;
|
|
425
|
+
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
425
426
|
name?: string | null | undefined;
|
|
426
427
|
email?: string | null | undefined;
|
|
427
428
|
fingerprint?: string | null | undefined;
|
|
429
|
+
id?: string | null | undefined;
|
|
430
|
+
}, {
|
|
428
431
|
metadata?: Record<string, any> | undefined;
|
|
429
432
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
430
|
-
}, {
|
|
431
|
-
id?: string | null | undefined;
|
|
432
433
|
name?: string | null | undefined;
|
|
433
434
|
email?: string | null | undefined;
|
|
434
435
|
fingerprint?: string | null | undefined;
|
|
435
|
-
|
|
436
|
-
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
436
|
+
id?: string | null | undefined;
|
|
437
437
|
}>;
|
|
438
438
|
type CreateCustomerParams = z.infer<typeof CreateCustomerParamsSchema>;
|
|
439
439
|
interface UpdateCustomerParams {
|
|
@@ -463,6 +463,29 @@ interface CustomerInvoice {
|
|
|
463
463
|
created_at: number;
|
|
464
464
|
hosted_invoice_url: string;
|
|
465
465
|
}
|
|
466
|
+
declare const UpdateBalancesParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
467
|
+
feature_id: z.ZodString;
|
|
468
|
+
value: z.ZodNumber;
|
|
469
|
+
}, "strip", z.ZodTypeAny, {
|
|
470
|
+
value: number;
|
|
471
|
+
feature_id: string;
|
|
472
|
+
}, {
|
|
473
|
+
value: number;
|
|
474
|
+
feature_id: string;
|
|
475
|
+
}>, z.ZodArray<z.ZodObject<{
|
|
476
|
+
feature_id: z.ZodString;
|
|
477
|
+
value: z.ZodNumber;
|
|
478
|
+
}, "strip", z.ZodTypeAny, {
|
|
479
|
+
value: number;
|
|
480
|
+
feature_id: string;
|
|
481
|
+
}, {
|
|
482
|
+
value: number;
|
|
483
|
+
feature_id: string;
|
|
484
|
+
}>, "many">]>;
|
|
485
|
+
type UpdateBalancesParams = z.infer<typeof UpdateBalancesParamsSchema>;
|
|
486
|
+
type UpdateBalancesResult = {
|
|
487
|
+
success: boolean;
|
|
488
|
+
};
|
|
466
489
|
|
|
467
490
|
declare const CancelParamsSchema: z.ZodObject<{
|
|
468
491
|
customer_id: z.ZodString;
|
|
@@ -492,18 +515,18 @@ declare const TrackParamsSchema: z.ZodObject<{
|
|
|
492
515
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
493
516
|
}, "strip", z.ZodTypeAny, {
|
|
494
517
|
customer_id: string;
|
|
495
|
-
feature_id?: string | undefined;
|
|
496
|
-
entity_id?: string | undefined;
|
|
497
518
|
value?: number | undefined;
|
|
519
|
+
entity_id?: string | undefined;
|
|
520
|
+
feature_id?: string | undefined;
|
|
498
521
|
customer_data?: any;
|
|
499
522
|
entity_data?: any;
|
|
500
523
|
event_name?: string | undefined;
|
|
501
524
|
idempotency_key?: string | undefined;
|
|
502
525
|
}, {
|
|
503
526
|
customer_id: string;
|
|
504
|
-
feature_id?: string | undefined;
|
|
505
|
-
entity_id?: string | undefined;
|
|
506
527
|
value?: number | undefined;
|
|
528
|
+
entity_id?: string | undefined;
|
|
529
|
+
feature_id?: string | undefined;
|
|
507
530
|
customer_data?: any;
|
|
508
531
|
entity_data?: any;
|
|
509
532
|
event_name?: string | undefined;
|
|
@@ -531,28 +554,28 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
531
554
|
}>>;
|
|
532
555
|
}, "strip", z.ZodTypeAny, {
|
|
533
556
|
customer_id: string;
|
|
534
|
-
feature_id?: string | undefined;
|
|
535
|
-
entity_id?: string | undefined;
|
|
536
|
-
required_balance?: number | undefined;
|
|
537
557
|
product_id?: string | undefined;
|
|
558
|
+
entity_id?: string | undefined;
|
|
559
|
+
feature_id?: string | undefined;
|
|
538
560
|
customer_data?: any;
|
|
539
561
|
entity_data?: {
|
|
540
562
|
feature_id: string;
|
|
541
563
|
name?: string | undefined;
|
|
542
564
|
} | undefined;
|
|
565
|
+
required_balance?: number | undefined;
|
|
543
566
|
send_event?: boolean | undefined;
|
|
544
567
|
with_preview?: boolean | undefined;
|
|
545
568
|
}, {
|
|
546
569
|
customer_id: string;
|
|
547
|
-
feature_id?: string | undefined;
|
|
548
|
-
entity_id?: string | undefined;
|
|
549
|
-
required_balance?: number | undefined;
|
|
550
570
|
product_id?: string | undefined;
|
|
571
|
+
entity_id?: string | undefined;
|
|
572
|
+
feature_id?: string | undefined;
|
|
551
573
|
customer_data?: any;
|
|
552
574
|
entity_data?: {
|
|
553
575
|
feature_id: string;
|
|
554
576
|
name?: string | undefined;
|
|
555
577
|
} | undefined;
|
|
578
|
+
required_balance?: number | undefined;
|
|
556
579
|
send_event?: boolean | undefined;
|
|
557
580
|
with_preview?: boolean | undefined;
|
|
558
581
|
}>;
|
|
@@ -583,12 +606,12 @@ declare const QueryParamsSchema: z.ZodObject<{
|
|
|
583
606
|
feature_id: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
584
607
|
range: z.ZodOptional<z.ZodEnum<["24h", "7d", "30d", "90d", "last_cycle"]>>;
|
|
585
608
|
}, "strip", z.ZodTypeAny, {
|
|
586
|
-
feature_id: string | string[];
|
|
587
609
|
customer_id: string;
|
|
610
|
+
feature_id: string | string[];
|
|
588
611
|
range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
|
|
589
612
|
}, {
|
|
590
|
-
feature_id: string | string[];
|
|
591
613
|
customer_id: string;
|
|
614
|
+
feature_id: string | string[];
|
|
592
615
|
range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
|
|
593
616
|
}>;
|
|
594
617
|
type QueryParams = z.infer<typeof QueryParamsSchema>;
|
|
@@ -648,17 +671,14 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
648
671
|
reward: z.ZodOptional<z.ZodString>;
|
|
649
672
|
}, "strip", z.ZodTypeAny, {
|
|
650
673
|
customer_id: string;
|
|
651
|
-
entity_id?: string | undefined;
|
|
652
674
|
options?: {
|
|
653
675
|
feature_id: string;
|
|
654
676
|
quantity: number;
|
|
655
677
|
}[] | undefined;
|
|
656
678
|
metadata?: Record<string, string> | undefined;
|
|
657
679
|
product_id?: string | undefined;
|
|
658
|
-
|
|
659
|
-
free_trial?: boolean | undefined;
|
|
680
|
+
entity_id?: string | undefined;
|
|
660
681
|
success_url?: string | undefined;
|
|
661
|
-
force_checkout?: boolean | undefined;
|
|
662
682
|
customer_data?: {
|
|
663
683
|
name?: string | null | undefined;
|
|
664
684
|
email?: string | null | undefined;
|
|
@@ -667,19 +687,19 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
667
687
|
entity_data?: any;
|
|
668
688
|
checkout_session_params?: Record<string, any> | undefined;
|
|
669
689
|
reward?: string | undefined;
|
|
690
|
+
product_ids?: string[] | undefined;
|
|
691
|
+
free_trial?: boolean | undefined;
|
|
692
|
+
force_checkout?: boolean | undefined;
|
|
670
693
|
}, {
|
|
671
694
|
customer_id: string;
|
|
672
|
-
entity_id?: string | undefined;
|
|
673
695
|
options?: {
|
|
674
696
|
feature_id: string;
|
|
675
697
|
quantity: number;
|
|
676
698
|
}[] | undefined;
|
|
677
699
|
metadata?: Record<string, string> | undefined;
|
|
678
700
|
product_id?: string | undefined;
|
|
679
|
-
|
|
680
|
-
free_trial?: boolean | undefined;
|
|
701
|
+
entity_id?: string | undefined;
|
|
681
702
|
success_url?: string | undefined;
|
|
682
|
-
force_checkout?: boolean | undefined;
|
|
683
703
|
customer_data?: {
|
|
684
704
|
name?: string | null | undefined;
|
|
685
705
|
email?: string | null | undefined;
|
|
@@ -688,6 +708,9 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
688
708
|
entity_data?: any;
|
|
689
709
|
checkout_session_params?: Record<string, any> | undefined;
|
|
690
710
|
reward?: string | undefined;
|
|
711
|
+
product_ids?: string[] | undefined;
|
|
712
|
+
free_trial?: boolean | undefined;
|
|
713
|
+
force_checkout?: boolean | undefined;
|
|
691
714
|
}>;
|
|
692
715
|
type AttachParams = z.infer<typeof AttachParamsSchema>;
|
|
693
716
|
declare const CheckoutParamsSchema: z.ZodObject<{
|
|
@@ -724,11 +747,11 @@ declare const CheckoutParamsSchema: z.ZodObject<{
|
|
|
724
747
|
}, "strip", z.ZodTypeAny, {
|
|
725
748
|
customer_id: string;
|
|
726
749
|
product_id: string;
|
|
727
|
-
entity_id?: string | undefined;
|
|
728
750
|
options?: {
|
|
729
751
|
feature_id: string;
|
|
730
752
|
quantity: number;
|
|
731
753
|
}[] | undefined;
|
|
754
|
+
entity_id?: string | undefined;
|
|
732
755
|
success_url?: string | undefined;
|
|
733
756
|
customer_data?: {
|
|
734
757
|
name?: string | null | undefined;
|
|
@@ -741,11 +764,11 @@ declare const CheckoutParamsSchema: z.ZodObject<{
|
|
|
741
764
|
}, {
|
|
742
765
|
customer_id: string;
|
|
743
766
|
product_id: string;
|
|
744
|
-
entity_id?: string | undefined;
|
|
745
767
|
options?: {
|
|
746
768
|
feature_id: string;
|
|
747
769
|
quantity: number;
|
|
748
770
|
}[] | undefined;
|
|
771
|
+
entity_id?: string | undefined;
|
|
749
772
|
success_url?: string | undefined;
|
|
750
773
|
customer_data?: {
|
|
751
774
|
name?: string | null | undefined;
|
|
@@ -800,6 +823,7 @@ declare class Autumn {
|
|
|
800
823
|
update: (id: string, params: UpdateCustomerParams) => Promise<Result<Customer, AutumnError>>;
|
|
801
824
|
delete: (id: string) => Promise<Result<Customer, AutumnError>>;
|
|
802
825
|
billingPortal: (id: string, params?: BillingPortalParams) => Promise<Result<BillingPortalResult, AutumnError>>;
|
|
826
|
+
updateBalances: (id: string, params: UpdateBalancesParams) => Promise<Result<UpdateBalancesResult, AutumnError>>;
|
|
803
827
|
};
|
|
804
828
|
static products: {
|
|
805
829
|
get: (id: string) => Promise<Result<Product, AutumnError>>;
|
|
@@ -824,6 +848,7 @@ declare class Autumn {
|
|
|
824
848
|
update: (id: string, params: UpdateCustomerParams) => Promise<Result<Customer, AutumnError>>;
|
|
825
849
|
delete: (id: string) => Promise<Result<Customer, AutumnError>>;
|
|
826
850
|
billingPortal: (id: string, params?: BillingPortalParams) => Promise<Result<BillingPortalResult, AutumnError>>;
|
|
851
|
+
updateBalances: (id: string, params: UpdateBalancesParams) => Promise<Result<UpdateBalancesResult, AutumnError>>;
|
|
827
852
|
};
|
|
828
853
|
products: {
|
|
829
854
|
get: (id: string) => Promise<Result<Product, AutumnError>>;
|
|
@@ -845,18 +870,18 @@ declare class Autumn {
|
|
|
845
870
|
static checkout: (params: CheckoutParams) => Promise<Result<CheckoutResult, AutumnError>>;
|
|
846
871
|
checkout(params: CheckoutParams): Promise<Result<CheckoutResult, AutumnError>>;
|
|
847
872
|
static attach: (params: AttachParams) => Promise<Result<{
|
|
848
|
-
customer_id: string;
|
|
849
|
-
code: string;
|
|
850
873
|
message: string;
|
|
874
|
+
code: string;
|
|
875
|
+
customer_id: string;
|
|
851
876
|
product_ids: string[];
|
|
852
877
|
customer_data?: any;
|
|
853
878
|
checkout_url?: string | undefined;
|
|
854
879
|
}, AutumnError>>;
|
|
855
880
|
static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
|
|
856
881
|
attach(params: AttachParams): Promise<Result<{
|
|
857
|
-
customer_id: string;
|
|
858
|
-
code: string;
|
|
859
882
|
message: string;
|
|
883
|
+
code: string;
|
|
884
|
+
customer_id: string;
|
|
860
885
|
product_ids: string[];
|
|
861
886
|
customer_data?: any;
|
|
862
887
|
checkout_url?: string | undefined;
|
|
@@ -876,15 +901,15 @@ declare class Autumn {
|
|
|
876
901
|
static check: (params: CheckParams) => Promise<Result<CheckResult, AutumnError>>;
|
|
877
902
|
check(params: CheckParams): Promise<Result<CheckResult, AutumnError>>;
|
|
878
903
|
static track: (params: TrackParams) => Promise<Result<{
|
|
879
|
-
customer_id: string;
|
|
880
904
|
code: string;
|
|
905
|
+
customer_id: string;
|
|
881
906
|
id: string;
|
|
882
907
|
feature_id?: string | undefined;
|
|
883
908
|
event_name?: string | undefined;
|
|
884
909
|
}, AutumnError>>;
|
|
885
910
|
track(params: TrackParams): Promise<Result<{
|
|
886
|
-
customer_id: string;
|
|
887
911
|
code: string;
|
|
912
|
+
customer_id: string;
|
|
888
913
|
id: string;
|
|
889
914
|
feature_id?: string | undefined;
|
|
890
915
|
event_name?: string | undefined;
|
|
@@ -954,11 +979,11 @@ declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
|
|
|
954
979
|
code: z.ZodString;
|
|
955
980
|
customer_id: z.ZodString;
|
|
956
981
|
}, "strip", z.ZodTypeAny, {
|
|
957
|
-
customer_id: string;
|
|
958
982
|
code: string;
|
|
959
|
-
}, {
|
|
960
983
|
customer_id: string;
|
|
984
|
+
}, {
|
|
961
985
|
code: string;
|
|
986
|
+
customer_id: string;
|
|
962
987
|
}>;
|
|
963
988
|
type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
|
|
964
989
|
|
|
@@ -119,7 +119,8 @@ var customerMethods = (instance) => {
|
|
|
119
119
|
create: (params) => staticWrapper(createCustomer, instance, { params }),
|
|
120
120
|
update: (id, params) => staticWrapper(updateCustomer, instance, { id, params }),
|
|
121
121
|
delete: (id) => staticWrapper(deleteCustomer, instance, { id }),
|
|
122
|
-
billingPortal: (id, params) => staticWrapper(billingPortal, instance, { id, params })
|
|
122
|
+
billingPortal: (id, params) => staticWrapper(billingPortal, instance, { id, params }),
|
|
123
|
+
updateBalances: (id, params) => staticWrapper(updateBalances, instance, { id, params })
|
|
123
124
|
};
|
|
124
125
|
};
|
|
125
126
|
var getExpandStr = (expand) => {
|
|
@@ -170,6 +171,15 @@ var billingPortal = async ({
|
|
|
170
171
|
}) => {
|
|
171
172
|
return instance.post(`/customers/${id}/billing_portal`, params);
|
|
172
173
|
};
|
|
174
|
+
var updateBalances = async ({
|
|
175
|
+
instance,
|
|
176
|
+
id,
|
|
177
|
+
params
|
|
178
|
+
}) => {
|
|
179
|
+
return instance.post(`/customers/${id}/balances`, {
|
|
180
|
+
balances: Array.isArray(params) ? params : [params]
|
|
181
|
+
});
|
|
182
|
+
};
|
|
173
183
|
|
|
174
184
|
// src/sdk/customers/entities/entMethods.ts
|
|
175
185
|
var entityMethods = (instance) => {
|
|
@@ -565,6 +575,17 @@ var CreateCustomerParamsSchema = import_zod2.z.object({
|
|
|
565
575
|
var BillingPortalParamsSchema = import_zod2.z.object({
|
|
566
576
|
return_url: import_zod2.z.string().optional()
|
|
567
577
|
});
|
|
578
|
+
var UpdateBalancesParamsSchema = import_zod2.z.object({
|
|
579
|
+
feature_id: import_zod2.z.string(),
|
|
580
|
+
value: import_zod2.z.number()
|
|
581
|
+
}).or(
|
|
582
|
+
import_zod2.z.array(
|
|
583
|
+
import_zod2.z.object({
|
|
584
|
+
feature_id: import_zod2.z.string(),
|
|
585
|
+
value: import_zod2.z.number()
|
|
586
|
+
})
|
|
587
|
+
)
|
|
588
|
+
);
|
|
568
589
|
|
|
569
590
|
// src/sdk/general/checkTypes.ts
|
|
570
591
|
var import_zod3 = require("zod");
|
|
@@ -1,14 +1,14 @@
|
|
|
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-UZ7WFRWB.mjs";
|
|
4
|
+
import "./chunk-GVPYJINB.mjs";
|
|
5
|
+
import "./chunk-KYMRM3HV.mjs";
|
|
6
|
+
import "./chunk-IG3DW6CW.mjs";
|
|
7
|
+
import "./chunk-JARFSM7F.mjs";
|
|
8
|
+
import "./chunk-F4A665AR.mjs";
|
|
9
9
|
import {
|
|
10
10
|
Autumn
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-LYDMLZB7.mjs";
|
|
12
12
|
import "./chunk-2TEL6LR5.mjs";
|
|
13
13
|
import {
|
|
14
14
|
autumnApiUrl
|