autumn-js 1.2.13 → 1.2.14
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 +419 -69
- package/dist/backend/adapters/express.mjs +5 -5
- package/dist/backend/adapters/fetch.js +419 -69
- package/dist/backend/adapters/fetch.mjs +5 -5
- package/dist/backend/adapters/hono.js +419 -69
- package/dist/backend/adapters/hono.mjs +5 -5
- package/dist/backend/adapters/index.js +419 -69
- package/dist/backend/adapters/index.mjs +8 -8
- package/dist/backend/adapters/next.js +419 -69
- package/dist/backend/adapters/next.mjs +5 -5
- package/dist/backend/{chunk-YSQQKZBU.mjs → chunk-5XWZK7Q6.mjs} +1 -1
- package/dist/backend/{chunk-OUDB34Y7.mjs → chunk-BVJU43R5.mjs} +1 -1
- package/dist/backend/{chunk-T42RZEUZ.mjs → chunk-GE5VY4YO.mjs} +419 -69
- package/dist/backend/{chunk-DNNJOZAT.mjs → chunk-JDJMZQCY.mjs} +1 -1
- package/dist/backend/{chunk-7BVATYGA.mjs → chunk-N2OJ347N.mjs} +1 -1
- package/dist/backend/{chunk-EJGHP7KT.mjs → chunk-QAFNIIBW.mjs} +1 -1
- package/dist/backend/{chunk-RPH5L44S.mjs → chunk-ZOOAE7OJ.mjs} +1 -1
- 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 +419 -69
- package/dist/backend/core/handlers/coreHandler.mjs +3 -3
- 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 +419 -69
- package/dist/backend/core/handlers/handleRouteByName.mjs +3 -3
- 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 +419 -69
- package/dist/backend/core/handlers/index.mjs +4 -4
- package/dist/backend/core/index.d.mts +1 -1
- package/dist/backend/core/index.d.ts +1 -1
- package/dist/backend/core/index.js +419 -69
- package/dist/backend/core/index.mjs +6 -6
- 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.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.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/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 +419 -69
- package/dist/backend/index.mjs +6 -6
- package/dist/backend/{routeTypes-DVwngaBn.d.mts → routeTypes-B-X-zb1q.d.mts} +558 -68
- package/dist/backend/{routeTypes-B94_Mq2J.d.ts → routeTypes-bGaZQm24.d.ts} +558 -68
- package/dist/better-auth/{chunk-ZZGFPTHO.mjs → chunk-DNNKTBFL.mjs} +419 -69
- package/dist/better-auth/client.d.mts +2 -4
- package/dist/better-auth/client.d.ts +2 -4
- package/dist/better-auth/{createAutumnEndpoint-CvXRCg-M.d.mts → createAutumnEndpoint-Clm1sxhQ.d.mts} +4 -8
- package/dist/better-auth/{createAutumnEndpoint-CvXRCg-M.d.ts → createAutumnEndpoint-Clm1sxhQ.d.ts} +4 -8
- package/dist/better-auth/index.d.mts +2 -4
- package/dist/better-auth/index.d.ts +2 -4
- package/dist/better-auth/index.js +419 -69
- package/dist/better-auth/index.mjs +1 -1
- package/dist/better-auth/utils/createAutumnEndpoint.d.mts +2 -4
- package/dist/better-auth/utils/createAutumnEndpoint.d.ts +2 -4
- package/dist/better-auth/utils/handleBetterAuthRoute.d.mts +2 -4
- package/dist/better-auth/utils/handleBetterAuthRoute.d.ts +2 -4
- package/dist/better-auth/utils/handleBetterAuthRoute.js +419 -69
- package/dist/better-auth/utils/handleBetterAuthRoute.mjs +1 -1
- package/dist/better-auth/utils/index.d.mts +3 -4
- package/dist/better-auth/utils/index.d.ts +3 -4
- package/dist/better-auth/utils/index.js +419 -69
- package/dist/better-auth/utils/index.mjs +1 -1
- package/dist/react/AutumnContext.d.mts +1 -1
- package/dist/react/AutumnContext.d.ts +1 -1
- package/dist/react/client/AutumnClient.d.mts +1 -1
- package/dist/react/client/AutumnClient.d.ts +1 -1
- package/dist/react/client/IAutumnClient.d.mts +1 -1
- package/dist/react/client/IAutumnClient.d.ts +1 -1
- package/dist/react/client/index.d.mts +1 -1
- package/dist/react/client/index.d.ts +1 -1
- package/dist/react/hooks/index.d.mts +1 -1
- package/dist/react/hooks/index.d.ts +1 -1
- package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +1 -1
- package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +1 -1
- package/dist/react/hooks/internal/useCustomerActions.d.mts +1 -1
- package/dist/react/hooks/internal/useCustomerActions.d.ts +1 -1
- package/dist/react/hooks/useAggregateEvents.d.mts +1 -1
- package/dist/react/hooks/useAggregateEvents.d.ts +1 -1
- package/dist/react/hooks/useCustomer.d.mts +1 -1
- package/dist/react/hooks/useCustomer.d.ts +1 -1
- package/dist/react/hooks/useEntity.d.mts +1 -1
- package/dist/react/hooks/useEntity.d.ts +1 -1
- package/dist/react/hooks/useListEvents.d.mts +1 -1
- package/dist/react/hooks/useListEvents.d.ts +1 -1
- package/dist/react/hooks/useListPlans.d.mts +1 -1
- package/dist/react/hooks/useListPlans.d.ts +1 -1
- package/dist/react/hooks/useReferrals.d.mts +1 -1
- package/dist/react/hooks/useReferrals.d.ts +1 -1
- package/dist/react/index.d.mts +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/{params-B5l9vHfZ.d.ts → params-CTiHT2EX.d.ts} +515 -64
- package/dist/react/{params-BVglT8vT.d.mts → params-ZvrBzzFE.d.mts} +515 -64
- package/dist/sdk/index.d.mts +683 -109
- package/dist/sdk/index.d.ts +683 -109
- package/dist/sdk/index.js +3436 -2889
- package/dist/sdk/index.mjs +3320 -2837
- package/package.json +1 -1
|
@@ -4882,31 +4882,31 @@ var BillingUpdateResponse$inboundSchema = z28.pipe(
|
|
|
4882
4882
|
|
|
4883
4883
|
// ../sdk/src/models/check-op.ts
|
|
4884
4884
|
var z29 = __toESM(require("zod/v4-mini"), 1);
|
|
4885
|
-
var
|
|
4885
|
+
var FlagType2 = {
|
|
4886
4886
|
Boolean: "boolean",
|
|
4887
4887
|
Metered: "metered",
|
|
4888
4888
|
CreditSystem: "credit_system"
|
|
4889
4889
|
};
|
|
4890
|
-
var
|
|
4890
|
+
var Scenario2 = {
|
|
4891
4891
|
UsageLimit: "usage_limit",
|
|
4892
4892
|
FeatureFlag: "feature_flag"
|
|
4893
4893
|
};
|
|
4894
|
-
var
|
|
4894
|
+
var CheckEnv2 = {
|
|
4895
4895
|
Sandbox: "sandbox",
|
|
4896
4896
|
Live: "live"
|
|
4897
4897
|
};
|
|
4898
|
-
var
|
|
4898
|
+
var ProductType2 = {
|
|
4899
4899
|
Feature: "feature",
|
|
4900
4900
|
PricedFeature: "priced_feature",
|
|
4901
4901
|
Price: "price"
|
|
4902
4902
|
};
|
|
4903
|
-
var
|
|
4903
|
+
var FeatureType2 = {
|
|
4904
4904
|
SingleUse: "single_use",
|
|
4905
4905
|
ContinuousUse: "continuous_use",
|
|
4906
4906
|
Boolean: "boolean",
|
|
4907
4907
|
Static: "static"
|
|
4908
4908
|
};
|
|
4909
|
-
var
|
|
4909
|
+
var CheckInterval2 = {
|
|
4910
4910
|
Minute: "minute",
|
|
4911
4911
|
Hour: "hour",
|
|
4912
4912
|
Day: "day",
|
|
@@ -4916,37 +4916,113 @@ var CheckInterval = {
|
|
|
4916
4916
|
SemiAnnual: "semi_annual",
|
|
4917
4917
|
Year: "year"
|
|
4918
4918
|
};
|
|
4919
|
-
var
|
|
4919
|
+
var CheckTierBehavior2 = {
|
|
4920
4920
|
Graduated: "graduated",
|
|
4921
4921
|
Volume: "volume"
|
|
4922
4922
|
};
|
|
4923
|
-
var
|
|
4923
|
+
var UsageModel2 = {
|
|
4924
4924
|
Prepaid: "prepaid",
|
|
4925
4925
|
PayPerUse: "pay_per_use"
|
|
4926
4926
|
};
|
|
4927
|
-
var
|
|
4927
|
+
var ConfigDuration2 = {
|
|
4928
4928
|
Month: "month",
|
|
4929
4929
|
Forever: "forever"
|
|
4930
4930
|
};
|
|
4931
|
-
var
|
|
4931
|
+
var CheckOnIncrease2 = {
|
|
4932
4932
|
BillImmediately: "bill_immediately",
|
|
4933
4933
|
ProrateImmediately: "prorate_immediately",
|
|
4934
4934
|
ProrateNextCycle: "prorate_next_cycle",
|
|
4935
4935
|
BillNextCycle: "bill_next_cycle"
|
|
4936
4936
|
};
|
|
4937
|
-
var
|
|
4937
|
+
var CheckOnDecrease2 = {
|
|
4938
4938
|
Prorate: "prorate",
|
|
4939
4939
|
ProrateImmediately: "prorate_immediately",
|
|
4940
4940
|
ProrateNextCycle: "prorate_next_cycle",
|
|
4941
4941
|
None: "none",
|
|
4942
4942
|
NoProrations: "no_prorations"
|
|
4943
4943
|
};
|
|
4944
|
-
var
|
|
4944
|
+
var FreeTrialDuration2 = {
|
|
4945
4945
|
Day: "day",
|
|
4946
4946
|
Month: "month",
|
|
4947
4947
|
Year: "year"
|
|
4948
4948
|
};
|
|
4949
|
-
var
|
|
4949
|
+
var ProductScenario2 = {
|
|
4950
|
+
Scheduled: "scheduled",
|
|
4951
|
+
Active: "active",
|
|
4952
|
+
New: "new",
|
|
4953
|
+
Renew: "renew",
|
|
4954
|
+
Upgrade: "upgrade",
|
|
4955
|
+
UpdatePrepaidQuantity: "update_prepaid_quantity",
|
|
4956
|
+
Downgrade: "downgrade",
|
|
4957
|
+
Cancel: "cancel",
|
|
4958
|
+
Expired: "expired",
|
|
4959
|
+
PastDue: "past_due"
|
|
4960
|
+
};
|
|
4961
|
+
var FlagType1 = {
|
|
4962
|
+
Boolean: "boolean",
|
|
4963
|
+
Metered: "metered",
|
|
4964
|
+
CreditSystem: "credit_system"
|
|
4965
|
+
};
|
|
4966
|
+
var Scenario1 = {
|
|
4967
|
+
UsageLimit: "usage_limit",
|
|
4968
|
+
FeatureFlag: "feature_flag"
|
|
4969
|
+
};
|
|
4970
|
+
var CheckEnv1 = {
|
|
4971
|
+
Sandbox: "sandbox",
|
|
4972
|
+
Live: "live"
|
|
4973
|
+
};
|
|
4974
|
+
var ProductType1 = {
|
|
4975
|
+
Feature: "feature",
|
|
4976
|
+
PricedFeature: "priced_feature",
|
|
4977
|
+
Price: "price"
|
|
4978
|
+
};
|
|
4979
|
+
var FeatureType1 = {
|
|
4980
|
+
SingleUse: "single_use",
|
|
4981
|
+
ContinuousUse: "continuous_use",
|
|
4982
|
+
Boolean: "boolean",
|
|
4983
|
+
Static: "static"
|
|
4984
|
+
};
|
|
4985
|
+
var CheckInterval1 = {
|
|
4986
|
+
Minute: "minute",
|
|
4987
|
+
Hour: "hour",
|
|
4988
|
+
Day: "day",
|
|
4989
|
+
Week: "week",
|
|
4990
|
+
Month: "month",
|
|
4991
|
+
Quarter: "quarter",
|
|
4992
|
+
SemiAnnual: "semi_annual",
|
|
4993
|
+
Year: "year"
|
|
4994
|
+
};
|
|
4995
|
+
var CheckTierBehavior1 = {
|
|
4996
|
+
Graduated: "graduated",
|
|
4997
|
+
Volume: "volume"
|
|
4998
|
+
};
|
|
4999
|
+
var UsageModel1 = {
|
|
5000
|
+
Prepaid: "prepaid",
|
|
5001
|
+
PayPerUse: "pay_per_use"
|
|
5002
|
+
};
|
|
5003
|
+
var ConfigDuration1 = {
|
|
5004
|
+
Month: "month",
|
|
5005
|
+
Forever: "forever"
|
|
5006
|
+
};
|
|
5007
|
+
var CheckOnIncrease1 = {
|
|
5008
|
+
BillImmediately: "bill_immediately",
|
|
5009
|
+
ProrateImmediately: "prorate_immediately",
|
|
5010
|
+
ProrateNextCycle: "prorate_next_cycle",
|
|
5011
|
+
BillNextCycle: "bill_next_cycle"
|
|
5012
|
+
};
|
|
5013
|
+
var CheckOnDecrease1 = {
|
|
5014
|
+
Prorate: "prorate",
|
|
5015
|
+
ProrateImmediately: "prorate_immediately",
|
|
5016
|
+
ProrateNextCycle: "prorate_next_cycle",
|
|
5017
|
+
None: "none",
|
|
5018
|
+
NoProrations: "no_prorations"
|
|
5019
|
+
};
|
|
5020
|
+
var FreeTrialDuration1 = {
|
|
5021
|
+
Day: "day",
|
|
5022
|
+
Month: "month",
|
|
5023
|
+
Year: "year"
|
|
5024
|
+
};
|
|
5025
|
+
var ProductScenario1 = {
|
|
4950
5026
|
Scheduled: "scheduled",
|
|
4951
5027
|
Active: "active",
|
|
4952
5028
|
New: "new",
|
|
@@ -4993,8 +5069,8 @@ var CheckParams$outboundSchema = z29.pipe(
|
|
|
4993
5069
|
});
|
|
4994
5070
|
})
|
|
4995
5071
|
);
|
|
4996
|
-
var
|
|
4997
|
-
var
|
|
5072
|
+
var FlagType2$inboundSchema = inboundSchema(FlagType2);
|
|
5073
|
+
var CheckCreditSchema2$inboundSchema = z29.pipe(
|
|
4998
5074
|
z29.object({
|
|
4999
5075
|
metered_feature_id: string4(),
|
|
5000
5076
|
credit_cost: number2()
|
|
@@ -5006,21 +5082,21 @@ var CheckCreditSchema$inboundSchema = z29.pipe(
|
|
|
5006
5082
|
});
|
|
5007
5083
|
})
|
|
5008
5084
|
);
|
|
5009
|
-
var
|
|
5085
|
+
var FlagDisplay2$inboundSchema = z29.object({
|
|
5010
5086
|
singular: z29.optional(z29.nullable(string4())),
|
|
5011
5087
|
plural: z29.optional(z29.nullable(string4()))
|
|
5012
5088
|
});
|
|
5013
|
-
var
|
|
5089
|
+
var CheckFeature2$inboundSchema = z29.pipe(
|
|
5014
5090
|
z29.object({
|
|
5015
5091
|
id: string4(),
|
|
5016
5092
|
name: string4(),
|
|
5017
|
-
type:
|
|
5093
|
+
type: FlagType2$inboundSchema,
|
|
5018
5094
|
consumable: boolean2(),
|
|
5019
5095
|
event_names: optional2(z29.array(string4())),
|
|
5020
5096
|
credit_schema: optional2(
|
|
5021
|
-
z29.array(z29.lazy(() =>
|
|
5097
|
+
z29.array(z29.lazy(() => CheckCreditSchema2$inboundSchema))
|
|
5022
5098
|
),
|
|
5023
|
-
display: optional2(z29.lazy(() =>
|
|
5099
|
+
display: optional2(z29.lazy(() => FlagDisplay2$inboundSchema)),
|
|
5024
5100
|
archived: boolean2()
|
|
5025
5101
|
}),
|
|
5026
5102
|
z29.transform((v) => {
|
|
@@ -5030,13 +5106,13 @@ var CheckFeature$inboundSchema = z29.pipe(
|
|
|
5030
5106
|
});
|
|
5031
5107
|
})
|
|
5032
5108
|
);
|
|
5033
|
-
var
|
|
5109
|
+
var Flag2$inboundSchema = z29.pipe(
|
|
5034
5110
|
z29.object({
|
|
5035
5111
|
id: string4(),
|
|
5036
5112
|
plan_id: nullable(string4()),
|
|
5037
5113
|
expires_at: nullable(number2()),
|
|
5038
5114
|
feature_id: string4(),
|
|
5039
|
-
feature: optional2(z29.lazy(() =>
|
|
5115
|
+
feature: optional2(z29.lazy(() => CheckFeature2$inboundSchema))
|
|
5040
5116
|
}),
|
|
5041
5117
|
z29.transform((v) => {
|
|
5042
5118
|
return remap(v, {
|
|
@@ -5046,15 +5122,15 @@ var Flag$inboundSchema = z29.pipe(
|
|
|
5046
5122
|
});
|
|
5047
5123
|
})
|
|
5048
5124
|
);
|
|
5049
|
-
var
|
|
5050
|
-
var
|
|
5051
|
-
var
|
|
5052
|
-
var
|
|
5053
|
-
var
|
|
5054
|
-
var
|
|
5055
|
-
var
|
|
5056
|
-
var
|
|
5057
|
-
var
|
|
5125
|
+
var Scenario2$inboundSchema = inboundSchema(Scenario2);
|
|
5126
|
+
var CheckEnv2$inboundSchema = inboundSchema(CheckEnv2);
|
|
5127
|
+
var ProductType2$inboundSchema = inboundSchema(ProductType2);
|
|
5128
|
+
var FeatureType2$inboundSchema = inboundSchema(FeatureType2);
|
|
5129
|
+
var IncludedUsage2$inboundSchema = smartUnion([number2(), string4()]);
|
|
5130
|
+
var CheckInterval2$inboundSchema = inboundSchema(CheckInterval2);
|
|
5131
|
+
var CheckTierBehavior2$inboundSchema = inboundSchema(CheckTierBehavior2);
|
|
5132
|
+
var UsageModel2$inboundSchema = inboundSchema(UsageModel2);
|
|
5133
|
+
var ProductDisplay2$inboundSchema = z29.pipe(
|
|
5058
5134
|
z29.object({
|
|
5059
5135
|
primary_text: string4(),
|
|
5060
5136
|
secondary_text: z29.optional(z29.nullable(string4()))
|
|
@@ -5066,12 +5142,12 @@ var ProductDisplay$inboundSchema = z29.pipe(
|
|
|
5066
5142
|
});
|
|
5067
5143
|
})
|
|
5068
5144
|
);
|
|
5069
|
-
var
|
|
5070
|
-
var
|
|
5145
|
+
var ConfigDuration2$inboundSchema = inboundSchema(ConfigDuration2);
|
|
5146
|
+
var CheckRollover2$inboundSchema = z29.pipe(
|
|
5071
5147
|
z29.object({
|
|
5072
5148
|
max: z29.optional(z29.nullable(number2())),
|
|
5073
5149
|
max_percentage: z29.optional(z29.nullable(number2())),
|
|
5074
|
-
duration: z29._default(
|
|
5150
|
+
duration: z29._default(ConfigDuration2$inboundSchema, "month"),
|
|
5075
5151
|
length: number2()
|
|
5076
5152
|
}),
|
|
5077
5153
|
z29.transform((v) => {
|
|
@@ -5080,15 +5156,15 @@ var CheckRollover$inboundSchema = z29.pipe(
|
|
|
5080
5156
|
});
|
|
5081
5157
|
})
|
|
5082
5158
|
);
|
|
5083
|
-
var
|
|
5084
|
-
var
|
|
5085
|
-
var
|
|
5159
|
+
var CheckOnIncrease2$inboundSchema = inboundSchema(CheckOnIncrease2);
|
|
5160
|
+
var CheckOnDecrease2$inboundSchema = inboundSchema(CheckOnDecrease2);
|
|
5161
|
+
var CheckConfig2$inboundSchema = z29.pipe(
|
|
5086
5162
|
z29.object({
|
|
5087
5163
|
rollover: z29.optional(
|
|
5088
|
-
z29.nullable(z29.lazy(() =>
|
|
5164
|
+
z29.nullable(z29.lazy(() => CheckRollover2$inboundSchema))
|
|
5089
5165
|
),
|
|
5090
|
-
on_increase: z29.optional(z29.nullable(
|
|
5091
|
-
on_decrease: z29.optional(z29.nullable(
|
|
5166
|
+
on_increase: z29.optional(z29.nullable(CheckOnIncrease2$inboundSchema)),
|
|
5167
|
+
on_decrease: z29.optional(z29.nullable(CheckOnDecrease2$inboundSchema))
|
|
5092
5168
|
}),
|
|
5093
5169
|
z29.transform((v) => {
|
|
5094
5170
|
return remap(v, {
|
|
@@ -5097,29 +5173,29 @@ var CheckConfig$inboundSchema = z29.pipe(
|
|
|
5097
5173
|
});
|
|
5098
5174
|
})
|
|
5099
5175
|
);
|
|
5100
|
-
var
|
|
5176
|
+
var CheckItem2$inboundSchema = z29.pipe(
|
|
5101
5177
|
z29.object({
|
|
5102
|
-
type: z29.optional(z29.nullable(
|
|
5178
|
+
type: z29.optional(z29.nullable(ProductType2$inboundSchema)),
|
|
5103
5179
|
feature_id: z29.optional(z29.nullable(string4())),
|
|
5104
|
-
feature_type: z29.optional(z29.nullable(
|
|
5180
|
+
feature_type: z29.optional(z29.nullable(FeatureType2$inboundSchema)),
|
|
5105
5181
|
included_usage: z29.optional(
|
|
5106
5182
|
z29.nullable(smartUnion([number2(), string4()]))
|
|
5107
5183
|
),
|
|
5108
|
-
interval: z29.optional(z29.nullable(
|
|
5184
|
+
interval: z29.optional(z29.nullable(CheckInterval2$inboundSchema)),
|
|
5109
5185
|
interval_count: z29.optional(z29.nullable(number2())),
|
|
5110
5186
|
price: z29.optional(z29.nullable(number2())),
|
|
5111
5187
|
tiers: z29.optional(z29.nullable(z29.array(nullable(z29.any())))),
|
|
5112
|
-
tier_behavior: z29.optional(z29.nullable(
|
|
5113
|
-
usage_model: z29.optional(z29.nullable(
|
|
5188
|
+
tier_behavior: z29.optional(z29.nullable(CheckTierBehavior2$inboundSchema)),
|
|
5189
|
+
usage_model: z29.optional(z29.nullable(UsageModel2$inboundSchema)),
|
|
5114
5190
|
billing_units: z29.optional(z29.nullable(number2())),
|
|
5115
5191
|
reset_usage_when_enabled: z29.optional(z29.nullable(boolean2())),
|
|
5116
5192
|
entity_feature_id: z29.optional(z29.nullable(string4())),
|
|
5117
5193
|
display: z29.optional(
|
|
5118
|
-
z29.nullable(z29.lazy(() =>
|
|
5194
|
+
z29.nullable(z29.lazy(() => ProductDisplay2$inboundSchema))
|
|
5119
5195
|
),
|
|
5120
5196
|
quantity: z29.optional(z29.nullable(number2())),
|
|
5121
5197
|
next_cycle_quantity: z29.optional(z29.nullable(number2())),
|
|
5122
|
-
config: z29.optional(z29.nullable(z29.lazy(() =>
|
|
5198
|
+
config: z29.optional(z29.nullable(z29.lazy(() => CheckConfig2$inboundSchema)))
|
|
5123
5199
|
}),
|
|
5124
5200
|
z29.transform((v) => {
|
|
5125
5201
|
return remap(v, {
|
|
@@ -5136,10 +5212,10 @@ var CheckItem$inboundSchema = z29.pipe(
|
|
|
5136
5212
|
});
|
|
5137
5213
|
})
|
|
5138
5214
|
);
|
|
5139
|
-
var
|
|
5140
|
-
var
|
|
5215
|
+
var FreeTrialDuration2$inboundSchema = inboundSchema(FreeTrialDuration2);
|
|
5216
|
+
var CheckFreeTrial2$inboundSchema = z29.pipe(
|
|
5141
5217
|
z29.object({
|
|
5142
|
-
duration:
|
|
5218
|
+
duration: FreeTrialDuration2$inboundSchema,
|
|
5143
5219
|
length: number2(),
|
|
5144
5220
|
unique_fingerprint: boolean2(),
|
|
5145
5221
|
card_required: boolean2(),
|
|
@@ -5153,8 +5229,8 @@ var CheckFreeTrial$inboundSchema = z29.pipe(
|
|
|
5153
5229
|
});
|
|
5154
5230
|
})
|
|
5155
5231
|
);
|
|
5156
|
-
var
|
|
5157
|
-
var
|
|
5232
|
+
var ProductScenario2$inboundSchema = inboundSchema(ProductScenario2);
|
|
5233
|
+
var Properties2$inboundSchema = z29.pipe(
|
|
5158
5234
|
z29.object({
|
|
5159
5235
|
is_free: boolean2(),
|
|
5160
5236
|
is_one_off: boolean2(),
|
|
@@ -5171,22 +5247,22 @@ var Properties$inboundSchema = z29.pipe(
|
|
|
5171
5247
|
});
|
|
5172
5248
|
})
|
|
5173
5249
|
);
|
|
5174
|
-
var
|
|
5250
|
+
var Product2$inboundSchema = z29.pipe(
|
|
5175
5251
|
z29.object({
|
|
5176
5252
|
id: string4(),
|
|
5177
5253
|
name: string4(),
|
|
5178
5254
|
group: nullable(string4()),
|
|
5179
|
-
env:
|
|
5255
|
+
env: CheckEnv2$inboundSchema,
|
|
5180
5256
|
is_add_on: boolean2(),
|
|
5181
5257
|
is_default: boolean2(),
|
|
5182
5258
|
archived: boolean2(),
|
|
5183
5259
|
version: number2(),
|
|
5184
5260
|
created_at: number2(),
|
|
5185
|
-
items: z29.array(z29.lazy(() =>
|
|
5186
|
-
free_trial: nullable(z29.lazy(() =>
|
|
5261
|
+
items: z29.array(z29.lazy(() => CheckItem2$inboundSchema)),
|
|
5262
|
+
free_trial: nullable(z29.lazy(() => CheckFreeTrial2$inboundSchema)),
|
|
5187
5263
|
base_variant_id: nullable(string4()),
|
|
5188
|
-
scenario: optional2(
|
|
5189
|
-
properties: optional2(z29.lazy(() =>
|
|
5264
|
+
scenario: optional2(ProductScenario2$inboundSchema),
|
|
5265
|
+
properties: optional2(z29.lazy(() => Properties2$inboundSchema))
|
|
5190
5266
|
}),
|
|
5191
5267
|
z29.transform((v) => {
|
|
5192
5268
|
return remap(v, {
|
|
@@ -5198,14 +5274,14 @@ var Product$inboundSchema = z29.pipe(
|
|
|
5198
5274
|
});
|
|
5199
5275
|
})
|
|
5200
5276
|
);
|
|
5201
|
-
var
|
|
5277
|
+
var Preview2$inboundSchema = z29.pipe(
|
|
5202
5278
|
z29.object({
|
|
5203
|
-
scenario:
|
|
5279
|
+
scenario: Scenario2$inboundSchema,
|
|
5204
5280
|
title: string4(),
|
|
5205
5281
|
message: string4(),
|
|
5206
5282
|
feature_id: string4(),
|
|
5207
5283
|
feature_name: string4(),
|
|
5208
|
-
products: z29.array(z29.lazy(() =>
|
|
5284
|
+
products: z29.array(z29.lazy(() => Product2$inboundSchema))
|
|
5209
5285
|
}),
|
|
5210
5286
|
z29.transform((v) => {
|
|
5211
5287
|
return remap(v, {
|
|
@@ -5214,15 +5290,15 @@ var Preview$inboundSchema = z29.pipe(
|
|
|
5214
5290
|
});
|
|
5215
5291
|
})
|
|
5216
5292
|
);
|
|
5217
|
-
var
|
|
5293
|
+
var CheckResponseBody2$inboundSchema = z29.pipe(
|
|
5218
5294
|
z29.object({
|
|
5219
5295
|
allowed: boolean2(),
|
|
5220
5296
|
customer_id: string4(),
|
|
5221
5297
|
entity_id: z29.optional(z29.nullable(string4())),
|
|
5222
5298
|
required_balance: optional2(number2()),
|
|
5223
5299
|
balance: nullable(Balance$inboundSchema),
|
|
5224
|
-
flag: nullable(z29.lazy(() =>
|
|
5225
|
-
preview: optional2(z29.lazy(() =>
|
|
5300
|
+
flag: nullable(z29.lazy(() => Flag2$inboundSchema)),
|
|
5301
|
+
preview: optional2(z29.lazy(() => Preview2$inboundSchema))
|
|
5226
5302
|
}),
|
|
5227
5303
|
z29.transform((v) => {
|
|
5228
5304
|
return remap(v, {
|
|
@@ -5232,6 +5308,249 @@ var CheckResponse$inboundSchema = z29.pipe(
|
|
|
5232
5308
|
});
|
|
5233
5309
|
})
|
|
5234
5310
|
);
|
|
5311
|
+
var FlagType1$inboundSchema = inboundSchema(FlagType1);
|
|
5312
|
+
var CheckCreditSchema1$inboundSchema = z29.pipe(
|
|
5313
|
+
z29.object({
|
|
5314
|
+
metered_feature_id: string4(),
|
|
5315
|
+
credit_cost: number2()
|
|
5316
|
+
}),
|
|
5317
|
+
z29.transform((v) => {
|
|
5318
|
+
return remap(v, {
|
|
5319
|
+
"metered_feature_id": "meteredFeatureId",
|
|
5320
|
+
"credit_cost": "creditCost"
|
|
5321
|
+
});
|
|
5322
|
+
})
|
|
5323
|
+
);
|
|
5324
|
+
var FlagDisplay1$inboundSchema = z29.object({
|
|
5325
|
+
singular: z29.optional(z29.nullable(string4())),
|
|
5326
|
+
plural: z29.optional(z29.nullable(string4()))
|
|
5327
|
+
});
|
|
5328
|
+
var CheckFeature1$inboundSchema = z29.pipe(
|
|
5329
|
+
z29.object({
|
|
5330
|
+
id: string4(),
|
|
5331
|
+
name: string4(),
|
|
5332
|
+
type: FlagType1$inboundSchema,
|
|
5333
|
+
consumable: boolean2(),
|
|
5334
|
+
event_names: optional2(z29.array(string4())),
|
|
5335
|
+
credit_schema: optional2(
|
|
5336
|
+
z29.array(z29.lazy(() => CheckCreditSchema1$inboundSchema))
|
|
5337
|
+
),
|
|
5338
|
+
display: optional2(z29.lazy(() => FlagDisplay1$inboundSchema)),
|
|
5339
|
+
archived: boolean2()
|
|
5340
|
+
}),
|
|
5341
|
+
z29.transform((v) => {
|
|
5342
|
+
return remap(v, {
|
|
5343
|
+
"event_names": "eventNames",
|
|
5344
|
+
"credit_schema": "creditSchema"
|
|
5345
|
+
});
|
|
5346
|
+
})
|
|
5347
|
+
);
|
|
5348
|
+
var Flag1$inboundSchema = z29.pipe(
|
|
5349
|
+
z29.object({
|
|
5350
|
+
id: string4(),
|
|
5351
|
+
plan_id: nullable(string4()),
|
|
5352
|
+
expires_at: nullable(number2()),
|
|
5353
|
+
feature_id: string4(),
|
|
5354
|
+
feature: optional2(z29.lazy(() => CheckFeature1$inboundSchema))
|
|
5355
|
+
}),
|
|
5356
|
+
z29.transform((v) => {
|
|
5357
|
+
return remap(v, {
|
|
5358
|
+
"plan_id": "planId",
|
|
5359
|
+
"expires_at": "expiresAt",
|
|
5360
|
+
"feature_id": "featureId"
|
|
5361
|
+
});
|
|
5362
|
+
})
|
|
5363
|
+
);
|
|
5364
|
+
var Scenario1$inboundSchema = inboundSchema(Scenario1);
|
|
5365
|
+
var CheckEnv1$inboundSchema = inboundSchema(CheckEnv1);
|
|
5366
|
+
var ProductType1$inboundSchema = inboundSchema(ProductType1);
|
|
5367
|
+
var FeatureType1$inboundSchema = inboundSchema(FeatureType1);
|
|
5368
|
+
var IncludedUsage1$inboundSchema = smartUnion([number2(), string4()]);
|
|
5369
|
+
var CheckInterval1$inboundSchema = inboundSchema(CheckInterval1);
|
|
5370
|
+
var CheckTierBehavior1$inboundSchema = inboundSchema(CheckTierBehavior1);
|
|
5371
|
+
var UsageModel1$inboundSchema = inboundSchema(UsageModel1);
|
|
5372
|
+
var ProductDisplay1$inboundSchema = z29.pipe(
|
|
5373
|
+
z29.object({
|
|
5374
|
+
primary_text: string4(),
|
|
5375
|
+
secondary_text: z29.optional(z29.nullable(string4()))
|
|
5376
|
+
}),
|
|
5377
|
+
z29.transform((v) => {
|
|
5378
|
+
return remap(v, {
|
|
5379
|
+
"primary_text": "primaryText",
|
|
5380
|
+
"secondary_text": "secondaryText"
|
|
5381
|
+
});
|
|
5382
|
+
})
|
|
5383
|
+
);
|
|
5384
|
+
var ConfigDuration1$inboundSchema = inboundSchema(ConfigDuration1);
|
|
5385
|
+
var CheckRollover1$inboundSchema = z29.pipe(
|
|
5386
|
+
z29.object({
|
|
5387
|
+
max: z29.optional(z29.nullable(number2())),
|
|
5388
|
+
max_percentage: z29.optional(z29.nullable(number2())),
|
|
5389
|
+
duration: z29._default(ConfigDuration1$inboundSchema, "month"),
|
|
5390
|
+
length: number2()
|
|
5391
|
+
}),
|
|
5392
|
+
z29.transform((v) => {
|
|
5393
|
+
return remap(v, {
|
|
5394
|
+
"max_percentage": "maxPercentage"
|
|
5395
|
+
});
|
|
5396
|
+
})
|
|
5397
|
+
);
|
|
5398
|
+
var CheckOnIncrease1$inboundSchema = inboundSchema(CheckOnIncrease1);
|
|
5399
|
+
var CheckOnDecrease1$inboundSchema = inboundSchema(CheckOnDecrease1);
|
|
5400
|
+
var CheckConfig1$inboundSchema = z29.pipe(
|
|
5401
|
+
z29.object({
|
|
5402
|
+
rollover: z29.optional(
|
|
5403
|
+
z29.nullable(z29.lazy(() => CheckRollover1$inboundSchema))
|
|
5404
|
+
),
|
|
5405
|
+
on_increase: z29.optional(z29.nullable(CheckOnIncrease1$inboundSchema)),
|
|
5406
|
+
on_decrease: z29.optional(z29.nullable(CheckOnDecrease1$inboundSchema))
|
|
5407
|
+
}),
|
|
5408
|
+
z29.transform((v) => {
|
|
5409
|
+
return remap(v, {
|
|
5410
|
+
"on_increase": "onIncrease",
|
|
5411
|
+
"on_decrease": "onDecrease"
|
|
5412
|
+
});
|
|
5413
|
+
})
|
|
5414
|
+
);
|
|
5415
|
+
var CheckItem1$inboundSchema = z29.pipe(
|
|
5416
|
+
z29.object({
|
|
5417
|
+
type: z29.optional(z29.nullable(ProductType1$inboundSchema)),
|
|
5418
|
+
feature_id: z29.optional(z29.nullable(string4())),
|
|
5419
|
+
feature_type: z29.optional(z29.nullable(FeatureType1$inboundSchema)),
|
|
5420
|
+
included_usage: z29.optional(
|
|
5421
|
+
z29.nullable(smartUnion([number2(), string4()]))
|
|
5422
|
+
),
|
|
5423
|
+
interval: z29.optional(z29.nullable(CheckInterval1$inboundSchema)),
|
|
5424
|
+
interval_count: z29.optional(z29.nullable(number2())),
|
|
5425
|
+
price: z29.optional(z29.nullable(number2())),
|
|
5426
|
+
tiers: z29.optional(z29.nullable(z29.array(nullable(z29.any())))),
|
|
5427
|
+
tier_behavior: z29.optional(z29.nullable(CheckTierBehavior1$inboundSchema)),
|
|
5428
|
+
usage_model: z29.optional(z29.nullable(UsageModel1$inboundSchema)),
|
|
5429
|
+
billing_units: z29.optional(z29.nullable(number2())),
|
|
5430
|
+
reset_usage_when_enabled: z29.optional(z29.nullable(boolean2())),
|
|
5431
|
+
entity_feature_id: z29.optional(z29.nullable(string4())),
|
|
5432
|
+
display: z29.optional(
|
|
5433
|
+
z29.nullable(z29.lazy(() => ProductDisplay1$inboundSchema))
|
|
5434
|
+
),
|
|
5435
|
+
quantity: z29.optional(z29.nullable(number2())),
|
|
5436
|
+
next_cycle_quantity: z29.optional(z29.nullable(number2())),
|
|
5437
|
+
config: z29.optional(z29.nullable(z29.lazy(() => CheckConfig1$inboundSchema)))
|
|
5438
|
+
}),
|
|
5439
|
+
z29.transform((v) => {
|
|
5440
|
+
return remap(v, {
|
|
5441
|
+
"feature_id": "featureId",
|
|
5442
|
+
"feature_type": "featureType",
|
|
5443
|
+
"included_usage": "includedUsage",
|
|
5444
|
+
"interval_count": "intervalCount",
|
|
5445
|
+
"tier_behavior": "tierBehavior",
|
|
5446
|
+
"usage_model": "usageModel",
|
|
5447
|
+
"billing_units": "billingUnits",
|
|
5448
|
+
"reset_usage_when_enabled": "resetUsageWhenEnabled",
|
|
5449
|
+
"entity_feature_id": "entityFeatureId",
|
|
5450
|
+
"next_cycle_quantity": "nextCycleQuantity"
|
|
5451
|
+
});
|
|
5452
|
+
})
|
|
5453
|
+
);
|
|
5454
|
+
var FreeTrialDuration1$inboundSchema = inboundSchema(FreeTrialDuration1);
|
|
5455
|
+
var CheckFreeTrial1$inboundSchema = z29.pipe(
|
|
5456
|
+
z29.object({
|
|
5457
|
+
duration: FreeTrialDuration1$inboundSchema,
|
|
5458
|
+
length: number2(),
|
|
5459
|
+
unique_fingerprint: boolean2(),
|
|
5460
|
+
card_required: boolean2(),
|
|
5461
|
+
trial_available: z29.nullable(z29._default(boolean2(), true))
|
|
5462
|
+
}),
|
|
5463
|
+
z29.transform((v) => {
|
|
5464
|
+
return remap(v, {
|
|
5465
|
+
"unique_fingerprint": "uniqueFingerprint",
|
|
5466
|
+
"card_required": "cardRequired",
|
|
5467
|
+
"trial_available": "trialAvailable"
|
|
5468
|
+
});
|
|
5469
|
+
})
|
|
5470
|
+
);
|
|
5471
|
+
var ProductScenario1$inboundSchema = inboundSchema(ProductScenario1);
|
|
5472
|
+
var Properties1$inboundSchema = z29.pipe(
|
|
5473
|
+
z29.object({
|
|
5474
|
+
is_free: boolean2(),
|
|
5475
|
+
is_one_off: boolean2(),
|
|
5476
|
+
interval_group: z29.optional(z29.nullable(string4())),
|
|
5477
|
+
has_trial: z29.optional(z29.nullable(boolean2())),
|
|
5478
|
+
updateable: z29.optional(z29.nullable(boolean2()))
|
|
5479
|
+
}),
|
|
5480
|
+
z29.transform((v) => {
|
|
5481
|
+
return remap(v, {
|
|
5482
|
+
"is_free": "isFree",
|
|
5483
|
+
"is_one_off": "isOneOff",
|
|
5484
|
+
"interval_group": "intervalGroup",
|
|
5485
|
+
"has_trial": "hasTrial"
|
|
5486
|
+
});
|
|
5487
|
+
})
|
|
5488
|
+
);
|
|
5489
|
+
var Product1$inboundSchema = z29.pipe(
|
|
5490
|
+
z29.object({
|
|
5491
|
+
id: string4(),
|
|
5492
|
+
name: string4(),
|
|
5493
|
+
group: nullable(string4()),
|
|
5494
|
+
env: CheckEnv1$inboundSchema,
|
|
5495
|
+
is_add_on: boolean2(),
|
|
5496
|
+
is_default: boolean2(),
|
|
5497
|
+
archived: boolean2(),
|
|
5498
|
+
version: number2(),
|
|
5499
|
+
created_at: number2(),
|
|
5500
|
+
items: z29.array(z29.lazy(() => CheckItem1$inboundSchema)),
|
|
5501
|
+
free_trial: nullable(z29.lazy(() => CheckFreeTrial1$inboundSchema)),
|
|
5502
|
+
base_variant_id: nullable(string4()),
|
|
5503
|
+
scenario: optional2(ProductScenario1$inboundSchema),
|
|
5504
|
+
properties: optional2(z29.lazy(() => Properties1$inboundSchema))
|
|
5505
|
+
}),
|
|
5506
|
+
z29.transform((v) => {
|
|
5507
|
+
return remap(v, {
|
|
5508
|
+
"is_add_on": "isAddOn",
|
|
5509
|
+
"is_default": "isDefault",
|
|
5510
|
+
"created_at": "createdAt",
|
|
5511
|
+
"free_trial": "freeTrial",
|
|
5512
|
+
"base_variant_id": "baseVariantId"
|
|
5513
|
+
});
|
|
5514
|
+
})
|
|
5515
|
+
);
|
|
5516
|
+
var Preview1$inboundSchema = z29.pipe(
|
|
5517
|
+
z29.object({
|
|
5518
|
+
scenario: Scenario1$inboundSchema,
|
|
5519
|
+
title: string4(),
|
|
5520
|
+
message: string4(),
|
|
5521
|
+
feature_id: string4(),
|
|
5522
|
+
feature_name: string4(),
|
|
5523
|
+
products: z29.array(z29.lazy(() => Product1$inboundSchema))
|
|
5524
|
+
}),
|
|
5525
|
+
z29.transform((v) => {
|
|
5526
|
+
return remap(v, {
|
|
5527
|
+
"feature_id": "featureId",
|
|
5528
|
+
"feature_name": "featureName"
|
|
5529
|
+
});
|
|
5530
|
+
})
|
|
5531
|
+
);
|
|
5532
|
+
var CheckResponseBody1$inboundSchema = z29.pipe(
|
|
5533
|
+
z29.object({
|
|
5534
|
+
allowed: boolean2(),
|
|
5535
|
+
customer_id: string4(),
|
|
5536
|
+
entity_id: z29.optional(z29.nullable(string4())),
|
|
5537
|
+
required_balance: optional2(number2()),
|
|
5538
|
+
balance: nullable(Balance$inboundSchema),
|
|
5539
|
+
flag: nullable(z29.lazy(() => Flag1$inboundSchema)),
|
|
5540
|
+
preview: optional2(z29.lazy(() => Preview1$inboundSchema))
|
|
5541
|
+
}),
|
|
5542
|
+
z29.transform((v) => {
|
|
5543
|
+
return remap(v, {
|
|
5544
|
+
"customer_id": "customerId",
|
|
5545
|
+
"entity_id": "entityId",
|
|
5546
|
+
"required_balance": "requiredBalance"
|
|
5547
|
+
});
|
|
5548
|
+
})
|
|
5549
|
+
);
|
|
5550
|
+
var CheckResponse$inboundSchema = smartUnion([
|
|
5551
|
+
z29.lazy(() => CheckResponseBody1$inboundSchema),
|
|
5552
|
+
z29.lazy(() => CheckResponseBody2$inboundSchema)
|
|
5553
|
+
]);
|
|
5235
5554
|
|
|
5236
5555
|
// ../sdk/src/models/create-balance-op.ts
|
|
5237
5556
|
var z30 = __toESM(require("zod/v4-mini"), 1);
|
|
@@ -7206,9 +7525,16 @@ var FinalizeBalanceParams$outboundSchema = z43.pipe(
|
|
|
7206
7525
|
});
|
|
7207
7526
|
})
|
|
7208
7527
|
);
|
|
7209
|
-
var
|
|
7528
|
+
var FinalizeLockResponseBody2$inboundSchema = z43.object({
|
|
7210
7529
|
success: boolean2()
|
|
7211
7530
|
});
|
|
7531
|
+
var FinalizeLockResponseBody1$inboundSchema = z43.object({
|
|
7532
|
+
success: boolean2()
|
|
7533
|
+
});
|
|
7534
|
+
var FinalizeLockResponse$inboundSchema = smartUnion([
|
|
7535
|
+
z43.lazy(() => FinalizeLockResponseBody1$inboundSchema),
|
|
7536
|
+
z43.lazy(() => FinalizeLockResponseBody2$inboundSchema)
|
|
7537
|
+
]);
|
|
7212
7538
|
|
|
7213
7539
|
// ../sdk/src/models/get-entity-op.ts
|
|
7214
7540
|
var z44 = __toESM(require("zod/v4-mini"), 1);
|
|
@@ -11244,7 +11570,7 @@ var TrackParams$outboundSchema = z59.pipe(
|
|
|
11244
11570
|
});
|
|
11245
11571
|
})
|
|
11246
11572
|
);
|
|
11247
|
-
var
|
|
11573
|
+
var TrackResponseBody2$inboundSchema = z59.pipe(
|
|
11248
11574
|
z59.object({
|
|
11249
11575
|
customer_id: string4(),
|
|
11250
11576
|
entity_id: optional2(string4()),
|
|
@@ -11261,6 +11587,27 @@ var TrackResponse$inboundSchema = z59.pipe(
|
|
|
11261
11587
|
});
|
|
11262
11588
|
})
|
|
11263
11589
|
);
|
|
11590
|
+
var TrackResponseBody1$inboundSchema = z59.pipe(
|
|
11591
|
+
z59.object({
|
|
11592
|
+
customer_id: string4(),
|
|
11593
|
+
entity_id: optional2(string4()),
|
|
11594
|
+
event_name: optional2(string4()),
|
|
11595
|
+
value: number2(),
|
|
11596
|
+
balance: nullable(Balance$inboundSchema),
|
|
11597
|
+
balances: optional2(z59.record(z59.string(), Balance$inboundSchema))
|
|
11598
|
+
}),
|
|
11599
|
+
z59.transform((v) => {
|
|
11600
|
+
return remap(v, {
|
|
11601
|
+
"customer_id": "customerId",
|
|
11602
|
+
"entity_id": "entityId",
|
|
11603
|
+
"event_name": "eventName"
|
|
11604
|
+
});
|
|
11605
|
+
})
|
|
11606
|
+
);
|
|
11607
|
+
var TrackResponse$inboundSchema = smartUnion([
|
|
11608
|
+
z59.lazy(() => TrackResponseBody1$inboundSchema),
|
|
11609
|
+
z59.lazy(() => TrackResponseBody2$inboundSchema)
|
|
11610
|
+
]);
|
|
11264
11611
|
|
|
11265
11612
|
// ../sdk/src/models/update-balance-op.ts
|
|
11266
11613
|
var z60 = __toESM(require("zod/v4-mini"), 1);
|
|
@@ -12745,6 +13092,7 @@ async function $do(client, request, options) {
|
|
|
12745
13092
|
const response = doResult.value;
|
|
12746
13093
|
const [result] = await match(
|
|
12747
13094
|
json(200, CheckResponse$inboundSchema),
|
|
13095
|
+
json(202, CheckResponse$inboundSchema),
|
|
12748
13096
|
fail("4XX"),
|
|
12749
13097
|
fail("5XX")
|
|
12750
13098
|
)(response, req);
|
|
@@ -12823,6 +13171,7 @@ async function $do2(client, request, options) {
|
|
|
12823
13171
|
const response = doResult.value;
|
|
12824
13172
|
const [result] = await match(
|
|
12825
13173
|
json(200, TrackResponse$inboundSchema),
|
|
13174
|
+
json(202, TrackResponse$inboundSchema),
|
|
12826
13175
|
fail("4XX"),
|
|
12827
13176
|
fail("5XX")
|
|
12828
13177
|
)(response, req);
|
|
@@ -13662,6 +14011,7 @@ async function $do5(client, request, options) {
|
|
|
13662
14011
|
const response = doResult.value;
|
|
13663
14012
|
const [result] = await match(
|
|
13664
14013
|
json(200, FinalizeLockResponse$inboundSchema),
|
|
14014
|
+
json(202, FinalizeLockResponse$inboundSchema),
|
|
13665
14015
|
fail("4XX"),
|
|
13666
14016
|
fail("5XX")
|
|
13667
14017
|
)(response, req);
|
|
@@ -17060,7 +17410,7 @@ var Autumn = class extends ClientSDK {
|
|
|
17060
17410
|
* @param lock - Reserve units of a feature upfront by passing a lock_id, then call balances.finalize to confirm or release the hold. (optional)
|
|
17061
17411
|
* @param withPreview - If true, includes upgrade/upsell information in the response when access is denied. Useful for displaying paywalls. (optional)
|
|
17062
17412
|
*
|
|
17063
|
-
* @returns Whether access is allowed, plus the current balance for that feature.
|
|
17413
|
+
* @returns Whether access is allowed, plus the current balance for that feature. If Autumn is experiencing degraded service from a downstream provider, the API may return 202 and allow access fail-open.
|
|
17064
17414
|
*/
|
|
17065
17415
|
async check(request, options) {
|
|
17066
17416
|
return unwrapAsync(check(
|
|
@@ -17093,7 +17443,7 @@ var Autumn = class extends ClientSDK {
|
|
|
17093
17443
|
* @param value - The amount of usage to record. Defaults to 1. Use negative values to credit balance (e.g., when removing a seat). (optional)
|
|
17094
17444
|
* @param properties - Additional properties to attach to this usage event. (optional)
|
|
17095
17445
|
*
|
|
17096
|
-
* @returns The usage value recorded, with either a single updated balance or a map of updated balances.
|
|
17446
|
+
* @returns The usage value recorded, with either a single updated balance or a map of updated balances. If Autumn is experiencing degraded service from a downstream provider, the API may return 202 after accepting the event for replay so it can be tracked as soon as the service is restored.
|
|
17097
17447
|
*/
|
|
17098
17448
|
async track(request, options) {
|
|
17099
17449
|
return unwrapAsync(track(
|