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