autumn-js 0.0.65 → 0.0.67
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/chunk-45WVZY23.mjs +41 -0
- package/dist/libraries/backend/{chunk-FRL4IWBU.mjs → chunk-46YP3QFO.mjs} +5 -5
- package/dist/libraries/backend/{chunk-C2YFOJYP.mjs → chunk-6N4RVNZ5.mjs} +13 -8
- package/dist/libraries/backend/{chunk-NDN25XDG.mjs → chunk-6OVW4YXK.mjs} +1 -1
- package/dist/libraries/backend/{chunk-NDS3EHT3.mjs → chunk-AEEYR55J.mjs} +1 -1
- package/dist/libraries/backend/{chunk-W63TY2DI.mjs → chunk-BYAXY6C4.mjs} +69 -58
- package/dist/libraries/backend/{chunk-QXJ7YDTB.mjs → chunk-IZAQ6MUN.mjs} +1 -1
- package/dist/libraries/backend/express.d.mts +2 -2
- package/dist/libraries/backend/express.d.ts +2 -2
- package/dist/libraries/backend/express.js +123 -71
- package/dist/libraries/backend/express.mjs +7 -6
- package/dist/libraries/backend/fastify.js +123 -71
- package/dist/libraries/backend/fastify.mjs +7 -6
- package/dist/libraries/backend/hono.js +123 -71
- package/dist/libraries/backend/hono.mjs +7 -6
- package/dist/libraries/backend/next.js +207 -165
- package/dist/libraries/backend/next.mjs +101 -100
- package/dist/libraries/backend/react-router.js +123 -71
- package/dist/libraries/backend/react-router.mjs +7 -6
- package/dist/libraries/backend/{referralTypes-CJPslVLJ.d.ts → referralTypes-7NmhI47Z.d.mts} +8 -7
- package/dist/libraries/backend/{referralTypes-DmqKXhXe.d.mts → referralTypes-CURy8Tnw.d.ts} +8 -7
- package/dist/libraries/backend/remix_dep.js +123 -71
- package/dist/libraries/backend/remix_dep.mjs +7 -6
- package/dist/libraries/backend/{response-ByHPEnHs.d.mts → response-CV6KGWH5.d.mts} +1 -0
- package/dist/libraries/backend/{response-ByHPEnHs.d.ts → response-CV6KGWH5.d.ts} +1 -0
- package/dist/libraries/backend/routes/backendRouter.js +123 -70
- package/dist/libraries/backend/routes/backendRouter.mjs +7 -6
- package/dist/libraries/backend/routes/entityRoutes.js +122 -65
- package/dist/libraries/backend/routes/entityRoutes.mjs +5 -3
- package/dist/libraries/backend/routes/genRoutes.js +123 -70
- package/dist/libraries/backend/routes/genRoutes.mjs +4 -3
- package/dist/libraries/backend/routes/referralRoutes.js +123 -68
- package/dist/libraries/backend/routes/referralRoutes.mjs +4 -3
- package/dist/libraries/backend/supabase.js +123 -71
- package/dist/libraries/backend/supabase.mjs +7 -6
- package/dist/libraries/backend/tanstack.js +126 -72
- package/dist/libraries/backend/tanstack.mjs +10 -9
- package/dist/libraries/backend/utils/backendRes.d.mts +1 -1
- package/dist/libraries/backend/utils/backendRes.d.ts +1 -1
- package/dist/libraries/backend/utils/backendRes.js +113 -58
- package/dist/libraries/backend/utils/backendRes.mjs +3 -1
- package/dist/libraries/backend/utils/logBackendErrors.d.mts +5 -0
- package/dist/libraries/backend/utils/logBackendErrors.d.ts +5 -0
- package/dist/libraries/backend/utils/logBackendErrors.js +84 -0
- package/dist/libraries/backend/utils/logBackendErrors.mjs +14 -0
- package/dist/libraries/backend/utils/withAuth.d.mts +2 -2
- package/dist/libraries/backend/utils/withAuth.d.ts +2 -2
- package/dist/libraries/backend/utils/withAuth.js +122 -65
- package/dist/libraries/backend/utils/withAuth.mjs +4 -2
- package/dist/libraries/react/AutumnContext.d.mts +11 -15
- package/dist/libraries/react/AutumnContext.d.ts +11 -15
- package/dist/libraries/react/AutumnContext.js +177 -97
- package/dist/libraries/react/AutumnContext.mjs +4 -3
- package/dist/libraries/react/BaseAutumnProvider.d.mts +8 -5
- package/dist/libraries/react/BaseAutumnProvider.d.ts +8 -5
- package/dist/libraries/react/BaseAutumnProvider.js +241 -274
- package/dist/libraries/react/BaseAutumnProvider.mjs +7 -7
- package/dist/libraries/react/{ReactAutumnClient-DNcV0gAT.d.ts → ReactAutumnClient-BM8hrCEC.d.ts} +20 -28
- package/dist/libraries/react/{ReactAutumnClient-BQtmw21U.d.mts → ReactAutumnClient-EjsfCAgE.d.mts} +20 -28
- package/dist/libraries/react/ReactAutumnProvider.d.mts +1 -1
- package/dist/libraries/react/ReactAutumnProvider.d.ts +1 -1
- package/dist/libraries/react/ReactAutumnProvider.js +247 -276
- package/dist/libraries/react/ReactAutumnProvider.mjs +7 -8
- package/dist/libraries/react/{chunk-CZAUMPWK.mjs → chunk-2MVQH6J5.mjs} +10 -4
- package/dist/libraries/react/chunk-57I3B4BV.mjs +20 -0
- package/dist/libraries/react/chunk-5S5BL6HV.mjs +17 -0
- package/dist/libraries/react/chunk-A6J237PD.mjs +57 -0
- package/dist/{next/client/hooks/useEntityProvider.mjs → libraries/react/chunk-BGEO5REY.mjs} +12 -10
- package/dist/libraries/react/chunk-CIBQ4BJU.mjs +19 -0
- package/dist/libraries/react/{chunk-WPXLFYWT.mjs → chunk-CQ27LXPH.mjs} +35 -36
- package/dist/libraries/react/chunk-DMU3G7UZ.mjs +17 -0
- package/dist/libraries/react/{chunk-XTEUMENO.mjs → chunk-EOSHPHLH.mjs} +10 -22
- package/dist/libraries/react/chunk-IXVPNA4H.mjs +20 -0
- package/dist/libraries/react/{chunk-OCZFV7OX.mjs → chunk-JNJ53ZW6.mjs} +103 -55
- package/dist/libraries/react/{chunk-4TTWSWW7.mjs → chunk-NJFRQ6T4.mjs} +8 -37
- package/dist/libraries/react/chunk-PSE3LKMR.mjs +64 -0
- package/dist/libraries/react/{chunk-XXOQMNM6.mjs → chunk-XDAZD5HF.mjs} +46 -21
- package/dist/libraries/react/client/ReactAutumnClient.d.mts +4 -3
- package/dist/libraries/react/client/ReactAutumnClient.d.ts +4 -3
- package/dist/libraries/react/client/ReactAutumnClient.js +167 -75
- package/dist/libraries/react/client/ReactAutumnClient.mjs +3 -2
- package/dist/libraries/react/client/clientCompMethods.d.mts +4 -3
- package/dist/libraries/react/client/clientCompMethods.d.ts +4 -3
- package/dist/libraries/react/client/clientCusMethods.d.mts +4 -3
- package/dist/libraries/react/client/clientCusMethods.d.ts +4 -3
- package/dist/libraries/react/client/clientEntityMethods.d.mts +4 -3
- package/dist/libraries/react/client/clientEntityMethods.d.ts +4 -3
- package/dist/libraries/react/client/clientGenMethods.d.mts +4 -3
- package/dist/libraries/react/client/clientGenMethods.d.ts +4 -3
- package/dist/libraries/react/client/clientReferralMethods.d.mts +4 -3
- package/dist/libraries/react/client/clientReferralMethods.d.ts +4 -3
- package/dist/libraries/react/client/types/clientGenTypes.d.mts +3 -2
- package/dist/libraries/react/client/types/clientGenTypes.d.ts +3 -2
- package/dist/libraries/react/componentTypes-HF9MRJPX.d.mts +15 -0
- package/dist/libraries/react/componentTypes-HF9MRJPX.d.ts +15 -0
- package/dist/libraries/react/{error-CG2LXoa7.d.ts → error-DHbclCVh.d.mts} +1 -0
- package/dist/libraries/react/{error-CG2LXoa7.d.mts → error-DHbclCVh.d.ts} +1 -0
- package/dist/libraries/react/errorUtils/logAuthError.d.mts +8 -0
- package/dist/libraries/react/errorUtils/logAuthError.d.ts +8 -0
- package/dist/libraries/react/{hooks/usePricingTableProvider.js → errorUtils/logAuthError.js} +128 -96
- package/dist/libraries/react/errorUtils/logAuthError.mjs +21 -0
- package/dist/libraries/react/errorUtils/logFetchError.d.mts +8 -0
- package/dist/libraries/react/errorUtils/logFetchError.d.ts +8 -0
- package/dist/libraries/react/errorUtils/logFetchError.js +42 -0
- package/dist/libraries/react/errorUtils/logFetchError.mjs +8 -0
- 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.js +264 -133
- package/dist/libraries/react/hooks/useAutumn.mjs +7 -4
- package/dist/libraries/react/hooks/useAutumnBase.d.mts +55 -0
- package/dist/libraries/react/hooks/useAutumnBase.d.ts +55 -0
- package/dist/libraries/react/hooks/useAutumnBase.js +944 -0
- package/dist/libraries/react/hooks/useAutumnBase.mjs +19 -0
- package/dist/libraries/react/hooks/useCustomer.d.mts +10 -17
- package/dist/libraries/react/hooks/useCustomer.d.ts +10 -17
- package/dist/libraries/react/hooks/useCustomer.js +224 -114
- package/dist/libraries/react/hooks/useCustomer.mjs +6 -4
- package/dist/libraries/react/hooks/useCustomerBase.d.mts +31 -0
- package/dist/libraries/react/hooks/useCustomerBase.d.ts +31 -0
- package/dist/libraries/react/hooks/{useEntityProvider.js → useCustomerBase.js} +419 -93
- package/dist/libraries/react/hooks/useCustomerBase.mjs +18 -0
- package/dist/libraries/react/hooks/useEntity.d.mts +4 -4
- package/dist/libraries/react/hooks/useEntity.d.ts +4 -4
- package/dist/libraries/react/hooks/useEntity.js +215 -140
- package/dist/libraries/react/hooks/useEntity.mjs +6 -5
- package/dist/libraries/react/hooks/useEntityBase.d.mts +25 -0
- package/dist/libraries/react/hooks/useEntityBase.d.ts +25 -0
- package/dist/libraries/react/hooks/useEntityBase.js +87 -0
- package/dist/libraries/react/hooks/useEntityBase.mjs +8 -0
- package/dist/libraries/react/hooks/usePricingTable.d.mts +8 -12
- package/dist/libraries/react/hooks/usePricingTable.d.ts +8 -12
- package/dist/libraries/react/hooks/usePricingTable.js +211 -113
- package/dist/libraries/react/hooks/usePricingTable.mjs +6 -4
- package/dist/libraries/react/hooks/usePricingTableBase.d.mts +27 -0
- package/dist/libraries/react/hooks/usePricingTableBase.d.ts +27 -0
- package/dist/libraries/react/hooks/usePricingTableBase.js +810 -0
- package/dist/libraries/react/hooks/usePricingTableBase.mjs +18 -0
- package/dist/libraries/react/index.d.mts +8 -5
- package/dist/libraries/react/index.d.ts +8 -5
- package/dist/libraries/react/index.js +380 -408
- package/dist/libraries/react/index.mjs +16 -15
- package/dist/libraries/react/{response-B1KyqUB9.d.ts → response-B2MqTR7X.d.ts} +4 -4
- package/dist/libraries/react/{response-B5dHU3I9.d.mts → response-By38xiUq.d.mts} +4 -4
- package/dist/libraries/react/utils/compareParams.mjs +18 -3
- package/dist/next/AutumnProvider.js +2 -2
- package/dist/next/AutumnProvider.mjs +2 -2
- package/dist/next/client/AutumnClientProvider.d.mts +2 -0
- package/dist/next/client/AutumnClientProvider.d.ts +2 -0
- package/dist/next/client/NextAutumnClient.d.mts +81 -0
- package/dist/next/client/NextAutumnClient.d.ts +81 -0
- package/dist/next/client/NextAutumnClient.js +95 -0
- package/dist/next/client/NextAutumnClient.mjs +95 -0
- package/dist/next/client/NextAutumnProvider.d.mts +10 -0
- package/dist/next/client/NextAutumnProvider.d.ts +10 -0
- package/dist/next/client/NextAutumnProvider.js +21 -0
- package/dist/next/client/NextAutumnProvider.mjs +21 -0
- package/dist/next/client/clientEntTypes-ClSxkMvK.d.mts +29 -0
- package/dist/next/client/clientEntTypes-DuYXyCN4.d.ts +29 -0
- package/dist/next/client/clientGenTypes-BvnGc6fc.d.mts +156 -0
- package/dist/next/client/clientGenTypes-F8OKtPMU.d.ts +156 -0
- package/dist/next/client/clientReferralTypes-C9JiOk2s.d.mts +20 -0
- package/dist/next/client/clientReferralTypes-C9JiOk2s.d.ts +20 -0
- package/dist/next/client/clientUtils.d.mts +2 -2
- package/dist/next/client/clientUtils.d.ts +2 -2
- package/dist/next/client/componentTypes-HF9MRJPX.d.mts +15 -0
- package/dist/next/client/componentTypes-HF9MRJPX.d.ts +15 -0
- package/dist/next/client/{cusTypes-sh5_cN7N.d.ts → cusTypes-D9vXDh6B.d.mts} +23 -1
- package/dist/next/client/{cusTypes-sh5_cN7N.d.mts → cusTypes-D9vXDh6B.d.ts} +23 -1
- package/dist/next/client/{entTypes-C9TNWMk6.d.mts → entTypes-C2xwPhrH.d.mts} +5 -2
- package/dist/next/client/{entTypes-BDqnMLZ4.d.ts → entTypes-D5Bk72AS.d.ts} +5 -2
- package/dist/next/client/error-DHbclCVh.d.mts +17 -0
- package/dist/next/client/error-DHbclCVh.d.ts +17 -0
- package/dist/next/client/hooks/useAutumn.d.mts +41 -33
- package/dist/next/client/hooks/useAutumn.d.ts +41 -33
- package/dist/next/client/hooks/useAutumn.js +3 -236
- package/dist/next/client/hooks/useAutumn.mjs +3 -236
- package/dist/next/client/hooks/useCustomer.d.mts +19 -20
- package/dist/next/client/hooks/useCustomer.d.ts +19 -20
- package/dist/next/client/hooks/useCustomer.js +6 -120
- package/dist/next/client/hooks/useCustomer.mjs +6 -120
- 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/useEntity.js +3 -2
- package/dist/next/client/hooks/useEntity.mjs +3 -2
- package/dist/next/client/hooks/usePricingTable.d.mts +16 -14
- package/dist/next/client/hooks/usePricingTable.d.ts +16 -14
- package/dist/next/client/hooks/usePricingTable.js +4 -50
- package/dist/next/client/hooks/usePricingTable.mjs +4 -50
- package/dist/next/client/types.d.mts +2 -2
- package/dist/next/client/types.d.ts +2 -2
- package/dist/next/index.d.mts +363 -131
- package/dist/next/index.d.ts +363 -131
- package/dist/next/index.js +13 -8
- package/dist/next/index.mjs +6 -4
- package/dist/next/server/auth/handleAuthProvider.d.mts +2 -2
- package/dist/next/server/auth/handleAuthProvider.d.ts +2 -2
- package/dist/next/server/auth/supabase-wrapper.d.mts +1 -3
- package/dist/next/server/auth/supabase-wrapper.d.ts +1 -3
- package/dist/next/server/auth/{withAuth.d.mts → withNextAuth.d.mts} +1 -1
- package/dist/next/server/auth/{withAuth.d.ts → withNextAuth.d.ts} +1 -1
- package/dist/next/server/clientEntTypes-CWr4xXQ1.d.mts +14 -0
- package/dist/next/server/clientEntTypes-CWr4xXQ1.d.ts +14 -0
- package/dist/next/server/componentActions.d.mts +1 -1
- package/dist/next/server/componentActions.d.ts +1 -1
- package/dist/next/server/componentActions.js +1 -1
- package/dist/next/server/componentActions.mjs +1 -1
- package/dist/next/server/cusActions.d.mts +213 -14
- package/dist/next/server/cusActions.d.ts +213 -14
- package/dist/next/server/cusActions.js +12 -22
- package/dist/next/server/cusActions.mjs +12 -22
- package/dist/next/server/{cusTypes-BD42O-7Z.d.mts → cusTypes-DYgbKGrd.d.mts} +1 -1
- package/dist/next/server/{cusTypes-BD42O-7Z.d.ts → cusTypes-DYgbKGrd.d.ts} +1 -1
- package/dist/next/server/genActions.d.mts +41 -25
- package/dist/next/server/genActions.d.ts +41 -25
- package/dist/next/server/genActions.js +14 -60
- package/dist/next/server/genActions.mjs +14 -60
- package/dist/next/server/{response-BCg7kiiN.d.mts → response-eH4S4sg0.d.mts} +1 -0
- package/dist/next/server/{response-BCg7kiiN.d.ts → response-eH4S4sg0.d.ts} +1 -0
- package/dist/next/server/utils.d.mts +1 -1
- package/dist/next/server/utils.d.ts +1 -1
- package/dist/sdk/check.d.mts +3 -3
- package/dist/sdk/check.d.ts +3 -3
- package/dist/sdk/general.d.mts +4 -3
- package/dist/sdk/general.d.ts +4 -3
- package/dist/sdk/index.d.mts +9 -4
- package/dist/sdk/index.d.ts +9 -4
- package/dist/sdk/index.js +106 -71
- package/dist/sdk/index.mjs +102 -71
- package/dist/utils/chunk-V7R5DCYR.mjs +41 -0
- package/dist/utils/encryptUtils.js +103 -55
- package/dist/utils/encryptUtils.mjs +69 -55
- package/dist/utils/logger.d.mts +45 -0
- package/dist/utils/logger.d.ts +45 -0
- package/dist/utils/logger.js +75 -0
- package/dist/utils/logger.mjs +6 -0
- package/dist/utils/toSnakeCase.d.mts +3 -0
- package/dist/utils/toSnakeCase.d.ts +3 -0
- package/dist/utils/toSnakeCase.js +45 -0
- package/dist/utils/toSnakeCase.mjs +20 -0
- package/package.json +4 -5
- package/tsup.config.ts +1 -6
- package/dist/libraries/react/chunk-5CBWPVSP.mjs +0 -51
- package/dist/libraries/react/chunk-DFXUEQ6D.mjs +0 -33
- package/dist/libraries/react/chunk-PIIGEXKQ.mjs +0 -77
- package/dist/libraries/react/chunk-Q5SSQSDP.mjs +0 -48
- package/dist/libraries/react/chunk-RIXRUJDK.mjs +0 -38
- package/dist/libraries/react/chunk-URAFNMTH.mjs +0 -48
- package/dist/libraries/react/chunk-VN4AVW2V.mjs +0 -24
- package/dist/libraries/react/hooks/useCustomerProvider.d.mts +0 -28
- package/dist/libraries/react/hooks/useCustomerProvider.d.ts +0 -28
- package/dist/libraries/react/hooks/useCustomerProvider.js +0 -100
- package/dist/libraries/react/hooks/useCustomerProvider.mjs +0 -8
- package/dist/libraries/react/hooks/useEntityProvider.d.mts +0 -33
- package/dist/libraries/react/hooks/useEntityProvider.d.ts +0 -33
- package/dist/libraries/react/hooks/useEntityProvider.mjs +0 -9
- package/dist/libraries/react/hooks/usePricingTableProvider.d.mts +0 -19
- package/dist/libraries/react/hooks/usePricingTableProvider.d.ts +0 -19
- package/dist/libraries/react/hooks/usePricingTableProvider.mjs +0 -9
- package/dist/next/client/AutumnContext.d.mts +0 -9
- package/dist/next/client/AutumnContext.d.ts +0 -9
- package/dist/next/client/AutumnContext.js +0 -47
- package/dist/next/client/AutumnContext.mjs +0 -47
- package/dist/next/client/AutumnProvider.d.mts +0 -11
- package/dist/next/client/AutumnProvider.d.ts +0 -11
- package/dist/next/client/AutumnProvider.js +0 -117
- package/dist/next/client/AutumnProvider.mjs +0 -117
- package/dist/next/client/clientEntTypes-pqnB95m3.d.mts +0 -9
- package/dist/next/client/clientEntTypes-pqnB95m3.d.ts +0 -9
- package/dist/next/client/hooks/types.d.mts +0 -26
- package/dist/next/client/hooks/types.d.ts +0 -26
- package/dist/next/client/hooks/useEntityProvider.d.mts +0 -11
- package/dist/next/client/hooks/useEntityProvider.d.ts +0 -11
- package/dist/next/client/hooks/useEntityProvider.js +0 -52
- package/dist/next/server/clientEntTypes-CPVfO1bd.d.mts +0 -215
- package/dist/next/server/clientEntTypes-JLwH7X3l.d.ts +0 -215
- /package/dist/next/client/{hooks/types.js → AutumnClientProvider.js} +0 -0
- /package/dist/next/client/{hooks/types.mjs → AutumnClientProvider.mjs} +0 -0
- /package/dist/next/server/auth/{withAuth.js → withNextAuth.js} +0 -0
- /package/dist/next/server/auth/{withAuth.mjs → withNextAuth.mjs} +0 -0
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import { d as CustomerProduct, e as CustomerFeature, f as CustomerInvoice, C as CustomerData, A as AppEnv, I as Infinite, P as ProductItemIntervalType, g as UsageModel, F as FreeTrialDuration, h as UsageModelType } from './cusTypes-BD42O-7Z.mjs';
|
|
2
|
-
|
|
3
|
-
type EntityExpandOption = "invoices";
|
|
4
|
-
|
|
5
|
-
interface CreateEntityParams {
|
|
6
|
-
id: string;
|
|
7
|
-
name: string;
|
|
8
|
-
feature_id: string;
|
|
9
|
-
customer_data?: CustomerData;
|
|
10
|
-
}
|
|
11
|
-
interface CreateEntityResult {
|
|
12
|
-
success: boolean;
|
|
13
|
-
}
|
|
14
|
-
interface DeleteEntityResult {
|
|
15
|
-
success: boolean;
|
|
16
|
-
}
|
|
17
|
-
interface GetEntityParams$1 {
|
|
18
|
-
expand?: EntityExpandOption[];
|
|
19
|
-
}
|
|
20
|
-
interface Entity {
|
|
21
|
-
id: string;
|
|
22
|
-
name: string;
|
|
23
|
-
customer_id: string;
|
|
24
|
-
created_at: number;
|
|
25
|
-
env: string;
|
|
26
|
-
products: CustomerProduct[];
|
|
27
|
-
features: Record<string, CustomerFeature>;
|
|
28
|
-
invoices?: CustomerInvoice[];
|
|
29
|
-
}
|
|
30
|
-
interface EntityData {
|
|
31
|
-
name?: string;
|
|
32
|
-
feature_id: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
interface ProductItem {
|
|
36
|
-
feature_id?: string;
|
|
37
|
-
included_usage?: number | typeof Infinite;
|
|
38
|
-
interval?: ProductItemIntervalType;
|
|
39
|
-
usage_model?: UsageModel;
|
|
40
|
-
price?: number;
|
|
41
|
-
billing_units?: number;
|
|
42
|
-
entity_feature_id?: string;
|
|
43
|
-
reset_usage_on_billing?: boolean;
|
|
44
|
-
reset_usage_when_enabled?: boolean;
|
|
45
|
-
}
|
|
46
|
-
interface FreeTrial {
|
|
47
|
-
duration: FreeTrialDuration;
|
|
48
|
-
length: number;
|
|
49
|
-
unique_fingerprint: boolean;
|
|
50
|
-
}
|
|
51
|
-
interface Product {
|
|
52
|
-
autumn_id: string;
|
|
53
|
-
created_at: number;
|
|
54
|
-
id: string;
|
|
55
|
-
name: string;
|
|
56
|
-
env: AppEnv;
|
|
57
|
-
is_add_on: boolean;
|
|
58
|
-
is_default: boolean;
|
|
59
|
-
group: string;
|
|
60
|
-
version: number;
|
|
61
|
-
items: ProductItem[];
|
|
62
|
-
free_trial: FreeTrial | null;
|
|
63
|
-
}
|
|
64
|
-
interface CreateProductParams {
|
|
65
|
-
id: string;
|
|
66
|
-
name?: string;
|
|
67
|
-
is_add_on?: boolean;
|
|
68
|
-
is_default?: boolean;
|
|
69
|
-
items?: ProductItem[];
|
|
70
|
-
free_trial?: FreeTrial;
|
|
71
|
-
}
|
|
72
|
-
interface ListProductsParams {
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
type CheckFeatureScenario = "usage_limit" | "feature_flag";
|
|
76
|
-
interface CheckFeatureFormattedPreview {
|
|
77
|
-
scenario: CheckFeatureScenario;
|
|
78
|
-
title: string;
|
|
79
|
-
message: string;
|
|
80
|
-
feature_id: string;
|
|
81
|
-
feature_name: string;
|
|
82
|
-
products: Product[];
|
|
83
|
-
}
|
|
84
|
-
type CheckProductScenario = "scheduled" | "active" | "new" | "renew" | "upgrade" | "downgrade" | "cancel";
|
|
85
|
-
interface CheckProductFormattedPreview {
|
|
86
|
-
scenario: CheckProductScenario;
|
|
87
|
-
product_id: string;
|
|
88
|
-
product_name: string;
|
|
89
|
-
recurring: boolean;
|
|
90
|
-
error_on_attach?: boolean;
|
|
91
|
-
next_cycle_at?: number;
|
|
92
|
-
current_product_name?: string;
|
|
93
|
-
items?: {
|
|
94
|
-
price: string;
|
|
95
|
-
description: string;
|
|
96
|
-
usage_model?: UsageModelType;
|
|
97
|
-
}[];
|
|
98
|
-
options?: {
|
|
99
|
-
feature_id: string;
|
|
100
|
-
feature_name: string;
|
|
101
|
-
billing_units: number;
|
|
102
|
-
price?: number;
|
|
103
|
-
tiers?: {
|
|
104
|
-
to: number | string;
|
|
105
|
-
amount: number;
|
|
106
|
-
}[];
|
|
107
|
-
}[];
|
|
108
|
-
due_today?: {
|
|
109
|
-
price: number;
|
|
110
|
-
currency: string;
|
|
111
|
-
};
|
|
112
|
-
due_next_cycle?: {
|
|
113
|
-
price: number;
|
|
114
|
-
currency: string;
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
interface AttachFeatureOptions {
|
|
119
|
-
feature_id: string;
|
|
120
|
-
quantity: number;
|
|
121
|
-
}
|
|
122
|
-
interface AttachParams {
|
|
123
|
-
customer_id: string;
|
|
124
|
-
product_id?: string;
|
|
125
|
-
entity_id?: string;
|
|
126
|
-
options?: AttachFeatureOptions[];
|
|
127
|
-
product_ids?: string[];
|
|
128
|
-
free_trial?: boolean;
|
|
129
|
-
success_url?: string;
|
|
130
|
-
metadata?: Record<string, string>;
|
|
131
|
-
force_checkout?: boolean;
|
|
132
|
-
customer_data?: CustomerData;
|
|
133
|
-
entity_data?: EntityData;
|
|
134
|
-
checkout_session_params?: Record<string, any>;
|
|
135
|
-
}
|
|
136
|
-
interface CancelParams {
|
|
137
|
-
customer_id: string;
|
|
138
|
-
product_id: string;
|
|
139
|
-
entity_id?: string;
|
|
140
|
-
cancel_immediately?: boolean;
|
|
141
|
-
}
|
|
142
|
-
interface CancelResult {
|
|
143
|
-
success: boolean;
|
|
144
|
-
customer_id: string;
|
|
145
|
-
product_id: string;
|
|
146
|
-
}
|
|
147
|
-
interface AttachResult {
|
|
148
|
-
checkout_url?: string;
|
|
149
|
-
customer_id: string;
|
|
150
|
-
product_ids: string[];
|
|
151
|
-
code: string;
|
|
152
|
-
message: string;
|
|
153
|
-
customer_data?: CustomerData;
|
|
154
|
-
}
|
|
155
|
-
interface TrackParams {
|
|
156
|
-
customer_id: string;
|
|
157
|
-
value?: number;
|
|
158
|
-
feature_id?: string;
|
|
159
|
-
event_name?: string;
|
|
160
|
-
entity_id?: string;
|
|
161
|
-
customer_data?: CustomerData;
|
|
162
|
-
idempotency_key?: string;
|
|
163
|
-
entity_data?: EntityData;
|
|
164
|
-
}
|
|
165
|
-
interface TrackResult {
|
|
166
|
-
id: string;
|
|
167
|
-
code: string;
|
|
168
|
-
customer_id: string;
|
|
169
|
-
feature_id?: string;
|
|
170
|
-
event_name?: string;
|
|
171
|
-
}
|
|
172
|
-
interface CheckParams {
|
|
173
|
-
customer_id: string;
|
|
174
|
-
feature_id?: string;
|
|
175
|
-
product_id?: string;
|
|
176
|
-
entity_id?: string;
|
|
177
|
-
customer_data?: CustomerData;
|
|
178
|
-
required_balance?: number;
|
|
179
|
-
send_event?: boolean;
|
|
180
|
-
with_preview?: "raw" | "formatted";
|
|
181
|
-
entity_data?: EntityData;
|
|
182
|
-
}
|
|
183
|
-
interface CheckResult {
|
|
184
|
-
customer_id: string;
|
|
185
|
-
allowed: boolean;
|
|
186
|
-
code: string;
|
|
187
|
-
feature_id?: string;
|
|
188
|
-
required_balance?: number;
|
|
189
|
-
unlimited?: boolean;
|
|
190
|
-
balance?: number | null;
|
|
191
|
-
product_id?: string;
|
|
192
|
-
status?: string;
|
|
193
|
-
preview?: CheckProductFormattedPreview | CheckFeatureFormattedPreview;
|
|
194
|
-
}
|
|
195
|
-
interface UsageParams {
|
|
196
|
-
customer_id: string;
|
|
197
|
-
feature_id: string;
|
|
198
|
-
value: number;
|
|
199
|
-
customer_data?: CustomerData;
|
|
200
|
-
}
|
|
201
|
-
interface UsageResult {
|
|
202
|
-
code: string;
|
|
203
|
-
customer_id: string;
|
|
204
|
-
feature_id: string;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
interface GetEntityParams {
|
|
208
|
-
expand?: string[];
|
|
209
|
-
}
|
|
210
|
-
interface EntityDataParams {
|
|
211
|
-
name?: string;
|
|
212
|
-
featureId: string;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
export type { AttachParams as A, CreateProductParams as C, DeleteEntityResult as D, Entity as E, GetEntityParams$1 as G, ListProductsParams as L, Product as P, TrackParams as T, UsageParams as U, CreateEntityParams as a, CreateEntityResult as b, AttachResult as c, UsageResult as d, CancelParams as e, CancelResult as f, CheckParams as g, CheckResult as h, TrackResult as i, GetEntityParams as j, AttachFeatureOptions as k, EntityDataParams as l };
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import { d as CustomerProduct, e as CustomerFeature, f as CustomerInvoice, C as CustomerData, A as AppEnv, I as Infinite, P as ProductItemIntervalType, g as UsageModel, F as FreeTrialDuration, h as UsageModelType } from './cusTypes-BD42O-7Z.js';
|
|
2
|
-
|
|
3
|
-
type EntityExpandOption = "invoices";
|
|
4
|
-
|
|
5
|
-
interface CreateEntityParams {
|
|
6
|
-
id: string;
|
|
7
|
-
name: string;
|
|
8
|
-
feature_id: string;
|
|
9
|
-
customer_data?: CustomerData;
|
|
10
|
-
}
|
|
11
|
-
interface CreateEntityResult {
|
|
12
|
-
success: boolean;
|
|
13
|
-
}
|
|
14
|
-
interface DeleteEntityResult {
|
|
15
|
-
success: boolean;
|
|
16
|
-
}
|
|
17
|
-
interface GetEntityParams$1 {
|
|
18
|
-
expand?: EntityExpandOption[];
|
|
19
|
-
}
|
|
20
|
-
interface Entity {
|
|
21
|
-
id: string;
|
|
22
|
-
name: string;
|
|
23
|
-
customer_id: string;
|
|
24
|
-
created_at: number;
|
|
25
|
-
env: string;
|
|
26
|
-
products: CustomerProduct[];
|
|
27
|
-
features: Record<string, CustomerFeature>;
|
|
28
|
-
invoices?: CustomerInvoice[];
|
|
29
|
-
}
|
|
30
|
-
interface EntityData {
|
|
31
|
-
name?: string;
|
|
32
|
-
feature_id: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
interface ProductItem {
|
|
36
|
-
feature_id?: string;
|
|
37
|
-
included_usage?: number | typeof Infinite;
|
|
38
|
-
interval?: ProductItemIntervalType;
|
|
39
|
-
usage_model?: UsageModel;
|
|
40
|
-
price?: number;
|
|
41
|
-
billing_units?: number;
|
|
42
|
-
entity_feature_id?: string;
|
|
43
|
-
reset_usage_on_billing?: boolean;
|
|
44
|
-
reset_usage_when_enabled?: boolean;
|
|
45
|
-
}
|
|
46
|
-
interface FreeTrial {
|
|
47
|
-
duration: FreeTrialDuration;
|
|
48
|
-
length: number;
|
|
49
|
-
unique_fingerprint: boolean;
|
|
50
|
-
}
|
|
51
|
-
interface Product {
|
|
52
|
-
autumn_id: string;
|
|
53
|
-
created_at: number;
|
|
54
|
-
id: string;
|
|
55
|
-
name: string;
|
|
56
|
-
env: AppEnv;
|
|
57
|
-
is_add_on: boolean;
|
|
58
|
-
is_default: boolean;
|
|
59
|
-
group: string;
|
|
60
|
-
version: number;
|
|
61
|
-
items: ProductItem[];
|
|
62
|
-
free_trial: FreeTrial | null;
|
|
63
|
-
}
|
|
64
|
-
interface CreateProductParams {
|
|
65
|
-
id: string;
|
|
66
|
-
name?: string;
|
|
67
|
-
is_add_on?: boolean;
|
|
68
|
-
is_default?: boolean;
|
|
69
|
-
items?: ProductItem[];
|
|
70
|
-
free_trial?: FreeTrial;
|
|
71
|
-
}
|
|
72
|
-
interface ListProductsParams {
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
type CheckFeatureScenario = "usage_limit" | "feature_flag";
|
|
76
|
-
interface CheckFeatureFormattedPreview {
|
|
77
|
-
scenario: CheckFeatureScenario;
|
|
78
|
-
title: string;
|
|
79
|
-
message: string;
|
|
80
|
-
feature_id: string;
|
|
81
|
-
feature_name: string;
|
|
82
|
-
products: Product[];
|
|
83
|
-
}
|
|
84
|
-
type CheckProductScenario = "scheduled" | "active" | "new" | "renew" | "upgrade" | "downgrade" | "cancel";
|
|
85
|
-
interface CheckProductFormattedPreview {
|
|
86
|
-
scenario: CheckProductScenario;
|
|
87
|
-
product_id: string;
|
|
88
|
-
product_name: string;
|
|
89
|
-
recurring: boolean;
|
|
90
|
-
error_on_attach?: boolean;
|
|
91
|
-
next_cycle_at?: number;
|
|
92
|
-
current_product_name?: string;
|
|
93
|
-
items?: {
|
|
94
|
-
price: string;
|
|
95
|
-
description: string;
|
|
96
|
-
usage_model?: UsageModelType;
|
|
97
|
-
}[];
|
|
98
|
-
options?: {
|
|
99
|
-
feature_id: string;
|
|
100
|
-
feature_name: string;
|
|
101
|
-
billing_units: number;
|
|
102
|
-
price?: number;
|
|
103
|
-
tiers?: {
|
|
104
|
-
to: number | string;
|
|
105
|
-
amount: number;
|
|
106
|
-
}[];
|
|
107
|
-
}[];
|
|
108
|
-
due_today?: {
|
|
109
|
-
price: number;
|
|
110
|
-
currency: string;
|
|
111
|
-
};
|
|
112
|
-
due_next_cycle?: {
|
|
113
|
-
price: number;
|
|
114
|
-
currency: string;
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
interface AttachFeatureOptions {
|
|
119
|
-
feature_id: string;
|
|
120
|
-
quantity: number;
|
|
121
|
-
}
|
|
122
|
-
interface AttachParams {
|
|
123
|
-
customer_id: string;
|
|
124
|
-
product_id?: string;
|
|
125
|
-
entity_id?: string;
|
|
126
|
-
options?: AttachFeatureOptions[];
|
|
127
|
-
product_ids?: string[];
|
|
128
|
-
free_trial?: boolean;
|
|
129
|
-
success_url?: string;
|
|
130
|
-
metadata?: Record<string, string>;
|
|
131
|
-
force_checkout?: boolean;
|
|
132
|
-
customer_data?: CustomerData;
|
|
133
|
-
entity_data?: EntityData;
|
|
134
|
-
checkout_session_params?: Record<string, any>;
|
|
135
|
-
}
|
|
136
|
-
interface CancelParams {
|
|
137
|
-
customer_id: string;
|
|
138
|
-
product_id: string;
|
|
139
|
-
entity_id?: string;
|
|
140
|
-
cancel_immediately?: boolean;
|
|
141
|
-
}
|
|
142
|
-
interface CancelResult {
|
|
143
|
-
success: boolean;
|
|
144
|
-
customer_id: string;
|
|
145
|
-
product_id: string;
|
|
146
|
-
}
|
|
147
|
-
interface AttachResult {
|
|
148
|
-
checkout_url?: string;
|
|
149
|
-
customer_id: string;
|
|
150
|
-
product_ids: string[];
|
|
151
|
-
code: string;
|
|
152
|
-
message: string;
|
|
153
|
-
customer_data?: CustomerData;
|
|
154
|
-
}
|
|
155
|
-
interface TrackParams {
|
|
156
|
-
customer_id: string;
|
|
157
|
-
value?: number;
|
|
158
|
-
feature_id?: string;
|
|
159
|
-
event_name?: string;
|
|
160
|
-
entity_id?: string;
|
|
161
|
-
customer_data?: CustomerData;
|
|
162
|
-
idempotency_key?: string;
|
|
163
|
-
entity_data?: EntityData;
|
|
164
|
-
}
|
|
165
|
-
interface TrackResult {
|
|
166
|
-
id: string;
|
|
167
|
-
code: string;
|
|
168
|
-
customer_id: string;
|
|
169
|
-
feature_id?: string;
|
|
170
|
-
event_name?: string;
|
|
171
|
-
}
|
|
172
|
-
interface CheckParams {
|
|
173
|
-
customer_id: string;
|
|
174
|
-
feature_id?: string;
|
|
175
|
-
product_id?: string;
|
|
176
|
-
entity_id?: string;
|
|
177
|
-
customer_data?: CustomerData;
|
|
178
|
-
required_balance?: number;
|
|
179
|
-
send_event?: boolean;
|
|
180
|
-
with_preview?: "raw" | "formatted";
|
|
181
|
-
entity_data?: EntityData;
|
|
182
|
-
}
|
|
183
|
-
interface CheckResult {
|
|
184
|
-
customer_id: string;
|
|
185
|
-
allowed: boolean;
|
|
186
|
-
code: string;
|
|
187
|
-
feature_id?: string;
|
|
188
|
-
required_balance?: number;
|
|
189
|
-
unlimited?: boolean;
|
|
190
|
-
balance?: number | null;
|
|
191
|
-
product_id?: string;
|
|
192
|
-
status?: string;
|
|
193
|
-
preview?: CheckProductFormattedPreview | CheckFeatureFormattedPreview;
|
|
194
|
-
}
|
|
195
|
-
interface UsageParams {
|
|
196
|
-
customer_id: string;
|
|
197
|
-
feature_id: string;
|
|
198
|
-
value: number;
|
|
199
|
-
customer_data?: CustomerData;
|
|
200
|
-
}
|
|
201
|
-
interface UsageResult {
|
|
202
|
-
code: string;
|
|
203
|
-
customer_id: string;
|
|
204
|
-
feature_id: string;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
interface GetEntityParams {
|
|
208
|
-
expand?: string[];
|
|
209
|
-
}
|
|
210
|
-
interface EntityDataParams {
|
|
211
|
-
name?: string;
|
|
212
|
-
featureId: string;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
export type { AttachParams as A, CreateProductParams as C, DeleteEntityResult as D, Entity as E, GetEntityParams$1 as G, ListProductsParams as L, Product as P, TrackParams as T, UsageParams as U, CreateEntityParams as a, CreateEntityResult as b, AttachResult as c, UsageResult as d, CancelParams as e, CancelResult as f, CheckParams as g, CheckResult as h, TrackResult as i, GetEntityParams as j, AttachFeatureOptions as k, EntityDataParams as l };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|