autumn-js 0.0.98 → 0.0.100
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/express.d.mts +1 -1
- package/dist/libraries/backend/express.d.ts +1 -1
- package/dist/libraries/backend/{referralTypes-Dfg6if8j.d.mts → referralTypes-CkT8JNar.d.mts} +1 -0
- package/dist/libraries/backend/{referralTypes-D1Q2i3mG.d.ts → referralTypes-Dh4wyHJ1.d.ts} +1 -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 +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 +11 -11
- package/dist/libraries/react/{ReactAutumnClient-Ce34XSNp.d.mts → ReactAutumnClient-Da2CbwmZ.d.mts} +5 -5
- package/dist/libraries/react/{ReactAutumnClient-ByV3ry6X.d.ts → ReactAutumnClient-DpexS7O5.d.ts} +5 -5
- package/dist/libraries/react/ReactAutumnProvider.d.mts +1 -1
- package/dist/libraries/react/ReactAutumnProvider.d.ts +1 -1
- package/dist/libraries/react/ReactAutumnProvider.mjs +12 -12
- package/dist/libraries/react/{chunk-BQUVIPG4.mjs → chunk-6SRIDR3L.mjs} +2 -2
- package/dist/libraries/react/{chunk-BJRHW2WP.mjs → chunk-BYXO62BF.mjs} +2 -2
- package/dist/libraries/react/{chunk-ZQ5HNM6O.mjs → chunk-DW6X6NNG.mjs} +278 -278
- package/dist/libraries/react/{chunk-7J5WGHDK.mjs → chunk-EZAZUSYO.mjs} +2 -2
- package/dist/libraries/react/{chunk-IJFGEGR2.mjs → chunk-GQ3TAHSV.mjs} +1 -1
- package/dist/libraries/react/{chunk-FGNNWWBD.mjs → chunk-H2NGSCWI.mjs} +2 -2
- package/dist/libraries/react/{chunk-SA4NOOHV.mjs → chunk-HJ374VZF.mjs} +2 -2
- package/dist/libraries/react/{chunk-RURBN53D.mjs → chunk-K3223VDB.mjs} +1 -1
- package/dist/libraries/react/{chunk-XSJQQSUT.mjs → chunk-KRW7ZHBV.mjs} +2 -2
- package/dist/libraries/react/{chunk-ZFOSCZKA.mjs → chunk-TPKQIL3N.mjs} +2 -2
- package/dist/libraries/react/{chunk-AISYLQU5.mjs → chunk-VRDE5C4M.mjs} +3 -3
- package/dist/libraries/react/{chunk-TKHPR5VW.mjs → chunk-XOGMTMNM.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 +4 -4
- package/dist/libraries/react/client/types/clientGenTypes.d.ts +4 -4
- 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.mjs +20 -20
- 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/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.mjs +20 -20
- package/dist/libraries/react/{cusTypes-cFcAuKk6.d.ts → cusTypes-4aCCdGkc.d.mts} +4 -3
- package/dist/libraries/react/{cusTypes-cFcAuKk6.d.mts → cusTypes-4aCCdGkc.d.ts} +4 -3
- package/dist/libraries/react/{entTypes-DPu6Efi2.d.ts → entTypes-BgAiRNBf.d.ts} +1 -1
- package/dist/libraries/react/{entTypes-S-Yuznzg.d.mts → entTypes-Bw20cBXx.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/{response-BDOGqtuI.d.ts → response-B9P0zPDQ.d.ts} +2 -2
- package/dist/libraries/react/{response-R1MWYZiA.d.mts → response-D24DJs94.d.mts} +2 -2
- package/dist/next/{AutumnProvider-Xl1mqxls.d.mts → AutumnProvider-BFEETHYT.d.mts} +1 -0
- package/dist/next/{AutumnProvider-Xl1mqxls.d.ts → AutumnProvider-BFEETHYT.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 +7 -7
- package/dist/next/client/NextAutumnClient.d.ts +7 -7
- package/dist/next/client/NextAutumnProvider.d.mts +1 -1
- package/dist/next/client/NextAutumnProvider.d.ts +1 -1
- package/dist/next/client/{clientGenTypes-BwevGhcx.d.mts → clientGenTypes-BIYZcmWk.d.mts} +9 -9
- package/dist/next/client/{clientGenTypes-B_LCNkd5.d.ts → clientGenTypes-xd2Egfm-.d.ts} +9 -9
- package/dist/next/client/clientUtils.d.mts +2 -2
- package/dist/next/client/clientUtils.d.ts +2 -2
- package/dist/next/client/{cusTypes-Gh2wfcmj.d.mts → cusTypes-u2ZoeKeF.d.mts} +3 -2
- package/dist/next/client/{cusTypes-Gh2wfcmj.d.ts → cusTypes-u2ZoeKeF.d.ts} +3 -2
- package/dist/next/client/{entTypes-C_xS1VPE.d.mts → entTypes-B54OSRIo.d.mts} +1 -1
- package/dist/next/client/{entTypes-B_w6I3y-.d.ts → entTypes-Cl6ES2C6.d.ts} +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 +5 -5
- package/dist/next/client/hooks/useEntity.d.ts +5 -5
- 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-B8u88Vfq.d.mts → cusTypes-JQwzkgDU.d.mts} +3 -2
- package/dist/next/server/{cusTypes-B8u88Vfq.d.ts → cusTypes-JQwzkgDU.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 +1 -1
- package/dist/libraries/react/{chunk-QRI2TNR7.mjs → chunk-ALIGIMSK.mjs} +17 -17
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CustomerData, a as Customer } from './cusTypes-
|
|
2
|
-
import { E as Entity } from './entTypes-
|
|
1
|
+
import { C as CustomerData, a as Customer } from './cusTypes-u2ZoeKeF.js';
|
|
2
|
+
import { E as Entity } from './entTypes-Cl6ES2C6.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
interface ProductDetails {
|
package/dist/next/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as CheckFeatureResult, a as CheckProductResult, P as ProductItem, b as ProductScenario, c as CustomerProduct, d as CustomerFeature, e as CustomerInvoice, f as CustomerData, g as CreateCustomerParams, h as Customer, B as BillingPortalResult, i as Product, j as CustomerExpandOption } from './AutumnProvider-
|
|
3
|
-
export { A as AutumnProvider } from './AutumnProvider-
|
|
2
|
+
import { C as CheckFeatureResult, a as CheckProductResult, P as ProductItem, b as ProductScenario, c as CustomerProduct, d as CustomerFeature, e as CustomerInvoice, f as CustomerData, g as CreateCustomerParams, h as Customer, B as BillingPortalResult, i as Product, j as CustomerExpandOption } from './AutumnProvider-BFEETHYT.mjs';
|
|
3
|
+
export { A as AutumnProvider } from './AutumnProvider-BFEETHYT.mjs';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import * as swr from 'swr';
|
|
6
6
|
import { SWRConfiguration } from 'swr';
|
package/dist/next/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as CheckFeatureResult, a as CheckProductResult, P as ProductItem, b as ProductScenario, c as CustomerProduct, d as CustomerFeature, e as CustomerInvoice, f as CustomerData, g as CreateCustomerParams, h as Customer, B as BillingPortalResult, i as Product, j as CustomerExpandOption } from './AutumnProvider-
|
|
3
|
-
export { A as AutumnProvider } from './AutumnProvider-
|
|
2
|
+
import { C as CheckFeatureResult, a as CheckProductResult, P as ProductItem, b as ProductScenario, c as CustomerProduct, d as CustomerFeature, e as CustomerInvoice, f as CustomerData, g as CreateCustomerParams, h as Customer, B as BillingPortalResult, i as Product, j as CustomerExpandOption } from './AutumnProvider-BFEETHYT.js';
|
|
3
|
+
export { A as AutumnProvider } from './AutumnProvider-BFEETHYT.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import * as swr from 'swr';
|
|
6
6
|
import { SWRConfiguration } from 'swr';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, G as GetCustomerParams, c as Customer, d as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, P as Product, e as CreateProductParams, L as ListProductsParams, f as CustomerProduct, g as CustomerFeature, h as CustomerInvoice } from './cusTypes-
|
|
1
|
+
import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, G as GetCustomerParams, c as Customer, d as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, P as Product, e as CreateProductParams, L as ListProductsParams, f as CustomerProduct, g as CustomerFeature, h as CustomerInvoice } from './cusTypes-JQwzkgDU.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { R as Result, A as AutumnError } from './response-eH4S4sg0.mjs';
|
|
4
4
|
|
|
@@ -27,12 +27,12 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
27
27
|
reward: z.ZodOptional<z.ZodString>;
|
|
28
28
|
}, "strip", z.ZodTypeAny, {
|
|
29
29
|
customer_id: string;
|
|
30
|
+
entity_id?: string | undefined;
|
|
30
31
|
options?: {
|
|
31
32
|
feature_id: string;
|
|
32
33
|
quantity: number;
|
|
33
34
|
}[] | undefined;
|
|
34
35
|
metadata?: Record<string, string> | undefined;
|
|
35
|
-
entity_id?: string | undefined;
|
|
36
36
|
product_id?: string | undefined;
|
|
37
37
|
product_ids?: string[] | undefined;
|
|
38
38
|
free_trial?: boolean | undefined;
|
|
@@ -44,12 +44,12 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
44
44
|
reward?: string | undefined;
|
|
45
45
|
}, {
|
|
46
46
|
customer_id: string;
|
|
47
|
+
entity_id?: string | undefined;
|
|
47
48
|
options?: {
|
|
48
49
|
feature_id: string;
|
|
49
50
|
quantity: number;
|
|
50
51
|
}[] | undefined;
|
|
51
52
|
metadata?: Record<string, string> | undefined;
|
|
52
|
-
entity_id?: string | undefined;
|
|
53
53
|
product_id?: string | undefined;
|
|
54
54
|
product_ids?: string[] | undefined;
|
|
55
55
|
free_trial?: boolean | undefined;
|
|
@@ -89,18 +89,18 @@ declare const TrackParamsSchema: z.ZodObject<{
|
|
|
89
89
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
90
90
|
}, "strip", z.ZodTypeAny, {
|
|
91
91
|
customer_id: string;
|
|
92
|
-
value?: number | undefined;
|
|
93
|
-
entity_id?: string | undefined;
|
|
94
92
|
feature_id?: string | undefined;
|
|
93
|
+
entity_id?: string | undefined;
|
|
94
|
+
value?: number | undefined;
|
|
95
95
|
customer_data?: any;
|
|
96
96
|
entity_data?: any;
|
|
97
97
|
event_name?: string | undefined;
|
|
98
98
|
idempotency_key?: string | undefined;
|
|
99
99
|
}, {
|
|
100
100
|
customer_id: string;
|
|
101
|
-
value?: number | undefined;
|
|
102
|
-
entity_id?: string | undefined;
|
|
103
101
|
feature_id?: string | undefined;
|
|
102
|
+
entity_id?: string | undefined;
|
|
103
|
+
value?: number | undefined;
|
|
104
104
|
customer_data?: any;
|
|
105
105
|
entity_data?: any;
|
|
106
106
|
event_name?: string | undefined;
|
|
@@ -128,8 +128,8 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
128
128
|
}>>;
|
|
129
129
|
}, "strip", z.ZodTypeAny, {
|
|
130
130
|
customer_id: string;
|
|
131
|
-
entity_id?: string | undefined;
|
|
132
131
|
feature_id?: string | undefined;
|
|
132
|
+
entity_id?: string | undefined;
|
|
133
133
|
required_balance?: number | undefined;
|
|
134
134
|
product_id?: string | undefined;
|
|
135
135
|
customer_data?: any;
|
|
@@ -141,8 +141,8 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
141
141
|
with_preview?: boolean | undefined;
|
|
142
142
|
}, {
|
|
143
143
|
customer_id: string;
|
|
144
|
-
entity_id?: string | undefined;
|
|
145
144
|
feature_id?: string | undefined;
|
|
145
|
+
entity_id?: string | undefined;
|
|
146
146
|
required_balance?: number | undefined;
|
|
147
147
|
product_id?: string | undefined;
|
|
148
148
|
customer_data?: any;
|
|
@@ -240,18 +240,18 @@ declare class Autumn {
|
|
|
240
240
|
redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<any, AutumnError>>;
|
|
241
241
|
};
|
|
242
242
|
static attach: (params: AttachParams) => Promise<Result<{
|
|
243
|
+
customer_id: string;
|
|
243
244
|
code: string;
|
|
244
245
|
message: string;
|
|
245
|
-
customer_id: string;
|
|
246
246
|
product_ids: string[];
|
|
247
247
|
customer_data?: any;
|
|
248
248
|
checkout_url?: string | undefined;
|
|
249
249
|
}, AutumnError>>;
|
|
250
250
|
static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
|
|
251
251
|
attach(params: AttachParams): Promise<Result<{
|
|
252
|
+
customer_id: string;
|
|
252
253
|
code: string;
|
|
253
254
|
message: string;
|
|
254
|
-
customer_id: string;
|
|
255
255
|
product_ids: string[];
|
|
256
256
|
customer_data?: any;
|
|
257
257
|
checkout_url?: string | undefined;
|
|
@@ -285,9 +285,9 @@ declare class Autumn {
|
|
|
285
285
|
* Please use the new track() method instead.
|
|
286
286
|
*/
|
|
287
287
|
static event: (params: TrackParams) => Promise<Result<{
|
|
288
|
-
id: string;
|
|
289
|
-
code: string;
|
|
290
288
|
customer_id: string;
|
|
289
|
+
code: string;
|
|
290
|
+
id: string;
|
|
291
291
|
feature_id?: string | undefined;
|
|
292
292
|
event_name?: string | undefined;
|
|
293
293
|
}, AutumnError>>;
|
|
@@ -296,23 +296,23 @@ declare class Autumn {
|
|
|
296
296
|
* Please use the new track() method instead.
|
|
297
297
|
*/
|
|
298
298
|
event(params: TrackParams): Promise<Result<{
|
|
299
|
-
id: string;
|
|
300
|
-
code: string;
|
|
301
299
|
customer_id: string;
|
|
300
|
+
code: string;
|
|
301
|
+
id: string;
|
|
302
302
|
feature_id?: string | undefined;
|
|
303
303
|
event_name?: string | undefined;
|
|
304
304
|
}, AutumnError>>;
|
|
305
305
|
static track: (params: TrackParams) => Promise<Result<{
|
|
306
|
-
id: string;
|
|
307
|
-
code: string;
|
|
308
306
|
customer_id: string;
|
|
307
|
+
code: string;
|
|
308
|
+
id: string;
|
|
309
309
|
feature_id?: string | undefined;
|
|
310
310
|
event_name?: string | undefined;
|
|
311
311
|
}, AutumnError>>;
|
|
312
312
|
track(params: TrackParams): Promise<Result<{
|
|
313
|
-
id: string;
|
|
314
|
-
code: string;
|
|
315
313
|
customer_id: string;
|
|
314
|
+
code: string;
|
|
315
|
+
id: string;
|
|
316
316
|
feature_id?: string | undefined;
|
|
317
317
|
event_name?: string | undefined;
|
|
318
318
|
}, AutumnError>>;
|
|
@@ -362,11 +362,11 @@ declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
|
|
|
362
362
|
code: z.ZodString;
|
|
363
363
|
customer_id: z.ZodString;
|
|
364
364
|
}, "strip", z.ZodTypeAny, {
|
|
365
|
-
code: string;
|
|
366
365
|
customer_id: string;
|
|
367
|
-
}, {
|
|
368
366
|
code: string;
|
|
367
|
+
}, {
|
|
369
368
|
customer_id: string;
|
|
369
|
+
code: string;
|
|
370
370
|
}>;
|
|
371
371
|
type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
|
|
372
372
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, G as GetCustomerParams, c as Customer, d as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, P as Product, e as CreateProductParams, L as ListProductsParams, f as CustomerProduct, g as CustomerFeature, h as CustomerInvoice } from './cusTypes-
|
|
1
|
+
import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, G as GetCustomerParams, c as Customer, d as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, P as Product, e as CreateProductParams, L as ListProductsParams, f as CustomerProduct, g as CustomerFeature, h as CustomerInvoice } from './cusTypes-JQwzkgDU.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { R as Result, A as AutumnError } from './response-eH4S4sg0.js';
|
|
4
4
|
|
|
@@ -27,12 +27,12 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
27
27
|
reward: z.ZodOptional<z.ZodString>;
|
|
28
28
|
}, "strip", z.ZodTypeAny, {
|
|
29
29
|
customer_id: string;
|
|
30
|
+
entity_id?: string | undefined;
|
|
30
31
|
options?: {
|
|
31
32
|
feature_id: string;
|
|
32
33
|
quantity: number;
|
|
33
34
|
}[] | undefined;
|
|
34
35
|
metadata?: Record<string, string> | undefined;
|
|
35
|
-
entity_id?: string | undefined;
|
|
36
36
|
product_id?: string | undefined;
|
|
37
37
|
product_ids?: string[] | undefined;
|
|
38
38
|
free_trial?: boolean | undefined;
|
|
@@ -44,12 +44,12 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
44
44
|
reward?: string | undefined;
|
|
45
45
|
}, {
|
|
46
46
|
customer_id: string;
|
|
47
|
+
entity_id?: string | undefined;
|
|
47
48
|
options?: {
|
|
48
49
|
feature_id: string;
|
|
49
50
|
quantity: number;
|
|
50
51
|
}[] | undefined;
|
|
51
52
|
metadata?: Record<string, string> | undefined;
|
|
52
|
-
entity_id?: string | undefined;
|
|
53
53
|
product_id?: string | undefined;
|
|
54
54
|
product_ids?: string[] | undefined;
|
|
55
55
|
free_trial?: boolean | undefined;
|
|
@@ -89,18 +89,18 @@ declare const TrackParamsSchema: z.ZodObject<{
|
|
|
89
89
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
90
90
|
}, "strip", z.ZodTypeAny, {
|
|
91
91
|
customer_id: string;
|
|
92
|
-
value?: number | undefined;
|
|
93
|
-
entity_id?: string | undefined;
|
|
94
92
|
feature_id?: string | undefined;
|
|
93
|
+
entity_id?: string | undefined;
|
|
94
|
+
value?: number | undefined;
|
|
95
95
|
customer_data?: any;
|
|
96
96
|
entity_data?: any;
|
|
97
97
|
event_name?: string | undefined;
|
|
98
98
|
idempotency_key?: string | undefined;
|
|
99
99
|
}, {
|
|
100
100
|
customer_id: string;
|
|
101
|
-
value?: number | undefined;
|
|
102
|
-
entity_id?: string | undefined;
|
|
103
101
|
feature_id?: string | undefined;
|
|
102
|
+
entity_id?: string | undefined;
|
|
103
|
+
value?: number | undefined;
|
|
104
104
|
customer_data?: any;
|
|
105
105
|
entity_data?: any;
|
|
106
106
|
event_name?: string | undefined;
|
|
@@ -128,8 +128,8 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
128
128
|
}>>;
|
|
129
129
|
}, "strip", z.ZodTypeAny, {
|
|
130
130
|
customer_id: string;
|
|
131
|
-
entity_id?: string | undefined;
|
|
132
131
|
feature_id?: string | undefined;
|
|
132
|
+
entity_id?: string | undefined;
|
|
133
133
|
required_balance?: number | undefined;
|
|
134
134
|
product_id?: string | undefined;
|
|
135
135
|
customer_data?: any;
|
|
@@ -141,8 +141,8 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
141
141
|
with_preview?: boolean | undefined;
|
|
142
142
|
}, {
|
|
143
143
|
customer_id: string;
|
|
144
|
-
entity_id?: string | undefined;
|
|
145
144
|
feature_id?: string | undefined;
|
|
145
|
+
entity_id?: string | undefined;
|
|
146
146
|
required_balance?: number | undefined;
|
|
147
147
|
product_id?: string | undefined;
|
|
148
148
|
customer_data?: any;
|
|
@@ -240,18 +240,18 @@ declare class Autumn {
|
|
|
240
240
|
redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<any, AutumnError>>;
|
|
241
241
|
};
|
|
242
242
|
static attach: (params: AttachParams) => Promise<Result<{
|
|
243
|
+
customer_id: string;
|
|
243
244
|
code: string;
|
|
244
245
|
message: string;
|
|
245
|
-
customer_id: string;
|
|
246
246
|
product_ids: string[];
|
|
247
247
|
customer_data?: any;
|
|
248
248
|
checkout_url?: string | undefined;
|
|
249
249
|
}, AutumnError>>;
|
|
250
250
|
static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
|
|
251
251
|
attach(params: AttachParams): Promise<Result<{
|
|
252
|
+
customer_id: string;
|
|
252
253
|
code: string;
|
|
253
254
|
message: string;
|
|
254
|
-
customer_id: string;
|
|
255
255
|
product_ids: string[];
|
|
256
256
|
customer_data?: any;
|
|
257
257
|
checkout_url?: string | undefined;
|
|
@@ -285,9 +285,9 @@ declare class Autumn {
|
|
|
285
285
|
* Please use the new track() method instead.
|
|
286
286
|
*/
|
|
287
287
|
static event: (params: TrackParams) => Promise<Result<{
|
|
288
|
-
id: string;
|
|
289
|
-
code: string;
|
|
290
288
|
customer_id: string;
|
|
289
|
+
code: string;
|
|
290
|
+
id: string;
|
|
291
291
|
feature_id?: string | undefined;
|
|
292
292
|
event_name?: string | undefined;
|
|
293
293
|
}, AutumnError>>;
|
|
@@ -296,23 +296,23 @@ declare class Autumn {
|
|
|
296
296
|
* Please use the new track() method instead.
|
|
297
297
|
*/
|
|
298
298
|
event(params: TrackParams): Promise<Result<{
|
|
299
|
-
id: string;
|
|
300
|
-
code: string;
|
|
301
299
|
customer_id: string;
|
|
300
|
+
code: string;
|
|
301
|
+
id: string;
|
|
302
302
|
feature_id?: string | undefined;
|
|
303
303
|
event_name?: string | undefined;
|
|
304
304
|
}, AutumnError>>;
|
|
305
305
|
static track: (params: TrackParams) => Promise<Result<{
|
|
306
|
-
id: string;
|
|
307
|
-
code: string;
|
|
308
306
|
customer_id: string;
|
|
307
|
+
code: string;
|
|
308
|
+
id: string;
|
|
309
309
|
feature_id?: string | undefined;
|
|
310
310
|
event_name?: string | undefined;
|
|
311
311
|
}, AutumnError>>;
|
|
312
312
|
track(params: TrackParams): Promise<Result<{
|
|
313
|
-
id: string;
|
|
314
|
-
code: string;
|
|
315
313
|
customer_id: string;
|
|
314
|
+
code: string;
|
|
315
|
+
id: string;
|
|
316
316
|
feature_id?: string | undefined;
|
|
317
317
|
event_name?: string | undefined;
|
|
318
318
|
}, AutumnError>>;
|
|
@@ -362,11 +362,11 @@ declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
|
|
|
362
362
|
code: z.ZodString;
|
|
363
363
|
customer_id: z.ZodString;
|
|
364
364
|
}, "strip", z.ZodTypeAny, {
|
|
365
|
-
code: string;
|
|
366
365
|
customer_id: string;
|
|
367
|
-
}, {
|
|
368
366
|
code: string;
|
|
367
|
+
}, {
|
|
369
368
|
customer_id: string;
|
|
369
|
+
code: string;
|
|
370
370
|
}>;
|
|
371
371
|
type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
|
|
372
372
|
|
|
@@ -89,6 +89,7 @@ declare enum AppEnv {
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
interface ProductItem {
|
|
92
|
+
type?: "feature" | "priced_feature" | "price";
|
|
92
93
|
feature_id?: string;
|
|
93
94
|
included_usage?: number | typeof Infinite;
|
|
94
95
|
interval?: ProductItemIntervalType;
|
|
@@ -231,15 +232,15 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
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
|
id?: string | null | undefined;
|
|
234
|
-
email?: string | null | undefined;
|
|
235
235
|
name?: string | null | undefined;
|
|
236
|
+
email?: string | null | undefined;
|
|
236
237
|
fingerprint?: string | null | undefined;
|
|
237
238
|
metadata?: Record<string, any> | undefined;
|
|
238
239
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
239
240
|
}, {
|
|
240
241
|
id?: string | null | undefined;
|
|
241
|
-
email?: string | null | undefined;
|
|
242
242
|
name?: string | null | undefined;
|
|
243
|
+
email?: string | null | undefined;
|
|
243
244
|
fingerprint?: string | null | undefined;
|
|
244
245
|
metadata?: Record<string, any> | undefined;
|
|
245
246
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
@@ -89,6 +89,7 @@ declare enum AppEnv {
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
interface ProductItem {
|
|
92
|
+
type?: "feature" | "priced_feature" | "price";
|
|
92
93
|
feature_id?: string;
|
|
93
94
|
included_usage?: number | typeof Infinite;
|
|
94
95
|
interval?: ProductItemIntervalType;
|
|
@@ -231,15 +232,15 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
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
|
id?: string | null | undefined;
|
|
234
|
-
email?: string | null | undefined;
|
|
235
235
|
name?: string | null | undefined;
|
|
236
|
+
email?: string | null | undefined;
|
|
236
237
|
fingerprint?: string | null | undefined;
|
|
237
238
|
metadata?: Record<string, any> | undefined;
|
|
238
239
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
239
240
|
}, {
|
|
240
241
|
id?: string | null | undefined;
|
|
241
|
-
email?: string | null | undefined;
|
|
242
242
|
name?: string | null | undefined;
|
|
243
|
+
email?: string | null | undefined;
|
|
243
244
|
fingerprint?: string | null | undefined;
|
|
244
245
|
metadata?: Record<string, any> | undefined;
|
|
245
246
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { C as CustomerData, B as BillingPortalParams } from './cusTypes-
|
|
2
|
+
import { C as CustomerData, B as BillingPortalParams } from './cusTypes-JQwzkgDU.mjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
declare const attachAction: (args: Omit<{
|
package/dist/sdk/index.d.mts
CHANGED
package/dist/sdk/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
createEntityMethod,
|
|
5
|
-
deleteEntityMethod,
|
|
6
|
-
getEntityMethod
|
|
7
|
-
} from "./chunk-ZF2HUCN6.mjs";
|
|
8
|
-
import {
|
|
9
|
-
attachMethod,
|
|
10
|
-
cancelMethod,
|
|
11
|
-
checkMethod,
|
|
12
|
-
openBillingPortalMethod,
|
|
13
|
-
setupPaymentMethod,
|
|
14
|
-
trackMethod
|
|
15
|
-
} from "./chunk-VUBJ6JM3.mjs";
|
|
16
3
|
import {
|
|
17
4
|
listProductsMethod
|
|
18
5
|
} from "./chunk-V575SGOW.mjs";
|
|
@@ -20,6 +7,12 @@ import {
|
|
|
20
7
|
createCode,
|
|
21
8
|
redeemCode
|
|
22
9
|
} from "./chunk-ZV4RPZTM.mjs";
|
|
10
|
+
import {
|
|
11
|
+
logAuthError
|
|
12
|
+
} from "./chunk-JVCOY7ZL.mjs";
|
|
13
|
+
import {
|
|
14
|
+
logFetchError
|
|
15
|
+
} from "./chunk-CIBQ4BJU.mjs";
|
|
23
16
|
import {
|
|
24
17
|
getPricingTableMethod
|
|
25
18
|
} from "./chunk-VTGR7VVK.mjs";
|
|
@@ -27,11 +20,18 @@ import {
|
|
|
27
20
|
createCustomerMethod
|
|
28
21
|
} from "./chunk-WFFVOEUG.mjs";
|
|
29
22
|
import {
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
createEntityMethod,
|
|
24
|
+
deleteEntityMethod,
|
|
25
|
+
getEntityMethod
|
|
26
|
+
} from "./chunk-ZF2HUCN6.mjs";
|
|
32
27
|
import {
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
attachMethod,
|
|
29
|
+
cancelMethod,
|
|
30
|
+
checkMethod,
|
|
31
|
+
openBillingPortalMethod,
|
|
32
|
+
setupPaymentMethod,
|
|
33
|
+
trackMethod
|
|
34
|
+
} from "./chunk-VUBJ6JM3.mjs";
|
|
35
35
|
|
|
36
36
|
// src/sdk/error.ts
|
|
37
37
|
var AutumnError = class _AutumnError extends Error {
|