autumn-js 1.2.12 → 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 +91 -4
- package/dist/backend/adapters/express.mjs +6 -6
- package/dist/backend/adapters/fetch.js +91 -4
- package/dist/backend/adapters/fetch.mjs +6 -6
- package/dist/backend/adapters/hono.js +91 -4
- package/dist/backend/adapters/hono.mjs +6 -6
- package/dist/backend/adapters/index.js +91 -4
- package/dist/backend/adapters/index.mjs +9 -9
- package/dist/backend/adapters/next.js +91 -4
- package/dist/backend/adapters/next.mjs +6 -6
- package/dist/backend/{chunk-JQX5WYYY.mjs → chunk-7BVATYGA.mjs} +1 -1
- package/dist/backend/{chunk-7Q77N2K2.mjs → chunk-DNNJOZAT.mjs} +1 -1
- package/dist/backend/{chunk-N53PKNZ6.mjs → chunk-EJGHP7KT.mjs} +2 -2
- package/dist/backend/{chunk-X4LPDDOP.mjs → chunk-MANTLPDT.mjs} +4 -0
- package/dist/backend/{chunk-4Q54RXI2.mjs → chunk-OUDB34Y7.mjs} +1 -1
- package/dist/backend/{chunk-SE5CK5NY.mjs → chunk-RPH5L44S.mjs} +1 -1
- package/dist/backend/{chunk-UEYDU64U.mjs → chunk-T42RZEUZ.mjs} +87 -4
- package/dist/backend/{chunk-ITXMMCSD.mjs → chunk-YSQQKZBU.mjs} +2 -2
- 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 +91 -4
- package/dist/backend/core/handlers/coreHandler.mjs +4 -4
- 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 +1 -1
- package/dist/backend/core/handlers/handleRouteByName.js +91 -4
- package/dist/backend/core/handlers/handleRouteByName.mjs +4 -4
- 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 +91 -4
- package/dist/backend/core/handlers/index.mjs +5 -5
- package/dist/backend/core/index.d.mts +1 -1
- package/dist/backend/core/index.d.ts +1 -1
- package/dist/backend/core/index.js +91 -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 +4 -0
- package/dist/backend/core/routes/index.mjs +2 -2
- 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 +4 -0
- package/dist/backend/core/routes/routeConfigs.mjs +2 -2
- 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/core/utils/index.mjs +3 -3
- package/dist/backend/index.d.mts +2 -2
- package/dist/backend/index.d.ts +2 -2
- package/dist/backend/index.js +91 -4
- package/dist/backend/index.mjs +7 -7
- package/dist/backend/{routeTypes-D0ag5-Tb.d.ts → routeTypes-B94_Mq2J.d.ts} +93 -0
- package/dist/backend/{routeTypes-Cu-XQy7A.d.mts → routeTypes-DVwngaBn.d.mts} +93 -0
- package/dist/better-auth/{chunk-TEP6CVHR.mjs → chunk-4OWECHZC.mjs} +1 -1
- package/dist/better-auth/{chunk-GKUK5UGW.mjs → chunk-JIFD4TSN.mjs} +4 -0
- package/dist/better-auth/{chunk-XFATOIZD.mjs → chunk-ZZGFPTHO.mjs} +88 -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 +91 -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 +4 -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 +91 -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 +91 -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-By0MIRsJ.d.ts → params-B5l9vHfZ.d.ts} +1 -1
- package/dist/react/{params-CUb0ZlUG.d.mts → params-BVglT8vT.d.mts} +1 -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 +125 -1
- package/dist/sdk/index.d.ts +125 -1
- package/dist/sdk/index.js +146 -4
- package/dist/sdk/index.mjs +133 -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/sdk/index.js
CHANGED
|
@@ -3598,6 +3598,23 @@ function freeTrialFromJSON(jsonString) {
|
|
|
3598
3598
|
);
|
|
3599
3599
|
}
|
|
3600
3600
|
var PlanEnv$inboundSchema = inboundSchema(PlanEnv);
|
|
3601
|
+
var PlanConfig$inboundSchema = z39__namespace.pipe(
|
|
3602
|
+
z39__namespace.object({
|
|
3603
|
+
ignore_past_due: z39__namespace._default(boolean2(), false)
|
|
3604
|
+
}),
|
|
3605
|
+
z39__namespace.transform((v) => {
|
|
3606
|
+
return remap(v, {
|
|
3607
|
+
"ignore_past_due": "ignorePastDue"
|
|
3608
|
+
});
|
|
3609
|
+
})
|
|
3610
|
+
);
|
|
3611
|
+
function planConfigFromJSON(jsonString) {
|
|
3612
|
+
return safeParse(
|
|
3613
|
+
jsonString,
|
|
3614
|
+
(x) => PlanConfig$inboundSchema.parse(JSON.parse(x)),
|
|
3615
|
+
`Failed to parse 'PlanConfig' from JSON`
|
|
3616
|
+
);
|
|
3617
|
+
}
|
|
3601
3618
|
var PlanStatus$inboundSchema = inboundSchema(PlanStatus);
|
|
3602
3619
|
var AttachAction$inboundSchema = inboundSchema(AttachAction);
|
|
3603
3620
|
var CustomerEligibility$inboundSchema = z39__namespace.pipe(
|
|
@@ -3638,6 +3655,7 @@ var Plan$inboundSchema = z39__namespace.pipe(
|
|
|
3638
3655
|
env: PlanEnv$inboundSchema,
|
|
3639
3656
|
archived: boolean2(),
|
|
3640
3657
|
base_variant_id: nullable(string4()),
|
|
3658
|
+
config: z39__namespace.lazy(() => PlanConfig$inboundSchema),
|
|
3641
3659
|
customer_eligibility: optional2(z39__namespace.lazy(
|
|
3642
3660
|
() => CustomerEligibility$inboundSchema
|
|
3643
3661
|
))
|
|
@@ -4517,6 +4535,21 @@ function freeTrialRequestToJSON(freeTrialRequest) {
|
|
|
4517
4535
|
FreeTrialRequest$outboundSchema.parse(freeTrialRequest)
|
|
4518
4536
|
);
|
|
4519
4537
|
}
|
|
4538
|
+
var CreatePlanConfigRequest$outboundSchema = z39__namespace.pipe(
|
|
4539
|
+
z39__namespace.object({
|
|
4540
|
+
ignorePastDue: z39__namespace._default(z39__namespace.boolean(), false)
|
|
4541
|
+
}),
|
|
4542
|
+
z39__namespace.transform((v) => {
|
|
4543
|
+
return remap(v, {
|
|
4544
|
+
ignorePastDue: "ignore_past_due"
|
|
4545
|
+
});
|
|
4546
|
+
})
|
|
4547
|
+
);
|
|
4548
|
+
function createPlanConfigRequestToJSON(createPlanConfigRequest) {
|
|
4549
|
+
return JSON.stringify(
|
|
4550
|
+
CreatePlanConfigRequest$outboundSchema.parse(createPlanConfigRequest)
|
|
4551
|
+
);
|
|
4552
|
+
}
|
|
4520
4553
|
var CreatePlanParams$outboundSchema = z39__namespace.pipe(
|
|
4521
4554
|
z39__namespace.object({
|
|
4522
4555
|
planId: z39__namespace.string(),
|
|
@@ -4527,7 +4560,8 @@ var CreatePlanParams$outboundSchema = z39__namespace.pipe(
|
|
|
4527
4560
|
autoEnable: z39__namespace._default(z39__namespace.boolean(), false),
|
|
4528
4561
|
price: z39__namespace.optional(z39__namespace.lazy(() => CreatePlanPriceRequest$outboundSchema)),
|
|
4529
4562
|
items: z39__namespace.optional(z39__namespace.array(z39__namespace.lazy(() => CreatePlanPlanItem$outboundSchema))),
|
|
4530
|
-
freeTrial: z39__namespace.optional(z39__namespace.lazy(() => FreeTrialRequest$outboundSchema))
|
|
4563
|
+
freeTrial: z39__namespace.optional(z39__namespace.lazy(() => FreeTrialRequest$outboundSchema)),
|
|
4564
|
+
config: z39__namespace.optional(z39__namespace.lazy(() => CreatePlanConfigRequest$outboundSchema))
|
|
4531
4565
|
}),
|
|
4532
4566
|
z39__namespace.transform((v) => {
|
|
4533
4567
|
return remap(v, {
|
|
@@ -4783,6 +4817,23 @@ function createPlanFreeTrialResponseFromJSON(jsonString) {
|
|
|
4783
4817
|
);
|
|
4784
4818
|
}
|
|
4785
4819
|
var CreatePlanEnv$inboundSchema = inboundSchema(CreatePlanEnv);
|
|
4820
|
+
var CreatePlanConfigResponse$inboundSchema = z39__namespace.pipe(
|
|
4821
|
+
z39__namespace.object({
|
|
4822
|
+
ignore_past_due: z39__namespace._default(boolean2(), false)
|
|
4823
|
+
}),
|
|
4824
|
+
z39__namespace.transform((v) => {
|
|
4825
|
+
return remap(v, {
|
|
4826
|
+
"ignore_past_due": "ignorePastDue"
|
|
4827
|
+
});
|
|
4828
|
+
})
|
|
4829
|
+
);
|
|
4830
|
+
function createPlanConfigResponseFromJSON(jsonString) {
|
|
4831
|
+
return safeParse(
|
|
4832
|
+
jsonString,
|
|
4833
|
+
(x) => CreatePlanConfigResponse$inboundSchema.parse(JSON.parse(x)),
|
|
4834
|
+
`Failed to parse 'CreatePlanConfigResponse' from JSON`
|
|
4835
|
+
);
|
|
4836
|
+
}
|
|
4786
4837
|
var CreatePlanStatus$inboundSchema = inboundSchema(CreatePlanStatus);
|
|
4787
4838
|
var CreatePlanAttachAction$inboundSchema = inboundSchema(CreatePlanAttachAction);
|
|
4788
4839
|
var CreatePlanCustomerEligibility$inboundSchema = z39__namespace.pipe(
|
|
@@ -4825,6 +4876,7 @@ var CreatePlanResponse$inboundSchema = z39__namespace.pipe(
|
|
|
4825
4876
|
env: CreatePlanEnv$inboundSchema,
|
|
4826
4877
|
archived: boolean2(),
|
|
4827
4878
|
base_variant_id: nullable(string4()),
|
|
4879
|
+
config: z39__namespace.lazy(() => CreatePlanConfigResponse$inboundSchema),
|
|
4828
4880
|
customer_eligibility: optional2(
|
|
4829
4881
|
z39__namespace.lazy(() => CreatePlanCustomerEligibility$inboundSchema)
|
|
4830
4882
|
)
|
|
@@ -6524,6 +6576,23 @@ function getPlanFreeTrialFromJSON(jsonString) {
|
|
|
6524
6576
|
);
|
|
6525
6577
|
}
|
|
6526
6578
|
var GetPlanEnv$inboundSchema = inboundSchema(GetPlanEnv);
|
|
6579
|
+
var GetPlanConfig$inboundSchema = z39__namespace.pipe(
|
|
6580
|
+
z39__namespace.object({
|
|
6581
|
+
ignore_past_due: z39__namespace._default(boolean2(), false)
|
|
6582
|
+
}),
|
|
6583
|
+
z39__namespace.transform((v) => {
|
|
6584
|
+
return remap(v, {
|
|
6585
|
+
"ignore_past_due": "ignorePastDue"
|
|
6586
|
+
});
|
|
6587
|
+
})
|
|
6588
|
+
);
|
|
6589
|
+
function getPlanConfigFromJSON(jsonString) {
|
|
6590
|
+
return safeParse(
|
|
6591
|
+
jsonString,
|
|
6592
|
+
(x) => GetPlanConfig$inboundSchema.parse(JSON.parse(x)),
|
|
6593
|
+
`Failed to parse 'GetPlanConfig' from JSON`
|
|
6594
|
+
);
|
|
6595
|
+
}
|
|
6527
6596
|
var GetPlanStatus$inboundSchema = inboundSchema(GetPlanStatus);
|
|
6528
6597
|
var GetPlanAttachAction$inboundSchema = inboundSchema(GetPlanAttachAction);
|
|
6529
6598
|
var GetPlanCustomerEligibility$inboundSchema = z39__namespace.pipe(
|
|
@@ -6564,6 +6633,7 @@ var GetPlanResponse$inboundSchema = z39__namespace.pipe(
|
|
|
6564
6633
|
env: GetPlanEnv$inboundSchema,
|
|
6565
6634
|
archived: boolean2(),
|
|
6566
6635
|
base_variant_id: nullable(string4()),
|
|
6636
|
+
config: z39__namespace.lazy(() => GetPlanConfig$inboundSchema),
|
|
6567
6637
|
customer_eligibility: optional2(
|
|
6568
6638
|
z39__namespace.lazy(() => GetPlanCustomerEligibility$inboundSchema)
|
|
6569
6639
|
)
|
|
@@ -7541,6 +7611,23 @@ function listPlansFreeTrialFromJSON(jsonString) {
|
|
|
7541
7611
|
);
|
|
7542
7612
|
}
|
|
7543
7613
|
var ListPlansEnv$inboundSchema = inboundSchema(ListPlansEnv);
|
|
7614
|
+
var ListPlansConfig$inboundSchema = z39__namespace.pipe(
|
|
7615
|
+
z39__namespace.object({
|
|
7616
|
+
ignore_past_due: z39__namespace._default(boolean2(), false)
|
|
7617
|
+
}),
|
|
7618
|
+
z39__namespace.transform((v) => {
|
|
7619
|
+
return remap(v, {
|
|
7620
|
+
"ignore_past_due": "ignorePastDue"
|
|
7621
|
+
});
|
|
7622
|
+
})
|
|
7623
|
+
);
|
|
7624
|
+
function listPlansConfigFromJSON(jsonString) {
|
|
7625
|
+
return safeParse(
|
|
7626
|
+
jsonString,
|
|
7627
|
+
(x) => ListPlansConfig$inboundSchema.parse(JSON.parse(x)),
|
|
7628
|
+
`Failed to parse 'ListPlansConfig' from JSON`
|
|
7629
|
+
);
|
|
7630
|
+
}
|
|
7544
7631
|
var ListPlansStatus$inboundSchema = inboundSchema(ListPlansStatus);
|
|
7545
7632
|
var ListPlansAttachAction$inboundSchema = inboundSchema(ListPlansAttachAction);
|
|
7546
7633
|
var ListPlansCustomerEligibility$inboundSchema = z39__namespace.pipe(
|
|
@@ -7581,6 +7668,7 @@ var ListPlansList$inboundSchema = z39__namespace.pipe(
|
|
|
7581
7668
|
env: ListPlansEnv$inboundSchema,
|
|
7582
7669
|
archived: boolean2(),
|
|
7583
7670
|
base_variant_id: nullable(string4()),
|
|
7671
|
+
config: z39__namespace.lazy(() => ListPlansConfig$inboundSchema),
|
|
7584
7672
|
customer_eligibility: optional2(
|
|
7585
7673
|
z39__namespace.lazy(() => ListPlansCustomerEligibility$inboundSchema)
|
|
7586
7674
|
)
|
|
@@ -12463,6 +12551,21 @@ function updatePlanFreeTrialParamsToJSON(updatePlanFreeTrialParams) {
|
|
|
12463
12551
|
UpdatePlanFreeTrialParams$outboundSchema.parse(updatePlanFreeTrialParams)
|
|
12464
12552
|
);
|
|
12465
12553
|
}
|
|
12554
|
+
var UpdatePlanConfigRequest$outboundSchema = z39__namespace.pipe(
|
|
12555
|
+
z39__namespace.object({
|
|
12556
|
+
ignorePastDue: z39__namespace._default(z39__namespace.boolean(), false)
|
|
12557
|
+
}),
|
|
12558
|
+
z39__namespace.transform((v) => {
|
|
12559
|
+
return remap(v, {
|
|
12560
|
+
ignorePastDue: "ignore_past_due"
|
|
12561
|
+
});
|
|
12562
|
+
})
|
|
12563
|
+
);
|
|
12564
|
+
function updatePlanConfigRequestToJSON(updatePlanConfigRequest) {
|
|
12565
|
+
return JSON.stringify(
|
|
12566
|
+
UpdatePlanConfigRequest$outboundSchema.parse(updatePlanConfigRequest)
|
|
12567
|
+
);
|
|
12568
|
+
}
|
|
12466
12569
|
var UpdatePlanParams$outboundSchema = z39__namespace.pipe(
|
|
12467
12570
|
z39__namespace.object({
|
|
12468
12571
|
planId: z39__namespace.string(),
|
|
@@ -12478,6 +12581,7 @@ var UpdatePlanParams$outboundSchema = z39__namespace.pipe(
|
|
|
12478
12581
|
freeTrial: z39__namespace.optional(
|
|
12479
12582
|
z39__namespace.nullable(z39__namespace.lazy(() => UpdatePlanFreeTrialParams$outboundSchema))
|
|
12480
12583
|
),
|
|
12584
|
+
config: z39__namespace.optional(z39__namespace.lazy(() => UpdatePlanConfigRequest$outboundSchema)),
|
|
12481
12585
|
version: z39__namespace.optional(z39__namespace.number()),
|
|
12482
12586
|
archived: z39__namespace._default(z39__namespace.boolean(), false),
|
|
12483
12587
|
newPlanId: z39__namespace.optional(z39__namespace.string())
|
|
@@ -12737,6 +12841,23 @@ function updatePlanFreeTrialFromJSON(jsonString) {
|
|
|
12737
12841
|
);
|
|
12738
12842
|
}
|
|
12739
12843
|
var UpdatePlanEnv$inboundSchema = inboundSchema(UpdatePlanEnv);
|
|
12844
|
+
var UpdatePlanConfigResponse$inboundSchema = z39__namespace.pipe(
|
|
12845
|
+
z39__namespace.object({
|
|
12846
|
+
ignore_past_due: z39__namespace._default(boolean2(), false)
|
|
12847
|
+
}),
|
|
12848
|
+
z39__namespace.transform((v) => {
|
|
12849
|
+
return remap(v, {
|
|
12850
|
+
"ignore_past_due": "ignorePastDue"
|
|
12851
|
+
});
|
|
12852
|
+
})
|
|
12853
|
+
);
|
|
12854
|
+
function updatePlanConfigResponseFromJSON(jsonString) {
|
|
12855
|
+
return safeParse(
|
|
12856
|
+
jsonString,
|
|
12857
|
+
(x) => UpdatePlanConfigResponse$inboundSchema.parse(JSON.parse(x)),
|
|
12858
|
+
`Failed to parse 'UpdatePlanConfigResponse' from JSON`
|
|
12859
|
+
);
|
|
12860
|
+
}
|
|
12740
12861
|
var UpdatePlanStatus$inboundSchema = inboundSchema(UpdatePlanStatus);
|
|
12741
12862
|
var UpdatePlanAttachAction$inboundSchema = inboundSchema(UpdatePlanAttachAction);
|
|
12742
12863
|
var UpdatePlanCustomerEligibility$inboundSchema = z39__namespace.pipe(
|
|
@@ -12777,6 +12898,7 @@ var UpdatePlanResponse$inboundSchema = z39__namespace.pipe(
|
|
|
12777
12898
|
env: UpdatePlanEnv$inboundSchema,
|
|
12778
12899
|
archived: boolean2(),
|
|
12779
12900
|
base_variant_id: nullable(string4()),
|
|
12901
|
+
config: z39__namespace.lazy(() => UpdatePlanConfigResponse$inboundSchema),
|
|
12780
12902
|
customer_eligibility: optional2(
|
|
12781
12903
|
z39__namespace.lazy(() => UpdatePlanCustomerEligibility$inboundSchema)
|
|
12782
12904
|
)
|
|
@@ -13045,10 +13167,14 @@ var FailOpenHook = class {
|
|
|
13045
13167
|
fetcher: async (input, init) => {
|
|
13046
13168
|
try {
|
|
13047
13169
|
return init == null ? await fetch(input) : await fetch(input, init);
|
|
13048
|
-
} catch {
|
|
13170
|
+
} catch (error) {
|
|
13171
|
+
console.log(error);
|
|
13172
|
+
console.log(
|
|
13173
|
+
`Network failed to reach Autumn: ${error}. Returning 555 Network Error.`
|
|
13174
|
+
);
|
|
13049
13175
|
return new Response(null, {
|
|
13050
|
-
status:
|
|
13051
|
-
statusText: "
|
|
13176
|
+
status: 555,
|
|
13177
|
+
statusText: "Network Error"
|
|
13052
13178
|
});
|
|
13053
13179
|
}
|
|
13054
13180
|
}
|
|
@@ -16721,6 +16847,7 @@ var Plans = class extends ClientSDK {
|
|
|
16721
16847
|
* @param price - Base recurring price for the plan. Omit for free or usage-only plans. (optional)
|
|
16722
16848
|
* @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
|
|
16723
16849
|
* @param freeTrial - Free trial configuration. Customers can try this plan before being charged. (optional)
|
|
16850
|
+
* @param config - Miscellaneous plan-level configuration flags. (optional)
|
|
16724
16851
|
*
|
|
16725
16852
|
* @returns The created plan object.
|
|
16726
16853
|
*/
|
|
@@ -16826,6 +16953,7 @@ var Plans = class extends ClientSDK {
|
|
|
16826
16953
|
* @param price - The price of the plan. Set to null to remove the base price. (optional)
|
|
16827
16954
|
* @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
|
|
16828
16955
|
* @param freeTrial - The free trial of the plan. Set to null to remove the free trial. (optional)
|
|
16956
|
+
* @param config - Miscellaneous plan-level configuration flags. (optional)
|
|
16829
16957
|
* @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)
|
|
16830
16958
|
*
|
|
16831
16959
|
* @returns The updated plan object.
|
|
@@ -17413,6 +17541,8 @@ exports.CreatePlanBillingMethodRequest = CreatePlanBillingMethodRequest;
|
|
|
17413
17541
|
exports.CreatePlanBillingMethodRequest$outboundSchema = CreatePlanBillingMethodRequest$outboundSchema;
|
|
17414
17542
|
exports.CreatePlanBillingMethodResponse = CreatePlanBillingMethodResponse;
|
|
17415
17543
|
exports.CreatePlanBillingMethodResponse$inboundSchema = CreatePlanBillingMethodResponse$inboundSchema;
|
|
17544
|
+
exports.CreatePlanConfigRequest$outboundSchema = CreatePlanConfigRequest$outboundSchema;
|
|
17545
|
+
exports.CreatePlanConfigResponse$inboundSchema = CreatePlanConfigResponse$inboundSchema;
|
|
17416
17546
|
exports.CreatePlanCreditSchema$inboundSchema = CreatePlanCreditSchema$inboundSchema;
|
|
17417
17547
|
exports.CreatePlanCustomerEligibility$inboundSchema = CreatePlanCustomerEligibility$inboundSchema;
|
|
17418
17548
|
exports.CreatePlanDurationTypeRequest = CreatePlanDurationTypeRequest;
|
|
@@ -17583,6 +17713,7 @@ exports.GetPlanAttachAction = GetPlanAttachAction;
|
|
|
17583
17713
|
exports.GetPlanAttachAction$inboundSchema = GetPlanAttachAction$inboundSchema;
|
|
17584
17714
|
exports.GetPlanBillingMethod = GetPlanBillingMethod;
|
|
17585
17715
|
exports.GetPlanBillingMethod$inboundSchema = GetPlanBillingMethod$inboundSchema;
|
|
17716
|
+
exports.GetPlanConfig$inboundSchema = GetPlanConfig$inboundSchema;
|
|
17586
17717
|
exports.GetPlanCreditSchema$inboundSchema = GetPlanCreditSchema$inboundSchema;
|
|
17587
17718
|
exports.GetPlanCustomerEligibility$inboundSchema = GetPlanCustomerEligibility$inboundSchema;
|
|
17588
17719
|
exports.GetPlanDurationType = GetPlanDurationType;
|
|
@@ -17666,6 +17797,7 @@ exports.ListPlansAttachAction = ListPlansAttachAction;
|
|
|
17666
17797
|
exports.ListPlansAttachAction$inboundSchema = ListPlansAttachAction$inboundSchema;
|
|
17667
17798
|
exports.ListPlansBillingMethod = ListPlansBillingMethod;
|
|
17668
17799
|
exports.ListPlansBillingMethod$inboundSchema = ListPlansBillingMethod$inboundSchema;
|
|
17800
|
+
exports.ListPlansConfig$inboundSchema = ListPlansConfig$inboundSchema;
|
|
17669
17801
|
exports.ListPlansCreditSchema$inboundSchema = ListPlansCreditSchema$inboundSchema;
|
|
17670
17802
|
exports.ListPlansCustomerEligibility$inboundSchema = ListPlansCustomerEligibility$inboundSchema;
|
|
17671
17803
|
exports.ListPlansDurationType = ListPlansDurationType;
|
|
@@ -17751,6 +17883,7 @@ exports.OpenCustomerPortalResponse$inboundSchema = OpenCustomerPortalResponse$in
|
|
|
17751
17883
|
exports.Plan$inboundSchema = Plan$inboundSchema;
|
|
17752
17884
|
exports.PlanBillingMethod = PlanBillingMethod;
|
|
17753
17885
|
exports.PlanBillingMethod$inboundSchema = PlanBillingMethod$inboundSchema;
|
|
17886
|
+
exports.PlanConfig$inboundSchema = PlanConfig$inboundSchema;
|
|
17754
17887
|
exports.PlanCreditSchema$inboundSchema = PlanCreditSchema$inboundSchema;
|
|
17755
17888
|
exports.PlanDurationType = PlanDurationType;
|
|
17756
17889
|
exports.PlanDurationType$inboundSchema = PlanDurationType$inboundSchema;
|
|
@@ -18103,6 +18236,8 @@ exports.UpdatePlanBillingMethodRequest = UpdatePlanBillingMethodRequest;
|
|
|
18103
18236
|
exports.UpdatePlanBillingMethodRequest$outboundSchema = UpdatePlanBillingMethodRequest$outboundSchema;
|
|
18104
18237
|
exports.UpdatePlanBillingMethodResponse = UpdatePlanBillingMethodResponse;
|
|
18105
18238
|
exports.UpdatePlanBillingMethodResponse$inboundSchema = UpdatePlanBillingMethodResponse$inboundSchema;
|
|
18239
|
+
exports.UpdatePlanConfigRequest$outboundSchema = UpdatePlanConfigRequest$outboundSchema;
|
|
18240
|
+
exports.UpdatePlanConfigResponse$inboundSchema = UpdatePlanConfigResponse$inboundSchema;
|
|
18106
18241
|
exports.UpdatePlanCreditSchema$inboundSchema = UpdatePlanCreditSchema$inboundSchema;
|
|
18107
18242
|
exports.UpdatePlanCustomerEligibility$inboundSchema = UpdatePlanCustomerEligibility$inboundSchema;
|
|
18108
18243
|
exports.UpdatePlanDurationTypeRequest = UpdatePlanDurationTypeRequest;
|
|
@@ -18247,6 +18382,8 @@ exports.createFeatureDisplayRequestToJSON = createFeatureDisplayRequestToJSON;
|
|
|
18247
18382
|
exports.createFeatureDisplayResponseFromJSON = createFeatureDisplayResponseFromJSON;
|
|
18248
18383
|
exports.createFeatureParamsToJSON = createFeatureParamsToJSON;
|
|
18249
18384
|
exports.createFeatureResponseFromJSON = createFeatureResponseFromJSON;
|
|
18385
|
+
exports.createPlanConfigRequestToJSON = createPlanConfigRequestToJSON;
|
|
18386
|
+
exports.createPlanConfigResponseFromJSON = createPlanConfigResponseFromJSON;
|
|
18250
18387
|
exports.createPlanCreditSchemaFromJSON = createPlanCreditSchemaFromJSON;
|
|
18251
18388
|
exports.createPlanCustomerEligibilityFromJSON = createPlanCustomerEligibilityFromJSON;
|
|
18252
18389
|
exports.createPlanFeatureDisplayFromJSON = createPlanFeatureDisplayFromJSON;
|
|
@@ -18339,6 +18476,7 @@ exports.getOrCreateCustomerParamsToJSON = getOrCreateCustomerParamsToJSON;
|
|
|
18339
18476
|
exports.getOrCreateCustomerPurchaseLimitToJSON = getOrCreateCustomerPurchaseLimitToJSON;
|
|
18340
18477
|
exports.getOrCreateCustomerSpendLimitToJSON = getOrCreateCustomerSpendLimitToJSON;
|
|
18341
18478
|
exports.getOrCreateCustomerUsageAlertToJSON = getOrCreateCustomerUsageAlertToJSON;
|
|
18479
|
+
exports.getPlanConfigFromJSON = getPlanConfigFromJSON;
|
|
18342
18480
|
exports.getPlanCreditSchemaFromJSON = getPlanCreditSchemaFromJSON;
|
|
18343
18481
|
exports.getPlanCustomerEligibilityFromJSON = getPlanCustomerEligibilityFromJSON;
|
|
18344
18482
|
exports.getPlanFeatureDisplayFromJSON = getPlanFeatureDisplayFromJSON;
|
|
@@ -18383,6 +18521,7 @@ exports.listFeaturesDisplayFromJSON = listFeaturesDisplayFromJSON;
|
|
|
18383
18521
|
exports.listFeaturesListFromJSON = listFeaturesListFromJSON;
|
|
18384
18522
|
exports.listFeaturesRequestToJSON = listFeaturesRequestToJSON;
|
|
18385
18523
|
exports.listFeaturesResponseFromJSON = listFeaturesResponseFromJSON;
|
|
18524
|
+
exports.listPlansConfigFromJSON = listPlansConfigFromJSON;
|
|
18386
18525
|
exports.listPlansCreditSchemaFromJSON = listPlansCreditSchemaFromJSON;
|
|
18387
18526
|
exports.listPlansCustomerEligibilityFromJSON = listPlansCustomerEligibilityFromJSON;
|
|
18388
18527
|
exports.listPlansFeatureDisplayFromJSON = listPlansFeatureDisplayFromJSON;
|
|
@@ -18423,6 +18562,7 @@ exports.multiAttachToToJSON = multiAttachToToJSON;
|
|
|
18423
18562
|
exports.multiAttachUsageAlertToJSON = multiAttachUsageAlertToJSON;
|
|
18424
18563
|
exports.openCustomerPortalParamsToJSON = openCustomerPortalParamsToJSON;
|
|
18425
18564
|
exports.openCustomerPortalResponseFromJSON = openCustomerPortalResponseFromJSON;
|
|
18565
|
+
exports.planConfigFromJSON = planConfigFromJSON;
|
|
18426
18566
|
exports.planCreditSchemaFromJSON = planCreditSchemaFromJSON;
|
|
18427
18567
|
exports.planFeatureDisplayFromJSON = planFeatureDisplayFromJSON;
|
|
18428
18568
|
exports.planFeatureFromJSON = planFeatureFromJSON;
|
|
@@ -18611,6 +18751,8 @@ exports.updateFeatureDisplayResponseFromJSON = updateFeatureDisplayResponseFromJ
|
|
|
18611
18751
|
exports.updateFeatureParamsToJSON = updateFeatureParamsToJSON;
|
|
18612
18752
|
exports.updateFeatureResponseFromJSON = updateFeatureResponseFromJSON;
|
|
18613
18753
|
exports.updatePlanBasePriceToJSON = updatePlanBasePriceToJSON;
|
|
18754
|
+
exports.updatePlanConfigRequestToJSON = updatePlanConfigRequestToJSON;
|
|
18755
|
+
exports.updatePlanConfigResponseFromJSON = updatePlanConfigResponseFromJSON;
|
|
18614
18756
|
exports.updatePlanCreditSchemaFromJSON = updatePlanCreditSchemaFromJSON;
|
|
18615
18757
|
exports.updatePlanCustomerEligibilityFromJSON = updatePlanCustomerEligibilityFromJSON;
|
|
18616
18758
|
exports.updatePlanFeatureDisplayFromJSON = updatePlanFeatureDisplayFromJSON;
|