autumn-js 0.1.17 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/libraries/backend/better-auth.d.mts +28 -28
- package/dist/libraries/backend/better-auth.d.ts +28 -28
- package/dist/libraries/backend/express.d.mts +1 -1
- package/dist/libraries/backend/express.d.ts +1 -1
- package/dist/libraries/backend/index.d.mts +1 -1
- package/dist/libraries/backend/index.d.ts +1 -1
- package/dist/libraries/backend/{referralTypes-bzPW4Cz9.d.mts → referralTypes-9uVrgXY-.d.mts} +11 -0
- package/dist/libraries/backend/{referralTypes-DBmabd9O.d.ts → referralTypes-DJwOFSeK.d.ts} +11 -0
- package/dist/libraries/backend/utils/withAuth.d.mts +1 -1
- package/dist/libraries/backend/utils/withAuth.d.ts +1 -1
- package/dist/libraries/react/AutumnContext.d.mts +3 -3
- package/dist/libraries/react/AutumnContext.d.ts +3 -3
- package/dist/libraries/react/BaseAutumnProvider.d.mts +3 -3
- package/dist/libraries/react/BaseAutumnProvider.d.ts +3 -3
- package/dist/libraries/react/BaseAutumnProvider.js +5 -0
- package/dist/libraries/react/BaseAutumnProvider.mjs +3 -3
- package/dist/libraries/react/{ReactAutumnClient-CqDsfKHI.d.ts → ReactAutumnClient-BxDUcOLV.d.ts} +3 -4
- package/dist/libraries/react/{ReactAutumnClient-DxzJiNXI.d.mts → ReactAutumnClient-C-ybqq9t.d.mts} +3 -4
- package/dist/libraries/react/ReactAutumnProvider.d.mts +1 -1
- package/dist/libraries/react/ReactAutumnProvider.d.ts +1 -1
- package/dist/libraries/react/ReactAutumnProvider.js +5 -0
- package/dist/libraries/react/ReactAutumnProvider.mjs +4 -4
- package/dist/libraries/react/{chunk-ZAYIRIY2.mjs → chunk-4IVY6AXO.mjs} +1 -1
- package/dist/libraries/react/{chunk-QWWPID3I.mjs → chunk-5NRXGCQW.mjs} +1 -1
- package/dist/libraries/react/{chunk-QL75Q3H6.mjs → chunk-64M53BCF.mjs} +1 -1
- package/dist/libraries/react/{chunk-BALFCYDX.mjs → chunk-NFVAFRF6.mjs} +5 -0
- package/dist/libraries/react/{chunk-I24K3F47.mjs → chunk-TMTGUQGT.mjs} +1 -1
- package/dist/libraries/react/{chunk-4UZ5VXK2.mjs → chunk-WFMJOMJP.mjs} +1 -1
- package/dist/libraries/react/{chunk-GYL7XSVZ.mjs → chunk-XT6MF3ZV.mjs} +1 -1
- package/dist/libraries/react/{chunk-EY2AQBIO.mjs → chunk-YXLJ7SUW.mjs} +23 -23
- package/dist/libraries/react/client/ReactAutumnClient.d.mts +3 -3
- package/dist/libraries/react/client/ReactAutumnClient.d.ts +3 -3
- package/dist/libraries/react/client/clientCompMethods.d.mts +3 -3
- package/dist/libraries/react/client/clientCompMethods.d.ts +3 -3
- package/dist/libraries/react/client/clientCusMethods.d.mts +3 -3
- package/dist/libraries/react/client/clientCusMethods.d.ts +3 -3
- package/dist/libraries/react/client/clientEntityMethods.d.mts +3 -3
- package/dist/libraries/react/client/clientEntityMethods.d.ts +3 -3
- package/dist/libraries/react/client/clientGenMethods.d.mts +3 -3
- package/dist/libraries/react/client/clientGenMethods.d.ts +3 -3
- package/dist/libraries/react/client/clientProdMethods.d.mts +3 -3
- package/dist/libraries/react/client/clientProdMethods.d.ts +3 -3
- package/dist/libraries/react/client/clientReferralMethods.d.mts +3 -3
- package/dist/libraries/react/client/clientReferralMethods.d.ts +3 -3
- package/dist/libraries/react/client/types/clientAttachTypes.d.mts +1 -1
- package/dist/libraries/react/client/types/clientAttachTypes.d.ts +1 -1
- package/dist/libraries/react/client/types/clientAttachTypes.js +1 -1
- package/dist/libraries/react/client/types/clientAttachTypes.mjs +1 -1
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.js +5 -0
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.mjs +17 -17
- package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.mjs +17 -17
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +5 -0
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +17 -17
- package/dist/libraries/react/components/ui/popover.mjs +2 -2
- package/dist/libraries/react/{cusTypes-k5jXe0qX.d.ts → cusTypes-CEb_KwPo.d.ts} +11 -0
- package/dist/libraries/react/{cusTypes-Dco5eq7y.d.mts → cusTypes-DynqPCZH.d.mts} +11 -0
- package/dist/libraries/react/{entTypes-ktfnO6RI.d.ts → entTypes--Y-4T20Y.d.ts} +1 -1
- package/dist/libraries/react/{entTypes-kUplkhdu.d.mts → entTypes-DjasDDYh.d.mts} +1 -1
- package/dist/libraries/react/hooks/helpers/handleCheck.d.mts +3 -3
- package/dist/libraries/react/hooks/helpers/handleCheck.d.ts +3 -3
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.mts +3 -3
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.ts +3 -3
- package/dist/libraries/react/hooks/helpers/useAutumnBase.js +5 -0
- package/dist/libraries/react/hooks/helpers/useAutumnBase.mjs +1 -1
- package/dist/libraries/react/hooks/useCustomer.d.mts +3 -3
- package/dist/libraries/react/hooks/useCustomer.d.ts +3 -3
- package/dist/libraries/react/hooks/useCustomer.js +5 -0
- package/dist/libraries/react/hooks/useCustomer.mjs +3 -3
- package/dist/libraries/react/hooks/useCustomerBase.d.mts +3 -3
- package/dist/libraries/react/hooks/useCustomerBase.d.ts +3 -3
- package/dist/libraries/react/hooks/useCustomerBase.js +5 -0
- package/dist/libraries/react/hooks/useCustomerBase.mjs +2 -2
- package/dist/libraries/react/hooks/useEntity.d.mts +2 -2
- package/dist/libraries/react/hooks/useEntity.d.ts +2 -2
- package/dist/libraries/react/hooks/useEntity.js +5 -0
- package/dist/libraries/react/hooks/useEntity.mjs +3 -3
- package/dist/libraries/react/hooks/useEntityBase.d.mts +3 -3
- package/dist/libraries/react/hooks/useEntityBase.d.ts +3 -3
- package/dist/libraries/react/hooks/useEntityBase.js +5 -0
- package/dist/libraries/react/hooks/useEntityBase.mjs +2 -2
- package/dist/libraries/react/hooks/usePricingTableBase.d.mts +3 -3
- package/dist/libraries/react/hooks/usePricingTableBase.d.ts +3 -3
- package/dist/libraries/react/hooks/useProductsBase.d.mts +3 -3
- package/dist/libraries/react/hooks/useProductsBase.d.ts +3 -3
- package/dist/libraries/react/index.d.mts +12 -2
- package/dist/libraries/react/index.d.ts +12 -2
- package/dist/libraries/react/index.js +5 -0
- package/dist/libraries/react/index.mjs +5 -0
- package/dist/next/client/NextAutumnClient.d.mts +5 -5
- package/dist/next/client/NextAutumnClient.d.ts +5 -5
- package/dist/next/client/NextAutumnProvider.d.mts +1 -1
- package/dist/next/client/NextAutumnProvider.d.ts +1 -1
- package/dist/next/client/{clientAttachTypes-C2rh2H-X.d.ts → clientAttachTypes-CQi73rMl.d.ts} +1 -1
- package/dist/next/client/{clientAttachTypes-B0BWHPDs.d.mts → clientAttachTypes-anFjm97z.d.mts} +1 -1
- package/dist/next/client/{clientEntTypes-BFkleT6a.d.mts → clientEntTypes-DHKeY0pG.d.mts} +0 -1
- package/dist/next/client/{clientEntTypes-BFkleT6a.d.ts → clientEntTypes-DHKeY0pG.d.ts} +0 -1
- package/dist/next/client/clientUtils.d.mts +2 -2
- package/dist/next/client/clientUtils.d.ts +2 -2
- package/dist/next/client/{cusTypes-AghIAq_l.d.ts → cusTypes-CcUOSzBw.d.ts} +11 -0
- package/dist/next/client/{cusTypes-30uk2TR6.d.mts → cusTypes-dipsR4ST.d.mts} +11 -0
- package/dist/next/client/{entTypes-D4OAGulB.d.ts → entTypes-BwBtFwJP.d.ts} +1 -1
- package/dist/next/client/{entTypes-IlAM6qyq.d.mts → entTypes-BzKJAjff.d.mts} +1 -1
- package/dist/next/client/hooks/useAutumn.d.mts +2 -2
- package/dist/next/client/hooks/useAutumn.d.ts +2 -2
- package/dist/next/client/hooks/useCustomer.d.mts +4 -4
- package/dist/next/client/hooks/useCustomer.d.ts +4 -4
- package/dist/next/client/hooks/useEntity.d.mts +3 -3
- package/dist/next/client/hooks/useEntity.d.ts +3 -3
- package/dist/next/client/types.d.mts +2 -2
- package/dist/next/client/types.d.ts +2 -2
- 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 +1 -1
- package/dist/next/server/cusActions.d.ts +1 -1
- package/dist/next/server/{cusTypes-COsetLSo.d.mts → cusTypes-W3m1cxYN.d.mts} +11 -0
- package/dist/next/server/{cusTypes-COsetLSo.d.ts → cusTypes-W3m1cxYN.d.ts} +11 -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 +12 -2
- package/dist/sdk/index.d.ts +12 -2
- package/package.json +1 -1
- package/dist/libraries/react/{chunk-X6FMCHSB.mjs → chunk-7BNGM5OQ.mjs} +3 -3
|
@@ -92,14 +92,15 @@ declare const autumn: (options?: {
|
|
|
92
92
|
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
|
|
93
93
|
body: {
|
|
94
94
|
product_id: string;
|
|
95
|
-
entity_id?: string | undefined;
|
|
96
95
|
options?: {
|
|
97
96
|
feature_id: string;
|
|
98
97
|
quantity: number;
|
|
99
98
|
}[] | undefined;
|
|
100
99
|
product_ids?: string[] | undefined;
|
|
101
|
-
|
|
100
|
+
entity_id?: string | undefined;
|
|
102
101
|
force_checkout?: boolean | undefined;
|
|
102
|
+
invoice?: boolean | undefined;
|
|
103
|
+
success_url?: string | undefined;
|
|
103
104
|
customer_data?: {
|
|
104
105
|
name?: string | null | undefined;
|
|
105
106
|
email?: string | null | undefined;
|
|
@@ -108,7 +109,6 @@ declare const autumn: (options?: {
|
|
|
108
109
|
entity_data?: any;
|
|
109
110
|
checkout_session_params?: Record<string, any> | undefined;
|
|
110
111
|
reward?: string | undefined;
|
|
111
|
-
invoice?: boolean | undefined;
|
|
112
112
|
};
|
|
113
113
|
} & {
|
|
114
114
|
method?: "POST" | undefined;
|
|
@@ -135,15 +135,16 @@ declare const autumn: (options?: {
|
|
|
135
135
|
options: {
|
|
136
136
|
method: "POST";
|
|
137
137
|
body: z.ZodObject<{
|
|
138
|
-
entity_id: z.ZodOptional<z.ZodString>;
|
|
139
|
-
product_id: z.ZodString;
|
|
140
138
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
141
139
|
feature_id: z.ZodString;
|
|
142
140
|
quantity: z.ZodNumber;
|
|
143
141
|
}, z.core.$strip>>>;
|
|
142
|
+
product_id: z.ZodString;
|
|
144
143
|
product_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
145
|
-
|
|
144
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
146
145
|
force_checkout: z.ZodOptional<z.ZodBoolean>;
|
|
146
|
+
invoice: z.ZodOptional<z.ZodBoolean>;
|
|
147
|
+
success_url: z.ZodOptional<z.ZodString>;
|
|
147
148
|
customer_data: z.ZodOptional<z.ZodObject<{
|
|
148
149
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
149
150
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -152,7 +153,6 @@ declare const autumn: (options?: {
|
|
|
152
153
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
153
154
|
checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
154
155
|
reward: z.ZodOptional<z.ZodString>;
|
|
155
|
-
invoice: z.ZodOptional<z.ZodBoolean>;
|
|
156
156
|
}, z.core.$strip>;
|
|
157
157
|
use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
|
|
158
158
|
session: {
|
|
@@ -185,17 +185,17 @@ declare const autumn: (options?: {
|
|
|
185
185
|
attach: {
|
|
186
186
|
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
|
|
187
187
|
body: {
|
|
188
|
-
entity_id?: string | undefined;
|
|
189
|
-
metadata?: Record<string, string> | undefined;
|
|
190
|
-
product_id?: string | undefined;
|
|
191
188
|
options?: {
|
|
192
189
|
feature_id: string;
|
|
193
190
|
quantity: number;
|
|
194
191
|
}[] | undefined;
|
|
192
|
+
metadata?: Record<string, string> | undefined;
|
|
193
|
+
product_id?: string | undefined;
|
|
195
194
|
product_ids?: string[] | undefined;
|
|
196
|
-
|
|
197
|
-
success_url?: string | undefined;
|
|
195
|
+
entity_id?: string | undefined;
|
|
198
196
|
force_checkout?: boolean | undefined;
|
|
197
|
+
invoice?: boolean | undefined;
|
|
198
|
+
success_url?: string | undefined;
|
|
199
199
|
customer_data?: {
|
|
200
200
|
name?: string | null | undefined;
|
|
201
201
|
email?: string | null | undefined;
|
|
@@ -204,7 +204,7 @@ declare const autumn: (options?: {
|
|
|
204
204
|
entity_data?: any;
|
|
205
205
|
checkout_session_params?: Record<string, any> | undefined;
|
|
206
206
|
reward?: string | undefined;
|
|
207
|
-
|
|
207
|
+
free_trial?: boolean | undefined;
|
|
208
208
|
};
|
|
209
209
|
} & {
|
|
210
210
|
method?: "POST" | undefined;
|
|
@@ -231,17 +231,17 @@ declare const autumn: (options?: {
|
|
|
231
231
|
options: {
|
|
232
232
|
method: "POST";
|
|
233
233
|
body: z.ZodObject<{
|
|
234
|
-
entity_id: z.ZodOptional<z.ZodString>;
|
|
235
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
236
|
-
product_id: z.ZodOptional<z.ZodString>;
|
|
237
234
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
238
235
|
feature_id: z.ZodString;
|
|
239
236
|
quantity: z.ZodNumber;
|
|
240
237
|
}, z.core.$strip>>>;
|
|
238
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
239
|
+
product_id: z.ZodOptional<z.ZodString>;
|
|
241
240
|
product_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
242
|
-
|
|
243
|
-
success_url: z.ZodOptional<z.ZodString>;
|
|
241
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
244
242
|
force_checkout: z.ZodOptional<z.ZodBoolean>;
|
|
243
|
+
invoice: z.ZodOptional<z.ZodBoolean>;
|
|
244
|
+
success_url: z.ZodOptional<z.ZodString>;
|
|
245
245
|
customer_data: z.ZodOptional<z.ZodObject<{
|
|
246
246
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
247
247
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -250,7 +250,7 @@ declare const autumn: (options?: {
|
|
|
250
250
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
251
251
|
checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
252
252
|
reward: z.ZodOptional<z.ZodString>;
|
|
253
|
-
|
|
253
|
+
free_trial: z.ZodOptional<z.ZodBoolean>;
|
|
254
254
|
}, z.core.$strip>;
|
|
255
255
|
use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
|
|
256
256
|
session: {
|
|
@@ -283,15 +283,15 @@ declare const autumn: (options?: {
|
|
|
283
283
|
check: {
|
|
284
284
|
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
|
|
285
285
|
body: {
|
|
286
|
-
feature_id?: string | undefined;
|
|
287
|
-
entity_id?: string | undefined;
|
|
288
|
-
required_balance?: number | undefined;
|
|
289
286
|
product_id?: string | undefined;
|
|
287
|
+
entity_id?: string | undefined;
|
|
288
|
+
feature_id?: string | undefined;
|
|
290
289
|
customer_data?: any;
|
|
291
290
|
entity_data?: {
|
|
292
291
|
feature_id: string;
|
|
293
292
|
name?: string | undefined;
|
|
294
293
|
} | undefined;
|
|
294
|
+
required_balance?: number | undefined;
|
|
295
295
|
send_event?: boolean | undefined;
|
|
296
296
|
with_preview?: boolean | undefined;
|
|
297
297
|
};
|
|
@@ -320,15 +320,15 @@ declare const autumn: (options?: {
|
|
|
320
320
|
options: {
|
|
321
321
|
method: "POST";
|
|
322
322
|
body: z.ZodObject<{
|
|
323
|
-
feature_id: z.ZodOptional<z.ZodString>;
|
|
324
|
-
entity_id: z.ZodOptional<z.ZodString>;
|
|
325
|
-
required_balance: z.ZodOptional<z.ZodNumber>;
|
|
326
323
|
product_id: z.ZodOptional<z.ZodString>;
|
|
324
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
325
|
+
feature_id: z.ZodOptional<z.ZodString>;
|
|
327
326
|
customer_data: z.ZodOptional<z.ZodAny>;
|
|
328
327
|
entity_data: z.ZodOptional<z.ZodObject<{
|
|
329
328
|
name: z.ZodOptional<z.ZodString>;
|
|
330
329
|
feature_id: z.ZodString;
|
|
331
330
|
}, z.core.$strip>>;
|
|
331
|
+
required_balance: z.ZodOptional<z.ZodNumber>;
|
|
332
332
|
send_event: z.ZodOptional<z.ZodBoolean>;
|
|
333
333
|
with_preview: z.ZodOptional<z.ZodBoolean>;
|
|
334
334
|
}, z.core.$strip>;
|
|
@@ -363,8 +363,8 @@ declare const autumn: (options?: {
|
|
|
363
363
|
track: {
|
|
364
364
|
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
|
|
365
365
|
body: {
|
|
366
|
-
feature_id?: string | undefined;
|
|
367
366
|
entity_id?: string | undefined;
|
|
367
|
+
feature_id?: string | undefined;
|
|
368
368
|
customer_data?: any;
|
|
369
369
|
entity_data?: any;
|
|
370
370
|
value?: number | undefined;
|
|
@@ -396,8 +396,8 @@ declare const autumn: (options?: {
|
|
|
396
396
|
options: {
|
|
397
397
|
method: "POST";
|
|
398
398
|
body: z.ZodObject<{
|
|
399
|
-
feature_id: z.ZodOptional<z.ZodString>;
|
|
400
399
|
entity_id: z.ZodOptional<z.ZodString>;
|
|
400
|
+
feature_id: z.ZodOptional<z.ZodString>;
|
|
401
401
|
customer_data: z.ZodOptional<z.ZodAny>;
|
|
402
402
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
403
403
|
value: z.ZodOptional<z.ZodNumber>;
|
|
@@ -464,8 +464,8 @@ declare const autumn: (options?: {
|
|
|
464
464
|
options: {
|
|
465
465
|
method: "POST";
|
|
466
466
|
body: z.ZodObject<{
|
|
467
|
-
entity_id: z.ZodOptional<z.ZodString>;
|
|
468
467
|
product_id: z.ZodString;
|
|
468
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
469
469
|
cancel_immediately: z.ZodOptional<z.ZodBoolean>;
|
|
470
470
|
}, z.core.$strip>;
|
|
471
471
|
use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
|
|
@@ -92,14 +92,15 @@ declare const autumn: (options?: {
|
|
|
92
92
|
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
|
|
93
93
|
body: {
|
|
94
94
|
product_id: string;
|
|
95
|
-
entity_id?: string | undefined;
|
|
96
95
|
options?: {
|
|
97
96
|
feature_id: string;
|
|
98
97
|
quantity: number;
|
|
99
98
|
}[] | undefined;
|
|
100
99
|
product_ids?: string[] | undefined;
|
|
101
|
-
|
|
100
|
+
entity_id?: string | undefined;
|
|
102
101
|
force_checkout?: boolean | undefined;
|
|
102
|
+
invoice?: boolean | undefined;
|
|
103
|
+
success_url?: string | undefined;
|
|
103
104
|
customer_data?: {
|
|
104
105
|
name?: string | null | undefined;
|
|
105
106
|
email?: string | null | undefined;
|
|
@@ -108,7 +109,6 @@ declare const autumn: (options?: {
|
|
|
108
109
|
entity_data?: any;
|
|
109
110
|
checkout_session_params?: Record<string, any> | undefined;
|
|
110
111
|
reward?: string | undefined;
|
|
111
|
-
invoice?: boolean | undefined;
|
|
112
112
|
};
|
|
113
113
|
} & {
|
|
114
114
|
method?: "POST" | undefined;
|
|
@@ -135,15 +135,16 @@ declare const autumn: (options?: {
|
|
|
135
135
|
options: {
|
|
136
136
|
method: "POST";
|
|
137
137
|
body: z.ZodObject<{
|
|
138
|
-
entity_id: z.ZodOptional<z.ZodString>;
|
|
139
|
-
product_id: z.ZodString;
|
|
140
138
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
141
139
|
feature_id: z.ZodString;
|
|
142
140
|
quantity: z.ZodNumber;
|
|
143
141
|
}, z.core.$strip>>>;
|
|
142
|
+
product_id: z.ZodString;
|
|
144
143
|
product_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
145
|
-
|
|
144
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
146
145
|
force_checkout: z.ZodOptional<z.ZodBoolean>;
|
|
146
|
+
invoice: z.ZodOptional<z.ZodBoolean>;
|
|
147
|
+
success_url: z.ZodOptional<z.ZodString>;
|
|
147
148
|
customer_data: z.ZodOptional<z.ZodObject<{
|
|
148
149
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
149
150
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -152,7 +153,6 @@ declare const autumn: (options?: {
|
|
|
152
153
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
153
154
|
checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
154
155
|
reward: z.ZodOptional<z.ZodString>;
|
|
155
|
-
invoice: z.ZodOptional<z.ZodBoolean>;
|
|
156
156
|
}, z.core.$strip>;
|
|
157
157
|
use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
|
|
158
158
|
session: {
|
|
@@ -185,17 +185,17 @@ declare const autumn: (options?: {
|
|
|
185
185
|
attach: {
|
|
186
186
|
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
|
|
187
187
|
body: {
|
|
188
|
-
entity_id?: string | undefined;
|
|
189
|
-
metadata?: Record<string, string> | undefined;
|
|
190
|
-
product_id?: string | undefined;
|
|
191
188
|
options?: {
|
|
192
189
|
feature_id: string;
|
|
193
190
|
quantity: number;
|
|
194
191
|
}[] | undefined;
|
|
192
|
+
metadata?: Record<string, string> | undefined;
|
|
193
|
+
product_id?: string | undefined;
|
|
195
194
|
product_ids?: string[] | undefined;
|
|
196
|
-
|
|
197
|
-
success_url?: string | undefined;
|
|
195
|
+
entity_id?: string | undefined;
|
|
198
196
|
force_checkout?: boolean | undefined;
|
|
197
|
+
invoice?: boolean | undefined;
|
|
198
|
+
success_url?: string | undefined;
|
|
199
199
|
customer_data?: {
|
|
200
200
|
name?: string | null | undefined;
|
|
201
201
|
email?: string | null | undefined;
|
|
@@ -204,7 +204,7 @@ declare const autumn: (options?: {
|
|
|
204
204
|
entity_data?: any;
|
|
205
205
|
checkout_session_params?: Record<string, any> | undefined;
|
|
206
206
|
reward?: string | undefined;
|
|
207
|
-
|
|
207
|
+
free_trial?: boolean | undefined;
|
|
208
208
|
};
|
|
209
209
|
} & {
|
|
210
210
|
method?: "POST" | undefined;
|
|
@@ -231,17 +231,17 @@ declare const autumn: (options?: {
|
|
|
231
231
|
options: {
|
|
232
232
|
method: "POST";
|
|
233
233
|
body: z.ZodObject<{
|
|
234
|
-
entity_id: z.ZodOptional<z.ZodString>;
|
|
235
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
236
|
-
product_id: z.ZodOptional<z.ZodString>;
|
|
237
234
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
238
235
|
feature_id: z.ZodString;
|
|
239
236
|
quantity: z.ZodNumber;
|
|
240
237
|
}, z.core.$strip>>>;
|
|
238
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
239
|
+
product_id: z.ZodOptional<z.ZodString>;
|
|
241
240
|
product_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
242
|
-
|
|
243
|
-
success_url: z.ZodOptional<z.ZodString>;
|
|
241
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
244
242
|
force_checkout: z.ZodOptional<z.ZodBoolean>;
|
|
243
|
+
invoice: z.ZodOptional<z.ZodBoolean>;
|
|
244
|
+
success_url: z.ZodOptional<z.ZodString>;
|
|
245
245
|
customer_data: z.ZodOptional<z.ZodObject<{
|
|
246
246
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
247
247
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -250,7 +250,7 @@ declare const autumn: (options?: {
|
|
|
250
250
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
251
251
|
checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
252
252
|
reward: z.ZodOptional<z.ZodString>;
|
|
253
|
-
|
|
253
|
+
free_trial: z.ZodOptional<z.ZodBoolean>;
|
|
254
254
|
}, z.core.$strip>;
|
|
255
255
|
use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
|
|
256
256
|
session: {
|
|
@@ -283,15 +283,15 @@ declare const autumn: (options?: {
|
|
|
283
283
|
check: {
|
|
284
284
|
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
|
|
285
285
|
body: {
|
|
286
|
-
feature_id?: string | undefined;
|
|
287
|
-
entity_id?: string | undefined;
|
|
288
|
-
required_balance?: number | undefined;
|
|
289
286
|
product_id?: string | undefined;
|
|
287
|
+
entity_id?: string | undefined;
|
|
288
|
+
feature_id?: string | undefined;
|
|
290
289
|
customer_data?: any;
|
|
291
290
|
entity_data?: {
|
|
292
291
|
feature_id: string;
|
|
293
292
|
name?: string | undefined;
|
|
294
293
|
} | undefined;
|
|
294
|
+
required_balance?: number | undefined;
|
|
295
295
|
send_event?: boolean | undefined;
|
|
296
296
|
with_preview?: boolean | undefined;
|
|
297
297
|
};
|
|
@@ -320,15 +320,15 @@ declare const autumn: (options?: {
|
|
|
320
320
|
options: {
|
|
321
321
|
method: "POST";
|
|
322
322
|
body: z.ZodObject<{
|
|
323
|
-
feature_id: z.ZodOptional<z.ZodString>;
|
|
324
|
-
entity_id: z.ZodOptional<z.ZodString>;
|
|
325
|
-
required_balance: z.ZodOptional<z.ZodNumber>;
|
|
326
323
|
product_id: z.ZodOptional<z.ZodString>;
|
|
324
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
325
|
+
feature_id: z.ZodOptional<z.ZodString>;
|
|
327
326
|
customer_data: z.ZodOptional<z.ZodAny>;
|
|
328
327
|
entity_data: z.ZodOptional<z.ZodObject<{
|
|
329
328
|
name: z.ZodOptional<z.ZodString>;
|
|
330
329
|
feature_id: z.ZodString;
|
|
331
330
|
}, z.core.$strip>>;
|
|
331
|
+
required_balance: z.ZodOptional<z.ZodNumber>;
|
|
332
332
|
send_event: z.ZodOptional<z.ZodBoolean>;
|
|
333
333
|
with_preview: z.ZodOptional<z.ZodBoolean>;
|
|
334
334
|
}, z.core.$strip>;
|
|
@@ -363,8 +363,8 @@ declare const autumn: (options?: {
|
|
|
363
363
|
track: {
|
|
364
364
|
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
|
|
365
365
|
body: {
|
|
366
|
-
feature_id?: string | undefined;
|
|
367
366
|
entity_id?: string | undefined;
|
|
367
|
+
feature_id?: string | undefined;
|
|
368
368
|
customer_data?: any;
|
|
369
369
|
entity_data?: any;
|
|
370
370
|
value?: number | undefined;
|
|
@@ -396,8 +396,8 @@ declare const autumn: (options?: {
|
|
|
396
396
|
options: {
|
|
397
397
|
method: "POST";
|
|
398
398
|
body: z.ZodObject<{
|
|
399
|
-
feature_id: z.ZodOptional<z.ZodString>;
|
|
400
399
|
entity_id: z.ZodOptional<z.ZodString>;
|
|
400
|
+
feature_id: z.ZodOptional<z.ZodString>;
|
|
401
401
|
customer_data: z.ZodOptional<z.ZodAny>;
|
|
402
402
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
403
403
|
value: z.ZodOptional<z.ZodNumber>;
|
|
@@ -464,8 +464,8 @@ declare const autumn: (options?: {
|
|
|
464
464
|
options: {
|
|
465
465
|
method: "POST";
|
|
466
466
|
body: z.ZodObject<{
|
|
467
|
-
entity_id: z.ZodOptional<z.ZodString>;
|
|
468
467
|
product_id: z.ZodString;
|
|
468
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
469
469
|
cancel_immediately: z.ZodOptional<z.ZodBoolean>;
|
|
470
470
|
}, z.core.$strip>;
|
|
471
471
|
use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
|
package/dist/libraries/backend/{referralTypes-bzPW4Cz9.d.mts → referralTypes-9uVrgXY-.d.mts}
RENAMED
|
@@ -212,6 +212,16 @@ interface CustomerFeature extends CoreCustomerFeature {
|
|
|
212
212
|
name: string;
|
|
213
213
|
type: "static" | "single_use" | "continuous_use";
|
|
214
214
|
}
|
|
215
|
+
interface CustomerReferral {
|
|
216
|
+
program_id: string;
|
|
217
|
+
customer: {
|
|
218
|
+
id: string;
|
|
219
|
+
name: string | null;
|
|
220
|
+
email: string | null;
|
|
221
|
+
};
|
|
222
|
+
reward_applied: boolean;
|
|
223
|
+
created_at: number;
|
|
224
|
+
}
|
|
215
225
|
interface CustomerProduct {
|
|
216
226
|
id: string;
|
|
217
227
|
name: string | null;
|
|
@@ -242,6 +252,7 @@ interface Customer {
|
|
|
242
252
|
features: Record<string, CustomerFeature>;
|
|
243
253
|
invoices?: CustomerInvoice[];
|
|
244
254
|
payment_method?: any;
|
|
255
|
+
referrals?: CustomerReferral[];
|
|
245
256
|
}
|
|
246
257
|
declare const CustomerDataSchema: z.ZodObject<{
|
|
247
258
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -212,6 +212,16 @@ interface CustomerFeature extends CoreCustomerFeature {
|
|
|
212
212
|
name: string;
|
|
213
213
|
type: "static" | "single_use" | "continuous_use";
|
|
214
214
|
}
|
|
215
|
+
interface CustomerReferral {
|
|
216
|
+
program_id: string;
|
|
217
|
+
customer: {
|
|
218
|
+
id: string;
|
|
219
|
+
name: string | null;
|
|
220
|
+
email: string | null;
|
|
221
|
+
};
|
|
222
|
+
reward_applied: boolean;
|
|
223
|
+
created_at: number;
|
|
224
|
+
}
|
|
215
225
|
interface CustomerProduct {
|
|
216
226
|
id: string;
|
|
217
227
|
name: string | null;
|
|
@@ -242,6 +252,7 @@ interface Customer {
|
|
|
242
252
|
features: Record<string, CustomerFeature>;
|
|
243
253
|
invoices?: CustomerInvoice[];
|
|
244
254
|
payment_method?: any;
|
|
255
|
+
referrals?: CustomerReferral[];
|
|
245
256
|
}
|
|
246
257
|
declare const CustomerDataSchema: z.ZodObject<{
|
|
247
258
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import { A as AutumnClient } from './ReactAutumnClient-
|
|
2
|
+
import { A as AutumnClient } from './ReactAutumnClient-C-ybqq9t.mjs';
|
|
3
3
|
import './client/types/clientEntTypes.mjs';
|
|
4
4
|
import './client/types/clientGenTypes.mjs';
|
|
5
5
|
import 'zod/v4';
|
|
@@ -7,8 +7,8 @@ import './error-DHbclCVh.mjs';
|
|
|
7
7
|
import './genTypes-DdYlVEah.mjs';
|
|
8
8
|
import './prodTypes-C8xRoBP7.mjs';
|
|
9
9
|
import './attachTypes-DJIr5ldB.mjs';
|
|
10
|
-
import './entTypes-
|
|
11
|
-
import './cusTypes-
|
|
10
|
+
import './entTypes-DjasDDYh.mjs';
|
|
11
|
+
import './cusTypes-DynqPCZH.mjs';
|
|
12
12
|
|
|
13
13
|
interface AutumnDialogContext {
|
|
14
14
|
props: any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import { A as AutumnClient } from './ReactAutumnClient-
|
|
2
|
+
import { A as AutumnClient } from './ReactAutumnClient-BxDUcOLV.js';
|
|
3
3
|
import './client/types/clientEntTypes.js';
|
|
4
4
|
import './client/types/clientGenTypes.js';
|
|
5
5
|
import 'zod/v4';
|
|
@@ -7,8 +7,8 @@ import './error-DHbclCVh.js';
|
|
|
7
7
|
import './genTypes-aPPwPimh.js';
|
|
8
8
|
import './prodTypes-C8xRoBP7.js';
|
|
9
9
|
import './attachTypes-DVF4f7Hw.js';
|
|
10
|
-
import './entTypes-
|
|
11
|
-
import './cusTypes-
|
|
10
|
+
import './entTypes--Y-4T20Y.js';
|
|
11
|
+
import './cusTypes-CEb_KwPo.js';
|
|
12
12
|
|
|
13
13
|
interface AutumnDialogContext {
|
|
14
14
|
props: any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { A as AutumnClient } from './ReactAutumnClient-
|
|
3
|
+
import { A as AutumnClient } from './ReactAutumnClient-C-ybqq9t.mjs';
|
|
4
4
|
import './client/types/clientEntTypes.mjs';
|
|
5
5
|
import './client/types/clientGenTypes.mjs';
|
|
6
6
|
import 'zod/v4';
|
|
@@ -8,8 +8,8 @@ import './error-DHbclCVh.mjs';
|
|
|
8
8
|
import './genTypes-DdYlVEah.mjs';
|
|
9
9
|
import './prodTypes-C8xRoBP7.mjs';
|
|
10
10
|
import './attachTypes-DJIr5ldB.mjs';
|
|
11
|
-
import './entTypes-
|
|
12
|
-
import './cusTypes-
|
|
11
|
+
import './entTypes-DjasDDYh.mjs';
|
|
12
|
+
import './cusTypes-DynqPCZH.mjs';
|
|
13
13
|
|
|
14
14
|
declare function BaseAutumnProvider({ client, children, AutumnContext, }: {
|
|
15
15
|
client: AutumnClient;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { A as AutumnClient } from './ReactAutumnClient-
|
|
3
|
+
import { A as AutumnClient } from './ReactAutumnClient-BxDUcOLV.js';
|
|
4
4
|
import './client/types/clientEntTypes.js';
|
|
5
5
|
import './client/types/clientGenTypes.js';
|
|
6
6
|
import 'zod/v4';
|
|
@@ -8,8 +8,8 @@ import './error-DHbclCVh.js';
|
|
|
8
8
|
import './genTypes-aPPwPimh.js';
|
|
9
9
|
import './prodTypes-C8xRoBP7.js';
|
|
10
10
|
import './attachTypes-DVF4f7Hw.js';
|
|
11
|
-
import './entTypes-
|
|
12
|
-
import './cusTypes-
|
|
11
|
+
import './entTypes--Y-4T20Y.js';
|
|
12
|
+
import './cusTypes-CEb_KwPo.js';
|
|
13
13
|
|
|
14
14
|
declare function BaseAutumnProvider({ client, children, AutumnContext, }: {
|
|
15
15
|
client: AutumnClient;
|
|
@@ -1549,6 +1549,11 @@ var useAutumnBase = ({
|
|
|
1549
1549
|
const checkout = async (params) => {
|
|
1550
1550
|
const { data, error } = await client.checkout(params);
|
|
1551
1551
|
const { dialog, ...rest } = params;
|
|
1552
|
+
if (params.dialog && params.productIds) {
|
|
1553
|
+
throw new Error(
|
|
1554
|
+
"Dialog and productIds are not supported together in checkout()"
|
|
1555
|
+
);
|
|
1556
|
+
}
|
|
1552
1557
|
if (error) {
|
|
1553
1558
|
return { data, error };
|
|
1554
1559
|
}
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
import {
|
|
5
5
|
BaseAutumnProvider
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4IVY6AXO.mjs";
|
|
7
7
|
import "./chunk-RFSQBGLO.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-64M53BCF.mjs";
|
|
9
9
|
import "./chunk-BM36COXS.mjs";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-NFVAFRF6.mjs";
|
|
11
11
|
import "./chunk-HBJDIEEJ.mjs";
|
|
12
12
|
import "./chunk-RJSVDPCH.mjs";
|
|
13
13
|
import "./chunk-2OPGTDRC.mjs";
|
package/dist/libraries/react/{ReactAutumnClient-CqDsfKHI.d.ts → ReactAutumnClient-BxDUcOLV.d.ts}
RENAMED
|
@@ -3,9 +3,9 @@ import { OpenBillingPortalParams, SetupPaymentParams } from './client/types/clie
|
|
|
3
3
|
import { A as AutumnError } from './error-DHbclCVh.js';
|
|
4
4
|
import { a as CheckResult, S as SetupPaymentResult, Q as QueryResult } from './genTypes-aPPwPimh.js';
|
|
5
5
|
import { C as CheckoutResult } from './attachTypes-DVF4f7Hw.js';
|
|
6
|
-
import { R as Result, A as AutumnPromise, E as Entity, D as DeleteEntityResult } from './entTypes-
|
|
6
|
+
import { R as Result, A as AutumnPromise, E as Entity, D as DeleteEntityResult } from './entTypes--Y-4T20Y.js';
|
|
7
7
|
import { c as ProductItem, e as ProductScenario, P as Product } from './prodTypes-C8xRoBP7.js';
|
|
8
|
-
import { C as CustomerData, a as CreateCustomerParams, b as Customer, B as BillingPortalResult } from './cusTypes-
|
|
8
|
+
import { C as CustomerData, a as CreateCustomerParams, b as Customer, B as BillingPortalResult } from './cusTypes-CEb_KwPo.js';
|
|
9
9
|
|
|
10
10
|
interface PricingTableProduct {
|
|
11
11
|
id: string;
|
|
@@ -34,7 +34,6 @@ interface RedeemReferralCodeResult {
|
|
|
34
34
|
id: string;
|
|
35
35
|
customer_id: string;
|
|
36
36
|
reward_id: string;
|
|
37
|
-
applied: boolean;
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
interface ErrorResponse {
|
|
@@ -114,7 +113,7 @@ declare class AutumnClient {
|
|
|
114
113
|
} | undefined;
|
|
115
114
|
}>;
|
|
116
115
|
checkout: (params: {
|
|
117
|
-
productId
|
|
116
|
+
productId?: string | undefined;
|
|
118
117
|
productIds?: string[] | undefined;
|
|
119
118
|
entityId?: string | undefined;
|
|
120
119
|
entityData?: any;
|
package/dist/libraries/react/{ReactAutumnClient-DxzJiNXI.d.mts → ReactAutumnClient-C-ybqq9t.d.mts}
RENAMED
|
@@ -3,9 +3,9 @@ import { OpenBillingPortalParams, SetupPaymentParams } from './client/types/clie
|
|
|
3
3
|
import { A as AutumnError } from './error-DHbclCVh.mjs';
|
|
4
4
|
import { a as CheckResult, S as SetupPaymentResult, Q as QueryResult } from './genTypes-DdYlVEah.mjs';
|
|
5
5
|
import { C as CheckoutResult } from './attachTypes-DJIr5ldB.mjs';
|
|
6
|
-
import { R as Result, A as AutumnPromise, E as Entity, D as DeleteEntityResult } from './entTypes-
|
|
6
|
+
import { R as Result, A as AutumnPromise, E as Entity, D as DeleteEntityResult } from './entTypes-DjasDDYh.mjs';
|
|
7
7
|
import { c as ProductItem, e as ProductScenario, P as Product } from './prodTypes-C8xRoBP7.mjs';
|
|
8
|
-
import { C as CustomerData, a as CreateCustomerParams, b as Customer, B as BillingPortalResult } from './cusTypes-
|
|
8
|
+
import { C as CustomerData, a as CreateCustomerParams, b as Customer, B as BillingPortalResult } from './cusTypes-DynqPCZH.mjs';
|
|
9
9
|
|
|
10
10
|
interface PricingTableProduct {
|
|
11
11
|
id: string;
|
|
@@ -34,7 +34,6 @@ interface RedeemReferralCodeResult {
|
|
|
34
34
|
id: string;
|
|
35
35
|
customer_id: string;
|
|
36
36
|
reward_id: string;
|
|
37
|
-
applied: boolean;
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
interface ErrorResponse {
|
|
@@ -114,7 +113,7 @@ declare class AutumnClient {
|
|
|
114
113
|
} | undefined;
|
|
115
114
|
}>;
|
|
116
115
|
checkout: (params: {
|
|
117
|
-
productId
|
|
116
|
+
productId?: string | undefined;
|
|
118
117
|
productIds?: string[] | undefined;
|
|
119
118
|
entityId?: string | undefined;
|
|
120
119
|
entityData?: any;
|
|
@@ -1550,6 +1550,11 @@ var useAutumnBase = ({
|
|
|
1550
1550
|
const checkout = async (params) => {
|
|
1551
1551
|
const { data, error } = await client.checkout(params);
|
|
1552
1552
|
const { dialog, ...rest } = params;
|
|
1553
|
+
if (params.dialog && params.productIds) {
|
|
1554
|
+
throw new Error(
|
|
1555
|
+
"Dialog and productIds are not supported together in checkout()"
|
|
1556
|
+
);
|
|
1557
|
+
}
|
|
1553
1558
|
if (error) {
|
|
1554
1559
|
return { data, error };
|
|
1555
1560
|
}
|