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
|
@@ -3079,6 +3079,16 @@ var FreeTrial$inboundSchema = z16.pipe(
|
|
|
3079
3079
|
})
|
|
3080
3080
|
);
|
|
3081
3081
|
var PlanEnv$inboundSchema = inboundSchema(PlanEnv);
|
|
3082
|
+
var PlanConfig$inboundSchema = z16.pipe(
|
|
3083
|
+
z16.object({
|
|
3084
|
+
ignore_past_due: z16._default(boolean2(), false)
|
|
3085
|
+
}),
|
|
3086
|
+
z16.transform((v) => {
|
|
3087
|
+
return remap(v, {
|
|
3088
|
+
"ignore_past_due": "ignorePastDue"
|
|
3089
|
+
});
|
|
3090
|
+
})
|
|
3091
|
+
);
|
|
3082
3092
|
var PlanStatus$inboundSchema = inboundSchema(PlanStatus);
|
|
3083
3093
|
var AttachAction$inboundSchema = inboundSchema(AttachAction);
|
|
3084
3094
|
var CustomerEligibility$inboundSchema = z16.pipe(
|
|
@@ -3112,6 +3122,7 @@ var Plan$inboundSchema = z16.pipe(
|
|
|
3112
3122
|
env: PlanEnv$inboundSchema,
|
|
3113
3123
|
archived: boolean2(),
|
|
3114
3124
|
base_variant_id: nullable(string4()),
|
|
3125
|
+
config: z16.lazy(() => PlanConfig$inboundSchema),
|
|
3115
3126
|
customer_eligibility: optional2(z16.lazy(
|
|
3116
3127
|
() => CustomerEligibility$inboundSchema
|
|
3117
3128
|
))
|
|
@@ -3792,6 +3803,16 @@ var FreeTrialRequest$outboundSchema = z19.pipe(
|
|
|
3792
3803
|
});
|
|
3793
3804
|
})
|
|
3794
3805
|
);
|
|
3806
|
+
var CreatePlanConfigRequest$outboundSchema = z19.pipe(
|
|
3807
|
+
z19.object({
|
|
3808
|
+
ignorePastDue: z19._default(z19.boolean(), false)
|
|
3809
|
+
}),
|
|
3810
|
+
z19.transform((v) => {
|
|
3811
|
+
return remap(v, {
|
|
3812
|
+
ignorePastDue: "ignore_past_due"
|
|
3813
|
+
});
|
|
3814
|
+
})
|
|
3815
|
+
);
|
|
3795
3816
|
var CreatePlanParams$outboundSchema = z19.pipe(
|
|
3796
3817
|
z19.object({
|
|
3797
3818
|
planId: z19.string(),
|
|
@@ -3802,7 +3823,8 @@ var CreatePlanParams$outboundSchema = z19.pipe(
|
|
|
3802
3823
|
autoEnable: z19._default(z19.boolean(), false),
|
|
3803
3824
|
price: z19.optional(z19.lazy(() => CreatePlanPriceRequest$outboundSchema)),
|
|
3804
3825
|
items: z19.optional(z19.array(z19.lazy(() => CreatePlanPlanItem$outboundSchema))),
|
|
3805
|
-
freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema))
|
|
3826
|
+
freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema)),
|
|
3827
|
+
config: z19.optional(z19.lazy(() => CreatePlanConfigRequest$outboundSchema))
|
|
3806
3828
|
}),
|
|
3807
3829
|
z19.transform((v) => {
|
|
3808
3830
|
return remap(v, {
|
|
@@ -3976,6 +3998,16 @@ var CreatePlanFreeTrialResponse$inboundSchema = z19.pipe(
|
|
|
3976
3998
|
})
|
|
3977
3999
|
);
|
|
3978
4000
|
var CreatePlanEnv$inboundSchema = inboundSchema(CreatePlanEnv);
|
|
4001
|
+
var CreatePlanConfigResponse$inboundSchema = z19.pipe(
|
|
4002
|
+
z19.object({
|
|
4003
|
+
ignore_past_due: z19._default(boolean2(), false)
|
|
4004
|
+
}),
|
|
4005
|
+
z19.transform((v) => {
|
|
4006
|
+
return remap(v, {
|
|
4007
|
+
"ignore_past_due": "ignorePastDue"
|
|
4008
|
+
});
|
|
4009
|
+
})
|
|
4010
|
+
);
|
|
3979
4011
|
var CreatePlanStatus$inboundSchema = inboundSchema(CreatePlanStatus);
|
|
3980
4012
|
var CreatePlanAttachAction$inboundSchema = inboundSchema(CreatePlanAttachAction);
|
|
3981
4013
|
var CreatePlanCustomerEligibility$inboundSchema = z19.pipe(
|
|
@@ -4011,6 +4043,7 @@ var CreatePlanResponse$inboundSchema = z19.pipe(
|
|
|
4011
4043
|
env: CreatePlanEnv$inboundSchema,
|
|
4012
4044
|
archived: boolean2(),
|
|
4013
4045
|
base_variant_id: nullable(string4()),
|
|
4046
|
+
config: z19.lazy(() => CreatePlanConfigResponse$inboundSchema),
|
|
4014
4047
|
customer_eligibility: optional2(
|
|
4015
4048
|
z19.lazy(() => CreatePlanCustomerEligibility$inboundSchema)
|
|
4016
4049
|
)
|
|
@@ -5263,6 +5296,16 @@ var GetPlanFreeTrial$inboundSchema = z31.pipe(
|
|
|
5263
5296
|
})
|
|
5264
5297
|
);
|
|
5265
5298
|
var GetPlanEnv$inboundSchema = inboundSchema(GetPlanEnv);
|
|
5299
|
+
var GetPlanConfig$inboundSchema = z31.pipe(
|
|
5300
|
+
z31.object({
|
|
5301
|
+
ignore_past_due: z31._default(boolean2(), false)
|
|
5302
|
+
}),
|
|
5303
|
+
z31.transform((v) => {
|
|
5304
|
+
return remap(v, {
|
|
5305
|
+
"ignore_past_due": "ignorePastDue"
|
|
5306
|
+
});
|
|
5307
|
+
})
|
|
5308
|
+
);
|
|
5266
5309
|
var GetPlanStatus$inboundSchema = inboundSchema(GetPlanStatus);
|
|
5267
5310
|
var GetPlanAttachAction$inboundSchema = inboundSchema(GetPlanAttachAction);
|
|
5268
5311
|
var GetPlanCustomerEligibility$inboundSchema = z31.pipe(
|
|
@@ -5296,6 +5339,7 @@ var GetPlanResponse$inboundSchema = z31.pipe(
|
|
|
5296
5339
|
env: GetPlanEnv$inboundSchema,
|
|
5297
5340
|
archived: boolean2(),
|
|
5298
5341
|
base_variant_id: nullable(string4()),
|
|
5342
|
+
config: z31.lazy(() => GetPlanConfig$inboundSchema),
|
|
5299
5343
|
customer_eligibility: optional2(
|
|
5300
5344
|
z31.lazy(() => GetPlanCustomerEligibility$inboundSchema)
|
|
5301
5345
|
)
|
|
@@ -6006,6 +6050,16 @@ var ListPlansFreeTrial$inboundSchema = z35.pipe(
|
|
|
6006
6050
|
})
|
|
6007
6051
|
);
|
|
6008
6052
|
var ListPlansEnv$inboundSchema = inboundSchema(ListPlansEnv);
|
|
6053
|
+
var ListPlansConfig$inboundSchema = z35.pipe(
|
|
6054
|
+
z35.object({
|
|
6055
|
+
ignore_past_due: z35._default(boolean2(), false)
|
|
6056
|
+
}),
|
|
6057
|
+
z35.transform((v) => {
|
|
6058
|
+
return remap(v, {
|
|
6059
|
+
"ignore_past_due": "ignorePastDue"
|
|
6060
|
+
});
|
|
6061
|
+
})
|
|
6062
|
+
);
|
|
6009
6063
|
var ListPlansStatus$inboundSchema = inboundSchema(ListPlansStatus);
|
|
6010
6064
|
var ListPlansAttachAction$inboundSchema = inboundSchema(ListPlansAttachAction);
|
|
6011
6065
|
var ListPlansCustomerEligibility$inboundSchema = z35.pipe(
|
|
@@ -6039,6 +6093,7 @@ var ListPlansList$inboundSchema = z35.pipe(
|
|
|
6039
6093
|
env: ListPlansEnv$inboundSchema,
|
|
6040
6094
|
archived: boolean2(),
|
|
6041
6095
|
base_variant_id: nullable(string4()),
|
|
6096
|
+
config: z35.lazy(() => ListPlansConfig$inboundSchema),
|
|
6042
6097
|
customer_eligibility: optional2(
|
|
6043
6098
|
z35.lazy(() => ListPlansCustomerEligibility$inboundSchema)
|
|
6044
6099
|
)
|
|
@@ -9733,6 +9788,16 @@ var UpdatePlanFreeTrialParams$outboundSchema = z48.pipe(
|
|
|
9733
9788
|
});
|
|
9734
9789
|
})
|
|
9735
9790
|
);
|
|
9791
|
+
var UpdatePlanConfigRequest$outboundSchema = z48.pipe(
|
|
9792
|
+
z48.object({
|
|
9793
|
+
ignorePastDue: z48._default(z48.boolean(), false)
|
|
9794
|
+
}),
|
|
9795
|
+
z48.transform((v) => {
|
|
9796
|
+
return remap(v, {
|
|
9797
|
+
ignorePastDue: "ignore_past_due"
|
|
9798
|
+
});
|
|
9799
|
+
})
|
|
9800
|
+
);
|
|
9736
9801
|
var UpdatePlanParams$outboundSchema = z48.pipe(
|
|
9737
9802
|
z48.object({
|
|
9738
9803
|
planId: z48.string(),
|
|
@@ -9748,6 +9813,7 @@ var UpdatePlanParams$outboundSchema = z48.pipe(
|
|
|
9748
9813
|
freeTrial: z48.optional(
|
|
9749
9814
|
z48.nullable(z48.lazy(() => UpdatePlanFreeTrialParams$outboundSchema))
|
|
9750
9815
|
),
|
|
9816
|
+
config: z48.optional(z48.lazy(() => UpdatePlanConfigRequest$outboundSchema)),
|
|
9751
9817
|
version: z48.optional(z48.number()),
|
|
9752
9818
|
archived: z48._default(z48.boolean(), false),
|
|
9753
9819
|
newPlanId: z48.optional(z48.string())
|
|
@@ -9925,6 +9991,16 @@ var UpdatePlanFreeTrial$inboundSchema = z48.pipe(
|
|
|
9925
9991
|
})
|
|
9926
9992
|
);
|
|
9927
9993
|
var UpdatePlanEnv$inboundSchema = inboundSchema(UpdatePlanEnv);
|
|
9994
|
+
var UpdatePlanConfigResponse$inboundSchema = z48.pipe(
|
|
9995
|
+
z48.object({
|
|
9996
|
+
ignore_past_due: z48._default(boolean2(), false)
|
|
9997
|
+
}),
|
|
9998
|
+
z48.transform((v) => {
|
|
9999
|
+
return remap(v, {
|
|
10000
|
+
"ignore_past_due": "ignorePastDue"
|
|
10001
|
+
});
|
|
10002
|
+
})
|
|
10003
|
+
);
|
|
9928
10004
|
var UpdatePlanStatus$inboundSchema = inboundSchema(UpdatePlanStatus);
|
|
9929
10005
|
var UpdatePlanAttachAction$inboundSchema = inboundSchema(UpdatePlanAttachAction);
|
|
9930
10006
|
var UpdatePlanCustomerEligibility$inboundSchema = z48.pipe(
|
|
@@ -9958,6 +10034,7 @@ var UpdatePlanResponse$inboundSchema = z48.pipe(
|
|
|
9958
10034
|
env: UpdatePlanEnv$inboundSchema,
|
|
9959
10035
|
archived: boolean2(),
|
|
9960
10036
|
base_variant_id: nullable(string4()),
|
|
10037
|
+
config: z48.lazy(() => UpdatePlanConfigResponse$inboundSchema),
|
|
9961
10038
|
customer_eligibility: optional2(
|
|
9962
10039
|
z48.lazy(() => UpdatePlanCustomerEligibility$inboundSchema)
|
|
9963
10040
|
)
|
|
@@ -10216,10 +10293,14 @@ var FailOpenHook = class {
|
|
|
10216
10293
|
fetcher: async (input, init) => {
|
|
10217
10294
|
try {
|
|
10218
10295
|
return init == null ? await fetch(input) : await fetch(input, init);
|
|
10219
|
-
} catch {
|
|
10296
|
+
} catch (error) {
|
|
10297
|
+
console.log(error);
|
|
10298
|
+
console.log(
|
|
10299
|
+
`Network failed to reach Autumn: ${error}. Returning 555 Network Error.`
|
|
10300
|
+
);
|
|
10220
10301
|
return new Response(null, {
|
|
10221
|
-
status:
|
|
10222
|
-
statusText: "
|
|
10302
|
+
status: 555,
|
|
10303
|
+
statusText: "Network Error"
|
|
10223
10304
|
});
|
|
10224
10305
|
}
|
|
10225
10306
|
}
|
|
@@ -13981,6 +14062,7 @@ var Plans = class extends ClientSDK {
|
|
|
13981
14062
|
* @param price - Base recurring price for the plan. Omit for free or usage-only plans. (optional)
|
|
13982
14063
|
* @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
|
|
13983
14064
|
* @param freeTrial - Free trial configuration. Customers can try this plan before being charged. (optional)
|
|
14065
|
+
* @param config - Miscellaneous plan-level configuration flags. (optional)
|
|
13984
14066
|
*
|
|
13985
14067
|
* @returns The created plan object.
|
|
13986
14068
|
*/
|
|
@@ -14086,6 +14168,7 @@ var Plans = class extends ClientSDK {
|
|
|
14086
14168
|
* @param price - The price of the plan. Set to null to remove the base price. (optional)
|
|
14087
14169
|
* @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
|
|
14088
14170
|
* @param freeTrial - The free trial of the plan. Set to null to remove the free trial. (optional)
|
|
14171
|
+
* @param config - Miscellaneous plan-level configuration flags. (optional)
|
|
14089
14172
|
* @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)
|
|
14090
14173
|
*
|
|
14091
14174
|
* @returns The updated plan object.
|
|
@@ -14971,6 +15054,9 @@ var listPlansItemDisplaySchema = import_v46.z.object({
|
|
|
14971
15054
|
primaryText: import_v46.z.string(),
|
|
14972
15055
|
secondaryText: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional()
|
|
14973
15056
|
});
|
|
15057
|
+
var listPlansConfigSchema = import_v46.z.object({
|
|
15058
|
+
ignorePastDue: import_v46.z.boolean()
|
|
15059
|
+
});
|
|
14974
15060
|
var listPlansParamsOutboundSchema = import_v46.z.object({
|
|
14975
15061
|
customer_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
|
|
14976
15062
|
entity_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
|
|
@@ -15059,6 +15145,7 @@ var listPlansListSchema = import_v46.z.object({
|
|
|
15059
15145
|
env: listPlansEnvSchema,
|
|
15060
15146
|
archived: import_v46.z.boolean(),
|
|
15061
15147
|
baseVariantId: import_v46.z.string().nullable(),
|
|
15148
|
+
config: listPlansConfigSchema,
|
|
15062
15149
|
customerEligibility: import_v46.z.union([listPlansCustomerEligibilitySchema, import_v46.z.undefined()]).optional()
|
|
15063
15150
|
});
|
|
15064
15151
|
var listPlansResponseSchema = import_v46.z.object({
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autumnHandler
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-DNNJOZAT.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";
|
|
@@ -3082,6 +3082,16 @@ var FreeTrial$inboundSchema = z16.pipe(
|
|
|
3082
3082
|
})
|
|
3083
3083
|
);
|
|
3084
3084
|
var PlanEnv$inboundSchema = inboundSchema(PlanEnv);
|
|
3085
|
+
var PlanConfig$inboundSchema = z16.pipe(
|
|
3086
|
+
z16.object({
|
|
3087
|
+
ignore_past_due: z16._default(boolean2(), false)
|
|
3088
|
+
}),
|
|
3089
|
+
z16.transform((v) => {
|
|
3090
|
+
return remap(v, {
|
|
3091
|
+
"ignore_past_due": "ignorePastDue"
|
|
3092
|
+
});
|
|
3093
|
+
})
|
|
3094
|
+
);
|
|
3085
3095
|
var PlanStatus$inboundSchema = inboundSchema(PlanStatus);
|
|
3086
3096
|
var AttachAction$inboundSchema = inboundSchema(AttachAction);
|
|
3087
3097
|
var CustomerEligibility$inboundSchema = z16.pipe(
|
|
@@ -3115,6 +3125,7 @@ var Plan$inboundSchema = z16.pipe(
|
|
|
3115
3125
|
env: PlanEnv$inboundSchema,
|
|
3116
3126
|
archived: boolean2(),
|
|
3117
3127
|
base_variant_id: nullable(string4()),
|
|
3128
|
+
config: z16.lazy(() => PlanConfig$inboundSchema),
|
|
3118
3129
|
customer_eligibility: optional2(z16.lazy(
|
|
3119
3130
|
() => CustomerEligibility$inboundSchema
|
|
3120
3131
|
))
|
|
@@ -3795,6 +3806,16 @@ var FreeTrialRequest$outboundSchema = z19.pipe(
|
|
|
3795
3806
|
});
|
|
3796
3807
|
})
|
|
3797
3808
|
);
|
|
3809
|
+
var CreatePlanConfigRequest$outboundSchema = z19.pipe(
|
|
3810
|
+
z19.object({
|
|
3811
|
+
ignorePastDue: z19._default(z19.boolean(), false)
|
|
3812
|
+
}),
|
|
3813
|
+
z19.transform((v) => {
|
|
3814
|
+
return remap(v, {
|
|
3815
|
+
ignorePastDue: "ignore_past_due"
|
|
3816
|
+
});
|
|
3817
|
+
})
|
|
3818
|
+
);
|
|
3798
3819
|
var CreatePlanParams$outboundSchema = z19.pipe(
|
|
3799
3820
|
z19.object({
|
|
3800
3821
|
planId: z19.string(),
|
|
@@ -3805,7 +3826,8 @@ var CreatePlanParams$outboundSchema = z19.pipe(
|
|
|
3805
3826
|
autoEnable: z19._default(z19.boolean(), false),
|
|
3806
3827
|
price: z19.optional(z19.lazy(() => CreatePlanPriceRequest$outboundSchema)),
|
|
3807
3828
|
items: z19.optional(z19.array(z19.lazy(() => CreatePlanPlanItem$outboundSchema))),
|
|
3808
|
-
freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema))
|
|
3829
|
+
freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema)),
|
|
3830
|
+
config: z19.optional(z19.lazy(() => CreatePlanConfigRequest$outboundSchema))
|
|
3809
3831
|
}),
|
|
3810
3832
|
z19.transform((v) => {
|
|
3811
3833
|
return remap(v, {
|
|
@@ -3979,6 +4001,16 @@ var CreatePlanFreeTrialResponse$inboundSchema = z19.pipe(
|
|
|
3979
4001
|
})
|
|
3980
4002
|
);
|
|
3981
4003
|
var CreatePlanEnv$inboundSchema = inboundSchema(CreatePlanEnv);
|
|
4004
|
+
var CreatePlanConfigResponse$inboundSchema = z19.pipe(
|
|
4005
|
+
z19.object({
|
|
4006
|
+
ignore_past_due: z19._default(boolean2(), false)
|
|
4007
|
+
}),
|
|
4008
|
+
z19.transform((v) => {
|
|
4009
|
+
return remap(v, {
|
|
4010
|
+
"ignore_past_due": "ignorePastDue"
|
|
4011
|
+
});
|
|
4012
|
+
})
|
|
4013
|
+
);
|
|
3982
4014
|
var CreatePlanStatus$inboundSchema = inboundSchema(CreatePlanStatus);
|
|
3983
4015
|
var CreatePlanAttachAction$inboundSchema = inboundSchema(CreatePlanAttachAction);
|
|
3984
4016
|
var CreatePlanCustomerEligibility$inboundSchema = z19.pipe(
|
|
@@ -4014,6 +4046,7 @@ var CreatePlanResponse$inboundSchema = z19.pipe(
|
|
|
4014
4046
|
env: CreatePlanEnv$inboundSchema,
|
|
4015
4047
|
archived: boolean2(),
|
|
4016
4048
|
base_variant_id: nullable(string4()),
|
|
4049
|
+
config: z19.lazy(() => CreatePlanConfigResponse$inboundSchema),
|
|
4017
4050
|
customer_eligibility: optional2(
|
|
4018
4051
|
z19.lazy(() => CreatePlanCustomerEligibility$inboundSchema)
|
|
4019
4052
|
)
|
|
@@ -5266,6 +5299,16 @@ var GetPlanFreeTrial$inboundSchema = z31.pipe(
|
|
|
5266
5299
|
})
|
|
5267
5300
|
);
|
|
5268
5301
|
var GetPlanEnv$inboundSchema = inboundSchema(GetPlanEnv);
|
|
5302
|
+
var GetPlanConfig$inboundSchema = z31.pipe(
|
|
5303
|
+
z31.object({
|
|
5304
|
+
ignore_past_due: z31._default(boolean2(), false)
|
|
5305
|
+
}),
|
|
5306
|
+
z31.transform((v) => {
|
|
5307
|
+
return remap(v, {
|
|
5308
|
+
"ignore_past_due": "ignorePastDue"
|
|
5309
|
+
});
|
|
5310
|
+
})
|
|
5311
|
+
);
|
|
5269
5312
|
var GetPlanStatus$inboundSchema = inboundSchema(GetPlanStatus);
|
|
5270
5313
|
var GetPlanAttachAction$inboundSchema = inboundSchema(GetPlanAttachAction);
|
|
5271
5314
|
var GetPlanCustomerEligibility$inboundSchema = z31.pipe(
|
|
@@ -5299,6 +5342,7 @@ var GetPlanResponse$inboundSchema = z31.pipe(
|
|
|
5299
5342
|
env: GetPlanEnv$inboundSchema,
|
|
5300
5343
|
archived: boolean2(),
|
|
5301
5344
|
base_variant_id: nullable(string4()),
|
|
5345
|
+
config: z31.lazy(() => GetPlanConfig$inboundSchema),
|
|
5302
5346
|
customer_eligibility: optional2(
|
|
5303
5347
|
z31.lazy(() => GetPlanCustomerEligibility$inboundSchema)
|
|
5304
5348
|
)
|
|
@@ -6009,6 +6053,16 @@ var ListPlansFreeTrial$inboundSchema = z35.pipe(
|
|
|
6009
6053
|
})
|
|
6010
6054
|
);
|
|
6011
6055
|
var ListPlansEnv$inboundSchema = inboundSchema(ListPlansEnv);
|
|
6056
|
+
var ListPlansConfig$inboundSchema = z35.pipe(
|
|
6057
|
+
z35.object({
|
|
6058
|
+
ignore_past_due: z35._default(boolean2(), false)
|
|
6059
|
+
}),
|
|
6060
|
+
z35.transform((v) => {
|
|
6061
|
+
return remap(v, {
|
|
6062
|
+
"ignore_past_due": "ignorePastDue"
|
|
6063
|
+
});
|
|
6064
|
+
})
|
|
6065
|
+
);
|
|
6012
6066
|
var ListPlansStatus$inboundSchema = inboundSchema(ListPlansStatus);
|
|
6013
6067
|
var ListPlansAttachAction$inboundSchema = inboundSchema(ListPlansAttachAction);
|
|
6014
6068
|
var ListPlansCustomerEligibility$inboundSchema = z35.pipe(
|
|
@@ -6042,6 +6096,7 @@ var ListPlansList$inboundSchema = z35.pipe(
|
|
|
6042
6096
|
env: ListPlansEnv$inboundSchema,
|
|
6043
6097
|
archived: boolean2(),
|
|
6044
6098
|
base_variant_id: nullable(string4()),
|
|
6099
|
+
config: z35.lazy(() => ListPlansConfig$inboundSchema),
|
|
6045
6100
|
customer_eligibility: optional2(
|
|
6046
6101
|
z35.lazy(() => ListPlansCustomerEligibility$inboundSchema)
|
|
6047
6102
|
)
|
|
@@ -9736,6 +9791,16 @@ var UpdatePlanFreeTrialParams$outboundSchema = z48.pipe(
|
|
|
9736
9791
|
});
|
|
9737
9792
|
})
|
|
9738
9793
|
);
|
|
9794
|
+
var UpdatePlanConfigRequest$outboundSchema = z48.pipe(
|
|
9795
|
+
z48.object({
|
|
9796
|
+
ignorePastDue: z48._default(z48.boolean(), false)
|
|
9797
|
+
}),
|
|
9798
|
+
z48.transform((v) => {
|
|
9799
|
+
return remap(v, {
|
|
9800
|
+
ignorePastDue: "ignore_past_due"
|
|
9801
|
+
});
|
|
9802
|
+
})
|
|
9803
|
+
);
|
|
9739
9804
|
var UpdatePlanParams$outboundSchema = z48.pipe(
|
|
9740
9805
|
z48.object({
|
|
9741
9806
|
planId: z48.string(),
|
|
@@ -9751,6 +9816,7 @@ var UpdatePlanParams$outboundSchema = z48.pipe(
|
|
|
9751
9816
|
freeTrial: z48.optional(
|
|
9752
9817
|
z48.nullable(z48.lazy(() => UpdatePlanFreeTrialParams$outboundSchema))
|
|
9753
9818
|
),
|
|
9819
|
+
config: z48.optional(z48.lazy(() => UpdatePlanConfigRequest$outboundSchema)),
|
|
9754
9820
|
version: z48.optional(z48.number()),
|
|
9755
9821
|
archived: z48._default(z48.boolean(), false),
|
|
9756
9822
|
newPlanId: z48.optional(z48.string())
|
|
@@ -9928,6 +9994,16 @@ var UpdatePlanFreeTrial$inboundSchema = z48.pipe(
|
|
|
9928
9994
|
})
|
|
9929
9995
|
);
|
|
9930
9996
|
var UpdatePlanEnv$inboundSchema = inboundSchema(UpdatePlanEnv);
|
|
9997
|
+
var UpdatePlanConfigResponse$inboundSchema = z48.pipe(
|
|
9998
|
+
z48.object({
|
|
9999
|
+
ignore_past_due: z48._default(boolean2(), false)
|
|
10000
|
+
}),
|
|
10001
|
+
z48.transform((v) => {
|
|
10002
|
+
return remap(v, {
|
|
10003
|
+
"ignore_past_due": "ignorePastDue"
|
|
10004
|
+
});
|
|
10005
|
+
})
|
|
10006
|
+
);
|
|
9931
10007
|
var UpdatePlanStatus$inboundSchema = inboundSchema(UpdatePlanStatus);
|
|
9932
10008
|
var UpdatePlanAttachAction$inboundSchema = inboundSchema(UpdatePlanAttachAction);
|
|
9933
10009
|
var UpdatePlanCustomerEligibility$inboundSchema = z48.pipe(
|
|
@@ -9961,6 +10037,7 @@ var UpdatePlanResponse$inboundSchema = z48.pipe(
|
|
|
9961
10037
|
env: UpdatePlanEnv$inboundSchema,
|
|
9962
10038
|
archived: boolean2(),
|
|
9963
10039
|
base_variant_id: nullable(string4()),
|
|
10040
|
+
config: z48.lazy(() => UpdatePlanConfigResponse$inboundSchema),
|
|
9964
10041
|
customer_eligibility: optional2(
|
|
9965
10042
|
z48.lazy(() => UpdatePlanCustomerEligibility$inboundSchema)
|
|
9966
10043
|
)
|
|
@@ -10219,10 +10296,14 @@ var FailOpenHook = class {
|
|
|
10219
10296
|
fetcher: async (input, init) => {
|
|
10220
10297
|
try {
|
|
10221
10298
|
return init == null ? await fetch(input) : await fetch(input, init);
|
|
10222
|
-
} catch {
|
|
10299
|
+
} catch (error) {
|
|
10300
|
+
console.log(error);
|
|
10301
|
+
console.log(
|
|
10302
|
+
`Network failed to reach Autumn: ${error}. Returning 555 Network Error.`
|
|
10303
|
+
);
|
|
10223
10304
|
return new Response(null, {
|
|
10224
|
-
status:
|
|
10225
|
-
statusText: "
|
|
10305
|
+
status: 555,
|
|
10306
|
+
statusText: "Network Error"
|
|
10226
10307
|
});
|
|
10227
10308
|
}
|
|
10228
10309
|
}
|
|
@@ -13984,6 +14065,7 @@ var Plans = class extends ClientSDK {
|
|
|
13984
14065
|
* @param price - Base recurring price for the plan. Omit for free or usage-only plans. (optional)
|
|
13985
14066
|
* @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
|
|
13986
14067
|
* @param freeTrial - Free trial configuration. Customers can try this plan before being charged. (optional)
|
|
14068
|
+
* @param config - Miscellaneous plan-level configuration flags. (optional)
|
|
13987
14069
|
*
|
|
13988
14070
|
* @returns The created plan object.
|
|
13989
14071
|
*/
|
|
@@ -14089,6 +14171,7 @@ var Plans = class extends ClientSDK {
|
|
|
14089
14171
|
* @param price - The price of the plan. Set to null to remove the base price. (optional)
|
|
14090
14172
|
* @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
|
|
14091
14173
|
* @param freeTrial - The free trial of the plan. Set to null to remove the free trial. (optional)
|
|
14174
|
+
* @param config - Miscellaneous plan-level configuration flags. (optional)
|
|
14092
14175
|
* @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)
|
|
14093
14176
|
*
|
|
14094
14177
|
* @returns The updated plan object.
|
|
@@ -14974,6 +15057,9 @@ var listPlansItemDisplaySchema = import_v46.z.object({
|
|
|
14974
15057
|
primaryText: import_v46.z.string(),
|
|
14975
15058
|
secondaryText: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional()
|
|
14976
15059
|
});
|
|
15060
|
+
var listPlansConfigSchema = import_v46.z.object({
|
|
15061
|
+
ignorePastDue: import_v46.z.boolean()
|
|
15062
|
+
});
|
|
14977
15063
|
var listPlansParamsOutboundSchema = import_v46.z.object({
|
|
14978
15064
|
customer_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
|
|
14979
15065
|
entity_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
|
|
@@ -15062,6 +15148,7 @@ var listPlansListSchema = import_v46.z.object({
|
|
|
15062
15148
|
env: listPlansEnvSchema,
|
|
15063
15149
|
archived: import_v46.z.boolean(),
|
|
15064
15150
|
baseVariantId: import_v46.z.string().nullable(),
|
|
15151
|
+
config: listPlansConfigSchema,
|
|
15065
15152
|
customerEligibility: import_v46.z.union([listPlansCustomerEligibilitySchema, import_v46.z.undefined()]).optional()
|
|
15066
15153
|
});
|
|
15067
15154
|
var listPlansResponseSchema = import_v46.z.object({
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autumnHandler
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-7BVATYGA.mjs";
|
|
4
4
|
import {
|
|
5
5
|
autumnHandler as autumnHandler2
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-RPH5L44S.mjs";
|
|
7
7
|
import {
|
|
8
8
|
autumnHandler as autumnHandler3
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-DNNJOZAT.mjs";
|
|
10
10
|
import {
|
|
11
11
|
autumnHandler as autumnHandler4
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-OUDB34Y7.mjs";
|
|
13
13
|
import "../chunk-WYDGEDEU.mjs";
|
|
14
14
|
import "../chunk-VXND2UDT.mjs";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-EJGHP7KT.mjs";
|
|
16
|
+
import "../chunk-YSQQKZBU.mjs";
|
|
17
17
|
import "../chunk-TSF4YCUO.mjs";
|
|
18
18
|
import "../chunk-UAR3TMWI.mjs";
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-T42RZEUZ.mjs";
|
|
20
|
+
import "../chunk-MANTLPDT.mjs";
|
|
21
21
|
import "../chunk-S5HPMJ4U.mjs";
|
|
22
22
|
import "../chunk-OTXV5FY7.mjs";
|
|
23
|
-
import "../chunk-Z6QP3YEA.mjs";
|
|
24
23
|
import "../chunk-VZIMT7AO.mjs";
|
|
24
|
+
import "../chunk-Z6QP3YEA.mjs";
|
|
25
25
|
import "../chunk-TBQ27LIK.mjs";
|
|
26
26
|
import "../chunk-J44WR3QZ.mjs";
|
|
27
27
|
import "../chunk-N7NFYY54.mjs";
|