autumn-js 1.2.25 → 1.2.26
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 +888 -753
- package/dist/backend/adapters/express.mjs +8 -8
- package/dist/backend/adapters/fetch.js +888 -753
- package/dist/backend/adapters/fetch.mjs +8 -8
- package/dist/backend/adapters/hono.js +888 -753
- package/dist/backend/adapters/hono.mjs +8 -8
- package/dist/backend/adapters/index.js +888 -753
- package/dist/backend/adapters/index.mjs +11 -11
- package/dist/backend/adapters/next.js +888 -753
- package/dist/backend/adapters/next.mjs +8 -8
- package/dist/backend/{chunk-6FBGYP7X.mjs → chunk-D4BQG3DH.mjs} +1 -1
- package/dist/backend/{chunk-6VSWVXTK.mjs → chunk-KJTWQSMK.mjs} +1 -1
- package/dist/backend/{chunk-VJT3K6DB.mjs → chunk-LJZUMUU3.mjs} +4 -4
- package/dist/backend/{chunk-5LKGVXKH.mjs → chunk-MPNJ2AXO.mjs} +1 -1
- package/dist/backend/{chunk-ACRLMGFI.mjs → chunk-TJ7TRWN4.mjs} +1 -1
- package/dist/backend/{chunk-H427PQAN.mjs → chunk-UCGI7CYU.mjs} +888 -753
- package/dist/backend/{chunk-TFYNLI5B.mjs → chunk-ZVZEA5YL.mjs} +6 -6
- 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 +888 -753
- 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 +4 -4
- package/dist/backend/core/handlers/handleRouteByName.js +888 -753
- 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 +888 -753
- 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 +888 -753
- package/dist/backend/core/index.mjs +9 -9
- 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 +888 -753
- package/dist/backend/index.mjs +9 -9
- package/dist/backend/{routeTypes-CxdEyS6R.d.mts → routeTypes-BcR8yEXe.d.mts} +46 -3
- package/dist/backend/{routeTypes-CEB4GveH.d.ts → routeTypes-CXj2d3BE.d.ts} +46 -3
- package/dist/better-auth/{chunk-3WGAWLHM.mjs → chunk-EFVPBRMR.mjs} +888 -753
- package/dist/better-auth/index.js +888 -753
- package/dist/better-auth/index.mjs +1 -1
- package/dist/better-auth/utils/handleBetterAuthRoute.js +888 -753
- package/dist/better-auth/utils/handleBetterAuthRoute.mjs +1 -1
- package/dist/better-auth/utils/index.js +888 -753
- package/dist/better-auth/utils/index.mjs +1 -1
- package/dist/sdk/index.d.mts +66 -6
- package/dist/sdk/index.d.ts +66 -6
- package/dist/sdk/index.js +155 -1
- package/dist/sdk/index.mjs +150 -2
- package/package.json +1 -1
- package/dist/backend/{chunk-S5HPMJ4U.mjs → chunk-55C2WWXQ.mjs} +3 -3
|
@@ -248,7 +248,7 @@ function isAbortError(err) {
|
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
// ../sdk/src/funcs/check.ts
|
|
251
|
-
var
|
|
251
|
+
var z54 = __toESM(require("zod/v4-mini"), 1);
|
|
252
252
|
|
|
253
253
|
// ../sdk/src/lib/base64.ts
|
|
254
254
|
var z = __toESM(require("zod/v4-mini"), 1);
|
|
@@ -10849,8 +10849,47 @@ var RedeemReferralCodeResponse$inboundSchema = z45.pipe(
|
|
|
10849
10849
|
})
|
|
10850
10850
|
);
|
|
10851
10851
|
|
|
10852
|
-
// ../sdk/src/models/
|
|
10852
|
+
// ../sdk/src/models/redeem-reward-code-op.ts
|
|
10853
10853
|
var z46 = __toESM(require("zod/v4-mini"), 1);
|
|
10854
|
+
var RedeemRewardCodeParams$outboundSchema = z46.pipe(
|
|
10855
|
+
z46.object({
|
|
10856
|
+
code: z46.string(),
|
|
10857
|
+
customerId: z46.string()
|
|
10858
|
+
}),
|
|
10859
|
+
z46.transform((v) => {
|
|
10860
|
+
return remap(v, {
|
|
10861
|
+
customerId: "customer_id"
|
|
10862
|
+
});
|
|
10863
|
+
})
|
|
10864
|
+
);
|
|
10865
|
+
var EntitlementsGranted$inboundSchema = z46.pipe(
|
|
10866
|
+
z46.object({
|
|
10867
|
+
feature_id: string4(),
|
|
10868
|
+
balance: number2()
|
|
10869
|
+
}),
|
|
10870
|
+
z46.transform((v) => {
|
|
10871
|
+
return remap(v, {
|
|
10872
|
+
"feature_id": "featureId"
|
|
10873
|
+
});
|
|
10874
|
+
})
|
|
10875
|
+
);
|
|
10876
|
+
var RedeemRewardCodeResponse$inboundSchema = z46.pipe(
|
|
10877
|
+
z46.object({
|
|
10878
|
+
reward_id: string4(),
|
|
10879
|
+
entitlements_granted: z46.array(
|
|
10880
|
+
z46.lazy(() => EntitlementsGranted$inboundSchema)
|
|
10881
|
+
)
|
|
10882
|
+
}),
|
|
10883
|
+
z46.transform((v) => {
|
|
10884
|
+
return remap(v, {
|
|
10885
|
+
"reward_id": "rewardId",
|
|
10886
|
+
"entitlements_granted": "entitlementsGranted"
|
|
10887
|
+
});
|
|
10888
|
+
})
|
|
10889
|
+
);
|
|
10890
|
+
|
|
10891
|
+
// ../sdk/src/models/setup-payment-op.ts
|
|
10892
|
+
var z47 = __toESM(require("zod/v4-mini"), 1);
|
|
10854
10893
|
var SetupPaymentPriceInterval = {
|
|
10855
10894
|
OneOff: "one_off",
|
|
10856
10895
|
Week: "week",
|
|
@@ -10972,73 +11011,73 @@ var SetupPaymentProrationBehavior = {
|
|
|
10972
11011
|
ProrateImmediately: "prorate_immediately",
|
|
10973
11012
|
None: "none"
|
|
10974
11013
|
};
|
|
10975
|
-
var SetupPaymentFeatureQuantity$outboundSchema =
|
|
10976
|
-
|
|
10977
|
-
featureId:
|
|
10978
|
-
quantity:
|
|
10979
|
-
adjustable:
|
|
11014
|
+
var SetupPaymentFeatureQuantity$outboundSchema = z47.pipe(
|
|
11015
|
+
z47.object({
|
|
11016
|
+
featureId: z47.string(),
|
|
11017
|
+
quantity: z47.optional(z47.number()),
|
|
11018
|
+
adjustable: z47.optional(z47.boolean())
|
|
10980
11019
|
}),
|
|
10981
|
-
|
|
11020
|
+
z47.transform((v) => {
|
|
10982
11021
|
return remap(v, {
|
|
10983
11022
|
featureId: "feature_id"
|
|
10984
11023
|
});
|
|
10985
11024
|
})
|
|
10986
11025
|
);
|
|
10987
|
-
var SetupPaymentPriceInterval$outboundSchema =
|
|
10988
|
-
var SetupPaymentBasePrice$outboundSchema =
|
|
10989
|
-
|
|
10990
|
-
amount:
|
|
11026
|
+
var SetupPaymentPriceInterval$outboundSchema = z47.enum(SetupPaymentPriceInterval);
|
|
11027
|
+
var SetupPaymentBasePrice$outboundSchema = z47.pipe(
|
|
11028
|
+
z47.object({
|
|
11029
|
+
amount: z47.number(),
|
|
10991
11030
|
interval: SetupPaymentPriceInterval$outboundSchema,
|
|
10992
|
-
intervalCount:
|
|
11031
|
+
intervalCount: z47.optional(z47.number())
|
|
10993
11032
|
}),
|
|
10994
|
-
|
|
11033
|
+
z47.transform((v) => {
|
|
10995
11034
|
return remap(v, {
|
|
10996
11035
|
intervalCount: "interval_count"
|
|
10997
11036
|
});
|
|
10998
11037
|
})
|
|
10999
11038
|
);
|
|
11000
|
-
var SetupPaymentItemResetInterval$outboundSchema =
|
|
11001
|
-
var SetupPaymentItemReset$outboundSchema =
|
|
11002
|
-
|
|
11039
|
+
var SetupPaymentItemResetInterval$outboundSchema = z47.enum(SetupPaymentItemResetInterval);
|
|
11040
|
+
var SetupPaymentItemReset$outboundSchema = z47.pipe(
|
|
11041
|
+
z47.object({
|
|
11003
11042
|
interval: SetupPaymentItemResetInterval$outboundSchema,
|
|
11004
|
-
intervalCount:
|
|
11043
|
+
intervalCount: z47.optional(z47.number())
|
|
11005
11044
|
}),
|
|
11006
|
-
|
|
11045
|
+
z47.transform((v) => {
|
|
11007
11046
|
return remap(v, {
|
|
11008
11047
|
intervalCount: "interval_count"
|
|
11009
11048
|
});
|
|
11010
11049
|
})
|
|
11011
11050
|
);
|
|
11012
|
-
var SetupPaymentItemTo$outboundSchema = smartUnion([
|
|
11013
|
-
var SetupPaymentItemTier$outboundSchema =
|
|
11014
|
-
|
|
11015
|
-
to: smartUnion([
|
|
11016
|
-
amount:
|
|
11017
|
-
flatAmount:
|
|
11051
|
+
var SetupPaymentItemTo$outboundSchema = smartUnion([z47.number(), z47.string()]);
|
|
11052
|
+
var SetupPaymentItemTier$outboundSchema = z47.pipe(
|
|
11053
|
+
z47.object({
|
|
11054
|
+
to: smartUnion([z47.number(), z47.string()]),
|
|
11055
|
+
amount: z47.optional(z47.number()),
|
|
11056
|
+
flatAmount: z47.optional(z47.number())
|
|
11018
11057
|
}),
|
|
11019
|
-
|
|
11058
|
+
z47.transform((v) => {
|
|
11020
11059
|
return remap(v, {
|
|
11021
11060
|
flatAmount: "flat_amount"
|
|
11022
11061
|
});
|
|
11023
11062
|
})
|
|
11024
11063
|
);
|
|
11025
|
-
var SetupPaymentItemTierBehavior$outboundSchema =
|
|
11026
|
-
var SetupPaymentItemPriceInterval$outboundSchema =
|
|
11027
|
-
var SetupPaymentItemBillingMethod$outboundSchema =
|
|
11028
|
-
var SetupPaymentItemPrice$outboundSchema =
|
|
11029
|
-
|
|
11030
|
-
amount:
|
|
11031
|
-
tiers:
|
|
11032
|
-
|
|
11064
|
+
var SetupPaymentItemTierBehavior$outboundSchema = z47.enum(SetupPaymentItemTierBehavior);
|
|
11065
|
+
var SetupPaymentItemPriceInterval$outboundSchema = z47.enum(SetupPaymentItemPriceInterval);
|
|
11066
|
+
var SetupPaymentItemBillingMethod$outboundSchema = z47.enum(SetupPaymentItemBillingMethod);
|
|
11067
|
+
var SetupPaymentItemPrice$outboundSchema = z47.pipe(
|
|
11068
|
+
z47.object({
|
|
11069
|
+
amount: z47.optional(z47.number()),
|
|
11070
|
+
tiers: z47.optional(
|
|
11071
|
+
z47.array(z47.lazy(() => SetupPaymentItemTier$outboundSchema))
|
|
11033
11072
|
),
|
|
11034
|
-
tierBehavior:
|
|
11073
|
+
tierBehavior: z47.optional(SetupPaymentItemTierBehavior$outboundSchema),
|
|
11035
11074
|
interval: SetupPaymentItemPriceInterval$outboundSchema,
|
|
11036
|
-
intervalCount:
|
|
11037
|
-
billingUnits:
|
|
11075
|
+
intervalCount: z47._default(z47.number(), 1),
|
|
11076
|
+
billingUnits: z47._default(z47.number(), 1),
|
|
11038
11077
|
billingMethod: SetupPaymentItemBillingMethod$outboundSchema,
|
|
11039
|
-
maxPurchase:
|
|
11078
|
+
maxPurchase: z47.optional(z47.number())
|
|
11040
11079
|
}),
|
|
11041
|
-
|
|
11080
|
+
z47.transform((v) => {
|
|
11042
11081
|
return remap(v, {
|
|
11043
11082
|
tierBehavior: "tier_behavior",
|
|
11044
11083
|
intervalCount: "interval_count",
|
|
@@ -11048,29 +11087,29 @@ var SetupPaymentItemPrice$outboundSchema = z46.pipe(
|
|
|
11048
11087
|
});
|
|
11049
11088
|
})
|
|
11050
11089
|
);
|
|
11051
|
-
var SetupPaymentItemOnIncrease$outboundSchema =
|
|
11052
|
-
var SetupPaymentItemOnDecrease$outboundSchema =
|
|
11053
|
-
var SetupPaymentItemProration$outboundSchema =
|
|
11054
|
-
|
|
11090
|
+
var SetupPaymentItemOnIncrease$outboundSchema = z47.enum(SetupPaymentItemOnIncrease);
|
|
11091
|
+
var SetupPaymentItemOnDecrease$outboundSchema = z47.enum(SetupPaymentItemOnDecrease);
|
|
11092
|
+
var SetupPaymentItemProration$outboundSchema = z47.pipe(
|
|
11093
|
+
z47.object({
|
|
11055
11094
|
onIncrease: SetupPaymentItemOnIncrease$outboundSchema,
|
|
11056
11095
|
onDecrease: SetupPaymentItemOnDecrease$outboundSchema
|
|
11057
11096
|
}),
|
|
11058
|
-
|
|
11097
|
+
z47.transform((v) => {
|
|
11059
11098
|
return remap(v, {
|
|
11060
11099
|
onIncrease: "on_increase",
|
|
11061
11100
|
onDecrease: "on_decrease"
|
|
11062
11101
|
});
|
|
11063
11102
|
})
|
|
11064
11103
|
);
|
|
11065
|
-
var SetupPaymentItemExpiryDurationType$outboundSchema =
|
|
11066
|
-
var SetupPaymentItemRollover$outboundSchema =
|
|
11067
|
-
|
|
11068
|
-
max:
|
|
11069
|
-
maxPercentage:
|
|
11104
|
+
var SetupPaymentItemExpiryDurationType$outboundSchema = z47.enum(SetupPaymentItemExpiryDurationType);
|
|
11105
|
+
var SetupPaymentItemRollover$outboundSchema = z47.pipe(
|
|
11106
|
+
z47.object({
|
|
11107
|
+
max: z47.optional(z47.number()),
|
|
11108
|
+
maxPercentage: z47.optional(z47.number()),
|
|
11070
11109
|
expiryDurationType: SetupPaymentItemExpiryDurationType$outboundSchema,
|
|
11071
|
-
expiryDurationLength:
|
|
11110
|
+
expiryDurationLength: z47.optional(z47.number())
|
|
11072
11111
|
}),
|
|
11073
|
-
|
|
11112
|
+
z47.transform((v) => {
|
|
11074
11113
|
return remap(v, {
|
|
11075
11114
|
maxPercentage: "max_percentage",
|
|
11076
11115
|
expiryDurationType: "expiry_duration_type",
|
|
@@ -11078,66 +11117,66 @@ var SetupPaymentItemRollover$outboundSchema = z46.pipe(
|
|
|
11078
11117
|
});
|
|
11079
11118
|
})
|
|
11080
11119
|
);
|
|
11081
|
-
var SetupPaymentItemPlanItem$outboundSchema =
|
|
11082
|
-
|
|
11083
|
-
featureId:
|
|
11084
|
-
included:
|
|
11085
|
-
unlimited:
|
|
11086
|
-
reset:
|
|
11087
|
-
price:
|
|
11088
|
-
proration:
|
|
11089
|
-
|
|
11120
|
+
var SetupPaymentItemPlanItem$outboundSchema = z47.pipe(
|
|
11121
|
+
z47.object({
|
|
11122
|
+
featureId: z47.string(),
|
|
11123
|
+
included: z47.optional(z47.number()),
|
|
11124
|
+
unlimited: z47.optional(z47.boolean()),
|
|
11125
|
+
reset: z47.optional(z47.lazy(() => SetupPaymentItemReset$outboundSchema)),
|
|
11126
|
+
price: z47.optional(z47.lazy(() => SetupPaymentItemPrice$outboundSchema)),
|
|
11127
|
+
proration: z47.optional(
|
|
11128
|
+
z47.lazy(() => SetupPaymentItemProration$outboundSchema)
|
|
11090
11129
|
),
|
|
11091
|
-
rollover:
|
|
11130
|
+
rollover: z47.optional(z47.lazy(() => SetupPaymentItemRollover$outboundSchema))
|
|
11092
11131
|
}),
|
|
11093
|
-
|
|
11132
|
+
z47.transform((v) => {
|
|
11094
11133
|
return remap(v, {
|
|
11095
11134
|
featureId: "feature_id"
|
|
11096
11135
|
});
|
|
11097
11136
|
})
|
|
11098
11137
|
);
|
|
11099
|
-
var SetupPaymentAddItemResetInterval$outboundSchema =
|
|
11100
|
-
var SetupPaymentAddItemReset$outboundSchema =
|
|
11101
|
-
|
|
11138
|
+
var SetupPaymentAddItemResetInterval$outboundSchema = z47.enum(SetupPaymentAddItemResetInterval);
|
|
11139
|
+
var SetupPaymentAddItemReset$outboundSchema = z47.pipe(
|
|
11140
|
+
z47.object({
|
|
11102
11141
|
interval: SetupPaymentAddItemResetInterval$outboundSchema,
|
|
11103
|
-
intervalCount:
|
|
11142
|
+
intervalCount: z47.optional(z47.number())
|
|
11104
11143
|
}),
|
|
11105
|
-
|
|
11144
|
+
z47.transform((v) => {
|
|
11106
11145
|
return remap(v, {
|
|
11107
11146
|
intervalCount: "interval_count"
|
|
11108
11147
|
});
|
|
11109
11148
|
})
|
|
11110
11149
|
);
|
|
11111
|
-
var SetupPaymentAddItemTo$outboundSchema = smartUnion([
|
|
11112
|
-
var SetupPaymentAddItemTier$outboundSchema =
|
|
11113
|
-
|
|
11114
|
-
to: smartUnion([
|
|
11115
|
-
amount:
|
|
11116
|
-
flatAmount:
|
|
11150
|
+
var SetupPaymentAddItemTo$outboundSchema = smartUnion([z47.number(), z47.string()]);
|
|
11151
|
+
var SetupPaymentAddItemTier$outboundSchema = z47.pipe(
|
|
11152
|
+
z47.object({
|
|
11153
|
+
to: smartUnion([z47.number(), z47.string()]),
|
|
11154
|
+
amount: z47.optional(z47.number()),
|
|
11155
|
+
flatAmount: z47.optional(z47.number())
|
|
11117
11156
|
}),
|
|
11118
|
-
|
|
11157
|
+
z47.transform((v) => {
|
|
11119
11158
|
return remap(v, {
|
|
11120
11159
|
flatAmount: "flat_amount"
|
|
11121
11160
|
});
|
|
11122
11161
|
})
|
|
11123
11162
|
);
|
|
11124
|
-
var SetupPaymentAddItemTierBehavior$outboundSchema =
|
|
11125
|
-
var SetupPaymentAddItemPriceInterval$outboundSchema =
|
|
11126
|
-
var SetupPaymentAddItemBillingMethod$outboundSchema =
|
|
11127
|
-
var SetupPaymentAddItemPrice$outboundSchema =
|
|
11128
|
-
|
|
11129
|
-
amount:
|
|
11130
|
-
tiers:
|
|
11131
|
-
|
|
11163
|
+
var SetupPaymentAddItemTierBehavior$outboundSchema = z47.enum(SetupPaymentAddItemTierBehavior);
|
|
11164
|
+
var SetupPaymentAddItemPriceInterval$outboundSchema = z47.enum(SetupPaymentAddItemPriceInterval);
|
|
11165
|
+
var SetupPaymentAddItemBillingMethod$outboundSchema = z47.enum(SetupPaymentAddItemBillingMethod);
|
|
11166
|
+
var SetupPaymentAddItemPrice$outboundSchema = z47.pipe(
|
|
11167
|
+
z47.object({
|
|
11168
|
+
amount: z47.optional(z47.number()),
|
|
11169
|
+
tiers: z47.optional(
|
|
11170
|
+
z47.array(z47.lazy(() => SetupPaymentAddItemTier$outboundSchema))
|
|
11132
11171
|
),
|
|
11133
|
-
tierBehavior:
|
|
11172
|
+
tierBehavior: z47.optional(SetupPaymentAddItemTierBehavior$outboundSchema),
|
|
11134
11173
|
interval: SetupPaymentAddItemPriceInterval$outboundSchema,
|
|
11135
|
-
intervalCount:
|
|
11136
|
-
billingUnits:
|
|
11174
|
+
intervalCount: z47._default(z47.number(), 1),
|
|
11175
|
+
billingUnits: z47._default(z47.number(), 1),
|
|
11137
11176
|
billingMethod: SetupPaymentAddItemBillingMethod$outboundSchema,
|
|
11138
|
-
maxPurchase:
|
|
11177
|
+
maxPurchase: z47.optional(z47.number())
|
|
11139
11178
|
}),
|
|
11140
|
-
|
|
11179
|
+
z47.transform((v) => {
|
|
11141
11180
|
return remap(v, {
|
|
11142
11181
|
tierBehavior: "tier_behavior",
|
|
11143
11182
|
intervalCount: "interval_count",
|
|
@@ -11147,31 +11186,31 @@ var SetupPaymentAddItemPrice$outboundSchema = z46.pipe(
|
|
|
11147
11186
|
});
|
|
11148
11187
|
})
|
|
11149
11188
|
);
|
|
11150
|
-
var SetupPaymentAddItemOnIncrease$outboundSchema =
|
|
11151
|
-
var SetupPaymentAddItemOnDecrease$outboundSchema =
|
|
11152
|
-
var SetupPaymentAddItemProration$outboundSchema =
|
|
11153
|
-
|
|
11189
|
+
var SetupPaymentAddItemOnIncrease$outboundSchema = z47.enum(SetupPaymentAddItemOnIncrease);
|
|
11190
|
+
var SetupPaymentAddItemOnDecrease$outboundSchema = z47.enum(SetupPaymentAddItemOnDecrease);
|
|
11191
|
+
var SetupPaymentAddItemProration$outboundSchema = z47.pipe(
|
|
11192
|
+
z47.object({
|
|
11154
11193
|
onIncrease: SetupPaymentAddItemOnIncrease$outboundSchema,
|
|
11155
11194
|
onDecrease: SetupPaymentAddItemOnDecrease$outboundSchema
|
|
11156
11195
|
}),
|
|
11157
|
-
|
|
11196
|
+
z47.transform((v) => {
|
|
11158
11197
|
return remap(v, {
|
|
11159
11198
|
onIncrease: "on_increase",
|
|
11160
11199
|
onDecrease: "on_decrease"
|
|
11161
11200
|
});
|
|
11162
11201
|
})
|
|
11163
11202
|
);
|
|
11164
|
-
var SetupPaymentAddItemExpiryDurationType$outboundSchema =
|
|
11203
|
+
var SetupPaymentAddItemExpiryDurationType$outboundSchema = z47.enum(
|
|
11165
11204
|
SetupPaymentAddItemExpiryDurationType
|
|
11166
11205
|
);
|
|
11167
|
-
var SetupPaymentAddItemRollover$outboundSchema =
|
|
11168
|
-
|
|
11169
|
-
max:
|
|
11170
|
-
maxPercentage:
|
|
11206
|
+
var SetupPaymentAddItemRollover$outboundSchema = z47.pipe(
|
|
11207
|
+
z47.object({
|
|
11208
|
+
max: z47.optional(z47.number()),
|
|
11209
|
+
maxPercentage: z47.optional(z47.number()),
|
|
11171
11210
|
expiryDurationType: SetupPaymentAddItemExpiryDurationType$outboundSchema,
|
|
11172
|
-
expiryDurationLength:
|
|
11211
|
+
expiryDurationLength: z47.optional(z47.number())
|
|
11173
11212
|
}),
|
|
11174
|
-
|
|
11213
|
+
z47.transform((v) => {
|
|
11175
11214
|
return remap(v, {
|
|
11176
11215
|
maxPercentage: "max_percentage",
|
|
11177
11216
|
expiryDurationType: "expiry_duration_type",
|
|
@@ -11179,53 +11218,53 @@ var SetupPaymentAddItemRollover$outboundSchema = z46.pipe(
|
|
|
11179
11218
|
});
|
|
11180
11219
|
})
|
|
11181
11220
|
);
|
|
11182
|
-
var SetupPaymentAddItemPlanItem$outboundSchema =
|
|
11183
|
-
|
|
11184
|
-
featureId:
|
|
11185
|
-
included:
|
|
11186
|
-
unlimited:
|
|
11187
|
-
reset:
|
|
11188
|
-
price:
|
|
11189
|
-
proration:
|
|
11190
|
-
|
|
11221
|
+
var SetupPaymentAddItemPlanItem$outboundSchema = z47.pipe(
|
|
11222
|
+
z47.object({
|
|
11223
|
+
featureId: z47.string(),
|
|
11224
|
+
included: z47.optional(z47.number()),
|
|
11225
|
+
unlimited: z47.optional(z47.boolean()),
|
|
11226
|
+
reset: z47.optional(z47.lazy(() => SetupPaymentAddItemReset$outboundSchema)),
|
|
11227
|
+
price: z47.optional(z47.lazy(() => SetupPaymentAddItemPrice$outboundSchema)),
|
|
11228
|
+
proration: z47.optional(
|
|
11229
|
+
z47.lazy(() => SetupPaymentAddItemProration$outboundSchema)
|
|
11191
11230
|
),
|
|
11192
|
-
rollover:
|
|
11193
|
-
|
|
11231
|
+
rollover: z47.optional(
|
|
11232
|
+
z47.lazy(() => SetupPaymentAddItemRollover$outboundSchema)
|
|
11194
11233
|
)
|
|
11195
11234
|
}),
|
|
11196
|
-
|
|
11235
|
+
z47.transform((v) => {
|
|
11197
11236
|
return remap(v, {
|
|
11198
11237
|
featureId: "feature_id"
|
|
11199
11238
|
});
|
|
11200
11239
|
})
|
|
11201
11240
|
);
|
|
11202
|
-
var SetupPaymentRemoveItemBillingMethod$outboundSchema =
|
|
11203
|
-
var SetupPaymentRemoveItemInterval$outboundSchema =
|
|
11204
|
-
var SetupPaymentPlanItemFilter$outboundSchema =
|
|
11205
|
-
|
|
11206
|
-
featureId:
|
|
11207
|
-
billingMethod:
|
|
11241
|
+
var SetupPaymentRemoveItemBillingMethod$outboundSchema = z47.enum(SetupPaymentRemoveItemBillingMethod);
|
|
11242
|
+
var SetupPaymentRemoveItemInterval$outboundSchema = z47.enum(SetupPaymentRemoveItemInterval);
|
|
11243
|
+
var SetupPaymentPlanItemFilter$outboundSchema = z47.pipe(
|
|
11244
|
+
z47.object({
|
|
11245
|
+
featureId: z47.optional(z47.string()),
|
|
11246
|
+
billingMethod: z47.optional(
|
|
11208
11247
|
SetupPaymentRemoveItemBillingMethod$outboundSchema
|
|
11209
11248
|
),
|
|
11210
|
-
interval:
|
|
11249
|
+
interval: z47.optional(SetupPaymentRemoveItemInterval$outboundSchema)
|
|
11211
11250
|
}),
|
|
11212
|
-
|
|
11251
|
+
z47.transform((v) => {
|
|
11213
11252
|
return remap(v, {
|
|
11214
11253
|
featureId: "feature_id",
|
|
11215
11254
|
billingMethod: "billing_method"
|
|
11216
11255
|
});
|
|
11217
11256
|
})
|
|
11218
11257
|
);
|
|
11219
|
-
var SetupPaymentDurationType$outboundSchema =
|
|
11220
|
-
var SetupPaymentOnEnd$outboundSchema =
|
|
11221
|
-
var SetupPaymentFreeTrialParams$outboundSchema =
|
|
11222
|
-
|
|
11223
|
-
durationLength:
|
|
11224
|
-
durationType:
|
|
11225
|
-
cardRequired:
|
|
11226
|
-
onEnd:
|
|
11258
|
+
var SetupPaymentDurationType$outboundSchema = z47.enum(SetupPaymentDurationType);
|
|
11259
|
+
var SetupPaymentOnEnd$outboundSchema = z47.enum(SetupPaymentOnEnd);
|
|
11260
|
+
var SetupPaymentFreeTrialParams$outboundSchema = z47.pipe(
|
|
11261
|
+
z47.object({
|
|
11262
|
+
durationLength: z47.number(),
|
|
11263
|
+
durationType: z47._default(SetupPaymentDurationType$outboundSchema, "month"),
|
|
11264
|
+
cardRequired: z47._default(z47.boolean(), true),
|
|
11265
|
+
onEnd: z47.optional(SetupPaymentOnEnd$outboundSchema)
|
|
11227
11266
|
}),
|
|
11228
|
-
|
|
11267
|
+
z47.transform((v) => {
|
|
11229
11268
|
return remap(v, {
|
|
11230
11269
|
durationLength: "duration_length",
|
|
11231
11270
|
durationType: "duration_type",
|
|
@@ -11234,25 +11273,25 @@ var SetupPaymentFreeTrialParams$outboundSchema = z46.pipe(
|
|
|
11234
11273
|
});
|
|
11235
11274
|
})
|
|
11236
11275
|
);
|
|
11237
|
-
var SetupPaymentCustomize$outboundSchema =
|
|
11238
|
-
|
|
11239
|
-
price:
|
|
11240
|
-
|
|
11276
|
+
var SetupPaymentCustomize$outboundSchema = z47.pipe(
|
|
11277
|
+
z47.object({
|
|
11278
|
+
price: z47.optional(
|
|
11279
|
+
z47.nullable(z47.lazy(() => SetupPaymentBasePrice$outboundSchema))
|
|
11241
11280
|
),
|
|
11242
|
-
items:
|
|
11243
|
-
|
|
11281
|
+
items: z47.optional(
|
|
11282
|
+
z47.array(z47.lazy(() => SetupPaymentItemPlanItem$outboundSchema))
|
|
11244
11283
|
),
|
|
11245
|
-
addItems:
|
|
11246
|
-
|
|
11284
|
+
addItems: z47.optional(
|
|
11285
|
+
z47.array(z47.lazy(() => SetupPaymentAddItemPlanItem$outboundSchema))
|
|
11247
11286
|
),
|
|
11248
|
-
removeItems:
|
|
11249
|
-
|
|
11287
|
+
removeItems: z47.optional(
|
|
11288
|
+
z47.array(z47.lazy(() => SetupPaymentPlanItemFilter$outboundSchema))
|
|
11250
11289
|
),
|
|
11251
|
-
freeTrial:
|
|
11252
|
-
|
|
11290
|
+
freeTrial: z47.optional(
|
|
11291
|
+
z47.nullable(z47.lazy(() => SetupPaymentFreeTrialParams$outboundSchema))
|
|
11253
11292
|
)
|
|
11254
11293
|
}),
|
|
11255
|
-
|
|
11294
|
+
z47.transform((v) => {
|
|
11256
11295
|
return remap(v, {
|
|
11257
11296
|
addItems: "add_items",
|
|
11258
11297
|
removeItems: "remove_items",
|
|
@@ -11260,81 +11299,81 @@ var SetupPaymentCustomize$outboundSchema = z46.pipe(
|
|
|
11260
11299
|
});
|
|
11261
11300
|
})
|
|
11262
11301
|
);
|
|
11263
|
-
var SetupPaymentProrationBehavior$outboundSchema =
|
|
11264
|
-
var SetupPaymentAttachDiscount$outboundSchema =
|
|
11265
|
-
|
|
11266
|
-
rewardId:
|
|
11267
|
-
promotionCode:
|
|
11302
|
+
var SetupPaymentProrationBehavior$outboundSchema = z47.enum(SetupPaymentProrationBehavior);
|
|
11303
|
+
var SetupPaymentAttachDiscount$outboundSchema = z47.pipe(
|
|
11304
|
+
z47.object({
|
|
11305
|
+
rewardId: z47.optional(z47.string()),
|
|
11306
|
+
promotionCode: z47.optional(z47.string())
|
|
11268
11307
|
}),
|
|
11269
|
-
|
|
11308
|
+
z47.transform((v) => {
|
|
11270
11309
|
return remap(v, {
|
|
11271
11310
|
rewardId: "reward_id",
|
|
11272
11311
|
promotionCode: "promotion_code"
|
|
11273
11312
|
});
|
|
11274
11313
|
})
|
|
11275
11314
|
);
|
|
11276
|
-
var SetupPaymentCustomLineItem$outboundSchema =
|
|
11277
|
-
amount:
|
|
11278
|
-
description:
|
|
11315
|
+
var SetupPaymentCustomLineItem$outboundSchema = z47.object({
|
|
11316
|
+
amount: z47.number(),
|
|
11317
|
+
description: z47.string()
|
|
11279
11318
|
});
|
|
11280
|
-
var SetupPaymentCarryOverBalances$outboundSchema =
|
|
11281
|
-
|
|
11282
|
-
enabled:
|
|
11283
|
-
featureIds:
|
|
11319
|
+
var SetupPaymentCarryOverBalances$outboundSchema = z47.pipe(
|
|
11320
|
+
z47.object({
|
|
11321
|
+
enabled: z47.boolean(),
|
|
11322
|
+
featureIds: z47.optional(z47.array(z47.string()))
|
|
11284
11323
|
}),
|
|
11285
|
-
|
|
11324
|
+
z47.transform((v) => {
|
|
11286
11325
|
return remap(v, {
|
|
11287
11326
|
featureIds: "feature_ids"
|
|
11288
11327
|
});
|
|
11289
11328
|
})
|
|
11290
11329
|
);
|
|
11291
|
-
var SetupPaymentCarryOverUsages$outboundSchema =
|
|
11292
|
-
|
|
11293
|
-
enabled:
|
|
11294
|
-
featureIds:
|
|
11330
|
+
var SetupPaymentCarryOverUsages$outboundSchema = z47.pipe(
|
|
11331
|
+
z47.object({
|
|
11332
|
+
enabled: z47.boolean(),
|
|
11333
|
+
featureIds: z47.optional(z47.array(z47.string()))
|
|
11295
11334
|
}),
|
|
11296
|
-
|
|
11335
|
+
z47.transform((v) => {
|
|
11297
11336
|
return remap(v, {
|
|
11298
11337
|
featureIds: "feature_ids"
|
|
11299
11338
|
});
|
|
11300
11339
|
})
|
|
11301
11340
|
);
|
|
11302
|
-
var SetupPaymentParams$outboundSchema =
|
|
11303
|
-
|
|
11304
|
-
customerId:
|
|
11305
|
-
entityId:
|
|
11306
|
-
planId:
|
|
11307
|
-
featureQuantities:
|
|
11308
|
-
|
|
11341
|
+
var SetupPaymentParams$outboundSchema = z47.pipe(
|
|
11342
|
+
z47.object({
|
|
11343
|
+
customerId: z47.string(),
|
|
11344
|
+
entityId: z47.optional(z47.string()),
|
|
11345
|
+
planId: z47.optional(z47.string()),
|
|
11346
|
+
featureQuantities: z47.optional(
|
|
11347
|
+
z47.array(z47.lazy(() => SetupPaymentFeatureQuantity$outboundSchema))
|
|
11309
11348
|
),
|
|
11310
|
-
version:
|
|
11311
|
-
customize:
|
|
11312
|
-
prorationBehavior:
|
|
11313
|
-
subscriptionId:
|
|
11314
|
-
discounts:
|
|
11315
|
-
|
|
11349
|
+
version: z47.optional(z47.number()),
|
|
11350
|
+
customize: z47.optional(z47.lazy(() => SetupPaymentCustomize$outboundSchema)),
|
|
11351
|
+
prorationBehavior: z47.optional(SetupPaymentProrationBehavior$outboundSchema),
|
|
11352
|
+
subscriptionId: z47.optional(z47.string()),
|
|
11353
|
+
discounts: z47.optional(
|
|
11354
|
+
z47.array(z47.lazy(() => SetupPaymentAttachDiscount$outboundSchema))
|
|
11316
11355
|
),
|
|
11317
|
-
successUrl:
|
|
11318
|
-
billingCycleAnchor:
|
|
11319
|
-
startsAt:
|
|
11320
|
-
endsAt:
|
|
11321
|
-
checkoutSessionParams:
|
|
11322
|
-
customLineItems:
|
|
11323
|
-
|
|
11356
|
+
successUrl: z47.optional(z47.string()),
|
|
11357
|
+
billingCycleAnchor: z47.optional(z47.literal("now")),
|
|
11358
|
+
startsAt: z47.optional(z47.int()),
|
|
11359
|
+
endsAt: z47.optional(z47.int()),
|
|
11360
|
+
checkoutSessionParams: z47.optional(z47.record(z47.string(), z47.any())),
|
|
11361
|
+
customLineItems: z47.optional(
|
|
11362
|
+
z47.array(z47.lazy(() => SetupPaymentCustomLineItem$outboundSchema))
|
|
11324
11363
|
),
|
|
11325
|
-
processorSubscriptionId:
|
|
11326
|
-
carryOverBalances:
|
|
11327
|
-
|
|
11364
|
+
processorSubscriptionId: z47.optional(z47.string()),
|
|
11365
|
+
carryOverBalances: z47.optional(
|
|
11366
|
+
z47.lazy(() => SetupPaymentCarryOverBalances$outboundSchema)
|
|
11328
11367
|
),
|
|
11329
|
-
carryOverUsages:
|
|
11330
|
-
|
|
11368
|
+
carryOverUsages: z47.optional(
|
|
11369
|
+
z47.lazy(() => SetupPaymentCarryOverUsages$outboundSchema)
|
|
11331
11370
|
),
|
|
11332
|
-
metadata:
|
|
11333
|
-
noBillingChanges:
|
|
11334
|
-
enablePlanImmediately:
|
|
11335
|
-
taxRateId:
|
|
11371
|
+
metadata: z47.optional(z47.record(z47.string(), z47.string())),
|
|
11372
|
+
noBillingChanges: z47.optional(z47.boolean()),
|
|
11373
|
+
enablePlanImmediately: z47.optional(z47.boolean()),
|
|
11374
|
+
taxRateId: z47.optional(z47.string())
|
|
11336
11375
|
}),
|
|
11337
|
-
|
|
11376
|
+
z47.transform((v) => {
|
|
11338
11377
|
return remap(v, {
|
|
11339
11378
|
customerId: "customer_id",
|
|
11340
11379
|
entityId: "entity_id",
|
|
@@ -11357,13 +11396,13 @@ var SetupPaymentParams$outboundSchema = z46.pipe(
|
|
|
11357
11396
|
});
|
|
11358
11397
|
})
|
|
11359
11398
|
);
|
|
11360
|
-
var SetupPaymentResponse$inboundSchema =
|
|
11361
|
-
|
|
11399
|
+
var SetupPaymentResponse$inboundSchema = z47.pipe(
|
|
11400
|
+
z47.object({
|
|
11362
11401
|
customer_id: string4(),
|
|
11363
11402
|
entity_id: optional3(string4()),
|
|
11364
11403
|
url: string4()
|
|
11365
11404
|
}),
|
|
11366
|
-
|
|
11405
|
+
z47.transform((v) => {
|
|
11367
11406
|
return remap(v, {
|
|
11368
11407
|
"customer_id": "customerId",
|
|
11369
11408
|
"entity_id": "entityId"
|
|
@@ -11372,7 +11411,7 @@ var SetupPaymentResponse$inboundSchema = z46.pipe(
|
|
|
11372
11411
|
);
|
|
11373
11412
|
|
|
11374
11413
|
// ../sdk/src/models/track-op.ts
|
|
11375
|
-
var
|
|
11414
|
+
var z48 = __toESM(require("zod/v4-mini"), 1);
|
|
11376
11415
|
var TrackIntervalEnum2 = {
|
|
11377
11416
|
OneOff: "one_off",
|
|
11378
11417
|
Minute: "minute",
|
|
@@ -11395,30 +11434,30 @@ var TrackIntervalEnum1 = {
|
|
|
11395
11434
|
SemiAnnual: "semi_annual",
|
|
11396
11435
|
Year: "year"
|
|
11397
11436
|
};
|
|
11398
|
-
var TrackLock$outboundSchema =
|
|
11399
|
-
|
|
11400
|
-
lockId:
|
|
11401
|
-
enabled:
|
|
11402
|
-
expiresAt:
|
|
11437
|
+
var TrackLock$outboundSchema = z48.pipe(
|
|
11438
|
+
z48.object({
|
|
11439
|
+
lockId: z48.string(),
|
|
11440
|
+
enabled: z48.literal(true),
|
|
11441
|
+
expiresAt: z48.optional(z48.number())
|
|
11403
11442
|
}),
|
|
11404
|
-
|
|
11443
|
+
z48.transform((v) => {
|
|
11405
11444
|
return remap(v, {
|
|
11406
11445
|
lockId: "lock_id",
|
|
11407
11446
|
expiresAt: "expires_at"
|
|
11408
11447
|
});
|
|
11409
11448
|
})
|
|
11410
11449
|
);
|
|
11411
|
-
var TrackParams$outboundSchema =
|
|
11412
|
-
|
|
11413
|
-
customerId:
|
|
11414
|
-
featureId:
|
|
11415
|
-
entityId:
|
|
11416
|
-
eventName:
|
|
11417
|
-
value:
|
|
11418
|
-
properties:
|
|
11419
|
-
lock:
|
|
11450
|
+
var TrackParams$outboundSchema = z48.pipe(
|
|
11451
|
+
z48.object({
|
|
11452
|
+
customerId: z48.string(),
|
|
11453
|
+
featureId: z48.optional(z48.string()),
|
|
11454
|
+
entityId: z48.optional(z48.string()),
|
|
11455
|
+
eventName: z48.optional(z48.string()),
|
|
11456
|
+
value: z48.optional(z48.number()),
|
|
11457
|
+
properties: z48.optional(z48.record(z48.string(), z48.any())),
|
|
11458
|
+
lock: z48.optional(z48.lazy(() => TrackLock$outboundSchema))
|
|
11420
11459
|
}),
|
|
11421
|
-
|
|
11460
|
+
z48.transform((v) => {
|
|
11422
11461
|
return remap(v, {
|
|
11423
11462
|
customerId: "customer_id",
|
|
11424
11463
|
featureId: "feature_id",
|
|
@@ -11429,28 +11468,28 @@ var TrackParams$outboundSchema = z47.pipe(
|
|
|
11429
11468
|
);
|
|
11430
11469
|
var TrackIntervalEnum2$inboundSchema = inboundSchema(TrackIntervalEnum2);
|
|
11431
11470
|
var TrackIntervalUnion2$inboundSchema = smartUnion([TrackIntervalEnum2$inboundSchema, string4()]);
|
|
11432
|
-
var TrackReset2$inboundSchema =
|
|
11433
|
-
|
|
11471
|
+
var TrackReset2$inboundSchema = z48.pipe(
|
|
11472
|
+
z48.object({
|
|
11434
11473
|
interval: smartUnion([TrackIntervalEnum2$inboundSchema, string4()]),
|
|
11435
11474
|
interval_count: optional3(number2()),
|
|
11436
11475
|
resets_at: nullable(number2())
|
|
11437
11476
|
}),
|
|
11438
|
-
|
|
11477
|
+
z48.transform((v) => {
|
|
11439
11478
|
return remap(v, {
|
|
11440
11479
|
"interval_count": "intervalCount",
|
|
11441
11480
|
"resets_at": "resetsAt"
|
|
11442
11481
|
});
|
|
11443
11482
|
})
|
|
11444
11483
|
);
|
|
11445
|
-
var Deduction2$inboundSchema =
|
|
11446
|
-
|
|
11484
|
+
var Deduction2$inboundSchema = z48.pipe(
|
|
11485
|
+
z48.object({
|
|
11447
11486
|
balance_id: string4(),
|
|
11448
11487
|
feature_id: string4(),
|
|
11449
11488
|
plan_id: nullable(string4()),
|
|
11450
|
-
reset: nullable(
|
|
11489
|
+
reset: nullable(z48.lazy(() => TrackReset2$inboundSchema)),
|
|
11451
11490
|
value: number2()
|
|
11452
11491
|
}),
|
|
11453
|
-
|
|
11492
|
+
z48.transform((v) => {
|
|
11454
11493
|
return remap(v, {
|
|
11455
11494
|
"balance_id": "balanceId",
|
|
11456
11495
|
"feature_id": "featureId",
|
|
@@ -11458,19 +11497,19 @@ var Deduction2$inboundSchema = z47.pipe(
|
|
|
11458
11497
|
});
|
|
11459
11498
|
})
|
|
11460
11499
|
);
|
|
11461
|
-
var TrackResponseBody2$inboundSchema =
|
|
11462
|
-
|
|
11500
|
+
var TrackResponseBody2$inboundSchema = z48.pipe(
|
|
11501
|
+
z48.object({
|
|
11463
11502
|
customer_id: string4(),
|
|
11464
11503
|
entity_id: optional3(string4()),
|
|
11465
11504
|
event_name: optional3(string4()),
|
|
11466
11505
|
value: number2(),
|
|
11467
11506
|
balance: nullable(Balance$inboundSchema),
|
|
11468
11507
|
balances: optional3(
|
|
11469
|
-
|
|
11508
|
+
z48.record(z48.string(), nullable(Balance$inboundSchema))
|
|
11470
11509
|
),
|
|
11471
|
-
deductions: optional3(
|
|
11510
|
+
deductions: optional3(z48.array(z48.lazy(() => Deduction2$inboundSchema)))
|
|
11472
11511
|
}),
|
|
11473
|
-
|
|
11512
|
+
z48.transform((v) => {
|
|
11474
11513
|
return remap(v, {
|
|
11475
11514
|
"customer_id": "customerId",
|
|
11476
11515
|
"entity_id": "entityId",
|
|
@@ -11480,28 +11519,28 @@ var TrackResponseBody2$inboundSchema = z47.pipe(
|
|
|
11480
11519
|
);
|
|
11481
11520
|
var TrackIntervalEnum1$inboundSchema = inboundSchema(TrackIntervalEnum1);
|
|
11482
11521
|
var TrackIntervalUnion1$inboundSchema = smartUnion([TrackIntervalEnum1$inboundSchema, string4()]);
|
|
11483
|
-
var TrackReset1$inboundSchema =
|
|
11484
|
-
|
|
11522
|
+
var TrackReset1$inboundSchema = z48.pipe(
|
|
11523
|
+
z48.object({
|
|
11485
11524
|
interval: smartUnion([TrackIntervalEnum1$inboundSchema, string4()]),
|
|
11486
11525
|
interval_count: optional3(number2()),
|
|
11487
11526
|
resets_at: nullable(number2())
|
|
11488
11527
|
}),
|
|
11489
|
-
|
|
11528
|
+
z48.transform((v) => {
|
|
11490
11529
|
return remap(v, {
|
|
11491
11530
|
"interval_count": "intervalCount",
|
|
11492
11531
|
"resets_at": "resetsAt"
|
|
11493
11532
|
});
|
|
11494
11533
|
})
|
|
11495
11534
|
);
|
|
11496
|
-
var Deduction1$inboundSchema =
|
|
11497
|
-
|
|
11535
|
+
var Deduction1$inboundSchema = z48.pipe(
|
|
11536
|
+
z48.object({
|
|
11498
11537
|
balance_id: string4(),
|
|
11499
11538
|
feature_id: string4(),
|
|
11500
11539
|
plan_id: nullable(string4()),
|
|
11501
|
-
reset: nullable(
|
|
11540
|
+
reset: nullable(z48.lazy(() => TrackReset1$inboundSchema)),
|
|
11502
11541
|
value: number2()
|
|
11503
11542
|
}),
|
|
11504
|
-
|
|
11543
|
+
z48.transform((v) => {
|
|
11505
11544
|
return remap(v, {
|
|
11506
11545
|
"balance_id": "balanceId",
|
|
11507
11546
|
"feature_id": "featureId",
|
|
@@ -11509,19 +11548,19 @@ var Deduction1$inboundSchema = z47.pipe(
|
|
|
11509
11548
|
});
|
|
11510
11549
|
})
|
|
11511
11550
|
);
|
|
11512
|
-
var TrackResponseBody1$inboundSchema =
|
|
11513
|
-
|
|
11551
|
+
var TrackResponseBody1$inboundSchema = z48.pipe(
|
|
11552
|
+
z48.object({
|
|
11514
11553
|
customer_id: string4(),
|
|
11515
11554
|
entity_id: optional3(string4()),
|
|
11516
11555
|
event_name: optional3(string4()),
|
|
11517
11556
|
value: number2(),
|
|
11518
11557
|
balance: nullable(Balance$inboundSchema),
|
|
11519
11558
|
balances: optional3(
|
|
11520
|
-
|
|
11559
|
+
z48.record(z48.string(), nullable(Balance$inboundSchema))
|
|
11521
11560
|
),
|
|
11522
|
-
deductions: optional3(
|
|
11561
|
+
deductions: optional3(z48.array(z48.lazy(() => Deduction1$inboundSchema)))
|
|
11523
11562
|
}),
|
|
11524
|
-
|
|
11563
|
+
z48.transform((v) => {
|
|
11525
11564
|
return remap(v, {
|
|
11526
11565
|
"customer_id": "customerId",
|
|
11527
11566
|
"entity_id": "entityId",
|
|
@@ -11530,12 +11569,12 @@ var TrackResponseBody1$inboundSchema = z47.pipe(
|
|
|
11530
11569
|
})
|
|
11531
11570
|
);
|
|
11532
11571
|
var TrackResponse$inboundSchema = smartUnion([
|
|
11533
|
-
|
|
11534
|
-
|
|
11572
|
+
z48.lazy(() => TrackResponseBody1$inboundSchema),
|
|
11573
|
+
z48.lazy(() => TrackResponseBody2$inboundSchema)
|
|
11535
11574
|
]);
|
|
11536
11575
|
|
|
11537
11576
|
// ../sdk/src/models/update-balance-op.ts
|
|
11538
|
-
var
|
|
11577
|
+
var z49 = __toESM(require("zod/v4-mini"), 1);
|
|
11539
11578
|
var UpdateBalanceInterval = {
|
|
11540
11579
|
OneOff: "one_off",
|
|
11541
11580
|
Minute: "minute",
|
|
@@ -11547,21 +11586,21 @@ var UpdateBalanceInterval = {
|
|
|
11547
11586
|
SemiAnnual: "semi_annual",
|
|
11548
11587
|
Year: "year"
|
|
11549
11588
|
};
|
|
11550
|
-
var UpdateBalanceInterval$outboundSchema =
|
|
11551
|
-
var UpdateBalanceParams$outboundSchema =
|
|
11552
|
-
|
|
11553
|
-
customerId:
|
|
11554
|
-
featureId:
|
|
11555
|
-
entityId:
|
|
11556
|
-
remaining:
|
|
11557
|
-
addToBalance:
|
|
11558
|
-
usage:
|
|
11559
|
-
interval:
|
|
11560
|
-
includedGrant:
|
|
11561
|
-
balanceId:
|
|
11562
|
-
nextResetAt:
|
|
11589
|
+
var UpdateBalanceInterval$outboundSchema = z49.enum(UpdateBalanceInterval);
|
|
11590
|
+
var UpdateBalanceParams$outboundSchema = z49.pipe(
|
|
11591
|
+
z49.object({
|
|
11592
|
+
customerId: z49.string(),
|
|
11593
|
+
featureId: z49.string(),
|
|
11594
|
+
entityId: z49.optional(z49.string()),
|
|
11595
|
+
remaining: z49.optional(z49.number()),
|
|
11596
|
+
addToBalance: z49.optional(z49.number()),
|
|
11597
|
+
usage: z49.optional(z49.number()),
|
|
11598
|
+
interval: z49.optional(UpdateBalanceInterval$outboundSchema),
|
|
11599
|
+
includedGrant: z49.optional(z49.number()),
|
|
11600
|
+
balanceId: z49.optional(z49.string()),
|
|
11601
|
+
nextResetAt: z49.optional(z49.number())
|
|
11563
11602
|
}),
|
|
11564
|
-
|
|
11603
|
+
z49.transform((v) => {
|
|
11565
11604
|
return remap(v, {
|
|
11566
11605
|
customerId: "customer_id",
|
|
11567
11606
|
featureId: "feature_id",
|
|
@@ -11573,12 +11612,12 @@ var UpdateBalanceParams$outboundSchema = z48.pipe(
|
|
|
11573
11612
|
});
|
|
11574
11613
|
})
|
|
11575
11614
|
);
|
|
11576
|
-
var UpdateBalanceResponse$inboundSchema =
|
|
11615
|
+
var UpdateBalanceResponse$inboundSchema = z49.object({
|
|
11577
11616
|
success: boolean2()
|
|
11578
11617
|
});
|
|
11579
11618
|
|
|
11580
11619
|
// ../sdk/src/models/update-customer-op.ts
|
|
11581
|
-
var
|
|
11620
|
+
var z50 = __toESM(require("zod/v4-mini"), 1);
|
|
11582
11621
|
var UpdateCustomerIntervalRequest = {
|
|
11583
11622
|
Hour: "hour",
|
|
11584
11623
|
Day: "day",
|
|
@@ -11622,31 +11661,31 @@ var UpdateCustomerType = {
|
|
|
11622
11661
|
Metered: "metered",
|
|
11623
11662
|
CreditSystem: "credit_system"
|
|
11624
11663
|
};
|
|
11625
|
-
var UpdateCustomerIntervalRequest$outboundSchema =
|
|
11626
|
-
var UpdateCustomerPurchaseLimitRequest$outboundSchema =
|
|
11627
|
-
|
|
11664
|
+
var UpdateCustomerIntervalRequest$outboundSchema = z50.enum(UpdateCustomerIntervalRequest);
|
|
11665
|
+
var UpdateCustomerPurchaseLimitRequest$outboundSchema = z50.pipe(
|
|
11666
|
+
z50.object({
|
|
11628
11667
|
interval: UpdateCustomerIntervalRequest$outboundSchema,
|
|
11629
|
-
intervalCount:
|
|
11630
|
-
limit:
|
|
11668
|
+
intervalCount: z50._default(z50.number(), 1),
|
|
11669
|
+
limit: z50.number()
|
|
11631
11670
|
}),
|
|
11632
|
-
|
|
11671
|
+
z50.transform((v) => {
|
|
11633
11672
|
return remap(v, {
|
|
11634
11673
|
intervalCount: "interval_count"
|
|
11635
11674
|
});
|
|
11636
11675
|
})
|
|
11637
11676
|
);
|
|
11638
|
-
var UpdateCustomerAutoTopupRequest$outboundSchema =
|
|
11639
|
-
|
|
11640
|
-
featureId:
|
|
11641
|
-
enabled:
|
|
11642
|
-
threshold:
|
|
11643
|
-
quantity:
|
|
11644
|
-
purchaseLimit:
|
|
11645
|
-
|
|
11677
|
+
var UpdateCustomerAutoTopupRequest$outboundSchema = z50.pipe(
|
|
11678
|
+
z50.object({
|
|
11679
|
+
featureId: z50.string(),
|
|
11680
|
+
enabled: z50._default(z50.boolean(), false),
|
|
11681
|
+
threshold: z50.number(),
|
|
11682
|
+
quantity: z50.number(),
|
|
11683
|
+
purchaseLimit: z50.optional(
|
|
11684
|
+
z50.lazy(() => UpdateCustomerPurchaseLimitRequest$outboundSchema)
|
|
11646
11685
|
),
|
|
11647
|
-
invoiceMode:
|
|
11686
|
+
invoiceMode: z50.optional(z50.boolean())
|
|
11648
11687
|
}),
|
|
11649
|
-
|
|
11688
|
+
z50.transform((v) => {
|
|
11650
11689
|
return remap(v, {
|
|
11651
11690
|
featureId: "feature_id",
|
|
11652
11691
|
purchaseLimit: "purchase_limit",
|
|
@@ -11654,64 +11693,64 @@ var UpdateCustomerAutoTopupRequest$outboundSchema = z49.pipe(
|
|
|
11654
11693
|
});
|
|
11655
11694
|
})
|
|
11656
11695
|
);
|
|
11657
|
-
var UpdateCustomerSpendLimitRequest$outboundSchema =
|
|
11658
|
-
|
|
11659
|
-
featureId:
|
|
11660
|
-
enabled:
|
|
11661
|
-
overageLimit:
|
|
11696
|
+
var UpdateCustomerSpendLimitRequest$outboundSchema = z50.pipe(
|
|
11697
|
+
z50.object({
|
|
11698
|
+
featureId: z50.optional(z50.string()),
|
|
11699
|
+
enabled: z50._default(z50.boolean(), false),
|
|
11700
|
+
overageLimit: z50.optional(z50.number())
|
|
11662
11701
|
}),
|
|
11663
|
-
|
|
11702
|
+
z50.transform((v) => {
|
|
11664
11703
|
return remap(v, {
|
|
11665
11704
|
featureId: "feature_id",
|
|
11666
11705
|
overageLimit: "overage_limit"
|
|
11667
11706
|
});
|
|
11668
11707
|
})
|
|
11669
11708
|
);
|
|
11670
|
-
var UpdateCustomerThresholdTypeRequestBody$outboundSchema =
|
|
11709
|
+
var UpdateCustomerThresholdTypeRequestBody$outboundSchema = z50.enum(
|
|
11671
11710
|
UpdateCustomerThresholdTypeRequestBody
|
|
11672
11711
|
);
|
|
11673
|
-
var UpdateCustomerUsageAlertRequestBody$outboundSchema =
|
|
11674
|
-
|
|
11675
|
-
featureId:
|
|
11676
|
-
enabled:
|
|
11677
|
-
threshold:
|
|
11712
|
+
var UpdateCustomerUsageAlertRequestBody$outboundSchema = z50.pipe(
|
|
11713
|
+
z50.object({
|
|
11714
|
+
featureId: z50.optional(z50.string()),
|
|
11715
|
+
enabled: z50._default(z50.boolean(), true),
|
|
11716
|
+
threshold: z50.number(),
|
|
11678
11717
|
thresholdType: UpdateCustomerThresholdTypeRequestBody$outboundSchema,
|
|
11679
|
-
name:
|
|
11718
|
+
name: z50.optional(z50.string())
|
|
11680
11719
|
}),
|
|
11681
|
-
|
|
11720
|
+
z50.transform((v) => {
|
|
11682
11721
|
return remap(v, {
|
|
11683
11722
|
featureId: "feature_id",
|
|
11684
11723
|
thresholdType: "threshold_type"
|
|
11685
11724
|
});
|
|
11686
11725
|
})
|
|
11687
11726
|
);
|
|
11688
|
-
var UpdateCustomerOverageAllowedRequest$outboundSchema =
|
|
11689
|
-
|
|
11690
|
-
featureId:
|
|
11691
|
-
enabled:
|
|
11727
|
+
var UpdateCustomerOverageAllowedRequest$outboundSchema = z50.pipe(
|
|
11728
|
+
z50.object({
|
|
11729
|
+
featureId: z50.string(),
|
|
11730
|
+
enabled: z50._default(z50.boolean(), false)
|
|
11692
11731
|
}),
|
|
11693
|
-
|
|
11732
|
+
z50.transform((v) => {
|
|
11694
11733
|
return remap(v, {
|
|
11695
11734
|
featureId: "feature_id"
|
|
11696
11735
|
});
|
|
11697
11736
|
})
|
|
11698
11737
|
);
|
|
11699
|
-
var UpdateCustomerBillingControlsRequest$outboundSchema =
|
|
11700
|
-
|
|
11701
|
-
autoTopups:
|
|
11702
|
-
|
|
11738
|
+
var UpdateCustomerBillingControlsRequest$outboundSchema = z50.pipe(
|
|
11739
|
+
z50.object({
|
|
11740
|
+
autoTopups: z50.optional(
|
|
11741
|
+
z50.array(z50.lazy(() => UpdateCustomerAutoTopupRequest$outboundSchema))
|
|
11703
11742
|
),
|
|
11704
|
-
spendLimits:
|
|
11705
|
-
|
|
11743
|
+
spendLimits: z50.optional(
|
|
11744
|
+
z50.array(z50.lazy(() => UpdateCustomerSpendLimitRequest$outboundSchema))
|
|
11706
11745
|
),
|
|
11707
|
-
usageAlerts:
|
|
11708
|
-
|
|
11746
|
+
usageAlerts: z50.optional(
|
|
11747
|
+
z50.array(z50.lazy(() => UpdateCustomerUsageAlertRequestBody$outboundSchema))
|
|
11709
11748
|
),
|
|
11710
|
-
overageAllowed:
|
|
11711
|
-
|
|
11749
|
+
overageAllowed: z50.optional(
|
|
11750
|
+
z50.array(z50.lazy(() => UpdateCustomerOverageAllowedRequest$outboundSchema))
|
|
11712
11751
|
)
|
|
11713
11752
|
}),
|
|
11714
|
-
|
|
11753
|
+
z50.transform((v) => {
|
|
11715
11754
|
return remap(v, {
|
|
11716
11755
|
autoTopups: "auto_topups",
|
|
11717
11756
|
spendLimits: "spend_limits",
|
|
@@ -11720,34 +11759,34 @@ var UpdateCustomerBillingControlsRequest$outboundSchema = z49.pipe(
|
|
|
11720
11759
|
});
|
|
11721
11760
|
})
|
|
11722
11761
|
);
|
|
11723
|
-
var UpdateCustomerConfigRequest$outboundSchema =
|
|
11724
|
-
|
|
11725
|
-
disablePooledBalance:
|
|
11762
|
+
var UpdateCustomerConfigRequest$outboundSchema = z50.pipe(
|
|
11763
|
+
z50.object({
|
|
11764
|
+
disablePooledBalance: z50.optional(z50.boolean())
|
|
11726
11765
|
}),
|
|
11727
|
-
|
|
11766
|
+
z50.transform((v) => {
|
|
11728
11767
|
return remap(v, {
|
|
11729
11768
|
disablePooledBalance: "disable_pooled_balance"
|
|
11730
11769
|
});
|
|
11731
11770
|
})
|
|
11732
11771
|
);
|
|
11733
|
-
var UpdateCustomerParams$outboundSchema =
|
|
11734
|
-
|
|
11735
|
-
customerId:
|
|
11736
|
-
name:
|
|
11737
|
-
email:
|
|
11738
|
-
fingerprint:
|
|
11739
|
-
metadata:
|
|
11740
|
-
stripeId:
|
|
11741
|
-
sendEmailReceipts:
|
|
11742
|
-
billingControls:
|
|
11743
|
-
|
|
11772
|
+
var UpdateCustomerParams$outboundSchema = z50.pipe(
|
|
11773
|
+
z50.object({
|
|
11774
|
+
customerId: z50.string(),
|
|
11775
|
+
name: z50.optional(z50.nullable(z50.string())),
|
|
11776
|
+
email: z50.optional(z50.nullable(z50.string())),
|
|
11777
|
+
fingerprint: z50.optional(z50.nullable(z50.string())),
|
|
11778
|
+
metadata: z50.optional(z50.nullable(z50.record(z50.string(), z50.any()))),
|
|
11779
|
+
stripeId: z50.optional(z50.nullable(z50.string())),
|
|
11780
|
+
sendEmailReceipts: z50.optional(z50.boolean()),
|
|
11781
|
+
billingControls: z50.optional(
|
|
11782
|
+
z50.lazy(() => UpdateCustomerBillingControlsRequest$outboundSchema)
|
|
11744
11783
|
),
|
|
11745
|
-
config:
|
|
11746
|
-
|
|
11784
|
+
config: z50.optional(
|
|
11785
|
+
z50.lazy(() => UpdateCustomerConfigRequest$outboundSchema)
|
|
11747
11786
|
),
|
|
11748
|
-
newCustomerId:
|
|
11787
|
+
newCustomerId: z50.optional(z50.string())
|
|
11749
11788
|
}),
|
|
11750
|
-
|
|
11789
|
+
z50.transform((v) => {
|
|
11751
11790
|
return remap(v, {
|
|
11752
11791
|
customerId: "customer_id",
|
|
11753
11792
|
stripeId: "stripe_id",
|
|
@@ -11759,15 +11798,15 @@ var UpdateCustomerParams$outboundSchema = z49.pipe(
|
|
|
11759
11798
|
);
|
|
11760
11799
|
var UpdateCustomerEnv$inboundSchema = inboundSchema(UpdateCustomerEnv);
|
|
11761
11800
|
var UpdateCustomerIntervalResponse2$inboundSchema = inboundSchema(UpdateCustomerIntervalResponse2);
|
|
11762
|
-
var UpdateCustomerPurchaseLimitResponse2$inboundSchema =
|
|
11763
|
-
|
|
11801
|
+
var UpdateCustomerPurchaseLimitResponse2$inboundSchema = z50.pipe(
|
|
11802
|
+
z50.object({
|
|
11764
11803
|
interval: nullable(UpdateCustomerIntervalResponse2$inboundSchema),
|
|
11765
11804
|
interval_count: nullable(number2()),
|
|
11766
11805
|
limit: nullable(number2()),
|
|
11767
11806
|
count: number2(),
|
|
11768
11807
|
next_reset_at: number2()
|
|
11769
11808
|
}),
|
|
11770
|
-
|
|
11809
|
+
z50.transform((v) => {
|
|
11771
11810
|
return remap(v, {
|
|
11772
11811
|
"interval_count": "intervalCount",
|
|
11773
11812
|
"next_reset_at": "nextResetAt"
|
|
@@ -11775,35 +11814,35 @@ var UpdateCustomerPurchaseLimitResponse2$inboundSchema = z49.pipe(
|
|
|
11775
11814
|
})
|
|
11776
11815
|
);
|
|
11777
11816
|
var UpdateCustomerIntervalResponse1$inboundSchema = inboundSchema(UpdateCustomerIntervalResponse1);
|
|
11778
|
-
var UpdateCustomerPurchaseLimitResponse1$inboundSchema =
|
|
11779
|
-
|
|
11817
|
+
var UpdateCustomerPurchaseLimitResponse1$inboundSchema = z50.pipe(
|
|
11818
|
+
z50.object({
|
|
11780
11819
|
interval: UpdateCustomerIntervalResponse1$inboundSchema,
|
|
11781
|
-
interval_count:
|
|
11820
|
+
interval_count: z50._default(number2(), 1),
|
|
11782
11821
|
limit: number2()
|
|
11783
11822
|
}),
|
|
11784
|
-
|
|
11823
|
+
z50.transform((v) => {
|
|
11785
11824
|
return remap(v, {
|
|
11786
11825
|
"interval_count": "intervalCount"
|
|
11787
11826
|
});
|
|
11788
11827
|
})
|
|
11789
11828
|
);
|
|
11790
11829
|
var UpdateCustomerPurchaseLimitUnion$inboundSchema = smartUnion([
|
|
11791
|
-
|
|
11792
|
-
|
|
11830
|
+
z50.lazy(() => UpdateCustomerPurchaseLimitResponse2$inboundSchema),
|
|
11831
|
+
z50.lazy(() => UpdateCustomerPurchaseLimitResponse1$inboundSchema)
|
|
11793
11832
|
]);
|
|
11794
|
-
var UpdateCustomerAutoTopupResponse$inboundSchema =
|
|
11795
|
-
|
|
11833
|
+
var UpdateCustomerAutoTopupResponse$inboundSchema = z50.pipe(
|
|
11834
|
+
z50.object({
|
|
11796
11835
|
feature_id: string4(),
|
|
11797
|
-
enabled:
|
|
11836
|
+
enabled: z50._default(boolean2(), false),
|
|
11798
11837
|
threshold: number2(),
|
|
11799
11838
|
quantity: number2(),
|
|
11800
11839
|
purchase_limit: optional3(smartUnion([
|
|
11801
|
-
|
|
11802
|
-
|
|
11840
|
+
z50.lazy(() => UpdateCustomerPurchaseLimitResponse2$inboundSchema),
|
|
11841
|
+
z50.lazy(() => UpdateCustomerPurchaseLimitResponse1$inboundSchema)
|
|
11803
11842
|
])),
|
|
11804
11843
|
invoice_mode: optional3(boolean2())
|
|
11805
11844
|
}),
|
|
11806
|
-
|
|
11845
|
+
z50.transform((v) => {
|
|
11807
11846
|
return remap(v, {
|
|
11808
11847
|
"feature_id": "featureId",
|
|
11809
11848
|
"purchase_limit": "purchaseLimit",
|
|
@@ -11811,13 +11850,13 @@ var UpdateCustomerAutoTopupResponse$inboundSchema = z49.pipe(
|
|
|
11811
11850
|
});
|
|
11812
11851
|
})
|
|
11813
11852
|
);
|
|
11814
|
-
var UpdateCustomerSpendLimitResponse$inboundSchema =
|
|
11815
|
-
|
|
11853
|
+
var UpdateCustomerSpendLimitResponse$inboundSchema = z50.pipe(
|
|
11854
|
+
z50.object({
|
|
11816
11855
|
feature_id: optional3(string4()),
|
|
11817
|
-
enabled:
|
|
11856
|
+
enabled: z50._default(boolean2(), false),
|
|
11818
11857
|
overage_limit: optional3(number2())
|
|
11819
11858
|
}),
|
|
11820
|
-
|
|
11859
|
+
z50.transform((v) => {
|
|
11821
11860
|
return remap(v, {
|
|
11822
11861
|
"feature_id": "featureId",
|
|
11823
11862
|
"overage_limit": "overageLimit"
|
|
@@ -11825,48 +11864,48 @@ var UpdateCustomerSpendLimitResponse$inboundSchema = z49.pipe(
|
|
|
11825
11864
|
})
|
|
11826
11865
|
);
|
|
11827
11866
|
var UpdateCustomerThresholdTypeResponse$inboundSchema = inboundSchema(UpdateCustomerThresholdTypeResponse);
|
|
11828
|
-
var UpdateCustomerUsageAlertResponse$inboundSchema =
|
|
11829
|
-
|
|
11867
|
+
var UpdateCustomerUsageAlertResponse$inboundSchema = z50.pipe(
|
|
11868
|
+
z50.object({
|
|
11830
11869
|
feature_id: optional3(string4()),
|
|
11831
|
-
enabled:
|
|
11870
|
+
enabled: z50._default(boolean2(), true),
|
|
11832
11871
|
threshold: number2(),
|
|
11833
11872
|
threshold_type: UpdateCustomerThresholdTypeResponse$inboundSchema,
|
|
11834
11873
|
name: optional3(string4())
|
|
11835
11874
|
}),
|
|
11836
|
-
|
|
11875
|
+
z50.transform((v) => {
|
|
11837
11876
|
return remap(v, {
|
|
11838
11877
|
"feature_id": "featureId",
|
|
11839
11878
|
"threshold_type": "thresholdType"
|
|
11840
11879
|
});
|
|
11841
11880
|
})
|
|
11842
11881
|
);
|
|
11843
|
-
var UpdateCustomerOverageAllowedResponse$inboundSchema =
|
|
11844
|
-
|
|
11882
|
+
var UpdateCustomerOverageAllowedResponse$inboundSchema = z50.pipe(
|
|
11883
|
+
z50.object({
|
|
11845
11884
|
feature_id: string4(),
|
|
11846
|
-
enabled:
|
|
11885
|
+
enabled: z50._default(boolean2(), false)
|
|
11847
11886
|
}),
|
|
11848
|
-
|
|
11887
|
+
z50.transform((v) => {
|
|
11849
11888
|
return remap(v, {
|
|
11850
11889
|
"feature_id": "featureId"
|
|
11851
11890
|
});
|
|
11852
11891
|
})
|
|
11853
11892
|
);
|
|
11854
|
-
var UpdateCustomerBillingControlsResponse$inboundSchema =
|
|
11855
|
-
|
|
11893
|
+
var UpdateCustomerBillingControlsResponse$inboundSchema = z50.pipe(
|
|
11894
|
+
z50.object({
|
|
11856
11895
|
auto_topups: optional3(
|
|
11857
|
-
|
|
11896
|
+
z50.array(z50.lazy(() => UpdateCustomerAutoTopupResponse$inboundSchema))
|
|
11858
11897
|
),
|
|
11859
11898
|
spend_limits: optional3(
|
|
11860
|
-
|
|
11899
|
+
z50.array(z50.lazy(() => UpdateCustomerSpendLimitResponse$inboundSchema))
|
|
11861
11900
|
),
|
|
11862
11901
|
usage_alerts: optional3(
|
|
11863
|
-
|
|
11902
|
+
z50.array(z50.lazy(() => UpdateCustomerUsageAlertResponse$inboundSchema))
|
|
11864
11903
|
),
|
|
11865
11904
|
overage_allowed: optional3(
|
|
11866
|
-
|
|
11905
|
+
z50.array(z50.lazy(() => UpdateCustomerOverageAllowedResponse$inboundSchema))
|
|
11867
11906
|
)
|
|
11868
11907
|
}),
|
|
11869
|
-
|
|
11908
|
+
z50.transform((v) => {
|
|
11870
11909
|
return remap(v, {
|
|
11871
11910
|
"auto_topups": "autoTopups",
|
|
11872
11911
|
"spend_limits": "spendLimits",
|
|
@@ -11876,8 +11915,8 @@ var UpdateCustomerBillingControlsResponse$inboundSchema = z49.pipe(
|
|
|
11876
11915
|
})
|
|
11877
11916
|
);
|
|
11878
11917
|
var UpdateCustomerStatus$inboundSchema = inboundSchema(UpdateCustomerStatus);
|
|
11879
|
-
var UpdateCustomerSubscription$inboundSchema =
|
|
11880
|
-
|
|
11918
|
+
var UpdateCustomerSubscription$inboundSchema = z50.pipe(
|
|
11919
|
+
z50.object({
|
|
11881
11920
|
id: string4(),
|
|
11882
11921
|
plan: optional3(Plan$inboundSchema),
|
|
11883
11922
|
plan_id: string4(),
|
|
@@ -11893,7 +11932,7 @@ var UpdateCustomerSubscription$inboundSchema = z49.pipe(
|
|
|
11893
11932
|
current_period_end: nullable(number2()),
|
|
11894
11933
|
quantity: number2()
|
|
11895
11934
|
}),
|
|
11896
|
-
|
|
11935
|
+
z50.transform((v) => {
|
|
11897
11936
|
return remap(v, {
|
|
11898
11937
|
"plan_id": "planId",
|
|
11899
11938
|
"auto_enable": "autoEnable",
|
|
@@ -11908,15 +11947,15 @@ var UpdateCustomerSubscription$inboundSchema = z49.pipe(
|
|
|
11908
11947
|
});
|
|
11909
11948
|
})
|
|
11910
11949
|
);
|
|
11911
|
-
var UpdateCustomerPurchase$inboundSchema =
|
|
11912
|
-
|
|
11950
|
+
var UpdateCustomerPurchase$inboundSchema = z50.pipe(
|
|
11951
|
+
z50.object({
|
|
11913
11952
|
plan: optional3(Plan$inboundSchema),
|
|
11914
11953
|
plan_id: string4(),
|
|
11915
11954
|
expires_at: nullable(number2()),
|
|
11916
11955
|
started_at: number2(),
|
|
11917
11956
|
quantity: number2()
|
|
11918
11957
|
}),
|
|
11919
|
-
|
|
11958
|
+
z50.transform((v) => {
|
|
11920
11959
|
return remap(v, {
|
|
11921
11960
|
"plan_id": "planId",
|
|
11922
11961
|
"expires_at": "expiresAt",
|
|
@@ -11925,51 +11964,51 @@ var UpdateCustomerPurchase$inboundSchema = z49.pipe(
|
|
|
11925
11964
|
})
|
|
11926
11965
|
);
|
|
11927
11966
|
var UpdateCustomerType$inboundSchema = inboundSchema(UpdateCustomerType);
|
|
11928
|
-
var UpdateCustomerCreditSchema$inboundSchema =
|
|
11929
|
-
|
|
11967
|
+
var UpdateCustomerCreditSchema$inboundSchema = z50.pipe(
|
|
11968
|
+
z50.object({
|
|
11930
11969
|
metered_feature_id: string4(),
|
|
11931
11970
|
credit_cost: number2()
|
|
11932
11971
|
}),
|
|
11933
|
-
|
|
11972
|
+
z50.transform((v) => {
|
|
11934
11973
|
return remap(v, {
|
|
11935
11974
|
"metered_feature_id": "meteredFeatureId",
|
|
11936
11975
|
"credit_cost": "creditCost"
|
|
11937
11976
|
});
|
|
11938
11977
|
})
|
|
11939
11978
|
);
|
|
11940
|
-
var UpdateCustomerDisplay$inboundSchema =
|
|
11941
|
-
singular:
|
|
11942
|
-
plural:
|
|
11979
|
+
var UpdateCustomerDisplay$inboundSchema = z50.object({
|
|
11980
|
+
singular: z50.optional(z50.nullable(string4())),
|
|
11981
|
+
plural: z50.optional(z50.nullable(string4()))
|
|
11943
11982
|
});
|
|
11944
|
-
var UpdateCustomerFeature$inboundSchema =
|
|
11945
|
-
|
|
11983
|
+
var UpdateCustomerFeature$inboundSchema = z50.pipe(
|
|
11984
|
+
z50.object({
|
|
11946
11985
|
id: string4(),
|
|
11947
11986
|
name: string4(),
|
|
11948
11987
|
type: UpdateCustomerType$inboundSchema,
|
|
11949
11988
|
consumable: boolean2(),
|
|
11950
|
-
event_names: optional3(
|
|
11989
|
+
event_names: optional3(z50.array(string4())),
|
|
11951
11990
|
credit_schema: optional3(
|
|
11952
|
-
|
|
11991
|
+
z50.array(z50.lazy(() => UpdateCustomerCreditSchema$inboundSchema))
|
|
11953
11992
|
),
|
|
11954
|
-
display: optional3(
|
|
11993
|
+
display: optional3(z50.lazy(() => UpdateCustomerDisplay$inboundSchema)),
|
|
11955
11994
|
archived: boolean2()
|
|
11956
11995
|
}),
|
|
11957
|
-
|
|
11996
|
+
z50.transform((v) => {
|
|
11958
11997
|
return remap(v, {
|
|
11959
11998
|
"event_names": "eventNames",
|
|
11960
11999
|
"credit_schema": "creditSchema"
|
|
11961
12000
|
});
|
|
11962
12001
|
})
|
|
11963
12002
|
);
|
|
11964
|
-
var UpdateCustomerFlags$inboundSchema =
|
|
11965
|
-
|
|
12003
|
+
var UpdateCustomerFlags$inboundSchema = z50.pipe(
|
|
12004
|
+
z50.object({
|
|
11966
12005
|
id: string4(),
|
|
11967
12006
|
plan_id: nullable(string4()),
|
|
11968
12007
|
expires_at: nullable(number2()),
|
|
11969
12008
|
feature_id: string4(),
|
|
11970
|
-
feature: optional3(
|
|
12009
|
+
feature: optional3(z50.lazy(() => UpdateCustomerFeature$inboundSchema))
|
|
11971
12010
|
}),
|
|
11972
|
-
|
|
12011
|
+
z50.transform((v) => {
|
|
11973
12012
|
return remap(v, {
|
|
11974
12013
|
"plan_id": "planId",
|
|
11975
12014
|
"expires_at": "expiresAt",
|
|
@@ -11977,43 +12016,43 @@ var UpdateCustomerFlags$inboundSchema = z49.pipe(
|
|
|
11977
12016
|
});
|
|
11978
12017
|
})
|
|
11979
12018
|
);
|
|
11980
|
-
var UpdateCustomerConfigResponse$inboundSchema =
|
|
11981
|
-
|
|
12019
|
+
var UpdateCustomerConfigResponse$inboundSchema = z50.pipe(
|
|
12020
|
+
z50.object({
|
|
11982
12021
|
disable_pooled_balance: optional3(boolean2())
|
|
11983
12022
|
}),
|
|
11984
|
-
|
|
12023
|
+
z50.transform((v) => {
|
|
11985
12024
|
return remap(v, {
|
|
11986
12025
|
"disable_pooled_balance": "disablePooledBalance"
|
|
11987
12026
|
});
|
|
11988
12027
|
})
|
|
11989
12028
|
);
|
|
11990
|
-
var UpdateCustomerStripe$inboundSchema =
|
|
12029
|
+
var UpdateCustomerStripe$inboundSchema = z50.object({
|
|
11991
12030
|
id: string4()
|
|
11992
12031
|
});
|
|
11993
|
-
var UpdateCustomerVercel$inboundSchema =
|
|
11994
|
-
|
|
12032
|
+
var UpdateCustomerVercel$inboundSchema = z50.pipe(
|
|
12033
|
+
z50.object({
|
|
11995
12034
|
installation_id: string4(),
|
|
11996
12035
|
account_id: string4()
|
|
11997
12036
|
}),
|
|
11998
|
-
|
|
12037
|
+
z50.transform((v) => {
|
|
11999
12038
|
return remap(v, {
|
|
12000
12039
|
"installation_id": "installationId",
|
|
12001
12040
|
"account_id": "accountId"
|
|
12002
12041
|
});
|
|
12003
12042
|
})
|
|
12004
12043
|
);
|
|
12005
|
-
var UpdateCustomerRevenuecat$inboundSchema =
|
|
12044
|
+
var UpdateCustomerRevenuecat$inboundSchema = z50.object({
|
|
12006
12045
|
id: nullable(string4())
|
|
12007
12046
|
});
|
|
12008
|
-
var UpdateCustomerProcessors$inboundSchema =
|
|
12009
|
-
stripe: optional3(
|
|
12010
|
-
vercel: optional3(
|
|
12047
|
+
var UpdateCustomerProcessors$inboundSchema = z50.object({
|
|
12048
|
+
stripe: optional3(z50.lazy(() => UpdateCustomerStripe$inboundSchema)),
|
|
12049
|
+
vercel: optional3(z50.lazy(() => UpdateCustomerVercel$inboundSchema)),
|
|
12011
12050
|
revenuecat: optional3(
|
|
12012
|
-
|
|
12051
|
+
z50.lazy(() => UpdateCustomerRevenuecat$inboundSchema)
|
|
12013
12052
|
)
|
|
12014
12053
|
});
|
|
12015
|
-
var UpdateCustomerResponse$inboundSchema =
|
|
12016
|
-
|
|
12054
|
+
var UpdateCustomerResponse$inboundSchema = z50.pipe(
|
|
12055
|
+
z50.object({
|
|
12017
12056
|
id: nullable(string4()),
|
|
12018
12057
|
name: nullable(string4()),
|
|
12019
12058
|
email: nullable(string4()),
|
|
@@ -12021,28 +12060,28 @@ var UpdateCustomerResponse$inboundSchema = z49.pipe(
|
|
|
12021
12060
|
fingerprint: nullable(string4()),
|
|
12022
12061
|
stripe_id: nullable(string4()),
|
|
12023
12062
|
env: UpdateCustomerEnv$inboundSchema,
|
|
12024
|
-
metadata:
|
|
12063
|
+
metadata: z50.record(z50.string(), z50.any()),
|
|
12025
12064
|
send_email_receipts: boolean2(),
|
|
12026
|
-
billing_controls:
|
|
12065
|
+
billing_controls: z50.lazy(
|
|
12027
12066
|
() => UpdateCustomerBillingControlsResponse$inboundSchema
|
|
12028
12067
|
),
|
|
12029
|
-
subscriptions:
|
|
12030
|
-
|
|
12068
|
+
subscriptions: z50.array(
|
|
12069
|
+
z50.lazy(() => UpdateCustomerSubscription$inboundSchema)
|
|
12031
12070
|
),
|
|
12032
|
-
purchases:
|
|
12033
|
-
balances:
|
|
12034
|
-
flags:
|
|
12035
|
-
|
|
12036
|
-
|
|
12071
|
+
purchases: z50.array(z50.lazy(() => UpdateCustomerPurchase$inboundSchema)),
|
|
12072
|
+
balances: z50.record(z50.string(), Balance$inboundSchema),
|
|
12073
|
+
flags: z50.record(
|
|
12074
|
+
z50.string(),
|
|
12075
|
+
z50.lazy(() => UpdateCustomerFlags$inboundSchema)
|
|
12037
12076
|
),
|
|
12038
12077
|
config: optional3(
|
|
12039
|
-
|
|
12078
|
+
z50.lazy(() => UpdateCustomerConfigResponse$inboundSchema)
|
|
12040
12079
|
),
|
|
12041
12080
|
processors: optional3(
|
|
12042
|
-
|
|
12081
|
+
z50.lazy(() => UpdateCustomerProcessors$inboundSchema)
|
|
12043
12082
|
)
|
|
12044
12083
|
}),
|
|
12045
|
-
|
|
12084
|
+
z50.transform((v) => {
|
|
12046
12085
|
return remap(v, {
|
|
12047
12086
|
"created_at": "createdAt",
|
|
12048
12087
|
"stripe_id": "stripeId",
|
|
@@ -12053,7 +12092,7 @@ var UpdateCustomerResponse$inboundSchema = z49.pipe(
|
|
|
12053
12092
|
);
|
|
12054
12093
|
|
|
12055
12094
|
// ../sdk/src/models/update-entity-op.ts
|
|
12056
|
-
var
|
|
12095
|
+
var z51 = __toESM(require("zod/v4-mini"), 1);
|
|
12057
12096
|
var UpdateEntityThresholdTypeRequestBody = {
|
|
12058
12097
|
Usage: "usage",
|
|
12059
12098
|
UsagePercentage: "usage_percentage",
|
|
@@ -12083,59 +12122,59 @@ var UpdateEntityProcessorType = {
|
|
|
12083
12122
|
Stripe: "stripe",
|
|
12084
12123
|
Revenuecat: "revenuecat"
|
|
12085
12124
|
};
|
|
12086
|
-
var UpdateEntitySpendLimitRequest$outboundSchema =
|
|
12087
|
-
|
|
12088
|
-
featureId:
|
|
12089
|
-
enabled:
|
|
12090
|
-
overageLimit:
|
|
12125
|
+
var UpdateEntitySpendLimitRequest$outboundSchema = z51.pipe(
|
|
12126
|
+
z51.object({
|
|
12127
|
+
featureId: z51.optional(z51.string()),
|
|
12128
|
+
enabled: z51._default(z51.boolean(), false),
|
|
12129
|
+
overageLimit: z51.optional(z51.number())
|
|
12091
12130
|
}),
|
|
12092
|
-
|
|
12131
|
+
z51.transform((v) => {
|
|
12093
12132
|
return remap(v, {
|
|
12094
12133
|
featureId: "feature_id",
|
|
12095
12134
|
overageLimit: "overage_limit"
|
|
12096
12135
|
});
|
|
12097
12136
|
})
|
|
12098
12137
|
);
|
|
12099
|
-
var UpdateEntityThresholdTypeRequestBody$outboundSchema =
|
|
12100
|
-
var UpdateEntityUsageAlertRequestBody$outboundSchema =
|
|
12101
|
-
|
|
12102
|
-
featureId:
|
|
12103
|
-
enabled:
|
|
12104
|
-
threshold:
|
|
12138
|
+
var UpdateEntityThresholdTypeRequestBody$outboundSchema = z51.enum(UpdateEntityThresholdTypeRequestBody);
|
|
12139
|
+
var UpdateEntityUsageAlertRequestBody$outboundSchema = z51.pipe(
|
|
12140
|
+
z51.object({
|
|
12141
|
+
featureId: z51.optional(z51.string()),
|
|
12142
|
+
enabled: z51._default(z51.boolean(), true),
|
|
12143
|
+
threshold: z51.number(),
|
|
12105
12144
|
thresholdType: UpdateEntityThresholdTypeRequestBody$outboundSchema,
|
|
12106
|
-
name:
|
|
12145
|
+
name: z51.optional(z51.string())
|
|
12107
12146
|
}),
|
|
12108
|
-
|
|
12147
|
+
z51.transform((v) => {
|
|
12109
12148
|
return remap(v, {
|
|
12110
12149
|
featureId: "feature_id",
|
|
12111
12150
|
thresholdType: "threshold_type"
|
|
12112
12151
|
});
|
|
12113
12152
|
})
|
|
12114
12153
|
);
|
|
12115
|
-
var UpdateEntityOverageAllowedRequest$outboundSchema =
|
|
12116
|
-
|
|
12117
|
-
featureId:
|
|
12118
|
-
enabled:
|
|
12154
|
+
var UpdateEntityOverageAllowedRequest$outboundSchema = z51.pipe(
|
|
12155
|
+
z51.object({
|
|
12156
|
+
featureId: z51.string(),
|
|
12157
|
+
enabled: z51._default(z51.boolean(), false)
|
|
12119
12158
|
}),
|
|
12120
|
-
|
|
12159
|
+
z51.transform((v) => {
|
|
12121
12160
|
return remap(v, {
|
|
12122
12161
|
featureId: "feature_id"
|
|
12123
12162
|
});
|
|
12124
12163
|
})
|
|
12125
12164
|
);
|
|
12126
|
-
var UpdateEntityBillingControlsRequest$outboundSchema =
|
|
12127
|
-
|
|
12128
|
-
spendLimits:
|
|
12129
|
-
|
|
12165
|
+
var UpdateEntityBillingControlsRequest$outboundSchema = z51.pipe(
|
|
12166
|
+
z51.object({
|
|
12167
|
+
spendLimits: z51.optional(
|
|
12168
|
+
z51.array(z51.lazy(() => UpdateEntitySpendLimitRequest$outboundSchema))
|
|
12130
12169
|
),
|
|
12131
|
-
usageAlerts:
|
|
12132
|
-
|
|
12170
|
+
usageAlerts: z51.optional(
|
|
12171
|
+
z51.array(z51.lazy(() => UpdateEntityUsageAlertRequestBody$outboundSchema))
|
|
12133
12172
|
),
|
|
12134
|
-
overageAllowed:
|
|
12135
|
-
|
|
12173
|
+
overageAllowed: z51.optional(
|
|
12174
|
+
z51.array(z51.lazy(() => UpdateEntityOverageAllowedRequest$outboundSchema))
|
|
12136
12175
|
)
|
|
12137
12176
|
}),
|
|
12138
|
-
|
|
12177
|
+
z51.transform((v) => {
|
|
12139
12178
|
return remap(v, {
|
|
12140
12179
|
spendLimits: "spend_limits",
|
|
12141
12180
|
usageAlerts: "usage_alerts",
|
|
@@ -12143,15 +12182,15 @@ var UpdateEntityBillingControlsRequest$outboundSchema = z50.pipe(
|
|
|
12143
12182
|
});
|
|
12144
12183
|
})
|
|
12145
12184
|
);
|
|
12146
|
-
var UpdateEntityParams$outboundSchema =
|
|
12147
|
-
|
|
12148
|
-
customerId:
|
|
12149
|
-
entityId:
|
|
12150
|
-
billingControls:
|
|
12151
|
-
|
|
12185
|
+
var UpdateEntityParams$outboundSchema = z51.pipe(
|
|
12186
|
+
z51.object({
|
|
12187
|
+
customerId: z51.optional(z51.string()),
|
|
12188
|
+
entityId: z51.string(),
|
|
12189
|
+
billingControls: z51.optional(
|
|
12190
|
+
z51.lazy(() => UpdateEntityBillingControlsRequest$outboundSchema)
|
|
12152
12191
|
)
|
|
12153
12192
|
}),
|
|
12154
|
-
|
|
12193
|
+
z51.transform((v) => {
|
|
12155
12194
|
return remap(v, {
|
|
12156
12195
|
customerId: "customer_id",
|
|
12157
12196
|
entityId: "entity_id",
|
|
@@ -12161,8 +12200,8 @@ var UpdateEntityParams$outboundSchema = z50.pipe(
|
|
|
12161
12200
|
);
|
|
12162
12201
|
var UpdateEntityEnv$inboundSchema = inboundSchema(UpdateEntityEnv);
|
|
12163
12202
|
var UpdateEntityStatus$inboundSchema = inboundSchema(UpdateEntityStatus);
|
|
12164
|
-
var UpdateEntitySubscription$inboundSchema =
|
|
12165
|
-
|
|
12203
|
+
var UpdateEntitySubscription$inboundSchema = z51.pipe(
|
|
12204
|
+
z51.object({
|
|
12166
12205
|
id: string4(),
|
|
12167
12206
|
plan: optional3(Plan$inboundSchema),
|
|
12168
12207
|
plan_id: string4(),
|
|
@@ -12178,7 +12217,7 @@ var UpdateEntitySubscription$inboundSchema = z50.pipe(
|
|
|
12178
12217
|
current_period_end: nullable(number2()),
|
|
12179
12218
|
quantity: number2()
|
|
12180
12219
|
}),
|
|
12181
|
-
|
|
12220
|
+
z51.transform((v) => {
|
|
12182
12221
|
return remap(v, {
|
|
12183
12222
|
"plan_id": "planId",
|
|
12184
12223
|
"auto_enable": "autoEnable",
|
|
@@ -12193,15 +12232,15 @@ var UpdateEntitySubscription$inboundSchema = z50.pipe(
|
|
|
12193
12232
|
});
|
|
12194
12233
|
})
|
|
12195
12234
|
);
|
|
12196
|
-
var UpdateEntityPurchase$inboundSchema =
|
|
12197
|
-
|
|
12235
|
+
var UpdateEntityPurchase$inboundSchema = z51.pipe(
|
|
12236
|
+
z51.object({
|
|
12198
12237
|
plan: optional3(Plan$inboundSchema),
|
|
12199
12238
|
plan_id: string4(),
|
|
12200
12239
|
expires_at: nullable(number2()),
|
|
12201
12240
|
started_at: number2(),
|
|
12202
12241
|
quantity: number2()
|
|
12203
12242
|
}),
|
|
12204
|
-
|
|
12243
|
+
z51.transform((v) => {
|
|
12205
12244
|
return remap(v, {
|
|
12206
12245
|
"plan_id": "planId",
|
|
12207
12246
|
"expires_at": "expiresAt",
|
|
@@ -12210,51 +12249,51 @@ var UpdateEntityPurchase$inboundSchema = z50.pipe(
|
|
|
12210
12249
|
})
|
|
12211
12250
|
);
|
|
12212
12251
|
var UpdateEntityType$inboundSchema = inboundSchema(UpdateEntityType);
|
|
12213
|
-
var UpdateEntityCreditSchema$inboundSchema =
|
|
12214
|
-
|
|
12252
|
+
var UpdateEntityCreditSchema$inboundSchema = z51.pipe(
|
|
12253
|
+
z51.object({
|
|
12215
12254
|
metered_feature_id: string4(),
|
|
12216
12255
|
credit_cost: number2()
|
|
12217
12256
|
}),
|
|
12218
|
-
|
|
12257
|
+
z51.transform((v) => {
|
|
12219
12258
|
return remap(v, {
|
|
12220
12259
|
"metered_feature_id": "meteredFeatureId",
|
|
12221
12260
|
"credit_cost": "creditCost"
|
|
12222
12261
|
});
|
|
12223
12262
|
})
|
|
12224
12263
|
);
|
|
12225
|
-
var UpdateEntityDisplay$inboundSchema =
|
|
12226
|
-
singular:
|
|
12227
|
-
plural:
|
|
12264
|
+
var UpdateEntityDisplay$inboundSchema = z51.object({
|
|
12265
|
+
singular: z51.optional(z51.nullable(string4())),
|
|
12266
|
+
plural: z51.optional(z51.nullable(string4()))
|
|
12228
12267
|
});
|
|
12229
|
-
var UpdateEntityFeature$inboundSchema =
|
|
12230
|
-
|
|
12268
|
+
var UpdateEntityFeature$inboundSchema = z51.pipe(
|
|
12269
|
+
z51.object({
|
|
12231
12270
|
id: string4(),
|
|
12232
12271
|
name: string4(),
|
|
12233
12272
|
type: UpdateEntityType$inboundSchema,
|
|
12234
12273
|
consumable: boolean2(),
|
|
12235
|
-
event_names: optional3(
|
|
12274
|
+
event_names: optional3(z51.array(string4())),
|
|
12236
12275
|
credit_schema: optional3(
|
|
12237
|
-
|
|
12276
|
+
z51.array(z51.lazy(() => UpdateEntityCreditSchema$inboundSchema))
|
|
12238
12277
|
),
|
|
12239
|
-
display: optional3(
|
|
12278
|
+
display: optional3(z51.lazy(() => UpdateEntityDisplay$inboundSchema)),
|
|
12240
12279
|
archived: boolean2()
|
|
12241
12280
|
}),
|
|
12242
|
-
|
|
12281
|
+
z51.transform((v) => {
|
|
12243
12282
|
return remap(v, {
|
|
12244
12283
|
"event_names": "eventNames",
|
|
12245
12284
|
"credit_schema": "creditSchema"
|
|
12246
12285
|
});
|
|
12247
12286
|
})
|
|
12248
12287
|
);
|
|
12249
|
-
var UpdateEntityFlags$inboundSchema =
|
|
12250
|
-
|
|
12288
|
+
var UpdateEntityFlags$inboundSchema = z51.pipe(
|
|
12289
|
+
z51.object({
|
|
12251
12290
|
id: string4(),
|
|
12252
12291
|
plan_id: nullable(string4()),
|
|
12253
12292
|
expires_at: nullable(number2()),
|
|
12254
12293
|
feature_id: string4(),
|
|
12255
|
-
feature: optional3(
|
|
12294
|
+
feature: optional3(z51.lazy(() => UpdateEntityFeature$inboundSchema))
|
|
12256
12295
|
}),
|
|
12257
|
-
|
|
12296
|
+
z51.transform((v) => {
|
|
12258
12297
|
return remap(v, {
|
|
12259
12298
|
"plan_id": "planId",
|
|
12260
12299
|
"expires_at": "expiresAt",
|
|
@@ -12262,13 +12301,13 @@ var UpdateEntityFlags$inboundSchema = z50.pipe(
|
|
|
12262
12301
|
});
|
|
12263
12302
|
})
|
|
12264
12303
|
);
|
|
12265
|
-
var UpdateEntitySpendLimitResponse$inboundSchema =
|
|
12266
|
-
|
|
12304
|
+
var UpdateEntitySpendLimitResponse$inboundSchema = z51.pipe(
|
|
12305
|
+
z51.object({
|
|
12267
12306
|
feature_id: optional3(string4()),
|
|
12268
|
-
enabled:
|
|
12307
|
+
enabled: z51._default(boolean2(), false),
|
|
12269
12308
|
overage_limit: optional3(number2())
|
|
12270
12309
|
}),
|
|
12271
|
-
|
|
12310
|
+
z51.transform((v) => {
|
|
12272
12311
|
return remap(v, {
|
|
12273
12312
|
"feature_id": "featureId",
|
|
12274
12313
|
"overage_limit": "overageLimit"
|
|
@@ -12276,45 +12315,45 @@ var UpdateEntitySpendLimitResponse$inboundSchema = z50.pipe(
|
|
|
12276
12315
|
})
|
|
12277
12316
|
);
|
|
12278
12317
|
var UpdateEntityThresholdTypeResponse$inboundSchema = inboundSchema(UpdateEntityThresholdTypeResponse);
|
|
12279
|
-
var UpdateEntityUsageAlertResponse$inboundSchema =
|
|
12280
|
-
|
|
12318
|
+
var UpdateEntityUsageAlertResponse$inboundSchema = z51.pipe(
|
|
12319
|
+
z51.object({
|
|
12281
12320
|
feature_id: optional3(string4()),
|
|
12282
|
-
enabled:
|
|
12321
|
+
enabled: z51._default(boolean2(), true),
|
|
12283
12322
|
threshold: number2(),
|
|
12284
12323
|
threshold_type: UpdateEntityThresholdTypeResponse$inboundSchema,
|
|
12285
12324
|
name: optional3(string4())
|
|
12286
12325
|
}),
|
|
12287
|
-
|
|
12326
|
+
z51.transform((v) => {
|
|
12288
12327
|
return remap(v, {
|
|
12289
12328
|
"feature_id": "featureId",
|
|
12290
12329
|
"threshold_type": "thresholdType"
|
|
12291
12330
|
});
|
|
12292
12331
|
})
|
|
12293
12332
|
);
|
|
12294
|
-
var UpdateEntityOverageAllowedResponse$inboundSchema =
|
|
12295
|
-
|
|
12333
|
+
var UpdateEntityOverageAllowedResponse$inboundSchema = z51.pipe(
|
|
12334
|
+
z51.object({
|
|
12296
12335
|
feature_id: string4(),
|
|
12297
|
-
enabled:
|
|
12336
|
+
enabled: z51._default(boolean2(), false)
|
|
12298
12337
|
}),
|
|
12299
|
-
|
|
12338
|
+
z51.transform((v) => {
|
|
12300
12339
|
return remap(v, {
|
|
12301
12340
|
"feature_id": "featureId"
|
|
12302
12341
|
});
|
|
12303
12342
|
})
|
|
12304
12343
|
);
|
|
12305
|
-
var UpdateEntityBillingControlsResponse$inboundSchema =
|
|
12306
|
-
|
|
12344
|
+
var UpdateEntityBillingControlsResponse$inboundSchema = z51.pipe(
|
|
12345
|
+
z51.object({
|
|
12307
12346
|
spend_limits: optional3(
|
|
12308
|
-
|
|
12347
|
+
z51.array(z51.lazy(() => UpdateEntitySpendLimitResponse$inboundSchema))
|
|
12309
12348
|
),
|
|
12310
12349
|
usage_alerts: optional3(
|
|
12311
|
-
|
|
12350
|
+
z51.array(z51.lazy(() => UpdateEntityUsageAlertResponse$inboundSchema))
|
|
12312
12351
|
),
|
|
12313
12352
|
overage_allowed: optional3(
|
|
12314
|
-
|
|
12353
|
+
z51.array(z51.lazy(() => UpdateEntityOverageAllowedResponse$inboundSchema))
|
|
12315
12354
|
)
|
|
12316
12355
|
}),
|
|
12317
|
-
|
|
12356
|
+
z51.transform((v) => {
|
|
12318
12357
|
return remap(v, {
|
|
12319
12358
|
"spend_limits": "spendLimits",
|
|
12320
12359
|
"usage_alerts": "usageAlerts",
|
|
@@ -12323,11 +12362,11 @@ var UpdateEntityBillingControlsResponse$inboundSchema = z50.pipe(
|
|
|
12323
12362
|
})
|
|
12324
12363
|
);
|
|
12325
12364
|
var UpdateEntityProcessorType$inboundSchema = inboundSchema(UpdateEntityProcessorType);
|
|
12326
|
-
var UpdateEntityInvoice$inboundSchema =
|
|
12327
|
-
|
|
12328
|
-
plan_ids:
|
|
12365
|
+
var UpdateEntityInvoice$inboundSchema = z51.pipe(
|
|
12366
|
+
z51.object({
|
|
12367
|
+
plan_ids: z51.array(string4()),
|
|
12329
12368
|
stripe_id: string4(),
|
|
12330
|
-
processor_type:
|
|
12369
|
+
processor_type: z51._default(
|
|
12331
12370
|
UpdateEntityProcessorType$inboundSchema,
|
|
12332
12371
|
"stripe"
|
|
12333
12372
|
),
|
|
@@ -12335,9 +12374,9 @@ var UpdateEntityInvoice$inboundSchema = z50.pipe(
|
|
|
12335
12374
|
total: number2(),
|
|
12336
12375
|
currency: string4(),
|
|
12337
12376
|
created_at: number2(),
|
|
12338
|
-
hosted_invoice_url:
|
|
12377
|
+
hosted_invoice_url: z51.optional(z51.nullable(string4()))
|
|
12339
12378
|
}),
|
|
12340
|
-
|
|
12379
|
+
z51.transform((v) => {
|
|
12341
12380
|
return remap(v, {
|
|
12342
12381
|
"plan_ids": "planIds",
|
|
12343
12382
|
"stripe_id": "stripeId",
|
|
@@ -12347,28 +12386,28 @@ var UpdateEntityInvoice$inboundSchema = z50.pipe(
|
|
|
12347
12386
|
});
|
|
12348
12387
|
})
|
|
12349
12388
|
);
|
|
12350
|
-
var UpdateEntityResponse$inboundSchema =
|
|
12351
|
-
|
|
12389
|
+
var UpdateEntityResponse$inboundSchema = z51.pipe(
|
|
12390
|
+
z51.object({
|
|
12352
12391
|
id: nullable(string4()),
|
|
12353
12392
|
name: nullable(string4()),
|
|
12354
|
-
customer_id:
|
|
12355
|
-
feature_id:
|
|
12393
|
+
customer_id: z51.optional(z51.nullable(string4())),
|
|
12394
|
+
feature_id: z51.optional(z51.nullable(string4())),
|
|
12356
12395
|
created_at: number2(),
|
|
12357
12396
|
env: UpdateEntityEnv$inboundSchema,
|
|
12358
|
-
subscriptions:
|
|
12359
|
-
|
|
12397
|
+
subscriptions: z51.array(
|
|
12398
|
+
z51.lazy(() => UpdateEntitySubscription$inboundSchema)
|
|
12360
12399
|
),
|
|
12361
|
-
purchases:
|
|
12362
|
-
balances:
|
|
12363
|
-
flags:
|
|
12400
|
+
purchases: z51.array(z51.lazy(() => UpdateEntityPurchase$inboundSchema)),
|
|
12401
|
+
balances: z51.record(z51.string(), Balance$inboundSchema),
|
|
12402
|
+
flags: z51.record(z51.string(), z51.lazy(() => UpdateEntityFlags$inboundSchema)),
|
|
12364
12403
|
billing_controls: optional3(
|
|
12365
|
-
|
|
12404
|
+
z51.lazy(() => UpdateEntityBillingControlsResponse$inboundSchema)
|
|
12366
12405
|
),
|
|
12367
12406
|
invoices: optional3(
|
|
12368
|
-
|
|
12407
|
+
z51.array(z51.lazy(() => UpdateEntityInvoice$inboundSchema))
|
|
12369
12408
|
)
|
|
12370
12409
|
}),
|
|
12371
|
-
|
|
12410
|
+
z51.transform((v) => {
|
|
12372
12411
|
return remap(v, {
|
|
12373
12412
|
"customer_id": "customerId",
|
|
12374
12413
|
"feature_id": "featureId",
|
|
@@ -12379,7 +12418,7 @@ var UpdateEntityResponse$inboundSchema = z50.pipe(
|
|
|
12379
12418
|
);
|
|
12380
12419
|
|
|
12381
12420
|
// ../sdk/src/models/update-feature-op.ts
|
|
12382
|
-
var
|
|
12421
|
+
var z52 = __toESM(require("zod/v4-mini"), 1);
|
|
12383
12422
|
var UpdateFeatureTypeRequest = {
|
|
12384
12423
|
Boolean: "boolean",
|
|
12385
12424
|
Metered: "metered",
|
|
@@ -12390,40 +12429,40 @@ var UpdateFeatureTypeResponse = {
|
|
|
12390
12429
|
Metered: "metered",
|
|
12391
12430
|
CreditSystem: "credit_system"
|
|
12392
12431
|
};
|
|
12393
|
-
var UpdateFeatureTypeRequest$outboundSchema =
|
|
12394
|
-
var UpdateFeatureDisplayRequest$outboundSchema =
|
|
12395
|
-
singular:
|
|
12396
|
-
plural:
|
|
12432
|
+
var UpdateFeatureTypeRequest$outboundSchema = z52.enum(UpdateFeatureTypeRequest);
|
|
12433
|
+
var UpdateFeatureDisplayRequest$outboundSchema = z52.object({
|
|
12434
|
+
singular: z52.string(),
|
|
12435
|
+
plural: z52.string()
|
|
12397
12436
|
});
|
|
12398
|
-
var UpdateFeatureCreditSchemaRequest$outboundSchema =
|
|
12399
|
-
|
|
12400
|
-
meteredFeatureId:
|
|
12401
|
-
creditCost:
|
|
12437
|
+
var UpdateFeatureCreditSchemaRequest$outboundSchema = z52.pipe(
|
|
12438
|
+
z52.object({
|
|
12439
|
+
meteredFeatureId: z52.string(),
|
|
12440
|
+
creditCost: z52.number()
|
|
12402
12441
|
}),
|
|
12403
|
-
|
|
12442
|
+
z52.transform((v) => {
|
|
12404
12443
|
return remap(v, {
|
|
12405
12444
|
meteredFeatureId: "metered_feature_id",
|
|
12406
12445
|
creditCost: "credit_cost"
|
|
12407
12446
|
});
|
|
12408
12447
|
})
|
|
12409
12448
|
);
|
|
12410
|
-
var UpdateFeatureParams$outboundSchema =
|
|
12411
|
-
|
|
12412
|
-
name:
|
|
12413
|
-
type:
|
|
12414
|
-
consumable:
|
|
12415
|
-
display:
|
|
12416
|
-
|
|
12449
|
+
var UpdateFeatureParams$outboundSchema = z52.pipe(
|
|
12450
|
+
z52.object({
|
|
12451
|
+
name: z52.optional(z52.string()),
|
|
12452
|
+
type: z52.optional(UpdateFeatureTypeRequest$outboundSchema),
|
|
12453
|
+
consumable: z52.optional(z52.boolean()),
|
|
12454
|
+
display: z52.optional(
|
|
12455
|
+
z52.lazy(() => UpdateFeatureDisplayRequest$outboundSchema)
|
|
12417
12456
|
),
|
|
12418
|
-
creditSchema:
|
|
12419
|
-
|
|
12457
|
+
creditSchema: z52.optional(
|
|
12458
|
+
z52.array(z52.lazy(() => UpdateFeatureCreditSchemaRequest$outboundSchema))
|
|
12420
12459
|
),
|
|
12421
|
-
eventNames:
|
|
12422
|
-
archived:
|
|
12423
|
-
featureId:
|
|
12424
|
-
newFeatureId:
|
|
12460
|
+
eventNames: z52.optional(z52.array(z52.string())),
|
|
12461
|
+
archived: z52.optional(z52.boolean()),
|
|
12462
|
+
featureId: z52.string(),
|
|
12463
|
+
newFeatureId: z52.optional(z52.string())
|
|
12425
12464
|
}),
|
|
12426
|
-
|
|
12465
|
+
z52.transform((v) => {
|
|
12427
12466
|
return remap(v, {
|
|
12428
12467
|
creditSchema: "credit_schema",
|
|
12429
12468
|
eventNames: "event_names",
|
|
@@ -12433,38 +12472,38 @@ var UpdateFeatureParams$outboundSchema = z51.pipe(
|
|
|
12433
12472
|
})
|
|
12434
12473
|
);
|
|
12435
12474
|
var UpdateFeatureTypeResponse$inboundSchema = inboundSchema(UpdateFeatureTypeResponse);
|
|
12436
|
-
var UpdateFeatureCreditSchemaResponse$inboundSchema =
|
|
12437
|
-
|
|
12475
|
+
var UpdateFeatureCreditSchemaResponse$inboundSchema = z52.pipe(
|
|
12476
|
+
z52.object({
|
|
12438
12477
|
metered_feature_id: string4(),
|
|
12439
12478
|
credit_cost: number2()
|
|
12440
12479
|
}),
|
|
12441
|
-
|
|
12480
|
+
z52.transform((v) => {
|
|
12442
12481
|
return remap(v, {
|
|
12443
12482
|
"metered_feature_id": "meteredFeatureId",
|
|
12444
12483
|
"credit_cost": "creditCost"
|
|
12445
12484
|
});
|
|
12446
12485
|
})
|
|
12447
12486
|
);
|
|
12448
|
-
var UpdateFeatureDisplayResponse$inboundSchema =
|
|
12449
|
-
singular:
|
|
12450
|
-
plural:
|
|
12487
|
+
var UpdateFeatureDisplayResponse$inboundSchema = z52.object({
|
|
12488
|
+
singular: z52.optional(z52.nullable(string4())),
|
|
12489
|
+
plural: z52.optional(z52.nullable(string4()))
|
|
12451
12490
|
});
|
|
12452
|
-
var UpdateFeatureResponse$inboundSchema =
|
|
12453
|
-
|
|
12491
|
+
var UpdateFeatureResponse$inboundSchema = z52.pipe(
|
|
12492
|
+
z52.object({
|
|
12454
12493
|
id: string4(),
|
|
12455
12494
|
name: string4(),
|
|
12456
12495
|
type: UpdateFeatureTypeResponse$inboundSchema,
|
|
12457
12496
|
consumable: boolean2(),
|
|
12458
|
-
event_names: optional3(
|
|
12497
|
+
event_names: optional3(z52.array(string4())),
|
|
12459
12498
|
credit_schema: optional3(
|
|
12460
|
-
|
|
12499
|
+
z52.array(z52.lazy(() => UpdateFeatureCreditSchemaResponse$inboundSchema))
|
|
12461
12500
|
),
|
|
12462
12501
|
display: optional3(
|
|
12463
|
-
|
|
12502
|
+
z52.lazy(() => UpdateFeatureDisplayResponse$inboundSchema)
|
|
12464
12503
|
),
|
|
12465
12504
|
archived: boolean2()
|
|
12466
12505
|
}),
|
|
12467
|
-
|
|
12506
|
+
z52.transform((v) => {
|
|
12468
12507
|
return remap(v, {
|
|
12469
12508
|
"event_names": "eventNames",
|
|
12470
12509
|
"credit_schema": "creditSchema"
|
|
@@ -12473,7 +12512,7 @@ var UpdateFeatureResponse$inboundSchema = z51.pipe(
|
|
|
12473
12512
|
);
|
|
12474
12513
|
|
|
12475
12514
|
// ../sdk/src/models/update-plan-op.ts
|
|
12476
|
-
var
|
|
12515
|
+
var z53 = __toESM(require("zod/v4-mini"), 1);
|
|
12477
12516
|
var UpdatePlanPriceIntervalRequest = {
|
|
12478
12517
|
OneOff: "one_off",
|
|
12479
12518
|
Week: "week",
|
|
@@ -12605,59 +12644,59 @@ var UpdatePlanAttachAction = {
|
|
|
12605
12644
|
None: "none",
|
|
12606
12645
|
Purchase: "purchase"
|
|
12607
12646
|
};
|
|
12608
|
-
var UpdatePlanPriceIntervalRequest$outboundSchema =
|
|
12609
|
-
var UpdatePlanBasePrice$outboundSchema =
|
|
12610
|
-
|
|
12611
|
-
amount:
|
|
12647
|
+
var UpdatePlanPriceIntervalRequest$outboundSchema = z53.enum(UpdatePlanPriceIntervalRequest);
|
|
12648
|
+
var UpdatePlanBasePrice$outboundSchema = z53.pipe(
|
|
12649
|
+
z53.object({
|
|
12650
|
+
amount: z53.number(),
|
|
12612
12651
|
interval: UpdatePlanPriceIntervalRequest$outboundSchema,
|
|
12613
|
-
intervalCount:
|
|
12652
|
+
intervalCount: z53.optional(z53.number())
|
|
12614
12653
|
}),
|
|
12615
|
-
|
|
12654
|
+
z53.transform((v) => {
|
|
12616
12655
|
return remap(v, {
|
|
12617
12656
|
intervalCount: "interval_count"
|
|
12618
12657
|
});
|
|
12619
12658
|
})
|
|
12620
12659
|
);
|
|
12621
|
-
var UpdatePlanResetIntervalRequest$outboundSchema =
|
|
12622
|
-
var UpdatePlanResetRequest$outboundSchema =
|
|
12623
|
-
|
|
12660
|
+
var UpdatePlanResetIntervalRequest$outboundSchema = z53.enum(UpdatePlanResetIntervalRequest);
|
|
12661
|
+
var UpdatePlanResetRequest$outboundSchema = z53.pipe(
|
|
12662
|
+
z53.object({
|
|
12624
12663
|
interval: UpdatePlanResetIntervalRequest$outboundSchema,
|
|
12625
|
-
intervalCount:
|
|
12664
|
+
intervalCount: z53.optional(z53.number())
|
|
12626
12665
|
}),
|
|
12627
|
-
|
|
12666
|
+
z53.transform((v) => {
|
|
12628
12667
|
return remap(v, {
|
|
12629
12668
|
intervalCount: "interval_count"
|
|
12630
12669
|
});
|
|
12631
12670
|
})
|
|
12632
12671
|
);
|
|
12633
|
-
var UpdatePlanTo$outboundSchema = smartUnion([
|
|
12634
|
-
var UpdatePlanTier$outboundSchema =
|
|
12635
|
-
|
|
12636
|
-
to: smartUnion([
|
|
12637
|
-
amount:
|
|
12638
|
-
flatAmount:
|
|
12672
|
+
var UpdatePlanTo$outboundSchema = smartUnion([z53.number(), z53.string()]);
|
|
12673
|
+
var UpdatePlanTier$outboundSchema = z53.pipe(
|
|
12674
|
+
z53.object({
|
|
12675
|
+
to: smartUnion([z53.number(), z53.string()]),
|
|
12676
|
+
amount: z53.optional(z53.number()),
|
|
12677
|
+
flatAmount: z53.optional(z53.number())
|
|
12639
12678
|
}),
|
|
12640
|
-
|
|
12679
|
+
z53.transform((v) => {
|
|
12641
12680
|
return remap(v, {
|
|
12642
12681
|
flatAmount: "flat_amount"
|
|
12643
12682
|
});
|
|
12644
12683
|
})
|
|
12645
12684
|
);
|
|
12646
|
-
var UpdatePlanTierBehaviorRequest$outboundSchema =
|
|
12647
|
-
var UpdatePlanItemPriceIntervalRequest$outboundSchema =
|
|
12648
|
-
var UpdatePlanBillingMethodRequest$outboundSchema =
|
|
12649
|
-
var UpdatePlanPriceRequest$outboundSchema =
|
|
12650
|
-
|
|
12651
|
-
amount:
|
|
12652
|
-
tiers:
|
|
12653
|
-
tierBehavior:
|
|
12685
|
+
var UpdatePlanTierBehaviorRequest$outboundSchema = z53.enum(UpdatePlanTierBehaviorRequest);
|
|
12686
|
+
var UpdatePlanItemPriceIntervalRequest$outboundSchema = z53.enum(UpdatePlanItemPriceIntervalRequest);
|
|
12687
|
+
var UpdatePlanBillingMethodRequest$outboundSchema = z53.enum(UpdatePlanBillingMethodRequest);
|
|
12688
|
+
var UpdatePlanPriceRequest$outboundSchema = z53.pipe(
|
|
12689
|
+
z53.object({
|
|
12690
|
+
amount: z53.optional(z53.number()),
|
|
12691
|
+
tiers: z53.optional(z53.array(z53.lazy(() => UpdatePlanTier$outboundSchema))),
|
|
12692
|
+
tierBehavior: z53.optional(UpdatePlanTierBehaviorRequest$outboundSchema),
|
|
12654
12693
|
interval: UpdatePlanItemPriceIntervalRequest$outboundSchema,
|
|
12655
|
-
intervalCount:
|
|
12656
|
-
billingUnits:
|
|
12694
|
+
intervalCount: z53._default(z53.number(), 1),
|
|
12695
|
+
billingUnits: z53._default(z53.number(), 1),
|
|
12657
12696
|
billingMethod: UpdatePlanBillingMethodRequest$outboundSchema,
|
|
12658
|
-
maxPurchase:
|
|
12697
|
+
maxPurchase: z53.optional(z53.number())
|
|
12659
12698
|
}),
|
|
12660
|
-
|
|
12699
|
+
z53.transform((v) => {
|
|
12661
12700
|
return remap(v, {
|
|
12662
12701
|
tierBehavior: "tier_behavior",
|
|
12663
12702
|
intervalCount: "interval_count",
|
|
@@ -12667,29 +12706,29 @@ var UpdatePlanPriceRequest$outboundSchema = z52.pipe(
|
|
|
12667
12706
|
});
|
|
12668
12707
|
})
|
|
12669
12708
|
);
|
|
12670
|
-
var UpdatePlanOnIncrease$outboundSchema =
|
|
12671
|
-
var UpdatePlanOnDecrease$outboundSchema =
|
|
12672
|
-
var UpdatePlanProration$outboundSchema =
|
|
12673
|
-
|
|
12709
|
+
var UpdatePlanOnIncrease$outboundSchema = z53.enum(UpdatePlanOnIncrease);
|
|
12710
|
+
var UpdatePlanOnDecrease$outboundSchema = z53.enum(UpdatePlanOnDecrease);
|
|
12711
|
+
var UpdatePlanProration$outboundSchema = z53.pipe(
|
|
12712
|
+
z53.object({
|
|
12674
12713
|
onIncrease: UpdatePlanOnIncrease$outboundSchema,
|
|
12675
12714
|
onDecrease: UpdatePlanOnDecrease$outboundSchema
|
|
12676
12715
|
}),
|
|
12677
|
-
|
|
12716
|
+
z53.transform((v) => {
|
|
12678
12717
|
return remap(v, {
|
|
12679
12718
|
onIncrease: "on_increase",
|
|
12680
12719
|
onDecrease: "on_decrease"
|
|
12681
12720
|
});
|
|
12682
12721
|
})
|
|
12683
12722
|
);
|
|
12684
|
-
var UpdatePlanExpiryDurationTypeRequest$outboundSchema =
|
|
12685
|
-
var UpdatePlanRolloverRequest$outboundSchema =
|
|
12686
|
-
|
|
12687
|
-
max:
|
|
12688
|
-
maxPercentage:
|
|
12723
|
+
var UpdatePlanExpiryDurationTypeRequest$outboundSchema = z53.enum(UpdatePlanExpiryDurationTypeRequest);
|
|
12724
|
+
var UpdatePlanRolloverRequest$outboundSchema = z53.pipe(
|
|
12725
|
+
z53.object({
|
|
12726
|
+
max: z53.optional(z53.number()),
|
|
12727
|
+
maxPercentage: z53.optional(z53.number()),
|
|
12689
12728
|
expiryDurationType: UpdatePlanExpiryDurationTypeRequest$outboundSchema,
|
|
12690
|
-
expiryDurationLength:
|
|
12729
|
+
expiryDurationLength: z53.optional(z53.number())
|
|
12691
12730
|
}),
|
|
12692
|
-
|
|
12731
|
+
z53.transform((v) => {
|
|
12693
12732
|
return remap(v, {
|
|
12694
12733
|
maxPercentage: "max_percentage",
|
|
12695
12734
|
expiryDurationType: "expiry_duration_type",
|
|
@@ -12697,37 +12736,37 @@ var UpdatePlanRolloverRequest$outboundSchema = z52.pipe(
|
|
|
12697
12736
|
});
|
|
12698
12737
|
})
|
|
12699
12738
|
);
|
|
12700
|
-
var UpdatePlanPlanItem$outboundSchema =
|
|
12701
|
-
|
|
12702
|
-
featureId:
|
|
12703
|
-
included:
|
|
12704
|
-
unlimited:
|
|
12705
|
-
reset:
|
|
12706
|
-
price:
|
|
12707
|
-
proration:
|
|
12708
|
-
rollover:
|
|
12709
|
-
|
|
12739
|
+
var UpdatePlanPlanItem$outboundSchema = z53.pipe(
|
|
12740
|
+
z53.object({
|
|
12741
|
+
featureId: z53.string(),
|
|
12742
|
+
included: z53.optional(z53.number()),
|
|
12743
|
+
unlimited: z53.optional(z53.boolean()),
|
|
12744
|
+
reset: z53.optional(z53.lazy(() => UpdatePlanResetRequest$outboundSchema)),
|
|
12745
|
+
price: z53.optional(z53.lazy(() => UpdatePlanPriceRequest$outboundSchema)),
|
|
12746
|
+
proration: z53.optional(z53.lazy(() => UpdatePlanProration$outboundSchema)),
|
|
12747
|
+
rollover: z53.optional(
|
|
12748
|
+
z53.lazy(() => UpdatePlanRolloverRequest$outboundSchema)
|
|
12710
12749
|
)
|
|
12711
12750
|
}),
|
|
12712
|
-
|
|
12751
|
+
z53.transform((v) => {
|
|
12713
12752
|
return remap(v, {
|
|
12714
12753
|
featureId: "feature_id"
|
|
12715
12754
|
});
|
|
12716
12755
|
})
|
|
12717
12756
|
);
|
|
12718
|
-
var UpdatePlanDurationTypeRequest$outboundSchema =
|
|
12719
|
-
var UpdatePlanOnEndRequest$outboundSchema =
|
|
12720
|
-
var UpdatePlanFreeTrialParams$outboundSchema =
|
|
12721
|
-
|
|
12722
|
-
durationLength:
|
|
12723
|
-
durationType:
|
|
12757
|
+
var UpdatePlanDurationTypeRequest$outboundSchema = z53.enum(UpdatePlanDurationTypeRequest);
|
|
12758
|
+
var UpdatePlanOnEndRequest$outboundSchema = z53.enum(UpdatePlanOnEndRequest);
|
|
12759
|
+
var UpdatePlanFreeTrialParams$outboundSchema = z53.pipe(
|
|
12760
|
+
z53.object({
|
|
12761
|
+
durationLength: z53.number(),
|
|
12762
|
+
durationType: z53._default(
|
|
12724
12763
|
UpdatePlanDurationTypeRequest$outboundSchema,
|
|
12725
12764
|
"month"
|
|
12726
12765
|
),
|
|
12727
|
-
cardRequired:
|
|
12728
|
-
onEnd:
|
|
12766
|
+
cardRequired: z53._default(z53.boolean(), true),
|
|
12767
|
+
onEnd: z53.optional(UpdatePlanOnEndRequest$outboundSchema)
|
|
12729
12768
|
}),
|
|
12730
|
-
|
|
12769
|
+
z53.transform((v) => {
|
|
12731
12770
|
return remap(v, {
|
|
12732
12771
|
durationLength: "duration_length",
|
|
12733
12772
|
durationType: "duration_type",
|
|
@@ -12736,38 +12775,38 @@ var UpdatePlanFreeTrialParams$outboundSchema = z52.pipe(
|
|
|
12736
12775
|
});
|
|
12737
12776
|
})
|
|
12738
12777
|
);
|
|
12739
|
-
var UpdatePlanConfigRequest$outboundSchema =
|
|
12740
|
-
|
|
12741
|
-
ignorePastDue:
|
|
12778
|
+
var UpdatePlanConfigRequest$outboundSchema = z53.pipe(
|
|
12779
|
+
z53.object({
|
|
12780
|
+
ignorePastDue: z53._default(z53.boolean(), false)
|
|
12742
12781
|
}),
|
|
12743
|
-
|
|
12782
|
+
z53.transform((v) => {
|
|
12744
12783
|
return remap(v, {
|
|
12745
12784
|
ignorePastDue: "ignore_past_due"
|
|
12746
12785
|
});
|
|
12747
12786
|
})
|
|
12748
12787
|
);
|
|
12749
|
-
var UpdatePlanParams$outboundSchema =
|
|
12750
|
-
|
|
12751
|
-
planId:
|
|
12752
|
-
group:
|
|
12753
|
-
name:
|
|
12754
|
-
description:
|
|
12755
|
-
addOn:
|
|
12756
|
-
autoEnable:
|
|
12757
|
-
price:
|
|
12758
|
-
|
|
12788
|
+
var UpdatePlanParams$outboundSchema = z53.pipe(
|
|
12789
|
+
z53.object({
|
|
12790
|
+
planId: z53.string(),
|
|
12791
|
+
group: z53._default(z53.string(), ""),
|
|
12792
|
+
name: z53.optional(z53.string()),
|
|
12793
|
+
description: z53.optional(z53.string()),
|
|
12794
|
+
addOn: z53.optional(z53.boolean()),
|
|
12795
|
+
autoEnable: z53.optional(z53.boolean()),
|
|
12796
|
+
price: z53.optional(
|
|
12797
|
+
z53.nullable(z53.lazy(() => UpdatePlanBasePrice$outboundSchema))
|
|
12759
12798
|
),
|
|
12760
|
-
items:
|
|
12761
|
-
freeTrial:
|
|
12762
|
-
|
|
12799
|
+
items: z53.optional(z53.array(z53.lazy(() => UpdatePlanPlanItem$outboundSchema))),
|
|
12800
|
+
freeTrial: z53.optional(
|
|
12801
|
+
z53.nullable(z53.lazy(() => UpdatePlanFreeTrialParams$outboundSchema))
|
|
12763
12802
|
),
|
|
12764
|
-
config:
|
|
12765
|
-
createInStripe:
|
|
12766
|
-
version:
|
|
12767
|
-
archived:
|
|
12768
|
-
newPlanId:
|
|
12803
|
+
config: z53.optional(z53.lazy(() => UpdatePlanConfigRequest$outboundSchema)),
|
|
12804
|
+
createInStripe: z53._default(z53.boolean(), true),
|
|
12805
|
+
version: z53.optional(z53.number()),
|
|
12806
|
+
archived: z53._default(z53.boolean(), false),
|
|
12807
|
+
newPlanId: z53.optional(z53.string())
|
|
12769
12808
|
}),
|
|
12770
|
-
|
|
12809
|
+
z53.transform((v) => {
|
|
12771
12810
|
return remap(v, {
|
|
12772
12811
|
planId: "plan_id",
|
|
12773
12812
|
addOn: "add_on",
|
|
@@ -12779,74 +12818,74 @@ var UpdatePlanParams$outboundSchema = z52.pipe(
|
|
|
12779
12818
|
})
|
|
12780
12819
|
);
|
|
12781
12820
|
var UpdatePlanPriceIntervalResponse$inboundSchema = inboundSchema(UpdatePlanPriceIntervalResponse);
|
|
12782
|
-
var UpdatePlanPriceDisplay$inboundSchema =
|
|
12783
|
-
|
|
12821
|
+
var UpdatePlanPriceDisplay$inboundSchema = z53.pipe(
|
|
12822
|
+
z53.object({
|
|
12784
12823
|
primary_text: string4(),
|
|
12785
12824
|
secondary_text: optional3(string4())
|
|
12786
12825
|
}),
|
|
12787
|
-
|
|
12826
|
+
z53.transform((v) => {
|
|
12788
12827
|
return remap(v, {
|
|
12789
12828
|
"primary_text": "primaryText",
|
|
12790
12829
|
"secondary_text": "secondaryText"
|
|
12791
12830
|
});
|
|
12792
12831
|
})
|
|
12793
12832
|
);
|
|
12794
|
-
var UpdatePlanPriceResponse$inboundSchema =
|
|
12795
|
-
|
|
12833
|
+
var UpdatePlanPriceResponse$inboundSchema = z53.pipe(
|
|
12834
|
+
z53.object({
|
|
12796
12835
|
amount: number2(),
|
|
12797
12836
|
interval: UpdatePlanPriceIntervalResponse$inboundSchema,
|
|
12798
12837
|
interval_count: optional3(number2()),
|
|
12799
|
-
display: optional3(
|
|
12838
|
+
display: optional3(z53.lazy(() => UpdatePlanPriceDisplay$inboundSchema))
|
|
12800
12839
|
}),
|
|
12801
|
-
|
|
12840
|
+
z53.transform((v) => {
|
|
12802
12841
|
return remap(v, {
|
|
12803
12842
|
"interval_count": "intervalCount"
|
|
12804
12843
|
});
|
|
12805
12844
|
})
|
|
12806
12845
|
);
|
|
12807
12846
|
var UpdatePlanType$inboundSchema = inboundSchema(UpdatePlanType);
|
|
12808
|
-
var UpdatePlanFeatureDisplay$inboundSchema =
|
|
12847
|
+
var UpdatePlanFeatureDisplay$inboundSchema = z53.object({
|
|
12809
12848
|
singular: string4(),
|
|
12810
12849
|
plural: string4()
|
|
12811
12850
|
});
|
|
12812
|
-
var UpdatePlanCreditSchema$inboundSchema =
|
|
12813
|
-
|
|
12851
|
+
var UpdatePlanCreditSchema$inboundSchema = z53.pipe(
|
|
12852
|
+
z53.object({
|
|
12814
12853
|
metered_feature_id: string4(),
|
|
12815
12854
|
credit_cost: number2()
|
|
12816
12855
|
}),
|
|
12817
|
-
|
|
12856
|
+
z53.transform((v) => {
|
|
12818
12857
|
return remap(v, {
|
|
12819
12858
|
"metered_feature_id": "meteredFeatureId",
|
|
12820
12859
|
"credit_cost": "creditCost"
|
|
12821
12860
|
});
|
|
12822
12861
|
})
|
|
12823
12862
|
);
|
|
12824
|
-
var UpdatePlanFeature$inboundSchema =
|
|
12825
|
-
|
|
12863
|
+
var UpdatePlanFeature$inboundSchema = z53.pipe(
|
|
12864
|
+
z53.object({
|
|
12826
12865
|
id: string4(),
|
|
12827
|
-
name:
|
|
12866
|
+
name: z53.optional(z53.nullable(string4())),
|
|
12828
12867
|
type: UpdatePlanType$inboundSchema,
|
|
12829
|
-
display:
|
|
12830
|
-
|
|
12868
|
+
display: z53.optional(
|
|
12869
|
+
z53.nullable(z53.lazy(() => UpdatePlanFeatureDisplay$inboundSchema))
|
|
12831
12870
|
),
|
|
12832
|
-
credit_schema:
|
|
12833
|
-
|
|
12871
|
+
credit_schema: z53.optional(
|
|
12872
|
+
z53.nullable(z53.array(z53.lazy(() => UpdatePlanCreditSchema$inboundSchema)))
|
|
12834
12873
|
),
|
|
12835
|
-
archived:
|
|
12874
|
+
archived: z53.optional(z53.nullable(boolean2()))
|
|
12836
12875
|
}),
|
|
12837
|
-
|
|
12876
|
+
z53.transform((v) => {
|
|
12838
12877
|
return remap(v, {
|
|
12839
12878
|
"credit_schema": "creditSchema"
|
|
12840
12879
|
});
|
|
12841
12880
|
})
|
|
12842
12881
|
);
|
|
12843
12882
|
var UpdatePlanResetIntervalResponse$inboundSchema = inboundSchema(UpdatePlanResetIntervalResponse);
|
|
12844
|
-
var UpdatePlanResetResponse$inboundSchema =
|
|
12845
|
-
|
|
12883
|
+
var UpdatePlanResetResponse$inboundSchema = z53.pipe(
|
|
12884
|
+
z53.object({
|
|
12846
12885
|
interval: UpdatePlanResetIntervalResponse$inboundSchema,
|
|
12847
12886
|
interval_count: optional3(number2())
|
|
12848
12887
|
}),
|
|
12849
|
-
|
|
12888
|
+
z53.transform((v) => {
|
|
12850
12889
|
return remap(v, {
|
|
12851
12890
|
"interval_count": "intervalCount"
|
|
12852
12891
|
});
|
|
@@ -12855,10 +12894,10 @@ var UpdatePlanResetResponse$inboundSchema = z52.pipe(
|
|
|
12855
12894
|
var UpdatePlanTierBehaviorResponse$inboundSchema = inboundSchema(UpdatePlanTierBehaviorResponse);
|
|
12856
12895
|
var UpdatePlanPriceItemIntervalResponse$inboundSchema = inboundSchema(UpdatePlanPriceItemIntervalResponse);
|
|
12857
12896
|
var UpdatePlanBillingMethodResponse$inboundSchema = inboundSchema(UpdatePlanBillingMethodResponse);
|
|
12858
|
-
var UpdatePlanItemPriceResponse$inboundSchema =
|
|
12859
|
-
|
|
12897
|
+
var UpdatePlanItemPriceResponse$inboundSchema = z53.pipe(
|
|
12898
|
+
z53.object({
|
|
12860
12899
|
amount: optional3(number2()),
|
|
12861
|
-
tiers: optional3(
|
|
12900
|
+
tiers: optional3(z53.array(nullable(z53.any()))),
|
|
12862
12901
|
tier_behavior: optional3(UpdatePlanTierBehaviorResponse$inboundSchema),
|
|
12863
12902
|
interval: UpdatePlanPriceItemIntervalResponse$inboundSchema,
|
|
12864
12903
|
interval_count: optional3(number2()),
|
|
@@ -12866,7 +12905,7 @@ var UpdatePlanItemPriceResponse$inboundSchema = z52.pipe(
|
|
|
12866
12905
|
billing_method: UpdatePlanBillingMethodResponse$inboundSchema,
|
|
12867
12906
|
max_purchase: nullable(number2())
|
|
12868
12907
|
}),
|
|
12869
|
-
|
|
12908
|
+
z53.transform((v) => {
|
|
12870
12909
|
return remap(v, {
|
|
12871
12910
|
"tier_behavior": "tierBehavior",
|
|
12872
12911
|
"interval_count": "intervalCount",
|
|
@@ -12876,12 +12915,12 @@ var UpdatePlanItemPriceResponse$inboundSchema = z52.pipe(
|
|
|
12876
12915
|
});
|
|
12877
12916
|
})
|
|
12878
12917
|
);
|
|
12879
|
-
var UpdatePlanItemDisplay$inboundSchema =
|
|
12880
|
-
|
|
12918
|
+
var UpdatePlanItemDisplay$inboundSchema = z53.pipe(
|
|
12919
|
+
z53.object({
|
|
12881
12920
|
primary_text: string4(),
|
|
12882
12921
|
secondary_text: optional3(string4())
|
|
12883
12922
|
}),
|
|
12884
|
-
|
|
12923
|
+
z53.transform((v) => {
|
|
12885
12924
|
return remap(v, {
|
|
12886
12925
|
"primary_text": "primaryText",
|
|
12887
12926
|
"secondary_text": "secondaryText"
|
|
@@ -12889,14 +12928,14 @@ var UpdatePlanItemDisplay$inboundSchema = z52.pipe(
|
|
|
12889
12928
|
})
|
|
12890
12929
|
);
|
|
12891
12930
|
var UpdatePlanExpiryDurationTypeResponse$inboundSchema = inboundSchema(UpdatePlanExpiryDurationTypeResponse);
|
|
12892
|
-
var UpdatePlanRolloverResponse$inboundSchema =
|
|
12893
|
-
|
|
12931
|
+
var UpdatePlanRolloverResponse$inboundSchema = z53.pipe(
|
|
12932
|
+
z53.object({
|
|
12894
12933
|
max: nullable(number2()),
|
|
12895
|
-
max_percentage:
|
|
12934
|
+
max_percentage: z53.optional(z53.nullable(number2())),
|
|
12896
12935
|
expiry_duration_type: UpdatePlanExpiryDurationTypeResponse$inboundSchema,
|
|
12897
12936
|
expiry_duration_length: optional3(number2())
|
|
12898
12937
|
}),
|
|
12899
|
-
|
|
12938
|
+
z53.transform((v) => {
|
|
12900
12939
|
return remap(v, {
|
|
12901
12940
|
"max_percentage": "maxPercentage",
|
|
12902
12941
|
"expiry_duration_type": "expiryDurationType",
|
|
@@ -12904,22 +12943,22 @@ var UpdatePlanRolloverResponse$inboundSchema = z52.pipe(
|
|
|
12904
12943
|
});
|
|
12905
12944
|
})
|
|
12906
12945
|
);
|
|
12907
|
-
var UpdatePlanItem$inboundSchema =
|
|
12908
|
-
|
|
12946
|
+
var UpdatePlanItem$inboundSchema = z53.pipe(
|
|
12947
|
+
z53.object({
|
|
12909
12948
|
feature_id: string4(),
|
|
12910
|
-
feature: optional3(
|
|
12949
|
+
feature: optional3(z53.lazy(() => UpdatePlanFeature$inboundSchema)),
|
|
12911
12950
|
included: number2(),
|
|
12912
12951
|
unlimited: boolean2(),
|
|
12913
|
-
reset: nullable(
|
|
12952
|
+
reset: nullable(z53.lazy(() => UpdatePlanResetResponse$inboundSchema)),
|
|
12914
12953
|
price: nullable(
|
|
12915
|
-
|
|
12954
|
+
z53.lazy(() => UpdatePlanItemPriceResponse$inboundSchema)
|
|
12916
12955
|
),
|
|
12917
|
-
display: optional3(
|
|
12956
|
+
display: optional3(z53.lazy(() => UpdatePlanItemDisplay$inboundSchema)),
|
|
12918
12957
|
rollover: optional3(
|
|
12919
|
-
|
|
12958
|
+
z53.lazy(() => UpdatePlanRolloverResponse$inboundSchema)
|
|
12920
12959
|
)
|
|
12921
12960
|
}),
|
|
12922
|
-
|
|
12961
|
+
z53.transform((v) => {
|
|
12923
12962
|
return remap(v, {
|
|
12924
12963
|
"feature_id": "featureId"
|
|
12925
12964
|
});
|
|
@@ -12927,14 +12966,14 @@ var UpdatePlanItem$inboundSchema = z52.pipe(
|
|
|
12927
12966
|
);
|
|
12928
12967
|
var UpdatePlanDurationTypeResponse$inboundSchema = inboundSchema(UpdatePlanDurationTypeResponse);
|
|
12929
12968
|
var UpdatePlanOnEndResponse$inboundSchema = inboundSchema(UpdatePlanOnEndResponse);
|
|
12930
|
-
var UpdatePlanFreeTrial$inboundSchema =
|
|
12931
|
-
|
|
12969
|
+
var UpdatePlanFreeTrial$inboundSchema = z53.pipe(
|
|
12970
|
+
z53.object({
|
|
12932
12971
|
duration_length: number2(),
|
|
12933
12972
|
duration_type: UpdatePlanDurationTypeResponse$inboundSchema,
|
|
12934
12973
|
card_required: boolean2(),
|
|
12935
|
-
on_end:
|
|
12974
|
+
on_end: z53.optional(z53.nullable(UpdatePlanOnEndResponse$inboundSchema))
|
|
12936
12975
|
}),
|
|
12937
|
-
|
|
12976
|
+
z53.transform((v) => {
|
|
12938
12977
|
return remap(v, {
|
|
12939
12978
|
"duration_length": "durationLength",
|
|
12940
12979
|
"duration_type": "durationType",
|
|
@@ -12944,11 +12983,11 @@ var UpdatePlanFreeTrial$inboundSchema = z52.pipe(
|
|
|
12944
12983
|
})
|
|
12945
12984
|
);
|
|
12946
12985
|
var UpdatePlanEnv$inboundSchema = inboundSchema(UpdatePlanEnv);
|
|
12947
|
-
var UpdatePlanConfigResponse$inboundSchema =
|
|
12948
|
-
|
|
12949
|
-
ignore_past_due:
|
|
12986
|
+
var UpdatePlanConfigResponse$inboundSchema = z53.pipe(
|
|
12987
|
+
z53.object({
|
|
12988
|
+
ignore_past_due: z53._default(boolean2(), false)
|
|
12950
12989
|
}),
|
|
12951
|
-
|
|
12990
|
+
z53.transform((v) => {
|
|
12952
12991
|
return remap(v, {
|
|
12953
12992
|
"ignore_past_due": "ignorePastDue"
|
|
12954
12993
|
});
|
|
@@ -12956,23 +12995,23 @@ var UpdatePlanConfigResponse$inboundSchema = z52.pipe(
|
|
|
12956
12995
|
);
|
|
12957
12996
|
var UpdatePlanStatus$inboundSchema = inboundSchema(UpdatePlanStatus);
|
|
12958
12997
|
var UpdatePlanAttachAction$inboundSchema = inboundSchema(UpdatePlanAttachAction);
|
|
12959
|
-
var UpdatePlanCustomerEligibility$inboundSchema =
|
|
12960
|
-
|
|
12998
|
+
var UpdatePlanCustomerEligibility$inboundSchema = z53.pipe(
|
|
12999
|
+
z53.object({
|
|
12961
13000
|
trial_available: optional3(boolean2()),
|
|
12962
13001
|
status: optional3(UpdatePlanStatus$inboundSchema),
|
|
12963
13002
|
canceling: optional3(boolean2()),
|
|
12964
13003
|
trialing: optional3(boolean2()),
|
|
12965
13004
|
attach_action: UpdatePlanAttachAction$inboundSchema
|
|
12966
13005
|
}),
|
|
12967
|
-
|
|
13006
|
+
z53.transform((v) => {
|
|
12968
13007
|
return remap(v, {
|
|
12969
13008
|
"trial_available": "trialAvailable",
|
|
12970
13009
|
"attach_action": "attachAction"
|
|
12971
13010
|
});
|
|
12972
13011
|
})
|
|
12973
13012
|
);
|
|
12974
|
-
var UpdatePlanResponse$inboundSchema =
|
|
12975
|
-
|
|
13013
|
+
var UpdatePlanResponse$inboundSchema = z53.pipe(
|
|
13014
|
+
z53.object({
|
|
12976
13015
|
id: string4(),
|
|
12977
13016
|
name: string4(),
|
|
12978
13017
|
description: nullable(string4()),
|
|
@@ -12980,19 +13019,19 @@ var UpdatePlanResponse$inboundSchema = z52.pipe(
|
|
|
12980
13019
|
version: number2(),
|
|
12981
13020
|
add_on: boolean2(),
|
|
12982
13021
|
auto_enable: boolean2(),
|
|
12983
|
-
price: nullable(
|
|
12984
|
-
items:
|
|
12985
|
-
free_trial: optional3(
|
|
13022
|
+
price: nullable(z53.lazy(() => UpdatePlanPriceResponse$inboundSchema)),
|
|
13023
|
+
items: z53.array(z53.lazy(() => UpdatePlanItem$inboundSchema)),
|
|
13024
|
+
free_trial: optional3(z53.lazy(() => UpdatePlanFreeTrial$inboundSchema)),
|
|
12986
13025
|
created_at: number2(),
|
|
12987
13026
|
env: UpdatePlanEnv$inboundSchema,
|
|
12988
13027
|
archived: boolean2(),
|
|
12989
13028
|
base_variant_id: nullable(string4()),
|
|
12990
|
-
config:
|
|
13029
|
+
config: z53.lazy(() => UpdatePlanConfigResponse$inboundSchema),
|
|
12991
13030
|
customer_eligibility: optional3(
|
|
12992
|
-
|
|
13031
|
+
z53.lazy(() => UpdatePlanCustomerEligibility$inboundSchema)
|
|
12993
13032
|
)
|
|
12994
13033
|
}),
|
|
12995
|
-
|
|
13034
|
+
z53.transform((v) => {
|
|
12996
13035
|
return remap(v, {
|
|
12997
13036
|
"add_on": "addOn",
|
|
12998
13037
|
"auto_enable": "autoEnable",
|
|
@@ -13041,7 +13080,7 @@ function check(client, request, options) {
|
|
|
13041
13080
|
async function $do(client, request, options) {
|
|
13042
13081
|
const parsed = safeParse(
|
|
13043
13082
|
request,
|
|
13044
|
-
(value) =>
|
|
13083
|
+
(value) => z54.parse(CheckParams$outboundSchema, value),
|
|
13045
13084
|
"Input validation failed"
|
|
13046
13085
|
);
|
|
13047
13086
|
if (!parsed.ok) {
|
|
@@ -13109,7 +13148,7 @@ async function $do(client, request, options) {
|
|
|
13109
13148
|
}
|
|
13110
13149
|
|
|
13111
13150
|
// ../sdk/src/funcs/track.ts
|
|
13112
|
-
var
|
|
13151
|
+
var z55 = __toESM(require("zod/v4-mini"), 1);
|
|
13113
13152
|
function track(client, request, options) {
|
|
13114
13153
|
return new APIPromise($do2(
|
|
13115
13154
|
client,
|
|
@@ -13120,7 +13159,7 @@ function track(client, request, options) {
|
|
|
13120
13159
|
async function $do2(client, request, options) {
|
|
13121
13160
|
const parsed = safeParse(
|
|
13122
13161
|
request,
|
|
13123
|
-
(value) =>
|
|
13162
|
+
(value) => z55.parse(TrackParams$outboundSchema, value),
|
|
13124
13163
|
"Input validation failed"
|
|
13125
13164
|
);
|
|
13126
13165
|
if (!parsed.ok) {
|
|
@@ -13793,7 +13832,7 @@ async function logResponse(logger, res, req) {
|
|
|
13793
13832
|
}
|
|
13794
13833
|
|
|
13795
13834
|
// ../sdk/src/funcs/balances-create.ts
|
|
13796
|
-
var
|
|
13835
|
+
var z56 = __toESM(require("zod/v4-mini"), 1);
|
|
13797
13836
|
function balancesCreate(client, request, options) {
|
|
13798
13837
|
return new APIPromise($do3(
|
|
13799
13838
|
client,
|
|
@@ -13804,7 +13843,7 @@ function balancesCreate(client, request, options) {
|
|
|
13804
13843
|
async function $do3(client, request, options) {
|
|
13805
13844
|
const parsed = safeParse(
|
|
13806
13845
|
request,
|
|
13807
|
-
(value) =>
|
|
13846
|
+
(value) => z56.parse(CreateBalanceParams$outboundSchema, value),
|
|
13808
13847
|
"Input validation failed"
|
|
13809
13848
|
);
|
|
13810
13849
|
if (!parsed.ok) {
|
|
@@ -13871,7 +13910,7 @@ async function $do3(client, request, options) {
|
|
|
13871
13910
|
}
|
|
13872
13911
|
|
|
13873
13912
|
// ../sdk/src/funcs/balances-delete.ts
|
|
13874
|
-
var
|
|
13913
|
+
var z57 = __toESM(require("zod/v4-mini"), 1);
|
|
13875
13914
|
function balancesDelete(client, request, options) {
|
|
13876
13915
|
return new APIPromise($do4(
|
|
13877
13916
|
client,
|
|
@@ -13882,7 +13921,7 @@ function balancesDelete(client, request, options) {
|
|
|
13882
13921
|
async function $do4(client, request, options) {
|
|
13883
13922
|
const parsed = safeParse(
|
|
13884
13923
|
request,
|
|
13885
|
-
(value) =>
|
|
13924
|
+
(value) => z57.parse(DeleteBalanceParams$outboundSchema, value),
|
|
13886
13925
|
"Input validation failed"
|
|
13887
13926
|
);
|
|
13888
13927
|
if (!parsed.ok) {
|
|
@@ -13949,7 +13988,7 @@ async function $do4(client, request, options) {
|
|
|
13949
13988
|
}
|
|
13950
13989
|
|
|
13951
13990
|
// ../sdk/src/funcs/balances-finalize.ts
|
|
13952
|
-
var
|
|
13991
|
+
var z58 = __toESM(require("zod/v4-mini"), 1);
|
|
13953
13992
|
function balancesFinalize(client, request, options) {
|
|
13954
13993
|
return new APIPromise($do5(
|
|
13955
13994
|
client,
|
|
@@ -13960,7 +13999,7 @@ function balancesFinalize(client, request, options) {
|
|
|
13960
13999
|
async function $do5(client, request, options) {
|
|
13961
14000
|
const parsed = safeParse(
|
|
13962
14001
|
request,
|
|
13963
|
-
(value) =>
|
|
14002
|
+
(value) => z58.parse(FinalizeBalanceParams$outboundSchema, value),
|
|
13964
14003
|
"Input validation failed"
|
|
13965
14004
|
);
|
|
13966
14005
|
if (!parsed.ok) {
|
|
@@ -14028,7 +14067,7 @@ async function $do5(client, request, options) {
|
|
|
14028
14067
|
}
|
|
14029
14068
|
|
|
14030
14069
|
// ../sdk/src/funcs/balances-update.ts
|
|
14031
|
-
var
|
|
14070
|
+
var z59 = __toESM(require("zod/v4-mini"), 1);
|
|
14032
14071
|
function balancesUpdate(client, request, options) {
|
|
14033
14072
|
return new APIPromise($do6(
|
|
14034
14073
|
client,
|
|
@@ -14039,7 +14078,7 @@ function balancesUpdate(client, request, options) {
|
|
|
14039
14078
|
async function $do6(client, request, options) {
|
|
14040
14079
|
const parsed = safeParse(
|
|
14041
14080
|
request,
|
|
14042
|
-
(value) =>
|
|
14081
|
+
(value) => z59.parse(UpdateBalanceParams$outboundSchema, value),
|
|
14043
14082
|
"Input validation failed"
|
|
14044
14083
|
);
|
|
14045
14084
|
if (!parsed.ok) {
|
|
@@ -14150,7 +14189,7 @@ var Balances = class extends ClientSDK {
|
|
|
14150
14189
|
};
|
|
14151
14190
|
|
|
14152
14191
|
// ../sdk/src/funcs/billing-attach.ts
|
|
14153
|
-
var
|
|
14192
|
+
var z60 = __toESM(require("zod/v4-mini"), 1);
|
|
14154
14193
|
function billingAttach(client, request, options) {
|
|
14155
14194
|
return new APIPromise($do7(
|
|
14156
14195
|
client,
|
|
@@ -14161,7 +14200,7 @@ function billingAttach(client, request, options) {
|
|
|
14161
14200
|
async function $do7(client, request, options) {
|
|
14162
14201
|
const parsed = safeParse(
|
|
14163
14202
|
request,
|
|
14164
|
-
(value) =>
|
|
14203
|
+
(value) => z60.parse(AttachParams$outboundSchema, value),
|
|
14165
14204
|
"Input validation failed"
|
|
14166
14205
|
);
|
|
14167
14206
|
if (!parsed.ok) {
|
|
@@ -14228,7 +14267,7 @@ async function $do7(client, request, options) {
|
|
|
14228
14267
|
}
|
|
14229
14268
|
|
|
14230
14269
|
// ../sdk/src/funcs/billing-create-schedule.ts
|
|
14231
|
-
var
|
|
14270
|
+
var z61 = __toESM(require("zod/v4-mini"), 1);
|
|
14232
14271
|
function billingCreateSchedule(client, request, options) {
|
|
14233
14272
|
return new APIPromise($do8(
|
|
14234
14273
|
client,
|
|
@@ -14239,7 +14278,7 @@ function billingCreateSchedule(client, request, options) {
|
|
|
14239
14278
|
async function $do8(client, request, options) {
|
|
14240
14279
|
const parsed = safeParse(
|
|
14241
14280
|
request,
|
|
14242
|
-
(value) =>
|
|
14281
|
+
(value) => z61.parse(CreateScheduleParams$outboundSchema, value),
|
|
14243
14282
|
"Input validation failed"
|
|
14244
14283
|
);
|
|
14245
14284
|
if (!parsed.ok) {
|
|
@@ -14306,7 +14345,7 @@ async function $do8(client, request, options) {
|
|
|
14306
14345
|
}
|
|
14307
14346
|
|
|
14308
14347
|
// ../sdk/src/funcs/billing-multi-attach.ts
|
|
14309
|
-
var
|
|
14348
|
+
var z62 = __toESM(require("zod/v4-mini"), 1);
|
|
14310
14349
|
function billingMultiAttach(client, request, options) {
|
|
14311
14350
|
return new APIPromise($do9(
|
|
14312
14351
|
client,
|
|
@@ -14317,7 +14356,7 @@ function billingMultiAttach(client, request, options) {
|
|
|
14317
14356
|
async function $do9(client, request, options) {
|
|
14318
14357
|
const parsed = safeParse(
|
|
14319
14358
|
request,
|
|
14320
|
-
(value) =>
|
|
14359
|
+
(value) => z62.parse(MultiAttachParams$outboundSchema, value),
|
|
14321
14360
|
"Input validation failed"
|
|
14322
14361
|
);
|
|
14323
14362
|
if (!parsed.ok) {
|
|
@@ -14384,7 +14423,7 @@ async function $do9(client, request, options) {
|
|
|
14384
14423
|
}
|
|
14385
14424
|
|
|
14386
14425
|
// ../sdk/src/funcs/billing-open-customer-portal.ts
|
|
14387
|
-
var
|
|
14426
|
+
var z63 = __toESM(require("zod/v4-mini"), 1);
|
|
14388
14427
|
function billingOpenCustomerPortal(client, request, options) {
|
|
14389
14428
|
return new APIPromise($do10(
|
|
14390
14429
|
client,
|
|
@@ -14395,7 +14434,7 @@ function billingOpenCustomerPortal(client, request, options) {
|
|
|
14395
14434
|
async function $do10(client, request, options) {
|
|
14396
14435
|
const parsed = safeParse(
|
|
14397
14436
|
request,
|
|
14398
|
-
(value) =>
|
|
14437
|
+
(value) => z63.parse(OpenCustomerPortalParams$outboundSchema, value),
|
|
14399
14438
|
"Input validation failed"
|
|
14400
14439
|
);
|
|
14401
14440
|
if (!parsed.ok) {
|
|
@@ -14462,7 +14501,7 @@ async function $do10(client, request, options) {
|
|
|
14462
14501
|
}
|
|
14463
14502
|
|
|
14464
14503
|
// ../sdk/src/funcs/billing-preview-attach.ts
|
|
14465
|
-
var
|
|
14504
|
+
var z64 = __toESM(require("zod/v4-mini"), 1);
|
|
14466
14505
|
function billingPreviewAttach(client, request, options) {
|
|
14467
14506
|
return new APIPromise($do11(
|
|
14468
14507
|
client,
|
|
@@ -14473,7 +14512,7 @@ function billingPreviewAttach(client, request, options) {
|
|
|
14473
14512
|
async function $do11(client, request, options) {
|
|
14474
14513
|
const parsed = safeParse(
|
|
14475
14514
|
request,
|
|
14476
|
-
(value) =>
|
|
14515
|
+
(value) => z64.parse(PreviewAttachParams$outboundSchema, value),
|
|
14477
14516
|
"Input validation failed"
|
|
14478
14517
|
);
|
|
14479
14518
|
if (!parsed.ok) {
|
|
@@ -14540,7 +14579,7 @@ async function $do11(client, request, options) {
|
|
|
14540
14579
|
}
|
|
14541
14580
|
|
|
14542
14581
|
// ../sdk/src/funcs/billing-preview-multi-attach.ts
|
|
14543
|
-
var
|
|
14582
|
+
var z65 = __toESM(require("zod/v4-mini"), 1);
|
|
14544
14583
|
function billingPreviewMultiAttach(client, request, options) {
|
|
14545
14584
|
return new APIPromise($do12(
|
|
14546
14585
|
client,
|
|
@@ -14551,7 +14590,7 @@ function billingPreviewMultiAttach(client, request, options) {
|
|
|
14551
14590
|
async function $do12(client, request, options) {
|
|
14552
14591
|
const parsed = safeParse(
|
|
14553
14592
|
request,
|
|
14554
|
-
(value) =>
|
|
14593
|
+
(value) => z65.parse(PreviewMultiAttachParams$outboundSchema, value),
|
|
14555
14594
|
"Input validation failed"
|
|
14556
14595
|
);
|
|
14557
14596
|
if (!parsed.ok) {
|
|
@@ -14618,7 +14657,7 @@ async function $do12(client, request, options) {
|
|
|
14618
14657
|
}
|
|
14619
14658
|
|
|
14620
14659
|
// ../sdk/src/funcs/billing-preview-update.ts
|
|
14621
|
-
var
|
|
14660
|
+
var z66 = __toESM(require("zod/v4-mini"), 1);
|
|
14622
14661
|
function billingPreviewUpdate(client, request, options) {
|
|
14623
14662
|
return new APIPromise($do13(
|
|
14624
14663
|
client,
|
|
@@ -14629,7 +14668,7 @@ function billingPreviewUpdate(client, request, options) {
|
|
|
14629
14668
|
async function $do13(client, request, options) {
|
|
14630
14669
|
const parsed = safeParse(
|
|
14631
14670
|
request,
|
|
14632
|
-
(value) =>
|
|
14671
|
+
(value) => z66.parse(PreviewUpdateParams$outboundSchema, value),
|
|
14633
14672
|
"Input validation failed"
|
|
14634
14673
|
);
|
|
14635
14674
|
if (!parsed.ok) {
|
|
@@ -14696,7 +14735,7 @@ async function $do13(client, request, options) {
|
|
|
14696
14735
|
}
|
|
14697
14736
|
|
|
14698
14737
|
// ../sdk/src/funcs/billing-setup-payment.ts
|
|
14699
|
-
var
|
|
14738
|
+
var z67 = __toESM(require("zod/v4-mini"), 1);
|
|
14700
14739
|
function billingSetupPayment(client, request, options) {
|
|
14701
14740
|
return new APIPromise($do14(
|
|
14702
14741
|
client,
|
|
@@ -14707,7 +14746,7 @@ function billingSetupPayment(client, request, options) {
|
|
|
14707
14746
|
async function $do14(client, request, options) {
|
|
14708
14747
|
const parsed = safeParse(
|
|
14709
14748
|
request,
|
|
14710
|
-
(value) =>
|
|
14749
|
+
(value) => z67.parse(SetupPaymentParams$outboundSchema, value),
|
|
14711
14750
|
"Input validation failed"
|
|
14712
14751
|
);
|
|
14713
14752
|
if (!parsed.ok) {
|
|
@@ -14774,7 +14813,7 @@ async function $do14(client, request, options) {
|
|
|
14774
14813
|
}
|
|
14775
14814
|
|
|
14776
14815
|
// ../sdk/src/funcs/billing-update.ts
|
|
14777
|
-
var
|
|
14816
|
+
var z68 = __toESM(require("zod/v4-mini"), 1);
|
|
14778
14817
|
function billingUpdate(client, request, options) {
|
|
14779
14818
|
return new APIPromise($do15(
|
|
14780
14819
|
client,
|
|
@@ -14785,7 +14824,7 @@ function billingUpdate(client, request, options) {
|
|
|
14785
14824
|
async function $do15(client, request, options) {
|
|
14786
14825
|
const parsed = safeParse(
|
|
14787
14826
|
request,
|
|
14788
|
-
(value) =>
|
|
14827
|
+
(value) => z68.parse(UpdateSubscriptionParams$outboundSchema, value),
|
|
14789
14828
|
"Input validation failed"
|
|
14790
14829
|
);
|
|
14791
14830
|
if (!parsed.ok) {
|
|
@@ -14920,7 +14959,7 @@ var Billing = class extends ClientSDK {
|
|
|
14920
14959
|
* @example
|
|
14921
14960
|
* ```typescript
|
|
14922
14961
|
* // Schedule a transition from a trial plan to a paid plan
|
|
14923
|
-
* const response = await client.billing.createSchedule({ customerId: "cus_123", phases: [{"startsAt":
|
|
14962
|
+
* const response = await client.billing.createSchedule({ customerId: "cus_123", phases: [{"startsAt":1779303143711,"plans":[{"planId":"trial_plan"}]},{"startsAt":1780512743711,"plans":[{"planId":"pro_plan"}]}] });
|
|
14924
14963
|
* ```
|
|
14925
14964
|
*
|
|
14926
14965
|
* @param customerId - The ID of the customer to create the schedule for.
|
|
@@ -15173,7 +15212,7 @@ var Billing = class extends ClientSDK {
|
|
|
15173
15212
|
};
|
|
15174
15213
|
|
|
15175
15214
|
// ../sdk/src/funcs/customers-delete.ts
|
|
15176
|
-
var
|
|
15215
|
+
var z69 = __toESM(require("zod/v4-mini"), 1);
|
|
15177
15216
|
function customersDelete(client, request, options) {
|
|
15178
15217
|
return new APIPromise($do16(
|
|
15179
15218
|
client,
|
|
@@ -15184,7 +15223,7 @@ function customersDelete(client, request, options) {
|
|
|
15184
15223
|
async function $do16(client, request, options) {
|
|
15185
15224
|
const parsed = safeParse(
|
|
15186
15225
|
request,
|
|
15187
|
-
(value) =>
|
|
15226
|
+
(value) => z69.parse(DeleteCustomerParams$outboundSchema, value),
|
|
15188
15227
|
"Input validation failed"
|
|
15189
15228
|
);
|
|
15190
15229
|
if (!parsed.ok) {
|
|
@@ -15251,7 +15290,7 @@ async function $do16(client, request, options) {
|
|
|
15251
15290
|
}
|
|
15252
15291
|
|
|
15253
15292
|
// ../sdk/src/funcs/customers-get-or-create.ts
|
|
15254
|
-
var
|
|
15293
|
+
var z70 = __toESM(require("zod/v4-mini"), 1);
|
|
15255
15294
|
function customersGetOrCreate(client, request, options) {
|
|
15256
15295
|
return new APIPromise($do17(
|
|
15257
15296
|
client,
|
|
@@ -15262,7 +15301,7 @@ function customersGetOrCreate(client, request, options) {
|
|
|
15262
15301
|
async function $do17(client, request, options) {
|
|
15263
15302
|
const parsed = safeParse(
|
|
15264
15303
|
request,
|
|
15265
|
-
(value) =>
|
|
15304
|
+
(value) => z70.parse(GetOrCreateCustomerParams$outboundSchema, value),
|
|
15266
15305
|
"Input validation failed"
|
|
15267
15306
|
);
|
|
15268
15307
|
if (!parsed.ok) {
|
|
@@ -15329,7 +15368,7 @@ async function $do17(client, request, options) {
|
|
|
15329
15368
|
}
|
|
15330
15369
|
|
|
15331
15370
|
// ../sdk/src/funcs/customers-get.ts
|
|
15332
|
-
var
|
|
15371
|
+
var z71 = __toESM(require("zod/v4-mini"), 1);
|
|
15333
15372
|
function customersGet(client, request, options) {
|
|
15334
15373
|
return new APIPromise($do18(
|
|
15335
15374
|
client,
|
|
@@ -15340,7 +15379,7 @@ function customersGet(client, request, options) {
|
|
|
15340
15379
|
async function $do18(client, request, options) {
|
|
15341
15380
|
const parsed = safeParse(
|
|
15342
15381
|
request,
|
|
15343
|
-
(value) =>
|
|
15382
|
+
(value) => z71.parse(GetCustomerParams$outboundSchema, value),
|
|
15344
15383
|
"Input validation failed"
|
|
15345
15384
|
);
|
|
15346
15385
|
if (!parsed.ok) {
|
|
@@ -15407,7 +15446,7 @@ async function $do18(client, request, options) {
|
|
|
15407
15446
|
}
|
|
15408
15447
|
|
|
15409
15448
|
// ../sdk/src/funcs/customers-list.ts
|
|
15410
|
-
var
|
|
15449
|
+
var z72 = __toESM(require("zod/v4-mini"), 1);
|
|
15411
15450
|
function customersList(client, request, options) {
|
|
15412
15451
|
return new APIPromise($do19(
|
|
15413
15452
|
client,
|
|
@@ -15418,7 +15457,7 @@ function customersList(client, request, options) {
|
|
|
15418
15457
|
async function $do19(client, request, options) {
|
|
15419
15458
|
const parsed = safeParse(
|
|
15420
15459
|
request,
|
|
15421
|
-
(value) =>
|
|
15460
|
+
(value) => z72.parse(ListCustomersParams$outboundSchema, value),
|
|
15422
15461
|
"Input validation failed"
|
|
15423
15462
|
);
|
|
15424
15463
|
if (!parsed.ok) {
|
|
@@ -15485,7 +15524,7 @@ async function $do19(client, request, options) {
|
|
|
15485
15524
|
}
|
|
15486
15525
|
|
|
15487
15526
|
// ../sdk/src/funcs/customers-update.ts
|
|
15488
|
-
var
|
|
15527
|
+
var z73 = __toESM(require("zod/v4-mini"), 1);
|
|
15489
15528
|
function customersUpdate(client, request, options) {
|
|
15490
15529
|
return new APIPromise($do20(
|
|
15491
15530
|
client,
|
|
@@ -15496,7 +15535,7 @@ function customersUpdate(client, request, options) {
|
|
|
15496
15535
|
async function $do20(client, request, options) {
|
|
15497
15536
|
const parsed = safeParse(
|
|
15498
15537
|
request,
|
|
15499
|
-
(value) =>
|
|
15538
|
+
(value) => z73.parse(UpdateCustomerParams$outboundSchema, value),
|
|
15500
15539
|
"Input validation failed"
|
|
15501
15540
|
);
|
|
15502
15541
|
if (!parsed.ok) {
|
|
@@ -15655,7 +15694,7 @@ var Customers = class extends ClientSDK {
|
|
|
15655
15694
|
};
|
|
15656
15695
|
|
|
15657
15696
|
// ../sdk/src/funcs/entities-create.ts
|
|
15658
|
-
var
|
|
15697
|
+
var z74 = __toESM(require("zod/v4-mini"), 1);
|
|
15659
15698
|
function entitiesCreate(client, request, options) {
|
|
15660
15699
|
return new APIPromise($do21(
|
|
15661
15700
|
client,
|
|
@@ -15666,7 +15705,7 @@ function entitiesCreate(client, request, options) {
|
|
|
15666
15705
|
async function $do21(client, request, options) {
|
|
15667
15706
|
const parsed = safeParse(
|
|
15668
15707
|
request,
|
|
15669
|
-
(value) =>
|
|
15708
|
+
(value) => z74.parse(CreateEntityParams$outboundSchema, value),
|
|
15670
15709
|
"Input validation failed"
|
|
15671
15710
|
);
|
|
15672
15711
|
if (!parsed.ok) {
|
|
@@ -15733,7 +15772,7 @@ async function $do21(client, request, options) {
|
|
|
15733
15772
|
}
|
|
15734
15773
|
|
|
15735
15774
|
// ../sdk/src/funcs/entities-delete.ts
|
|
15736
|
-
var
|
|
15775
|
+
var z75 = __toESM(require("zod/v4-mini"), 1);
|
|
15737
15776
|
function entitiesDelete(client, request, options) {
|
|
15738
15777
|
return new APIPromise($do22(
|
|
15739
15778
|
client,
|
|
@@ -15744,7 +15783,7 @@ function entitiesDelete(client, request, options) {
|
|
|
15744
15783
|
async function $do22(client, request, options) {
|
|
15745
15784
|
const parsed = safeParse(
|
|
15746
15785
|
request,
|
|
15747
|
-
(value) =>
|
|
15786
|
+
(value) => z75.parse(DeleteEntityParams$outboundSchema, value),
|
|
15748
15787
|
"Input validation failed"
|
|
15749
15788
|
);
|
|
15750
15789
|
if (!parsed.ok) {
|
|
@@ -15811,7 +15850,7 @@ async function $do22(client, request, options) {
|
|
|
15811
15850
|
}
|
|
15812
15851
|
|
|
15813
15852
|
// ../sdk/src/funcs/entities-get.ts
|
|
15814
|
-
var
|
|
15853
|
+
var z76 = __toESM(require("zod/v4-mini"), 1);
|
|
15815
15854
|
function entitiesGet(client, request, options) {
|
|
15816
15855
|
return new APIPromise($do23(
|
|
15817
15856
|
client,
|
|
@@ -15822,7 +15861,7 @@ function entitiesGet(client, request, options) {
|
|
|
15822
15861
|
async function $do23(client, request, options) {
|
|
15823
15862
|
const parsed = safeParse(
|
|
15824
15863
|
request,
|
|
15825
|
-
(value) =>
|
|
15864
|
+
(value) => z76.parse(GetEntityParams$outboundSchema, value),
|
|
15826
15865
|
"Input validation failed"
|
|
15827
15866
|
);
|
|
15828
15867
|
if (!parsed.ok) {
|
|
@@ -15889,7 +15928,7 @@ async function $do23(client, request, options) {
|
|
|
15889
15928
|
}
|
|
15890
15929
|
|
|
15891
15930
|
// ../sdk/src/funcs/entities-list.ts
|
|
15892
|
-
var
|
|
15931
|
+
var z77 = __toESM(require("zod/v4-mini"), 1);
|
|
15893
15932
|
function entitiesList(client, request, options) {
|
|
15894
15933
|
return new APIPromise($do24(
|
|
15895
15934
|
client,
|
|
@@ -15900,7 +15939,7 @@ function entitiesList(client, request, options) {
|
|
|
15900
15939
|
async function $do24(client, request, options) {
|
|
15901
15940
|
const parsed = safeParse(
|
|
15902
15941
|
request,
|
|
15903
|
-
(value) =>
|
|
15942
|
+
(value) => z77.parse(ListEntitiesParams$outboundSchema, value),
|
|
15904
15943
|
"Input validation failed"
|
|
15905
15944
|
);
|
|
15906
15945
|
if (!parsed.ok) {
|
|
@@ -15967,7 +16006,7 @@ async function $do24(client, request, options) {
|
|
|
15967
16006
|
}
|
|
15968
16007
|
|
|
15969
16008
|
// ../sdk/src/funcs/entities-update.ts
|
|
15970
|
-
var
|
|
16009
|
+
var z78 = __toESM(require("zod/v4-mini"), 1);
|
|
15971
16010
|
function entitiesUpdate(client, request, options) {
|
|
15972
16011
|
return new APIPromise($do25(
|
|
15973
16012
|
client,
|
|
@@ -15978,7 +16017,7 @@ function entitiesUpdate(client, request, options) {
|
|
|
15978
16017
|
async function $do25(client, request, options) {
|
|
15979
16018
|
const parsed = safeParse(
|
|
15980
16019
|
request,
|
|
15981
|
-
(value) =>
|
|
16020
|
+
(value) => z78.parse(UpdateEntityParams$outboundSchema, value),
|
|
15982
16021
|
"Input validation failed"
|
|
15983
16022
|
);
|
|
15984
16023
|
if (!parsed.ok) {
|
|
@@ -16191,7 +16230,7 @@ var Entities = class extends ClientSDK {
|
|
|
16191
16230
|
};
|
|
16192
16231
|
|
|
16193
16232
|
// ../sdk/src/funcs/events-aggregate.ts
|
|
16194
|
-
var
|
|
16233
|
+
var z79 = __toESM(require("zod/v4-mini"), 1);
|
|
16195
16234
|
function eventsAggregate(client, request, options) {
|
|
16196
16235
|
return new APIPromise($do26(
|
|
16197
16236
|
client,
|
|
@@ -16202,7 +16241,7 @@ function eventsAggregate(client, request, options) {
|
|
|
16202
16241
|
async function $do26(client, request, options) {
|
|
16203
16242
|
const parsed = safeParse(
|
|
16204
16243
|
request,
|
|
16205
|
-
(value) =>
|
|
16244
|
+
(value) => z79.parse(EventsAggregateParams$outboundSchema, value),
|
|
16206
16245
|
"Input validation failed"
|
|
16207
16246
|
);
|
|
16208
16247
|
if (!parsed.ok) {
|
|
@@ -16269,7 +16308,7 @@ async function $do26(client, request, options) {
|
|
|
16269
16308
|
}
|
|
16270
16309
|
|
|
16271
16310
|
// ../sdk/src/funcs/events-list.ts
|
|
16272
|
-
var
|
|
16311
|
+
var z80 = __toESM(require("zod/v4-mini"), 1);
|
|
16273
16312
|
function eventsList(client, request, options) {
|
|
16274
16313
|
return new APIPromise($do27(
|
|
16275
16314
|
client,
|
|
@@ -16280,7 +16319,7 @@ function eventsList(client, request, options) {
|
|
|
16280
16319
|
async function $do27(client, request, options) {
|
|
16281
16320
|
const parsed = safeParse(
|
|
16282
16321
|
request,
|
|
16283
|
-
(value) =>
|
|
16322
|
+
(value) => z80.parse(EventsListParams$outboundSchema, value),
|
|
16284
16323
|
"Input validation failed"
|
|
16285
16324
|
);
|
|
16286
16325
|
if (!parsed.ok) {
|
|
@@ -16371,7 +16410,7 @@ var Events = class extends ClientSDK {
|
|
|
16371
16410
|
};
|
|
16372
16411
|
|
|
16373
16412
|
// ../sdk/src/funcs/features-create.ts
|
|
16374
|
-
var
|
|
16413
|
+
var z81 = __toESM(require("zod/v4-mini"), 1);
|
|
16375
16414
|
function featuresCreate(client, request, options) {
|
|
16376
16415
|
return new APIPromise($do28(
|
|
16377
16416
|
client,
|
|
@@ -16382,7 +16421,7 @@ function featuresCreate(client, request, options) {
|
|
|
16382
16421
|
async function $do28(client, request, options) {
|
|
16383
16422
|
const parsed = safeParse(
|
|
16384
16423
|
request,
|
|
16385
|
-
(value) =>
|
|
16424
|
+
(value) => z81.parse(CreateFeatureParams$outboundSchema, value),
|
|
16386
16425
|
"Input validation failed"
|
|
16387
16426
|
);
|
|
16388
16427
|
if (!parsed.ok) {
|
|
@@ -16449,7 +16488,7 @@ async function $do28(client, request, options) {
|
|
|
16449
16488
|
}
|
|
16450
16489
|
|
|
16451
16490
|
// ../sdk/src/funcs/features-delete.ts
|
|
16452
|
-
var
|
|
16491
|
+
var z82 = __toESM(require("zod/v4-mini"), 1);
|
|
16453
16492
|
function featuresDelete(client, request, options) {
|
|
16454
16493
|
return new APIPromise($do29(
|
|
16455
16494
|
client,
|
|
@@ -16460,7 +16499,7 @@ function featuresDelete(client, request, options) {
|
|
|
16460
16499
|
async function $do29(client, request, options) {
|
|
16461
16500
|
const parsed = safeParse(
|
|
16462
16501
|
request,
|
|
16463
|
-
(value) =>
|
|
16502
|
+
(value) => z82.parse(DeleteFeatureParams$outboundSchema, value),
|
|
16464
16503
|
"Input validation failed"
|
|
16465
16504
|
);
|
|
16466
16505
|
if (!parsed.ok) {
|
|
@@ -16527,7 +16566,7 @@ async function $do29(client, request, options) {
|
|
|
16527
16566
|
}
|
|
16528
16567
|
|
|
16529
16568
|
// ../sdk/src/funcs/features-get.ts
|
|
16530
|
-
var
|
|
16569
|
+
var z83 = __toESM(require("zod/v4-mini"), 1);
|
|
16531
16570
|
function featuresGet(client, request, options) {
|
|
16532
16571
|
return new APIPromise($do30(
|
|
16533
16572
|
client,
|
|
@@ -16538,7 +16577,7 @@ function featuresGet(client, request, options) {
|
|
|
16538
16577
|
async function $do30(client, request, options) {
|
|
16539
16578
|
const parsed = safeParse(
|
|
16540
16579
|
request,
|
|
16541
|
-
(value) =>
|
|
16580
|
+
(value) => z83.parse(GetFeatureParams$outboundSchema, value),
|
|
16542
16581
|
"Input validation failed"
|
|
16543
16582
|
);
|
|
16544
16583
|
if (!parsed.ok) {
|
|
@@ -16670,7 +16709,7 @@ async function $do31(client, _request, options) {
|
|
|
16670
16709
|
}
|
|
16671
16710
|
|
|
16672
16711
|
// ../sdk/src/funcs/features-update.ts
|
|
16673
|
-
var
|
|
16712
|
+
var z84 = __toESM(require("zod/v4-mini"), 1);
|
|
16674
16713
|
function featuresUpdate(client, request, options) {
|
|
16675
16714
|
return new APIPromise($do32(
|
|
16676
16715
|
client,
|
|
@@ -16681,7 +16720,7 @@ function featuresUpdate(client, request, options) {
|
|
|
16681
16720
|
async function $do32(client, request, options) {
|
|
16682
16721
|
const parsed = safeParse(
|
|
16683
16722
|
request,
|
|
16684
|
-
(value) =>
|
|
16723
|
+
(value) => z84.parse(UpdateFeatureParams$outboundSchema, value),
|
|
16685
16724
|
"Input validation failed"
|
|
16686
16725
|
);
|
|
16687
16726
|
if (!parsed.ok) {
|
|
@@ -16884,7 +16923,7 @@ var Features = class extends ClientSDK {
|
|
|
16884
16923
|
};
|
|
16885
16924
|
|
|
16886
16925
|
// ../sdk/src/funcs/plans-create.ts
|
|
16887
|
-
var
|
|
16926
|
+
var z85 = __toESM(require("zod/v4-mini"), 1);
|
|
16888
16927
|
function plansCreate(client, request, options) {
|
|
16889
16928
|
return new APIPromise($do33(
|
|
16890
16929
|
client,
|
|
@@ -16895,7 +16934,7 @@ function plansCreate(client, request, options) {
|
|
|
16895
16934
|
async function $do33(client, request, options) {
|
|
16896
16935
|
const parsed = safeParse(
|
|
16897
16936
|
request,
|
|
16898
|
-
(value) =>
|
|
16937
|
+
(value) => z85.parse(CreatePlanParams$outboundSchema, value),
|
|
16899
16938
|
"Input validation failed"
|
|
16900
16939
|
);
|
|
16901
16940
|
if (!parsed.ok) {
|
|
@@ -16962,7 +17001,7 @@ async function $do33(client, request, options) {
|
|
|
16962
17001
|
}
|
|
16963
17002
|
|
|
16964
17003
|
// ../sdk/src/funcs/plans-delete.ts
|
|
16965
|
-
var
|
|
17004
|
+
var z86 = __toESM(require("zod/v4-mini"), 1);
|
|
16966
17005
|
function plansDelete(client, request, options) {
|
|
16967
17006
|
return new APIPromise($do34(
|
|
16968
17007
|
client,
|
|
@@ -16973,7 +17012,7 @@ function plansDelete(client, request, options) {
|
|
|
16973
17012
|
async function $do34(client, request, options) {
|
|
16974
17013
|
const parsed = safeParse(
|
|
16975
17014
|
request,
|
|
16976
|
-
(value) =>
|
|
17015
|
+
(value) => z86.parse(DeletePlanParams$outboundSchema, value),
|
|
16977
17016
|
"Input validation failed"
|
|
16978
17017
|
);
|
|
16979
17018
|
if (!parsed.ok) {
|
|
@@ -17040,7 +17079,7 @@ async function $do34(client, request, options) {
|
|
|
17040
17079
|
}
|
|
17041
17080
|
|
|
17042
17081
|
// ../sdk/src/funcs/plans-get.ts
|
|
17043
|
-
var
|
|
17082
|
+
var z87 = __toESM(require("zod/v4-mini"), 1);
|
|
17044
17083
|
function plansGet(client, request, options) {
|
|
17045
17084
|
return new APIPromise($do35(
|
|
17046
17085
|
client,
|
|
@@ -17051,7 +17090,7 @@ function plansGet(client, request, options) {
|
|
|
17051
17090
|
async function $do35(client, request, options) {
|
|
17052
17091
|
const parsed = safeParse(
|
|
17053
17092
|
request,
|
|
17054
|
-
(value) =>
|
|
17093
|
+
(value) => z87.parse(GetPlanParams$outboundSchema, value),
|
|
17055
17094
|
"Input validation failed"
|
|
17056
17095
|
);
|
|
17057
17096
|
if (!parsed.ok) {
|
|
@@ -17118,7 +17157,7 @@ async function $do35(client, request, options) {
|
|
|
17118
17157
|
}
|
|
17119
17158
|
|
|
17120
17159
|
// ../sdk/src/funcs/plans-list.ts
|
|
17121
|
-
var
|
|
17160
|
+
var z88 = __toESM(require("zod/v4-mini"), 1);
|
|
17122
17161
|
function plansList(client, request, options) {
|
|
17123
17162
|
return new APIPromise($do36(
|
|
17124
17163
|
client,
|
|
@@ -17129,7 +17168,7 @@ function plansList(client, request, options) {
|
|
|
17129
17168
|
async function $do36(client, request, options) {
|
|
17130
17169
|
const parsed = safeParse(
|
|
17131
17170
|
request,
|
|
17132
|
-
(value) =>
|
|
17171
|
+
(value) => z88.parse(z88.optional(ListPlansParams$outboundSchema), value),
|
|
17133
17172
|
"Input validation failed"
|
|
17134
17173
|
);
|
|
17135
17174
|
if (!parsed.ok) {
|
|
@@ -17196,7 +17235,7 @@ async function $do36(client, request, options) {
|
|
|
17196
17235
|
}
|
|
17197
17236
|
|
|
17198
17237
|
// ../sdk/src/funcs/plans-update.ts
|
|
17199
|
-
var
|
|
17238
|
+
var z89 = __toESM(require("zod/v4-mini"), 1);
|
|
17200
17239
|
function plansUpdate(client, request, options) {
|
|
17201
17240
|
return new APIPromise($do37(
|
|
17202
17241
|
client,
|
|
@@ -17207,7 +17246,7 @@ function plansUpdate(client, request, options) {
|
|
|
17207
17246
|
async function $do37(client, request, options) {
|
|
17208
17247
|
const parsed = safeParse(
|
|
17209
17248
|
request,
|
|
17210
|
-
(value) =>
|
|
17249
|
+
(value) => z89.parse(UpdatePlanParams$outboundSchema, value),
|
|
17211
17250
|
"Input validation failed"
|
|
17212
17251
|
);
|
|
17213
17252
|
if (!parsed.ok) {
|
|
@@ -17506,7 +17545,7 @@ var Plans = class extends ClientSDK {
|
|
|
17506
17545
|
};
|
|
17507
17546
|
|
|
17508
17547
|
// ../sdk/src/funcs/referrals-create-code.ts
|
|
17509
|
-
var
|
|
17548
|
+
var z90 = __toESM(require("zod/v4-mini"), 1);
|
|
17510
17549
|
function referralsCreateCode(client, request, options) {
|
|
17511
17550
|
return new APIPromise($do38(
|
|
17512
17551
|
client,
|
|
@@ -17517,7 +17556,7 @@ function referralsCreateCode(client, request, options) {
|
|
|
17517
17556
|
async function $do38(client, request, options) {
|
|
17518
17557
|
const parsed = safeParse(
|
|
17519
17558
|
request,
|
|
17520
|
-
(value) =>
|
|
17559
|
+
(value) => z90.parse(CreateReferralCodeParams$outboundSchema, value),
|
|
17521
17560
|
"Input validation failed"
|
|
17522
17561
|
);
|
|
17523
17562
|
if (!parsed.ok) {
|
|
@@ -17584,7 +17623,7 @@ async function $do38(client, request, options) {
|
|
|
17584
17623
|
}
|
|
17585
17624
|
|
|
17586
17625
|
// ../sdk/src/funcs/referrals-redeem-code.ts
|
|
17587
|
-
var
|
|
17626
|
+
var z91 = __toESM(require("zod/v4-mini"), 1);
|
|
17588
17627
|
function referralsRedeemCode(client, request, options) {
|
|
17589
17628
|
return new APIPromise($do39(
|
|
17590
17629
|
client,
|
|
@@ -17595,7 +17634,7 @@ function referralsRedeemCode(client, request, options) {
|
|
|
17595
17634
|
async function $do39(client, request, options) {
|
|
17596
17635
|
const parsed = safeParse(
|
|
17597
17636
|
request,
|
|
17598
|
-
(value) =>
|
|
17637
|
+
(value) => z91.parse(RedeemReferralCodeParams$outboundSchema, value),
|
|
17599
17638
|
"Input validation failed"
|
|
17600
17639
|
);
|
|
17601
17640
|
if (!parsed.ok) {
|
|
@@ -17685,6 +17724,98 @@ var Referrals = class extends ClientSDK {
|
|
|
17685
17724
|
}
|
|
17686
17725
|
};
|
|
17687
17726
|
|
|
17727
|
+
// ../sdk/src/funcs/rewards-redeem-code.ts
|
|
17728
|
+
var z92 = __toESM(require("zod/v4-mini"), 1);
|
|
17729
|
+
function rewardsRedeemCode(client, request, options) {
|
|
17730
|
+
return new APIPromise($do40(
|
|
17731
|
+
client,
|
|
17732
|
+
request,
|
|
17733
|
+
options
|
|
17734
|
+
));
|
|
17735
|
+
}
|
|
17736
|
+
async function $do40(client, request, options) {
|
|
17737
|
+
const parsed = safeParse(
|
|
17738
|
+
request,
|
|
17739
|
+
(value) => z92.parse(RedeemRewardCodeParams$outboundSchema, value),
|
|
17740
|
+
"Input validation failed"
|
|
17741
|
+
);
|
|
17742
|
+
if (!parsed.ok) {
|
|
17743
|
+
return [parsed, { status: "invalid" }];
|
|
17744
|
+
}
|
|
17745
|
+
const payload = parsed.value;
|
|
17746
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
17747
|
+
const path = pathToFunc("/v1/rewards.redeem")();
|
|
17748
|
+
const headers = new Headers(compactMap({
|
|
17749
|
+
"Content-Type": "application/json",
|
|
17750
|
+
Accept: "application/json",
|
|
17751
|
+
"x-api-version": encodeSimple(
|
|
17752
|
+
"x-api-version",
|
|
17753
|
+
client._options.xApiVersion,
|
|
17754
|
+
{ explode: false, charEncoding: "none" }
|
|
17755
|
+
)
|
|
17756
|
+
}));
|
|
17757
|
+
const secConfig = await extractSecurity(client._options.secretKey);
|
|
17758
|
+
const securityInput = secConfig == null ? {} : { secretKey: secConfig };
|
|
17759
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
17760
|
+
const context = {
|
|
17761
|
+
options: client._options,
|
|
17762
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
17763
|
+
operationID: "redeemRewardCode",
|
|
17764
|
+
oAuth2Scopes: null,
|
|
17765
|
+
resolvedSecurity: requestSecurity,
|
|
17766
|
+
securitySource: client._options.secretKey,
|
|
17767
|
+
retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
|
|
17768
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
|
|
17769
|
+
};
|
|
17770
|
+
const requestRes = client._createRequest(context, {
|
|
17771
|
+
security: requestSecurity,
|
|
17772
|
+
method: "POST",
|
|
17773
|
+
baseURL: options?.serverURL,
|
|
17774
|
+
path,
|
|
17775
|
+
headers,
|
|
17776
|
+
body,
|
|
17777
|
+
userAgent: client._options.userAgent,
|
|
17778
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
|
|
17779
|
+
}, options);
|
|
17780
|
+
if (!requestRes.ok) {
|
|
17781
|
+
return [requestRes, { status: "invalid" }];
|
|
17782
|
+
}
|
|
17783
|
+
const req = requestRes.value;
|
|
17784
|
+
const doResult = await client._do(req, {
|
|
17785
|
+
context,
|
|
17786
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
17787
|
+
retryConfig: context.retryConfig,
|
|
17788
|
+
retryCodes: context.retryCodes
|
|
17789
|
+
});
|
|
17790
|
+
if (!doResult.ok) {
|
|
17791
|
+
return [doResult, { status: "request-error", request: req }];
|
|
17792
|
+
}
|
|
17793
|
+
const response = doResult.value;
|
|
17794
|
+
const [result] = await match(
|
|
17795
|
+
json(200, RedeemRewardCodeResponse$inboundSchema),
|
|
17796
|
+
fail("4XX"),
|
|
17797
|
+
fail("5XX")
|
|
17798
|
+
)(response, req);
|
|
17799
|
+
if (!result.ok) {
|
|
17800
|
+
return [result, { status: "complete", request: req, response }];
|
|
17801
|
+
}
|
|
17802
|
+
return [result, { status: "complete", request: req, response }];
|
|
17803
|
+
}
|
|
17804
|
+
|
|
17805
|
+
// ../sdk/src/sdk/rewards.ts
|
|
17806
|
+
var Rewards = class extends ClientSDK {
|
|
17807
|
+
/**
|
|
17808
|
+
* Redeem a reward promo code for a customer.
|
|
17809
|
+
*/
|
|
17810
|
+
async redeemCode(request, options) {
|
|
17811
|
+
return unwrapAsync(rewardsRedeemCode(
|
|
17812
|
+
this,
|
|
17813
|
+
request,
|
|
17814
|
+
options
|
|
17815
|
+
));
|
|
17816
|
+
}
|
|
17817
|
+
};
|
|
17818
|
+
|
|
17688
17819
|
// ../sdk/src/sdk/sdk.ts
|
|
17689
17820
|
var Autumn = class extends ClientSDK {
|
|
17690
17821
|
_customers;
|
|
@@ -17719,6 +17850,10 @@ var Autumn = class extends ClientSDK {
|
|
|
17719
17850
|
get referrals() {
|
|
17720
17851
|
return this._referrals ??= new Referrals(this._options);
|
|
17721
17852
|
}
|
|
17853
|
+
_rewards;
|
|
17854
|
+
get rewards() {
|
|
17855
|
+
return this._rewards ??= new Rewards(this._options);
|
|
17856
|
+
}
|
|
17722
17857
|
/**
|
|
17723
17858
|
* Checks whether a customer currently has enough balance to use a feature.
|
|
17724
17859
|
*
|