autumn-js 1.2.2 → 1.2.3
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.d.mts +1 -1
- package/dist/backend/adapters/express.d.ts +1 -1
- package/dist/backend/adapters/express.js +333 -29
- package/dist/backend/adapters/express.mjs +9 -9
- package/dist/backend/adapters/fetch.d.mts +1 -1
- package/dist/backend/adapters/fetch.d.ts +1 -1
- package/dist/backend/adapters/fetch.js +333 -29
- package/dist/backend/adapters/fetch.mjs +9 -9
- package/dist/backend/adapters/hono.d.mts +1 -1
- package/dist/backend/adapters/hono.d.ts +1 -1
- package/dist/backend/adapters/hono.js +333 -29
- package/dist/backend/adapters/hono.mjs +9 -9
- package/dist/backend/adapters/index.d.mts +1 -1
- package/dist/backend/adapters/index.d.ts +1 -1
- package/dist/backend/adapters/index.js +333 -29
- package/dist/backend/adapters/index.mjs +12 -12
- package/dist/backend/adapters/next.d.mts +1 -1
- package/dist/backend/adapters/next.d.ts +1 -1
- package/dist/backend/adapters/next.js +333 -29
- package/dist/backend/adapters/next.mjs +9 -9
- package/dist/backend/{authTypes-BCoyMOAj.d.mts → authTypes-B5VxPaMo.d.mts} +14 -0
- package/dist/backend/{authTypes-BCoyMOAj.d.ts → authTypes-B5VxPaMo.d.ts} +14 -0
- package/dist/backend/{chunk-C5ZDQJPP.mjs → chunk-2YEMC57K.mjs} +1 -1
- package/dist/backend/{chunk-6BVI5XZX.mjs → chunk-CCEZMERA.mjs} +277 -24
- package/dist/backend/{chunk-GLPHS5KF.mjs → chunk-ETHQSA52.mjs} +7 -7
- package/dist/backend/{chunk-OB47KG2H.mjs → chunk-FRKRWJ5S.mjs} +1 -1
- package/dist/backend/{chunk-GENKYO6B.mjs → chunk-IFFSWLXT.mjs} +1 -1
- package/dist/backend/{chunk-SX3CNUF5.mjs → chunk-IUFWKMTJ.mjs} +1 -1
- package/dist/backend/{chunk-XU4OGYDV.mjs → chunk-N62MDT7U.mjs} +56 -5
- package/dist/backend/{chunk-3QNAZFQH.mjs → chunk-OLHAIHAX.mjs} +5 -5
- package/dist/backend/core/handlers/coreHandler.d.mts +2 -2
- package/dist/backend/core/handlers/coreHandler.d.ts +2 -2
- package/dist/backend/core/handlers/coreHandler.js +333 -29
- package/dist/backend/core/handlers/coreHandler.mjs +7 -7
- package/dist/backend/core/handlers/executeRoute.d.mts +2 -2
- package/dist/backend/core/handlers/executeRoute.d.ts +2 -2
- package/dist/backend/core/handlers/executeRoute.mjs +4 -4
- package/dist/backend/core/handlers/handleRouteByName.d.mts +1 -1
- package/dist/backend/core/handlers/handleRouteByName.d.ts +1 -1
- package/dist/backend/core/handlers/handleRouteByName.js +333 -29
- package/dist/backend/core/handlers/handleRouteByName.mjs +7 -7
- package/dist/backend/core/handlers/index.d.mts +2 -2
- package/dist/backend/core/handlers/index.d.ts +2 -2
- package/dist/backend/core/handlers/index.js +333 -29
- package/dist/backend/core/handlers/index.mjs +10 -10
- package/dist/backend/core/handlers/resolveIdentity.d.mts +1 -1
- package/dist/backend/core/handlers/resolveIdentity.d.ts +1 -1
- package/dist/backend/core/index.d.mts +2 -2
- package/dist/backend/core/index.d.ts +2 -2
- package/dist/backend/core/index.js +333 -29
- package/dist/backend/core/index.mjs +10 -10
- package/dist/backend/core/routes/index.d.mts +2 -2
- package/dist/backend/core/routes/index.d.ts +2 -2
- package/dist/backend/core/routes/index.js +56 -5
- package/dist/backend/core/routes/index.mjs +2 -2
- package/dist/backend/core/routes/routeBuilder.d.mts +2 -2
- package/dist/backend/core/routes/routeBuilder.d.ts +2 -2
- package/dist/backend/core/routes/routeConfigs.d.mts +2 -2
- package/dist/backend/core/routes/routeConfigs.d.ts +2 -2
- package/dist/backend/core/routes/routeConfigs.js +56 -5
- package/dist/backend/core/routes/routeConfigs.mjs +2 -2
- package/dist/backend/core/types/authTypes.d.mts +1 -1
- package/dist/backend/core/types/authTypes.d.ts +1 -1
- package/dist/backend/core/types/handlerTypes.d.mts +2 -2
- package/dist/backend/core/types/handlerTypes.d.ts +2 -2
- package/dist/backend/core/types/index.d.mts +2 -2
- package/dist/backend/core/types/index.d.ts +2 -2
- package/dist/backend/core/types/routeTypes.d.mts +2 -2
- package/dist/backend/core/types/routeTypes.d.ts +2 -2
- package/dist/backend/core/utils/index.mjs +3 -3
- package/dist/backend/index.d.mts +4 -4
- package/dist/backend/index.d.ts +4 -4
- package/dist/backend/index.js +333 -29
- package/dist/backend/index.mjs +10 -10
- package/dist/backend/{routeTypes-Che2nkqv.d.ts → routeTypes-BkSHRiCI.d.ts} +227 -2
- package/dist/backend/{routeTypes-RMeyKg5T.d.mts → routeTypes-C1hUtfD8.d.mts} +227 -2
- package/dist/better-auth/{chunk-6TAYCQUD.mjs → chunk-2PRVJULJ.mjs} +56 -5
- package/dist/better-auth/{chunk-5F3J4ZQQ.mjs → chunk-6J74ZVNY.mjs} +278 -25
- package/dist/better-auth/{chunk-IODRHT4E.mjs → chunk-IY7FPOWF.mjs} +1 -1
- package/dist/better-auth/index.js +333 -29
- package/dist/better-auth/index.mjs +3 -3
- package/dist/better-auth/types.d.mts +14 -0
- package/dist/better-auth/types.d.ts +14 -0
- package/dist/better-auth/utils/createAutumnEndpoint.js +56 -5
- package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
- package/dist/better-auth/utils/handleBetterAuthRoute.js +333 -29
- package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
- package/dist/better-auth/utils/index.js +333 -29
- package/dist/better-auth/utils/index.mjs +3 -3
- package/dist/react/AutumnContext.d.mts +3 -3
- package/dist/react/AutumnContext.d.ts +3 -3
- package/dist/react/client/AutumnClient.d.mts +3 -3
- package/dist/react/client/AutumnClient.d.ts +3 -3
- package/dist/react/client/IAutumnClient.d.mts +7 -3
- package/dist/react/client/IAutumnClient.d.ts +7 -3
- package/dist/react/client/index.d.mts +3 -3
- package/dist/react/client/index.d.ts +3 -3
- package/dist/react/{customer-CNvpHhpS.d.mts → customer-Bb7J-_p_.d.mts} +15 -1
- package/dist/react/{customer-CMAtwbJl.d.ts → customer-CJSDgQMF.d.ts} +15 -1
- package/dist/react/hooks/index.d.mts +3 -3
- package/dist/react/hooks/index.d.ts +3 -3
- package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +2 -2
- package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +2 -2
- package/dist/react/hooks/internal/check/customerToFeatures.d.mts +2 -2
- package/dist/react/hooks/internal/check/customerToFeatures.d.ts +2 -2
- package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +2 -2
- package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +2 -2
- package/dist/react/hooks/internal/check/getCreditCost.d.mts +2 -2
- package/dist/react/hooks/internal/check/getCreditCost.d.ts +2 -2
- package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +3 -3
- package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +3 -3
- package/dist/react/hooks/internal/useCustomerActions.d.mts +3 -3
- package/dist/react/hooks/internal/useCustomerActions.d.ts +3 -3
- package/dist/react/hooks/useAggregateEvents.d.mts +2 -2
- package/dist/react/hooks/useAggregateEvents.d.ts +2 -2
- package/dist/react/hooks/useCustomer.d.mts +3 -3
- package/dist/react/hooks/useCustomer.d.ts +3 -3
- package/dist/react/hooks/useEntity.d.mts +2 -2
- package/dist/react/hooks/useEntity.d.ts +2 -2
- package/dist/react/hooks/useListEvents.d.mts +2 -2
- package/dist/react/hooks/useListEvents.d.ts +2 -2
- package/dist/react/hooks/useListPlans.d.mts +2 -2
- package/dist/react/hooks/useListPlans.d.ts +2 -2
- package/dist/react/hooks/useReferrals.d.mts +2 -2
- package/dist/react/hooks/useReferrals.d.ts +2 -2
- package/dist/react/index.d.mts +3 -3
- package/dist/react/index.d.ts +3 -3
- package/dist/react/{params-CnOvYjqJ.d.ts → params-CheyAQ0-.d.mts} +87 -2
- package/dist/react/{params-Cdkj83CV.d.mts → params-yCtJ7lOA.d.ts} +87 -2
- package/dist/react/{plan-BoMslu_O.d.mts → plan-CqxFGNk2.d.mts} +4 -0
- package/dist/react/{plan-BoMslu_O.d.ts → plan-CqxFGNk2.d.ts} +4 -0
- package/dist/sdk/index.d.mts +333 -4
- package/dist/sdk/index.d.ts +333 -4
- package/dist/sdk/index.js +382 -24
- package/dist/sdk/index.mjs +357 -25
- package/package.json +1 -1
- package/dist/backend/{chunk-55C2WWXQ.mjs → chunk-S5HPMJ4U.mjs} +3 -3
|
@@ -898,8 +898,8 @@ function applyBearer(state, spec) {
|
|
|
898
898
|
state.headers[spec.fieldName] = value;
|
|
899
899
|
}
|
|
900
900
|
}
|
|
901
|
-
function resolveGlobalSecurity(security) {
|
|
902
|
-
|
|
901
|
+
function resolveGlobalSecurity(security, allowedFields) {
|
|
902
|
+
let inputs = [
|
|
903
903
|
[
|
|
904
904
|
{
|
|
905
905
|
fieldName: "Authorization",
|
|
@@ -907,7 +907,16 @@ function resolveGlobalSecurity(security) {
|
|
|
907
907
|
value: security?.secretKey ?? env().AUTUMN_SECRET_KEY
|
|
908
908
|
}
|
|
909
909
|
]
|
|
910
|
-
|
|
910
|
+
];
|
|
911
|
+
if (allowedFields) {
|
|
912
|
+
inputs = allowedFields.map((i) => {
|
|
913
|
+
if (i < 0 || i >= inputs.length) {
|
|
914
|
+
throw new RangeError(`invalid allowedFields index ${i}`);
|
|
915
|
+
}
|
|
916
|
+
return inputs[i];
|
|
917
|
+
});
|
|
918
|
+
}
|
|
919
|
+
return resolveSecurity(...inputs);
|
|
911
920
|
}
|
|
912
921
|
async function extractSecurity(sec) {
|
|
913
922
|
if (sec == null) {
|
|
@@ -1474,11 +1483,13 @@ var AttachExpiryDurationType$outboundSchema = z10.enum(AttachExpiryDurationType)
|
|
|
1474
1483
|
var AttachRollover$outboundSchema = z10.pipe(
|
|
1475
1484
|
z10.object({
|
|
1476
1485
|
max: z10.optional(z10.number()),
|
|
1486
|
+
maxPercentage: z10.optional(z10.number()),
|
|
1477
1487
|
expiryDurationType: AttachExpiryDurationType$outboundSchema,
|
|
1478
1488
|
expiryDurationLength: z10.optional(z10.number())
|
|
1479
1489
|
}),
|
|
1480
1490
|
z10.transform((v) => {
|
|
1481
1491
|
return remap(v, {
|
|
1492
|
+
maxPercentage: "max_percentage",
|
|
1482
1493
|
expiryDurationType: "expiry_duration_type",
|
|
1483
1494
|
expiryDurationLength: "expiry_duration_length"
|
|
1484
1495
|
});
|
|
@@ -2003,11 +2014,13 @@ var BillingUpdateExpiryDurationType$outboundSchema = z12.enum(BillingUpdateExpir
|
|
|
2003
2014
|
var BillingUpdateRollover$outboundSchema = z12.pipe(
|
|
2004
2015
|
z12.object({
|
|
2005
2016
|
max: z12.optional(z12.number()),
|
|
2017
|
+
maxPercentage: z12.optional(z12.number()),
|
|
2006
2018
|
expiryDurationType: BillingUpdateExpiryDurationType$outboundSchema,
|
|
2007
2019
|
expiryDurationLength: z12.optional(z12.number())
|
|
2008
2020
|
}),
|
|
2009
2021
|
z12.transform((v) => {
|
|
2010
2022
|
return remap(v, {
|
|
2023
|
+
maxPercentage: "max_percentage",
|
|
2011
2024
|
expiryDurationType: "expiry_duration_type",
|
|
2012
2025
|
expiryDurationLength: "expiry_duration_length"
|
|
2013
2026
|
});
|
|
@@ -2349,11 +2362,19 @@ var ProductDisplay$inboundSchema = z13.pipe(
|
|
|
2349
2362
|
})
|
|
2350
2363
|
);
|
|
2351
2364
|
var RolloverDuration$inboundSchema = inboundSchema(RolloverDuration);
|
|
2352
|
-
var CheckRollover$inboundSchema = z13.
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2365
|
+
var CheckRollover$inboundSchema = z13.pipe(
|
|
2366
|
+
z13.object({
|
|
2367
|
+
max: z13.optional(z13.nullable(number2())),
|
|
2368
|
+
max_percentage: z13.optional(z13.nullable(number2())),
|
|
2369
|
+
duration: z13._default(RolloverDuration$inboundSchema, "month"),
|
|
2370
|
+
length: number2()
|
|
2371
|
+
}),
|
|
2372
|
+
z13.transform((v) => {
|
|
2373
|
+
return remap(v, {
|
|
2374
|
+
"max_percentage": "maxPercentage"
|
|
2375
|
+
});
|
|
2376
|
+
})
|
|
2377
|
+
);
|
|
2357
2378
|
var CheckOnIncrease$inboundSchema = inboundSchema(CheckOnIncrease);
|
|
2358
2379
|
var CheckOnDecrease$inboundSchema = inboundSchema(CheckOnDecrease);
|
|
2359
2380
|
var Config$inboundSchema = z13.pipe(
|
|
@@ -2630,6 +2651,17 @@ var CustomerDataUsageAlert$outboundSchema = z15.pipe(
|
|
|
2630
2651
|
});
|
|
2631
2652
|
})
|
|
2632
2653
|
);
|
|
2654
|
+
var CustomerDataOverageAllowed$outboundSchema = z15.pipe(
|
|
2655
|
+
z15.object({
|
|
2656
|
+
featureId: z15.string(),
|
|
2657
|
+
enabled: z15._default(z15.boolean(), false)
|
|
2658
|
+
}),
|
|
2659
|
+
z15.transform((v) => {
|
|
2660
|
+
return remap(v, {
|
|
2661
|
+
featureId: "feature_id"
|
|
2662
|
+
});
|
|
2663
|
+
})
|
|
2664
|
+
);
|
|
2633
2665
|
var CustomerDataBillingControls$outboundSchema = z15.pipe(
|
|
2634
2666
|
z15.object({
|
|
2635
2667
|
autoTopups: z15.optional(
|
|
@@ -2640,13 +2672,17 @@ var CustomerDataBillingControls$outboundSchema = z15.pipe(
|
|
|
2640
2672
|
),
|
|
2641
2673
|
usageAlerts: z15.optional(
|
|
2642
2674
|
z15.array(z15.lazy(() => CustomerDataUsageAlert$outboundSchema))
|
|
2675
|
+
),
|
|
2676
|
+
overageAllowed: z15.optional(
|
|
2677
|
+
z15.array(z15.lazy(() => CustomerDataOverageAllowed$outboundSchema))
|
|
2643
2678
|
)
|
|
2644
2679
|
}),
|
|
2645
2680
|
z15.transform((v) => {
|
|
2646
2681
|
return remap(v, {
|
|
2647
2682
|
autoTopups: "auto_topups",
|
|
2648
2683
|
spendLimits: "spend_limits",
|
|
2649
|
-
usageAlerts: "usage_alerts"
|
|
2684
|
+
usageAlerts: "usage_alerts",
|
|
2685
|
+
overageAllowed: "overage_allowed"
|
|
2650
2686
|
});
|
|
2651
2687
|
})
|
|
2652
2688
|
);
|
|
@@ -2857,11 +2893,13 @@ var ExpiryDurationType$inboundSchema = inboundSchema(ExpiryDurationType);
|
|
|
2857
2893
|
var PlanRollover$inboundSchema = z16.pipe(
|
|
2858
2894
|
z16.object({
|
|
2859
2895
|
max: nullable(number2()),
|
|
2896
|
+
max_percentage: z16.optional(z16.nullable(number2())),
|
|
2860
2897
|
expiry_duration_type: ExpiryDurationType$inboundSchema,
|
|
2861
2898
|
expiry_duration_length: optional2(number2())
|
|
2862
2899
|
}),
|
|
2863
2900
|
z16.transform((v) => {
|
|
2864
2901
|
return remap(v, {
|
|
2902
|
+
"max_percentage": "maxPercentage",
|
|
2865
2903
|
"expiry_duration_type": "expiryDurationType",
|
|
2866
2904
|
"expiry_duration_length": "expiryDurationLength"
|
|
2867
2905
|
});
|
|
@@ -3000,6 +3038,17 @@ var CreateEntityUsageAlertRequestBody$outboundSchema = z17.pipe(
|
|
|
3000
3038
|
});
|
|
3001
3039
|
})
|
|
3002
3040
|
);
|
|
3041
|
+
var CreateEntityOverageAllowedRequest$outboundSchema = z17.pipe(
|
|
3042
|
+
z17.object({
|
|
3043
|
+
featureId: z17.string(),
|
|
3044
|
+
enabled: z17._default(z17.boolean(), false)
|
|
3045
|
+
}),
|
|
3046
|
+
z17.transform((v) => {
|
|
3047
|
+
return remap(v, {
|
|
3048
|
+
featureId: "feature_id"
|
|
3049
|
+
});
|
|
3050
|
+
})
|
|
3051
|
+
);
|
|
3003
3052
|
var CreateEntityBillingControlsRequest$outboundSchema = z17.pipe(
|
|
3004
3053
|
z17.object({
|
|
3005
3054
|
spendLimits: z17.optional(
|
|
@@ -3007,12 +3056,16 @@ var CreateEntityBillingControlsRequest$outboundSchema = z17.pipe(
|
|
|
3007
3056
|
),
|
|
3008
3057
|
usageAlerts: z17.optional(
|
|
3009
3058
|
z17.array(z17.lazy(() => CreateEntityUsageAlertRequestBody$outboundSchema))
|
|
3059
|
+
),
|
|
3060
|
+
overageAllowed: z17.optional(
|
|
3061
|
+
z17.array(z17.lazy(() => CreateEntityOverageAllowedRequest$outboundSchema))
|
|
3010
3062
|
)
|
|
3011
3063
|
}),
|
|
3012
3064
|
z17.transform((v) => {
|
|
3013
3065
|
return remap(v, {
|
|
3014
3066
|
spendLimits: "spend_limits",
|
|
3015
|
-
usageAlerts: "usage_alerts"
|
|
3067
|
+
usageAlerts: "usage_alerts",
|
|
3068
|
+
overageAllowed: "overage_allowed"
|
|
3016
3069
|
});
|
|
3017
3070
|
})
|
|
3018
3071
|
);
|
|
@@ -3169,6 +3222,17 @@ var CreateEntityUsageAlertResponse$inboundSchema = z17.pipe(
|
|
|
3169
3222
|
});
|
|
3170
3223
|
})
|
|
3171
3224
|
);
|
|
3225
|
+
var CreateEntityOverageAllowedResponse$inboundSchema = z17.pipe(
|
|
3226
|
+
z17.object({
|
|
3227
|
+
feature_id: string4(),
|
|
3228
|
+
enabled: z17._default(boolean2(), false)
|
|
3229
|
+
}),
|
|
3230
|
+
z17.transform((v) => {
|
|
3231
|
+
return remap(v, {
|
|
3232
|
+
"feature_id": "featureId"
|
|
3233
|
+
});
|
|
3234
|
+
})
|
|
3235
|
+
);
|
|
3172
3236
|
var CreateEntityBillingControlsResponse$inboundSchema = z17.pipe(
|
|
3173
3237
|
z17.object({
|
|
3174
3238
|
spend_limits: optional2(
|
|
@@ -3176,12 +3240,16 @@ var CreateEntityBillingControlsResponse$inboundSchema = z17.pipe(
|
|
|
3176
3240
|
),
|
|
3177
3241
|
usage_alerts: optional2(
|
|
3178
3242
|
z17.array(z17.lazy(() => CreateEntityUsageAlertResponse$inboundSchema))
|
|
3243
|
+
),
|
|
3244
|
+
overage_allowed: optional2(
|
|
3245
|
+
z17.array(z17.lazy(() => CreateEntityOverageAllowedResponse$inboundSchema))
|
|
3179
3246
|
)
|
|
3180
3247
|
}),
|
|
3181
3248
|
z17.transform((v) => {
|
|
3182
3249
|
return remap(v, {
|
|
3183
3250
|
"spend_limits": "spendLimits",
|
|
3184
|
-
"usage_alerts": "usageAlerts"
|
|
3251
|
+
"usage_alerts": "usageAlerts",
|
|
3252
|
+
"overage_allowed": "overageAllowed"
|
|
3185
3253
|
});
|
|
3186
3254
|
})
|
|
3187
3255
|
);
|
|
@@ -3531,11 +3599,13 @@ var CreatePlanExpiryDurationTypeRequest$outboundSchema = z19.enum(CreatePlanExpi
|
|
|
3531
3599
|
var CreatePlanRolloverRequest$outboundSchema = z19.pipe(
|
|
3532
3600
|
z19.object({
|
|
3533
3601
|
max: z19.optional(z19.number()),
|
|
3602
|
+
maxPercentage: z19.optional(z19.number()),
|
|
3534
3603
|
expiryDurationType: CreatePlanExpiryDurationTypeRequest$outboundSchema,
|
|
3535
3604
|
expiryDurationLength: z19.optional(z19.number())
|
|
3536
3605
|
}),
|
|
3537
3606
|
z19.transform((v) => {
|
|
3538
3607
|
return remap(v, {
|
|
3608
|
+
maxPercentage: "max_percentage",
|
|
3539
3609
|
expiryDurationType: "expiry_duration_type",
|
|
3540
3610
|
expiryDurationLength: "expiry_duration_length"
|
|
3541
3611
|
});
|
|
@@ -3712,11 +3782,13 @@ var CreatePlanExpiryDurationTypeResponse$inboundSchema = inboundSchema(CreatePla
|
|
|
3712
3782
|
var CreatePlanRolloverResponse$inboundSchema = z19.pipe(
|
|
3713
3783
|
z19.object({
|
|
3714
3784
|
max: nullable(number2()),
|
|
3785
|
+
max_percentage: z19.optional(z19.nullable(number2())),
|
|
3715
3786
|
expiry_duration_type: CreatePlanExpiryDurationTypeResponse$inboundSchema,
|
|
3716
3787
|
expiry_duration_length: optional2(number2())
|
|
3717
3788
|
}),
|
|
3718
3789
|
z19.transform((v) => {
|
|
3719
3790
|
return remap(v, {
|
|
3791
|
+
"max_percentage": "maxPercentage",
|
|
3720
3792
|
"expiry_duration_type": "expiryDurationType",
|
|
3721
3793
|
"expiry_duration_length": "expiryDurationLength"
|
|
3722
3794
|
});
|
|
@@ -3938,6 +4010,17 @@ var CustomerUsageAlert$inboundSchema = z21.pipe(
|
|
|
3938
4010
|
});
|
|
3939
4011
|
})
|
|
3940
4012
|
);
|
|
4013
|
+
var CustomerOverageAllowed$inboundSchema = z21.pipe(
|
|
4014
|
+
z21.object({
|
|
4015
|
+
feature_id: string4(),
|
|
4016
|
+
enabled: z21._default(boolean2(), false)
|
|
4017
|
+
}),
|
|
4018
|
+
z21.transform((v) => {
|
|
4019
|
+
return remap(v, {
|
|
4020
|
+
"feature_id": "featureId"
|
|
4021
|
+
});
|
|
4022
|
+
})
|
|
4023
|
+
);
|
|
3941
4024
|
var CustomerBillingControls$inboundSchema = z21.pipe(
|
|
3942
4025
|
z21.object({
|
|
3943
4026
|
auto_topups: optional2(
|
|
@@ -3948,13 +4031,17 @@ var CustomerBillingControls$inboundSchema = z21.pipe(
|
|
|
3948
4031
|
),
|
|
3949
4032
|
usage_alerts: optional2(
|
|
3950
4033
|
z21.array(z21.lazy(() => CustomerUsageAlert$inboundSchema))
|
|
4034
|
+
),
|
|
4035
|
+
overage_allowed: optional2(
|
|
4036
|
+
z21.array(z21.lazy(() => CustomerOverageAllowed$inboundSchema))
|
|
3951
4037
|
)
|
|
3952
4038
|
}),
|
|
3953
4039
|
z21.transform((v) => {
|
|
3954
4040
|
return remap(v, {
|
|
3955
4041
|
"auto_topups": "autoTopups",
|
|
3956
4042
|
"spend_limits": "spendLimits",
|
|
3957
|
-
"usage_alerts": "usageAlerts"
|
|
4043
|
+
"usage_alerts": "usageAlerts",
|
|
4044
|
+
"overage_allowed": "overageAllowed"
|
|
3958
4045
|
});
|
|
3959
4046
|
})
|
|
3960
4047
|
);
|
|
@@ -4493,6 +4580,17 @@ var GetEntityUsageAlert$inboundSchema = z28.pipe(
|
|
|
4493
4580
|
});
|
|
4494
4581
|
})
|
|
4495
4582
|
);
|
|
4583
|
+
var GetEntityOverageAllowed$inboundSchema = z28.pipe(
|
|
4584
|
+
z28.object({
|
|
4585
|
+
feature_id: string4(),
|
|
4586
|
+
enabled: z28._default(boolean2(), false)
|
|
4587
|
+
}),
|
|
4588
|
+
z28.transform((v) => {
|
|
4589
|
+
return remap(v, {
|
|
4590
|
+
"feature_id": "featureId"
|
|
4591
|
+
});
|
|
4592
|
+
})
|
|
4593
|
+
);
|
|
4496
4594
|
var GetEntityBillingControls$inboundSchema = z28.pipe(
|
|
4497
4595
|
z28.object({
|
|
4498
4596
|
spend_limits: optional2(
|
|
@@ -4500,12 +4598,16 @@ var GetEntityBillingControls$inboundSchema = z28.pipe(
|
|
|
4500
4598
|
),
|
|
4501
4599
|
usage_alerts: optional2(
|
|
4502
4600
|
z28.array(z28.lazy(() => GetEntityUsageAlert$inboundSchema))
|
|
4601
|
+
),
|
|
4602
|
+
overage_allowed: optional2(
|
|
4603
|
+
z28.array(z28.lazy(() => GetEntityOverageAllowed$inboundSchema))
|
|
4503
4604
|
)
|
|
4504
4605
|
}),
|
|
4505
4606
|
z28.transform((v) => {
|
|
4506
4607
|
return remap(v, {
|
|
4507
4608
|
"spend_limits": "spendLimits",
|
|
4508
|
-
"usage_alerts": "usageAlerts"
|
|
4609
|
+
"usage_alerts": "usageAlerts",
|
|
4610
|
+
"overage_allowed": "overageAllowed"
|
|
4509
4611
|
});
|
|
4510
4612
|
})
|
|
4511
4613
|
);
|
|
@@ -4683,6 +4785,17 @@ var GetOrCreateCustomerUsageAlert$outboundSchema = z30.pipe(
|
|
|
4683
4785
|
});
|
|
4684
4786
|
})
|
|
4685
4787
|
);
|
|
4788
|
+
var GetOrCreateCustomerOverageAllowed$outboundSchema = z30.pipe(
|
|
4789
|
+
z30.object({
|
|
4790
|
+
featureId: z30.string(),
|
|
4791
|
+
enabled: z30._default(z30.boolean(), false)
|
|
4792
|
+
}),
|
|
4793
|
+
z30.transform((v) => {
|
|
4794
|
+
return remap(v, {
|
|
4795
|
+
featureId: "feature_id"
|
|
4796
|
+
});
|
|
4797
|
+
})
|
|
4798
|
+
);
|
|
4686
4799
|
var GetOrCreateCustomerBillingControls$outboundSchema = z30.pipe(
|
|
4687
4800
|
z30.object({
|
|
4688
4801
|
autoTopups: z30.optional(
|
|
@@ -4693,13 +4806,17 @@ var GetOrCreateCustomerBillingControls$outboundSchema = z30.pipe(
|
|
|
4693
4806
|
),
|
|
4694
4807
|
usageAlerts: z30.optional(
|
|
4695
4808
|
z30.array(z30.lazy(() => GetOrCreateCustomerUsageAlert$outboundSchema))
|
|
4809
|
+
),
|
|
4810
|
+
overageAllowed: z30.optional(
|
|
4811
|
+
z30.array(z30.lazy(() => GetOrCreateCustomerOverageAllowed$outboundSchema))
|
|
4696
4812
|
)
|
|
4697
4813
|
}),
|
|
4698
4814
|
z30.transform((v) => {
|
|
4699
4815
|
return remap(v, {
|
|
4700
4816
|
autoTopups: "auto_topups",
|
|
4701
4817
|
spendLimits: "spend_limits",
|
|
4702
|
-
usageAlerts: "usage_alerts"
|
|
4818
|
+
usageAlerts: "usage_alerts",
|
|
4819
|
+
overageAllowed: "overage_allowed"
|
|
4703
4820
|
});
|
|
4704
4821
|
})
|
|
4705
4822
|
);
|
|
@@ -4924,11 +5041,13 @@ var GetPlanExpiryDurationType$inboundSchema = inboundSchema(GetPlanExpiryDuratio
|
|
|
4924
5041
|
var GetPlanRollover$inboundSchema = z31.pipe(
|
|
4925
5042
|
z31.object({
|
|
4926
5043
|
max: nullable(number2()),
|
|
5044
|
+
max_percentage: z31.optional(z31.nullable(number2())),
|
|
4927
5045
|
expiry_duration_type: GetPlanExpiryDurationType$inboundSchema,
|
|
4928
5046
|
expiry_duration_length: optional2(number2())
|
|
4929
5047
|
}),
|
|
4930
5048
|
z31.transform((v) => {
|
|
4931
5049
|
return remap(v, {
|
|
5050
|
+
"max_percentage": "maxPercentage",
|
|
4932
5051
|
"expiry_duration_type": "expiryDurationType",
|
|
4933
5052
|
"expiry_duration_length": "expiryDurationLength"
|
|
4934
5053
|
});
|
|
@@ -5156,6 +5275,17 @@ var ListCustomersUsageAlert$inboundSchema = z32.pipe(
|
|
|
5156
5275
|
});
|
|
5157
5276
|
})
|
|
5158
5277
|
);
|
|
5278
|
+
var ListCustomersOverageAllowed$inboundSchema = z32.pipe(
|
|
5279
|
+
z32.object({
|
|
5280
|
+
feature_id: string4(),
|
|
5281
|
+
enabled: z32._default(boolean2(), false)
|
|
5282
|
+
}),
|
|
5283
|
+
z32.transform((v) => {
|
|
5284
|
+
return remap(v, {
|
|
5285
|
+
"feature_id": "featureId"
|
|
5286
|
+
});
|
|
5287
|
+
})
|
|
5288
|
+
);
|
|
5159
5289
|
var ListCustomersBillingControls$inboundSchema = z32.pipe(
|
|
5160
5290
|
z32.object({
|
|
5161
5291
|
auto_topups: optional2(
|
|
@@ -5166,13 +5296,17 @@ var ListCustomersBillingControls$inboundSchema = z32.pipe(
|
|
|
5166
5296
|
),
|
|
5167
5297
|
usage_alerts: optional2(
|
|
5168
5298
|
z32.array(z32.lazy(() => ListCustomersUsageAlert$inboundSchema))
|
|
5299
|
+
),
|
|
5300
|
+
overage_allowed: optional2(
|
|
5301
|
+
z32.array(z32.lazy(() => ListCustomersOverageAllowed$inboundSchema))
|
|
5169
5302
|
)
|
|
5170
5303
|
}),
|
|
5171
5304
|
z32.transform((v) => {
|
|
5172
5305
|
return remap(v, {
|
|
5173
5306
|
"auto_topups": "autoTopups",
|
|
5174
5307
|
"spend_limits": "spendLimits",
|
|
5175
|
-
"usage_alerts": "usageAlerts"
|
|
5308
|
+
"usage_alerts": "usageAlerts",
|
|
5309
|
+
"overage_allowed": "overageAllowed"
|
|
5176
5310
|
});
|
|
5177
5311
|
})
|
|
5178
5312
|
);
|
|
@@ -5627,11 +5761,13 @@ var ListPlansExpiryDurationType$inboundSchema = inboundSchema(ListPlansExpiryDur
|
|
|
5627
5761
|
var ListPlansRollover$inboundSchema = z35.pipe(
|
|
5628
5762
|
z35.object({
|
|
5629
5763
|
max: nullable(number2()),
|
|
5764
|
+
max_percentage: z35.optional(z35.nullable(number2())),
|
|
5630
5765
|
expiry_duration_type: ListPlansExpiryDurationType$inboundSchema,
|
|
5631
5766
|
expiry_duration_length: optional2(number2())
|
|
5632
5767
|
}),
|
|
5633
5768
|
z35.transform((v) => {
|
|
5634
5769
|
return remap(v, {
|
|
5770
|
+
"max_percentage": "maxPercentage",
|
|
5635
5771
|
"expiry_duration_type": "expiryDurationType",
|
|
5636
5772
|
"expiry_duration_length": "expiryDurationLength"
|
|
5637
5773
|
});
|
|
@@ -5875,11 +6011,13 @@ var MultiAttachExpiryDurationType$outboundSchema = z36.enum(MultiAttachExpiryDur
|
|
|
5875
6011
|
var MultiAttachRollover$outboundSchema = z36.pipe(
|
|
5876
6012
|
z36.object({
|
|
5877
6013
|
max: z36.optional(z36.number()),
|
|
6014
|
+
maxPercentage: z36.optional(z36.number()),
|
|
5878
6015
|
expiryDurationType: MultiAttachExpiryDurationType$outboundSchema,
|
|
5879
6016
|
expiryDurationLength: z36.optional(z36.number())
|
|
5880
6017
|
}),
|
|
5881
6018
|
z36.transform((v) => {
|
|
5882
6019
|
return remap(v, {
|
|
6020
|
+
maxPercentage: "max_percentage",
|
|
5883
6021
|
expiryDurationType: "expiry_duration_type",
|
|
5884
6022
|
expiryDurationLength: "expiry_duration_length"
|
|
5885
6023
|
});
|
|
@@ -6006,6 +6144,17 @@ var MultiAttachUsageAlert$outboundSchema = z36.pipe(
|
|
|
6006
6144
|
});
|
|
6007
6145
|
})
|
|
6008
6146
|
);
|
|
6147
|
+
var MultiAttachOverageAllowed$outboundSchema = z36.pipe(
|
|
6148
|
+
z36.object({
|
|
6149
|
+
featureId: z36.string(),
|
|
6150
|
+
enabled: z36._default(z36.boolean(), false)
|
|
6151
|
+
}),
|
|
6152
|
+
z36.transform((v) => {
|
|
6153
|
+
return remap(v, {
|
|
6154
|
+
featureId: "feature_id"
|
|
6155
|
+
});
|
|
6156
|
+
})
|
|
6157
|
+
);
|
|
6009
6158
|
var MultiAttachBillingControls$outboundSchema = z36.pipe(
|
|
6010
6159
|
z36.object({
|
|
6011
6160
|
spendLimits: z36.optional(
|
|
@@ -6013,12 +6162,16 @@ var MultiAttachBillingControls$outboundSchema = z36.pipe(
|
|
|
6013
6162
|
),
|
|
6014
6163
|
usageAlerts: z36.optional(
|
|
6015
6164
|
z36.array(z36.lazy(() => MultiAttachUsageAlert$outboundSchema))
|
|
6165
|
+
),
|
|
6166
|
+
overageAllowed: z36.optional(
|
|
6167
|
+
z36.array(z36.lazy(() => MultiAttachOverageAllowed$outboundSchema))
|
|
6016
6168
|
)
|
|
6017
6169
|
}),
|
|
6018
6170
|
z36.transform((v) => {
|
|
6019
6171
|
return remap(v, {
|
|
6020
6172
|
spendLimits: "spend_limits",
|
|
6021
|
-
usageAlerts: "usage_alerts"
|
|
6173
|
+
usageAlerts: "usage_alerts",
|
|
6174
|
+
overageAllowed: "overage_allowed"
|
|
6022
6175
|
});
|
|
6023
6176
|
})
|
|
6024
6177
|
);
|
|
@@ -6312,11 +6465,13 @@ var PreviewAttachExpiryDurationType$outboundSchema = z38.enum(PreviewAttachExpir
|
|
|
6312
6465
|
var PreviewAttachRollover$outboundSchema = z38.pipe(
|
|
6313
6466
|
z38.object({
|
|
6314
6467
|
max: z38.optional(z38.number()),
|
|
6468
|
+
maxPercentage: z38.optional(z38.number()),
|
|
6315
6469
|
expiryDurationType: PreviewAttachExpiryDurationType$outboundSchema,
|
|
6316
6470
|
expiryDurationLength: z38.optional(z38.number())
|
|
6317
6471
|
}),
|
|
6318
6472
|
z38.transform((v) => {
|
|
6319
6473
|
return remap(v, {
|
|
6474
|
+
maxPercentage: "max_percentage",
|
|
6320
6475
|
expiryDurationType: "expiry_duration_type",
|
|
6321
6476
|
expiryDurationLength: "expiry_duration_length"
|
|
6322
6477
|
});
|
|
@@ -6860,11 +7015,13 @@ var PreviewMultiAttachExpiryDurationType$outboundSchema = z39.enum(PreviewMultiA
|
|
|
6860
7015
|
var PreviewMultiAttachRollover$outboundSchema = z39.pipe(
|
|
6861
7016
|
z39.object({
|
|
6862
7017
|
max: z39.optional(z39.number()),
|
|
7018
|
+
maxPercentage: z39.optional(z39.number()),
|
|
6863
7019
|
expiryDurationType: PreviewMultiAttachExpiryDurationType$outboundSchema,
|
|
6864
7020
|
expiryDurationLength: z39.optional(z39.number())
|
|
6865
7021
|
}),
|
|
6866
7022
|
z39.transform((v) => {
|
|
6867
7023
|
return remap(v, {
|
|
7024
|
+
maxPercentage: "max_percentage",
|
|
6868
7025
|
expiryDurationType: "expiry_duration_type",
|
|
6869
7026
|
expiryDurationLength: "expiry_duration_length"
|
|
6870
7027
|
});
|
|
@@ -7004,6 +7161,17 @@ var PreviewMultiAttachUsageAlert$outboundSchema = z39.pipe(
|
|
|
7004
7161
|
});
|
|
7005
7162
|
})
|
|
7006
7163
|
);
|
|
7164
|
+
var PreviewMultiAttachOverageAllowed$outboundSchema = z39.pipe(
|
|
7165
|
+
z39.object({
|
|
7166
|
+
featureId: z39.string(),
|
|
7167
|
+
enabled: z39._default(z39.boolean(), false)
|
|
7168
|
+
}),
|
|
7169
|
+
z39.transform((v) => {
|
|
7170
|
+
return remap(v, {
|
|
7171
|
+
featureId: "feature_id"
|
|
7172
|
+
});
|
|
7173
|
+
})
|
|
7174
|
+
);
|
|
7007
7175
|
var PreviewMultiAttachBillingControls$outboundSchema = z39.pipe(
|
|
7008
7176
|
z39.object({
|
|
7009
7177
|
spendLimits: z39.optional(
|
|
@@ -7011,12 +7179,16 @@ var PreviewMultiAttachBillingControls$outboundSchema = z39.pipe(
|
|
|
7011
7179
|
),
|
|
7012
7180
|
usageAlerts: z39.optional(
|
|
7013
7181
|
z39.array(z39.lazy(() => PreviewMultiAttachUsageAlert$outboundSchema))
|
|
7182
|
+
),
|
|
7183
|
+
overageAllowed: z39.optional(
|
|
7184
|
+
z39.array(z39.lazy(() => PreviewMultiAttachOverageAllowed$outboundSchema))
|
|
7014
7185
|
)
|
|
7015
7186
|
}),
|
|
7016
7187
|
z39.transform((v) => {
|
|
7017
7188
|
return remap(v, {
|
|
7018
7189
|
spendLimits: "spend_limits",
|
|
7019
|
-
usageAlerts: "usage_alerts"
|
|
7190
|
+
usageAlerts: "usage_alerts",
|
|
7191
|
+
overageAllowed: "overage_allowed"
|
|
7020
7192
|
});
|
|
7021
7193
|
})
|
|
7022
7194
|
);
|
|
@@ -7472,11 +7644,13 @@ var PreviewUpdateExpiryDurationType$outboundSchema = z40.enum(PreviewUpdateExpir
|
|
|
7472
7644
|
var PreviewUpdateRollover$outboundSchema = z40.pipe(
|
|
7473
7645
|
z40.object({
|
|
7474
7646
|
max: z40.optional(z40.number()),
|
|
7647
|
+
maxPercentage: z40.optional(z40.number()),
|
|
7475
7648
|
expiryDurationType: PreviewUpdateExpiryDurationType$outboundSchema,
|
|
7476
7649
|
expiryDurationLength: z40.optional(z40.number())
|
|
7477
7650
|
}),
|
|
7478
7651
|
z40.transform((v) => {
|
|
7479
7652
|
return remap(v, {
|
|
7653
|
+
maxPercentage: "max_percentage",
|
|
7480
7654
|
expiryDurationType: "expiry_duration_type",
|
|
7481
7655
|
expiryDurationLength: "expiry_duration_length"
|
|
7482
7656
|
});
|
|
@@ -7992,11 +8166,13 @@ var SetupPaymentExpiryDurationType$outboundSchema = z42.enum(SetupPaymentExpiryD
|
|
|
7992
8166
|
var SetupPaymentRollover$outboundSchema = z42.pipe(
|
|
7993
8167
|
z42.object({
|
|
7994
8168
|
max: z42.optional(z42.number()),
|
|
8169
|
+
maxPercentage: z42.optional(z42.number()),
|
|
7995
8170
|
expiryDurationType: SetupPaymentExpiryDurationType$outboundSchema,
|
|
7996
8171
|
expiryDurationLength: z42.optional(z42.number())
|
|
7997
8172
|
}),
|
|
7998
8173
|
z42.transform((v) => {
|
|
7999
8174
|
return remap(v, {
|
|
8175
|
+
maxPercentage: "max_percentage",
|
|
8000
8176
|
expiryDurationType: "expiry_duration_type",
|
|
8001
8177
|
expiryDurationLength: "expiry_duration_length"
|
|
8002
8178
|
});
|
|
@@ -8341,6 +8517,17 @@ var UpdateCustomerUsageAlertRequestBody$outboundSchema = z45.pipe(
|
|
|
8341
8517
|
});
|
|
8342
8518
|
})
|
|
8343
8519
|
);
|
|
8520
|
+
var UpdateCustomerOverageAllowedRequest$outboundSchema = z45.pipe(
|
|
8521
|
+
z45.object({
|
|
8522
|
+
featureId: z45.string(),
|
|
8523
|
+
enabled: z45._default(z45.boolean(), false)
|
|
8524
|
+
}),
|
|
8525
|
+
z45.transform((v) => {
|
|
8526
|
+
return remap(v, {
|
|
8527
|
+
featureId: "feature_id"
|
|
8528
|
+
});
|
|
8529
|
+
})
|
|
8530
|
+
);
|
|
8344
8531
|
var UpdateCustomerBillingControlsRequest$outboundSchema = z45.pipe(
|
|
8345
8532
|
z45.object({
|
|
8346
8533
|
autoTopups: z45.optional(
|
|
@@ -8351,13 +8538,17 @@ var UpdateCustomerBillingControlsRequest$outboundSchema = z45.pipe(
|
|
|
8351
8538
|
),
|
|
8352
8539
|
usageAlerts: z45.optional(
|
|
8353
8540
|
z45.array(z45.lazy(() => UpdateCustomerUsageAlertRequestBody$outboundSchema))
|
|
8541
|
+
),
|
|
8542
|
+
overageAllowed: z45.optional(
|
|
8543
|
+
z45.array(z45.lazy(() => UpdateCustomerOverageAllowedRequest$outboundSchema))
|
|
8354
8544
|
)
|
|
8355
8545
|
}),
|
|
8356
8546
|
z45.transform((v) => {
|
|
8357
8547
|
return remap(v, {
|
|
8358
8548
|
autoTopups: "auto_topups",
|
|
8359
8549
|
spendLimits: "spend_limits",
|
|
8360
|
-
usageAlerts: "usage_alerts"
|
|
8550
|
+
usageAlerts: "usage_alerts",
|
|
8551
|
+
overageAllowed: "overage_allowed"
|
|
8361
8552
|
});
|
|
8362
8553
|
})
|
|
8363
8554
|
);
|
|
@@ -8445,6 +8636,17 @@ var UpdateCustomerUsageAlertResponse$inboundSchema = z45.pipe(
|
|
|
8445
8636
|
});
|
|
8446
8637
|
})
|
|
8447
8638
|
);
|
|
8639
|
+
var UpdateCustomerOverageAllowedResponse$inboundSchema = z45.pipe(
|
|
8640
|
+
z45.object({
|
|
8641
|
+
feature_id: string4(),
|
|
8642
|
+
enabled: z45._default(boolean2(), false)
|
|
8643
|
+
}),
|
|
8644
|
+
z45.transform((v) => {
|
|
8645
|
+
return remap(v, {
|
|
8646
|
+
"feature_id": "featureId"
|
|
8647
|
+
});
|
|
8648
|
+
})
|
|
8649
|
+
);
|
|
8448
8650
|
var UpdateCustomerBillingControlsResponse$inboundSchema = z45.pipe(
|
|
8449
8651
|
z45.object({
|
|
8450
8652
|
auto_topups: optional2(
|
|
@@ -8455,13 +8657,17 @@ var UpdateCustomerBillingControlsResponse$inboundSchema = z45.pipe(
|
|
|
8455
8657
|
),
|
|
8456
8658
|
usage_alerts: optional2(
|
|
8457
8659
|
z45.array(z45.lazy(() => UpdateCustomerUsageAlertResponse$inboundSchema))
|
|
8660
|
+
),
|
|
8661
|
+
overage_allowed: optional2(
|
|
8662
|
+
z45.array(z45.lazy(() => UpdateCustomerOverageAllowedResponse$inboundSchema))
|
|
8458
8663
|
)
|
|
8459
8664
|
}),
|
|
8460
8665
|
z45.transform((v) => {
|
|
8461
8666
|
return remap(v, {
|
|
8462
8667
|
"auto_topups": "autoTopups",
|
|
8463
8668
|
"spend_limits": "spendLimits",
|
|
8464
|
-
"usage_alerts": "usageAlerts"
|
|
8669
|
+
"usage_alerts": "usageAlerts",
|
|
8670
|
+
"overage_allowed": "overageAllowed"
|
|
8465
8671
|
});
|
|
8466
8672
|
})
|
|
8467
8673
|
);
|
|
@@ -8653,6 +8859,17 @@ var UpdateEntityUsageAlertRequestBody$outboundSchema = z46.pipe(
|
|
|
8653
8859
|
});
|
|
8654
8860
|
})
|
|
8655
8861
|
);
|
|
8862
|
+
var UpdateEntityOverageAllowedRequest$outboundSchema = z46.pipe(
|
|
8863
|
+
z46.object({
|
|
8864
|
+
featureId: z46.string(),
|
|
8865
|
+
enabled: z46._default(z46.boolean(), false)
|
|
8866
|
+
}),
|
|
8867
|
+
z46.transform((v) => {
|
|
8868
|
+
return remap(v, {
|
|
8869
|
+
featureId: "feature_id"
|
|
8870
|
+
});
|
|
8871
|
+
})
|
|
8872
|
+
);
|
|
8656
8873
|
var UpdateEntityBillingControlsRequest$outboundSchema = z46.pipe(
|
|
8657
8874
|
z46.object({
|
|
8658
8875
|
spendLimits: z46.optional(
|
|
@@ -8660,12 +8877,16 @@ var UpdateEntityBillingControlsRequest$outboundSchema = z46.pipe(
|
|
|
8660
8877
|
),
|
|
8661
8878
|
usageAlerts: z46.optional(
|
|
8662
8879
|
z46.array(z46.lazy(() => UpdateEntityUsageAlertRequestBody$outboundSchema))
|
|
8880
|
+
),
|
|
8881
|
+
overageAllowed: z46.optional(
|
|
8882
|
+
z46.array(z46.lazy(() => UpdateEntityOverageAllowedRequest$outboundSchema))
|
|
8663
8883
|
)
|
|
8664
8884
|
}),
|
|
8665
8885
|
z46.transform((v) => {
|
|
8666
8886
|
return remap(v, {
|
|
8667
8887
|
spendLimits: "spend_limits",
|
|
8668
|
-
usageAlerts: "usage_alerts"
|
|
8888
|
+
usageAlerts: "usage_alerts",
|
|
8889
|
+
overageAllowed: "overage_allowed"
|
|
8669
8890
|
});
|
|
8670
8891
|
})
|
|
8671
8892
|
);
|
|
@@ -8817,6 +9038,17 @@ var UpdateEntityUsageAlertResponse$inboundSchema = z46.pipe(
|
|
|
8817
9038
|
});
|
|
8818
9039
|
})
|
|
8819
9040
|
);
|
|
9041
|
+
var UpdateEntityOverageAllowedResponse$inboundSchema = z46.pipe(
|
|
9042
|
+
z46.object({
|
|
9043
|
+
feature_id: string4(),
|
|
9044
|
+
enabled: z46._default(boolean2(), false)
|
|
9045
|
+
}),
|
|
9046
|
+
z46.transform((v) => {
|
|
9047
|
+
return remap(v, {
|
|
9048
|
+
"feature_id": "featureId"
|
|
9049
|
+
});
|
|
9050
|
+
})
|
|
9051
|
+
);
|
|
8820
9052
|
var UpdateEntityBillingControlsResponse$inboundSchema = z46.pipe(
|
|
8821
9053
|
z46.object({
|
|
8822
9054
|
spend_limits: optional2(
|
|
@@ -8824,12 +9056,16 @@ var UpdateEntityBillingControlsResponse$inboundSchema = z46.pipe(
|
|
|
8824
9056
|
),
|
|
8825
9057
|
usage_alerts: optional2(
|
|
8826
9058
|
z46.array(z46.lazy(() => UpdateEntityUsageAlertResponse$inboundSchema))
|
|
9059
|
+
),
|
|
9060
|
+
overage_allowed: optional2(
|
|
9061
|
+
z46.array(z46.lazy(() => UpdateEntityOverageAllowedResponse$inboundSchema))
|
|
8827
9062
|
)
|
|
8828
9063
|
}),
|
|
8829
9064
|
z46.transform((v) => {
|
|
8830
9065
|
return remap(v, {
|
|
8831
9066
|
"spend_limits": "spendLimits",
|
|
8832
|
-
"usage_alerts": "usageAlerts"
|
|
9067
|
+
"usage_alerts": "usageAlerts",
|
|
9068
|
+
"overage_allowed": "overageAllowed"
|
|
8833
9069
|
});
|
|
8834
9070
|
})
|
|
8835
9071
|
);
|
|
@@ -9182,11 +9418,13 @@ var UpdatePlanExpiryDurationTypeRequest$outboundSchema = z48.enum(UpdatePlanExpi
|
|
|
9182
9418
|
var UpdatePlanRolloverRequest$outboundSchema = z48.pipe(
|
|
9183
9419
|
z48.object({
|
|
9184
9420
|
max: z48.optional(z48.number()),
|
|
9421
|
+
maxPercentage: z48.optional(z48.number()),
|
|
9185
9422
|
expiryDurationType: UpdatePlanExpiryDurationTypeRequest$outboundSchema,
|
|
9186
9423
|
expiryDurationLength: z48.optional(z48.number())
|
|
9187
9424
|
}),
|
|
9188
9425
|
z48.transform((v) => {
|
|
9189
9426
|
return remap(v, {
|
|
9427
|
+
maxPercentage: "max_percentage",
|
|
9190
9428
|
expiryDurationType: "expiry_duration_type",
|
|
9191
9429
|
expiryDurationLength: "expiry_duration_length"
|
|
9192
9430
|
});
|
|
@@ -9371,11 +9609,13 @@ var UpdatePlanExpiryDurationTypeResponse$inboundSchema = inboundSchema(UpdatePla
|
|
|
9371
9609
|
var UpdatePlanRolloverResponse$inboundSchema = z48.pipe(
|
|
9372
9610
|
z48.object({
|
|
9373
9611
|
max: nullable(number2()),
|
|
9612
|
+
max_percentage: z48.optional(z48.nullable(number2())),
|
|
9374
9613
|
expiry_duration_type: UpdatePlanExpiryDurationTypeResponse$inboundSchema,
|
|
9375
9614
|
expiry_duration_length: optional2(number2())
|
|
9376
9615
|
}),
|
|
9377
9616
|
z48.transform((v) => {
|
|
9378
9617
|
return remap(v, {
|
|
9618
|
+
"max_percentage": "maxPercentage",
|
|
9379
9619
|
"expiry_duration_type": "expiryDurationType",
|
|
9380
9620
|
"expiry_duration_length": "expiryDurationLength"
|
|
9381
9621
|
});
|
|
@@ -9652,7 +9892,8 @@ async function $do2(client, request, options) {
|
|
|
9652
9892
|
var FAIL_OPEN_OPERATION_IDS = /* @__PURE__ */ new Set([
|
|
9653
9893
|
"check",
|
|
9654
9894
|
"track",
|
|
9655
|
-
"getOrCreateCustomer"
|
|
9895
|
+
"getOrCreateCustomer",
|
|
9896
|
+
"getEntity"
|
|
9656
9897
|
]);
|
|
9657
9898
|
var FAIL_OPEN_LOG_MESSAGE = "[Autumn] Request failed \u2014 failing open. Learn more: https://docs.useautumn.com/documentation/fail-open";
|
|
9658
9899
|
var FAIL_OPEN_BODIES = {
|
|
@@ -9682,6 +9923,18 @@ var FAIL_OPEN_BODIES = {
|
|
|
9682
9923
|
purchases: [],
|
|
9683
9924
|
balances: {},
|
|
9684
9925
|
flags: {}
|
|
9926
|
+
},
|
|
9927
|
+
getEntity: {
|
|
9928
|
+
id: null,
|
|
9929
|
+
name: null,
|
|
9930
|
+
customer_id: null,
|
|
9931
|
+
feature_id: null,
|
|
9932
|
+
created_at: 0,
|
|
9933
|
+
env: "live",
|
|
9934
|
+
subscriptions: [],
|
|
9935
|
+
purchases: [],
|
|
9936
|
+
balances: {},
|
|
9937
|
+
flags: {}
|
|
9685
9938
|
}
|
|
9686
9939
|
};
|
|
9687
9940
|
var FailOpenHook = class {
|
|
@@ -9862,8 +10115,8 @@ var SDK_METADATA = {
|
|
|
9862
10115
|
language: "typescript",
|
|
9863
10116
|
openapiDocVersion: "2.2.0",
|
|
9864
10117
|
sdkVersion: "0.10.17",
|
|
9865
|
-
genVersion: "2.
|
|
9866
|
-
userAgent: "speakeasy-sdk/typescript 0.10.17 2.
|
|
10118
|
+
genVersion: "2.879.1",
|
|
10119
|
+
userAgent: "speakeasy-sdk/typescript 0.10.17 2.879.1 2.2.0 @useautumn/sdk"
|
|
9867
10120
|
};
|
|
9868
10121
|
|
|
9869
10122
|
// ../sdk/src/lib/retries.ts
|