autumn-js 0.1.29 → 0.1.30
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-CEksOH8G.d.ts → referralTypes-BKYFqrby.d.ts} +19 -4
- package/dist/libraries/backend/{referralTypes-ByxmnQC7.d.mts → referralTypes-DFnfRlx5.d.mts} +19 -4
- 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.mjs +4 -4
- package/dist/libraries/react/BaseAutumnProvider.mjs +6 -6
- package/dist/libraries/react/ReactAutumnProvider.mjs +7 -7
- package/dist/libraries/react/{chunk-UNCW2GSR.mjs → chunk-6YVUPTRM.mjs} +3 -3
- package/dist/libraries/react/{chunk-5H5GRS2A.mjs → chunk-7EGNBV4Y.mjs} +1 -1
- package/dist/libraries/react/{chunk-CQM7GZ7W.mjs → chunk-AORLHO26.mjs} +1 -1
- package/dist/libraries/react/{chunk-U6K76N56.mjs → chunk-FG7UBEFL.mjs} +2 -2
- package/dist/libraries/react/{chunk-IHM53O5V.mjs → chunk-GOJRWUAJ.mjs} +1 -1
- package/dist/libraries/react/{chunk-YSPIIK66.mjs → chunk-J7QG6LOC.mjs} +1 -1
- package/dist/libraries/react/{chunk-XB7NBI37.mjs → chunk-NZQZKVW5.mjs} +2 -2
- package/dist/libraries/react/{chunk-Y4WZGYNS.mjs → chunk-SMECPAWF.mjs} +23 -23
- package/dist/libraries/react/{chunk-OZKZTANZ.mjs → chunk-XBV5QVQK.mjs} +1 -1
- package/dist/libraries/react/{chunk-URJXELCF.mjs → chunk-ZRTUO76C.mjs} +1 -1
- package/dist/libraries/react/{chunk-YKVHS3GV.mjs → chunk-ZTOBCYYA.mjs} +1 -1
- package/dist/libraries/react/client/ReactAutumnClient.mjs +3 -3
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.mjs +22 -22
- package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.mjs +22 -22
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +22 -22
- package/dist/libraries/react/components/ui/dialog.mjs +2 -2
- package/dist/libraries/react/components/ui/popover.mjs +2 -2
- package/dist/libraries/react/hooks/useAnalytics.mjs +5 -5
- package/dist/libraries/react/hooks/useCustomer.mjs +6 -6
- package/dist/libraries/react/hooks/useCustomerBase.mjs +5 -5
- package/dist/libraries/react/hooks/useEntity.mjs +6 -6
- package/dist/libraries/react/hooks/useEntityBase.mjs +5 -5
- package/dist/libraries/react/hooks/usePaywall.mjs +5 -5
- package/dist/libraries/react/hooks/usePricingTable.mjs +5 -5
- package/dist/next/server/cusActions.d.mts +19 -4
- package/dist/next/server/cusActions.d.ts +19 -4
- package/dist/sdk/index.d.mts +4 -4
- package/dist/sdk/index.d.ts +4 -4
- package/package.json +1 -1
- package/dist/libraries/react/{chunk-YCHPTRJA.mjs → chunk-C3G5RW3Q.mjs} +3 -3
- package/dist/libraries/react/{chunk-JNMZHVHP.mjs → chunk-MDN4L5DT.mjs} +6 -6
- package/dist/libraries/react/{chunk-47KEC6LH.mjs → chunk-MHAXHLX4.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;
|
|
@@ -397,8 +397,8 @@ declare const autumn: (options?: {
|
|
|
397
397
|
options: {
|
|
398
398
|
method: "POST";
|
|
399
399
|
body: z.ZodObject<{
|
|
400
|
-
feature_id: z.ZodOptional<z.ZodString>;
|
|
401
400
|
entity_id: z.ZodOptional<z.ZodString>;
|
|
401
|
+
feature_id: z.ZodOptional<z.ZodString>;
|
|
402
402
|
customer_data: z.ZodOptional<z.ZodAny>;
|
|
403
403
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
404
404
|
value: z.ZodOptional<z.ZodNumber>;
|
|
@@ -466,8 +466,8 @@ declare const autumn: (options?: {
|
|
|
466
466
|
options: {
|
|
467
467
|
method: "POST";
|
|
468
468
|
body: z.ZodObject<{
|
|
469
|
-
entity_id: z.ZodOptional<z.ZodString>;
|
|
470
469
|
product_id: z.ZodString;
|
|
470
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
471
471
|
cancel_immediately: z.ZodOptional<z.ZodBoolean>;
|
|
472
472
|
}, z.core.$strip>;
|
|
473
473
|
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;
|
|
@@ -397,8 +397,8 @@ declare const autumn: (options?: {
|
|
|
397
397
|
options: {
|
|
398
398
|
method: "POST";
|
|
399
399
|
body: z.ZodObject<{
|
|
400
|
-
feature_id: z.ZodOptional<z.ZodString>;
|
|
401
400
|
entity_id: z.ZodOptional<z.ZodString>;
|
|
401
|
+
feature_id: z.ZodOptional<z.ZodString>;
|
|
402
402
|
customer_data: z.ZodOptional<z.ZodAny>;
|
|
403
403
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
404
404
|
value: z.ZodOptional<z.ZodNumber>;
|
|
@@ -466,8 +466,8 @@ declare const autumn: (options?: {
|
|
|
466
466
|
options: {
|
|
467
467
|
method: "POST";
|
|
468
468
|
body: z.ZodObject<{
|
|
469
|
-
entity_id: z.ZodOptional<z.ZodString>;
|
|
470
469
|
product_id: z.ZodString;
|
|
470
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
471
471
|
cancel_immediately: z.ZodOptional<z.ZodBoolean>;
|
|
472
472
|
}, z.core.$strip>;
|
|
473
473
|
use: ((inputContext: better_auth.MiddlewareInputContext<better_auth.MiddlewareOptions>) => Promise<{
|
|
@@ -539,8 +539,8 @@ declare class Autumn {
|
|
|
539
539
|
delete: (customer_id: string, entity_id: string) => Promise<Result<DeleteEntityResult, AutumnError>>;
|
|
540
540
|
};
|
|
541
541
|
static referrals: {
|
|
542
|
-
createCode: (params: CreateReferralCodeParams) => Promise<Result<
|
|
543
|
-
redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<
|
|
542
|
+
createCode: (params: CreateReferralCodeParams) => Promise<Result<CreateReferralCodeResult, AutumnError>>;
|
|
543
|
+
redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<RedeemReferralCodeResult, AutumnError>>;
|
|
544
544
|
};
|
|
545
545
|
static features: {
|
|
546
546
|
list: () => Promise<Result<{
|
|
@@ -575,8 +575,8 @@ declare class Autumn {
|
|
|
575
575
|
delete: (customer_id: string, entity_id: string) => Promise<Result<DeleteEntityResult, AutumnError>>;
|
|
576
576
|
};
|
|
577
577
|
referrals: {
|
|
578
|
-
createCode: (params: CreateReferralCodeParams) => Promise<Result<
|
|
579
|
-
redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<
|
|
578
|
+
createCode: (params: CreateReferralCodeParams) => Promise<Result<CreateReferralCodeResult, AutumnError>>;
|
|
579
|
+
redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<RedeemReferralCodeResult, AutumnError>>;
|
|
580
580
|
};
|
|
581
581
|
features: {
|
|
582
582
|
list: () => Promise<Result<{
|
|
@@ -859,10 +859,25 @@ declare const CreateReferralCodeParamsSchema: z.ZodObject<{
|
|
|
859
859
|
program_id: z.ZodString;
|
|
860
860
|
}, z.core.$strip>;
|
|
861
861
|
type CreateReferralCodeParams = z.infer<typeof CreateReferralCodeParamsSchema>;
|
|
862
|
+
interface CreateReferralCodeResult {
|
|
863
|
+
code: string;
|
|
864
|
+
customer_id: string;
|
|
865
|
+
created_at: number;
|
|
866
|
+
}
|
|
862
867
|
declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
|
|
863
868
|
code: z.ZodString;
|
|
864
869
|
customer_id: z.ZodString;
|
|
865
870
|
}, z.core.$strip>;
|
|
866
871
|
type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
|
|
872
|
+
interface RedeemReferralCodeResult {
|
|
873
|
+
id: string;
|
|
874
|
+
customer_id: string;
|
|
875
|
+
reward_id: string;
|
|
876
|
+
referrer: {
|
|
877
|
+
id: string;
|
|
878
|
+
name: string | null;
|
|
879
|
+
email: string | null;
|
|
880
|
+
};
|
|
881
|
+
}
|
|
867
882
|
|
|
868
883
|
export { Autumn as A, type CustomerData as C };
|
package/dist/libraries/backend/{referralTypes-ByxmnQC7.d.mts → referralTypes-DFnfRlx5.d.mts}
RENAMED
|
@@ -539,8 +539,8 @@ declare class Autumn {
|
|
|
539
539
|
delete: (customer_id: string, entity_id: string) => Promise<Result<DeleteEntityResult, AutumnError>>;
|
|
540
540
|
};
|
|
541
541
|
static referrals: {
|
|
542
|
-
createCode: (params: CreateReferralCodeParams) => Promise<Result<
|
|
543
|
-
redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<
|
|
542
|
+
createCode: (params: CreateReferralCodeParams) => Promise<Result<CreateReferralCodeResult, AutumnError>>;
|
|
543
|
+
redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<RedeemReferralCodeResult, AutumnError>>;
|
|
544
544
|
};
|
|
545
545
|
static features: {
|
|
546
546
|
list: () => Promise<Result<{
|
|
@@ -575,8 +575,8 @@ declare class Autumn {
|
|
|
575
575
|
delete: (customer_id: string, entity_id: string) => Promise<Result<DeleteEntityResult, AutumnError>>;
|
|
576
576
|
};
|
|
577
577
|
referrals: {
|
|
578
|
-
createCode: (params: CreateReferralCodeParams) => Promise<Result<
|
|
579
|
-
redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<
|
|
578
|
+
createCode: (params: CreateReferralCodeParams) => Promise<Result<CreateReferralCodeResult, AutumnError>>;
|
|
579
|
+
redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<RedeemReferralCodeResult, AutumnError>>;
|
|
580
580
|
};
|
|
581
581
|
features: {
|
|
582
582
|
list: () => Promise<Result<{
|
|
@@ -859,10 +859,25 @@ declare const CreateReferralCodeParamsSchema: z.ZodObject<{
|
|
|
859
859
|
program_id: z.ZodString;
|
|
860
860
|
}, z.core.$strip>;
|
|
861
861
|
type CreateReferralCodeParams = z.infer<typeof CreateReferralCodeParamsSchema>;
|
|
862
|
+
interface CreateReferralCodeResult {
|
|
863
|
+
code: string;
|
|
864
|
+
customer_id: string;
|
|
865
|
+
created_at: number;
|
|
866
|
+
}
|
|
862
867
|
declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
|
|
863
868
|
code: z.ZodString;
|
|
864
869
|
customer_id: z.ZodString;
|
|
865
870
|
}, z.core.$strip>;
|
|
866
871
|
type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
|
|
872
|
+
interface RedeemReferralCodeResult {
|
|
873
|
+
id: string;
|
|
874
|
+
customer_id: string;
|
|
875
|
+
reward_id: string;
|
|
876
|
+
referrer: {
|
|
877
|
+
id: string;
|
|
878
|
+
name: string | null;
|
|
879
|
+
email: string | null;
|
|
880
|
+
};
|
|
881
|
+
}
|
|
867
882
|
|
|
868
883
|
export { Autumn as A, type CustomerData as C };
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
import {
|
|
4
4
|
AutumnContext,
|
|
5
5
|
useAutumnContext
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-JVCOY7ZL.mjs";
|
|
9
|
-
import "./chunk-CIBQ4BJU.mjs";
|
|
6
|
+
} from "./chunk-AORLHO26.mjs";
|
|
7
|
+
import "./chunk-MDN4L5DT.mjs";
|
|
10
8
|
import "./chunk-XNYDR6KC.mjs";
|
|
11
9
|
import "./chunk-V575SGOW.mjs";
|
|
12
10
|
import "./chunk-ZV4RPZTM.mjs";
|
|
11
|
+
import "./chunk-JVCOY7ZL.mjs";
|
|
12
|
+
import "./chunk-CIBQ4BJU.mjs";
|
|
13
13
|
import "./chunk-QRCWNK2T.mjs";
|
|
14
14
|
import "./chunk-VTGR7VVK.mjs";
|
|
15
15
|
import "./chunk-WFFVOEUG.mjs";
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
import {
|
|
5
5
|
BaseAutumnProvider
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7EGNBV4Y.mjs";
|
|
7
7
|
import "./chunk-RFSQBGLO.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-GOJRWUAJ.mjs";
|
|
9
9
|
import "./chunk-LC75KITX.mjs";
|
|
10
10
|
import "./chunk-TL3Q72GK.mjs";
|
|
11
11
|
import "./chunk-NRR6GSHG.mjs";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-JVCOY7ZL.mjs";
|
|
15
|
-
import "./chunk-CIBQ4BJU.mjs";
|
|
12
|
+
import "./chunk-AORLHO26.mjs";
|
|
13
|
+
import "./chunk-MDN4L5DT.mjs";
|
|
16
14
|
import "./chunk-XNYDR6KC.mjs";
|
|
17
15
|
import "./chunk-V575SGOW.mjs";
|
|
18
16
|
import "./chunk-ZV4RPZTM.mjs";
|
|
17
|
+
import "./chunk-JVCOY7ZL.mjs";
|
|
18
|
+
import "./chunk-CIBQ4BJU.mjs";
|
|
19
19
|
import "./chunk-QRCWNK2T.mjs";
|
|
20
20
|
import "./chunk-VTGR7VVK.mjs";
|
|
21
21
|
import "./chunk-WFFVOEUG.mjs";
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
ReactAutumnProvider
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-6YVUPTRM.mjs";
|
|
6
|
+
import "./chunk-7EGNBV4Y.mjs";
|
|
7
7
|
import "./chunk-RFSQBGLO.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-GOJRWUAJ.mjs";
|
|
9
9
|
import "./chunk-LC75KITX.mjs";
|
|
10
10
|
import "./chunk-TL3Q72GK.mjs";
|
|
11
11
|
import "./chunk-NRR6GSHG.mjs";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-AORLHO26.mjs";
|
|
13
13
|
import "./chunk-XIBQRZXG.mjs";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-JVCOY7ZL.mjs";
|
|
16
|
-
import "./chunk-CIBQ4BJU.mjs";
|
|
14
|
+
import "./chunk-MDN4L5DT.mjs";
|
|
17
15
|
import "./chunk-XNYDR6KC.mjs";
|
|
18
16
|
import "./chunk-V575SGOW.mjs";
|
|
19
17
|
import "./chunk-ZV4RPZTM.mjs";
|
|
18
|
+
import "./chunk-JVCOY7ZL.mjs";
|
|
19
|
+
import "./chunk-CIBQ4BJU.mjs";
|
|
20
20
|
import "./chunk-QRCWNK2T.mjs";
|
|
21
21
|
import "./chunk-VTGR7VVK.mjs";
|
|
22
22
|
import "./chunk-WFFVOEUG.mjs";
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
BaseAutumnProvider
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7EGNBV4Y.mjs";
|
|
6
6
|
import {
|
|
7
7
|
AutumnContext
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-AORLHO26.mjs";
|
|
9
9
|
import {
|
|
10
10
|
ConvexAutumnClient
|
|
11
11
|
} from "./chunk-XIBQRZXG.mjs";
|
|
12
12
|
import {
|
|
13
13
|
AutumnClient
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MDN4L5DT.mjs";
|
|
15
15
|
|
|
16
16
|
// src/libraries/react/ReactAutumnProvider.tsx
|
|
17
17
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
useEntityBase
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZRTUO76C.mjs";
|
|
6
6
|
import {
|
|
7
7
|
AutumnContext
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-AORLHO26.mjs";
|
|
9
9
|
|
|
10
10
|
// src/libraries/react/hooks/useEntity.tsx
|
|
11
11
|
var useEntity = (entityId, params) => {
|