autumn-js 0.0.95 → 0.0.98
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/compose/index.d.mts +201 -0
- package/dist/compose/index.d.ts +201 -0
- package/dist/compose/index.js +147 -0
- package/dist/compose/index.mjs +113 -0
- package/dist/libraries/backend/better-auth.d.mts +21 -20
- package/dist/libraries/backend/better-auth.d.ts +21 -20
- package/dist/libraries/backend/better-auth.js +26 -21
- package/dist/libraries/backend/better-auth.mjs +27 -22
- package/dist/libraries/backend/express.d.mts +1 -1
- package/dist/libraries/backend/express.d.ts +1 -1
- package/dist/libraries/backend/next.js +94 -94
- package/dist/libraries/backend/next.mjs +94 -94
- package/dist/libraries/backend/{referralTypes-HAk2vTns.d.ts → referralTypes-D1Q2i3mG.d.ts} +28 -27
- package/dist/libraries/backend/{referralTypes-Dg9pRvI7.d.mts → referralTypes-Dfg6if8j.d.mts} +28 -27
- 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 +4 -4
- package/dist/libraries/react/AutumnContext.d.ts +4 -4
- package/dist/libraries/react/AutumnContext.mjs +7 -7
- package/dist/libraries/react/BaseAutumnProvider.d.mts +4 -4
- package/dist/libraries/react/BaseAutumnProvider.d.ts +4 -4
- package/dist/libraries/react/BaseAutumnProvider.mjs +12 -12
- package/dist/libraries/react/{ReactAutumnClient-k0qbHX8f.d.ts → ReactAutumnClient-ByV3ry6X.d.ts} +10 -10
- package/dist/libraries/react/{ReactAutumnClient-BuSRDMJN.d.mts → ReactAutumnClient-Ce34XSNp.d.mts} +10 -10
- package/dist/libraries/react/ReactAutumnProvider.d.mts +1 -1
- package/dist/libraries/react/ReactAutumnProvider.d.ts +1 -1
- package/dist/libraries/react/ReactAutumnProvider.mjs +13 -13
- package/dist/libraries/react/{chunk-27OTS3Q5.mjs → chunk-6MNYJ3YQ.mjs} +2 -2
- package/dist/libraries/react/{chunk-6CJ3FB74.mjs → chunk-7J5WGHDK.mjs} +2 -2
- package/dist/libraries/react/{chunk-DVMVIAZE.mjs → chunk-AISYLQU5.mjs} +1 -1
- package/dist/libraries/react/{chunk-P2O4LZFD.mjs → chunk-AL3VJLFU.mjs} +1 -1
- package/dist/libraries/react/{chunk-T5PIJ4HG.mjs → chunk-BJRHW2WP.mjs} +2 -2
- package/dist/libraries/react/{chunk-MZDRIPNS.mjs → chunk-BQUVIPG4.mjs} +2 -2
- package/dist/libraries/react/{chunk-5FZ7IV6P.mjs → chunk-BSF3KB4R.mjs} +46 -46
- package/dist/libraries/react/{chunk-CAMHARUX.mjs → chunk-FGNNWWBD.mjs} +2 -2
- package/dist/libraries/react/{chunk-G3FBFZLU.mjs → chunk-IJFGEGR2.mjs} +1 -1
- package/dist/libraries/react/{chunk-FPI3PLEL.mjs → chunk-OAPUYXBO.mjs} +6 -6
- package/dist/libraries/react/{chunk-CMO5LYYU.mjs → chunk-OAWFFAKA.mjs} +6 -6
- package/dist/libraries/react/{chunk-5G3DYUNT.mjs → chunk-RURBN53D.mjs} +1 -1
- package/dist/libraries/react/{chunk-LVDONEVF.mjs → chunk-SA4NOOHV.mjs} +2 -2
- package/dist/libraries/react/{chunk-AOJCMXVS.mjs → chunk-TKHPR5VW.mjs} +3 -3
- package/dist/libraries/react/{chunk-APDR7D6A.mjs → chunk-XSJQQSUT.mjs} +2 -2
- package/dist/libraries/react/{chunk-R4BYOLST.mjs → chunk-ZFOSCZKA.mjs} +2 -2
- package/dist/libraries/react/{chunk-CHXNYNH3.mjs → chunk-ZQ5HNM6O.mjs} +12 -12
- package/dist/libraries/react/{chunk-FEFGYFXQ.mjs → chunk-ZVQKDPUP.mjs} +3 -3
- package/dist/libraries/react/client/ReactAutumnClient.d.mts +4 -4
- package/dist/libraries/react/client/ReactAutumnClient.d.ts +4 -4
- package/dist/libraries/react/client/ReactAutumnClient.mjs +6 -6
- package/dist/libraries/react/client/clientCompMethods.d.mts +4 -4
- package/dist/libraries/react/client/clientCompMethods.d.ts +4 -4
- package/dist/libraries/react/client/clientCusMethods.d.mts +4 -4
- package/dist/libraries/react/client/clientCusMethods.d.ts +4 -4
- package/dist/libraries/react/client/clientEntityMethods.d.mts +4 -4
- package/dist/libraries/react/client/clientEntityMethods.d.ts +4 -4
- package/dist/libraries/react/client/clientGenMethods.d.mts +4 -4
- package/dist/libraries/react/client/clientGenMethods.d.ts +4 -4
- package/dist/libraries/react/client/clientProdMethods.d.mts +4 -4
- package/dist/libraries/react/client/clientProdMethods.d.ts +4 -4
- package/dist/libraries/react/client/clientReferralMethods.d.mts +4 -4
- package/dist/libraries/react/client/clientReferralMethods.d.ts +4 -4
- package/dist/libraries/react/client/types/clientGenTypes.d.mts +12 -12
- package/dist/libraries/react/client/types/clientGenTypes.d.ts +12 -12
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.mts +1 -1
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.ts +1 -1
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.js +55 -55
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.mjs +26 -26
- package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.mts +1 -1
- package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.ts +1 -1
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.mts +1 -1
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.ts +1 -1
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.js +50 -50
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.mjs +5 -5
- package/dist/libraries/react/components/check-dialog/lib/check-content.d.mts +1 -1
- package/dist/libraries/react/components/check-dialog/lib/check-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 +55 -55
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +26 -26
- package/dist/libraries/react/components/ui/button.js +3 -3
- package/dist/libraries/react/components/ui/button.mjs +2 -2
- package/dist/libraries/react/components/ui/dialog.js +49 -49
- package/dist/libraries/react/components/ui/dialog.mjs +3 -3
- package/dist/libraries/react/components/ui/switch.js +12 -12
- package/dist/libraries/react/components/ui/switch.mjs +3 -3
- package/dist/libraries/react/{cusTypes-Vw94kPR9.d.ts → cusTypes-cFcAuKk6.d.mts} +2 -1
- package/dist/libraries/react/{cusTypes-Vw94kPR9.d.mts → cusTypes-cFcAuKk6.d.ts} +2 -1
- package/dist/libraries/react/{entTypes-B7nuhHD7.d.ts → entTypes-DPu6Efi2.d.ts} +1 -1
- package/dist/libraries/react/{entTypes-Ho-VocKG.d.mts → entTypes-S-Yuznzg.d.mts} +1 -1
- package/dist/libraries/react/hooks/handleAllowed.d.mts +2 -2
- package/dist/libraries/react/hooks/handleAllowed.d.ts +2 -2
- package/dist/libraries/react/hooks/useAutumn.d.mts +2 -2
- package/dist/libraries/react/hooks/useAutumn.d.ts +2 -2
- package/dist/libraries/react/hooks/useAutumn.mjs +10 -10
- package/dist/libraries/react/hooks/useAutumnBase.d.mts +4 -4
- package/dist/libraries/react/hooks/useAutumnBase.d.ts +4 -4
- package/dist/libraries/react/hooks/useAutumnBase.mjs +9 -9
- package/dist/libraries/react/hooks/useCustomer.d.mts +4 -4
- package/dist/libraries/react/hooks/useCustomer.d.ts +4 -4
- package/dist/libraries/react/hooks/useCustomer.mjs +11 -11
- package/dist/libraries/react/hooks/useCustomerBase.d.mts +4 -4
- package/dist/libraries/react/hooks/useCustomerBase.d.ts +4 -4
- package/dist/libraries/react/hooks/useCustomerBase.mjs +10 -10
- package/dist/libraries/react/hooks/useEntity.d.mts +3 -3
- package/dist/libraries/react/hooks/useEntity.d.ts +3 -3
- package/dist/libraries/react/hooks/useEntity.mjs +11 -11
- package/dist/libraries/react/hooks/useEntityBase.d.mts +4 -4
- package/dist/libraries/react/hooks/useEntityBase.d.ts +4 -4
- package/dist/libraries/react/hooks/useEntityBase.mjs +10 -10
- 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.mjs +9 -9
- package/dist/libraries/react/hooks/usePricingTableBase.d.mts +4 -4
- package/dist/libraries/react/hooks/usePricingTableBase.d.ts +4 -4
- package/dist/libraries/react/hooks/usePricingTableBase.mjs +8 -8
- package/dist/libraries/react/hooks/useProductsBase.mjs +7 -7
- package/dist/libraries/react/index.d.mts +1 -0
- package/dist/libraries/react/index.d.ts +1 -0
- package/dist/libraries/react/index.js +55 -55
- package/dist/libraries/react/index.mjs +55 -55
- package/dist/libraries/react/{response-CQf3mDB8.d.ts → response-BDOGqtuI.d.ts} +8 -8
- package/dist/libraries/react/{response-CWluLfIs.d.mts → response-R1MWYZiA.d.mts} +8 -8
- package/dist/next/{AutumnProvider-CCYZC_bN.d.mts → AutumnProvider-Xl1mqxls.d.mts} +1 -0
- package/dist/next/{AutumnProvider-CCYZC_bN.d.ts → AutumnProvider-Xl1mqxls.d.ts} +1 -0
- package/dist/next/AutumnProvider.d.mts +1 -1
- package/dist/next/AutumnProvider.d.ts +1 -1
- package/dist/next/client/NextAutumnClient.d.mts +3 -3
- package/dist/next/client/NextAutumnClient.d.ts +3 -3
- package/dist/next/client/NextAutumnProvider.d.mts +1 -1
- package/dist/next/client/NextAutumnProvider.d.ts +1 -1
- package/dist/next/client/{clientGenTypes-CxB4go6q.d.ts → clientGenTypes-B_LCNkd5.d.ts} +1 -1
- package/dist/next/client/{clientGenTypes-9ngy1q97.d.mts → clientGenTypes-BwevGhcx.d.mts} +1 -1
- package/dist/next/client/clientUtils.d.mts +2 -2
- package/dist/next/client/clientUtils.d.ts +2 -2
- package/dist/next/client/{cusTypes-D8lhXGaX.d.mts → cusTypes-Gh2wfcmj.d.mts} +1 -0
- package/dist/next/client/{cusTypes-D8lhXGaX.d.ts → cusTypes-Gh2wfcmj.d.ts} +1 -0
- package/dist/next/client/{entTypes-Dq2mbehl.d.ts → entTypes-B_w6I3y-.d.ts} +1 -1
- package/dist/next/client/{entTypes-B-2_9hzP.d.mts → entTypes-C_xS1VPE.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 +3 -3
- package/dist/next/client/hooks/useCustomer.d.ts +3 -3
- package/dist/next/client/hooks/useEntity.d.mts +3 -3
- package/dist/next/client/hooks/useEntity.d.ts +3 -3
- 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 +2 -2
- package/dist/next/client/types.d.ts +2 -2
- package/dist/next/index.d.mts +2 -2
- package/dist/next/index.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 +21 -21
- package/dist/next/server/cusActions.d.ts +21 -21
- package/dist/next/server/{cusTypes-Cy72qmFx.d.mts → cusTypes-B8u88Vfq.d.mts} +3 -2
- package/dist/next/server/{cusTypes-Cy72qmFx.d.ts → cusTypes-B8u88Vfq.d.ts} +3 -2
- package/dist/next/server/genActions.d.mts +1 -1
- package/dist/next/server/genActions.d.ts +1 -1
- package/dist/sdk/index.d.mts +1 -0
- package/dist/sdk/index.d.ts +1 -0
- package/package.json +19 -6
- package/tsup.config.ts +12 -3
- package/dist/libraries/react/{chunk-ALFXUHDD.mjs → chunk-QRI2TNR7.mjs} +15 -15
|
@@ -192,6 +192,7 @@ interface CustomerProduct {
|
|
|
192
192
|
status: ProductStatus;
|
|
193
193
|
started_at: number;
|
|
194
194
|
canceled_at: number | null;
|
|
195
|
+
version: number;
|
|
195
196
|
subscription_ids?: string[] | null;
|
|
196
197
|
current_period_start?: number | null;
|
|
197
198
|
current_period_end?: number | null;
|
|
@@ -230,19 +231,19 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
230
231
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
231
232
|
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
|
|
232
233
|
}, "strip", z.ZodTypeAny, {
|
|
233
|
-
|
|
234
|
+
metadata?: Record<string, any> | undefined;
|
|
235
|
+
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
234
236
|
name?: string | null | undefined;
|
|
237
|
+
id?: string | null | undefined;
|
|
235
238
|
email?: string | null | undefined;
|
|
236
239
|
fingerprint?: string | null | undefined;
|
|
240
|
+
}, {
|
|
237
241
|
metadata?: Record<string, any> | undefined;
|
|
238
242
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
239
|
-
}, {
|
|
240
|
-
id?: string | null | undefined;
|
|
241
243
|
name?: string | null | undefined;
|
|
244
|
+
id?: string | null | undefined;
|
|
242
245
|
email?: string | null | undefined;
|
|
243
246
|
fingerprint?: string | null | undefined;
|
|
244
|
-
metadata?: Record<string, any> | undefined;
|
|
245
|
-
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
246
247
|
}>;
|
|
247
248
|
type CreateCustomerParams = z.infer<typeof CreateCustomerParamsSchema>;
|
|
248
249
|
interface UpdateCustomerParams {
|
|
@@ -294,13 +295,13 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
294
295
|
reward: z.ZodOptional<z.ZodString>;
|
|
295
296
|
}, "strip", z.ZodTypeAny, {
|
|
296
297
|
customer_id: string;
|
|
297
|
-
entity_id?: string | undefined;
|
|
298
298
|
options?: {
|
|
299
299
|
feature_id: string;
|
|
300
300
|
quantity: number;
|
|
301
301
|
}[] | undefined;
|
|
302
302
|
metadata?: Record<string, string> | undefined;
|
|
303
303
|
product_id?: string | undefined;
|
|
304
|
+
entity_id?: string | undefined;
|
|
304
305
|
product_ids?: string[] | undefined;
|
|
305
306
|
free_trial?: boolean | undefined;
|
|
306
307
|
success_url?: string | undefined;
|
|
@@ -311,13 +312,13 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
311
312
|
reward?: string | undefined;
|
|
312
313
|
}, {
|
|
313
314
|
customer_id: string;
|
|
314
|
-
entity_id?: string | undefined;
|
|
315
315
|
options?: {
|
|
316
316
|
feature_id: string;
|
|
317
317
|
quantity: number;
|
|
318
318
|
}[] | undefined;
|
|
319
319
|
metadata?: Record<string, string> | undefined;
|
|
320
320
|
product_id?: string | undefined;
|
|
321
|
+
entity_id?: string | undefined;
|
|
321
322
|
product_ids?: string[] | undefined;
|
|
322
323
|
free_trial?: boolean | undefined;
|
|
323
324
|
success_url?: string | undefined;
|
|
@@ -356,18 +357,18 @@ declare const TrackParamsSchema: z.ZodObject<{
|
|
|
356
357
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
357
358
|
}, "strip", z.ZodTypeAny, {
|
|
358
359
|
customer_id: string;
|
|
359
|
-
feature_id?: string | undefined;
|
|
360
|
-
entity_id?: string | undefined;
|
|
361
360
|
value?: number | undefined;
|
|
361
|
+
entity_id?: string | undefined;
|
|
362
|
+
feature_id?: string | undefined;
|
|
362
363
|
customer_data?: any;
|
|
363
364
|
entity_data?: any;
|
|
364
365
|
event_name?: string | undefined;
|
|
365
366
|
idempotency_key?: string | undefined;
|
|
366
367
|
}, {
|
|
367
368
|
customer_id: string;
|
|
368
|
-
feature_id?: string | undefined;
|
|
369
|
-
entity_id?: string | undefined;
|
|
370
369
|
value?: number | undefined;
|
|
370
|
+
entity_id?: string | undefined;
|
|
371
|
+
feature_id?: string | undefined;
|
|
371
372
|
customer_data?: any;
|
|
372
373
|
entity_data?: any;
|
|
373
374
|
event_name?: string | undefined;
|
|
@@ -395,28 +396,28 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
395
396
|
}>>;
|
|
396
397
|
}, "strip", z.ZodTypeAny, {
|
|
397
398
|
customer_id: string;
|
|
398
|
-
feature_id?: string | undefined;
|
|
399
|
-
entity_id?: string | undefined;
|
|
400
|
-
required_balance?: number | undefined;
|
|
401
399
|
product_id?: string | undefined;
|
|
400
|
+
entity_id?: string | undefined;
|
|
401
|
+
feature_id?: string | undefined;
|
|
402
402
|
customer_data?: any;
|
|
403
403
|
entity_data?: {
|
|
404
404
|
feature_id: string;
|
|
405
405
|
name?: string | undefined;
|
|
406
406
|
} | undefined;
|
|
407
|
+
required_balance?: number | undefined;
|
|
407
408
|
send_event?: boolean | undefined;
|
|
408
409
|
with_preview?: boolean | undefined;
|
|
409
410
|
}, {
|
|
410
411
|
customer_id: string;
|
|
411
|
-
feature_id?: string | undefined;
|
|
412
|
-
entity_id?: string | undefined;
|
|
413
|
-
required_balance?: number | undefined;
|
|
414
412
|
product_id?: string | undefined;
|
|
413
|
+
entity_id?: string | undefined;
|
|
414
|
+
feature_id?: string | undefined;
|
|
415
415
|
customer_data?: any;
|
|
416
416
|
entity_data?: {
|
|
417
417
|
feature_id: string;
|
|
418
418
|
name?: string | undefined;
|
|
419
419
|
} | undefined;
|
|
420
|
+
required_balance?: number | undefined;
|
|
420
421
|
send_event?: boolean | undefined;
|
|
421
422
|
with_preview?: boolean | undefined;
|
|
422
423
|
}>;
|
|
@@ -507,18 +508,18 @@ declare class Autumn {
|
|
|
507
508
|
redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<any, AutumnError>>;
|
|
508
509
|
};
|
|
509
510
|
static attach: (params: AttachParams) => Promise<Result<{
|
|
510
|
-
customer_id: string;
|
|
511
|
-
code: string;
|
|
512
511
|
message: string;
|
|
512
|
+
code: string;
|
|
513
|
+
customer_id: string;
|
|
513
514
|
product_ids: string[];
|
|
514
515
|
customer_data?: any;
|
|
515
516
|
checkout_url?: string | undefined;
|
|
516
517
|
}, AutumnError>>;
|
|
517
518
|
static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
|
|
518
519
|
attach(params: AttachParams): Promise<Result<{
|
|
519
|
-
customer_id: string;
|
|
520
|
-
code: string;
|
|
521
520
|
message: string;
|
|
521
|
+
code: string;
|
|
522
|
+
customer_id: string;
|
|
522
523
|
product_ids: string[];
|
|
523
524
|
customer_data?: any;
|
|
524
525
|
checkout_url?: string | undefined;
|
|
@@ -552,8 +553,8 @@ declare class Autumn {
|
|
|
552
553
|
* Please use the new track() method instead.
|
|
553
554
|
*/
|
|
554
555
|
static event: (params: TrackParams) => Promise<Result<{
|
|
555
|
-
customer_id: string;
|
|
556
556
|
code: string;
|
|
557
|
+
customer_id: string;
|
|
557
558
|
id: string;
|
|
558
559
|
feature_id?: string | undefined;
|
|
559
560
|
event_name?: string | undefined;
|
|
@@ -563,22 +564,22 @@ declare class Autumn {
|
|
|
563
564
|
* Please use the new track() method instead.
|
|
564
565
|
*/
|
|
565
566
|
event(params: TrackParams): Promise<Result<{
|
|
566
|
-
customer_id: string;
|
|
567
567
|
code: string;
|
|
568
|
+
customer_id: string;
|
|
568
569
|
id: string;
|
|
569
570
|
feature_id?: string | undefined;
|
|
570
571
|
event_name?: string | undefined;
|
|
571
572
|
}, AutumnError>>;
|
|
572
573
|
static track: (params: TrackParams) => Promise<Result<{
|
|
573
|
-
customer_id: string;
|
|
574
574
|
code: string;
|
|
575
|
+
customer_id: string;
|
|
575
576
|
id: string;
|
|
576
577
|
feature_id?: string | undefined;
|
|
577
578
|
event_name?: string | undefined;
|
|
578
579
|
}, AutumnError>>;
|
|
579
580
|
track(params: TrackParams): Promise<Result<{
|
|
580
|
-
customer_id: string;
|
|
581
581
|
code: string;
|
|
582
|
+
customer_id: string;
|
|
582
583
|
id: string;
|
|
583
584
|
feature_id?: string | undefined;
|
|
584
585
|
event_name?: string | undefined;
|
|
@@ -629,11 +630,11 @@ declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
|
|
|
629
630
|
code: z.ZodString;
|
|
630
631
|
customer_id: z.ZodString;
|
|
631
632
|
}, "strip", z.ZodTypeAny, {
|
|
632
|
-
customer_id: string;
|
|
633
633
|
code: string;
|
|
634
|
-
}, {
|
|
635
634
|
customer_id: string;
|
|
635
|
+
}, {
|
|
636
636
|
code: string;
|
|
637
|
+
customer_id: string;
|
|
637
638
|
}>;
|
|
638
639
|
type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
|
|
639
640
|
|
package/dist/libraries/backend/{referralTypes-Dg9pRvI7.d.mts → referralTypes-Dfg6if8j.d.mts}
RENAMED
|
@@ -192,6 +192,7 @@ interface CustomerProduct {
|
|
|
192
192
|
status: ProductStatus;
|
|
193
193
|
started_at: number;
|
|
194
194
|
canceled_at: number | null;
|
|
195
|
+
version: number;
|
|
195
196
|
subscription_ids?: string[] | null;
|
|
196
197
|
current_period_start?: number | null;
|
|
197
198
|
current_period_end?: number | null;
|
|
@@ -230,19 +231,19 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
230
231
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
231
232
|
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
|
|
232
233
|
}, "strip", z.ZodTypeAny, {
|
|
233
|
-
|
|
234
|
+
metadata?: Record<string, any> | undefined;
|
|
235
|
+
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
234
236
|
name?: string | null | undefined;
|
|
237
|
+
id?: string | null | undefined;
|
|
235
238
|
email?: string | null | undefined;
|
|
236
239
|
fingerprint?: string | null | undefined;
|
|
240
|
+
}, {
|
|
237
241
|
metadata?: Record<string, any> | undefined;
|
|
238
242
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
239
|
-
}, {
|
|
240
|
-
id?: string | null | undefined;
|
|
241
243
|
name?: string | null | undefined;
|
|
244
|
+
id?: string | null | undefined;
|
|
242
245
|
email?: string | null | undefined;
|
|
243
246
|
fingerprint?: string | null | undefined;
|
|
244
|
-
metadata?: Record<string, any> | undefined;
|
|
245
|
-
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
246
247
|
}>;
|
|
247
248
|
type CreateCustomerParams = z.infer<typeof CreateCustomerParamsSchema>;
|
|
248
249
|
interface UpdateCustomerParams {
|
|
@@ -294,13 +295,13 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
294
295
|
reward: z.ZodOptional<z.ZodString>;
|
|
295
296
|
}, "strip", z.ZodTypeAny, {
|
|
296
297
|
customer_id: string;
|
|
297
|
-
entity_id?: string | undefined;
|
|
298
298
|
options?: {
|
|
299
299
|
feature_id: string;
|
|
300
300
|
quantity: number;
|
|
301
301
|
}[] | undefined;
|
|
302
302
|
metadata?: Record<string, string> | undefined;
|
|
303
303
|
product_id?: string | undefined;
|
|
304
|
+
entity_id?: string | undefined;
|
|
304
305
|
product_ids?: string[] | undefined;
|
|
305
306
|
free_trial?: boolean | undefined;
|
|
306
307
|
success_url?: string | undefined;
|
|
@@ -311,13 +312,13 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
311
312
|
reward?: string | undefined;
|
|
312
313
|
}, {
|
|
313
314
|
customer_id: string;
|
|
314
|
-
entity_id?: string | undefined;
|
|
315
315
|
options?: {
|
|
316
316
|
feature_id: string;
|
|
317
317
|
quantity: number;
|
|
318
318
|
}[] | undefined;
|
|
319
319
|
metadata?: Record<string, string> | undefined;
|
|
320
320
|
product_id?: string | undefined;
|
|
321
|
+
entity_id?: string | undefined;
|
|
321
322
|
product_ids?: string[] | undefined;
|
|
322
323
|
free_trial?: boolean | undefined;
|
|
323
324
|
success_url?: string | undefined;
|
|
@@ -356,18 +357,18 @@ declare const TrackParamsSchema: z.ZodObject<{
|
|
|
356
357
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
357
358
|
}, "strip", z.ZodTypeAny, {
|
|
358
359
|
customer_id: string;
|
|
359
|
-
feature_id?: string | undefined;
|
|
360
|
-
entity_id?: string | undefined;
|
|
361
360
|
value?: number | undefined;
|
|
361
|
+
entity_id?: string | undefined;
|
|
362
|
+
feature_id?: string | undefined;
|
|
362
363
|
customer_data?: any;
|
|
363
364
|
entity_data?: any;
|
|
364
365
|
event_name?: string | undefined;
|
|
365
366
|
idempotency_key?: string | undefined;
|
|
366
367
|
}, {
|
|
367
368
|
customer_id: string;
|
|
368
|
-
feature_id?: string | undefined;
|
|
369
|
-
entity_id?: string | undefined;
|
|
370
369
|
value?: number | undefined;
|
|
370
|
+
entity_id?: string | undefined;
|
|
371
|
+
feature_id?: string | undefined;
|
|
371
372
|
customer_data?: any;
|
|
372
373
|
entity_data?: any;
|
|
373
374
|
event_name?: string | undefined;
|
|
@@ -395,28 +396,28 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
395
396
|
}>>;
|
|
396
397
|
}, "strip", z.ZodTypeAny, {
|
|
397
398
|
customer_id: string;
|
|
398
|
-
feature_id?: string | undefined;
|
|
399
|
-
entity_id?: string | undefined;
|
|
400
|
-
required_balance?: number | undefined;
|
|
401
399
|
product_id?: string | undefined;
|
|
400
|
+
entity_id?: string | undefined;
|
|
401
|
+
feature_id?: string | undefined;
|
|
402
402
|
customer_data?: any;
|
|
403
403
|
entity_data?: {
|
|
404
404
|
feature_id: string;
|
|
405
405
|
name?: string | undefined;
|
|
406
406
|
} | undefined;
|
|
407
|
+
required_balance?: number | undefined;
|
|
407
408
|
send_event?: boolean | undefined;
|
|
408
409
|
with_preview?: boolean | undefined;
|
|
409
410
|
}, {
|
|
410
411
|
customer_id: string;
|
|
411
|
-
feature_id?: string | undefined;
|
|
412
|
-
entity_id?: string | undefined;
|
|
413
|
-
required_balance?: number | undefined;
|
|
414
412
|
product_id?: string | undefined;
|
|
413
|
+
entity_id?: string | undefined;
|
|
414
|
+
feature_id?: string | undefined;
|
|
415
415
|
customer_data?: any;
|
|
416
416
|
entity_data?: {
|
|
417
417
|
feature_id: string;
|
|
418
418
|
name?: string | undefined;
|
|
419
419
|
} | undefined;
|
|
420
|
+
required_balance?: number | undefined;
|
|
420
421
|
send_event?: boolean | undefined;
|
|
421
422
|
with_preview?: boolean | undefined;
|
|
422
423
|
}>;
|
|
@@ -507,18 +508,18 @@ declare class Autumn {
|
|
|
507
508
|
redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<any, AutumnError>>;
|
|
508
509
|
};
|
|
509
510
|
static attach: (params: AttachParams) => Promise<Result<{
|
|
510
|
-
customer_id: string;
|
|
511
|
-
code: string;
|
|
512
511
|
message: string;
|
|
512
|
+
code: string;
|
|
513
|
+
customer_id: string;
|
|
513
514
|
product_ids: string[];
|
|
514
515
|
customer_data?: any;
|
|
515
516
|
checkout_url?: string | undefined;
|
|
516
517
|
}, AutumnError>>;
|
|
517
518
|
static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
|
|
518
519
|
attach(params: AttachParams): Promise<Result<{
|
|
519
|
-
customer_id: string;
|
|
520
|
-
code: string;
|
|
521
520
|
message: string;
|
|
521
|
+
code: string;
|
|
522
|
+
customer_id: string;
|
|
522
523
|
product_ids: string[];
|
|
523
524
|
customer_data?: any;
|
|
524
525
|
checkout_url?: string | undefined;
|
|
@@ -552,8 +553,8 @@ declare class Autumn {
|
|
|
552
553
|
* Please use the new track() method instead.
|
|
553
554
|
*/
|
|
554
555
|
static event: (params: TrackParams) => Promise<Result<{
|
|
555
|
-
customer_id: string;
|
|
556
556
|
code: string;
|
|
557
|
+
customer_id: string;
|
|
557
558
|
id: string;
|
|
558
559
|
feature_id?: string | undefined;
|
|
559
560
|
event_name?: string | undefined;
|
|
@@ -563,22 +564,22 @@ declare class Autumn {
|
|
|
563
564
|
* Please use the new track() method instead.
|
|
564
565
|
*/
|
|
565
566
|
event(params: TrackParams): Promise<Result<{
|
|
566
|
-
customer_id: string;
|
|
567
567
|
code: string;
|
|
568
|
+
customer_id: string;
|
|
568
569
|
id: string;
|
|
569
570
|
feature_id?: string | undefined;
|
|
570
571
|
event_name?: string | undefined;
|
|
571
572
|
}, AutumnError>>;
|
|
572
573
|
static track: (params: TrackParams) => Promise<Result<{
|
|
573
|
-
customer_id: string;
|
|
574
574
|
code: string;
|
|
575
|
+
customer_id: string;
|
|
575
576
|
id: string;
|
|
576
577
|
feature_id?: string | undefined;
|
|
577
578
|
event_name?: string | undefined;
|
|
578
579
|
}, AutumnError>>;
|
|
579
580
|
track(params: TrackParams): Promise<Result<{
|
|
580
|
-
customer_id: string;
|
|
581
581
|
code: string;
|
|
582
|
+
customer_id: string;
|
|
582
583
|
id: string;
|
|
583
584
|
feature_id?: string | undefined;
|
|
584
585
|
event_name?: string | undefined;
|
|
@@ -629,11 +630,11 @@ declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
|
|
|
629
630
|
code: z.ZodString;
|
|
630
631
|
customer_id: z.ZodString;
|
|
631
632
|
}, "strip", z.ZodTypeAny, {
|
|
632
|
-
customer_id: string;
|
|
633
633
|
code: string;
|
|
634
|
-
}, {
|
|
635
634
|
customer_id: string;
|
|
635
|
+
}, {
|
|
636
636
|
code: string;
|
|
637
|
+
customer_id: string;
|
|
637
638
|
}>;
|
|
638
639
|
type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
|
|
639
640
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import { A as AutumnClient } from './ReactAutumnClient-
|
|
2
|
+
import { A as AutumnClient } from './ReactAutumnClient-Ce34XSNp.mjs';
|
|
3
3
|
import './client/types/clientEntTypes.mjs';
|
|
4
4
|
import './client/types/clientGenTypes.mjs';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import './error-DHbclCVh.mjs';
|
|
7
|
-
import './response-
|
|
8
|
-
import './cusTypes-
|
|
9
|
-
import './entTypes-
|
|
7
|
+
import './response-R1MWYZiA.mjs';
|
|
8
|
+
import './cusTypes-cFcAuKk6.mjs';
|
|
9
|
+
import './entTypes-S-Yuznzg.mjs';
|
|
10
10
|
|
|
11
11
|
interface AutumnDialogContext {
|
|
12
12
|
props: any;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import { A as AutumnClient } from './ReactAutumnClient-
|
|
2
|
+
import { A as AutumnClient } from './ReactAutumnClient-ByV3ry6X.js';
|
|
3
3
|
import './client/types/clientEntTypes.js';
|
|
4
4
|
import './client/types/clientGenTypes.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import './error-DHbclCVh.js';
|
|
7
|
-
import './response-
|
|
8
|
-
import './cusTypes-
|
|
9
|
-
import './entTypes-
|
|
7
|
+
import './response-BDOGqtuI.js';
|
|
8
|
+
import './cusTypes-cFcAuKk6.js';
|
|
9
|
+
import './entTypes-DPu6Efi2.js';
|
|
10
10
|
|
|
11
11
|
interface AutumnDialogContext {
|
|
12
12
|
props: any;
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
import {
|
|
4
4
|
AutumnContext,
|
|
5
5
|
useAutumnContext
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-IJFGEGR2.mjs";
|
|
7
|
+
import "./chunk-QRI2TNR7.mjs";
|
|
8
|
+
import "./chunk-ZF2HUCN6.mjs";
|
|
9
|
+
import "./chunk-VUBJ6JM3.mjs";
|
|
10
10
|
import "./chunk-V575SGOW.mjs";
|
|
11
11
|
import "./chunk-ZV4RPZTM.mjs";
|
|
12
|
+
import "./chunk-KQT5G3HT.mjs";
|
|
12
13
|
import "./chunk-VTGR7VVK.mjs";
|
|
13
14
|
import "./chunk-WFFVOEUG.mjs";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-KQT5G3HT.mjs";
|
|
15
|
+
import "./chunk-JVCOY7ZL.mjs";
|
|
16
|
+
import "./chunk-CIBQ4BJU.mjs";
|
|
17
17
|
export {
|
|
18
18
|
AutumnContext,
|
|
19
19
|
useAutumnContext
|
|
@@ -1,13 +1,13 @@
|
|
|
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-Ce34XSNp.mjs';
|
|
4
4
|
import './client/types/clientEntTypes.mjs';
|
|
5
5
|
import './client/types/clientGenTypes.mjs';
|
|
6
6
|
import 'zod';
|
|
7
7
|
import './error-DHbclCVh.mjs';
|
|
8
|
-
import './response-
|
|
9
|
-
import './cusTypes-
|
|
10
|
-
import './entTypes-
|
|
8
|
+
import './response-R1MWYZiA.mjs';
|
|
9
|
+
import './cusTypes-cFcAuKk6.mjs';
|
|
10
|
+
import './entTypes-S-Yuznzg.mjs';
|
|
11
11
|
|
|
12
12
|
declare function BaseAutumnProvider({ client, children, AutumnContext, }: {
|
|
13
13
|
client: AutumnClient;
|
|
@@ -1,13 +1,13 @@
|
|
|
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-ByV3ry6X.js';
|
|
4
4
|
import './client/types/clientEntTypes.js';
|
|
5
5
|
import './client/types/clientGenTypes.js';
|
|
6
6
|
import 'zod';
|
|
7
7
|
import './error-DHbclCVh.js';
|
|
8
|
-
import './response-
|
|
9
|
-
import './cusTypes-
|
|
10
|
-
import './entTypes-
|
|
8
|
+
import './response-BDOGqtuI.js';
|
|
9
|
+
import './cusTypes-cFcAuKk6.js';
|
|
10
|
+
import './entTypes-DPu6Efi2.js';
|
|
11
11
|
|
|
12
12
|
declare function BaseAutumnProvider({ client, children, AutumnContext, }: {
|
|
13
13
|
client: AutumnClient;
|
|
@@ -3,23 +3,23 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
import {
|
|
5
5
|
BaseAutumnProvider
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-3JJC2VU5.mjs";
|
|
9
|
-
import "./chunk-LVDONEVF.mjs";
|
|
10
|
-
import "./chunk-R4BYOLST.mjs";
|
|
6
|
+
} from "./chunk-AISYLQU5.mjs";
|
|
7
|
+
import "./chunk-BJRHW2WP.mjs";
|
|
11
8
|
import "./chunk-4QPHNIQ7.mjs";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-3JJC2VU5.mjs";
|
|
10
|
+
import "./chunk-SA4NOOHV.mjs";
|
|
11
|
+
import "./chunk-ZFOSCZKA.mjs";
|
|
12
|
+
import "./chunk-IJFGEGR2.mjs";
|
|
13
|
+
import "./chunk-QRI2TNR7.mjs";
|
|
14
|
+
import "./chunk-ZF2HUCN6.mjs";
|
|
15
|
+
import "./chunk-VUBJ6JM3.mjs";
|
|
16
16
|
import "./chunk-V575SGOW.mjs";
|
|
17
17
|
import "./chunk-ZV4RPZTM.mjs";
|
|
18
|
+
import "./chunk-KQT5G3HT.mjs";
|
|
18
19
|
import "./chunk-VTGR7VVK.mjs";
|
|
19
20
|
import "./chunk-WFFVOEUG.mjs";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-KQT5G3HT.mjs";
|
|
21
|
+
import "./chunk-JVCOY7ZL.mjs";
|
|
22
|
+
import "./chunk-CIBQ4BJU.mjs";
|
|
23
23
|
export {
|
|
24
24
|
BaseAutumnProvider
|
|
25
25
|
};
|
package/dist/libraries/react/{ReactAutumnClient-k0qbHX8f.d.ts → ReactAutumnClient-ByV3ry6X.d.ts}
RENAMED
|
@@ -2,9 +2,9 @@ import { CreateEntityParams, GetEntityParams } from './client/types/clientEntTyp
|
|
|
2
2
|
import { OpenBillingPortalParams, SetupPaymentParams } from './client/types/clientGenTypes.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { A as AutumnError } from './error-DHbclCVh.js';
|
|
5
|
-
import { R as Result, A as AutumnPromise,
|
|
6
|
-
import {
|
|
7
|
-
import { E as Entity, D as DeleteEntityResult } from './entTypes-
|
|
5
|
+
import { R as Result, A as AutumnPromise, C as CheckResult, S as SetupPaymentResult } from './response-BDOGqtuI.js';
|
|
6
|
+
import { h as ProductItem, l as ProductScenario, C as CustomerData, c as CreateCustomerParams, b as Customer, B as BillingPortalResult, P as Product } from './cusTypes-cFcAuKk6.js';
|
|
7
|
+
import { E as Entity, D as DeleteEntityResult } from './entTypes-DPu6Efi2.js';
|
|
8
8
|
|
|
9
9
|
interface PricingTableProduct {
|
|
10
10
|
id: string;
|
|
@@ -80,10 +80,11 @@ declare class AutumnClient {
|
|
|
80
80
|
}, AutumnError>>;
|
|
81
81
|
attach: (params: {
|
|
82
82
|
options?: {
|
|
83
|
-
featureId: string;
|
|
84
83
|
quantity: number;
|
|
84
|
+
featureId: string;
|
|
85
85
|
}[] | undefined;
|
|
86
86
|
metadata?: Record<string, string> | undefined;
|
|
87
|
+
reward?: string | undefined;
|
|
87
88
|
productId?: string | undefined;
|
|
88
89
|
entityId?: string | undefined;
|
|
89
90
|
productIds?: string[] | undefined;
|
|
@@ -93,15 +94,14 @@ declare class AutumnClient {
|
|
|
93
94
|
dialog?: ((args_0: any, ...args: unknown[]) => JSX.Element | React.ReactNode) | undefined;
|
|
94
95
|
entityData?: any;
|
|
95
96
|
openInNewTab?: boolean | undefined;
|
|
96
|
-
reward?: string | undefined;
|
|
97
97
|
checkoutSessionParams?: Record<string, any> | undefined;
|
|
98
98
|
}) => AutumnPromise<{
|
|
99
99
|
customer_id: string;
|
|
100
100
|
code: string;
|
|
101
101
|
message: string;
|
|
102
102
|
product_ids: string[];
|
|
103
|
-
checkout_url?: string | undefined;
|
|
104
103
|
customer_data?: any;
|
|
104
|
+
checkout_url?: string | undefined;
|
|
105
105
|
}>;
|
|
106
106
|
cancel: (params: {
|
|
107
107
|
productId: string;
|
|
@@ -109,13 +109,13 @@ declare class AutumnClient {
|
|
|
109
109
|
cancelImmediately?: boolean | undefined;
|
|
110
110
|
}) => AutumnPromise<{
|
|
111
111
|
customer_id: string;
|
|
112
|
-
success: boolean;
|
|
113
112
|
product_id: string;
|
|
113
|
+
success: boolean;
|
|
114
114
|
}>;
|
|
115
115
|
check: (params: {
|
|
116
|
+
featureId?: string | undefined;
|
|
116
117
|
productId?: string | undefined;
|
|
117
118
|
entityId?: string | undefined;
|
|
118
|
-
featureId?: string | undefined;
|
|
119
119
|
dialog?: ((args_0: any, ...args: unknown[]) => JSX.Element | React.ReactNode) | undefined;
|
|
120
120
|
entityData?: any;
|
|
121
121
|
requiredBalance?: number | undefined;
|
|
@@ -124,15 +124,15 @@ declare class AutumnClient {
|
|
|
124
124
|
}) => AutumnPromise<CheckResult>;
|
|
125
125
|
track: (params: {
|
|
126
126
|
value?: number | undefined;
|
|
127
|
-
entityId?: string | undefined;
|
|
128
127
|
featureId?: string | undefined;
|
|
128
|
+
entityId?: string | undefined;
|
|
129
129
|
entityData?: any;
|
|
130
130
|
eventName?: string | undefined;
|
|
131
131
|
idempotencyKey?: string | undefined;
|
|
132
132
|
}) => AutumnPromise<{
|
|
133
|
-
id: string;
|
|
134
133
|
customer_id: string;
|
|
135
134
|
code: string;
|
|
135
|
+
id: string;
|
|
136
136
|
feature_id?: string | undefined;
|
|
137
137
|
event_name?: string | undefined;
|
|
138
138
|
}>;
|