autumn-js 1.2.12 → 1.2.13
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/backend/adapters/express.js +91 -4
- package/dist/backend/adapters/express.mjs +6 -6
- package/dist/backend/adapters/fetch.js +91 -4
- package/dist/backend/adapters/fetch.mjs +6 -6
- package/dist/backend/adapters/hono.js +91 -4
- package/dist/backend/adapters/hono.mjs +6 -6
- package/dist/backend/adapters/index.js +91 -4
- package/dist/backend/adapters/index.mjs +9 -9
- package/dist/backend/adapters/next.js +91 -4
- package/dist/backend/adapters/next.mjs +6 -6
- package/dist/backend/{chunk-JQX5WYYY.mjs → chunk-7BVATYGA.mjs} +1 -1
- package/dist/backend/{chunk-7Q77N2K2.mjs → chunk-DNNJOZAT.mjs} +1 -1
- package/dist/backend/{chunk-N53PKNZ6.mjs → chunk-EJGHP7KT.mjs} +2 -2
- package/dist/backend/{chunk-X4LPDDOP.mjs → chunk-MANTLPDT.mjs} +4 -0
- package/dist/backend/{chunk-4Q54RXI2.mjs → chunk-OUDB34Y7.mjs} +1 -1
- package/dist/backend/{chunk-SE5CK5NY.mjs → chunk-RPH5L44S.mjs} +1 -1
- package/dist/backend/{chunk-UEYDU64U.mjs → chunk-T42RZEUZ.mjs} +87 -4
- package/dist/backend/{chunk-ITXMMCSD.mjs → chunk-YSQQKZBU.mjs} +2 -2
- package/dist/backend/core/handlers/coreHandler.d.mts +1 -1
- package/dist/backend/core/handlers/coreHandler.d.ts +1 -1
- package/dist/backend/core/handlers/coreHandler.js +91 -4
- package/dist/backend/core/handlers/coreHandler.mjs +4 -4
- package/dist/backend/core/handlers/executeRoute.d.mts +1 -1
- package/dist/backend/core/handlers/executeRoute.d.ts +1 -1
- package/dist/backend/core/handlers/executeRoute.mjs +1 -1
- package/dist/backend/core/handlers/handleRouteByName.js +91 -4
- package/dist/backend/core/handlers/handleRouteByName.mjs +4 -4
- package/dist/backend/core/handlers/index.d.mts +1 -1
- package/dist/backend/core/handlers/index.d.ts +1 -1
- package/dist/backend/core/handlers/index.js +91 -4
- package/dist/backend/core/handlers/index.mjs +5 -5
- package/dist/backend/core/index.d.mts +1 -1
- package/dist/backend/core/index.d.ts +1 -1
- package/dist/backend/core/index.js +91 -4
- package/dist/backend/core/index.mjs +7 -7
- package/dist/backend/core/routes/index.d.mts +1 -1
- package/dist/backend/core/routes/index.d.ts +1 -1
- package/dist/backend/core/routes/index.js +4 -0
- package/dist/backend/core/routes/index.mjs +2 -2
- package/dist/backend/core/routes/routeBuilder.d.mts +1 -1
- package/dist/backend/core/routes/routeBuilder.d.ts +1 -1
- package/dist/backend/core/routes/routeConfigs.d.mts +1 -1
- package/dist/backend/core/routes/routeConfigs.d.ts +1 -1
- package/dist/backend/core/routes/routeConfigs.js +4 -0
- package/dist/backend/core/routes/routeConfigs.mjs +2 -2
- package/dist/backend/core/types/handlerTypes.d.mts +1 -1
- package/dist/backend/core/types/handlerTypes.d.ts +1 -1
- package/dist/backend/core/types/index.d.mts +1 -1
- package/dist/backend/core/types/index.d.ts +1 -1
- package/dist/backend/core/types/routeTypes.d.mts +1 -1
- package/dist/backend/core/types/routeTypes.d.ts +1 -1
- package/dist/backend/core/utils/index.mjs +3 -3
- package/dist/backend/index.d.mts +2 -2
- package/dist/backend/index.d.ts +2 -2
- package/dist/backend/index.js +91 -4
- package/dist/backend/index.mjs +7 -7
- package/dist/backend/{routeTypes-D0ag5-Tb.d.ts → routeTypes-B94_Mq2J.d.ts} +93 -0
- package/dist/backend/{routeTypes-Cu-XQy7A.d.mts → routeTypes-DVwngaBn.d.mts} +93 -0
- package/dist/better-auth/{chunk-TEP6CVHR.mjs → chunk-4OWECHZC.mjs} +1 -1
- package/dist/better-auth/{chunk-GKUK5UGW.mjs → chunk-JIFD4TSN.mjs} +4 -0
- package/dist/better-auth/{chunk-XFATOIZD.mjs → chunk-ZZGFPTHO.mjs} +88 -5
- package/dist/better-auth/client.d.mts +3 -7
- package/dist/better-auth/client.d.ts +3 -7
- package/dist/better-auth/createAutumnEndpoint-CvXRCg-M.d.mts +43 -0
- package/dist/better-auth/createAutumnEndpoint-CvXRCg-M.d.ts +43 -0
- package/dist/better-auth/index.d.mts +3 -7
- package/dist/better-auth/index.d.ts +3 -7
- package/dist/better-auth/index.js +91 -4
- package/dist/better-auth/index.mjs +3 -3
- package/dist/better-auth/utils/createAutumnEndpoint.d.mts +3 -7
- package/dist/better-auth/utils/createAutumnEndpoint.d.ts +3 -7
- package/dist/better-auth/utils/createAutumnEndpoint.js +4 -0
- package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
- package/dist/better-auth/utils/handleBetterAuthRoute.d.mts +3 -7
- package/dist/better-auth/utils/handleBetterAuthRoute.d.ts +3 -7
- package/dist/better-auth/utils/handleBetterAuthRoute.js +91 -4
- package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
- package/dist/better-auth/utils/index.d.mts +3 -8
- package/dist/better-auth/utils/index.d.ts +3 -8
- package/dist/better-auth/utils/index.js +91 -4
- package/dist/better-auth/utils/index.mjs +3 -3
- package/dist/react/AutumnContext.d.mts +3 -3
- package/dist/react/AutumnContext.d.ts +3 -3
- package/dist/react/AutumnProvider.js +15 -15
- package/dist/react/AutumnProvider.mjs +2 -2
- package/dist/react/{chunk-26CKSAPZ.mjs → chunk-7IDH4OMG.mjs} +1 -1
- package/dist/react/{chunk-HSQUB3BZ.mjs → chunk-BDG6JHEW.mjs} +1 -1
- package/dist/react/{chunk-KB72KQKN.mjs → chunk-DEZBJQEG.mjs} +1 -1
- package/dist/react/{chunk-XJZH5NMZ.mjs → chunk-E5ZHOMZ4.mjs} +23 -23
- package/dist/react/{chunk-OXQG65ZT.mjs → chunk-FWWIAOPU.mjs} +1 -1
- package/dist/react/{chunk-ZGPE4R6H.mjs → chunk-HVBDZARN.mjs} +2 -2
- package/dist/react/{chunk-MC2YYATT.mjs → chunk-J6SLKTKE.mjs} +1 -1
- package/dist/react/{chunk-CHU7CIWP.mjs → chunk-NSFHAUTD.mjs} +1 -1
- package/dist/react/{chunk-G7FTQLT7.mjs → chunk-YQFYWH7J.mjs} +1 -1
- package/dist/react/client/AutumnClient.d.mts +3 -3
- package/dist/react/client/AutumnClient.d.ts +3 -3
- package/dist/react/client/IAutumnClient.d.mts +16 -3
- package/dist/react/client/IAutumnClient.d.ts +16 -3
- package/dist/react/client/index.d.mts +3 -3
- package/dist/react/client/index.d.ts +3 -3
- package/dist/react/{customer-CbcVyRCQ.d.ts → customer-CaGJEN5J.d.ts} +1 -1
- package/dist/react/{customer-BYYt9N1h.d.mts → customer-DB8vL_m7.d.mts} +1 -1
- package/dist/react/hooks/index.d.mts +3 -3
- package/dist/react/hooks/index.d.ts +3 -3
- package/dist/react/hooks/index.js +16 -16
- package/dist/react/hooks/index.mjs +8 -8
- package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +2 -2
- package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +2 -2
- package/dist/react/hooks/internal/check/customerToFeatures.d.mts +2 -2
- package/dist/react/hooks/internal/check/customerToFeatures.d.ts +2 -2
- package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +2 -2
- package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +2 -2
- package/dist/react/hooks/internal/check/getCreditCost.d.mts +2 -2
- package/dist/react/hooks/internal/check/getCreditCost.d.ts +2 -2
- package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +3 -3
- package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +3 -3
- package/dist/react/hooks/internal/useCustomerActions.d.mts +3 -3
- package/dist/react/hooks/internal/useCustomerActions.d.ts +3 -3
- package/dist/react/hooks/internal/useCustomerActions.js +1 -1
- package/dist/react/hooks/internal/useCustomerActions.mjs +2 -2
- package/dist/react/hooks/useAggregateEvents.d.mts +2 -2
- package/dist/react/hooks/useAggregateEvents.d.ts +2 -2
- package/dist/react/hooks/useAggregateEvents.js +16 -16
- package/dist/react/hooks/useAggregateEvents.mjs +2 -2
- package/dist/react/hooks/useCustomer.d.mts +3 -3
- package/dist/react/hooks/useCustomer.d.ts +3 -3
- package/dist/react/hooks/useCustomer.js +16 -16
- package/dist/react/hooks/useCustomer.mjs +3 -3
- package/dist/react/hooks/useEntity.d.mts +2 -2
- package/dist/react/hooks/useEntity.d.ts +2 -2
- package/dist/react/hooks/useEntity.js +16 -16
- package/dist/react/hooks/useEntity.mjs +2 -2
- package/dist/react/hooks/useListEvents.d.mts +2 -2
- package/dist/react/hooks/useListEvents.d.ts +2 -2
- package/dist/react/hooks/useListEvents.js +16 -16
- package/dist/react/hooks/useListEvents.mjs +2 -2
- package/dist/react/hooks/useListPlans.d.mts +2 -2
- package/dist/react/hooks/useListPlans.d.ts +2 -2
- package/dist/react/hooks/useListPlans.js +16 -16
- package/dist/react/hooks/useListPlans.mjs +2 -2
- package/dist/react/hooks/useReferrals.d.mts +2 -2
- package/dist/react/hooks/useReferrals.d.ts +2 -2
- package/dist/react/hooks/useReferrals.js +16 -16
- package/dist/react/hooks/useReferrals.mjs +2 -2
- package/dist/react/index.d.mts +3 -3
- package/dist/react/index.d.ts +3 -3
- package/dist/react/index.js +22 -22
- package/dist/react/index.mjs +9 -9
- package/dist/react/{params-By0MIRsJ.d.ts → params-B5l9vHfZ.d.ts} +1 -1
- package/dist/react/{params-CUb0ZlUG.d.mts → params-BVglT8vT.d.mts} +1 -1
- package/dist/react/{plan-CqxFGNk2.d.mts → plan-DSTBzzTY.d.mts} +13 -0
- package/dist/react/{plan-CqxFGNk2.d.ts → plan-DSTBzzTY.d.ts} +13 -0
- package/dist/sdk/index.d.mts +125 -1
- package/dist/sdk/index.d.ts +125 -1
- package/dist/sdk/index.js +146 -4
- package/dist/sdk/index.mjs +133 -5
- package/package.json +1 -1
- package/dist/better-auth/createAutumnEndpoint-D9Plymvy.d.mts +0 -309
- package/dist/better-auth/createAutumnEndpoint-D9Plymvy.d.ts +0 -309
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { A as AuthResult, C as CustomerData, a as CustomerId, R as ResolvedIdentity } from '../../authTypes-CyV4xBTB.js';
|
|
2
2
|
export { CoreHandlerOptions, UnifiedRequest, UnifiedResponse } from './handlerTypes.js';
|
|
3
3
|
export { BackendErrorBody, BackendResult } from './responseTypes.js';
|
|
4
|
-
export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-
|
|
4
|
+
export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-B94_Mq2J.js';
|
|
5
5
|
import 'zod/v4';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-
|
|
1
|
+
export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-DVwngaBn.mjs';
|
|
2
2
|
import 'zod/v4';
|
|
3
3
|
import '../../authTypes-CyV4xBTB.mjs';
|
|
4
4
|
import './responseTypes.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-
|
|
1
|
+
export { C as CustomHandlerArgs, a as CustomHandlerFn, c as ROUTE_NAMES, R as RouteDefinition, b as RouteName } from '../../routeTypes-B94_Mq2J.js';
|
|
2
2
|
import 'zod/v4';
|
|
3
3
|
import '../../authTypes-CyV4xBTB.js';
|
|
4
4
|
import './responseTypes.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../../chunk-OTXV5FY7.mjs";
|
|
2
|
-
import {
|
|
3
|
-
sanitizeBody
|
|
4
|
-
} from "../../chunk-Z6QP3YEA.mjs";
|
|
5
2
|
import {
|
|
6
3
|
secretKeyCheck
|
|
7
4
|
} from "../../chunk-VZIMT7AO.mjs";
|
|
5
|
+
import {
|
|
6
|
+
sanitizeBody
|
|
7
|
+
} from "../../chunk-Z6QP3YEA.mjs";
|
|
8
8
|
import {
|
|
9
9
|
backendError,
|
|
10
10
|
backendSuccess,
|
package/dist/backend/index.d.mts
CHANGED
|
@@ -3,8 +3,8 @@ import { C as CustomerData } from './authTypes-CyV4xBTB.mjs';
|
|
|
3
3
|
export { A as AuthResult, a as CustomerId, R as ResolvedIdentity } from './authTypes-CyV4xBTB.mjs';
|
|
4
4
|
export { CoreHandlerOptions, UnifiedRequest, UnifiedResponse } from './core/types/handlerTypes.mjs';
|
|
5
5
|
export { BackendErrorBody, BackendResult } from './core/types/responseTypes.mjs';
|
|
6
|
-
import { R as RouteDefinition } from './routeTypes-
|
|
7
|
-
export { C as CustomHandlerArgs, a as CustomHandlerFn } from './routeTypes-
|
|
6
|
+
import { R as RouteDefinition } from './routeTypes-DVwngaBn.mjs';
|
|
7
|
+
export { C as CustomHandlerArgs, a as CustomHandlerFn } from './routeTypes-DVwngaBn.mjs';
|
|
8
8
|
export { buildRouter } from './core/routes/routeBuilder.mjs';
|
|
9
9
|
export { routeConfigs } from './core/routes/routeConfigs.mjs';
|
|
10
10
|
export { secretKeyCheck } from './core/utils/secretKeyCheck.mjs';
|
package/dist/backend/index.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { C as CustomerData } from './authTypes-CyV4xBTB.js';
|
|
|
3
3
|
export { A as AuthResult, a as CustomerId, R as ResolvedIdentity } from './authTypes-CyV4xBTB.js';
|
|
4
4
|
export { CoreHandlerOptions, UnifiedRequest, UnifiedResponse } from './core/types/handlerTypes.js';
|
|
5
5
|
export { BackendErrorBody, BackendResult } from './core/types/responseTypes.js';
|
|
6
|
-
import { R as RouteDefinition } from './routeTypes-
|
|
7
|
-
export { C as CustomHandlerArgs, a as CustomHandlerFn } from './routeTypes-
|
|
6
|
+
import { R as RouteDefinition } from './routeTypes-B94_Mq2J.js';
|
|
7
|
+
export { C as CustomHandlerArgs, a as CustomHandlerFn } from './routeTypes-B94_Mq2J.js';
|
|
8
8
|
export { buildRouter } from './core/routes/routeBuilder.js';
|
|
9
9
|
export { routeConfigs } from './core/routes/routeConfigs.js';
|
|
10
10
|
export { secretKeyCheck } from './core/utils/secretKeyCheck.js';
|
package/dist/backend/index.js
CHANGED
|
@@ -3087,6 +3087,16 @@ var FreeTrial$inboundSchema = z16.pipe(
|
|
|
3087
3087
|
})
|
|
3088
3088
|
);
|
|
3089
3089
|
var PlanEnv$inboundSchema = inboundSchema(PlanEnv);
|
|
3090
|
+
var PlanConfig$inboundSchema = z16.pipe(
|
|
3091
|
+
z16.object({
|
|
3092
|
+
ignore_past_due: z16._default(boolean2(), false)
|
|
3093
|
+
}),
|
|
3094
|
+
z16.transform((v) => {
|
|
3095
|
+
return remap(v, {
|
|
3096
|
+
"ignore_past_due": "ignorePastDue"
|
|
3097
|
+
});
|
|
3098
|
+
})
|
|
3099
|
+
);
|
|
3090
3100
|
var PlanStatus$inboundSchema = inboundSchema(PlanStatus);
|
|
3091
3101
|
var AttachAction$inboundSchema = inboundSchema(AttachAction);
|
|
3092
3102
|
var CustomerEligibility$inboundSchema = z16.pipe(
|
|
@@ -3120,6 +3130,7 @@ var Plan$inboundSchema = z16.pipe(
|
|
|
3120
3130
|
env: PlanEnv$inboundSchema,
|
|
3121
3131
|
archived: boolean2(),
|
|
3122
3132
|
base_variant_id: nullable(string4()),
|
|
3133
|
+
config: z16.lazy(() => PlanConfig$inboundSchema),
|
|
3123
3134
|
customer_eligibility: optional2(z16.lazy(
|
|
3124
3135
|
() => CustomerEligibility$inboundSchema
|
|
3125
3136
|
))
|
|
@@ -3800,6 +3811,16 @@ var FreeTrialRequest$outboundSchema = z19.pipe(
|
|
|
3800
3811
|
});
|
|
3801
3812
|
})
|
|
3802
3813
|
);
|
|
3814
|
+
var CreatePlanConfigRequest$outboundSchema = z19.pipe(
|
|
3815
|
+
z19.object({
|
|
3816
|
+
ignorePastDue: z19._default(z19.boolean(), false)
|
|
3817
|
+
}),
|
|
3818
|
+
z19.transform((v) => {
|
|
3819
|
+
return remap(v, {
|
|
3820
|
+
ignorePastDue: "ignore_past_due"
|
|
3821
|
+
});
|
|
3822
|
+
})
|
|
3823
|
+
);
|
|
3803
3824
|
var CreatePlanParams$outboundSchema = z19.pipe(
|
|
3804
3825
|
z19.object({
|
|
3805
3826
|
planId: z19.string(),
|
|
@@ -3810,7 +3831,8 @@ var CreatePlanParams$outboundSchema = z19.pipe(
|
|
|
3810
3831
|
autoEnable: z19._default(z19.boolean(), false),
|
|
3811
3832
|
price: z19.optional(z19.lazy(() => CreatePlanPriceRequest$outboundSchema)),
|
|
3812
3833
|
items: z19.optional(z19.array(z19.lazy(() => CreatePlanPlanItem$outboundSchema))),
|
|
3813
|
-
freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema))
|
|
3834
|
+
freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema)),
|
|
3835
|
+
config: z19.optional(z19.lazy(() => CreatePlanConfigRequest$outboundSchema))
|
|
3814
3836
|
}),
|
|
3815
3837
|
z19.transform((v) => {
|
|
3816
3838
|
return remap(v, {
|
|
@@ -3984,6 +4006,16 @@ var CreatePlanFreeTrialResponse$inboundSchema = z19.pipe(
|
|
|
3984
4006
|
})
|
|
3985
4007
|
);
|
|
3986
4008
|
var CreatePlanEnv$inboundSchema = inboundSchema(CreatePlanEnv);
|
|
4009
|
+
var CreatePlanConfigResponse$inboundSchema = z19.pipe(
|
|
4010
|
+
z19.object({
|
|
4011
|
+
ignore_past_due: z19._default(boolean2(), false)
|
|
4012
|
+
}),
|
|
4013
|
+
z19.transform((v) => {
|
|
4014
|
+
return remap(v, {
|
|
4015
|
+
"ignore_past_due": "ignorePastDue"
|
|
4016
|
+
});
|
|
4017
|
+
})
|
|
4018
|
+
);
|
|
3987
4019
|
var CreatePlanStatus$inboundSchema = inboundSchema(CreatePlanStatus);
|
|
3988
4020
|
var CreatePlanAttachAction$inboundSchema = inboundSchema(CreatePlanAttachAction);
|
|
3989
4021
|
var CreatePlanCustomerEligibility$inboundSchema = z19.pipe(
|
|
@@ -4019,6 +4051,7 @@ var CreatePlanResponse$inboundSchema = z19.pipe(
|
|
|
4019
4051
|
env: CreatePlanEnv$inboundSchema,
|
|
4020
4052
|
archived: boolean2(),
|
|
4021
4053
|
base_variant_id: nullable(string4()),
|
|
4054
|
+
config: z19.lazy(() => CreatePlanConfigResponse$inboundSchema),
|
|
4022
4055
|
customer_eligibility: optional2(
|
|
4023
4056
|
z19.lazy(() => CreatePlanCustomerEligibility$inboundSchema)
|
|
4024
4057
|
)
|
|
@@ -5271,6 +5304,16 @@ var GetPlanFreeTrial$inboundSchema = z31.pipe(
|
|
|
5271
5304
|
})
|
|
5272
5305
|
);
|
|
5273
5306
|
var GetPlanEnv$inboundSchema = inboundSchema(GetPlanEnv);
|
|
5307
|
+
var GetPlanConfig$inboundSchema = z31.pipe(
|
|
5308
|
+
z31.object({
|
|
5309
|
+
ignore_past_due: z31._default(boolean2(), false)
|
|
5310
|
+
}),
|
|
5311
|
+
z31.transform((v) => {
|
|
5312
|
+
return remap(v, {
|
|
5313
|
+
"ignore_past_due": "ignorePastDue"
|
|
5314
|
+
});
|
|
5315
|
+
})
|
|
5316
|
+
);
|
|
5274
5317
|
var GetPlanStatus$inboundSchema = inboundSchema(GetPlanStatus);
|
|
5275
5318
|
var GetPlanAttachAction$inboundSchema = inboundSchema(GetPlanAttachAction);
|
|
5276
5319
|
var GetPlanCustomerEligibility$inboundSchema = z31.pipe(
|
|
@@ -5304,6 +5347,7 @@ var GetPlanResponse$inboundSchema = z31.pipe(
|
|
|
5304
5347
|
env: GetPlanEnv$inboundSchema,
|
|
5305
5348
|
archived: boolean2(),
|
|
5306
5349
|
base_variant_id: nullable(string4()),
|
|
5350
|
+
config: z31.lazy(() => GetPlanConfig$inboundSchema),
|
|
5307
5351
|
customer_eligibility: optional2(
|
|
5308
5352
|
z31.lazy(() => GetPlanCustomerEligibility$inboundSchema)
|
|
5309
5353
|
)
|
|
@@ -6014,6 +6058,16 @@ var ListPlansFreeTrial$inboundSchema = z35.pipe(
|
|
|
6014
6058
|
})
|
|
6015
6059
|
);
|
|
6016
6060
|
var ListPlansEnv$inboundSchema = inboundSchema(ListPlansEnv);
|
|
6061
|
+
var ListPlansConfig$inboundSchema = z35.pipe(
|
|
6062
|
+
z35.object({
|
|
6063
|
+
ignore_past_due: z35._default(boolean2(), false)
|
|
6064
|
+
}),
|
|
6065
|
+
z35.transform((v) => {
|
|
6066
|
+
return remap(v, {
|
|
6067
|
+
"ignore_past_due": "ignorePastDue"
|
|
6068
|
+
});
|
|
6069
|
+
})
|
|
6070
|
+
);
|
|
6017
6071
|
var ListPlansStatus$inboundSchema = inboundSchema(ListPlansStatus);
|
|
6018
6072
|
var ListPlansAttachAction$inboundSchema = inboundSchema(ListPlansAttachAction);
|
|
6019
6073
|
var ListPlansCustomerEligibility$inboundSchema = z35.pipe(
|
|
@@ -6047,6 +6101,7 @@ var ListPlansList$inboundSchema = z35.pipe(
|
|
|
6047
6101
|
env: ListPlansEnv$inboundSchema,
|
|
6048
6102
|
archived: boolean2(),
|
|
6049
6103
|
base_variant_id: nullable(string4()),
|
|
6104
|
+
config: z35.lazy(() => ListPlansConfig$inboundSchema),
|
|
6050
6105
|
customer_eligibility: optional2(
|
|
6051
6106
|
z35.lazy(() => ListPlansCustomerEligibility$inboundSchema)
|
|
6052
6107
|
)
|
|
@@ -9741,6 +9796,16 @@ var UpdatePlanFreeTrialParams$outboundSchema = z48.pipe(
|
|
|
9741
9796
|
});
|
|
9742
9797
|
})
|
|
9743
9798
|
);
|
|
9799
|
+
var UpdatePlanConfigRequest$outboundSchema = z48.pipe(
|
|
9800
|
+
z48.object({
|
|
9801
|
+
ignorePastDue: z48._default(z48.boolean(), false)
|
|
9802
|
+
}),
|
|
9803
|
+
z48.transform((v) => {
|
|
9804
|
+
return remap(v, {
|
|
9805
|
+
ignorePastDue: "ignore_past_due"
|
|
9806
|
+
});
|
|
9807
|
+
})
|
|
9808
|
+
);
|
|
9744
9809
|
var UpdatePlanParams$outboundSchema = z48.pipe(
|
|
9745
9810
|
z48.object({
|
|
9746
9811
|
planId: z48.string(),
|
|
@@ -9756,6 +9821,7 @@ var UpdatePlanParams$outboundSchema = z48.pipe(
|
|
|
9756
9821
|
freeTrial: z48.optional(
|
|
9757
9822
|
z48.nullable(z48.lazy(() => UpdatePlanFreeTrialParams$outboundSchema))
|
|
9758
9823
|
),
|
|
9824
|
+
config: z48.optional(z48.lazy(() => UpdatePlanConfigRequest$outboundSchema)),
|
|
9759
9825
|
version: z48.optional(z48.number()),
|
|
9760
9826
|
archived: z48._default(z48.boolean(), false),
|
|
9761
9827
|
newPlanId: z48.optional(z48.string())
|
|
@@ -9933,6 +9999,16 @@ var UpdatePlanFreeTrial$inboundSchema = z48.pipe(
|
|
|
9933
9999
|
})
|
|
9934
10000
|
);
|
|
9935
10001
|
var UpdatePlanEnv$inboundSchema = inboundSchema(UpdatePlanEnv);
|
|
10002
|
+
var UpdatePlanConfigResponse$inboundSchema = z48.pipe(
|
|
10003
|
+
z48.object({
|
|
10004
|
+
ignore_past_due: z48._default(boolean2(), false)
|
|
10005
|
+
}),
|
|
10006
|
+
z48.transform((v) => {
|
|
10007
|
+
return remap(v, {
|
|
10008
|
+
"ignore_past_due": "ignorePastDue"
|
|
10009
|
+
});
|
|
10010
|
+
})
|
|
10011
|
+
);
|
|
9936
10012
|
var UpdatePlanStatus$inboundSchema = inboundSchema(UpdatePlanStatus);
|
|
9937
10013
|
var UpdatePlanAttachAction$inboundSchema = inboundSchema(UpdatePlanAttachAction);
|
|
9938
10014
|
var UpdatePlanCustomerEligibility$inboundSchema = z48.pipe(
|
|
@@ -9966,6 +10042,7 @@ var UpdatePlanResponse$inboundSchema = z48.pipe(
|
|
|
9966
10042
|
env: UpdatePlanEnv$inboundSchema,
|
|
9967
10043
|
archived: boolean2(),
|
|
9968
10044
|
base_variant_id: nullable(string4()),
|
|
10045
|
+
config: z48.lazy(() => UpdatePlanConfigResponse$inboundSchema),
|
|
9969
10046
|
customer_eligibility: optional2(
|
|
9970
10047
|
z48.lazy(() => UpdatePlanCustomerEligibility$inboundSchema)
|
|
9971
10048
|
)
|
|
@@ -10224,10 +10301,14 @@ var FailOpenHook = class {
|
|
|
10224
10301
|
fetcher: async (input, init) => {
|
|
10225
10302
|
try {
|
|
10226
10303
|
return init == null ? await fetch(input) : await fetch(input, init);
|
|
10227
|
-
} catch {
|
|
10304
|
+
} catch (error) {
|
|
10305
|
+
console.log(error);
|
|
10306
|
+
console.log(
|
|
10307
|
+
`Network failed to reach Autumn: ${error}. Returning 555 Network Error.`
|
|
10308
|
+
);
|
|
10228
10309
|
return new Response(null, {
|
|
10229
|
-
status:
|
|
10230
|
-
statusText: "
|
|
10310
|
+
status: 555,
|
|
10311
|
+
statusText: "Network Error"
|
|
10231
10312
|
});
|
|
10232
10313
|
}
|
|
10233
10314
|
}
|
|
@@ -13989,6 +14070,7 @@ var Plans = class extends ClientSDK {
|
|
|
13989
14070
|
* @param price - Base recurring price for the plan. Omit for free or usage-only plans. (optional)
|
|
13990
14071
|
* @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
|
|
13991
14072
|
* @param freeTrial - Free trial configuration. Customers can try this plan before being charged. (optional)
|
|
14073
|
+
* @param config - Miscellaneous plan-level configuration flags. (optional)
|
|
13992
14074
|
*
|
|
13993
14075
|
* @returns The created plan object.
|
|
13994
14076
|
*/
|
|
@@ -14094,6 +14176,7 @@ var Plans = class extends ClientSDK {
|
|
|
14094
14176
|
* @param price - The price of the plan. Set to null to remove the base price. (optional)
|
|
14095
14177
|
* @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
|
|
14096
14178
|
* @param freeTrial - The free trial of the plan. Set to null to remove the free trial. (optional)
|
|
14179
|
+
* @param config - Miscellaneous plan-level configuration flags. (optional)
|
|
14097
14180
|
* @param newPlanId - The new ID to use for the plan. Can only be updated if the plan has not been used by any customers. (optional)
|
|
14098
14181
|
*
|
|
14099
14182
|
* @returns The updated plan object.
|
|
@@ -14979,6 +15062,9 @@ var listPlansItemDisplaySchema = import_v46.z.object({
|
|
|
14979
15062
|
primaryText: import_v46.z.string(),
|
|
14980
15063
|
secondaryText: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional()
|
|
14981
15064
|
});
|
|
15065
|
+
var listPlansConfigSchema = import_v46.z.object({
|
|
15066
|
+
ignorePastDue: import_v46.z.boolean()
|
|
15067
|
+
});
|
|
14982
15068
|
var listPlansParamsOutboundSchema = import_v46.z.object({
|
|
14983
15069
|
customer_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
|
|
14984
15070
|
entity_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
|
|
@@ -15067,6 +15153,7 @@ var listPlansListSchema = import_v46.z.object({
|
|
|
15067
15153
|
env: listPlansEnvSchema,
|
|
15068
15154
|
archived: import_v46.z.boolean(),
|
|
15069
15155
|
baseVariantId: import_v46.z.string().nullable(),
|
|
15156
|
+
config: listPlansConfigSchema,
|
|
15070
15157
|
customerEligibility: import_v46.z.union([listPlansCustomerEligibilitySchema, import_v46.z.undefined()]).optional()
|
|
15071
15158
|
});
|
|
15072
15159
|
var listPlansResponseSchema = import_v46.z.object({
|
package/dist/backend/index.mjs
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import "./chunk-WYDGEDEU.mjs";
|
|
2
2
|
import "./chunk-VXND2UDT.mjs";
|
|
3
|
-
import "./chunk-
|
|
3
|
+
import "./chunk-EJGHP7KT.mjs";
|
|
4
4
|
import {
|
|
5
5
|
createCoreHandler
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YSQQKZBU.mjs";
|
|
7
7
|
import "./chunk-TSF4YCUO.mjs";
|
|
8
8
|
import {
|
|
9
9
|
buildRouter
|
|
10
10
|
} from "./chunk-UAR3TMWI.mjs";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-T42RZEUZ.mjs";
|
|
12
12
|
import {
|
|
13
13
|
routeConfigs
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MANTLPDT.mjs";
|
|
15
15
|
import "./chunk-S5HPMJ4U.mjs";
|
|
16
16
|
import "./chunk-OTXV5FY7.mjs";
|
|
17
|
-
import {
|
|
18
|
-
sanitizeBody
|
|
19
|
-
} from "./chunk-Z6QP3YEA.mjs";
|
|
20
17
|
import {
|
|
21
18
|
secretKeyCheck
|
|
22
19
|
} from "./chunk-VZIMT7AO.mjs";
|
|
20
|
+
import {
|
|
21
|
+
sanitizeBody
|
|
22
|
+
} from "./chunk-Z6QP3YEA.mjs";
|
|
23
23
|
import "./chunk-TBQ27LIK.mjs";
|
|
24
24
|
import "./chunk-J44WR3QZ.mjs";
|
|
25
25
|
import {
|
|
@@ -2678,6 +2678,15 @@ declare const PlanEnv: {
|
|
|
2678
2678
|
* Environment this plan belongs to ('sandbox' or 'live').
|
|
2679
2679
|
*/
|
|
2680
2680
|
type PlanEnv = OpenEnum<typeof PlanEnv>;
|
|
2681
|
+
/**
|
|
2682
|
+
* Miscellaneous plan-level configuration flags.
|
|
2683
|
+
*/
|
|
2684
|
+
type PlanConfig = {
|
|
2685
|
+
/**
|
|
2686
|
+
* If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
|
|
2687
|
+
*/
|
|
2688
|
+
ignorePastDue: boolean;
|
|
2689
|
+
};
|
|
2681
2690
|
/**
|
|
2682
2691
|
* The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
|
|
2683
2692
|
*/
|
|
@@ -2782,6 +2791,10 @@ type Plan = {
|
|
|
2782
2791
|
* If this is a variant, the ID of the base plan it was created from.
|
|
2783
2792
|
*/
|
|
2784
2793
|
baseVariantId: string | null;
|
|
2794
|
+
/**
|
|
2795
|
+
* Miscellaneous plan-level configuration flags.
|
|
2796
|
+
*/
|
|
2797
|
+
config: PlanConfig;
|
|
2785
2798
|
customerEligibility?: CustomerEligibility | undefined;
|
|
2786
2799
|
};
|
|
2787
2800
|
|
|
@@ -3619,6 +3632,15 @@ type FreeTrialRequest = {
|
|
|
3619
3632
|
*/
|
|
3620
3633
|
cardRequired?: boolean | undefined;
|
|
3621
3634
|
};
|
|
3635
|
+
/**
|
|
3636
|
+
* Miscellaneous plan-level configuration flags.
|
|
3637
|
+
*/
|
|
3638
|
+
type CreatePlanConfigRequest = {
|
|
3639
|
+
/**
|
|
3640
|
+
* If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
|
|
3641
|
+
*/
|
|
3642
|
+
ignorePastDue?: boolean | undefined;
|
|
3643
|
+
};
|
|
3622
3644
|
type CreatePlanParams = {
|
|
3623
3645
|
/**
|
|
3624
3646
|
* The ID of the plan to create.
|
|
@@ -3656,6 +3678,10 @@ type CreatePlanParams = {
|
|
|
3656
3678
|
* Free trial configuration. Customers can try this plan before being charged.
|
|
3657
3679
|
*/
|
|
3658
3680
|
freeTrial?: FreeTrialRequest | undefined;
|
|
3681
|
+
/**
|
|
3682
|
+
* Miscellaneous plan-level configuration flags.
|
|
3683
|
+
*/
|
|
3684
|
+
config?: CreatePlanConfigRequest | undefined;
|
|
3659
3685
|
};
|
|
3660
3686
|
/**
|
|
3661
3687
|
* Billing interval (e.g. 'month', 'year').
|
|
@@ -3975,6 +4001,15 @@ declare const CreatePlanEnv: {
|
|
|
3975
4001
|
* Environment this plan belongs to ('sandbox' or 'live').
|
|
3976
4002
|
*/
|
|
3977
4003
|
type CreatePlanEnv = OpenEnum<typeof CreatePlanEnv>;
|
|
4004
|
+
/**
|
|
4005
|
+
* Miscellaneous plan-level configuration flags.
|
|
4006
|
+
*/
|
|
4007
|
+
type CreatePlanConfigResponse = {
|
|
4008
|
+
/**
|
|
4009
|
+
* If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
|
|
4010
|
+
*/
|
|
4011
|
+
ignorePastDue: boolean;
|
|
4012
|
+
};
|
|
3978
4013
|
/**
|
|
3979
4014
|
* The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
|
|
3980
4015
|
*/
|
|
@@ -4082,6 +4117,10 @@ type CreatePlanResponse = {
|
|
|
4082
4117
|
* If this is a variant, the ID of the base plan it was created from.
|
|
4083
4118
|
*/
|
|
4084
4119
|
baseVariantId: string | null;
|
|
4120
|
+
/**
|
|
4121
|
+
* Miscellaneous plan-level configuration flags.
|
|
4122
|
+
*/
|
|
4123
|
+
config: CreatePlanConfigResponse;
|
|
4085
4124
|
customerEligibility?: CreatePlanCustomerEligibility | undefined;
|
|
4086
4125
|
};
|
|
4087
4126
|
|
|
@@ -5613,6 +5652,15 @@ declare const GetPlanEnv: {
|
|
|
5613
5652
|
* Environment this plan belongs to ('sandbox' or 'live').
|
|
5614
5653
|
*/
|
|
5615
5654
|
type GetPlanEnv = OpenEnum<typeof GetPlanEnv>;
|
|
5655
|
+
/**
|
|
5656
|
+
* Miscellaneous plan-level configuration flags.
|
|
5657
|
+
*/
|
|
5658
|
+
type GetPlanConfig = {
|
|
5659
|
+
/**
|
|
5660
|
+
* If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
|
|
5661
|
+
*/
|
|
5662
|
+
ignorePastDue: boolean;
|
|
5663
|
+
};
|
|
5616
5664
|
/**
|
|
5617
5665
|
* The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
|
|
5618
5666
|
*/
|
|
@@ -5720,6 +5768,10 @@ type GetPlanResponse = {
|
|
|
5720
5768
|
* If this is a variant, the ID of the base plan it was created from.
|
|
5721
5769
|
*/
|
|
5722
5770
|
baseVariantId: string | null;
|
|
5771
|
+
/**
|
|
5772
|
+
* Miscellaneous plan-level configuration flags.
|
|
5773
|
+
*/
|
|
5774
|
+
config: GetPlanConfig;
|
|
5723
5775
|
customerEligibility?: GetPlanCustomerEligibility | undefined;
|
|
5724
5776
|
};
|
|
5725
5777
|
|
|
@@ -6753,6 +6805,15 @@ declare const ListPlansEnv: {
|
|
|
6753
6805
|
* Environment this plan belongs to ('sandbox' or 'live').
|
|
6754
6806
|
*/
|
|
6755
6807
|
type ListPlansEnv = OpenEnum<typeof ListPlansEnv>;
|
|
6808
|
+
/**
|
|
6809
|
+
* Miscellaneous plan-level configuration flags.
|
|
6810
|
+
*/
|
|
6811
|
+
type ListPlansConfig = {
|
|
6812
|
+
/**
|
|
6813
|
+
* If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
|
|
6814
|
+
*/
|
|
6815
|
+
ignorePastDue: boolean;
|
|
6816
|
+
};
|
|
6756
6817
|
/**
|
|
6757
6818
|
* The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
|
|
6758
6819
|
*/
|
|
@@ -6860,6 +6921,10 @@ type ListPlansList = {
|
|
|
6860
6921
|
* If this is a variant, the ID of the base plan it was created from.
|
|
6861
6922
|
*/
|
|
6862
6923
|
baseVariantId: string | null;
|
|
6924
|
+
/**
|
|
6925
|
+
* Miscellaneous plan-level configuration flags.
|
|
6926
|
+
*/
|
|
6927
|
+
config: ListPlansConfig;
|
|
6863
6928
|
customerEligibility?: ListPlansCustomerEligibility | undefined;
|
|
6864
6929
|
};
|
|
6865
6930
|
/**
|
|
@@ -11822,6 +11887,15 @@ type UpdatePlanFreeTrialParams = {
|
|
|
11822
11887
|
*/
|
|
11823
11888
|
cardRequired?: boolean | undefined;
|
|
11824
11889
|
};
|
|
11890
|
+
/**
|
|
11891
|
+
* Miscellaneous plan-level configuration flags.
|
|
11892
|
+
*/
|
|
11893
|
+
type UpdatePlanConfigRequest = {
|
|
11894
|
+
/**
|
|
11895
|
+
* If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
|
|
11896
|
+
*/
|
|
11897
|
+
ignorePastDue?: boolean | undefined;
|
|
11898
|
+
};
|
|
11825
11899
|
type UpdatePlanParams = {
|
|
11826
11900
|
/**
|
|
11827
11901
|
* The ID of the plan to update.
|
|
@@ -11856,6 +11930,10 @@ type UpdatePlanParams = {
|
|
|
11856
11930
|
* The free trial of the plan. Set to null to remove the free trial.
|
|
11857
11931
|
*/
|
|
11858
11932
|
freeTrial?: UpdatePlanFreeTrialParams | null | undefined;
|
|
11933
|
+
/**
|
|
11934
|
+
* Miscellaneous plan-level configuration flags.
|
|
11935
|
+
*/
|
|
11936
|
+
config?: UpdatePlanConfigRequest | undefined;
|
|
11859
11937
|
version?: number | undefined;
|
|
11860
11938
|
archived?: boolean | undefined;
|
|
11861
11939
|
/**
|
|
@@ -12181,6 +12259,15 @@ declare const UpdatePlanEnv: {
|
|
|
12181
12259
|
* Environment this plan belongs to ('sandbox' or 'live').
|
|
12182
12260
|
*/
|
|
12183
12261
|
type UpdatePlanEnv = OpenEnum<typeof UpdatePlanEnv>;
|
|
12262
|
+
/**
|
|
12263
|
+
* Miscellaneous plan-level configuration flags.
|
|
12264
|
+
*/
|
|
12265
|
+
type UpdatePlanConfigResponse = {
|
|
12266
|
+
/**
|
|
12267
|
+
* If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
|
|
12268
|
+
*/
|
|
12269
|
+
ignorePastDue: boolean;
|
|
12270
|
+
};
|
|
12184
12271
|
/**
|
|
12185
12272
|
* The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
|
|
12186
12273
|
*/
|
|
@@ -12288,6 +12375,10 @@ type UpdatePlanResponse = {
|
|
|
12288
12375
|
* If this is a variant, the ID of the base plan it was created from.
|
|
12289
12376
|
*/
|
|
12290
12377
|
baseVariantId: string | null;
|
|
12378
|
+
/**
|
|
12379
|
+
* Miscellaneous plan-level configuration flags.
|
|
12380
|
+
*/
|
|
12381
|
+
config: UpdatePlanConfigResponse;
|
|
12291
12382
|
customerEligibility?: UpdatePlanCustomerEligibility | undefined;
|
|
12292
12383
|
};
|
|
12293
12384
|
|
|
@@ -13034,6 +13125,7 @@ declare class Plans extends ClientSDK {
|
|
|
13034
13125
|
* @param price - Base recurring price for the plan. Omit for free or usage-only plans. (optional)
|
|
13035
13126
|
* @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
|
|
13036
13127
|
* @param freeTrial - Free trial configuration. Customers can try this plan before being charged. (optional)
|
|
13128
|
+
* @param config - Miscellaneous plan-level configuration flags. (optional)
|
|
13037
13129
|
*
|
|
13038
13130
|
* @returns The created plan object.
|
|
13039
13131
|
*/
|
|
@@ -13121,6 +13213,7 @@ declare class Plans extends ClientSDK {
|
|
|
13121
13213
|
* @param price - The price of the plan. Set to null to remove the base price. (optional)
|
|
13122
13214
|
* @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
|
|
13123
13215
|
* @param freeTrial - The free trial of the plan. Set to null to remove the free trial. (optional)
|
|
13216
|
+
* @param config - Miscellaneous plan-level configuration flags. (optional)
|
|
13124
13217
|
* @param newPlanId - The new ID to use for the plan. Can only be updated if the plan has not been used by any customers. (optional)
|
|
13125
13218
|
*
|
|
13126
13219
|
* @returns The updated plan object.
|