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
|
@@ -2177,6 +2177,18 @@ var BillingUpdateInvoiceMode$outboundSchema = z12.pipe(
|
|
|
2177
2177
|
);
|
|
2178
2178
|
var BillingUpdateProrationBehavior$outboundSchema = z12.enum(BillingUpdateProrationBehavior);
|
|
2179
2179
|
var BillingUpdateRedirectMode$outboundSchema = z12.enum(BillingUpdateRedirectMode);
|
|
2180
|
+
var BillingUpdateAttachDiscount$outboundSchema = z12.pipe(
|
|
2181
|
+
z12.object({
|
|
2182
|
+
rewardId: z12.optional(z12.string()),
|
|
2183
|
+
promotionCode: z12.optional(z12.string())
|
|
2184
|
+
}),
|
|
2185
|
+
z12.transform((v) => {
|
|
2186
|
+
return remap(v, {
|
|
2187
|
+
rewardId: "reward_id",
|
|
2188
|
+
promotionCode: "promotion_code"
|
|
2189
|
+
});
|
|
2190
|
+
})
|
|
2191
|
+
);
|
|
2180
2192
|
var BillingUpdateCancelAction$outboundSchema = z12.enum(BillingUpdateCancelAction);
|
|
2181
2193
|
var BillingUpdateRecalculateBalances$outboundSchema = z12.object({
|
|
2182
2194
|
enabled: z12.boolean()
|
|
@@ -2202,6 +2214,9 @@ var UpdateSubscriptionParams$outboundSchema = z12.pipe(
|
|
|
2202
2214
|
"if_required"
|
|
2203
2215
|
),
|
|
2204
2216
|
subscriptionId: z12.optional(z12.string()),
|
|
2217
|
+
discounts: z12.optional(
|
|
2218
|
+
z12.array(z12.lazy(() => BillingUpdateAttachDiscount$outboundSchema))
|
|
2219
|
+
),
|
|
2205
2220
|
cancelAction: z12.optional(BillingUpdateCancelAction$outboundSchema),
|
|
2206
2221
|
billingCycleAnchor: z12.optional(z12.literal("now")),
|
|
2207
2222
|
noBillingChanges: z12.optional(z12.boolean()),
|
|
@@ -3065,6 +3080,16 @@ var FreeTrial$inboundSchema = z16.pipe(
|
|
|
3065
3080
|
})
|
|
3066
3081
|
);
|
|
3067
3082
|
var PlanEnv$inboundSchema = inboundSchema(PlanEnv);
|
|
3083
|
+
var PlanConfig$inboundSchema = z16.pipe(
|
|
3084
|
+
z16.object({
|
|
3085
|
+
ignore_past_due: z16._default(boolean2(), false)
|
|
3086
|
+
}),
|
|
3087
|
+
z16.transform((v) => {
|
|
3088
|
+
return remap(v, {
|
|
3089
|
+
"ignore_past_due": "ignorePastDue"
|
|
3090
|
+
});
|
|
3091
|
+
})
|
|
3092
|
+
);
|
|
3068
3093
|
var PlanStatus$inboundSchema = inboundSchema(PlanStatus);
|
|
3069
3094
|
var AttachAction$inboundSchema = inboundSchema(AttachAction);
|
|
3070
3095
|
var CustomerEligibility$inboundSchema = z16.pipe(
|
|
@@ -3098,6 +3123,7 @@ var Plan$inboundSchema = z16.pipe(
|
|
|
3098
3123
|
env: PlanEnv$inboundSchema,
|
|
3099
3124
|
archived: boolean2(),
|
|
3100
3125
|
base_variant_id: nullable(string4()),
|
|
3126
|
+
config: z16.lazy(() => PlanConfig$inboundSchema),
|
|
3101
3127
|
customer_eligibility: optional2(z16.lazy(
|
|
3102
3128
|
() => CustomerEligibility$inboundSchema
|
|
3103
3129
|
))
|
|
@@ -3778,6 +3804,16 @@ var FreeTrialRequest$outboundSchema = z19.pipe(
|
|
|
3778
3804
|
});
|
|
3779
3805
|
})
|
|
3780
3806
|
);
|
|
3807
|
+
var CreatePlanConfigRequest$outboundSchema = z19.pipe(
|
|
3808
|
+
z19.object({
|
|
3809
|
+
ignorePastDue: z19._default(z19.boolean(), false)
|
|
3810
|
+
}),
|
|
3811
|
+
z19.transform((v) => {
|
|
3812
|
+
return remap(v, {
|
|
3813
|
+
ignorePastDue: "ignore_past_due"
|
|
3814
|
+
});
|
|
3815
|
+
})
|
|
3816
|
+
);
|
|
3781
3817
|
var CreatePlanParams$outboundSchema = z19.pipe(
|
|
3782
3818
|
z19.object({
|
|
3783
3819
|
planId: z19.string(),
|
|
@@ -3788,7 +3824,8 @@ var CreatePlanParams$outboundSchema = z19.pipe(
|
|
|
3788
3824
|
autoEnable: z19._default(z19.boolean(), false),
|
|
3789
3825
|
price: z19.optional(z19.lazy(() => CreatePlanPriceRequest$outboundSchema)),
|
|
3790
3826
|
items: z19.optional(z19.array(z19.lazy(() => CreatePlanPlanItem$outboundSchema))),
|
|
3791
|
-
freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema))
|
|
3827
|
+
freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema)),
|
|
3828
|
+
config: z19.optional(z19.lazy(() => CreatePlanConfigRequest$outboundSchema))
|
|
3792
3829
|
}),
|
|
3793
3830
|
z19.transform((v) => {
|
|
3794
3831
|
return remap(v, {
|
|
@@ -3962,6 +3999,16 @@ var CreatePlanFreeTrialResponse$inboundSchema = z19.pipe(
|
|
|
3962
3999
|
})
|
|
3963
4000
|
);
|
|
3964
4001
|
var CreatePlanEnv$inboundSchema = inboundSchema(CreatePlanEnv);
|
|
4002
|
+
var CreatePlanConfigResponse$inboundSchema = z19.pipe(
|
|
4003
|
+
z19.object({
|
|
4004
|
+
ignore_past_due: z19._default(boolean2(), false)
|
|
4005
|
+
}),
|
|
4006
|
+
z19.transform((v) => {
|
|
4007
|
+
return remap(v, {
|
|
4008
|
+
"ignore_past_due": "ignorePastDue"
|
|
4009
|
+
});
|
|
4010
|
+
})
|
|
4011
|
+
);
|
|
3965
4012
|
var CreatePlanStatus$inboundSchema = inboundSchema(CreatePlanStatus);
|
|
3966
4013
|
var CreatePlanAttachAction$inboundSchema = inboundSchema(CreatePlanAttachAction);
|
|
3967
4014
|
var CreatePlanCustomerEligibility$inboundSchema = z19.pipe(
|
|
@@ -3997,6 +4044,7 @@ var CreatePlanResponse$inboundSchema = z19.pipe(
|
|
|
3997
4044
|
env: CreatePlanEnv$inboundSchema,
|
|
3998
4045
|
archived: boolean2(),
|
|
3999
4046
|
base_variant_id: nullable(string4()),
|
|
4047
|
+
config: z19.lazy(() => CreatePlanConfigResponse$inboundSchema),
|
|
4000
4048
|
customer_eligibility: optional2(
|
|
4001
4049
|
z19.lazy(() => CreatePlanCustomerEligibility$inboundSchema)
|
|
4002
4050
|
)
|
|
@@ -5249,6 +5297,16 @@ var GetPlanFreeTrial$inboundSchema = z31.pipe(
|
|
|
5249
5297
|
})
|
|
5250
5298
|
);
|
|
5251
5299
|
var GetPlanEnv$inboundSchema = inboundSchema(GetPlanEnv);
|
|
5300
|
+
var GetPlanConfig$inboundSchema = z31.pipe(
|
|
5301
|
+
z31.object({
|
|
5302
|
+
ignore_past_due: z31._default(boolean2(), false)
|
|
5303
|
+
}),
|
|
5304
|
+
z31.transform((v) => {
|
|
5305
|
+
return remap(v, {
|
|
5306
|
+
"ignore_past_due": "ignorePastDue"
|
|
5307
|
+
});
|
|
5308
|
+
})
|
|
5309
|
+
);
|
|
5252
5310
|
var GetPlanStatus$inboundSchema = inboundSchema(GetPlanStatus);
|
|
5253
5311
|
var GetPlanAttachAction$inboundSchema = inboundSchema(GetPlanAttachAction);
|
|
5254
5312
|
var GetPlanCustomerEligibility$inboundSchema = z31.pipe(
|
|
@@ -5282,6 +5340,7 @@ var GetPlanResponse$inboundSchema = z31.pipe(
|
|
|
5282
5340
|
env: GetPlanEnv$inboundSchema,
|
|
5283
5341
|
archived: boolean2(),
|
|
5284
5342
|
base_variant_id: nullable(string4()),
|
|
5343
|
+
config: z31.lazy(() => GetPlanConfig$inboundSchema),
|
|
5285
5344
|
customer_eligibility: optional2(
|
|
5286
5345
|
z31.lazy(() => GetPlanCustomerEligibility$inboundSchema)
|
|
5287
5346
|
)
|
|
@@ -5992,6 +6051,16 @@ var ListPlansFreeTrial$inboundSchema = z35.pipe(
|
|
|
5992
6051
|
})
|
|
5993
6052
|
);
|
|
5994
6053
|
var ListPlansEnv$inboundSchema = inboundSchema(ListPlansEnv);
|
|
6054
|
+
var ListPlansConfig$inboundSchema = z35.pipe(
|
|
6055
|
+
z35.object({
|
|
6056
|
+
ignore_past_due: z35._default(boolean2(), false)
|
|
6057
|
+
}),
|
|
6058
|
+
z35.transform((v) => {
|
|
6059
|
+
return remap(v, {
|
|
6060
|
+
"ignore_past_due": "ignorePastDue"
|
|
6061
|
+
});
|
|
6062
|
+
})
|
|
6063
|
+
);
|
|
5995
6064
|
var ListPlansStatus$inboundSchema = inboundSchema(ListPlansStatus);
|
|
5996
6065
|
var ListPlansAttachAction$inboundSchema = inboundSchema(ListPlansAttachAction);
|
|
5997
6066
|
var ListPlansCustomerEligibility$inboundSchema = z35.pipe(
|
|
@@ -6025,6 +6094,7 @@ var ListPlansList$inboundSchema = z35.pipe(
|
|
|
6025
6094
|
env: ListPlansEnv$inboundSchema,
|
|
6026
6095
|
archived: boolean2(),
|
|
6027
6096
|
base_variant_id: nullable(string4()),
|
|
6097
|
+
config: z35.lazy(() => ListPlansConfig$inboundSchema),
|
|
6028
6098
|
customer_eligibility: optional2(
|
|
6029
6099
|
z35.lazy(() => ListPlansCustomerEligibility$inboundSchema)
|
|
6030
6100
|
)
|
|
@@ -7913,6 +7983,18 @@ var PreviewUpdateInvoiceMode$outboundSchema = z40.pipe(
|
|
|
7913
7983
|
);
|
|
7914
7984
|
var PreviewUpdateProrationBehavior$outboundSchema = z40.enum(PreviewUpdateProrationBehavior);
|
|
7915
7985
|
var PreviewUpdateRedirectMode$outboundSchema = z40.enum(PreviewUpdateRedirectMode);
|
|
7986
|
+
var PreviewUpdateAttachDiscount$outboundSchema = z40.pipe(
|
|
7987
|
+
z40.object({
|
|
7988
|
+
rewardId: z40.optional(z40.string()),
|
|
7989
|
+
promotionCode: z40.optional(z40.string())
|
|
7990
|
+
}),
|
|
7991
|
+
z40.transform((v) => {
|
|
7992
|
+
return remap(v, {
|
|
7993
|
+
rewardId: "reward_id",
|
|
7994
|
+
promotionCode: "promotion_code"
|
|
7995
|
+
});
|
|
7996
|
+
})
|
|
7997
|
+
);
|
|
7916
7998
|
var PreviewUpdateCancelAction$outboundSchema = z40.enum(PreviewUpdateCancelAction);
|
|
7917
7999
|
var PreviewUpdateRecalculateBalances$outboundSchema = z40.object({
|
|
7918
8000
|
enabled: z40.boolean()
|
|
@@ -7938,6 +8020,9 @@ var PreviewUpdateParams$outboundSchema = z40.pipe(
|
|
|
7938
8020
|
"if_required"
|
|
7939
8021
|
),
|
|
7940
8022
|
subscriptionId: z40.optional(z40.string()),
|
|
8023
|
+
discounts: z40.optional(
|
|
8024
|
+
z40.array(z40.lazy(() => PreviewUpdateAttachDiscount$outboundSchema))
|
|
8025
|
+
),
|
|
7941
8026
|
cancelAction: z40.optional(PreviewUpdateCancelAction$outboundSchema),
|
|
7942
8027
|
billingCycleAnchor: z40.optional(z40.literal("now")),
|
|
7943
8028
|
noBillingChanges: z40.optional(z40.boolean()),
|
|
@@ -9704,6 +9789,16 @@ var UpdatePlanFreeTrialParams$outboundSchema = z48.pipe(
|
|
|
9704
9789
|
});
|
|
9705
9790
|
})
|
|
9706
9791
|
);
|
|
9792
|
+
var UpdatePlanConfigRequest$outboundSchema = z48.pipe(
|
|
9793
|
+
z48.object({
|
|
9794
|
+
ignorePastDue: z48._default(z48.boolean(), false)
|
|
9795
|
+
}),
|
|
9796
|
+
z48.transform((v) => {
|
|
9797
|
+
return remap(v, {
|
|
9798
|
+
ignorePastDue: "ignore_past_due"
|
|
9799
|
+
});
|
|
9800
|
+
})
|
|
9801
|
+
);
|
|
9707
9802
|
var UpdatePlanParams$outboundSchema = z48.pipe(
|
|
9708
9803
|
z48.object({
|
|
9709
9804
|
planId: z48.string(),
|
|
@@ -9719,6 +9814,7 @@ var UpdatePlanParams$outboundSchema = z48.pipe(
|
|
|
9719
9814
|
freeTrial: z48.optional(
|
|
9720
9815
|
z48.nullable(z48.lazy(() => UpdatePlanFreeTrialParams$outboundSchema))
|
|
9721
9816
|
),
|
|
9817
|
+
config: z48.optional(z48.lazy(() => UpdatePlanConfigRequest$outboundSchema)),
|
|
9722
9818
|
version: z48.optional(z48.number()),
|
|
9723
9819
|
archived: z48._default(z48.boolean(), false),
|
|
9724
9820
|
newPlanId: z48.optional(z48.string())
|
|
@@ -9896,6 +9992,16 @@ var UpdatePlanFreeTrial$inboundSchema = z48.pipe(
|
|
|
9896
9992
|
})
|
|
9897
9993
|
);
|
|
9898
9994
|
var UpdatePlanEnv$inboundSchema = inboundSchema(UpdatePlanEnv);
|
|
9995
|
+
var UpdatePlanConfigResponse$inboundSchema = z48.pipe(
|
|
9996
|
+
z48.object({
|
|
9997
|
+
ignore_past_due: z48._default(boolean2(), false)
|
|
9998
|
+
}),
|
|
9999
|
+
z48.transform((v) => {
|
|
10000
|
+
return remap(v, {
|
|
10001
|
+
"ignore_past_due": "ignorePastDue"
|
|
10002
|
+
});
|
|
10003
|
+
})
|
|
10004
|
+
);
|
|
9899
10005
|
var UpdatePlanStatus$inboundSchema = inboundSchema(UpdatePlanStatus);
|
|
9900
10006
|
var UpdatePlanAttachAction$inboundSchema = inboundSchema(UpdatePlanAttachAction);
|
|
9901
10007
|
var UpdatePlanCustomerEligibility$inboundSchema = z48.pipe(
|
|
@@ -9929,6 +10035,7 @@ var UpdatePlanResponse$inboundSchema = z48.pipe(
|
|
|
9929
10035
|
env: UpdatePlanEnv$inboundSchema,
|
|
9930
10036
|
archived: boolean2(),
|
|
9931
10037
|
base_variant_id: nullable(string4()),
|
|
10038
|
+
config: z48.lazy(() => UpdatePlanConfigResponse$inboundSchema),
|
|
9932
10039
|
customer_eligibility: optional2(
|
|
9933
10040
|
z48.lazy(() => UpdatePlanCustomerEligibility$inboundSchema)
|
|
9934
10041
|
)
|
|
@@ -10187,10 +10294,14 @@ var FailOpenHook = class {
|
|
|
10187
10294
|
fetcher: async (input, init) => {
|
|
10188
10295
|
try {
|
|
10189
10296
|
return init == null ? await fetch(input) : await fetch(input, init);
|
|
10190
|
-
} catch {
|
|
10297
|
+
} catch (error) {
|
|
10298
|
+
console.log(error);
|
|
10299
|
+
console.log(
|
|
10300
|
+
`Network failed to reach Autumn: ${error}. Returning 555 Network Error.`
|
|
10301
|
+
);
|
|
10191
10302
|
return new Response(null, {
|
|
10192
|
-
status:
|
|
10193
|
-
statusText: "
|
|
10303
|
+
status: 555,
|
|
10304
|
+
statusText: "Network Error"
|
|
10194
10305
|
});
|
|
10195
10306
|
}
|
|
10196
10307
|
}
|
|
@@ -11914,6 +12025,7 @@ var Billing = class extends ClientSDK {
|
|
|
11914
12025
|
* @param prorationBehavior - How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges. (optional)
|
|
11915
12026
|
* @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)
|
|
11916
12027
|
* @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)
|
|
12028
|
+
* @param discounts - List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code. (optional)
|
|
11917
12029
|
* @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)
|
|
11918
12030
|
* @param billingCycleAnchor - Reset the billing cycle anchor immediately with 'now' (optional)
|
|
11919
12031
|
* @param noBillingChanges - If true, the subscription is updated internally without applying billing changes in Stripe. (optional)
|
|
@@ -11949,6 +12061,7 @@ var Billing = class extends ClientSDK {
|
|
|
11949
12061
|
* @param prorationBehavior - How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges. (optional)
|
|
11950
12062
|
* @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)
|
|
11951
12063
|
* @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)
|
|
12064
|
+
* @param discounts - List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code. (optional)
|
|
11952
12065
|
* @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)
|
|
11953
12066
|
* @param billingCycleAnchor - Reset the billing cycle anchor immediately with 'now' (optional)
|
|
11954
12067
|
* @param noBillingChanges - If true, the subscription is updated internally without applying billing changes in Stripe. (optional)
|
|
@@ -13950,6 +14063,7 @@ var Plans = class extends ClientSDK {
|
|
|
13950
14063
|
* @param price - Base recurring price for the plan. Omit for free or usage-only plans. (optional)
|
|
13951
14064
|
* @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
|
|
13952
14065
|
* @param freeTrial - Free trial configuration. Customers can try this plan before being charged. (optional)
|
|
14066
|
+
* @param config - Miscellaneous plan-level configuration flags. (optional)
|
|
13953
14067
|
*
|
|
13954
14068
|
* @returns The created plan object.
|
|
13955
14069
|
*/
|
|
@@ -14055,6 +14169,7 @@ var Plans = class extends ClientSDK {
|
|
|
14055
14169
|
* @param price - The price of the plan. Set to null to remove the base price. (optional)
|
|
14056
14170
|
* @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
|
|
14057
14171
|
* @param freeTrial - The free trial of the plan. Set to null to remove the free trial. (optional)
|
|
14172
|
+
* @param config - Miscellaneous plan-level configuration flags. (optional)
|
|
14058
14173
|
* @param newPlanId - The new ID to use for the plan. Can only be updated if the plan has not been used by any customers. (optional)
|
|
14059
14174
|
*
|
|
14060
14175
|
* @returns The updated plan object.
|
|
@@ -14923,6 +15038,9 @@ var listPlansItemDisplaySchema = import_v46.z.object({
|
|
|
14923
15038
|
primaryText: import_v46.z.string(),
|
|
14924
15039
|
secondaryText: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional()
|
|
14925
15040
|
});
|
|
15041
|
+
var listPlansConfigSchema = import_v46.z.object({
|
|
15042
|
+
ignorePastDue: import_v46.z.boolean()
|
|
15043
|
+
});
|
|
14926
15044
|
var listPlansParamsOutboundSchema = import_v46.z.object({
|
|
14927
15045
|
customer_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
|
|
14928
15046
|
entity_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
|
|
@@ -15011,6 +15129,7 @@ var listPlansListSchema = import_v46.z.object({
|
|
|
15011
15129
|
env: listPlansEnvSchema,
|
|
15012
15130
|
archived: import_v46.z.boolean(),
|
|
15013
15131
|
baseVariantId: import_v46.z.string().nullable(),
|
|
15132
|
+
config: listPlansConfigSchema,
|
|
15014
15133
|
customerEligibility: import_v46.z.union([listPlansCustomerEligibilitySchema, import_v46.z.undefined()]).optional()
|
|
15015
15134
|
});
|
|
15016
15135
|
var listPlansResponseSchema = import_v46.z.object({
|
|
@@ -16017,6 +16136,10 @@ var previewUpdateInvoiceModeSchema = import_v411.z.object({
|
|
|
16017
16136
|
enablePlanImmediately: import_v411.z.union([import_v411.z.boolean(), import_v411.z.undefined()]).optional(),
|
|
16018
16137
|
finalize: import_v411.z.union([import_v411.z.boolean(), import_v411.z.undefined()]).optional()
|
|
16019
16138
|
});
|
|
16139
|
+
var previewUpdateAttachDiscountSchema = import_v411.z.object({
|
|
16140
|
+
rewardId: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16141
|
+
promotionCode: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional()
|
|
16142
|
+
});
|
|
16020
16143
|
var previewUpdateRecalculateBalancesSchema = import_v411.z.object({
|
|
16021
16144
|
enabled: import_v411.z.boolean()
|
|
16022
16145
|
});
|
|
@@ -16151,6 +16274,10 @@ var previewUpdateInvoiceModeOutboundSchema = import_v411.z.object({
|
|
|
16151
16274
|
enable_plan_immediately: import_v411.z.boolean(),
|
|
16152
16275
|
finalize: import_v411.z.boolean()
|
|
16153
16276
|
});
|
|
16277
|
+
var previewUpdateAttachDiscountOutboundSchema = import_v411.z.object({
|
|
16278
|
+
reward_id: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16279
|
+
promotion_code: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional()
|
|
16280
|
+
});
|
|
16154
16281
|
var previewUpdateRecalculateBalancesOutboundSchema = import_v411.z.object({
|
|
16155
16282
|
enabled: import_v411.z.boolean()
|
|
16156
16283
|
});
|
|
@@ -16168,6 +16295,7 @@ var previewUpdateParamsOutboundSchema = import_v411.z.object({
|
|
|
16168
16295
|
proration_behavior: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16169
16296
|
redirect_mode: import_v411.z.string(),
|
|
16170
16297
|
subscription_id: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16298
|
+
discounts: import_v411.z.union([import_v411.z.array(previewUpdateAttachDiscountOutboundSchema), import_v411.z.undefined()]).optional(),
|
|
16171
16299
|
cancel_action: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16172
16300
|
billing_cycle_anchor: import_v411.z.union([import_v411.z.literal("now"), import_v411.z.undefined()]).optional(),
|
|
16173
16301
|
no_billing_changes: import_v411.z.union([import_v411.z.boolean(), import_v411.z.undefined()]).optional(),
|
|
@@ -16247,6 +16375,7 @@ var previewUpdateParamsSchema = import_v411.z.object({
|
|
|
16247
16375
|
prorationBehavior: import_v411.z.union([previewUpdateProrationBehaviorSchema, import_v411.z.undefined()]).optional(),
|
|
16248
16376
|
redirectMode: import_v411.z.union([previewUpdateRedirectModeSchema, import_v411.z.undefined()]).optional(),
|
|
16249
16377
|
subscriptionId: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16378
|
+
discounts: import_v411.z.union([import_v411.z.array(previewUpdateAttachDiscountSchema), import_v411.z.undefined()]).optional(),
|
|
16250
16379
|
cancelAction: import_v411.z.union([previewUpdateCancelActionSchema, import_v411.z.undefined()]).optional(),
|
|
16251
16380
|
billingCycleAnchor: import_v411.z.union([import_v411.z.literal("now"), import_v411.z.undefined()]).optional(),
|
|
16252
16381
|
noBillingChanges: import_v411.z.union([import_v411.z.boolean(), import_v411.z.undefined()]).optional(),
|
|
@@ -16534,6 +16663,10 @@ var billingUpdateInvoiceModeSchema = import_v414.z.object({
|
|
|
16534
16663
|
enablePlanImmediately: import_v414.z.union([import_v414.z.boolean(), import_v414.z.undefined()]).optional(),
|
|
16535
16664
|
finalize: import_v414.z.union([import_v414.z.boolean(), import_v414.z.undefined()]).optional()
|
|
16536
16665
|
});
|
|
16666
|
+
var billingUpdateAttachDiscountSchema = import_v414.z.object({
|
|
16667
|
+
rewardId: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16668
|
+
promotionCode: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional()
|
|
16669
|
+
});
|
|
16537
16670
|
var billingUpdateRecalculateBalancesSchema = import_v414.z.object({
|
|
16538
16671
|
enabled: import_v414.z.boolean()
|
|
16539
16672
|
});
|
|
@@ -16608,6 +16741,10 @@ var billingUpdateInvoiceModeOutboundSchema = import_v414.z.object({
|
|
|
16608
16741
|
enable_plan_immediately: import_v414.z.boolean(),
|
|
16609
16742
|
finalize: import_v414.z.boolean()
|
|
16610
16743
|
});
|
|
16744
|
+
var billingUpdateAttachDiscountOutboundSchema = import_v414.z.object({
|
|
16745
|
+
reward_id: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16746
|
+
promotion_code: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional()
|
|
16747
|
+
});
|
|
16611
16748
|
var billingUpdateRecalculateBalancesOutboundSchema = import_v414.z.object({
|
|
16612
16749
|
enabled: import_v414.z.boolean()
|
|
16613
16750
|
});
|
|
@@ -16622,6 +16759,7 @@ var updateSubscriptionParamsOutboundSchema = import_v414.z.object({
|
|
|
16622
16759
|
proration_behavior: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16623
16760
|
redirect_mode: import_v414.z.string(),
|
|
16624
16761
|
subscription_id: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16762
|
+
discounts: import_v414.z.union([import_v414.z.array(billingUpdateAttachDiscountOutboundSchema), import_v414.z.undefined()]).optional(),
|
|
16625
16763
|
cancel_action: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16626
16764
|
billing_cycle_anchor: import_v414.z.union([import_v414.z.literal("now"), import_v414.z.undefined()]).optional(),
|
|
16627
16765
|
no_billing_changes: import_v414.z.union([import_v414.z.boolean(), import_v414.z.undefined()]).optional(),
|
|
@@ -16700,6 +16838,7 @@ var updateSubscriptionParamsSchema = import_v414.z.object({
|
|
|
16700
16838
|
prorationBehavior: import_v414.z.union([billingUpdateProrationBehaviorSchema, import_v414.z.undefined()]).optional(),
|
|
16701
16839
|
redirectMode: import_v414.z.union([billingUpdateRedirectModeSchema, import_v414.z.undefined()]).optional(),
|
|
16702
16840
|
subscriptionId: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16841
|
+
discounts: import_v414.z.union([import_v414.z.array(billingUpdateAttachDiscountSchema), import_v414.z.undefined()]).optional(),
|
|
16703
16842
|
cancelAction: import_v414.z.union([billingUpdateCancelActionSchema, import_v414.z.undefined()]).optional(),
|
|
16704
16843
|
billingCycleAnchor: import_v414.z.union([import_v414.z.literal("now"), import_v414.z.undefined()]).optional(),
|
|
16705
16844
|
noBillingChanges: import_v414.z.union([import_v414.z.boolean(), import_v414.z.undefined()]).optional(),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createHandleBetterAuthRoute
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-ZZGFPTHO.mjs";
|
|
4
4
|
import "../chunk-J2WYVGHS.mjs";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-JIFD4TSN.mjs";
|
|
6
6
|
import "../chunk-BT3EAYVW.mjs";
|
|
7
7
|
export {
|
|
8
8
|
createHandleBetterAuthRoute
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
export { H as HandleBetterAuthRouteFn, c as createAutumnEndpoint } from '../createAutumnEndpoint-
|
|
1
|
+
export { H as HandleBetterAuthRouteFn, c as createAutumnEndpoint } from '../createAutumnEndpoint-CvXRCg-M.mjs';
|
|
2
2
|
export { getActiveOrganization } from './getActiveOrganization.mjs';
|
|
3
3
|
export { CreateHandleBetterAuthRouteOptions, createHandleBetterAuthRoute } from './handleBetterAuthRoute.mjs';
|
|
4
4
|
export { omitProtectedBodyFields } from './omitProtectedBodyFields.mjs';
|
|
5
5
|
export { resolveIdentityFromScope } from './resolveIdentityFromScope.mjs';
|
|
6
|
-
import '
|
|
7
|
-
import '
|
|
8
|
-
import './context.mjs';
|
|
9
|
-
import './middleware.mjs';
|
|
10
|
-
import './openapi.mjs';
|
|
11
|
-
import 'zod';
|
|
6
|
+
import '../../../../../node_modules/better-call/dist/endpoint.mjs';
|
|
7
|
+
import 'zod/v4';
|
|
12
8
|
import 'zod/v4/core';
|
|
13
9
|
import '../types.mjs';
|
|
14
|
-
import 'zod/v4';
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
export { H as HandleBetterAuthRouteFn, c as createAutumnEndpoint } from '../createAutumnEndpoint-
|
|
1
|
+
export { H as HandleBetterAuthRouteFn, c as createAutumnEndpoint } from '../createAutumnEndpoint-CvXRCg-M.js';
|
|
2
2
|
export { getActiveOrganization } from './getActiveOrganization.js';
|
|
3
3
|
export { CreateHandleBetterAuthRouteOptions, createHandleBetterAuthRoute } from './handleBetterAuthRoute.js';
|
|
4
4
|
export { omitProtectedBodyFields } from './omitProtectedBodyFields.js';
|
|
5
5
|
export { resolveIdentityFromScope } from './resolveIdentityFromScope.js';
|
|
6
|
-
import '
|
|
7
|
-
import '
|
|
8
|
-
import './context.mjs';
|
|
9
|
-
import './middleware.mjs';
|
|
10
|
-
import './openapi.mjs';
|
|
11
|
-
import 'zod';
|
|
6
|
+
import '../../../../../node_modules/better-call/dist/endpoint.mjs';
|
|
7
|
+
import 'zod/v4';
|
|
12
8
|
import 'zod/v4/core';
|
|
13
9
|
import '../types.js';
|
|
14
|
-
import 'zod/v4';
|