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
|
@@ -3080,6 +3080,16 @@ var FreeTrial$inboundSchema = z16.pipe(
|
|
|
3080
3080
|
})
|
|
3081
3081
|
);
|
|
3082
3082
|
var PlanEnv$inboundSchema = inboundSchema(PlanEnv);
|
|
3083
|
+
var PlanConfig$inboundSchema = z16.pipe(
|
|
3084
|
+
z16.object({
|
|
3085
|
+
ignore_past_due: z16._default(boolean2(), false)
|
|
3086
|
+
}),
|
|
3087
|
+
z16.transform((v) => {
|
|
3088
|
+
return remap(v, {
|
|
3089
|
+
"ignore_past_due": "ignorePastDue"
|
|
3090
|
+
});
|
|
3091
|
+
})
|
|
3092
|
+
);
|
|
3083
3093
|
var PlanStatus$inboundSchema = inboundSchema(PlanStatus);
|
|
3084
3094
|
var AttachAction$inboundSchema = inboundSchema(AttachAction);
|
|
3085
3095
|
var CustomerEligibility$inboundSchema = z16.pipe(
|
|
@@ -3113,6 +3123,7 @@ var Plan$inboundSchema = z16.pipe(
|
|
|
3113
3123
|
env: PlanEnv$inboundSchema,
|
|
3114
3124
|
archived: boolean2(),
|
|
3115
3125
|
base_variant_id: nullable(string4()),
|
|
3126
|
+
config: z16.lazy(() => PlanConfig$inboundSchema),
|
|
3116
3127
|
customer_eligibility: optional2(z16.lazy(
|
|
3117
3128
|
() => CustomerEligibility$inboundSchema
|
|
3118
3129
|
))
|
|
@@ -3793,6 +3804,16 @@ var FreeTrialRequest$outboundSchema = z19.pipe(
|
|
|
3793
3804
|
});
|
|
3794
3805
|
})
|
|
3795
3806
|
);
|
|
3807
|
+
var CreatePlanConfigRequest$outboundSchema = z19.pipe(
|
|
3808
|
+
z19.object({
|
|
3809
|
+
ignorePastDue: z19._default(z19.boolean(), false)
|
|
3810
|
+
}),
|
|
3811
|
+
z19.transform((v) => {
|
|
3812
|
+
return remap(v, {
|
|
3813
|
+
ignorePastDue: "ignore_past_due"
|
|
3814
|
+
});
|
|
3815
|
+
})
|
|
3816
|
+
);
|
|
3796
3817
|
var CreatePlanParams$outboundSchema = z19.pipe(
|
|
3797
3818
|
z19.object({
|
|
3798
3819
|
planId: z19.string(),
|
|
@@ -3803,7 +3824,8 @@ var CreatePlanParams$outboundSchema = z19.pipe(
|
|
|
3803
3824
|
autoEnable: z19._default(z19.boolean(), false),
|
|
3804
3825
|
price: z19.optional(z19.lazy(() => CreatePlanPriceRequest$outboundSchema)),
|
|
3805
3826
|
items: z19.optional(z19.array(z19.lazy(() => CreatePlanPlanItem$outboundSchema))),
|
|
3806
|
-
freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema))
|
|
3827
|
+
freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema)),
|
|
3828
|
+
config: z19.optional(z19.lazy(() => CreatePlanConfigRequest$outboundSchema))
|
|
3807
3829
|
}),
|
|
3808
3830
|
z19.transform((v) => {
|
|
3809
3831
|
return remap(v, {
|
|
@@ -3977,6 +3999,16 @@ var CreatePlanFreeTrialResponse$inboundSchema = z19.pipe(
|
|
|
3977
3999
|
})
|
|
3978
4000
|
);
|
|
3979
4001
|
var CreatePlanEnv$inboundSchema = inboundSchema(CreatePlanEnv);
|
|
4002
|
+
var CreatePlanConfigResponse$inboundSchema = z19.pipe(
|
|
4003
|
+
z19.object({
|
|
4004
|
+
ignore_past_due: z19._default(boolean2(), false)
|
|
4005
|
+
}),
|
|
4006
|
+
z19.transform((v) => {
|
|
4007
|
+
return remap(v, {
|
|
4008
|
+
"ignore_past_due": "ignorePastDue"
|
|
4009
|
+
});
|
|
4010
|
+
})
|
|
4011
|
+
);
|
|
3980
4012
|
var CreatePlanStatus$inboundSchema = inboundSchema(CreatePlanStatus);
|
|
3981
4013
|
var CreatePlanAttachAction$inboundSchema = inboundSchema(CreatePlanAttachAction);
|
|
3982
4014
|
var CreatePlanCustomerEligibility$inboundSchema = z19.pipe(
|
|
@@ -4012,6 +4044,7 @@ var CreatePlanResponse$inboundSchema = z19.pipe(
|
|
|
4012
4044
|
env: CreatePlanEnv$inboundSchema,
|
|
4013
4045
|
archived: boolean2(),
|
|
4014
4046
|
base_variant_id: nullable(string4()),
|
|
4047
|
+
config: z19.lazy(() => CreatePlanConfigResponse$inboundSchema),
|
|
4015
4048
|
customer_eligibility: optional2(
|
|
4016
4049
|
z19.lazy(() => CreatePlanCustomerEligibility$inboundSchema)
|
|
4017
4050
|
)
|
|
@@ -5264,6 +5297,16 @@ var GetPlanFreeTrial$inboundSchema = z31.pipe(
|
|
|
5264
5297
|
})
|
|
5265
5298
|
);
|
|
5266
5299
|
var GetPlanEnv$inboundSchema = inboundSchema(GetPlanEnv);
|
|
5300
|
+
var GetPlanConfig$inboundSchema = z31.pipe(
|
|
5301
|
+
z31.object({
|
|
5302
|
+
ignore_past_due: z31._default(boolean2(), false)
|
|
5303
|
+
}),
|
|
5304
|
+
z31.transform((v) => {
|
|
5305
|
+
return remap(v, {
|
|
5306
|
+
"ignore_past_due": "ignorePastDue"
|
|
5307
|
+
});
|
|
5308
|
+
})
|
|
5309
|
+
);
|
|
5267
5310
|
var GetPlanStatus$inboundSchema = inboundSchema(GetPlanStatus);
|
|
5268
5311
|
var GetPlanAttachAction$inboundSchema = inboundSchema(GetPlanAttachAction);
|
|
5269
5312
|
var GetPlanCustomerEligibility$inboundSchema = z31.pipe(
|
|
@@ -5297,6 +5340,7 @@ var GetPlanResponse$inboundSchema = z31.pipe(
|
|
|
5297
5340
|
env: GetPlanEnv$inboundSchema,
|
|
5298
5341
|
archived: boolean2(),
|
|
5299
5342
|
base_variant_id: nullable(string4()),
|
|
5343
|
+
config: z31.lazy(() => GetPlanConfig$inboundSchema),
|
|
5300
5344
|
customer_eligibility: optional2(
|
|
5301
5345
|
z31.lazy(() => GetPlanCustomerEligibility$inboundSchema)
|
|
5302
5346
|
)
|
|
@@ -6007,6 +6051,16 @@ var ListPlansFreeTrial$inboundSchema = z35.pipe(
|
|
|
6007
6051
|
})
|
|
6008
6052
|
);
|
|
6009
6053
|
var ListPlansEnv$inboundSchema = inboundSchema(ListPlansEnv);
|
|
6054
|
+
var ListPlansConfig$inboundSchema = z35.pipe(
|
|
6055
|
+
z35.object({
|
|
6056
|
+
ignore_past_due: z35._default(boolean2(), false)
|
|
6057
|
+
}),
|
|
6058
|
+
z35.transform((v) => {
|
|
6059
|
+
return remap(v, {
|
|
6060
|
+
"ignore_past_due": "ignorePastDue"
|
|
6061
|
+
});
|
|
6062
|
+
})
|
|
6063
|
+
);
|
|
6010
6064
|
var ListPlansStatus$inboundSchema = inboundSchema(ListPlansStatus);
|
|
6011
6065
|
var ListPlansAttachAction$inboundSchema = inboundSchema(ListPlansAttachAction);
|
|
6012
6066
|
var ListPlansCustomerEligibility$inboundSchema = z35.pipe(
|
|
@@ -6040,6 +6094,7 @@ var ListPlansList$inboundSchema = z35.pipe(
|
|
|
6040
6094
|
env: ListPlansEnv$inboundSchema,
|
|
6041
6095
|
archived: boolean2(),
|
|
6042
6096
|
base_variant_id: nullable(string4()),
|
|
6097
|
+
config: z35.lazy(() => ListPlansConfig$inboundSchema),
|
|
6043
6098
|
customer_eligibility: optional2(
|
|
6044
6099
|
z35.lazy(() => ListPlansCustomerEligibility$inboundSchema)
|
|
6045
6100
|
)
|
|
@@ -9734,6 +9789,16 @@ var UpdatePlanFreeTrialParams$outboundSchema = z48.pipe(
|
|
|
9734
9789
|
});
|
|
9735
9790
|
})
|
|
9736
9791
|
);
|
|
9792
|
+
var UpdatePlanConfigRequest$outboundSchema = z48.pipe(
|
|
9793
|
+
z48.object({
|
|
9794
|
+
ignorePastDue: z48._default(z48.boolean(), false)
|
|
9795
|
+
}),
|
|
9796
|
+
z48.transform((v) => {
|
|
9797
|
+
return remap(v, {
|
|
9798
|
+
ignorePastDue: "ignore_past_due"
|
|
9799
|
+
});
|
|
9800
|
+
})
|
|
9801
|
+
);
|
|
9737
9802
|
var UpdatePlanParams$outboundSchema = z48.pipe(
|
|
9738
9803
|
z48.object({
|
|
9739
9804
|
planId: z48.string(),
|
|
@@ -9749,6 +9814,7 @@ var UpdatePlanParams$outboundSchema = z48.pipe(
|
|
|
9749
9814
|
freeTrial: z48.optional(
|
|
9750
9815
|
z48.nullable(z48.lazy(() => UpdatePlanFreeTrialParams$outboundSchema))
|
|
9751
9816
|
),
|
|
9817
|
+
config: z48.optional(z48.lazy(() => UpdatePlanConfigRequest$outboundSchema)),
|
|
9752
9818
|
version: z48.optional(z48.number()),
|
|
9753
9819
|
archived: z48._default(z48.boolean(), false),
|
|
9754
9820
|
newPlanId: z48.optional(z48.string())
|
|
@@ -9926,6 +9992,16 @@ var UpdatePlanFreeTrial$inboundSchema = z48.pipe(
|
|
|
9926
9992
|
})
|
|
9927
9993
|
);
|
|
9928
9994
|
var UpdatePlanEnv$inboundSchema = inboundSchema(UpdatePlanEnv);
|
|
9995
|
+
var UpdatePlanConfigResponse$inboundSchema = z48.pipe(
|
|
9996
|
+
z48.object({
|
|
9997
|
+
ignore_past_due: z48._default(boolean2(), false)
|
|
9998
|
+
}),
|
|
9999
|
+
z48.transform((v) => {
|
|
10000
|
+
return remap(v, {
|
|
10001
|
+
"ignore_past_due": "ignorePastDue"
|
|
10002
|
+
});
|
|
10003
|
+
})
|
|
10004
|
+
);
|
|
9929
10005
|
var UpdatePlanStatus$inboundSchema = inboundSchema(UpdatePlanStatus);
|
|
9930
10006
|
var UpdatePlanAttachAction$inboundSchema = inboundSchema(UpdatePlanAttachAction);
|
|
9931
10007
|
var UpdatePlanCustomerEligibility$inboundSchema = z48.pipe(
|
|
@@ -9959,6 +10035,7 @@ var UpdatePlanResponse$inboundSchema = z48.pipe(
|
|
|
9959
10035
|
env: UpdatePlanEnv$inboundSchema,
|
|
9960
10036
|
archived: boolean2(),
|
|
9961
10037
|
base_variant_id: nullable(string4()),
|
|
10038
|
+
config: z48.lazy(() => UpdatePlanConfigResponse$inboundSchema),
|
|
9962
10039
|
customer_eligibility: optional2(
|
|
9963
10040
|
z48.lazy(() => UpdatePlanCustomerEligibility$inboundSchema)
|
|
9964
10041
|
)
|
|
@@ -10217,10 +10294,14 @@ var FailOpenHook = class {
|
|
|
10217
10294
|
fetcher: async (input, init) => {
|
|
10218
10295
|
try {
|
|
10219
10296
|
return init == null ? await fetch(input) : await fetch(input, init);
|
|
10220
|
-
} catch {
|
|
10297
|
+
} catch (error) {
|
|
10298
|
+
console.log(error);
|
|
10299
|
+
console.log(
|
|
10300
|
+
`Network failed to reach Autumn: ${error}. Returning 555 Network Error.`
|
|
10301
|
+
);
|
|
10221
10302
|
return new Response(null, {
|
|
10222
|
-
status:
|
|
10223
|
-
statusText: "
|
|
10303
|
+
status: 555,
|
|
10304
|
+
statusText: "Network Error"
|
|
10224
10305
|
});
|
|
10225
10306
|
}
|
|
10226
10307
|
}
|
|
@@ -13982,6 +14063,7 @@ var Plans = class extends ClientSDK {
|
|
|
13982
14063
|
* @param price - Base recurring price for the plan. Omit for free or usage-only plans. (optional)
|
|
13983
14064
|
* @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
|
|
13984
14065
|
* @param freeTrial - Free trial configuration. Customers can try this plan before being charged. (optional)
|
|
14066
|
+
* @param config - Miscellaneous plan-level configuration flags. (optional)
|
|
13985
14067
|
*
|
|
13986
14068
|
* @returns The created plan object.
|
|
13987
14069
|
*/
|
|
@@ -14087,6 +14169,7 @@ var Plans = class extends ClientSDK {
|
|
|
14087
14169
|
* @param price - The price of the plan. Set to null to remove the base price. (optional)
|
|
14088
14170
|
* @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
|
|
14089
14171
|
* @param freeTrial - The free trial of the plan. Set to null to remove the free trial. (optional)
|
|
14172
|
+
* @param config - Miscellaneous plan-level configuration flags. (optional)
|
|
14090
14173
|
* @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)
|
|
14091
14174
|
*
|
|
14092
14175
|
* @returns The updated plan object.
|
|
@@ -14972,6 +15055,9 @@ var listPlansItemDisplaySchema = import_v46.z.object({
|
|
|
14972
15055
|
primaryText: import_v46.z.string(),
|
|
14973
15056
|
secondaryText: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional()
|
|
14974
15057
|
});
|
|
15058
|
+
var listPlansConfigSchema = import_v46.z.object({
|
|
15059
|
+
ignorePastDue: import_v46.z.boolean()
|
|
15060
|
+
});
|
|
14975
15061
|
var listPlansParamsOutboundSchema = import_v46.z.object({
|
|
14976
15062
|
customer_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
|
|
14977
15063
|
entity_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
|
|
@@ -15060,6 +15146,7 @@ var listPlansListSchema = import_v46.z.object({
|
|
|
15060
15146
|
env: listPlansEnvSchema,
|
|
15061
15147
|
archived: import_v46.z.boolean(),
|
|
15062
15148
|
baseVariantId: import_v46.z.string().nullable(),
|
|
15149
|
+
config: listPlansConfigSchema,
|
|
15063
15150
|
customerEligibility: import_v46.z.union([listPlansCustomerEligibilitySchema, import_v46.z.undefined()]).optional()
|
|
15064
15151
|
});
|
|
15065
15152
|
var listPlansResponseSchema = import_v46.z.object({
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autumnHandler
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-OUDB34Y7.mjs";
|
|
4
4
|
import "../chunk-WYDGEDEU.mjs";
|
|
5
5
|
import "../chunk-VXND2UDT.mjs";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-EJGHP7KT.mjs";
|
|
7
|
+
import "../chunk-YSQQKZBU.mjs";
|
|
8
8
|
import "../chunk-TSF4YCUO.mjs";
|
|
9
9
|
import "../chunk-UAR3TMWI.mjs";
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-T42RZEUZ.mjs";
|
|
11
|
+
import "../chunk-MANTLPDT.mjs";
|
|
12
12
|
import "../chunk-S5HPMJ4U.mjs";
|
|
13
13
|
import "../chunk-OTXV5FY7.mjs";
|
|
14
|
-
import "../chunk-Z6QP3YEA.mjs";
|
|
15
14
|
import "../chunk-VZIMT7AO.mjs";
|
|
15
|
+
import "../chunk-Z6QP3YEA.mjs";
|
|
16
16
|
import "../chunk-TBQ27LIK.mjs";
|
|
17
17
|
import "../chunk-J44WR3QZ.mjs";
|
|
18
18
|
import "../chunk-N7NFYY54.mjs";
|
|
@@ -539,6 +539,9 @@ var listPlansItemDisplaySchema = z6.object({
|
|
|
539
539
|
primaryText: z6.string(),
|
|
540
540
|
secondaryText: z6.union([z6.string(), z6.undefined()]).optional()
|
|
541
541
|
});
|
|
542
|
+
var listPlansConfigSchema = z6.object({
|
|
543
|
+
ignorePastDue: z6.boolean()
|
|
544
|
+
});
|
|
542
545
|
var listPlansParamsOutboundSchema = z6.object({
|
|
543
546
|
customer_id: z6.union([z6.string(), z6.undefined()]).optional(),
|
|
544
547
|
entity_id: z6.union([z6.string(), z6.undefined()]).optional(),
|
|
@@ -627,6 +630,7 @@ var listPlansListSchema = z6.object({
|
|
|
627
630
|
env: listPlansEnvSchema,
|
|
628
631
|
archived: z6.boolean(),
|
|
629
632
|
baseVariantId: z6.string().nullable(),
|
|
633
|
+
config: listPlansConfigSchema,
|
|
630
634
|
customerEligibility: z6.union([listPlansCustomerEligibilitySchema, z6.undefined()]).optional()
|
|
631
635
|
});
|
|
632
636
|
var listPlansResponseSchema = z6.object({
|
|
@@ -2996,6 +2996,16 @@ var FreeTrial$inboundSchema = z16.pipe(
|
|
|
2996
2996
|
})
|
|
2997
2997
|
);
|
|
2998
2998
|
var PlanEnv$inboundSchema = inboundSchema(PlanEnv);
|
|
2999
|
+
var PlanConfig$inboundSchema = z16.pipe(
|
|
3000
|
+
z16.object({
|
|
3001
|
+
ignore_past_due: z16._default(boolean2(), false)
|
|
3002
|
+
}),
|
|
3003
|
+
z16.transform((v) => {
|
|
3004
|
+
return remap(v, {
|
|
3005
|
+
"ignore_past_due": "ignorePastDue"
|
|
3006
|
+
});
|
|
3007
|
+
})
|
|
3008
|
+
);
|
|
2999
3009
|
var PlanStatus$inboundSchema = inboundSchema(PlanStatus);
|
|
3000
3010
|
var AttachAction$inboundSchema = inboundSchema(AttachAction);
|
|
3001
3011
|
var CustomerEligibility$inboundSchema = z16.pipe(
|
|
@@ -3029,6 +3039,7 @@ var Plan$inboundSchema = z16.pipe(
|
|
|
3029
3039
|
env: PlanEnv$inboundSchema,
|
|
3030
3040
|
archived: boolean2(),
|
|
3031
3041
|
base_variant_id: nullable(string4()),
|
|
3042
|
+
config: z16.lazy(() => PlanConfig$inboundSchema),
|
|
3032
3043
|
customer_eligibility: optional2(z16.lazy(
|
|
3033
3044
|
() => CustomerEligibility$inboundSchema
|
|
3034
3045
|
))
|
|
@@ -3709,6 +3720,16 @@ var FreeTrialRequest$outboundSchema = z19.pipe(
|
|
|
3709
3720
|
});
|
|
3710
3721
|
})
|
|
3711
3722
|
);
|
|
3723
|
+
var CreatePlanConfigRequest$outboundSchema = z19.pipe(
|
|
3724
|
+
z19.object({
|
|
3725
|
+
ignorePastDue: z19._default(z19.boolean(), false)
|
|
3726
|
+
}),
|
|
3727
|
+
z19.transform((v) => {
|
|
3728
|
+
return remap(v, {
|
|
3729
|
+
ignorePastDue: "ignore_past_due"
|
|
3730
|
+
});
|
|
3731
|
+
})
|
|
3732
|
+
);
|
|
3712
3733
|
var CreatePlanParams$outboundSchema = z19.pipe(
|
|
3713
3734
|
z19.object({
|
|
3714
3735
|
planId: z19.string(),
|
|
@@ -3719,7 +3740,8 @@ var CreatePlanParams$outboundSchema = z19.pipe(
|
|
|
3719
3740
|
autoEnable: z19._default(z19.boolean(), false),
|
|
3720
3741
|
price: z19.optional(z19.lazy(() => CreatePlanPriceRequest$outboundSchema)),
|
|
3721
3742
|
items: z19.optional(z19.array(z19.lazy(() => CreatePlanPlanItem$outboundSchema))),
|
|
3722
|
-
freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema))
|
|
3743
|
+
freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema)),
|
|
3744
|
+
config: z19.optional(z19.lazy(() => CreatePlanConfigRequest$outboundSchema))
|
|
3723
3745
|
}),
|
|
3724
3746
|
z19.transform((v) => {
|
|
3725
3747
|
return remap(v, {
|
|
@@ -3893,6 +3915,16 @@ var CreatePlanFreeTrialResponse$inboundSchema = z19.pipe(
|
|
|
3893
3915
|
})
|
|
3894
3916
|
);
|
|
3895
3917
|
var CreatePlanEnv$inboundSchema = inboundSchema(CreatePlanEnv);
|
|
3918
|
+
var CreatePlanConfigResponse$inboundSchema = z19.pipe(
|
|
3919
|
+
z19.object({
|
|
3920
|
+
ignore_past_due: z19._default(boolean2(), false)
|
|
3921
|
+
}),
|
|
3922
|
+
z19.transform((v) => {
|
|
3923
|
+
return remap(v, {
|
|
3924
|
+
"ignore_past_due": "ignorePastDue"
|
|
3925
|
+
});
|
|
3926
|
+
})
|
|
3927
|
+
);
|
|
3896
3928
|
var CreatePlanStatus$inboundSchema = inboundSchema(CreatePlanStatus);
|
|
3897
3929
|
var CreatePlanAttachAction$inboundSchema = inboundSchema(CreatePlanAttachAction);
|
|
3898
3930
|
var CreatePlanCustomerEligibility$inboundSchema = z19.pipe(
|
|
@@ -3928,6 +3960,7 @@ var CreatePlanResponse$inboundSchema = z19.pipe(
|
|
|
3928
3960
|
env: CreatePlanEnv$inboundSchema,
|
|
3929
3961
|
archived: boolean2(),
|
|
3930
3962
|
base_variant_id: nullable(string4()),
|
|
3963
|
+
config: z19.lazy(() => CreatePlanConfigResponse$inboundSchema),
|
|
3931
3964
|
customer_eligibility: optional2(
|
|
3932
3965
|
z19.lazy(() => CreatePlanCustomerEligibility$inboundSchema)
|
|
3933
3966
|
)
|
|
@@ -5180,6 +5213,16 @@ var GetPlanFreeTrial$inboundSchema = z31.pipe(
|
|
|
5180
5213
|
})
|
|
5181
5214
|
);
|
|
5182
5215
|
var GetPlanEnv$inboundSchema = inboundSchema(GetPlanEnv);
|
|
5216
|
+
var GetPlanConfig$inboundSchema = z31.pipe(
|
|
5217
|
+
z31.object({
|
|
5218
|
+
ignore_past_due: z31._default(boolean2(), false)
|
|
5219
|
+
}),
|
|
5220
|
+
z31.transform((v) => {
|
|
5221
|
+
return remap(v, {
|
|
5222
|
+
"ignore_past_due": "ignorePastDue"
|
|
5223
|
+
});
|
|
5224
|
+
})
|
|
5225
|
+
);
|
|
5183
5226
|
var GetPlanStatus$inboundSchema = inboundSchema(GetPlanStatus);
|
|
5184
5227
|
var GetPlanAttachAction$inboundSchema = inboundSchema(GetPlanAttachAction);
|
|
5185
5228
|
var GetPlanCustomerEligibility$inboundSchema = z31.pipe(
|
|
@@ -5213,6 +5256,7 @@ var GetPlanResponse$inboundSchema = z31.pipe(
|
|
|
5213
5256
|
env: GetPlanEnv$inboundSchema,
|
|
5214
5257
|
archived: boolean2(),
|
|
5215
5258
|
base_variant_id: nullable(string4()),
|
|
5259
|
+
config: z31.lazy(() => GetPlanConfig$inboundSchema),
|
|
5216
5260
|
customer_eligibility: optional2(
|
|
5217
5261
|
z31.lazy(() => GetPlanCustomerEligibility$inboundSchema)
|
|
5218
5262
|
)
|
|
@@ -5923,6 +5967,16 @@ var ListPlansFreeTrial$inboundSchema = z35.pipe(
|
|
|
5923
5967
|
})
|
|
5924
5968
|
);
|
|
5925
5969
|
var ListPlansEnv$inboundSchema = inboundSchema(ListPlansEnv);
|
|
5970
|
+
var ListPlansConfig$inboundSchema = z35.pipe(
|
|
5971
|
+
z35.object({
|
|
5972
|
+
ignore_past_due: z35._default(boolean2(), false)
|
|
5973
|
+
}),
|
|
5974
|
+
z35.transform((v) => {
|
|
5975
|
+
return remap(v, {
|
|
5976
|
+
"ignore_past_due": "ignorePastDue"
|
|
5977
|
+
});
|
|
5978
|
+
})
|
|
5979
|
+
);
|
|
5926
5980
|
var ListPlansStatus$inboundSchema = inboundSchema(ListPlansStatus);
|
|
5927
5981
|
var ListPlansAttachAction$inboundSchema = inboundSchema(ListPlansAttachAction);
|
|
5928
5982
|
var ListPlansCustomerEligibility$inboundSchema = z35.pipe(
|
|
@@ -5956,6 +6010,7 @@ var ListPlansList$inboundSchema = z35.pipe(
|
|
|
5956
6010
|
env: ListPlansEnv$inboundSchema,
|
|
5957
6011
|
archived: boolean2(),
|
|
5958
6012
|
base_variant_id: nullable(string4()),
|
|
6013
|
+
config: z35.lazy(() => ListPlansConfig$inboundSchema),
|
|
5959
6014
|
customer_eligibility: optional2(
|
|
5960
6015
|
z35.lazy(() => ListPlansCustomerEligibility$inboundSchema)
|
|
5961
6016
|
)
|
|
@@ -9650,6 +9705,16 @@ var UpdatePlanFreeTrialParams$outboundSchema = z48.pipe(
|
|
|
9650
9705
|
});
|
|
9651
9706
|
})
|
|
9652
9707
|
);
|
|
9708
|
+
var UpdatePlanConfigRequest$outboundSchema = z48.pipe(
|
|
9709
|
+
z48.object({
|
|
9710
|
+
ignorePastDue: z48._default(z48.boolean(), false)
|
|
9711
|
+
}),
|
|
9712
|
+
z48.transform((v) => {
|
|
9713
|
+
return remap(v, {
|
|
9714
|
+
ignorePastDue: "ignore_past_due"
|
|
9715
|
+
});
|
|
9716
|
+
})
|
|
9717
|
+
);
|
|
9653
9718
|
var UpdatePlanParams$outboundSchema = z48.pipe(
|
|
9654
9719
|
z48.object({
|
|
9655
9720
|
planId: z48.string(),
|
|
@@ -9665,6 +9730,7 @@ var UpdatePlanParams$outboundSchema = z48.pipe(
|
|
|
9665
9730
|
freeTrial: z48.optional(
|
|
9666
9731
|
z48.nullable(z48.lazy(() => UpdatePlanFreeTrialParams$outboundSchema))
|
|
9667
9732
|
),
|
|
9733
|
+
config: z48.optional(z48.lazy(() => UpdatePlanConfigRequest$outboundSchema)),
|
|
9668
9734
|
version: z48.optional(z48.number()),
|
|
9669
9735
|
archived: z48._default(z48.boolean(), false),
|
|
9670
9736
|
newPlanId: z48.optional(z48.string())
|
|
@@ -9842,6 +9908,16 @@ var UpdatePlanFreeTrial$inboundSchema = z48.pipe(
|
|
|
9842
9908
|
})
|
|
9843
9909
|
);
|
|
9844
9910
|
var UpdatePlanEnv$inboundSchema = inboundSchema(UpdatePlanEnv);
|
|
9911
|
+
var UpdatePlanConfigResponse$inboundSchema = z48.pipe(
|
|
9912
|
+
z48.object({
|
|
9913
|
+
ignore_past_due: z48._default(boolean2(), false)
|
|
9914
|
+
}),
|
|
9915
|
+
z48.transform((v) => {
|
|
9916
|
+
return remap(v, {
|
|
9917
|
+
"ignore_past_due": "ignorePastDue"
|
|
9918
|
+
});
|
|
9919
|
+
})
|
|
9920
|
+
);
|
|
9845
9921
|
var UpdatePlanStatus$inboundSchema = inboundSchema(UpdatePlanStatus);
|
|
9846
9922
|
var UpdatePlanAttachAction$inboundSchema = inboundSchema(UpdatePlanAttachAction);
|
|
9847
9923
|
var UpdatePlanCustomerEligibility$inboundSchema = z48.pipe(
|
|
@@ -9875,6 +9951,7 @@ var UpdatePlanResponse$inboundSchema = z48.pipe(
|
|
|
9875
9951
|
env: UpdatePlanEnv$inboundSchema,
|
|
9876
9952
|
archived: boolean2(),
|
|
9877
9953
|
base_variant_id: nullable(string4()),
|
|
9954
|
+
config: z48.lazy(() => UpdatePlanConfigResponse$inboundSchema),
|
|
9878
9955
|
customer_eligibility: optional2(
|
|
9879
9956
|
z48.lazy(() => UpdatePlanCustomerEligibility$inboundSchema)
|
|
9880
9957
|
)
|
|
@@ -10133,10 +10210,14 @@ var FailOpenHook = class {
|
|
|
10133
10210
|
fetcher: async (input, init) => {
|
|
10134
10211
|
try {
|
|
10135
10212
|
return init == null ? await fetch(input) : await fetch(input, init);
|
|
10136
|
-
} catch {
|
|
10213
|
+
} catch (error) {
|
|
10214
|
+
console.log(error);
|
|
10215
|
+
console.log(
|
|
10216
|
+
`Network failed to reach Autumn: ${error}. Returning 555 Network Error.`
|
|
10217
|
+
);
|
|
10137
10218
|
return new Response(null, {
|
|
10138
|
-
status:
|
|
10139
|
-
statusText: "
|
|
10219
|
+
status: 555,
|
|
10220
|
+
statusText: "Network Error"
|
|
10140
10221
|
});
|
|
10141
10222
|
}
|
|
10142
10223
|
}
|
|
@@ -13926,6 +14007,7 @@ var Plans = class extends ClientSDK {
|
|
|
13926
14007
|
* @param price - Base recurring price for the plan. Omit for free or usage-only plans. (optional)
|
|
13927
14008
|
* @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
|
|
13928
14009
|
* @param freeTrial - Free trial configuration. Customers can try this plan before being charged. (optional)
|
|
14010
|
+
* @param config - Miscellaneous plan-level configuration flags. (optional)
|
|
13929
14011
|
*
|
|
13930
14012
|
* @returns The created plan object.
|
|
13931
14013
|
*/
|
|
@@ -14031,6 +14113,7 @@ var Plans = class extends ClientSDK {
|
|
|
14031
14113
|
* @param price - The price of the plan. Set to null to remove the base price. (optional)
|
|
14032
14114
|
* @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
|
|
14033
14115
|
* @param freeTrial - The free trial of the plan. Set to null to remove the free trial. (optional)
|
|
14116
|
+
* @param config - Miscellaneous plan-level configuration flags. (optional)
|
|
14034
14117
|
* @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)
|
|
14035
14118
|
*
|
|
14036
14119
|
* @returns The updated plan object.
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-UAR3TMWI.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Autumn
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-T42RZEUZ.mjs";
|
|
7
7
|
import {
|
|
8
8
|
routeConfigs
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MANTLPDT.mjs";
|
|
10
10
|
import {
|
|
11
11
|
executeRoute
|
|
12
12
|
} from "./chunk-S5HPMJ4U.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CoreHandlerOptions, UnifiedRequest, UnifiedResponse } from '../types/handlerTypes.mjs';
|
|
2
2
|
import '../../authTypes-CyV4xBTB.mjs';
|
|
3
|
-
import '../../routeTypes-
|
|
3
|
+
import '../../routeTypes-DVwngaBn.mjs';
|
|
4
4
|
import 'zod/v4';
|
|
5
5
|
import '../types/responseTypes.mjs';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CoreHandlerOptions, UnifiedRequest, UnifiedResponse } from '../types/handlerTypes.js';
|
|
2
2
|
import '../../authTypes-CyV4xBTB.js';
|
|
3
|
-
import '../../routeTypes-
|
|
3
|
+
import '../../routeTypes-B94_Mq2J.js';
|
|
4
4
|
import 'zod/v4';
|
|
5
5
|
import '../types/responseTypes.js';
|
|
6
6
|
|