autumn-js 1.2.2 → 1.2.4
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 +361 -43
- package/dist/backend/adapters/express.mjs +5 -5
- package/dist/backend/adapters/fetch.d.mts +1 -1
- package/dist/backend/adapters/fetch.d.ts +1 -1
- package/dist/backend/adapters/fetch.js +361 -43
- package/dist/backend/adapters/fetch.mjs +5 -5
- package/dist/backend/adapters/hono.d.mts +1 -1
- package/dist/backend/adapters/hono.d.ts +1 -1
- package/dist/backend/adapters/hono.js +361 -43
- package/dist/backend/adapters/hono.mjs +5 -5
- package/dist/backend/adapters/index.d.mts +1 -1
- package/dist/backend/adapters/index.d.ts +1 -1
- package/dist/backend/adapters/index.js +361 -43
- package/dist/backend/adapters/index.mjs +8 -8
- package/dist/backend/adapters/next.d.mts +1 -1
- package/dist/backend/adapters/next.d.ts +1 -1
- package/dist/backend/adapters/next.js +361 -43
- package/dist/backend/adapters/next.mjs +5 -5
- package/dist/backend/{authTypes-BCoyMOAj.d.mts → authTypes-Bdpu8A6G.d.mts} +18 -0
- package/dist/backend/{authTypes-BCoyMOAj.d.ts → authTypes-Bdpu8A6G.d.ts} +18 -0
- package/dist/backend/{chunk-XU4OGYDV.mjs → chunk-3RN6TO3T.mjs} +60 -7
- package/dist/backend/{chunk-3QNAZFQH.mjs → chunk-AA2HLIP7.mjs} +2 -2
- package/dist/backend/{chunk-SX3CNUF5.mjs → chunk-AIKOHUUL.mjs} +1 -1
- package/dist/backend/{chunk-6BVI5XZX.mjs → chunk-BGGTI77T.mjs} +301 -36
- package/dist/backend/{chunk-OB47KG2H.mjs → chunk-MHFVVQCC.mjs} +1 -1
- package/dist/backend/{chunk-GLPHS5KF.mjs → chunk-OZRCCZTP.mjs} +2 -2
- package/dist/backend/{chunk-GENKYO6B.mjs → chunk-SCDE7Y52.mjs} +1 -1
- package/dist/backend/{chunk-C5ZDQJPP.mjs → chunk-UUMOHEAD.mjs} +1 -1
- 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 +361 -43
- package/dist/backend/core/handlers/coreHandler.mjs +3 -3
- 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/handleRouteByName.d.mts +1 -1
- package/dist/backend/core/handlers/handleRouteByName.d.ts +1 -1
- package/dist/backend/core/handlers/handleRouteByName.js +361 -43
- package/dist/backend/core/handlers/handleRouteByName.mjs +3 -3
- 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 +361 -43
- package/dist/backend/core/handlers/index.mjs +4 -4
- 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 +361 -43
- package/dist/backend/core/index.mjs +4 -4
- 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 +60 -7
- package/dist/backend/core/routes/index.mjs +1 -1
- 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 +60 -7
- package/dist/backend/core/routes/routeConfigs.mjs +1 -1
- 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/index.d.mts +4 -4
- package/dist/backend/index.d.ts +4 -4
- package/dist/backend/index.js +361 -43
- package/dist/backend/index.mjs +4 -4
- package/dist/backend/{routeTypes-Che2nkqv.d.ts → routeTypes-DpH9YHyt.d.ts} +247 -2
- package/dist/backend/{routeTypes-RMeyKg5T.d.mts → routeTypes-mIP4rSxp.d.mts} +247 -2
- package/dist/better-auth/{chunk-5F3J4ZQQ.mjs → chunk-3C2VGNW3.mjs} +302 -37
- package/dist/better-auth/{chunk-6TAYCQUD.mjs → chunk-CG3LL2TQ.mjs} +60 -7
- package/dist/better-auth/{chunk-IODRHT4E.mjs → chunk-UCMJFTKD.mjs} +1 -1
- package/dist/better-auth/index.js +361 -43
- package/dist/better-auth/index.mjs +3 -3
- package/dist/better-auth/types.d.mts +18 -0
- package/dist/better-auth/types.d.ts +18 -0
- package/dist/better-auth/utils/createAutumnEndpoint.js +60 -7
- package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
- package/dist/better-auth/utils/handleBetterAuthRoute.js +361 -43
- package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
- package/dist/better-auth/utils/index.js +361 -43
- package/dist/better-auth/utils/index.mjs +3 -3
- package/dist/react/AutumnContext.d.mts +3 -3
- package/dist/react/AutumnContext.d.ts +3 -3
- package/dist/react/AutumnProvider.d.mts +2 -1
- package/dist/react/AutumnProvider.d.ts +2 -1
- package/dist/react/AutumnProvider.js +18 -8
- package/dist/react/AutumnProvider.mjs +3 -3
- package/dist/react/{chunk-R7I3UPL4.mjs → chunk-26CKSAPZ.mjs} +6 -4
- package/dist/react/{chunk-QEJLIFBC.mjs → chunk-QOFGTXEX.mjs} +3 -2
- package/dist/react/{chunk-M34U5F2H.mjs → chunk-SCDO26YC.mjs} +11 -4
- package/dist/react/client/AutumnClient.d.mts +4 -3
- package/dist/react/client/AutumnClient.d.ts +4 -3
- package/dist/react/client/AutumnClient.js +13 -5
- package/dist/react/client/AutumnClient.mjs +2 -2
- 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/client/index.js +13 -5
- package/dist/react/client/index.mjs +2 -2
- package/dist/react/client/internal/httpClient.d.mts +1 -0
- package/dist/react/client/internal/httpClient.d.ts +1 -0
- package/dist/react/client/internal/httpClient.js +11 -4
- package/dist/react/client/internal/httpClient.mjs +1 -1
- package/dist/react/{customer-CMAtwbJl.d.ts → customer-BPHnUS4N.d.ts} +19 -1
- package/dist/react/{customer-CNvpHhpS.d.mts → customer-DDRi84Zq.d.mts} +19 -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/index.js +18 -8
- package/dist/react/index.mjs +3 -3
- package/dist/react/{params-Cdkj83CV.d.mts → params-Bj6uyOX1.d.mts} +91 -2
- package/dist/react/{params-CnOvYjqJ.d.ts → params-DAVIR4YX.d.ts} +91 -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 +360 -4
- package/dist/sdk/index.d.ts +360 -4
- package/dist/sdk/index.js +406 -36
- package/dist/sdk/index.mjs +381 -37
- package/package.json +1 -1
|
@@ -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(
|
|
@@ -2592,12 +2613,14 @@ var CustomerDataAutoTopup$outboundSchema = z15.pipe(
|
|
|
2592
2613
|
quantity: z15.number(),
|
|
2593
2614
|
purchaseLimit: z15.optional(
|
|
2594
2615
|
z15.lazy(() => CustomerDataPurchaseLimit$outboundSchema)
|
|
2595
|
-
)
|
|
2616
|
+
),
|
|
2617
|
+
invoiceMode: z15.optional(z15.boolean())
|
|
2596
2618
|
}),
|
|
2597
2619
|
z15.transform((v) => {
|
|
2598
2620
|
return remap(v, {
|
|
2599
2621
|
featureId: "feature_id",
|
|
2600
|
-
purchaseLimit: "purchase_limit"
|
|
2622
|
+
purchaseLimit: "purchase_limit",
|
|
2623
|
+
invoiceMode: "invoice_mode"
|
|
2601
2624
|
});
|
|
2602
2625
|
})
|
|
2603
2626
|
);
|
|
@@ -2630,6 +2653,17 @@ var CustomerDataUsageAlert$outboundSchema = z15.pipe(
|
|
|
2630
2653
|
});
|
|
2631
2654
|
})
|
|
2632
2655
|
);
|
|
2656
|
+
var CustomerDataOverageAllowed$outboundSchema = z15.pipe(
|
|
2657
|
+
z15.object({
|
|
2658
|
+
featureId: z15.string(),
|
|
2659
|
+
enabled: z15._default(z15.boolean(), false)
|
|
2660
|
+
}),
|
|
2661
|
+
z15.transform((v) => {
|
|
2662
|
+
return remap(v, {
|
|
2663
|
+
featureId: "feature_id"
|
|
2664
|
+
});
|
|
2665
|
+
})
|
|
2666
|
+
);
|
|
2633
2667
|
var CustomerDataBillingControls$outboundSchema = z15.pipe(
|
|
2634
2668
|
z15.object({
|
|
2635
2669
|
autoTopups: z15.optional(
|
|
@@ -2640,13 +2674,17 @@ var CustomerDataBillingControls$outboundSchema = z15.pipe(
|
|
|
2640
2674
|
),
|
|
2641
2675
|
usageAlerts: z15.optional(
|
|
2642
2676
|
z15.array(z15.lazy(() => CustomerDataUsageAlert$outboundSchema))
|
|
2677
|
+
),
|
|
2678
|
+
overageAllowed: z15.optional(
|
|
2679
|
+
z15.array(z15.lazy(() => CustomerDataOverageAllowed$outboundSchema))
|
|
2643
2680
|
)
|
|
2644
2681
|
}),
|
|
2645
2682
|
z15.transform((v) => {
|
|
2646
2683
|
return remap(v, {
|
|
2647
2684
|
autoTopups: "auto_topups",
|
|
2648
2685
|
spendLimits: "spend_limits",
|
|
2649
|
-
usageAlerts: "usage_alerts"
|
|
2686
|
+
usageAlerts: "usage_alerts",
|
|
2687
|
+
overageAllowed: "overage_allowed"
|
|
2650
2688
|
});
|
|
2651
2689
|
})
|
|
2652
2690
|
);
|
|
@@ -2857,11 +2895,13 @@ var ExpiryDurationType$inboundSchema = inboundSchema(ExpiryDurationType);
|
|
|
2857
2895
|
var PlanRollover$inboundSchema = z16.pipe(
|
|
2858
2896
|
z16.object({
|
|
2859
2897
|
max: nullable(number2()),
|
|
2898
|
+
max_percentage: z16.optional(z16.nullable(number2())),
|
|
2860
2899
|
expiry_duration_type: ExpiryDurationType$inboundSchema,
|
|
2861
2900
|
expiry_duration_length: optional2(number2())
|
|
2862
2901
|
}),
|
|
2863
2902
|
z16.transform((v) => {
|
|
2864
2903
|
return remap(v, {
|
|
2904
|
+
"max_percentage": "maxPercentage",
|
|
2865
2905
|
"expiry_duration_type": "expiryDurationType",
|
|
2866
2906
|
"expiry_duration_length": "expiryDurationLength"
|
|
2867
2907
|
});
|
|
@@ -3000,6 +3040,17 @@ var CreateEntityUsageAlertRequestBody$outboundSchema = z17.pipe(
|
|
|
3000
3040
|
});
|
|
3001
3041
|
})
|
|
3002
3042
|
);
|
|
3043
|
+
var CreateEntityOverageAllowedRequest$outboundSchema = z17.pipe(
|
|
3044
|
+
z17.object({
|
|
3045
|
+
featureId: z17.string(),
|
|
3046
|
+
enabled: z17._default(z17.boolean(), false)
|
|
3047
|
+
}),
|
|
3048
|
+
z17.transform((v) => {
|
|
3049
|
+
return remap(v, {
|
|
3050
|
+
featureId: "feature_id"
|
|
3051
|
+
});
|
|
3052
|
+
})
|
|
3053
|
+
);
|
|
3003
3054
|
var CreateEntityBillingControlsRequest$outboundSchema = z17.pipe(
|
|
3004
3055
|
z17.object({
|
|
3005
3056
|
spendLimits: z17.optional(
|
|
@@ -3007,12 +3058,16 @@ var CreateEntityBillingControlsRequest$outboundSchema = z17.pipe(
|
|
|
3007
3058
|
),
|
|
3008
3059
|
usageAlerts: z17.optional(
|
|
3009
3060
|
z17.array(z17.lazy(() => CreateEntityUsageAlertRequestBody$outboundSchema))
|
|
3061
|
+
),
|
|
3062
|
+
overageAllowed: z17.optional(
|
|
3063
|
+
z17.array(z17.lazy(() => CreateEntityOverageAllowedRequest$outboundSchema))
|
|
3010
3064
|
)
|
|
3011
3065
|
}),
|
|
3012
3066
|
z17.transform((v) => {
|
|
3013
3067
|
return remap(v, {
|
|
3014
3068
|
spendLimits: "spend_limits",
|
|
3015
|
-
usageAlerts: "usage_alerts"
|
|
3069
|
+
usageAlerts: "usage_alerts",
|
|
3070
|
+
overageAllowed: "overage_allowed"
|
|
3016
3071
|
});
|
|
3017
3072
|
})
|
|
3018
3073
|
);
|
|
@@ -3169,6 +3224,17 @@ var CreateEntityUsageAlertResponse$inboundSchema = z17.pipe(
|
|
|
3169
3224
|
});
|
|
3170
3225
|
})
|
|
3171
3226
|
);
|
|
3227
|
+
var CreateEntityOverageAllowedResponse$inboundSchema = z17.pipe(
|
|
3228
|
+
z17.object({
|
|
3229
|
+
feature_id: string4(),
|
|
3230
|
+
enabled: z17._default(boolean2(), false)
|
|
3231
|
+
}),
|
|
3232
|
+
z17.transform((v) => {
|
|
3233
|
+
return remap(v, {
|
|
3234
|
+
"feature_id": "featureId"
|
|
3235
|
+
});
|
|
3236
|
+
})
|
|
3237
|
+
);
|
|
3172
3238
|
var CreateEntityBillingControlsResponse$inboundSchema = z17.pipe(
|
|
3173
3239
|
z17.object({
|
|
3174
3240
|
spend_limits: optional2(
|
|
@@ -3176,12 +3242,16 @@ var CreateEntityBillingControlsResponse$inboundSchema = z17.pipe(
|
|
|
3176
3242
|
),
|
|
3177
3243
|
usage_alerts: optional2(
|
|
3178
3244
|
z17.array(z17.lazy(() => CreateEntityUsageAlertResponse$inboundSchema))
|
|
3245
|
+
),
|
|
3246
|
+
overage_allowed: optional2(
|
|
3247
|
+
z17.array(z17.lazy(() => CreateEntityOverageAllowedResponse$inboundSchema))
|
|
3179
3248
|
)
|
|
3180
3249
|
}),
|
|
3181
3250
|
z17.transform((v) => {
|
|
3182
3251
|
return remap(v, {
|
|
3183
3252
|
"spend_limits": "spendLimits",
|
|
3184
|
-
"usage_alerts": "usageAlerts"
|
|
3253
|
+
"usage_alerts": "usageAlerts",
|
|
3254
|
+
"overage_allowed": "overageAllowed"
|
|
3185
3255
|
});
|
|
3186
3256
|
})
|
|
3187
3257
|
);
|
|
@@ -3531,11 +3601,13 @@ var CreatePlanExpiryDurationTypeRequest$outboundSchema = z19.enum(CreatePlanExpi
|
|
|
3531
3601
|
var CreatePlanRolloverRequest$outboundSchema = z19.pipe(
|
|
3532
3602
|
z19.object({
|
|
3533
3603
|
max: z19.optional(z19.number()),
|
|
3604
|
+
maxPercentage: z19.optional(z19.number()),
|
|
3534
3605
|
expiryDurationType: CreatePlanExpiryDurationTypeRequest$outboundSchema,
|
|
3535
3606
|
expiryDurationLength: z19.optional(z19.number())
|
|
3536
3607
|
}),
|
|
3537
3608
|
z19.transform((v) => {
|
|
3538
3609
|
return remap(v, {
|
|
3610
|
+
maxPercentage: "max_percentage",
|
|
3539
3611
|
expiryDurationType: "expiry_duration_type",
|
|
3540
3612
|
expiryDurationLength: "expiry_duration_length"
|
|
3541
3613
|
});
|
|
@@ -3712,11 +3784,13 @@ var CreatePlanExpiryDurationTypeResponse$inboundSchema = inboundSchema(CreatePla
|
|
|
3712
3784
|
var CreatePlanRolloverResponse$inboundSchema = z19.pipe(
|
|
3713
3785
|
z19.object({
|
|
3714
3786
|
max: nullable(number2()),
|
|
3787
|
+
max_percentage: z19.optional(z19.nullable(number2())),
|
|
3715
3788
|
expiry_duration_type: CreatePlanExpiryDurationTypeResponse$inboundSchema,
|
|
3716
3789
|
expiry_duration_length: optional2(number2())
|
|
3717
3790
|
}),
|
|
3718
3791
|
z19.transform((v) => {
|
|
3719
3792
|
return remap(v, {
|
|
3793
|
+
"max_percentage": "maxPercentage",
|
|
3720
3794
|
"expiry_duration_type": "expiryDurationType",
|
|
3721
3795
|
"expiry_duration_length": "expiryDurationLength"
|
|
3722
3796
|
});
|
|
@@ -3900,12 +3974,14 @@ var CustomerAutoTopup$inboundSchema = z21.pipe(
|
|
|
3900
3974
|
quantity: number2(),
|
|
3901
3975
|
purchase_limit: optional2(
|
|
3902
3976
|
z21.lazy(() => CustomerPurchaseLimit$inboundSchema)
|
|
3903
|
-
)
|
|
3977
|
+
),
|
|
3978
|
+
invoice_mode: optional2(boolean2())
|
|
3904
3979
|
}),
|
|
3905
3980
|
z21.transform((v) => {
|
|
3906
3981
|
return remap(v, {
|
|
3907
3982
|
"feature_id": "featureId",
|
|
3908
|
-
"purchase_limit": "purchaseLimit"
|
|
3983
|
+
"purchase_limit": "purchaseLimit",
|
|
3984
|
+
"invoice_mode": "invoiceMode"
|
|
3909
3985
|
});
|
|
3910
3986
|
})
|
|
3911
3987
|
);
|
|
@@ -3938,6 +4014,17 @@ var CustomerUsageAlert$inboundSchema = z21.pipe(
|
|
|
3938
4014
|
});
|
|
3939
4015
|
})
|
|
3940
4016
|
);
|
|
4017
|
+
var CustomerOverageAllowed$inboundSchema = z21.pipe(
|
|
4018
|
+
z21.object({
|
|
4019
|
+
feature_id: string4(),
|
|
4020
|
+
enabled: z21._default(boolean2(), false)
|
|
4021
|
+
}),
|
|
4022
|
+
z21.transform((v) => {
|
|
4023
|
+
return remap(v, {
|
|
4024
|
+
"feature_id": "featureId"
|
|
4025
|
+
});
|
|
4026
|
+
})
|
|
4027
|
+
);
|
|
3941
4028
|
var CustomerBillingControls$inboundSchema = z21.pipe(
|
|
3942
4029
|
z21.object({
|
|
3943
4030
|
auto_topups: optional2(
|
|
@@ -3948,13 +4035,17 @@ var CustomerBillingControls$inboundSchema = z21.pipe(
|
|
|
3948
4035
|
),
|
|
3949
4036
|
usage_alerts: optional2(
|
|
3950
4037
|
z21.array(z21.lazy(() => CustomerUsageAlert$inboundSchema))
|
|
4038
|
+
),
|
|
4039
|
+
overage_allowed: optional2(
|
|
4040
|
+
z21.array(z21.lazy(() => CustomerOverageAllowed$inboundSchema))
|
|
3951
4041
|
)
|
|
3952
4042
|
}),
|
|
3953
4043
|
z21.transform((v) => {
|
|
3954
4044
|
return remap(v, {
|
|
3955
4045
|
"auto_topups": "autoTopups",
|
|
3956
4046
|
"spend_limits": "spendLimits",
|
|
3957
|
-
"usage_alerts": "usageAlerts"
|
|
4047
|
+
"usage_alerts": "usageAlerts",
|
|
4048
|
+
"overage_allowed": "overageAllowed"
|
|
3958
4049
|
});
|
|
3959
4050
|
})
|
|
3960
4051
|
);
|
|
@@ -4493,6 +4584,17 @@ var GetEntityUsageAlert$inboundSchema = z28.pipe(
|
|
|
4493
4584
|
});
|
|
4494
4585
|
})
|
|
4495
4586
|
);
|
|
4587
|
+
var GetEntityOverageAllowed$inboundSchema = z28.pipe(
|
|
4588
|
+
z28.object({
|
|
4589
|
+
feature_id: string4(),
|
|
4590
|
+
enabled: z28._default(boolean2(), false)
|
|
4591
|
+
}),
|
|
4592
|
+
z28.transform((v) => {
|
|
4593
|
+
return remap(v, {
|
|
4594
|
+
"feature_id": "featureId"
|
|
4595
|
+
});
|
|
4596
|
+
})
|
|
4597
|
+
);
|
|
4496
4598
|
var GetEntityBillingControls$inboundSchema = z28.pipe(
|
|
4497
4599
|
z28.object({
|
|
4498
4600
|
spend_limits: optional2(
|
|
@@ -4500,12 +4602,16 @@ var GetEntityBillingControls$inboundSchema = z28.pipe(
|
|
|
4500
4602
|
),
|
|
4501
4603
|
usage_alerts: optional2(
|
|
4502
4604
|
z28.array(z28.lazy(() => GetEntityUsageAlert$inboundSchema))
|
|
4605
|
+
),
|
|
4606
|
+
overage_allowed: optional2(
|
|
4607
|
+
z28.array(z28.lazy(() => GetEntityOverageAllowed$inboundSchema))
|
|
4503
4608
|
)
|
|
4504
4609
|
}),
|
|
4505
4610
|
z28.transform((v) => {
|
|
4506
4611
|
return remap(v, {
|
|
4507
4612
|
"spend_limits": "spendLimits",
|
|
4508
|
-
"usage_alerts": "usageAlerts"
|
|
4613
|
+
"usage_alerts": "usageAlerts",
|
|
4614
|
+
"overage_allowed": "overageAllowed"
|
|
4509
4615
|
});
|
|
4510
4616
|
})
|
|
4511
4617
|
);
|
|
@@ -4645,12 +4751,14 @@ var GetOrCreateCustomerAutoTopup$outboundSchema = z30.pipe(
|
|
|
4645
4751
|
quantity: z30.number(),
|
|
4646
4752
|
purchaseLimit: z30.optional(
|
|
4647
4753
|
z30.lazy(() => GetOrCreateCustomerPurchaseLimit$outboundSchema)
|
|
4648
|
-
)
|
|
4754
|
+
),
|
|
4755
|
+
invoiceMode: z30.optional(z30.boolean())
|
|
4649
4756
|
}),
|
|
4650
4757
|
z30.transform((v) => {
|
|
4651
4758
|
return remap(v, {
|
|
4652
4759
|
featureId: "feature_id",
|
|
4653
|
-
purchaseLimit: "purchase_limit"
|
|
4760
|
+
purchaseLimit: "purchase_limit",
|
|
4761
|
+
invoiceMode: "invoice_mode"
|
|
4654
4762
|
});
|
|
4655
4763
|
})
|
|
4656
4764
|
);
|
|
@@ -4683,6 +4791,17 @@ var GetOrCreateCustomerUsageAlert$outboundSchema = z30.pipe(
|
|
|
4683
4791
|
});
|
|
4684
4792
|
})
|
|
4685
4793
|
);
|
|
4794
|
+
var GetOrCreateCustomerOverageAllowed$outboundSchema = z30.pipe(
|
|
4795
|
+
z30.object({
|
|
4796
|
+
featureId: z30.string(),
|
|
4797
|
+
enabled: z30._default(z30.boolean(), false)
|
|
4798
|
+
}),
|
|
4799
|
+
z30.transform((v) => {
|
|
4800
|
+
return remap(v, {
|
|
4801
|
+
featureId: "feature_id"
|
|
4802
|
+
});
|
|
4803
|
+
})
|
|
4804
|
+
);
|
|
4686
4805
|
var GetOrCreateCustomerBillingControls$outboundSchema = z30.pipe(
|
|
4687
4806
|
z30.object({
|
|
4688
4807
|
autoTopups: z30.optional(
|
|
@@ -4693,13 +4812,17 @@ var GetOrCreateCustomerBillingControls$outboundSchema = z30.pipe(
|
|
|
4693
4812
|
),
|
|
4694
4813
|
usageAlerts: z30.optional(
|
|
4695
4814
|
z30.array(z30.lazy(() => GetOrCreateCustomerUsageAlert$outboundSchema))
|
|
4815
|
+
),
|
|
4816
|
+
overageAllowed: z30.optional(
|
|
4817
|
+
z30.array(z30.lazy(() => GetOrCreateCustomerOverageAllowed$outboundSchema))
|
|
4696
4818
|
)
|
|
4697
4819
|
}),
|
|
4698
4820
|
z30.transform((v) => {
|
|
4699
4821
|
return remap(v, {
|
|
4700
4822
|
autoTopups: "auto_topups",
|
|
4701
4823
|
spendLimits: "spend_limits",
|
|
4702
|
-
usageAlerts: "usage_alerts"
|
|
4824
|
+
usageAlerts: "usage_alerts",
|
|
4825
|
+
overageAllowed: "overage_allowed"
|
|
4703
4826
|
});
|
|
4704
4827
|
})
|
|
4705
4828
|
);
|
|
@@ -4924,11 +5047,13 @@ var GetPlanExpiryDurationType$inboundSchema = inboundSchema(GetPlanExpiryDuratio
|
|
|
4924
5047
|
var GetPlanRollover$inboundSchema = z31.pipe(
|
|
4925
5048
|
z31.object({
|
|
4926
5049
|
max: nullable(number2()),
|
|
5050
|
+
max_percentage: z31.optional(z31.nullable(number2())),
|
|
4927
5051
|
expiry_duration_type: GetPlanExpiryDurationType$inboundSchema,
|
|
4928
5052
|
expiry_duration_length: optional2(number2())
|
|
4929
5053
|
}),
|
|
4930
5054
|
z31.transform((v) => {
|
|
4931
5055
|
return remap(v, {
|
|
5056
|
+
"max_percentage": "maxPercentage",
|
|
4932
5057
|
"expiry_duration_type": "expiryDurationType",
|
|
4933
5058
|
"expiry_duration_length": "expiryDurationLength"
|
|
4934
5059
|
});
|
|
@@ -5118,12 +5243,14 @@ var ListCustomersAutoTopup$inboundSchema = z32.pipe(
|
|
|
5118
5243
|
quantity: number2(),
|
|
5119
5244
|
purchase_limit: optional2(
|
|
5120
5245
|
z32.lazy(() => ListCustomersPurchaseLimit$inboundSchema)
|
|
5121
|
-
)
|
|
5246
|
+
),
|
|
5247
|
+
invoice_mode: optional2(boolean2())
|
|
5122
5248
|
}),
|
|
5123
5249
|
z32.transform((v) => {
|
|
5124
5250
|
return remap(v, {
|
|
5125
5251
|
"feature_id": "featureId",
|
|
5126
|
-
"purchase_limit": "purchaseLimit"
|
|
5252
|
+
"purchase_limit": "purchaseLimit",
|
|
5253
|
+
"invoice_mode": "invoiceMode"
|
|
5127
5254
|
});
|
|
5128
5255
|
})
|
|
5129
5256
|
);
|
|
@@ -5156,6 +5283,17 @@ var ListCustomersUsageAlert$inboundSchema = z32.pipe(
|
|
|
5156
5283
|
});
|
|
5157
5284
|
})
|
|
5158
5285
|
);
|
|
5286
|
+
var ListCustomersOverageAllowed$inboundSchema = z32.pipe(
|
|
5287
|
+
z32.object({
|
|
5288
|
+
feature_id: string4(),
|
|
5289
|
+
enabled: z32._default(boolean2(), false)
|
|
5290
|
+
}),
|
|
5291
|
+
z32.transform((v) => {
|
|
5292
|
+
return remap(v, {
|
|
5293
|
+
"feature_id": "featureId"
|
|
5294
|
+
});
|
|
5295
|
+
})
|
|
5296
|
+
);
|
|
5159
5297
|
var ListCustomersBillingControls$inboundSchema = z32.pipe(
|
|
5160
5298
|
z32.object({
|
|
5161
5299
|
auto_topups: optional2(
|
|
@@ -5166,13 +5304,17 @@ var ListCustomersBillingControls$inboundSchema = z32.pipe(
|
|
|
5166
5304
|
),
|
|
5167
5305
|
usage_alerts: optional2(
|
|
5168
5306
|
z32.array(z32.lazy(() => ListCustomersUsageAlert$inboundSchema))
|
|
5307
|
+
),
|
|
5308
|
+
overage_allowed: optional2(
|
|
5309
|
+
z32.array(z32.lazy(() => ListCustomersOverageAllowed$inboundSchema))
|
|
5169
5310
|
)
|
|
5170
5311
|
}),
|
|
5171
5312
|
z32.transform((v) => {
|
|
5172
5313
|
return remap(v, {
|
|
5173
5314
|
"auto_topups": "autoTopups",
|
|
5174
5315
|
"spend_limits": "spendLimits",
|
|
5175
|
-
"usage_alerts": "usageAlerts"
|
|
5316
|
+
"usage_alerts": "usageAlerts",
|
|
5317
|
+
"overage_allowed": "overageAllowed"
|
|
5176
5318
|
});
|
|
5177
5319
|
})
|
|
5178
5320
|
);
|
|
@@ -5627,11 +5769,13 @@ var ListPlansExpiryDurationType$inboundSchema = inboundSchema(ListPlansExpiryDur
|
|
|
5627
5769
|
var ListPlansRollover$inboundSchema = z35.pipe(
|
|
5628
5770
|
z35.object({
|
|
5629
5771
|
max: nullable(number2()),
|
|
5772
|
+
max_percentage: z35.optional(z35.nullable(number2())),
|
|
5630
5773
|
expiry_duration_type: ListPlansExpiryDurationType$inboundSchema,
|
|
5631
5774
|
expiry_duration_length: optional2(number2())
|
|
5632
5775
|
}),
|
|
5633
5776
|
z35.transform((v) => {
|
|
5634
5777
|
return remap(v, {
|
|
5778
|
+
"max_percentage": "maxPercentage",
|
|
5635
5779
|
"expiry_duration_type": "expiryDurationType",
|
|
5636
5780
|
"expiry_duration_length": "expiryDurationLength"
|
|
5637
5781
|
});
|
|
@@ -5875,11 +6019,13 @@ var MultiAttachExpiryDurationType$outboundSchema = z36.enum(MultiAttachExpiryDur
|
|
|
5875
6019
|
var MultiAttachRollover$outboundSchema = z36.pipe(
|
|
5876
6020
|
z36.object({
|
|
5877
6021
|
max: z36.optional(z36.number()),
|
|
6022
|
+
maxPercentage: z36.optional(z36.number()),
|
|
5878
6023
|
expiryDurationType: MultiAttachExpiryDurationType$outboundSchema,
|
|
5879
6024
|
expiryDurationLength: z36.optional(z36.number())
|
|
5880
6025
|
}),
|
|
5881
6026
|
z36.transform((v) => {
|
|
5882
6027
|
return remap(v, {
|
|
6028
|
+
maxPercentage: "max_percentage",
|
|
5883
6029
|
expiryDurationType: "expiry_duration_type",
|
|
5884
6030
|
expiryDurationLength: "expiry_duration_length"
|
|
5885
6031
|
});
|
|
@@ -6006,6 +6152,17 @@ var MultiAttachUsageAlert$outboundSchema = z36.pipe(
|
|
|
6006
6152
|
});
|
|
6007
6153
|
})
|
|
6008
6154
|
);
|
|
6155
|
+
var MultiAttachOverageAllowed$outboundSchema = z36.pipe(
|
|
6156
|
+
z36.object({
|
|
6157
|
+
featureId: z36.string(),
|
|
6158
|
+
enabled: z36._default(z36.boolean(), false)
|
|
6159
|
+
}),
|
|
6160
|
+
z36.transform((v) => {
|
|
6161
|
+
return remap(v, {
|
|
6162
|
+
featureId: "feature_id"
|
|
6163
|
+
});
|
|
6164
|
+
})
|
|
6165
|
+
);
|
|
6009
6166
|
var MultiAttachBillingControls$outboundSchema = z36.pipe(
|
|
6010
6167
|
z36.object({
|
|
6011
6168
|
spendLimits: z36.optional(
|
|
@@ -6013,12 +6170,16 @@ var MultiAttachBillingControls$outboundSchema = z36.pipe(
|
|
|
6013
6170
|
),
|
|
6014
6171
|
usageAlerts: z36.optional(
|
|
6015
6172
|
z36.array(z36.lazy(() => MultiAttachUsageAlert$outboundSchema))
|
|
6173
|
+
),
|
|
6174
|
+
overageAllowed: z36.optional(
|
|
6175
|
+
z36.array(z36.lazy(() => MultiAttachOverageAllowed$outboundSchema))
|
|
6016
6176
|
)
|
|
6017
6177
|
}),
|
|
6018
6178
|
z36.transform((v) => {
|
|
6019
6179
|
return remap(v, {
|
|
6020
6180
|
spendLimits: "spend_limits",
|
|
6021
|
-
usageAlerts: "usage_alerts"
|
|
6181
|
+
usageAlerts: "usage_alerts",
|
|
6182
|
+
overageAllowed: "overage_allowed"
|
|
6022
6183
|
});
|
|
6023
6184
|
})
|
|
6024
6185
|
);
|
|
@@ -6312,11 +6473,13 @@ var PreviewAttachExpiryDurationType$outboundSchema = z38.enum(PreviewAttachExpir
|
|
|
6312
6473
|
var PreviewAttachRollover$outboundSchema = z38.pipe(
|
|
6313
6474
|
z38.object({
|
|
6314
6475
|
max: z38.optional(z38.number()),
|
|
6476
|
+
maxPercentage: z38.optional(z38.number()),
|
|
6315
6477
|
expiryDurationType: PreviewAttachExpiryDurationType$outboundSchema,
|
|
6316
6478
|
expiryDurationLength: z38.optional(z38.number())
|
|
6317
6479
|
}),
|
|
6318
6480
|
z38.transform((v) => {
|
|
6319
6481
|
return remap(v, {
|
|
6482
|
+
maxPercentage: "max_percentage",
|
|
6320
6483
|
expiryDurationType: "expiry_duration_type",
|
|
6321
6484
|
expiryDurationLength: "expiry_duration_length"
|
|
6322
6485
|
});
|
|
@@ -6860,11 +7023,13 @@ var PreviewMultiAttachExpiryDurationType$outboundSchema = z39.enum(PreviewMultiA
|
|
|
6860
7023
|
var PreviewMultiAttachRollover$outboundSchema = z39.pipe(
|
|
6861
7024
|
z39.object({
|
|
6862
7025
|
max: z39.optional(z39.number()),
|
|
7026
|
+
maxPercentage: z39.optional(z39.number()),
|
|
6863
7027
|
expiryDurationType: PreviewMultiAttachExpiryDurationType$outboundSchema,
|
|
6864
7028
|
expiryDurationLength: z39.optional(z39.number())
|
|
6865
7029
|
}),
|
|
6866
7030
|
z39.transform((v) => {
|
|
6867
7031
|
return remap(v, {
|
|
7032
|
+
maxPercentage: "max_percentage",
|
|
6868
7033
|
expiryDurationType: "expiry_duration_type",
|
|
6869
7034
|
expiryDurationLength: "expiry_duration_length"
|
|
6870
7035
|
});
|
|
@@ -7004,6 +7169,17 @@ var PreviewMultiAttachUsageAlert$outboundSchema = z39.pipe(
|
|
|
7004
7169
|
});
|
|
7005
7170
|
})
|
|
7006
7171
|
);
|
|
7172
|
+
var PreviewMultiAttachOverageAllowed$outboundSchema = z39.pipe(
|
|
7173
|
+
z39.object({
|
|
7174
|
+
featureId: z39.string(),
|
|
7175
|
+
enabled: z39._default(z39.boolean(), false)
|
|
7176
|
+
}),
|
|
7177
|
+
z39.transform((v) => {
|
|
7178
|
+
return remap(v, {
|
|
7179
|
+
featureId: "feature_id"
|
|
7180
|
+
});
|
|
7181
|
+
})
|
|
7182
|
+
);
|
|
7007
7183
|
var PreviewMultiAttachBillingControls$outboundSchema = z39.pipe(
|
|
7008
7184
|
z39.object({
|
|
7009
7185
|
spendLimits: z39.optional(
|
|
@@ -7011,12 +7187,16 @@ var PreviewMultiAttachBillingControls$outboundSchema = z39.pipe(
|
|
|
7011
7187
|
),
|
|
7012
7188
|
usageAlerts: z39.optional(
|
|
7013
7189
|
z39.array(z39.lazy(() => PreviewMultiAttachUsageAlert$outboundSchema))
|
|
7190
|
+
),
|
|
7191
|
+
overageAllowed: z39.optional(
|
|
7192
|
+
z39.array(z39.lazy(() => PreviewMultiAttachOverageAllowed$outboundSchema))
|
|
7014
7193
|
)
|
|
7015
7194
|
}),
|
|
7016
7195
|
z39.transform((v) => {
|
|
7017
7196
|
return remap(v, {
|
|
7018
7197
|
spendLimits: "spend_limits",
|
|
7019
|
-
usageAlerts: "usage_alerts"
|
|
7198
|
+
usageAlerts: "usage_alerts",
|
|
7199
|
+
overageAllowed: "overage_allowed"
|
|
7020
7200
|
});
|
|
7021
7201
|
})
|
|
7022
7202
|
);
|
|
@@ -7472,11 +7652,13 @@ var PreviewUpdateExpiryDurationType$outboundSchema = z40.enum(PreviewUpdateExpir
|
|
|
7472
7652
|
var PreviewUpdateRollover$outboundSchema = z40.pipe(
|
|
7473
7653
|
z40.object({
|
|
7474
7654
|
max: z40.optional(z40.number()),
|
|
7655
|
+
maxPercentage: z40.optional(z40.number()),
|
|
7475
7656
|
expiryDurationType: PreviewUpdateExpiryDurationType$outboundSchema,
|
|
7476
7657
|
expiryDurationLength: z40.optional(z40.number())
|
|
7477
7658
|
}),
|
|
7478
7659
|
z40.transform((v) => {
|
|
7479
7660
|
return remap(v, {
|
|
7661
|
+
maxPercentage: "max_percentage",
|
|
7480
7662
|
expiryDurationType: "expiry_duration_type",
|
|
7481
7663
|
expiryDurationLength: "expiry_duration_length"
|
|
7482
7664
|
});
|
|
@@ -7992,11 +8174,13 @@ var SetupPaymentExpiryDurationType$outboundSchema = z42.enum(SetupPaymentExpiryD
|
|
|
7992
8174
|
var SetupPaymentRollover$outboundSchema = z42.pipe(
|
|
7993
8175
|
z42.object({
|
|
7994
8176
|
max: z42.optional(z42.number()),
|
|
8177
|
+
maxPercentage: z42.optional(z42.number()),
|
|
7995
8178
|
expiryDurationType: SetupPaymentExpiryDurationType$outboundSchema,
|
|
7996
8179
|
expiryDurationLength: z42.optional(z42.number())
|
|
7997
8180
|
}),
|
|
7998
8181
|
z42.transform((v) => {
|
|
7999
8182
|
return remap(v, {
|
|
8183
|
+
maxPercentage: "max_percentage",
|
|
8000
8184
|
expiryDurationType: "expiry_duration_type",
|
|
8001
8185
|
expiryDurationLength: "expiry_duration_length"
|
|
8002
8186
|
});
|
|
@@ -8301,12 +8485,14 @@ var UpdateCustomerAutoTopupRequest$outboundSchema = z45.pipe(
|
|
|
8301
8485
|
quantity: z45.number(),
|
|
8302
8486
|
purchaseLimit: z45.optional(
|
|
8303
8487
|
z45.lazy(() => UpdateCustomerPurchaseLimitRequest$outboundSchema)
|
|
8304
|
-
)
|
|
8488
|
+
),
|
|
8489
|
+
invoiceMode: z45.optional(z45.boolean())
|
|
8305
8490
|
}),
|
|
8306
8491
|
z45.transform((v) => {
|
|
8307
8492
|
return remap(v, {
|
|
8308
8493
|
featureId: "feature_id",
|
|
8309
|
-
purchaseLimit: "purchase_limit"
|
|
8494
|
+
purchaseLimit: "purchase_limit",
|
|
8495
|
+
invoiceMode: "invoice_mode"
|
|
8310
8496
|
});
|
|
8311
8497
|
})
|
|
8312
8498
|
);
|
|
@@ -8341,6 +8527,17 @@ var UpdateCustomerUsageAlertRequestBody$outboundSchema = z45.pipe(
|
|
|
8341
8527
|
});
|
|
8342
8528
|
})
|
|
8343
8529
|
);
|
|
8530
|
+
var UpdateCustomerOverageAllowedRequest$outboundSchema = z45.pipe(
|
|
8531
|
+
z45.object({
|
|
8532
|
+
featureId: z45.string(),
|
|
8533
|
+
enabled: z45._default(z45.boolean(), false)
|
|
8534
|
+
}),
|
|
8535
|
+
z45.transform((v) => {
|
|
8536
|
+
return remap(v, {
|
|
8537
|
+
featureId: "feature_id"
|
|
8538
|
+
});
|
|
8539
|
+
})
|
|
8540
|
+
);
|
|
8344
8541
|
var UpdateCustomerBillingControlsRequest$outboundSchema = z45.pipe(
|
|
8345
8542
|
z45.object({
|
|
8346
8543
|
autoTopups: z45.optional(
|
|
@@ -8351,13 +8548,17 @@ var UpdateCustomerBillingControlsRequest$outboundSchema = z45.pipe(
|
|
|
8351
8548
|
),
|
|
8352
8549
|
usageAlerts: z45.optional(
|
|
8353
8550
|
z45.array(z45.lazy(() => UpdateCustomerUsageAlertRequestBody$outboundSchema))
|
|
8551
|
+
),
|
|
8552
|
+
overageAllowed: z45.optional(
|
|
8553
|
+
z45.array(z45.lazy(() => UpdateCustomerOverageAllowedRequest$outboundSchema))
|
|
8354
8554
|
)
|
|
8355
8555
|
}),
|
|
8356
8556
|
z45.transform((v) => {
|
|
8357
8557
|
return remap(v, {
|
|
8358
8558
|
autoTopups: "auto_topups",
|
|
8359
8559
|
spendLimits: "spend_limits",
|
|
8360
|
-
usageAlerts: "usage_alerts"
|
|
8560
|
+
usageAlerts: "usage_alerts",
|
|
8561
|
+
overageAllowed: "overage_allowed"
|
|
8361
8562
|
});
|
|
8362
8563
|
})
|
|
8363
8564
|
);
|
|
@@ -8407,12 +8608,14 @@ var UpdateCustomerAutoTopupResponse$inboundSchema = z45.pipe(
|
|
|
8407
8608
|
quantity: number2(),
|
|
8408
8609
|
purchase_limit: optional2(
|
|
8409
8610
|
z45.lazy(() => UpdateCustomerPurchaseLimitResponse$inboundSchema)
|
|
8410
|
-
)
|
|
8611
|
+
),
|
|
8612
|
+
invoice_mode: optional2(boolean2())
|
|
8411
8613
|
}),
|
|
8412
8614
|
z45.transform((v) => {
|
|
8413
8615
|
return remap(v, {
|
|
8414
8616
|
"feature_id": "featureId",
|
|
8415
|
-
"purchase_limit": "purchaseLimit"
|
|
8617
|
+
"purchase_limit": "purchaseLimit",
|
|
8618
|
+
"invoice_mode": "invoiceMode"
|
|
8416
8619
|
});
|
|
8417
8620
|
})
|
|
8418
8621
|
);
|
|
@@ -8445,6 +8648,17 @@ var UpdateCustomerUsageAlertResponse$inboundSchema = z45.pipe(
|
|
|
8445
8648
|
});
|
|
8446
8649
|
})
|
|
8447
8650
|
);
|
|
8651
|
+
var UpdateCustomerOverageAllowedResponse$inboundSchema = z45.pipe(
|
|
8652
|
+
z45.object({
|
|
8653
|
+
feature_id: string4(),
|
|
8654
|
+
enabled: z45._default(boolean2(), false)
|
|
8655
|
+
}),
|
|
8656
|
+
z45.transform((v) => {
|
|
8657
|
+
return remap(v, {
|
|
8658
|
+
"feature_id": "featureId"
|
|
8659
|
+
});
|
|
8660
|
+
})
|
|
8661
|
+
);
|
|
8448
8662
|
var UpdateCustomerBillingControlsResponse$inboundSchema = z45.pipe(
|
|
8449
8663
|
z45.object({
|
|
8450
8664
|
auto_topups: optional2(
|
|
@@ -8455,13 +8669,17 @@ var UpdateCustomerBillingControlsResponse$inboundSchema = z45.pipe(
|
|
|
8455
8669
|
),
|
|
8456
8670
|
usage_alerts: optional2(
|
|
8457
8671
|
z45.array(z45.lazy(() => UpdateCustomerUsageAlertResponse$inboundSchema))
|
|
8672
|
+
),
|
|
8673
|
+
overage_allowed: optional2(
|
|
8674
|
+
z45.array(z45.lazy(() => UpdateCustomerOverageAllowedResponse$inboundSchema))
|
|
8458
8675
|
)
|
|
8459
8676
|
}),
|
|
8460
8677
|
z45.transform((v) => {
|
|
8461
8678
|
return remap(v, {
|
|
8462
8679
|
"auto_topups": "autoTopups",
|
|
8463
8680
|
"spend_limits": "spendLimits",
|
|
8464
|
-
"usage_alerts": "usageAlerts"
|
|
8681
|
+
"usage_alerts": "usageAlerts",
|
|
8682
|
+
"overage_allowed": "overageAllowed"
|
|
8465
8683
|
});
|
|
8466
8684
|
})
|
|
8467
8685
|
);
|
|
@@ -8653,6 +8871,17 @@ var UpdateEntityUsageAlertRequestBody$outboundSchema = z46.pipe(
|
|
|
8653
8871
|
});
|
|
8654
8872
|
})
|
|
8655
8873
|
);
|
|
8874
|
+
var UpdateEntityOverageAllowedRequest$outboundSchema = z46.pipe(
|
|
8875
|
+
z46.object({
|
|
8876
|
+
featureId: z46.string(),
|
|
8877
|
+
enabled: z46._default(z46.boolean(), false)
|
|
8878
|
+
}),
|
|
8879
|
+
z46.transform((v) => {
|
|
8880
|
+
return remap(v, {
|
|
8881
|
+
featureId: "feature_id"
|
|
8882
|
+
});
|
|
8883
|
+
})
|
|
8884
|
+
);
|
|
8656
8885
|
var UpdateEntityBillingControlsRequest$outboundSchema = z46.pipe(
|
|
8657
8886
|
z46.object({
|
|
8658
8887
|
spendLimits: z46.optional(
|
|
@@ -8660,12 +8889,16 @@ var UpdateEntityBillingControlsRequest$outboundSchema = z46.pipe(
|
|
|
8660
8889
|
),
|
|
8661
8890
|
usageAlerts: z46.optional(
|
|
8662
8891
|
z46.array(z46.lazy(() => UpdateEntityUsageAlertRequestBody$outboundSchema))
|
|
8892
|
+
),
|
|
8893
|
+
overageAllowed: z46.optional(
|
|
8894
|
+
z46.array(z46.lazy(() => UpdateEntityOverageAllowedRequest$outboundSchema))
|
|
8663
8895
|
)
|
|
8664
8896
|
}),
|
|
8665
8897
|
z46.transform((v) => {
|
|
8666
8898
|
return remap(v, {
|
|
8667
8899
|
spendLimits: "spend_limits",
|
|
8668
|
-
usageAlerts: "usage_alerts"
|
|
8900
|
+
usageAlerts: "usage_alerts",
|
|
8901
|
+
overageAllowed: "overage_allowed"
|
|
8669
8902
|
});
|
|
8670
8903
|
})
|
|
8671
8904
|
);
|
|
@@ -8817,6 +9050,17 @@ var UpdateEntityUsageAlertResponse$inboundSchema = z46.pipe(
|
|
|
8817
9050
|
});
|
|
8818
9051
|
})
|
|
8819
9052
|
);
|
|
9053
|
+
var UpdateEntityOverageAllowedResponse$inboundSchema = z46.pipe(
|
|
9054
|
+
z46.object({
|
|
9055
|
+
feature_id: string4(),
|
|
9056
|
+
enabled: z46._default(boolean2(), false)
|
|
9057
|
+
}),
|
|
9058
|
+
z46.transform((v) => {
|
|
9059
|
+
return remap(v, {
|
|
9060
|
+
"feature_id": "featureId"
|
|
9061
|
+
});
|
|
9062
|
+
})
|
|
9063
|
+
);
|
|
8820
9064
|
var UpdateEntityBillingControlsResponse$inboundSchema = z46.pipe(
|
|
8821
9065
|
z46.object({
|
|
8822
9066
|
spend_limits: optional2(
|
|
@@ -8824,12 +9068,16 @@ var UpdateEntityBillingControlsResponse$inboundSchema = z46.pipe(
|
|
|
8824
9068
|
),
|
|
8825
9069
|
usage_alerts: optional2(
|
|
8826
9070
|
z46.array(z46.lazy(() => UpdateEntityUsageAlertResponse$inboundSchema))
|
|
9071
|
+
),
|
|
9072
|
+
overage_allowed: optional2(
|
|
9073
|
+
z46.array(z46.lazy(() => UpdateEntityOverageAllowedResponse$inboundSchema))
|
|
8827
9074
|
)
|
|
8828
9075
|
}),
|
|
8829
9076
|
z46.transform((v) => {
|
|
8830
9077
|
return remap(v, {
|
|
8831
9078
|
"spend_limits": "spendLimits",
|
|
8832
|
-
"usage_alerts": "usageAlerts"
|
|
9079
|
+
"usage_alerts": "usageAlerts",
|
|
9080
|
+
"overage_allowed": "overageAllowed"
|
|
8833
9081
|
});
|
|
8834
9082
|
})
|
|
8835
9083
|
);
|
|
@@ -9182,11 +9430,13 @@ var UpdatePlanExpiryDurationTypeRequest$outboundSchema = z48.enum(UpdatePlanExpi
|
|
|
9182
9430
|
var UpdatePlanRolloverRequest$outboundSchema = z48.pipe(
|
|
9183
9431
|
z48.object({
|
|
9184
9432
|
max: z48.optional(z48.number()),
|
|
9433
|
+
maxPercentage: z48.optional(z48.number()),
|
|
9185
9434
|
expiryDurationType: UpdatePlanExpiryDurationTypeRequest$outboundSchema,
|
|
9186
9435
|
expiryDurationLength: z48.optional(z48.number())
|
|
9187
9436
|
}),
|
|
9188
9437
|
z48.transform((v) => {
|
|
9189
9438
|
return remap(v, {
|
|
9439
|
+
maxPercentage: "max_percentage",
|
|
9190
9440
|
expiryDurationType: "expiry_duration_type",
|
|
9191
9441
|
expiryDurationLength: "expiry_duration_length"
|
|
9192
9442
|
});
|
|
@@ -9371,11 +9621,13 @@ var UpdatePlanExpiryDurationTypeResponse$inboundSchema = inboundSchema(UpdatePla
|
|
|
9371
9621
|
var UpdatePlanRolloverResponse$inboundSchema = z48.pipe(
|
|
9372
9622
|
z48.object({
|
|
9373
9623
|
max: nullable(number2()),
|
|
9624
|
+
max_percentage: z48.optional(z48.nullable(number2())),
|
|
9374
9625
|
expiry_duration_type: UpdatePlanExpiryDurationTypeResponse$inboundSchema,
|
|
9375
9626
|
expiry_duration_length: optional2(number2())
|
|
9376
9627
|
}),
|
|
9377
9628
|
z48.transform((v) => {
|
|
9378
9629
|
return remap(v, {
|
|
9630
|
+
"max_percentage": "maxPercentage",
|
|
9379
9631
|
"expiry_duration_type": "expiryDurationType",
|
|
9380
9632
|
"expiry_duration_length": "expiryDurationLength"
|
|
9381
9633
|
});
|
|
@@ -9652,7 +9904,8 @@ async function $do2(client, request, options) {
|
|
|
9652
9904
|
var FAIL_OPEN_OPERATION_IDS = /* @__PURE__ */ new Set([
|
|
9653
9905
|
"check",
|
|
9654
9906
|
"track",
|
|
9655
|
-
"getOrCreateCustomer"
|
|
9907
|
+
"getOrCreateCustomer",
|
|
9908
|
+
"getEntity"
|
|
9656
9909
|
]);
|
|
9657
9910
|
var FAIL_OPEN_LOG_MESSAGE = "[Autumn] Request failed \u2014 failing open. Learn more: https://docs.useautumn.com/documentation/fail-open";
|
|
9658
9911
|
var FAIL_OPEN_BODIES = {
|
|
@@ -9682,6 +9935,18 @@ var FAIL_OPEN_BODIES = {
|
|
|
9682
9935
|
purchases: [],
|
|
9683
9936
|
balances: {},
|
|
9684
9937
|
flags: {}
|
|
9938
|
+
},
|
|
9939
|
+
getEntity: {
|
|
9940
|
+
id: null,
|
|
9941
|
+
name: null,
|
|
9942
|
+
customer_id: null,
|
|
9943
|
+
feature_id: null,
|
|
9944
|
+
created_at: 0,
|
|
9945
|
+
env: "live",
|
|
9946
|
+
subscriptions: [],
|
|
9947
|
+
purchases: [],
|
|
9948
|
+
balances: {},
|
|
9949
|
+
flags: {}
|
|
9685
9950
|
}
|
|
9686
9951
|
};
|
|
9687
9952
|
var FailOpenHook = class {
|
|
@@ -9862,8 +10127,8 @@ var SDK_METADATA = {
|
|
|
9862
10127
|
language: "typescript",
|
|
9863
10128
|
openapiDocVersion: "2.2.0",
|
|
9864
10129
|
sdkVersion: "0.10.17",
|
|
9865
|
-
genVersion: "2.
|
|
9866
|
-
userAgent: "speakeasy-sdk/typescript 0.10.17 2.
|
|
10130
|
+
genVersion: "2.879.6",
|
|
10131
|
+
userAgent: "speakeasy-sdk/typescript 0.10.17 2.879.6 2.2.0 @useautumn/sdk"
|
|
9867
10132
|
};
|
|
9868
10133
|
|
|
9869
10134
|
// ../sdk/src/lib/retries.ts
|