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
|
@@ -2176,6 +2176,18 @@ var BillingUpdateInvoiceMode$outboundSchema = z12.pipe(
|
|
|
2176
2176
|
);
|
|
2177
2177
|
var BillingUpdateProrationBehavior$outboundSchema = z12.enum(BillingUpdateProrationBehavior);
|
|
2178
2178
|
var BillingUpdateRedirectMode$outboundSchema = z12.enum(BillingUpdateRedirectMode);
|
|
2179
|
+
var BillingUpdateAttachDiscount$outboundSchema = z12.pipe(
|
|
2180
|
+
z12.object({
|
|
2181
|
+
rewardId: z12.optional(z12.string()),
|
|
2182
|
+
promotionCode: z12.optional(z12.string())
|
|
2183
|
+
}),
|
|
2184
|
+
z12.transform((v) => {
|
|
2185
|
+
return remap(v, {
|
|
2186
|
+
rewardId: "reward_id",
|
|
2187
|
+
promotionCode: "promotion_code"
|
|
2188
|
+
});
|
|
2189
|
+
})
|
|
2190
|
+
);
|
|
2179
2191
|
var BillingUpdateCancelAction$outboundSchema = z12.enum(BillingUpdateCancelAction);
|
|
2180
2192
|
var BillingUpdateRecalculateBalances$outboundSchema = z12.object({
|
|
2181
2193
|
enabled: z12.boolean()
|
|
@@ -2201,6 +2213,9 @@ var UpdateSubscriptionParams$outboundSchema = z12.pipe(
|
|
|
2201
2213
|
"if_required"
|
|
2202
2214
|
),
|
|
2203
2215
|
subscriptionId: z12.optional(z12.string()),
|
|
2216
|
+
discounts: z12.optional(
|
|
2217
|
+
z12.array(z12.lazy(() => BillingUpdateAttachDiscount$outboundSchema))
|
|
2218
|
+
),
|
|
2204
2219
|
cancelAction: z12.optional(BillingUpdateCancelAction$outboundSchema),
|
|
2205
2220
|
billingCycleAnchor: z12.optional(z12.literal("now")),
|
|
2206
2221
|
noBillingChanges: z12.optional(z12.boolean()),
|
|
@@ -3064,6 +3079,16 @@ var FreeTrial$inboundSchema = z16.pipe(
|
|
|
3064
3079
|
})
|
|
3065
3080
|
);
|
|
3066
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
|
+
);
|
|
3067
3092
|
var PlanStatus$inboundSchema = inboundSchema(PlanStatus);
|
|
3068
3093
|
var AttachAction$inboundSchema = inboundSchema(AttachAction);
|
|
3069
3094
|
var CustomerEligibility$inboundSchema = z16.pipe(
|
|
@@ -3097,6 +3122,7 @@ var Plan$inboundSchema = z16.pipe(
|
|
|
3097
3122
|
env: PlanEnv$inboundSchema,
|
|
3098
3123
|
archived: boolean2(),
|
|
3099
3124
|
base_variant_id: nullable(string4()),
|
|
3125
|
+
config: z16.lazy(() => PlanConfig$inboundSchema),
|
|
3100
3126
|
customer_eligibility: optional2(z16.lazy(
|
|
3101
3127
|
() => CustomerEligibility$inboundSchema
|
|
3102
3128
|
))
|
|
@@ -3777,6 +3803,16 @@ var FreeTrialRequest$outboundSchema = z19.pipe(
|
|
|
3777
3803
|
});
|
|
3778
3804
|
})
|
|
3779
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
|
+
);
|
|
3780
3816
|
var CreatePlanParams$outboundSchema = z19.pipe(
|
|
3781
3817
|
z19.object({
|
|
3782
3818
|
planId: z19.string(),
|
|
@@ -3787,7 +3823,8 @@ var CreatePlanParams$outboundSchema = z19.pipe(
|
|
|
3787
3823
|
autoEnable: z19._default(z19.boolean(), false),
|
|
3788
3824
|
price: z19.optional(z19.lazy(() => CreatePlanPriceRequest$outboundSchema)),
|
|
3789
3825
|
items: z19.optional(z19.array(z19.lazy(() => CreatePlanPlanItem$outboundSchema))),
|
|
3790
|
-
freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema))
|
|
3826
|
+
freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema)),
|
|
3827
|
+
config: z19.optional(z19.lazy(() => CreatePlanConfigRequest$outboundSchema))
|
|
3791
3828
|
}),
|
|
3792
3829
|
z19.transform((v) => {
|
|
3793
3830
|
return remap(v, {
|
|
@@ -3961,6 +3998,16 @@ var CreatePlanFreeTrialResponse$inboundSchema = z19.pipe(
|
|
|
3961
3998
|
})
|
|
3962
3999
|
);
|
|
3963
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
|
+
);
|
|
3964
4011
|
var CreatePlanStatus$inboundSchema = inboundSchema(CreatePlanStatus);
|
|
3965
4012
|
var CreatePlanAttachAction$inboundSchema = inboundSchema(CreatePlanAttachAction);
|
|
3966
4013
|
var CreatePlanCustomerEligibility$inboundSchema = z19.pipe(
|
|
@@ -3996,6 +4043,7 @@ var CreatePlanResponse$inboundSchema = z19.pipe(
|
|
|
3996
4043
|
env: CreatePlanEnv$inboundSchema,
|
|
3997
4044
|
archived: boolean2(),
|
|
3998
4045
|
base_variant_id: nullable(string4()),
|
|
4046
|
+
config: z19.lazy(() => CreatePlanConfigResponse$inboundSchema),
|
|
3999
4047
|
customer_eligibility: optional2(
|
|
4000
4048
|
z19.lazy(() => CreatePlanCustomerEligibility$inboundSchema)
|
|
4001
4049
|
)
|
|
@@ -5248,6 +5296,16 @@ var GetPlanFreeTrial$inboundSchema = z31.pipe(
|
|
|
5248
5296
|
})
|
|
5249
5297
|
);
|
|
5250
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
|
+
);
|
|
5251
5309
|
var GetPlanStatus$inboundSchema = inboundSchema(GetPlanStatus);
|
|
5252
5310
|
var GetPlanAttachAction$inboundSchema = inboundSchema(GetPlanAttachAction);
|
|
5253
5311
|
var GetPlanCustomerEligibility$inboundSchema = z31.pipe(
|
|
@@ -5281,6 +5339,7 @@ var GetPlanResponse$inboundSchema = z31.pipe(
|
|
|
5281
5339
|
env: GetPlanEnv$inboundSchema,
|
|
5282
5340
|
archived: boolean2(),
|
|
5283
5341
|
base_variant_id: nullable(string4()),
|
|
5342
|
+
config: z31.lazy(() => GetPlanConfig$inboundSchema),
|
|
5284
5343
|
customer_eligibility: optional2(
|
|
5285
5344
|
z31.lazy(() => GetPlanCustomerEligibility$inboundSchema)
|
|
5286
5345
|
)
|
|
@@ -5991,6 +6050,16 @@ var ListPlansFreeTrial$inboundSchema = z35.pipe(
|
|
|
5991
6050
|
})
|
|
5992
6051
|
);
|
|
5993
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
|
+
);
|
|
5994
6063
|
var ListPlansStatus$inboundSchema = inboundSchema(ListPlansStatus);
|
|
5995
6064
|
var ListPlansAttachAction$inboundSchema = inboundSchema(ListPlansAttachAction);
|
|
5996
6065
|
var ListPlansCustomerEligibility$inboundSchema = z35.pipe(
|
|
@@ -6024,6 +6093,7 @@ var ListPlansList$inboundSchema = z35.pipe(
|
|
|
6024
6093
|
env: ListPlansEnv$inboundSchema,
|
|
6025
6094
|
archived: boolean2(),
|
|
6026
6095
|
base_variant_id: nullable(string4()),
|
|
6096
|
+
config: z35.lazy(() => ListPlansConfig$inboundSchema),
|
|
6027
6097
|
customer_eligibility: optional2(
|
|
6028
6098
|
z35.lazy(() => ListPlansCustomerEligibility$inboundSchema)
|
|
6029
6099
|
)
|
|
@@ -7912,6 +7982,18 @@ var PreviewUpdateInvoiceMode$outboundSchema = z40.pipe(
|
|
|
7912
7982
|
);
|
|
7913
7983
|
var PreviewUpdateProrationBehavior$outboundSchema = z40.enum(PreviewUpdateProrationBehavior);
|
|
7914
7984
|
var PreviewUpdateRedirectMode$outboundSchema = z40.enum(PreviewUpdateRedirectMode);
|
|
7985
|
+
var PreviewUpdateAttachDiscount$outboundSchema = z40.pipe(
|
|
7986
|
+
z40.object({
|
|
7987
|
+
rewardId: z40.optional(z40.string()),
|
|
7988
|
+
promotionCode: z40.optional(z40.string())
|
|
7989
|
+
}),
|
|
7990
|
+
z40.transform((v) => {
|
|
7991
|
+
return remap(v, {
|
|
7992
|
+
rewardId: "reward_id",
|
|
7993
|
+
promotionCode: "promotion_code"
|
|
7994
|
+
});
|
|
7995
|
+
})
|
|
7996
|
+
);
|
|
7915
7997
|
var PreviewUpdateCancelAction$outboundSchema = z40.enum(PreviewUpdateCancelAction);
|
|
7916
7998
|
var PreviewUpdateRecalculateBalances$outboundSchema = z40.object({
|
|
7917
7999
|
enabled: z40.boolean()
|
|
@@ -7937,6 +8019,9 @@ var PreviewUpdateParams$outboundSchema = z40.pipe(
|
|
|
7937
8019
|
"if_required"
|
|
7938
8020
|
),
|
|
7939
8021
|
subscriptionId: z40.optional(z40.string()),
|
|
8022
|
+
discounts: z40.optional(
|
|
8023
|
+
z40.array(z40.lazy(() => PreviewUpdateAttachDiscount$outboundSchema))
|
|
8024
|
+
),
|
|
7940
8025
|
cancelAction: z40.optional(PreviewUpdateCancelAction$outboundSchema),
|
|
7941
8026
|
billingCycleAnchor: z40.optional(z40.literal("now")),
|
|
7942
8027
|
noBillingChanges: z40.optional(z40.boolean()),
|
|
@@ -9703,6 +9788,16 @@ var UpdatePlanFreeTrialParams$outboundSchema = z48.pipe(
|
|
|
9703
9788
|
});
|
|
9704
9789
|
})
|
|
9705
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
|
+
);
|
|
9706
9801
|
var UpdatePlanParams$outboundSchema = z48.pipe(
|
|
9707
9802
|
z48.object({
|
|
9708
9803
|
planId: z48.string(),
|
|
@@ -9718,6 +9813,7 @@ var UpdatePlanParams$outboundSchema = z48.pipe(
|
|
|
9718
9813
|
freeTrial: z48.optional(
|
|
9719
9814
|
z48.nullable(z48.lazy(() => UpdatePlanFreeTrialParams$outboundSchema))
|
|
9720
9815
|
),
|
|
9816
|
+
config: z48.optional(z48.lazy(() => UpdatePlanConfigRequest$outboundSchema)),
|
|
9721
9817
|
version: z48.optional(z48.number()),
|
|
9722
9818
|
archived: z48._default(z48.boolean(), false),
|
|
9723
9819
|
newPlanId: z48.optional(z48.string())
|
|
@@ -9895,6 +9991,16 @@ var UpdatePlanFreeTrial$inboundSchema = z48.pipe(
|
|
|
9895
9991
|
})
|
|
9896
9992
|
);
|
|
9897
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
|
+
);
|
|
9898
10004
|
var UpdatePlanStatus$inboundSchema = inboundSchema(UpdatePlanStatus);
|
|
9899
10005
|
var UpdatePlanAttachAction$inboundSchema = inboundSchema(UpdatePlanAttachAction);
|
|
9900
10006
|
var UpdatePlanCustomerEligibility$inboundSchema = z48.pipe(
|
|
@@ -9928,6 +10034,7 @@ var UpdatePlanResponse$inboundSchema = z48.pipe(
|
|
|
9928
10034
|
env: UpdatePlanEnv$inboundSchema,
|
|
9929
10035
|
archived: boolean2(),
|
|
9930
10036
|
base_variant_id: nullable(string4()),
|
|
10037
|
+
config: z48.lazy(() => UpdatePlanConfigResponse$inboundSchema),
|
|
9931
10038
|
customer_eligibility: optional2(
|
|
9932
10039
|
z48.lazy(() => UpdatePlanCustomerEligibility$inboundSchema)
|
|
9933
10040
|
)
|
|
@@ -10186,10 +10293,14 @@ var FailOpenHook = class {
|
|
|
10186
10293
|
fetcher: async (input, init) => {
|
|
10187
10294
|
try {
|
|
10188
10295
|
return init == null ? await fetch(input) : await fetch(input, init);
|
|
10189
|
-
} catch {
|
|
10296
|
+
} catch (error) {
|
|
10297
|
+
console.log(error);
|
|
10298
|
+
console.log(
|
|
10299
|
+
`Network failed to reach Autumn: ${error}. Returning 555 Network Error.`
|
|
10300
|
+
);
|
|
10190
10301
|
return new Response(null, {
|
|
10191
|
-
status:
|
|
10192
|
-
statusText: "
|
|
10302
|
+
status: 555,
|
|
10303
|
+
statusText: "Network Error"
|
|
10193
10304
|
});
|
|
10194
10305
|
}
|
|
10195
10306
|
}
|
|
@@ -11913,6 +12024,7 @@ var Billing = class extends ClientSDK {
|
|
|
11913
12024
|
* @param prorationBehavior - How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges. (optional)
|
|
11914
12025
|
* @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)
|
|
11915
12026
|
* @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)
|
|
12027
|
+
* @param discounts - List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code. (optional)
|
|
11916
12028
|
* @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)
|
|
11917
12029
|
* @param billingCycleAnchor - Reset the billing cycle anchor immediately with 'now' (optional)
|
|
11918
12030
|
* @param noBillingChanges - If true, the subscription is updated internally without applying billing changes in Stripe. (optional)
|
|
@@ -11948,6 +12060,7 @@ var Billing = class extends ClientSDK {
|
|
|
11948
12060
|
* @param prorationBehavior - How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges. (optional)
|
|
11949
12061
|
* @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)
|
|
11950
12062
|
* @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)
|
|
12063
|
+
* @param discounts - List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code. (optional)
|
|
11951
12064
|
* @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)
|
|
11952
12065
|
* @param billingCycleAnchor - Reset the billing cycle anchor immediately with 'now' (optional)
|
|
11953
12066
|
* @param noBillingChanges - If true, the subscription is updated internally without applying billing changes in Stripe. (optional)
|
|
@@ -13949,6 +14062,7 @@ var Plans = class extends ClientSDK {
|
|
|
13949
14062
|
* @param price - Base recurring price for the plan. Omit for free or usage-only plans. (optional)
|
|
13950
14063
|
* @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
|
|
13951
14064
|
* @param freeTrial - Free trial configuration. Customers can try this plan before being charged. (optional)
|
|
14065
|
+
* @param config - Miscellaneous plan-level configuration flags. (optional)
|
|
13952
14066
|
*
|
|
13953
14067
|
* @returns The created plan object.
|
|
13954
14068
|
*/
|
|
@@ -14054,6 +14168,7 @@ var Plans = class extends ClientSDK {
|
|
|
14054
14168
|
* @param price - The price of the plan. Set to null to remove the base price. (optional)
|
|
14055
14169
|
* @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
|
|
14056
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)
|
|
14057
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)
|
|
14058
14173
|
*
|
|
14059
14174
|
* @returns The updated plan object.
|
|
@@ -14939,6 +15054,9 @@ var listPlansItemDisplaySchema = import_v46.z.object({
|
|
|
14939
15054
|
primaryText: import_v46.z.string(),
|
|
14940
15055
|
secondaryText: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional()
|
|
14941
15056
|
});
|
|
15057
|
+
var listPlansConfigSchema = import_v46.z.object({
|
|
15058
|
+
ignorePastDue: import_v46.z.boolean()
|
|
15059
|
+
});
|
|
14942
15060
|
var listPlansParamsOutboundSchema = import_v46.z.object({
|
|
14943
15061
|
customer_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
|
|
14944
15062
|
entity_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
|
|
@@ -15027,6 +15145,7 @@ var listPlansListSchema = import_v46.z.object({
|
|
|
15027
15145
|
env: listPlansEnvSchema,
|
|
15028
15146
|
archived: import_v46.z.boolean(),
|
|
15029
15147
|
baseVariantId: import_v46.z.string().nullable(),
|
|
15148
|
+
config: listPlansConfigSchema,
|
|
15030
15149
|
customerEligibility: import_v46.z.union([listPlansCustomerEligibilitySchema, import_v46.z.undefined()]).optional()
|
|
15031
15150
|
});
|
|
15032
15151
|
var listPlansResponseSchema = import_v46.z.object({
|
|
@@ -16033,6 +16152,10 @@ var previewUpdateInvoiceModeSchema = import_v411.z.object({
|
|
|
16033
16152
|
enablePlanImmediately: import_v411.z.union([import_v411.z.boolean(), import_v411.z.undefined()]).optional(),
|
|
16034
16153
|
finalize: import_v411.z.union([import_v411.z.boolean(), import_v411.z.undefined()]).optional()
|
|
16035
16154
|
});
|
|
16155
|
+
var previewUpdateAttachDiscountSchema = import_v411.z.object({
|
|
16156
|
+
rewardId: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16157
|
+
promotionCode: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional()
|
|
16158
|
+
});
|
|
16036
16159
|
var previewUpdateRecalculateBalancesSchema = import_v411.z.object({
|
|
16037
16160
|
enabled: import_v411.z.boolean()
|
|
16038
16161
|
});
|
|
@@ -16167,6 +16290,10 @@ var previewUpdateInvoiceModeOutboundSchema = import_v411.z.object({
|
|
|
16167
16290
|
enable_plan_immediately: import_v411.z.boolean(),
|
|
16168
16291
|
finalize: import_v411.z.boolean()
|
|
16169
16292
|
});
|
|
16293
|
+
var previewUpdateAttachDiscountOutboundSchema = import_v411.z.object({
|
|
16294
|
+
reward_id: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16295
|
+
promotion_code: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional()
|
|
16296
|
+
});
|
|
16170
16297
|
var previewUpdateRecalculateBalancesOutboundSchema = import_v411.z.object({
|
|
16171
16298
|
enabled: import_v411.z.boolean()
|
|
16172
16299
|
});
|
|
@@ -16184,6 +16311,7 @@ var previewUpdateParamsOutboundSchema = import_v411.z.object({
|
|
|
16184
16311
|
proration_behavior: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16185
16312
|
redirect_mode: import_v411.z.string(),
|
|
16186
16313
|
subscription_id: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16314
|
+
discounts: import_v411.z.union([import_v411.z.array(previewUpdateAttachDiscountOutboundSchema), import_v411.z.undefined()]).optional(),
|
|
16187
16315
|
cancel_action: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16188
16316
|
billing_cycle_anchor: import_v411.z.union([import_v411.z.literal("now"), import_v411.z.undefined()]).optional(),
|
|
16189
16317
|
no_billing_changes: import_v411.z.union([import_v411.z.boolean(), import_v411.z.undefined()]).optional(),
|
|
@@ -16263,6 +16391,7 @@ var previewUpdateParamsSchema = import_v411.z.object({
|
|
|
16263
16391
|
prorationBehavior: import_v411.z.union([previewUpdateProrationBehaviorSchema, import_v411.z.undefined()]).optional(),
|
|
16264
16392
|
redirectMode: import_v411.z.union([previewUpdateRedirectModeSchema, import_v411.z.undefined()]).optional(),
|
|
16265
16393
|
subscriptionId: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16394
|
+
discounts: import_v411.z.union([import_v411.z.array(previewUpdateAttachDiscountSchema), import_v411.z.undefined()]).optional(),
|
|
16266
16395
|
cancelAction: import_v411.z.union([previewUpdateCancelActionSchema, import_v411.z.undefined()]).optional(),
|
|
16267
16396
|
billingCycleAnchor: import_v411.z.union([import_v411.z.literal("now"), import_v411.z.undefined()]).optional(),
|
|
16268
16397
|
noBillingChanges: import_v411.z.union([import_v411.z.boolean(), import_v411.z.undefined()]).optional(),
|
|
@@ -16550,6 +16679,10 @@ var billingUpdateInvoiceModeSchema = import_v414.z.object({
|
|
|
16550
16679
|
enablePlanImmediately: import_v414.z.union([import_v414.z.boolean(), import_v414.z.undefined()]).optional(),
|
|
16551
16680
|
finalize: import_v414.z.union([import_v414.z.boolean(), import_v414.z.undefined()]).optional()
|
|
16552
16681
|
});
|
|
16682
|
+
var billingUpdateAttachDiscountSchema = import_v414.z.object({
|
|
16683
|
+
rewardId: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16684
|
+
promotionCode: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional()
|
|
16685
|
+
});
|
|
16553
16686
|
var billingUpdateRecalculateBalancesSchema = import_v414.z.object({
|
|
16554
16687
|
enabled: import_v414.z.boolean()
|
|
16555
16688
|
});
|
|
@@ -16624,6 +16757,10 @@ var billingUpdateInvoiceModeOutboundSchema = import_v414.z.object({
|
|
|
16624
16757
|
enable_plan_immediately: import_v414.z.boolean(),
|
|
16625
16758
|
finalize: import_v414.z.boolean()
|
|
16626
16759
|
});
|
|
16760
|
+
var billingUpdateAttachDiscountOutboundSchema = import_v414.z.object({
|
|
16761
|
+
reward_id: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16762
|
+
promotion_code: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional()
|
|
16763
|
+
});
|
|
16627
16764
|
var billingUpdateRecalculateBalancesOutboundSchema = import_v414.z.object({
|
|
16628
16765
|
enabled: import_v414.z.boolean()
|
|
16629
16766
|
});
|
|
@@ -16638,6 +16775,7 @@ var updateSubscriptionParamsOutboundSchema = import_v414.z.object({
|
|
|
16638
16775
|
proration_behavior: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16639
16776
|
redirect_mode: import_v414.z.string(),
|
|
16640
16777
|
subscription_id: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16778
|
+
discounts: import_v414.z.union([import_v414.z.array(billingUpdateAttachDiscountOutboundSchema), import_v414.z.undefined()]).optional(),
|
|
16641
16779
|
cancel_action: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16642
16780
|
billing_cycle_anchor: import_v414.z.union([import_v414.z.literal("now"), import_v414.z.undefined()]).optional(),
|
|
16643
16781
|
no_billing_changes: import_v414.z.union([import_v414.z.boolean(), import_v414.z.undefined()]).optional(),
|
|
@@ -16716,6 +16854,7 @@ var updateSubscriptionParamsSchema = import_v414.z.object({
|
|
|
16716
16854
|
prorationBehavior: import_v414.z.union([billingUpdateProrationBehaviorSchema, import_v414.z.undefined()]).optional(),
|
|
16717
16855
|
redirectMode: import_v414.z.union([billingUpdateRedirectModeSchema, import_v414.z.undefined()]).optional(),
|
|
16718
16856
|
subscriptionId: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16857
|
+
discounts: import_v414.z.union([import_v414.z.array(billingUpdateAttachDiscountSchema), import_v414.z.undefined()]).optional(),
|
|
16719
16858
|
cancelAction: import_v414.z.union([billingUpdateCancelActionSchema, import_v414.z.undefined()]).optional(),
|
|
16720
16859
|
billingCycleAnchor: import_v414.z.union([import_v414.z.literal("now"), import_v414.z.undefined()]).optional(),
|
|
16721
16860
|
noBillingChanges: import_v414.z.union([import_v414.z.boolean(), import_v414.z.undefined()]).optional(),
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCoreHandler
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-AY6OV7CM.mjs";
|
|
5
|
-
import "../../chunk-55C2WWXQ.mjs";
|
|
6
|
-
import "../../chunk-TBQ27LIK.mjs";
|
|
7
|
-
import "../../chunk-J44WR3QZ.mjs";
|
|
3
|
+
} from "../../chunk-YSQQKZBU.mjs";
|
|
8
4
|
import "../../chunk-TSF4YCUO.mjs";
|
|
9
5
|
import "../../chunk-UAR3TMWI.mjs";
|
|
10
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-T42RZEUZ.mjs";
|
|
7
|
+
import "../../chunk-MANTLPDT.mjs";
|
|
8
|
+
import "../../chunk-S5HPMJ4U.mjs";
|
|
11
9
|
import "../../chunk-OTXV5FY7.mjs";
|
|
12
10
|
import "../../chunk-VZIMT7AO.mjs";
|
|
13
11
|
import "../../chunk-Z6QP3YEA.mjs";
|
|
12
|
+
import "../../chunk-TBQ27LIK.mjs";
|
|
13
|
+
import "../../chunk-J44WR3QZ.mjs";
|
|
14
14
|
import "../../chunk-N7NFYY54.mjs";
|
|
15
15
|
export {
|
|
16
16
|
createCoreHandler
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as Autumn, R as RouteDefinition } from '../../routeTypes-
|
|
1
|
+
import { A as Autumn, R as RouteDefinition } from '../../routeTypes-DVwngaBn.mjs';
|
|
2
2
|
import { A as AuthResult } from '../../authTypes-CyV4xBTB.mjs';
|
|
3
3
|
import { BackendResult } from '../types/responseTypes.mjs';
|
|
4
4
|
import 'zod/v4';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as Autumn, R as RouteDefinition } from '../../routeTypes-
|
|
1
|
+
import { A as Autumn, R as RouteDefinition } from '../../routeTypes-B94_Mq2J.js';
|
|
2
2
|
import { A as AuthResult } from '../../authTypes-CyV4xBTB.js';
|
|
3
3
|
import { BackendResult } from '../types/responseTypes.js';
|
|
4
4
|
import 'zod/v4';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
executeRoute
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-TBQ27LIK.mjs";
|
|
5
|
-
import "../../chunk-J44WR3QZ.mjs";
|
|
3
|
+
} from "../../chunk-S5HPMJ4U.mjs";
|
|
6
4
|
import "../../chunk-OTXV5FY7.mjs";
|
|
7
5
|
import "../../chunk-VZIMT7AO.mjs";
|
|
8
6
|
import "../../chunk-Z6QP3YEA.mjs";
|
|
7
|
+
import "../../chunk-TBQ27LIK.mjs";
|
|
8
|
+
import "../../chunk-J44WR3QZ.mjs";
|
|
9
9
|
import "../../chunk-N7NFYY54.mjs";
|
|
10
10
|
export {
|
|
11
11
|
executeRoute
|