autumn-js 1.2.11 → 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 +143 -4
- package/dist/backend/adapters/express.mjs +8 -8
- package/dist/backend/adapters/fetch.js +143 -4
- package/dist/backend/adapters/fetch.mjs +8 -8
- package/dist/backend/adapters/hono.js +143 -4
- package/dist/backend/adapters/hono.mjs +8 -8
- package/dist/backend/adapters/index.js +143 -4
- package/dist/backend/adapters/index.mjs +11 -11
- package/dist/backend/adapters/next.js +143 -4
- package/dist/backend/adapters/next.mjs +8 -8
- package/dist/backend/{chunk-WMGBAAJK.mjs → chunk-7BVATYGA.mjs} +1 -1
- package/dist/backend/{chunk-4RBWBJIF.mjs → chunk-DNNJOZAT.mjs} +1 -1
- package/dist/backend/{chunk-SKWVW2EN.mjs → chunk-EJGHP7KT.mjs} +5 -5
- package/dist/backend/{chunk-FPZHAFCV.mjs → chunk-MANTLPDT.mjs} +24 -0
- package/dist/backend/{chunk-JEVAYQ65.mjs → chunk-OUDB34Y7.mjs} +1 -1
- package/dist/backend/{chunk-MBL56SEJ.mjs → chunk-RPH5L44S.mjs} +1 -1
- package/dist/backend/{chunk-AY6OV7CM.mjs → chunk-T42RZEUZ.mjs} +119 -4
- package/dist/backend/{chunk-JMDETKOQ.mjs → chunk-YSQQKZBU.mjs} +7 -7
- 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 +143 -4
- package/dist/backend/core/handlers/coreHandler.mjs +6 -6
- 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 +3 -3
- package/dist/backend/core/handlers/handleRouteByName.js +143 -4
- package/dist/backend/core/handlers/handleRouteByName.mjs +6 -6
- 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 +143 -4
- package/dist/backend/core/handlers/index.mjs +10 -10
- package/dist/backend/core/index.d.mts +1 -1
- package/dist/backend/core/index.d.ts +1 -1
- package/dist/backend/core/index.js +143 -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 +24 -0
- package/dist/backend/core/routes/index.mjs +1 -1
- 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 +24 -0
- package/dist/backend/core/routes/routeConfigs.mjs +1 -1
- 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/index.d.mts +2 -2
- package/dist/backend/index.d.ts +2 -2
- package/dist/backend/index.js +143 -4
- package/dist/backend/index.mjs +7 -7
- package/dist/backend/{routeTypes-D7ANq7kY.d.ts → routeTypes-B94_Mq2J.d.ts} +129 -0
- package/dist/backend/{routeTypes-CQWFgZk4.d.mts → routeTypes-DVwngaBn.d.mts} +129 -0
- package/dist/better-auth/{chunk-3GVPOBXE.mjs → chunk-4OWECHZC.mjs} +1 -1
- package/dist/better-auth/{chunk-WEDJRTA3.mjs → chunk-JIFD4TSN.mjs} +24 -0
- package/dist/better-auth/{chunk-XH3WDFWS.mjs → chunk-ZZGFPTHO.mjs} +120 -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 +143 -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 +24 -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 +143 -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 +143 -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-5jUgYeHh.d.mts → params-B5l9vHfZ.d.ts} +35 -1
- package/dist/react/{params-g4jEwMY7.d.ts → params-BVglT8vT.d.mts} +35 -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 +179 -1
- package/dist/sdk/index.d.ts +179 -1
- package/dist/sdk/index.js +196 -4
- package/dist/sdk/index.mjs +179 -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
- package/dist/backend/{chunk-55C2WWXQ.mjs → chunk-S5HPMJ4U.mjs} +3 -3
|
@@ -2093,6 +2093,18 @@ var BillingUpdateInvoiceMode$outboundSchema = z12.pipe(
|
|
|
2093
2093
|
);
|
|
2094
2094
|
var BillingUpdateProrationBehavior$outboundSchema = z12.enum(BillingUpdateProrationBehavior);
|
|
2095
2095
|
var BillingUpdateRedirectMode$outboundSchema = z12.enum(BillingUpdateRedirectMode);
|
|
2096
|
+
var BillingUpdateAttachDiscount$outboundSchema = z12.pipe(
|
|
2097
|
+
z12.object({
|
|
2098
|
+
rewardId: z12.optional(z12.string()),
|
|
2099
|
+
promotionCode: z12.optional(z12.string())
|
|
2100
|
+
}),
|
|
2101
|
+
z12.transform((v) => {
|
|
2102
|
+
return remap(v, {
|
|
2103
|
+
rewardId: "reward_id",
|
|
2104
|
+
promotionCode: "promotion_code"
|
|
2105
|
+
});
|
|
2106
|
+
})
|
|
2107
|
+
);
|
|
2096
2108
|
var BillingUpdateCancelAction$outboundSchema = z12.enum(BillingUpdateCancelAction);
|
|
2097
2109
|
var BillingUpdateRecalculateBalances$outboundSchema = z12.object({
|
|
2098
2110
|
enabled: z12.boolean()
|
|
@@ -2118,6 +2130,9 @@ var UpdateSubscriptionParams$outboundSchema = z12.pipe(
|
|
|
2118
2130
|
"if_required"
|
|
2119
2131
|
),
|
|
2120
2132
|
subscriptionId: z12.optional(z12.string()),
|
|
2133
|
+
discounts: z12.optional(
|
|
2134
|
+
z12.array(z12.lazy(() => BillingUpdateAttachDiscount$outboundSchema))
|
|
2135
|
+
),
|
|
2121
2136
|
cancelAction: z12.optional(BillingUpdateCancelAction$outboundSchema),
|
|
2122
2137
|
billingCycleAnchor: z12.optional(z12.literal("now")),
|
|
2123
2138
|
noBillingChanges: z12.optional(z12.boolean()),
|
|
@@ -2981,6 +2996,16 @@ var FreeTrial$inboundSchema = z16.pipe(
|
|
|
2981
2996
|
})
|
|
2982
2997
|
);
|
|
2983
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
|
+
);
|
|
2984
3009
|
var PlanStatus$inboundSchema = inboundSchema(PlanStatus);
|
|
2985
3010
|
var AttachAction$inboundSchema = inboundSchema(AttachAction);
|
|
2986
3011
|
var CustomerEligibility$inboundSchema = z16.pipe(
|
|
@@ -3014,6 +3039,7 @@ var Plan$inboundSchema = z16.pipe(
|
|
|
3014
3039
|
env: PlanEnv$inboundSchema,
|
|
3015
3040
|
archived: boolean2(),
|
|
3016
3041
|
base_variant_id: nullable(string4()),
|
|
3042
|
+
config: z16.lazy(() => PlanConfig$inboundSchema),
|
|
3017
3043
|
customer_eligibility: optional2(z16.lazy(
|
|
3018
3044
|
() => CustomerEligibility$inboundSchema
|
|
3019
3045
|
))
|
|
@@ -3694,6 +3720,16 @@ var FreeTrialRequest$outboundSchema = z19.pipe(
|
|
|
3694
3720
|
});
|
|
3695
3721
|
})
|
|
3696
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
|
+
);
|
|
3697
3733
|
var CreatePlanParams$outboundSchema = z19.pipe(
|
|
3698
3734
|
z19.object({
|
|
3699
3735
|
planId: z19.string(),
|
|
@@ -3704,7 +3740,8 @@ var CreatePlanParams$outboundSchema = z19.pipe(
|
|
|
3704
3740
|
autoEnable: z19._default(z19.boolean(), false),
|
|
3705
3741
|
price: z19.optional(z19.lazy(() => CreatePlanPriceRequest$outboundSchema)),
|
|
3706
3742
|
items: z19.optional(z19.array(z19.lazy(() => CreatePlanPlanItem$outboundSchema))),
|
|
3707
|
-
freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema))
|
|
3743
|
+
freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema)),
|
|
3744
|
+
config: z19.optional(z19.lazy(() => CreatePlanConfigRequest$outboundSchema))
|
|
3708
3745
|
}),
|
|
3709
3746
|
z19.transform((v) => {
|
|
3710
3747
|
return remap(v, {
|
|
@@ -3878,6 +3915,16 @@ var CreatePlanFreeTrialResponse$inboundSchema = z19.pipe(
|
|
|
3878
3915
|
})
|
|
3879
3916
|
);
|
|
3880
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
|
+
);
|
|
3881
3928
|
var CreatePlanStatus$inboundSchema = inboundSchema(CreatePlanStatus);
|
|
3882
3929
|
var CreatePlanAttachAction$inboundSchema = inboundSchema(CreatePlanAttachAction);
|
|
3883
3930
|
var CreatePlanCustomerEligibility$inboundSchema = z19.pipe(
|
|
@@ -3913,6 +3960,7 @@ var CreatePlanResponse$inboundSchema = z19.pipe(
|
|
|
3913
3960
|
env: CreatePlanEnv$inboundSchema,
|
|
3914
3961
|
archived: boolean2(),
|
|
3915
3962
|
base_variant_id: nullable(string4()),
|
|
3963
|
+
config: z19.lazy(() => CreatePlanConfigResponse$inboundSchema),
|
|
3916
3964
|
customer_eligibility: optional2(
|
|
3917
3965
|
z19.lazy(() => CreatePlanCustomerEligibility$inboundSchema)
|
|
3918
3966
|
)
|
|
@@ -5165,6 +5213,16 @@ var GetPlanFreeTrial$inboundSchema = z31.pipe(
|
|
|
5165
5213
|
})
|
|
5166
5214
|
);
|
|
5167
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
|
+
);
|
|
5168
5226
|
var GetPlanStatus$inboundSchema = inboundSchema(GetPlanStatus);
|
|
5169
5227
|
var GetPlanAttachAction$inboundSchema = inboundSchema(GetPlanAttachAction);
|
|
5170
5228
|
var GetPlanCustomerEligibility$inboundSchema = z31.pipe(
|
|
@@ -5198,6 +5256,7 @@ var GetPlanResponse$inboundSchema = z31.pipe(
|
|
|
5198
5256
|
env: GetPlanEnv$inboundSchema,
|
|
5199
5257
|
archived: boolean2(),
|
|
5200
5258
|
base_variant_id: nullable(string4()),
|
|
5259
|
+
config: z31.lazy(() => GetPlanConfig$inboundSchema),
|
|
5201
5260
|
customer_eligibility: optional2(
|
|
5202
5261
|
z31.lazy(() => GetPlanCustomerEligibility$inboundSchema)
|
|
5203
5262
|
)
|
|
@@ -5908,6 +5967,16 @@ var ListPlansFreeTrial$inboundSchema = z35.pipe(
|
|
|
5908
5967
|
})
|
|
5909
5968
|
);
|
|
5910
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
|
+
);
|
|
5911
5980
|
var ListPlansStatus$inboundSchema = inboundSchema(ListPlansStatus);
|
|
5912
5981
|
var ListPlansAttachAction$inboundSchema = inboundSchema(ListPlansAttachAction);
|
|
5913
5982
|
var ListPlansCustomerEligibility$inboundSchema = z35.pipe(
|
|
@@ -5941,6 +6010,7 @@ var ListPlansList$inboundSchema = z35.pipe(
|
|
|
5941
6010
|
env: ListPlansEnv$inboundSchema,
|
|
5942
6011
|
archived: boolean2(),
|
|
5943
6012
|
base_variant_id: nullable(string4()),
|
|
6013
|
+
config: z35.lazy(() => ListPlansConfig$inboundSchema),
|
|
5944
6014
|
customer_eligibility: optional2(
|
|
5945
6015
|
z35.lazy(() => ListPlansCustomerEligibility$inboundSchema)
|
|
5946
6016
|
)
|
|
@@ -7829,6 +7899,18 @@ var PreviewUpdateInvoiceMode$outboundSchema = z40.pipe(
|
|
|
7829
7899
|
);
|
|
7830
7900
|
var PreviewUpdateProrationBehavior$outboundSchema = z40.enum(PreviewUpdateProrationBehavior);
|
|
7831
7901
|
var PreviewUpdateRedirectMode$outboundSchema = z40.enum(PreviewUpdateRedirectMode);
|
|
7902
|
+
var PreviewUpdateAttachDiscount$outboundSchema = z40.pipe(
|
|
7903
|
+
z40.object({
|
|
7904
|
+
rewardId: z40.optional(z40.string()),
|
|
7905
|
+
promotionCode: z40.optional(z40.string())
|
|
7906
|
+
}),
|
|
7907
|
+
z40.transform((v) => {
|
|
7908
|
+
return remap(v, {
|
|
7909
|
+
rewardId: "reward_id",
|
|
7910
|
+
promotionCode: "promotion_code"
|
|
7911
|
+
});
|
|
7912
|
+
})
|
|
7913
|
+
);
|
|
7832
7914
|
var PreviewUpdateCancelAction$outboundSchema = z40.enum(PreviewUpdateCancelAction);
|
|
7833
7915
|
var PreviewUpdateRecalculateBalances$outboundSchema = z40.object({
|
|
7834
7916
|
enabled: z40.boolean()
|
|
@@ -7854,6 +7936,9 @@ var PreviewUpdateParams$outboundSchema = z40.pipe(
|
|
|
7854
7936
|
"if_required"
|
|
7855
7937
|
),
|
|
7856
7938
|
subscriptionId: z40.optional(z40.string()),
|
|
7939
|
+
discounts: z40.optional(
|
|
7940
|
+
z40.array(z40.lazy(() => PreviewUpdateAttachDiscount$outboundSchema))
|
|
7941
|
+
),
|
|
7857
7942
|
cancelAction: z40.optional(PreviewUpdateCancelAction$outboundSchema),
|
|
7858
7943
|
billingCycleAnchor: z40.optional(z40.literal("now")),
|
|
7859
7944
|
noBillingChanges: z40.optional(z40.boolean()),
|
|
@@ -9620,6 +9705,16 @@ var UpdatePlanFreeTrialParams$outboundSchema = z48.pipe(
|
|
|
9620
9705
|
});
|
|
9621
9706
|
})
|
|
9622
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
|
+
);
|
|
9623
9718
|
var UpdatePlanParams$outboundSchema = z48.pipe(
|
|
9624
9719
|
z48.object({
|
|
9625
9720
|
planId: z48.string(),
|
|
@@ -9635,6 +9730,7 @@ var UpdatePlanParams$outboundSchema = z48.pipe(
|
|
|
9635
9730
|
freeTrial: z48.optional(
|
|
9636
9731
|
z48.nullable(z48.lazy(() => UpdatePlanFreeTrialParams$outboundSchema))
|
|
9637
9732
|
),
|
|
9733
|
+
config: z48.optional(z48.lazy(() => UpdatePlanConfigRequest$outboundSchema)),
|
|
9638
9734
|
version: z48.optional(z48.number()),
|
|
9639
9735
|
archived: z48._default(z48.boolean(), false),
|
|
9640
9736
|
newPlanId: z48.optional(z48.string())
|
|
@@ -9812,6 +9908,16 @@ var UpdatePlanFreeTrial$inboundSchema = z48.pipe(
|
|
|
9812
9908
|
})
|
|
9813
9909
|
);
|
|
9814
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
|
+
);
|
|
9815
9921
|
var UpdatePlanStatus$inboundSchema = inboundSchema(UpdatePlanStatus);
|
|
9816
9922
|
var UpdatePlanAttachAction$inboundSchema = inboundSchema(UpdatePlanAttachAction);
|
|
9817
9923
|
var UpdatePlanCustomerEligibility$inboundSchema = z48.pipe(
|
|
@@ -9845,6 +9951,7 @@ var UpdatePlanResponse$inboundSchema = z48.pipe(
|
|
|
9845
9951
|
env: UpdatePlanEnv$inboundSchema,
|
|
9846
9952
|
archived: boolean2(),
|
|
9847
9953
|
base_variant_id: nullable(string4()),
|
|
9954
|
+
config: z48.lazy(() => UpdatePlanConfigResponse$inboundSchema),
|
|
9848
9955
|
customer_eligibility: optional2(
|
|
9849
9956
|
z48.lazy(() => UpdatePlanCustomerEligibility$inboundSchema)
|
|
9850
9957
|
)
|
|
@@ -10103,10 +10210,14 @@ var FailOpenHook = class {
|
|
|
10103
10210
|
fetcher: async (input, init) => {
|
|
10104
10211
|
try {
|
|
10105
10212
|
return init == null ? await fetch(input) : await fetch(input, init);
|
|
10106
|
-
} catch {
|
|
10213
|
+
} catch (error) {
|
|
10214
|
+
console.log(error);
|
|
10215
|
+
console.log(
|
|
10216
|
+
`Network failed to reach Autumn: ${error}. Returning 555 Network Error.`
|
|
10217
|
+
);
|
|
10107
10218
|
return new Response(null, {
|
|
10108
|
-
status:
|
|
10109
|
-
statusText: "
|
|
10219
|
+
status: 555,
|
|
10220
|
+
statusText: "Network Error"
|
|
10110
10221
|
});
|
|
10111
10222
|
}
|
|
10112
10223
|
}
|
|
@@ -11858,6 +11969,7 @@ var Billing = class extends ClientSDK {
|
|
|
11858
11969
|
* @param prorationBehavior - How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges. (optional)
|
|
11859
11970
|
* @param redirectMode - Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects. (optional)
|
|
11860
11971
|
* @param subscriptionId - A unique ID to identify this subscription. Can be used to target specific subscriptions in update operations when a customer has multiple products with the same plan. (optional)
|
|
11972
|
+
* @param discounts - List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code. (optional)
|
|
11861
11973
|
* @param cancelAction - Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation. (optional)
|
|
11862
11974
|
* @param billingCycleAnchor - Reset the billing cycle anchor immediately with 'now' (optional)
|
|
11863
11975
|
* @param noBillingChanges - If true, the subscription is updated internally without applying billing changes in Stripe. (optional)
|
|
@@ -11893,6 +12005,7 @@ var Billing = class extends ClientSDK {
|
|
|
11893
12005
|
* @param prorationBehavior - How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges. (optional)
|
|
11894
12006
|
* @param redirectMode - Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects. (optional)
|
|
11895
12007
|
* @param subscriptionId - A unique ID to identify this subscription. Can be used to target specific subscriptions in update operations when a customer has multiple products with the same plan. (optional)
|
|
12008
|
+
* @param discounts - List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code. (optional)
|
|
11896
12009
|
* @param cancelAction - Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation. (optional)
|
|
11897
12010
|
* @param billingCycleAnchor - Reset the billing cycle anchor immediately with 'now' (optional)
|
|
11898
12011
|
* @param noBillingChanges - If true, the subscription is updated internally without applying billing changes in Stripe. (optional)
|
|
@@ -13894,6 +14007,7 @@ var Plans = class extends ClientSDK {
|
|
|
13894
14007
|
* @param price - Base recurring price for the plan. Omit for free or usage-only plans. (optional)
|
|
13895
14008
|
* @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
|
|
13896
14009
|
* @param freeTrial - Free trial configuration. Customers can try this plan before being charged. (optional)
|
|
14010
|
+
* @param config - Miscellaneous plan-level configuration flags. (optional)
|
|
13897
14011
|
*
|
|
13898
14012
|
* @returns The created plan object.
|
|
13899
14013
|
*/
|
|
@@ -13999,6 +14113,7 @@ var Plans = class extends ClientSDK {
|
|
|
13999
14113
|
* @param price - The price of the plan. Set to null to remove the base price. (optional)
|
|
14000
14114
|
* @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
|
|
14001
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)
|
|
14002
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)
|
|
14003
14118
|
*
|
|
14004
14119
|
* @returns The updated plan object.
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Autumn
|
|
3
|
-
} from "./chunk-AY6OV7CM.mjs";
|
|
4
|
-
import {
|
|
5
|
-
executeRoute
|
|
6
|
-
} from "./chunk-55C2WWXQ.mjs";
|
|
7
1
|
import {
|
|
8
2
|
buildRouter
|
|
9
3
|
} from "./chunk-UAR3TMWI.mjs";
|
|
4
|
+
import {
|
|
5
|
+
Autumn
|
|
6
|
+
} from "./chunk-T42RZEUZ.mjs";
|
|
10
7
|
import {
|
|
11
8
|
routeConfigs
|
|
12
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MANTLPDT.mjs";
|
|
10
|
+
import {
|
|
11
|
+
executeRoute
|
|
12
|
+
} from "./chunk-S5HPMJ4U.mjs";
|
|
13
13
|
import {
|
|
14
14
|
secretKeyCheck
|
|
15
15
|
} from "./chunk-VZIMT7AO.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
|
|