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.
|
|
@@ -14940,6 +15055,9 @@ var listPlansItemDisplaySchema = import_v46.z.object({
|
|
|
14940
15055
|
primaryText: import_v46.z.string(),
|
|
14941
15056
|
secondaryText: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional()
|
|
14942
15057
|
});
|
|
15058
|
+
var listPlansConfigSchema = import_v46.z.object({
|
|
15059
|
+
ignorePastDue: import_v46.z.boolean()
|
|
15060
|
+
});
|
|
14943
15061
|
var listPlansParamsOutboundSchema = import_v46.z.object({
|
|
14944
15062
|
customer_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
|
|
14945
15063
|
entity_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
|
|
@@ -15028,6 +15146,7 @@ var listPlansListSchema = import_v46.z.object({
|
|
|
15028
15146
|
env: listPlansEnvSchema,
|
|
15029
15147
|
archived: import_v46.z.boolean(),
|
|
15030
15148
|
baseVariantId: import_v46.z.string().nullable(),
|
|
15149
|
+
config: listPlansConfigSchema,
|
|
15031
15150
|
customerEligibility: import_v46.z.union([listPlansCustomerEligibilitySchema, import_v46.z.undefined()]).optional()
|
|
15032
15151
|
});
|
|
15033
15152
|
var listPlansResponseSchema = import_v46.z.object({
|
|
@@ -16034,6 +16153,10 @@ var previewUpdateInvoiceModeSchema = import_v411.z.object({
|
|
|
16034
16153
|
enablePlanImmediately: import_v411.z.union([import_v411.z.boolean(), import_v411.z.undefined()]).optional(),
|
|
16035
16154
|
finalize: import_v411.z.union([import_v411.z.boolean(), import_v411.z.undefined()]).optional()
|
|
16036
16155
|
});
|
|
16156
|
+
var previewUpdateAttachDiscountSchema = import_v411.z.object({
|
|
16157
|
+
rewardId: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16158
|
+
promotionCode: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional()
|
|
16159
|
+
});
|
|
16037
16160
|
var previewUpdateRecalculateBalancesSchema = import_v411.z.object({
|
|
16038
16161
|
enabled: import_v411.z.boolean()
|
|
16039
16162
|
});
|
|
@@ -16168,6 +16291,10 @@ var previewUpdateInvoiceModeOutboundSchema = import_v411.z.object({
|
|
|
16168
16291
|
enable_plan_immediately: import_v411.z.boolean(),
|
|
16169
16292
|
finalize: import_v411.z.boolean()
|
|
16170
16293
|
});
|
|
16294
|
+
var previewUpdateAttachDiscountOutboundSchema = import_v411.z.object({
|
|
16295
|
+
reward_id: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16296
|
+
promotion_code: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional()
|
|
16297
|
+
});
|
|
16171
16298
|
var previewUpdateRecalculateBalancesOutboundSchema = import_v411.z.object({
|
|
16172
16299
|
enabled: import_v411.z.boolean()
|
|
16173
16300
|
});
|
|
@@ -16185,6 +16312,7 @@ var previewUpdateParamsOutboundSchema = import_v411.z.object({
|
|
|
16185
16312
|
proration_behavior: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16186
16313
|
redirect_mode: import_v411.z.string(),
|
|
16187
16314
|
subscription_id: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16315
|
+
discounts: import_v411.z.union([import_v411.z.array(previewUpdateAttachDiscountOutboundSchema), import_v411.z.undefined()]).optional(),
|
|
16188
16316
|
cancel_action: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16189
16317
|
billing_cycle_anchor: import_v411.z.union([import_v411.z.literal("now"), import_v411.z.undefined()]).optional(),
|
|
16190
16318
|
no_billing_changes: import_v411.z.union([import_v411.z.boolean(), import_v411.z.undefined()]).optional(),
|
|
@@ -16264,6 +16392,7 @@ var previewUpdateParamsSchema = import_v411.z.object({
|
|
|
16264
16392
|
prorationBehavior: import_v411.z.union([previewUpdateProrationBehaviorSchema, import_v411.z.undefined()]).optional(),
|
|
16265
16393
|
redirectMode: import_v411.z.union([previewUpdateRedirectModeSchema, import_v411.z.undefined()]).optional(),
|
|
16266
16394
|
subscriptionId: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
16395
|
+
discounts: import_v411.z.union([import_v411.z.array(previewUpdateAttachDiscountSchema), import_v411.z.undefined()]).optional(),
|
|
16267
16396
|
cancelAction: import_v411.z.union([previewUpdateCancelActionSchema, import_v411.z.undefined()]).optional(),
|
|
16268
16397
|
billingCycleAnchor: import_v411.z.union([import_v411.z.literal("now"), import_v411.z.undefined()]).optional(),
|
|
16269
16398
|
noBillingChanges: import_v411.z.union([import_v411.z.boolean(), import_v411.z.undefined()]).optional(),
|
|
@@ -16551,6 +16680,10 @@ var billingUpdateInvoiceModeSchema = import_v414.z.object({
|
|
|
16551
16680
|
enablePlanImmediately: import_v414.z.union([import_v414.z.boolean(), import_v414.z.undefined()]).optional(),
|
|
16552
16681
|
finalize: import_v414.z.union([import_v414.z.boolean(), import_v414.z.undefined()]).optional()
|
|
16553
16682
|
});
|
|
16683
|
+
var billingUpdateAttachDiscountSchema = import_v414.z.object({
|
|
16684
|
+
rewardId: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16685
|
+
promotionCode: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional()
|
|
16686
|
+
});
|
|
16554
16687
|
var billingUpdateRecalculateBalancesSchema = import_v414.z.object({
|
|
16555
16688
|
enabled: import_v414.z.boolean()
|
|
16556
16689
|
});
|
|
@@ -16625,6 +16758,10 @@ var billingUpdateInvoiceModeOutboundSchema = import_v414.z.object({
|
|
|
16625
16758
|
enable_plan_immediately: import_v414.z.boolean(),
|
|
16626
16759
|
finalize: import_v414.z.boolean()
|
|
16627
16760
|
});
|
|
16761
|
+
var billingUpdateAttachDiscountOutboundSchema = import_v414.z.object({
|
|
16762
|
+
reward_id: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16763
|
+
promotion_code: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional()
|
|
16764
|
+
});
|
|
16628
16765
|
var billingUpdateRecalculateBalancesOutboundSchema = import_v414.z.object({
|
|
16629
16766
|
enabled: import_v414.z.boolean()
|
|
16630
16767
|
});
|
|
@@ -16639,6 +16776,7 @@ var updateSubscriptionParamsOutboundSchema = import_v414.z.object({
|
|
|
16639
16776
|
proration_behavior: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16640
16777
|
redirect_mode: import_v414.z.string(),
|
|
16641
16778
|
subscription_id: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16779
|
+
discounts: import_v414.z.union([import_v414.z.array(billingUpdateAttachDiscountOutboundSchema), import_v414.z.undefined()]).optional(),
|
|
16642
16780
|
cancel_action: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16643
16781
|
billing_cycle_anchor: import_v414.z.union([import_v414.z.literal("now"), import_v414.z.undefined()]).optional(),
|
|
16644
16782
|
no_billing_changes: import_v414.z.union([import_v414.z.boolean(), import_v414.z.undefined()]).optional(),
|
|
@@ -16717,6 +16855,7 @@ var updateSubscriptionParamsSchema = import_v414.z.object({
|
|
|
16717
16855
|
prorationBehavior: import_v414.z.union([billingUpdateProrationBehaviorSchema, import_v414.z.undefined()]).optional(),
|
|
16718
16856
|
redirectMode: import_v414.z.union([billingUpdateRedirectModeSchema, import_v414.z.undefined()]).optional(),
|
|
16719
16857
|
subscriptionId: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
16858
|
+
discounts: import_v414.z.union([import_v414.z.array(billingUpdateAttachDiscountSchema), import_v414.z.undefined()]).optional(),
|
|
16720
16859
|
cancelAction: import_v414.z.union([billingUpdateCancelActionSchema, import_v414.z.undefined()]).optional(),
|
|
16721
16860
|
billingCycleAnchor: import_v414.z.union([import_v414.z.literal("now"), import_v414.z.undefined()]).optional(),
|
|
16722
16861
|
noBillingChanges: import_v414.z.union([import_v414.z.boolean(), import_v414.z.undefined()]).optional(),
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autumnHandler
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-OUDB34Y7.mjs";
|
|
4
4
|
import "../chunk-WYDGEDEU.mjs";
|
|
5
5
|
import "../chunk-VXND2UDT.mjs";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-AY6OV7CM.mjs";
|
|
9
|
-
import "../chunk-55C2WWXQ.mjs";
|
|
10
|
-
import "../chunk-TBQ27LIK.mjs";
|
|
11
|
-
import "../chunk-J44WR3QZ.mjs";
|
|
6
|
+
import "../chunk-EJGHP7KT.mjs";
|
|
7
|
+
import "../chunk-YSQQKZBU.mjs";
|
|
12
8
|
import "../chunk-TSF4YCUO.mjs";
|
|
13
9
|
import "../chunk-UAR3TMWI.mjs";
|
|
14
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-T42RZEUZ.mjs";
|
|
11
|
+
import "../chunk-MANTLPDT.mjs";
|
|
12
|
+
import "../chunk-S5HPMJ4U.mjs";
|
|
15
13
|
import "../chunk-OTXV5FY7.mjs";
|
|
16
14
|
import "../chunk-VZIMT7AO.mjs";
|
|
17
15
|
import "../chunk-Z6QP3YEA.mjs";
|
|
16
|
+
import "../chunk-TBQ27LIK.mjs";
|
|
17
|
+
import "../chunk-J44WR3QZ.mjs";
|
|
18
18
|
import "../chunk-N7NFYY54.mjs";
|
|
19
19
|
export {
|
|
20
20
|
autumnHandler
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Autumn
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
executeRoute
|
|
6
|
-
} from "./chunk-55C2WWXQ.mjs";
|
|
3
|
+
} from "./chunk-T42RZEUZ.mjs";
|
|
7
4
|
import {
|
|
8
5
|
routeConfigs
|
|
9
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MANTLPDT.mjs";
|
|
7
|
+
import {
|
|
8
|
+
executeRoute
|
|
9
|
+
} from "./chunk-S5HPMJ4U.mjs";
|
|
10
10
|
import {
|
|
11
11
|
secretKeyCheck
|
|
12
12
|
} from "./chunk-VZIMT7AO.mjs";
|
|
@@ -539,6 +539,9 @@ var listPlansItemDisplaySchema = z6.object({
|
|
|
539
539
|
primaryText: z6.string(),
|
|
540
540
|
secondaryText: z6.union([z6.string(), z6.undefined()]).optional()
|
|
541
541
|
});
|
|
542
|
+
var listPlansConfigSchema = z6.object({
|
|
543
|
+
ignorePastDue: z6.boolean()
|
|
544
|
+
});
|
|
542
545
|
var listPlansParamsOutboundSchema = z6.object({
|
|
543
546
|
customer_id: z6.union([z6.string(), z6.undefined()]).optional(),
|
|
544
547
|
entity_id: z6.union([z6.string(), z6.undefined()]).optional(),
|
|
@@ -627,6 +630,7 @@ var listPlansListSchema = z6.object({
|
|
|
627
630
|
env: listPlansEnvSchema,
|
|
628
631
|
archived: z6.boolean(),
|
|
629
632
|
baseVariantId: z6.string().nullable(),
|
|
633
|
+
config: listPlansConfigSchema,
|
|
630
634
|
customerEligibility: z6.union([listPlansCustomerEligibilitySchema, z6.undefined()]).optional()
|
|
631
635
|
});
|
|
632
636
|
var listPlansResponseSchema = z6.object({
|
|
@@ -1633,6 +1637,10 @@ var previewUpdateInvoiceModeSchema = z11.object({
|
|
|
1633
1637
|
enablePlanImmediately: z11.union([z11.boolean(), z11.undefined()]).optional(),
|
|
1634
1638
|
finalize: z11.union([z11.boolean(), z11.undefined()]).optional()
|
|
1635
1639
|
});
|
|
1640
|
+
var previewUpdateAttachDiscountSchema = z11.object({
|
|
1641
|
+
rewardId: z11.union([z11.string(), z11.undefined()]).optional(),
|
|
1642
|
+
promotionCode: z11.union([z11.string(), z11.undefined()]).optional()
|
|
1643
|
+
});
|
|
1636
1644
|
var previewUpdateRecalculateBalancesSchema = z11.object({
|
|
1637
1645
|
enabled: z11.boolean()
|
|
1638
1646
|
});
|
|
@@ -1767,6 +1775,10 @@ var previewUpdateInvoiceModeOutboundSchema = z11.object({
|
|
|
1767
1775
|
enable_plan_immediately: z11.boolean(),
|
|
1768
1776
|
finalize: z11.boolean()
|
|
1769
1777
|
});
|
|
1778
|
+
var previewUpdateAttachDiscountOutboundSchema = z11.object({
|
|
1779
|
+
reward_id: z11.union([z11.string(), z11.undefined()]).optional(),
|
|
1780
|
+
promotion_code: z11.union([z11.string(), z11.undefined()]).optional()
|
|
1781
|
+
});
|
|
1770
1782
|
var previewUpdateRecalculateBalancesOutboundSchema = z11.object({
|
|
1771
1783
|
enabled: z11.boolean()
|
|
1772
1784
|
});
|
|
@@ -1784,6 +1796,7 @@ var previewUpdateParamsOutboundSchema = z11.object({
|
|
|
1784
1796
|
proration_behavior: z11.union([z11.string(), z11.undefined()]).optional(),
|
|
1785
1797
|
redirect_mode: z11.string(),
|
|
1786
1798
|
subscription_id: z11.union([z11.string(), z11.undefined()]).optional(),
|
|
1799
|
+
discounts: z11.union([z11.array(previewUpdateAttachDiscountOutboundSchema), z11.undefined()]).optional(),
|
|
1787
1800
|
cancel_action: z11.union([z11.string(), z11.undefined()]).optional(),
|
|
1788
1801
|
billing_cycle_anchor: z11.union([z11.literal("now"), z11.undefined()]).optional(),
|
|
1789
1802
|
no_billing_changes: z11.union([z11.boolean(), z11.undefined()]).optional(),
|
|
@@ -1863,6 +1876,7 @@ var previewUpdateParamsSchema = z11.object({
|
|
|
1863
1876
|
prorationBehavior: z11.union([previewUpdateProrationBehaviorSchema, z11.undefined()]).optional(),
|
|
1864
1877
|
redirectMode: z11.union([previewUpdateRedirectModeSchema, z11.undefined()]).optional(),
|
|
1865
1878
|
subscriptionId: z11.union([z11.string(), z11.undefined()]).optional(),
|
|
1879
|
+
discounts: z11.union([z11.array(previewUpdateAttachDiscountSchema), z11.undefined()]).optional(),
|
|
1866
1880
|
cancelAction: z11.union([previewUpdateCancelActionSchema, z11.undefined()]).optional(),
|
|
1867
1881
|
billingCycleAnchor: z11.union([z11.literal("now"), z11.undefined()]).optional(),
|
|
1868
1882
|
noBillingChanges: z11.union([z11.boolean(), z11.undefined()]).optional(),
|
|
@@ -2150,6 +2164,10 @@ var billingUpdateInvoiceModeSchema = z14.object({
|
|
|
2150
2164
|
enablePlanImmediately: z14.union([z14.boolean(), z14.undefined()]).optional(),
|
|
2151
2165
|
finalize: z14.union([z14.boolean(), z14.undefined()]).optional()
|
|
2152
2166
|
});
|
|
2167
|
+
var billingUpdateAttachDiscountSchema = z14.object({
|
|
2168
|
+
rewardId: z14.union([z14.string(), z14.undefined()]).optional(),
|
|
2169
|
+
promotionCode: z14.union([z14.string(), z14.undefined()]).optional()
|
|
2170
|
+
});
|
|
2153
2171
|
var billingUpdateRecalculateBalancesSchema = z14.object({
|
|
2154
2172
|
enabled: z14.boolean()
|
|
2155
2173
|
});
|
|
@@ -2224,6 +2242,10 @@ var billingUpdateInvoiceModeOutboundSchema = z14.object({
|
|
|
2224
2242
|
enable_plan_immediately: z14.boolean(),
|
|
2225
2243
|
finalize: z14.boolean()
|
|
2226
2244
|
});
|
|
2245
|
+
var billingUpdateAttachDiscountOutboundSchema = z14.object({
|
|
2246
|
+
reward_id: z14.union([z14.string(), z14.undefined()]).optional(),
|
|
2247
|
+
promotion_code: z14.union([z14.string(), z14.undefined()]).optional()
|
|
2248
|
+
});
|
|
2227
2249
|
var billingUpdateRecalculateBalancesOutboundSchema = z14.object({
|
|
2228
2250
|
enabled: z14.boolean()
|
|
2229
2251
|
});
|
|
@@ -2238,6 +2260,7 @@ var updateSubscriptionParamsOutboundSchema = z14.object({
|
|
|
2238
2260
|
proration_behavior: z14.union([z14.string(), z14.undefined()]).optional(),
|
|
2239
2261
|
redirect_mode: z14.string(),
|
|
2240
2262
|
subscription_id: z14.union([z14.string(), z14.undefined()]).optional(),
|
|
2263
|
+
discounts: z14.union([z14.array(billingUpdateAttachDiscountOutboundSchema), z14.undefined()]).optional(),
|
|
2241
2264
|
cancel_action: z14.union([z14.string(), z14.undefined()]).optional(),
|
|
2242
2265
|
billing_cycle_anchor: z14.union([z14.literal("now"), z14.undefined()]).optional(),
|
|
2243
2266
|
no_billing_changes: z14.union([z14.boolean(), z14.undefined()]).optional(),
|
|
@@ -2316,6 +2339,7 @@ var updateSubscriptionParamsSchema = z14.object({
|
|
|
2316
2339
|
prorationBehavior: z14.union([billingUpdateProrationBehaviorSchema, z14.undefined()]).optional(),
|
|
2317
2340
|
redirectMode: z14.union([billingUpdateRedirectModeSchema, z14.undefined()]).optional(),
|
|
2318
2341
|
subscriptionId: z14.union([z14.string(), z14.undefined()]).optional(),
|
|
2342
|
+
discounts: z14.union([z14.array(billingUpdateAttachDiscountSchema), z14.undefined()]).optional(),
|
|
2319
2343
|
cancelAction: z14.union([billingUpdateCancelActionSchema, z14.undefined()]).optional(),
|
|
2320
2344
|
billingCycleAnchor: z14.union([z14.literal("now"), z14.undefined()]).optional(),
|
|
2321
2345
|
noBillingChanges: z14.union([z14.boolean(), z14.undefined()]).optional(),
|