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
|
@@ -2179,6 +2179,18 @@ var BillingUpdateInvoiceMode$outboundSchema = z12.pipe(
|
|
|
2179
2179
|
);
|
|
2180
2180
|
var BillingUpdateProrationBehavior$outboundSchema = z12.enum(BillingUpdateProrationBehavior);
|
|
2181
2181
|
var BillingUpdateRedirectMode$outboundSchema = z12.enum(BillingUpdateRedirectMode);
|
|
2182
|
+
var BillingUpdateAttachDiscount$outboundSchema = z12.pipe(
|
|
2183
|
+
z12.object({
|
|
2184
|
+
rewardId: z12.optional(z12.string()),
|
|
2185
|
+
promotionCode: z12.optional(z12.string())
|
|
2186
|
+
}),
|
|
2187
|
+
z12.transform((v) => {
|
|
2188
|
+
return remap(v, {
|
|
2189
|
+
rewardId: "reward_id",
|
|
2190
|
+
promotionCode: "promotion_code"
|
|
2191
|
+
});
|
|
2192
|
+
})
|
|
2193
|
+
);
|
|
2182
2194
|
var BillingUpdateCancelAction$outboundSchema = z12.enum(BillingUpdateCancelAction);
|
|
2183
2195
|
var BillingUpdateRecalculateBalances$outboundSchema = z12.object({
|
|
2184
2196
|
enabled: z12.boolean()
|
|
@@ -2204,6 +2216,9 @@ var UpdateSubscriptionParams$outboundSchema = z12.pipe(
|
|
|
2204
2216
|
"if_required"
|
|
2205
2217
|
),
|
|
2206
2218
|
subscriptionId: z12.optional(z12.string()),
|
|
2219
|
+
discounts: z12.optional(
|
|
2220
|
+
z12.array(z12.lazy(() => BillingUpdateAttachDiscount$outboundSchema))
|
|
2221
|
+
),
|
|
2207
2222
|
cancelAction: z12.optional(BillingUpdateCancelAction$outboundSchema),
|
|
2208
2223
|
billingCycleAnchor: z12.optional(z12.literal("now")),
|
|
2209
2224
|
noBillingChanges: z12.optional(z12.boolean()),
|
|
@@ -3067,6 +3082,16 @@ var FreeTrial$inboundSchema = z16.pipe(
|
|
|
3067
3082
|
})
|
|
3068
3083
|
);
|
|
3069
3084
|
var PlanEnv$inboundSchema = inboundSchema(PlanEnv);
|
|
3085
|
+
var PlanConfig$inboundSchema = z16.pipe(
|
|
3086
|
+
z16.object({
|
|
3087
|
+
ignore_past_due: z16._default(boolean2(), false)
|
|
3088
|
+
}),
|
|
3089
|
+
z16.transform((v) => {
|
|
3090
|
+
return remap(v, {
|
|
3091
|
+
"ignore_past_due": "ignorePastDue"
|
|
3092
|
+
});
|
|
3093
|
+
})
|
|
3094
|
+
);
|
|
3070
3095
|
var PlanStatus$inboundSchema = inboundSchema(PlanStatus);
|
|
3071
3096
|
var AttachAction$inboundSchema = inboundSchema(AttachAction);
|
|
3072
3097
|
var CustomerEligibility$inboundSchema = z16.pipe(
|
|
@@ -3100,6 +3125,7 @@ var Plan$inboundSchema = z16.pipe(
|
|
|
3100
3125
|
env: PlanEnv$inboundSchema,
|
|
3101
3126
|
archived: boolean2(),
|
|
3102
3127
|
base_variant_id: nullable(string4()),
|
|
3128
|
+
config: z16.lazy(() => PlanConfig$inboundSchema),
|
|
3103
3129
|
customer_eligibility: optional2(z16.lazy(
|
|
3104
3130
|
() => CustomerEligibility$inboundSchema
|
|
3105
3131
|
))
|
|
@@ -3780,6 +3806,16 @@ var FreeTrialRequest$outboundSchema = z19.pipe(
|
|
|
3780
3806
|
});
|
|
3781
3807
|
})
|
|
3782
3808
|
);
|
|
3809
|
+
var CreatePlanConfigRequest$outboundSchema = z19.pipe(
|
|
3810
|
+
z19.object({
|
|
3811
|
+
ignorePastDue: z19._default(z19.boolean(), false)
|
|
3812
|
+
}),
|
|
3813
|
+
z19.transform((v) => {
|
|
3814
|
+
return remap(v, {
|
|
3815
|
+
ignorePastDue: "ignore_past_due"
|
|
3816
|
+
});
|
|
3817
|
+
})
|
|
3818
|
+
);
|
|
3783
3819
|
var CreatePlanParams$outboundSchema = z19.pipe(
|
|
3784
3820
|
z19.object({
|
|
3785
3821
|
planId: z19.string(),
|
|
@@ -3790,7 +3826,8 @@ var CreatePlanParams$outboundSchema = z19.pipe(
|
|
|
3790
3826
|
autoEnable: z19._default(z19.boolean(), false),
|
|
3791
3827
|
price: z19.optional(z19.lazy(() => CreatePlanPriceRequest$outboundSchema)),
|
|
3792
3828
|
items: z19.optional(z19.array(z19.lazy(() => CreatePlanPlanItem$outboundSchema))),
|
|
3793
|
-
freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema))
|
|
3829
|
+
freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema)),
|
|
3830
|
+
config: z19.optional(z19.lazy(() => CreatePlanConfigRequest$outboundSchema))
|
|
3794
3831
|
}),
|
|
3795
3832
|
z19.transform((v) => {
|
|
3796
3833
|
return remap(v, {
|
|
@@ -3964,6 +4001,16 @@ var CreatePlanFreeTrialResponse$inboundSchema = z19.pipe(
|
|
|
3964
4001
|
})
|
|
3965
4002
|
);
|
|
3966
4003
|
var CreatePlanEnv$inboundSchema = inboundSchema(CreatePlanEnv);
|
|
4004
|
+
var CreatePlanConfigResponse$inboundSchema = z19.pipe(
|
|
4005
|
+
z19.object({
|
|
4006
|
+
ignore_past_due: z19._default(boolean2(), false)
|
|
4007
|
+
}),
|
|
4008
|
+
z19.transform((v) => {
|
|
4009
|
+
return remap(v, {
|
|
4010
|
+
"ignore_past_due": "ignorePastDue"
|
|
4011
|
+
});
|
|
4012
|
+
})
|
|
4013
|
+
);
|
|
3967
4014
|
var CreatePlanStatus$inboundSchema = inboundSchema(CreatePlanStatus);
|
|
3968
4015
|
var CreatePlanAttachAction$inboundSchema = inboundSchema(CreatePlanAttachAction);
|
|
3969
4016
|
var CreatePlanCustomerEligibility$inboundSchema = z19.pipe(
|
|
@@ -3999,6 +4046,7 @@ var CreatePlanResponse$inboundSchema = z19.pipe(
|
|
|
3999
4046
|
env: CreatePlanEnv$inboundSchema,
|
|
4000
4047
|
archived: boolean2(),
|
|
4001
4048
|
base_variant_id: nullable(string4()),
|
|
4049
|
+
config: z19.lazy(() => CreatePlanConfigResponse$inboundSchema),
|
|
4002
4050
|
customer_eligibility: optional2(
|
|
4003
4051
|
z19.lazy(() => CreatePlanCustomerEligibility$inboundSchema)
|
|
4004
4052
|
)
|
|
@@ -5251,6 +5299,16 @@ var GetPlanFreeTrial$inboundSchema = z31.pipe(
|
|
|
5251
5299
|
})
|
|
5252
5300
|
);
|
|
5253
5301
|
var GetPlanEnv$inboundSchema = inboundSchema(GetPlanEnv);
|
|
5302
|
+
var GetPlanConfig$inboundSchema = z31.pipe(
|
|
5303
|
+
z31.object({
|
|
5304
|
+
ignore_past_due: z31._default(boolean2(), false)
|
|
5305
|
+
}),
|
|
5306
|
+
z31.transform((v) => {
|
|
5307
|
+
return remap(v, {
|
|
5308
|
+
"ignore_past_due": "ignorePastDue"
|
|
5309
|
+
});
|
|
5310
|
+
})
|
|
5311
|
+
);
|
|
5254
5312
|
var GetPlanStatus$inboundSchema = inboundSchema(GetPlanStatus);
|
|
5255
5313
|
var GetPlanAttachAction$inboundSchema = inboundSchema(GetPlanAttachAction);
|
|
5256
5314
|
var GetPlanCustomerEligibility$inboundSchema = z31.pipe(
|
|
@@ -5284,6 +5342,7 @@ var GetPlanResponse$inboundSchema = z31.pipe(
|
|
|
5284
5342
|
env: GetPlanEnv$inboundSchema,
|
|
5285
5343
|
archived: boolean2(),
|
|
5286
5344
|
base_variant_id: nullable(string4()),
|
|
5345
|
+
config: z31.lazy(() => GetPlanConfig$inboundSchema),
|
|
5287
5346
|
customer_eligibility: optional2(
|
|
5288
5347
|
z31.lazy(() => GetPlanCustomerEligibility$inboundSchema)
|
|
5289
5348
|
)
|
|
@@ -5994,6 +6053,16 @@ var ListPlansFreeTrial$inboundSchema = z35.pipe(
|
|
|
5994
6053
|
})
|
|
5995
6054
|
);
|
|
5996
6055
|
var ListPlansEnv$inboundSchema = inboundSchema(ListPlansEnv);
|
|
6056
|
+
var ListPlansConfig$inboundSchema = z35.pipe(
|
|
6057
|
+
z35.object({
|
|
6058
|
+
ignore_past_due: z35._default(boolean2(), false)
|
|
6059
|
+
}),
|
|
6060
|
+
z35.transform((v) => {
|
|
6061
|
+
return remap(v, {
|
|
6062
|
+
"ignore_past_due": "ignorePastDue"
|
|
6063
|
+
});
|
|
6064
|
+
})
|
|
6065
|
+
);
|
|
5997
6066
|
var ListPlansStatus$inboundSchema = inboundSchema(ListPlansStatus);
|
|
5998
6067
|
var ListPlansAttachAction$inboundSchema = inboundSchema(ListPlansAttachAction);
|
|
5999
6068
|
var ListPlansCustomerEligibility$inboundSchema = z35.pipe(
|
|
@@ -6027,6 +6096,7 @@ var ListPlansList$inboundSchema = z35.pipe(
|
|
|
6027
6096
|
env: ListPlansEnv$inboundSchema,
|
|
6028
6097
|
archived: boolean2(),
|
|
6029
6098
|
base_variant_id: nullable(string4()),
|
|
6099
|
+
config: z35.lazy(() => ListPlansConfig$inboundSchema),
|
|
6030
6100
|
customer_eligibility: optional2(
|
|
6031
6101
|
z35.lazy(() => ListPlansCustomerEligibility$inboundSchema)
|
|
6032
6102
|
)
|
|
@@ -7915,6 +7985,18 @@ var PreviewUpdateInvoiceMode$outboundSchema = z40.pipe(
|
|
|
7915
7985
|
);
|
|
7916
7986
|
var PreviewUpdateProrationBehavior$outboundSchema = z40.enum(PreviewUpdateProrationBehavior);
|
|
7917
7987
|
var PreviewUpdateRedirectMode$outboundSchema = z40.enum(PreviewUpdateRedirectMode);
|
|
7988
|
+
var PreviewUpdateAttachDiscount$outboundSchema = z40.pipe(
|
|
7989
|
+
z40.object({
|
|
7990
|
+
rewardId: z40.optional(z40.string()),
|
|
7991
|
+
promotionCode: z40.optional(z40.string())
|
|
7992
|
+
}),
|
|
7993
|
+
z40.transform((v) => {
|
|
7994
|
+
return remap(v, {
|
|
7995
|
+
rewardId: "reward_id",
|
|
7996
|
+
promotionCode: "promotion_code"
|
|
7997
|
+
});
|
|
7998
|
+
})
|
|
7999
|
+
);
|
|
7918
8000
|
var PreviewUpdateCancelAction$outboundSchema = z40.enum(PreviewUpdateCancelAction);
|
|
7919
8001
|
var PreviewUpdateRecalculateBalances$outboundSchema = z40.object({
|
|
7920
8002
|
enabled: z40.boolean()
|
|
@@ -7940,6 +8022,9 @@ var PreviewUpdateParams$outboundSchema = z40.pipe(
|
|
|
7940
8022
|
"if_required"
|
|
7941
8023
|
),
|
|
7942
8024
|
subscriptionId: z40.optional(z40.string()),
|
|
8025
|
+
discounts: z40.optional(
|
|
8026
|
+
z40.array(z40.lazy(() => PreviewUpdateAttachDiscount$outboundSchema))
|
|
8027
|
+
),
|
|
7943
8028
|
cancelAction: z40.optional(PreviewUpdateCancelAction$outboundSchema),
|
|
7944
8029
|
billingCycleAnchor: z40.optional(z40.literal("now")),
|
|
7945
8030
|
noBillingChanges: z40.optional(z40.boolean()),
|
|
@@ -9706,6 +9791,16 @@ var UpdatePlanFreeTrialParams$outboundSchema = z48.pipe(
|
|
|
9706
9791
|
});
|
|
9707
9792
|
})
|
|
9708
9793
|
);
|
|
9794
|
+
var UpdatePlanConfigRequest$outboundSchema = z48.pipe(
|
|
9795
|
+
z48.object({
|
|
9796
|
+
ignorePastDue: z48._default(z48.boolean(), false)
|
|
9797
|
+
}),
|
|
9798
|
+
z48.transform((v) => {
|
|
9799
|
+
return remap(v, {
|
|
9800
|
+
ignorePastDue: "ignore_past_due"
|
|
9801
|
+
});
|
|
9802
|
+
})
|
|
9803
|
+
);
|
|
9709
9804
|
var UpdatePlanParams$outboundSchema = z48.pipe(
|
|
9710
9805
|
z48.object({
|
|
9711
9806
|
planId: z48.string(),
|
|
@@ -9721,6 +9816,7 @@ var UpdatePlanParams$outboundSchema = z48.pipe(
|
|
|
9721
9816
|
freeTrial: z48.optional(
|
|
9722
9817
|
z48.nullable(z48.lazy(() => UpdatePlanFreeTrialParams$outboundSchema))
|
|
9723
9818
|
),
|
|
9819
|
+
config: z48.optional(z48.lazy(() => UpdatePlanConfigRequest$outboundSchema)),
|
|
9724
9820
|
version: z48.optional(z48.number()),
|
|
9725
9821
|
archived: z48._default(z48.boolean(), false),
|
|
9726
9822
|
newPlanId: z48.optional(z48.string())
|
|
@@ -9898,6 +9994,16 @@ var UpdatePlanFreeTrial$inboundSchema = z48.pipe(
|
|
|
9898
9994
|
})
|
|
9899
9995
|
);
|
|
9900
9996
|
var UpdatePlanEnv$inboundSchema = inboundSchema(UpdatePlanEnv);
|
|
9997
|
+
var UpdatePlanConfigResponse$inboundSchema = z48.pipe(
|
|
9998
|
+
z48.object({
|
|
9999
|
+
ignore_past_due: z48._default(boolean2(), false)
|
|
10000
|
+
}),
|
|
10001
|
+
z48.transform((v) => {
|
|
10002
|
+
return remap(v, {
|
|
10003
|
+
"ignore_past_due": "ignorePastDue"
|
|
10004
|
+
});
|
|
10005
|
+
})
|
|
10006
|
+
);
|
|
9901
10007
|
var UpdatePlanStatus$inboundSchema = inboundSchema(UpdatePlanStatus);
|
|
9902
10008
|
var UpdatePlanAttachAction$inboundSchema = inboundSchema(UpdatePlanAttachAction);
|
|
9903
10009
|
var UpdatePlanCustomerEligibility$inboundSchema = z48.pipe(
|
|
@@ -9931,6 +10037,7 @@ var UpdatePlanResponse$inboundSchema = z48.pipe(
|
|
|
9931
10037
|
env: UpdatePlanEnv$inboundSchema,
|
|
9932
10038
|
archived: boolean2(),
|
|
9933
10039
|
base_variant_id: nullable(string4()),
|
|
10040
|
+
config: z48.lazy(() => UpdatePlanConfigResponse$inboundSchema),
|
|
9934
10041
|
customer_eligibility: optional2(
|
|
9935
10042
|
z48.lazy(() => UpdatePlanCustomerEligibility$inboundSchema)
|
|
9936
10043
|
)
|
|
@@ -10189,10 +10296,14 @@ var FailOpenHook = class {
|
|
|
10189
10296
|
fetcher: async (input, init) => {
|
|
10190
10297
|
try {
|
|
10191
10298
|
return init == null ? await fetch(input) : await fetch(input, init);
|
|
10192
|
-
} catch {
|
|
10299
|
+
} catch (error) {
|
|
10300
|
+
console.log(error);
|
|
10301
|
+
console.log(
|
|
10302
|
+
`Network failed to reach Autumn: ${error}. Returning 555 Network Error.`
|
|
10303
|
+
);
|
|
10193
10304
|
return new Response(null, {
|
|
10194
|
-
status:
|
|
10195
|
-
statusText: "
|
|
10305
|
+
status: 555,
|
|
10306
|
+
statusText: "Network Error"
|
|
10196
10307
|
});
|
|
10197
10308
|
}
|
|
10198
10309
|
}
|
|
@@ -11916,6 +12027,7 @@ var Billing = class extends ClientSDK {
|
|
|
11916
12027
|
* @param prorationBehavior - How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges. (optional)
|
|
11917
12028
|
* @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)
|
|
11918
12029
|
* @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)
|
|
12030
|
+
* @param discounts - List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code. (optional)
|
|
11919
12031
|
* @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)
|
|
11920
12032
|
* @param billingCycleAnchor - Reset the billing cycle anchor immediately with 'now' (optional)
|
|
11921
12033
|
* @param noBillingChanges - If true, the subscription is updated internally without applying billing changes in Stripe. (optional)
|
|
@@ -11951,6 +12063,7 @@ var Billing = class extends ClientSDK {
|
|
|
11951
12063
|
* @param prorationBehavior - How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges. (optional)
|
|
11952
12064
|
* @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)
|
|
11953
12065
|
* @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)
|
|
12066
|
+
* @param discounts - List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code. (optional)
|
|
11954
12067
|
* @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)
|
|
11955
12068
|
* @param billingCycleAnchor - Reset the billing cycle anchor immediately with 'now' (optional)
|
|
11956
12069
|
* @param noBillingChanges - If true, the subscription is updated internally without applying billing changes in Stripe. (optional)
|
|
@@ -13952,6 +14065,7 @@ var Plans = class extends ClientSDK {
|
|
|
13952
14065
|
* @param price - Base recurring price for the plan. Omit for free or usage-only plans. (optional)
|
|
13953
14066
|
* @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
|
|
13954
14067
|
* @param freeTrial - Free trial configuration. Customers can try this plan before being charged. (optional)
|
|
14068
|
+
* @param config - Miscellaneous plan-level configuration flags. (optional)
|
|
13955
14069
|
*
|
|
13956
14070
|
* @returns The created plan object.
|
|
13957
14071
|
*/
|
|
@@ -14057,6 +14171,7 @@ var Plans = class extends ClientSDK {
|
|
|
14057
14171
|
* @param price - The price of the plan. Set to null to remove the base price. (optional)
|
|
14058
14172
|
* @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
|
|
14059
14173
|
* @param freeTrial - The free trial of the plan. Set to null to remove the free trial. (optional)
|
|
14174
|
+
* @param config - Miscellaneous plan-level configuration flags. (optional)
|
|
14060
14175
|
* @param newPlanId - The new ID to use for the plan. Can only be updated if the plan has not been used by any customers. (optional)
|
|
14061
14176
|
*
|
|
14062
14177
|
* @returns The updated plan object.
|
|
@@ -14942,6 +15057,9 @@ var listPlansItemDisplaySchema = import_v46.z.object({
|
|
|
14942
15057
|
primaryText: import_v46.z.string(),
|
|
14943
15058
|
secondaryText: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional()
|
|
14944
15059
|
});
|
|
15060
|
+
var listPlansConfigSchema = import_v46.z.object({
|
|
15061
|
+
ignorePastDue: import_v46.z.boolean()
|
|
15062
|
+
});
|
|
14945
15063
|
var listPlansParamsOutboundSchema = import_v46.z.object({
|
|
14946
15064
|
customer_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
|
|
14947
15065
|
entity_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
|
|
@@ -15030,6 +15148,7 @@ var listPlansListSchema = import_v46.z.object({
|
|
|
15030
15148
|
env: listPlansEnvSchema,
|
|
15031
15149
|
archived: import_v46.z.boolean(),
|
|
15032
15150
|
baseVariantId: import_v46.z.string().nullable(),
|
|
15151
|
+
config: listPlansConfigSchema,
|
|
15033
15152
|
customerEligibility: import_v46.z.union([listPlansCustomerEligibilitySchema, import_v46.z.undefined()]).optional()
|
|
15034
15153
|
});
|
|
15035
15154
|
var listPlansResponseSchema = import_v46.z.object({
|
|
@@ -16036,6 +16155,10 @@ var previewUpdateInvoiceModeSchema = import_v411.z.object({
|
|
|
16036
16155
|
enablePlanImmediately: import_v411.z.union([import_v411.z.boolean(), import_v411.z.undefined()]).optional(),
|
|
16037
16156
|
finalize: import_v411.z.union([import_v411.z.boolean(), import_v411.z.undefined()]).optional()
|
|
16038
16157
|
});
|
|
16158
|
+
var previewUpdateAttachDiscountSchema = import_v411.z.object({
|
|
16159
|
+
rewardId: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16160
|
+
promotionCode: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional()
|
|
16161
|
+
});
|
|
16039
16162
|
var previewUpdateRecalculateBalancesSchema = import_v411.z.object({
|
|
16040
16163
|
enabled: import_v411.z.boolean()
|
|
16041
16164
|
});
|
|
@@ -16170,6 +16293,10 @@ var previewUpdateInvoiceModeOutboundSchema = import_v411.z.object({
|
|
|
16170
16293
|
enable_plan_immediately: import_v411.z.boolean(),
|
|
16171
16294
|
finalize: import_v411.z.boolean()
|
|
16172
16295
|
});
|
|
16296
|
+
var previewUpdateAttachDiscountOutboundSchema = import_v411.z.object({
|
|
16297
|
+
reward_id: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16298
|
+
promotion_code: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional()
|
|
16299
|
+
});
|
|
16173
16300
|
var previewUpdateRecalculateBalancesOutboundSchema = import_v411.z.object({
|
|
16174
16301
|
enabled: import_v411.z.boolean()
|
|
16175
16302
|
});
|
|
@@ -16187,6 +16314,7 @@ var previewUpdateParamsOutboundSchema = import_v411.z.object({
|
|
|
16187
16314
|
proration_behavior: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16188
16315
|
redirect_mode: import_v411.z.string(),
|
|
16189
16316
|
subscription_id: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16317
|
+
discounts: import_v411.z.union([import_v411.z.array(previewUpdateAttachDiscountOutboundSchema), import_v411.z.undefined()]).optional(),
|
|
16190
16318
|
cancel_action: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16191
16319
|
billing_cycle_anchor: import_v411.z.union([import_v411.z.literal("now"), import_v411.z.undefined()]).optional(),
|
|
16192
16320
|
no_billing_changes: import_v411.z.union([import_v411.z.boolean(), import_v411.z.undefined()]).optional(),
|
|
@@ -16266,6 +16394,7 @@ var previewUpdateParamsSchema = import_v411.z.object({
|
|
|
16266
16394
|
prorationBehavior: import_v411.z.union([previewUpdateProrationBehaviorSchema, import_v411.z.undefined()]).optional(),
|
|
16267
16395
|
redirectMode: import_v411.z.union([previewUpdateRedirectModeSchema, import_v411.z.undefined()]).optional(),
|
|
16268
16396
|
subscriptionId: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16397
|
+
discounts: import_v411.z.union([import_v411.z.array(previewUpdateAttachDiscountSchema), import_v411.z.undefined()]).optional(),
|
|
16269
16398
|
cancelAction: import_v411.z.union([previewUpdateCancelActionSchema, import_v411.z.undefined()]).optional(),
|
|
16270
16399
|
billingCycleAnchor: import_v411.z.union([import_v411.z.literal("now"), import_v411.z.undefined()]).optional(),
|
|
16271
16400
|
noBillingChanges: import_v411.z.union([import_v411.z.boolean(), import_v411.z.undefined()]).optional(),
|
|
@@ -16553,6 +16682,10 @@ var billingUpdateInvoiceModeSchema = import_v414.z.object({
|
|
|
16553
16682
|
enablePlanImmediately: import_v414.z.union([import_v414.z.boolean(), import_v414.z.undefined()]).optional(),
|
|
16554
16683
|
finalize: import_v414.z.union([import_v414.z.boolean(), import_v414.z.undefined()]).optional()
|
|
16555
16684
|
});
|
|
16685
|
+
var billingUpdateAttachDiscountSchema = import_v414.z.object({
|
|
16686
|
+
rewardId: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16687
|
+
promotionCode: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional()
|
|
16688
|
+
});
|
|
16556
16689
|
var billingUpdateRecalculateBalancesSchema = import_v414.z.object({
|
|
16557
16690
|
enabled: import_v414.z.boolean()
|
|
16558
16691
|
});
|
|
@@ -16627,6 +16760,10 @@ var billingUpdateInvoiceModeOutboundSchema = import_v414.z.object({
|
|
|
16627
16760
|
enable_plan_immediately: import_v414.z.boolean(),
|
|
16628
16761
|
finalize: import_v414.z.boolean()
|
|
16629
16762
|
});
|
|
16763
|
+
var billingUpdateAttachDiscountOutboundSchema = import_v414.z.object({
|
|
16764
|
+
reward_id: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16765
|
+
promotion_code: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional()
|
|
16766
|
+
});
|
|
16630
16767
|
var billingUpdateRecalculateBalancesOutboundSchema = import_v414.z.object({
|
|
16631
16768
|
enabled: import_v414.z.boolean()
|
|
16632
16769
|
});
|
|
@@ -16641,6 +16778,7 @@ var updateSubscriptionParamsOutboundSchema = import_v414.z.object({
|
|
|
16641
16778
|
proration_behavior: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16642
16779
|
redirect_mode: import_v414.z.string(),
|
|
16643
16780
|
subscription_id: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16781
|
+
discounts: import_v414.z.union([import_v414.z.array(billingUpdateAttachDiscountOutboundSchema), import_v414.z.undefined()]).optional(),
|
|
16644
16782
|
cancel_action: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16645
16783
|
billing_cycle_anchor: import_v414.z.union([import_v414.z.literal("now"), import_v414.z.undefined()]).optional(),
|
|
16646
16784
|
no_billing_changes: import_v414.z.union([import_v414.z.boolean(), import_v414.z.undefined()]).optional(),
|
|
@@ -16719,6 +16857,7 @@ var updateSubscriptionParamsSchema = import_v414.z.object({
|
|
|
16719
16857
|
prorationBehavior: import_v414.z.union([billingUpdateProrationBehaviorSchema, import_v414.z.undefined()]).optional(),
|
|
16720
16858
|
redirectMode: import_v414.z.union([billingUpdateRedirectModeSchema, import_v414.z.undefined()]).optional(),
|
|
16721
16859
|
subscriptionId: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16860
|
+
discounts: import_v414.z.union([import_v414.z.array(billingUpdateAttachDiscountSchema), import_v414.z.undefined()]).optional(),
|
|
16722
16861
|
cancelAction: import_v414.z.union([billingUpdateCancelActionSchema, import_v414.z.undefined()]).optional(),
|
|
16723
16862
|
billingCycleAnchor: import_v414.z.union([import_v414.z.literal("now"), import_v414.z.undefined()]).optional(),
|
|
16724
16863
|
noBillingChanges: import_v414.z.union([import_v414.z.boolean(), import_v414.z.undefined()]).optional(),
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autumnHandler
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-7BVATYGA.mjs";
|
|
4
4
|
import {
|
|
5
5
|
autumnHandler as autumnHandler2
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-RPH5L44S.mjs";
|
|
7
7
|
import {
|
|
8
8
|
autumnHandler as autumnHandler3
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-DNNJOZAT.mjs";
|
|
10
10
|
import {
|
|
11
11
|
autumnHandler as autumnHandler4
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-OUDB34Y7.mjs";
|
|
13
13
|
import "../chunk-WYDGEDEU.mjs";
|
|
14
14
|
import "../chunk-VXND2UDT.mjs";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-AY6OV7CM.mjs";
|
|
18
|
-
import "../chunk-55C2WWXQ.mjs";
|
|
19
|
-
import "../chunk-TBQ27LIK.mjs";
|
|
20
|
-
import "../chunk-J44WR3QZ.mjs";
|
|
15
|
+
import "../chunk-EJGHP7KT.mjs";
|
|
16
|
+
import "../chunk-YSQQKZBU.mjs";
|
|
21
17
|
import "../chunk-TSF4YCUO.mjs";
|
|
22
18
|
import "../chunk-UAR3TMWI.mjs";
|
|
23
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-T42RZEUZ.mjs";
|
|
20
|
+
import "../chunk-MANTLPDT.mjs";
|
|
21
|
+
import "../chunk-S5HPMJ4U.mjs";
|
|
24
22
|
import "../chunk-OTXV5FY7.mjs";
|
|
25
23
|
import "../chunk-VZIMT7AO.mjs";
|
|
26
24
|
import "../chunk-Z6QP3YEA.mjs";
|
|
25
|
+
import "../chunk-TBQ27LIK.mjs";
|
|
26
|
+
import "../chunk-J44WR3QZ.mjs";
|
|
27
27
|
import "../chunk-N7NFYY54.mjs";
|
|
28
28
|
export {
|
|
29
29
|
autumnHandler as expressAutumnHandler,
|