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
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
routeConfigs,
|
|
9
9
|
sanitizeBody,
|
|
10
10
|
secretKeyCheck
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CG3LL2TQ.mjs";
|
|
12
12
|
import {
|
|
13
13
|
getActiveOrganization
|
|
14
14
|
} from "./chunk-BT3EAYVW.mjs";
|
|
@@ -60,8 +60,8 @@ var SDK_METADATA = {
|
|
|
60
60
|
language: "typescript",
|
|
61
61
|
openapiDocVersion: "2.2.0",
|
|
62
62
|
sdkVersion: "0.10.17",
|
|
63
|
-
genVersion: "2.
|
|
64
|
-
userAgent: "speakeasy-sdk/typescript 0.10.17 2.
|
|
63
|
+
genVersion: "2.879.6",
|
|
64
|
+
userAgent: "speakeasy-sdk/typescript 0.10.17 2.879.6 2.2.0 @useautumn/sdk"
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
// ../sdk/src/lib/http.ts
|
|
@@ -983,8 +983,8 @@ function applyBearer(state, spec) {
|
|
|
983
983
|
state.headers[spec.fieldName] = value;
|
|
984
984
|
}
|
|
985
985
|
}
|
|
986
|
-
function resolveGlobalSecurity(security) {
|
|
987
|
-
|
|
986
|
+
function resolveGlobalSecurity(security, allowedFields) {
|
|
987
|
+
let inputs = [
|
|
988
988
|
[
|
|
989
989
|
{
|
|
990
990
|
fieldName: "Authorization",
|
|
@@ -992,7 +992,16 @@ function resolveGlobalSecurity(security) {
|
|
|
992
992
|
value: security?.secretKey ?? env().AUTUMN_SECRET_KEY
|
|
993
993
|
}
|
|
994
994
|
]
|
|
995
|
-
|
|
995
|
+
];
|
|
996
|
+
if (allowedFields) {
|
|
997
|
+
inputs = allowedFields.map((i) => {
|
|
998
|
+
if (i < 0 || i >= inputs.length) {
|
|
999
|
+
throw new RangeError(`invalid allowedFields index ${i}`);
|
|
1000
|
+
}
|
|
1001
|
+
return inputs[i];
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
1004
|
+
return resolveSecurity(...inputs);
|
|
996
1005
|
}
|
|
997
1006
|
async function extractSecurity(sec) {
|
|
998
1007
|
if (sec == null) {
|
|
@@ -1539,11 +1548,13 @@ var AttachExpiryDurationType$outboundSchema = z10.enum(AttachExpiryDurationType)
|
|
|
1539
1548
|
var AttachRollover$outboundSchema = z10.pipe(
|
|
1540
1549
|
z10.object({
|
|
1541
1550
|
max: z10.optional(z10.number()),
|
|
1551
|
+
maxPercentage: z10.optional(z10.number()),
|
|
1542
1552
|
expiryDurationType: AttachExpiryDurationType$outboundSchema,
|
|
1543
1553
|
expiryDurationLength: z10.optional(z10.number())
|
|
1544
1554
|
}),
|
|
1545
1555
|
z10.transform((v) => {
|
|
1546
1556
|
return remap(v, {
|
|
1557
|
+
maxPercentage: "max_percentage",
|
|
1547
1558
|
expiryDurationType: "expiry_duration_type",
|
|
1548
1559
|
expiryDurationLength: "expiry_duration_length"
|
|
1549
1560
|
});
|
|
@@ -2068,11 +2079,13 @@ var BillingUpdateExpiryDurationType$outboundSchema = z12.enum(BillingUpdateExpir
|
|
|
2068
2079
|
var BillingUpdateRollover$outboundSchema = z12.pipe(
|
|
2069
2080
|
z12.object({
|
|
2070
2081
|
max: z12.optional(z12.number()),
|
|
2082
|
+
maxPercentage: z12.optional(z12.number()),
|
|
2071
2083
|
expiryDurationType: BillingUpdateExpiryDurationType$outboundSchema,
|
|
2072
2084
|
expiryDurationLength: z12.optional(z12.number())
|
|
2073
2085
|
}),
|
|
2074
2086
|
z12.transform((v) => {
|
|
2075
2087
|
return remap(v, {
|
|
2088
|
+
maxPercentage: "max_percentage",
|
|
2076
2089
|
expiryDurationType: "expiry_duration_type",
|
|
2077
2090
|
expiryDurationLength: "expiry_duration_length"
|
|
2078
2091
|
});
|
|
@@ -2414,11 +2427,19 @@ var ProductDisplay$inboundSchema = z13.pipe(
|
|
|
2414
2427
|
})
|
|
2415
2428
|
);
|
|
2416
2429
|
var RolloverDuration$inboundSchema = inboundSchema(RolloverDuration);
|
|
2417
|
-
var CheckRollover$inboundSchema = z13.
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2430
|
+
var CheckRollover$inboundSchema = z13.pipe(
|
|
2431
|
+
z13.object({
|
|
2432
|
+
max: z13.optional(z13.nullable(number2())),
|
|
2433
|
+
max_percentage: z13.optional(z13.nullable(number2())),
|
|
2434
|
+
duration: z13._default(RolloverDuration$inboundSchema, "month"),
|
|
2435
|
+
length: number2()
|
|
2436
|
+
}),
|
|
2437
|
+
z13.transform((v) => {
|
|
2438
|
+
return remap(v, {
|
|
2439
|
+
"max_percentage": "maxPercentage"
|
|
2440
|
+
});
|
|
2441
|
+
})
|
|
2442
|
+
);
|
|
2422
2443
|
var CheckOnIncrease$inboundSchema = inboundSchema(CheckOnIncrease);
|
|
2423
2444
|
var CheckOnDecrease$inboundSchema = inboundSchema(CheckOnDecrease);
|
|
2424
2445
|
var Config$inboundSchema = z13.pipe(
|
|
@@ -2657,12 +2678,14 @@ var CustomerDataAutoTopup$outboundSchema = z15.pipe(
|
|
|
2657
2678
|
quantity: z15.number(),
|
|
2658
2679
|
purchaseLimit: z15.optional(
|
|
2659
2680
|
z15.lazy(() => CustomerDataPurchaseLimit$outboundSchema)
|
|
2660
|
-
)
|
|
2681
|
+
),
|
|
2682
|
+
invoiceMode: z15.optional(z15.boolean())
|
|
2661
2683
|
}),
|
|
2662
2684
|
z15.transform((v) => {
|
|
2663
2685
|
return remap(v, {
|
|
2664
2686
|
featureId: "feature_id",
|
|
2665
|
-
purchaseLimit: "purchase_limit"
|
|
2687
|
+
purchaseLimit: "purchase_limit",
|
|
2688
|
+
invoiceMode: "invoice_mode"
|
|
2666
2689
|
});
|
|
2667
2690
|
})
|
|
2668
2691
|
);
|
|
@@ -2695,6 +2718,17 @@ var CustomerDataUsageAlert$outboundSchema = z15.pipe(
|
|
|
2695
2718
|
});
|
|
2696
2719
|
})
|
|
2697
2720
|
);
|
|
2721
|
+
var CustomerDataOverageAllowed$outboundSchema = z15.pipe(
|
|
2722
|
+
z15.object({
|
|
2723
|
+
featureId: z15.string(),
|
|
2724
|
+
enabled: z15._default(z15.boolean(), false)
|
|
2725
|
+
}),
|
|
2726
|
+
z15.transform((v) => {
|
|
2727
|
+
return remap(v, {
|
|
2728
|
+
featureId: "feature_id"
|
|
2729
|
+
});
|
|
2730
|
+
})
|
|
2731
|
+
);
|
|
2698
2732
|
var CustomerDataBillingControls$outboundSchema = z15.pipe(
|
|
2699
2733
|
z15.object({
|
|
2700
2734
|
autoTopups: z15.optional(
|
|
@@ -2705,13 +2739,17 @@ var CustomerDataBillingControls$outboundSchema = z15.pipe(
|
|
|
2705
2739
|
),
|
|
2706
2740
|
usageAlerts: z15.optional(
|
|
2707
2741
|
z15.array(z15.lazy(() => CustomerDataUsageAlert$outboundSchema))
|
|
2742
|
+
),
|
|
2743
|
+
overageAllowed: z15.optional(
|
|
2744
|
+
z15.array(z15.lazy(() => CustomerDataOverageAllowed$outboundSchema))
|
|
2708
2745
|
)
|
|
2709
2746
|
}),
|
|
2710
2747
|
z15.transform((v) => {
|
|
2711
2748
|
return remap(v, {
|
|
2712
2749
|
autoTopups: "auto_topups",
|
|
2713
2750
|
spendLimits: "spend_limits",
|
|
2714
|
-
usageAlerts: "usage_alerts"
|
|
2751
|
+
usageAlerts: "usage_alerts",
|
|
2752
|
+
overageAllowed: "overage_allowed"
|
|
2715
2753
|
});
|
|
2716
2754
|
})
|
|
2717
2755
|
);
|
|
@@ -2922,11 +2960,13 @@ var ExpiryDurationType$inboundSchema = inboundSchema(ExpiryDurationType);
|
|
|
2922
2960
|
var PlanRollover$inboundSchema = z16.pipe(
|
|
2923
2961
|
z16.object({
|
|
2924
2962
|
max: nullable(number2()),
|
|
2963
|
+
max_percentage: z16.optional(z16.nullable(number2())),
|
|
2925
2964
|
expiry_duration_type: ExpiryDurationType$inboundSchema,
|
|
2926
2965
|
expiry_duration_length: optional2(number2())
|
|
2927
2966
|
}),
|
|
2928
2967
|
z16.transform((v) => {
|
|
2929
2968
|
return remap(v, {
|
|
2969
|
+
"max_percentage": "maxPercentage",
|
|
2930
2970
|
"expiry_duration_type": "expiryDurationType",
|
|
2931
2971
|
"expiry_duration_length": "expiryDurationLength"
|
|
2932
2972
|
});
|
|
@@ -3065,6 +3105,17 @@ var CreateEntityUsageAlertRequestBody$outboundSchema = z17.pipe(
|
|
|
3065
3105
|
});
|
|
3066
3106
|
})
|
|
3067
3107
|
);
|
|
3108
|
+
var CreateEntityOverageAllowedRequest$outboundSchema = z17.pipe(
|
|
3109
|
+
z17.object({
|
|
3110
|
+
featureId: z17.string(),
|
|
3111
|
+
enabled: z17._default(z17.boolean(), false)
|
|
3112
|
+
}),
|
|
3113
|
+
z17.transform((v) => {
|
|
3114
|
+
return remap(v, {
|
|
3115
|
+
featureId: "feature_id"
|
|
3116
|
+
});
|
|
3117
|
+
})
|
|
3118
|
+
);
|
|
3068
3119
|
var CreateEntityBillingControlsRequest$outboundSchema = z17.pipe(
|
|
3069
3120
|
z17.object({
|
|
3070
3121
|
spendLimits: z17.optional(
|
|
@@ -3072,12 +3123,16 @@ var CreateEntityBillingControlsRequest$outboundSchema = z17.pipe(
|
|
|
3072
3123
|
),
|
|
3073
3124
|
usageAlerts: z17.optional(
|
|
3074
3125
|
z17.array(z17.lazy(() => CreateEntityUsageAlertRequestBody$outboundSchema))
|
|
3126
|
+
),
|
|
3127
|
+
overageAllowed: z17.optional(
|
|
3128
|
+
z17.array(z17.lazy(() => CreateEntityOverageAllowedRequest$outboundSchema))
|
|
3075
3129
|
)
|
|
3076
3130
|
}),
|
|
3077
3131
|
z17.transform((v) => {
|
|
3078
3132
|
return remap(v, {
|
|
3079
3133
|
spendLimits: "spend_limits",
|
|
3080
|
-
usageAlerts: "usage_alerts"
|
|
3134
|
+
usageAlerts: "usage_alerts",
|
|
3135
|
+
overageAllowed: "overage_allowed"
|
|
3081
3136
|
});
|
|
3082
3137
|
})
|
|
3083
3138
|
);
|
|
@@ -3234,6 +3289,17 @@ var CreateEntityUsageAlertResponse$inboundSchema = z17.pipe(
|
|
|
3234
3289
|
});
|
|
3235
3290
|
})
|
|
3236
3291
|
);
|
|
3292
|
+
var CreateEntityOverageAllowedResponse$inboundSchema = z17.pipe(
|
|
3293
|
+
z17.object({
|
|
3294
|
+
feature_id: string4(),
|
|
3295
|
+
enabled: z17._default(boolean2(), false)
|
|
3296
|
+
}),
|
|
3297
|
+
z17.transform((v) => {
|
|
3298
|
+
return remap(v, {
|
|
3299
|
+
"feature_id": "featureId"
|
|
3300
|
+
});
|
|
3301
|
+
})
|
|
3302
|
+
);
|
|
3237
3303
|
var CreateEntityBillingControlsResponse$inboundSchema = z17.pipe(
|
|
3238
3304
|
z17.object({
|
|
3239
3305
|
spend_limits: optional2(
|
|
@@ -3241,12 +3307,16 @@ var CreateEntityBillingControlsResponse$inboundSchema = z17.pipe(
|
|
|
3241
3307
|
),
|
|
3242
3308
|
usage_alerts: optional2(
|
|
3243
3309
|
z17.array(z17.lazy(() => CreateEntityUsageAlertResponse$inboundSchema))
|
|
3310
|
+
),
|
|
3311
|
+
overage_allowed: optional2(
|
|
3312
|
+
z17.array(z17.lazy(() => CreateEntityOverageAllowedResponse$inboundSchema))
|
|
3244
3313
|
)
|
|
3245
3314
|
}),
|
|
3246
3315
|
z17.transform((v) => {
|
|
3247
3316
|
return remap(v, {
|
|
3248
3317
|
"spend_limits": "spendLimits",
|
|
3249
|
-
"usage_alerts": "usageAlerts"
|
|
3318
|
+
"usage_alerts": "usageAlerts",
|
|
3319
|
+
"overage_allowed": "overageAllowed"
|
|
3250
3320
|
});
|
|
3251
3321
|
})
|
|
3252
3322
|
);
|
|
@@ -3596,11 +3666,13 @@ var CreatePlanExpiryDurationTypeRequest$outboundSchema = z19.enum(CreatePlanExpi
|
|
|
3596
3666
|
var CreatePlanRolloverRequest$outboundSchema = z19.pipe(
|
|
3597
3667
|
z19.object({
|
|
3598
3668
|
max: z19.optional(z19.number()),
|
|
3669
|
+
maxPercentage: z19.optional(z19.number()),
|
|
3599
3670
|
expiryDurationType: CreatePlanExpiryDurationTypeRequest$outboundSchema,
|
|
3600
3671
|
expiryDurationLength: z19.optional(z19.number())
|
|
3601
3672
|
}),
|
|
3602
3673
|
z19.transform((v) => {
|
|
3603
3674
|
return remap(v, {
|
|
3675
|
+
maxPercentage: "max_percentage",
|
|
3604
3676
|
expiryDurationType: "expiry_duration_type",
|
|
3605
3677
|
expiryDurationLength: "expiry_duration_length"
|
|
3606
3678
|
});
|
|
@@ -3777,11 +3849,13 @@ var CreatePlanExpiryDurationTypeResponse$inboundSchema = inboundSchema(CreatePla
|
|
|
3777
3849
|
var CreatePlanRolloverResponse$inboundSchema = z19.pipe(
|
|
3778
3850
|
z19.object({
|
|
3779
3851
|
max: nullable(number2()),
|
|
3852
|
+
max_percentage: z19.optional(z19.nullable(number2())),
|
|
3780
3853
|
expiry_duration_type: CreatePlanExpiryDurationTypeResponse$inboundSchema,
|
|
3781
3854
|
expiry_duration_length: optional2(number2())
|
|
3782
3855
|
}),
|
|
3783
3856
|
z19.transform((v) => {
|
|
3784
3857
|
return remap(v, {
|
|
3858
|
+
"max_percentage": "maxPercentage",
|
|
3785
3859
|
"expiry_duration_type": "expiryDurationType",
|
|
3786
3860
|
"expiry_duration_length": "expiryDurationLength"
|
|
3787
3861
|
});
|
|
@@ -3965,12 +4039,14 @@ var CustomerAutoTopup$inboundSchema = z21.pipe(
|
|
|
3965
4039
|
quantity: number2(),
|
|
3966
4040
|
purchase_limit: optional2(
|
|
3967
4041
|
z21.lazy(() => CustomerPurchaseLimit$inboundSchema)
|
|
3968
|
-
)
|
|
4042
|
+
),
|
|
4043
|
+
invoice_mode: optional2(boolean2())
|
|
3969
4044
|
}),
|
|
3970
4045
|
z21.transform((v) => {
|
|
3971
4046
|
return remap(v, {
|
|
3972
4047
|
"feature_id": "featureId",
|
|
3973
|
-
"purchase_limit": "purchaseLimit"
|
|
4048
|
+
"purchase_limit": "purchaseLimit",
|
|
4049
|
+
"invoice_mode": "invoiceMode"
|
|
3974
4050
|
});
|
|
3975
4051
|
})
|
|
3976
4052
|
);
|
|
@@ -4003,6 +4079,17 @@ var CustomerUsageAlert$inboundSchema = z21.pipe(
|
|
|
4003
4079
|
});
|
|
4004
4080
|
})
|
|
4005
4081
|
);
|
|
4082
|
+
var CustomerOverageAllowed$inboundSchema = z21.pipe(
|
|
4083
|
+
z21.object({
|
|
4084
|
+
feature_id: string4(),
|
|
4085
|
+
enabled: z21._default(boolean2(), false)
|
|
4086
|
+
}),
|
|
4087
|
+
z21.transform((v) => {
|
|
4088
|
+
return remap(v, {
|
|
4089
|
+
"feature_id": "featureId"
|
|
4090
|
+
});
|
|
4091
|
+
})
|
|
4092
|
+
);
|
|
4006
4093
|
var CustomerBillingControls$inboundSchema = z21.pipe(
|
|
4007
4094
|
z21.object({
|
|
4008
4095
|
auto_topups: optional2(
|
|
@@ -4013,13 +4100,17 @@ var CustomerBillingControls$inboundSchema = z21.pipe(
|
|
|
4013
4100
|
),
|
|
4014
4101
|
usage_alerts: optional2(
|
|
4015
4102
|
z21.array(z21.lazy(() => CustomerUsageAlert$inboundSchema))
|
|
4103
|
+
),
|
|
4104
|
+
overage_allowed: optional2(
|
|
4105
|
+
z21.array(z21.lazy(() => CustomerOverageAllowed$inboundSchema))
|
|
4016
4106
|
)
|
|
4017
4107
|
}),
|
|
4018
4108
|
z21.transform((v) => {
|
|
4019
4109
|
return remap(v, {
|
|
4020
4110
|
"auto_topups": "autoTopups",
|
|
4021
4111
|
"spend_limits": "spendLimits",
|
|
4022
|
-
"usage_alerts": "usageAlerts"
|
|
4112
|
+
"usage_alerts": "usageAlerts",
|
|
4113
|
+
"overage_allowed": "overageAllowed"
|
|
4023
4114
|
});
|
|
4024
4115
|
})
|
|
4025
4116
|
);
|
|
@@ -4558,6 +4649,17 @@ var GetEntityUsageAlert$inboundSchema = z28.pipe(
|
|
|
4558
4649
|
});
|
|
4559
4650
|
})
|
|
4560
4651
|
);
|
|
4652
|
+
var GetEntityOverageAllowed$inboundSchema = z28.pipe(
|
|
4653
|
+
z28.object({
|
|
4654
|
+
feature_id: string4(),
|
|
4655
|
+
enabled: z28._default(boolean2(), false)
|
|
4656
|
+
}),
|
|
4657
|
+
z28.transform((v) => {
|
|
4658
|
+
return remap(v, {
|
|
4659
|
+
"feature_id": "featureId"
|
|
4660
|
+
});
|
|
4661
|
+
})
|
|
4662
|
+
);
|
|
4561
4663
|
var GetEntityBillingControls$inboundSchema = z28.pipe(
|
|
4562
4664
|
z28.object({
|
|
4563
4665
|
spend_limits: optional2(
|
|
@@ -4565,12 +4667,16 @@ var GetEntityBillingControls$inboundSchema = z28.pipe(
|
|
|
4565
4667
|
),
|
|
4566
4668
|
usage_alerts: optional2(
|
|
4567
4669
|
z28.array(z28.lazy(() => GetEntityUsageAlert$inboundSchema))
|
|
4670
|
+
),
|
|
4671
|
+
overage_allowed: optional2(
|
|
4672
|
+
z28.array(z28.lazy(() => GetEntityOverageAllowed$inboundSchema))
|
|
4568
4673
|
)
|
|
4569
4674
|
}),
|
|
4570
4675
|
z28.transform((v) => {
|
|
4571
4676
|
return remap(v, {
|
|
4572
4677
|
"spend_limits": "spendLimits",
|
|
4573
|
-
"usage_alerts": "usageAlerts"
|
|
4678
|
+
"usage_alerts": "usageAlerts",
|
|
4679
|
+
"overage_allowed": "overageAllowed"
|
|
4574
4680
|
});
|
|
4575
4681
|
})
|
|
4576
4682
|
);
|
|
@@ -4710,12 +4816,14 @@ var GetOrCreateCustomerAutoTopup$outboundSchema = z30.pipe(
|
|
|
4710
4816
|
quantity: z30.number(),
|
|
4711
4817
|
purchaseLimit: z30.optional(
|
|
4712
4818
|
z30.lazy(() => GetOrCreateCustomerPurchaseLimit$outboundSchema)
|
|
4713
|
-
)
|
|
4819
|
+
),
|
|
4820
|
+
invoiceMode: z30.optional(z30.boolean())
|
|
4714
4821
|
}),
|
|
4715
4822
|
z30.transform((v) => {
|
|
4716
4823
|
return remap(v, {
|
|
4717
4824
|
featureId: "feature_id",
|
|
4718
|
-
purchaseLimit: "purchase_limit"
|
|
4825
|
+
purchaseLimit: "purchase_limit",
|
|
4826
|
+
invoiceMode: "invoice_mode"
|
|
4719
4827
|
});
|
|
4720
4828
|
})
|
|
4721
4829
|
);
|
|
@@ -4748,6 +4856,17 @@ var GetOrCreateCustomerUsageAlert$outboundSchema = z30.pipe(
|
|
|
4748
4856
|
});
|
|
4749
4857
|
})
|
|
4750
4858
|
);
|
|
4859
|
+
var GetOrCreateCustomerOverageAllowed$outboundSchema = z30.pipe(
|
|
4860
|
+
z30.object({
|
|
4861
|
+
featureId: z30.string(),
|
|
4862
|
+
enabled: z30._default(z30.boolean(), false)
|
|
4863
|
+
}),
|
|
4864
|
+
z30.transform((v) => {
|
|
4865
|
+
return remap(v, {
|
|
4866
|
+
featureId: "feature_id"
|
|
4867
|
+
});
|
|
4868
|
+
})
|
|
4869
|
+
);
|
|
4751
4870
|
var GetOrCreateCustomerBillingControls$outboundSchema = z30.pipe(
|
|
4752
4871
|
z30.object({
|
|
4753
4872
|
autoTopups: z30.optional(
|
|
@@ -4758,13 +4877,17 @@ var GetOrCreateCustomerBillingControls$outboundSchema = z30.pipe(
|
|
|
4758
4877
|
),
|
|
4759
4878
|
usageAlerts: z30.optional(
|
|
4760
4879
|
z30.array(z30.lazy(() => GetOrCreateCustomerUsageAlert$outboundSchema))
|
|
4880
|
+
),
|
|
4881
|
+
overageAllowed: z30.optional(
|
|
4882
|
+
z30.array(z30.lazy(() => GetOrCreateCustomerOverageAllowed$outboundSchema))
|
|
4761
4883
|
)
|
|
4762
4884
|
}),
|
|
4763
4885
|
z30.transform((v) => {
|
|
4764
4886
|
return remap(v, {
|
|
4765
4887
|
autoTopups: "auto_topups",
|
|
4766
4888
|
spendLimits: "spend_limits",
|
|
4767
|
-
usageAlerts: "usage_alerts"
|
|
4889
|
+
usageAlerts: "usage_alerts",
|
|
4890
|
+
overageAllowed: "overage_allowed"
|
|
4768
4891
|
});
|
|
4769
4892
|
})
|
|
4770
4893
|
);
|
|
@@ -4989,11 +5112,13 @@ var GetPlanExpiryDurationType$inboundSchema = inboundSchema(GetPlanExpiryDuratio
|
|
|
4989
5112
|
var GetPlanRollover$inboundSchema = z31.pipe(
|
|
4990
5113
|
z31.object({
|
|
4991
5114
|
max: nullable(number2()),
|
|
5115
|
+
max_percentage: z31.optional(z31.nullable(number2())),
|
|
4992
5116
|
expiry_duration_type: GetPlanExpiryDurationType$inboundSchema,
|
|
4993
5117
|
expiry_duration_length: optional2(number2())
|
|
4994
5118
|
}),
|
|
4995
5119
|
z31.transform((v) => {
|
|
4996
5120
|
return remap(v, {
|
|
5121
|
+
"max_percentage": "maxPercentage",
|
|
4997
5122
|
"expiry_duration_type": "expiryDurationType",
|
|
4998
5123
|
"expiry_duration_length": "expiryDurationLength"
|
|
4999
5124
|
});
|
|
@@ -5183,12 +5308,14 @@ var ListCustomersAutoTopup$inboundSchema = z32.pipe(
|
|
|
5183
5308
|
quantity: number2(),
|
|
5184
5309
|
purchase_limit: optional2(
|
|
5185
5310
|
z32.lazy(() => ListCustomersPurchaseLimit$inboundSchema)
|
|
5186
|
-
)
|
|
5311
|
+
),
|
|
5312
|
+
invoice_mode: optional2(boolean2())
|
|
5187
5313
|
}),
|
|
5188
5314
|
z32.transform((v) => {
|
|
5189
5315
|
return remap(v, {
|
|
5190
5316
|
"feature_id": "featureId",
|
|
5191
|
-
"purchase_limit": "purchaseLimit"
|
|
5317
|
+
"purchase_limit": "purchaseLimit",
|
|
5318
|
+
"invoice_mode": "invoiceMode"
|
|
5192
5319
|
});
|
|
5193
5320
|
})
|
|
5194
5321
|
);
|
|
@@ -5221,6 +5348,17 @@ var ListCustomersUsageAlert$inboundSchema = z32.pipe(
|
|
|
5221
5348
|
});
|
|
5222
5349
|
})
|
|
5223
5350
|
);
|
|
5351
|
+
var ListCustomersOverageAllowed$inboundSchema = z32.pipe(
|
|
5352
|
+
z32.object({
|
|
5353
|
+
feature_id: string4(),
|
|
5354
|
+
enabled: z32._default(boolean2(), false)
|
|
5355
|
+
}),
|
|
5356
|
+
z32.transform((v) => {
|
|
5357
|
+
return remap(v, {
|
|
5358
|
+
"feature_id": "featureId"
|
|
5359
|
+
});
|
|
5360
|
+
})
|
|
5361
|
+
);
|
|
5224
5362
|
var ListCustomersBillingControls$inboundSchema = z32.pipe(
|
|
5225
5363
|
z32.object({
|
|
5226
5364
|
auto_topups: optional2(
|
|
@@ -5231,13 +5369,17 @@ var ListCustomersBillingControls$inboundSchema = z32.pipe(
|
|
|
5231
5369
|
),
|
|
5232
5370
|
usage_alerts: optional2(
|
|
5233
5371
|
z32.array(z32.lazy(() => ListCustomersUsageAlert$inboundSchema))
|
|
5372
|
+
),
|
|
5373
|
+
overage_allowed: optional2(
|
|
5374
|
+
z32.array(z32.lazy(() => ListCustomersOverageAllowed$inboundSchema))
|
|
5234
5375
|
)
|
|
5235
5376
|
}),
|
|
5236
5377
|
z32.transform((v) => {
|
|
5237
5378
|
return remap(v, {
|
|
5238
5379
|
"auto_topups": "autoTopups",
|
|
5239
5380
|
"spend_limits": "spendLimits",
|
|
5240
|
-
"usage_alerts": "usageAlerts"
|
|
5381
|
+
"usage_alerts": "usageAlerts",
|
|
5382
|
+
"overage_allowed": "overageAllowed"
|
|
5241
5383
|
});
|
|
5242
5384
|
})
|
|
5243
5385
|
);
|
|
@@ -5692,11 +5834,13 @@ var ListPlansExpiryDurationType$inboundSchema = inboundSchema(ListPlansExpiryDur
|
|
|
5692
5834
|
var ListPlansRollover$inboundSchema = z35.pipe(
|
|
5693
5835
|
z35.object({
|
|
5694
5836
|
max: nullable(number2()),
|
|
5837
|
+
max_percentage: z35.optional(z35.nullable(number2())),
|
|
5695
5838
|
expiry_duration_type: ListPlansExpiryDurationType$inboundSchema,
|
|
5696
5839
|
expiry_duration_length: optional2(number2())
|
|
5697
5840
|
}),
|
|
5698
5841
|
z35.transform((v) => {
|
|
5699
5842
|
return remap(v, {
|
|
5843
|
+
"max_percentage": "maxPercentage",
|
|
5700
5844
|
"expiry_duration_type": "expiryDurationType",
|
|
5701
5845
|
"expiry_duration_length": "expiryDurationLength"
|
|
5702
5846
|
});
|
|
@@ -5940,11 +6084,13 @@ var MultiAttachExpiryDurationType$outboundSchema = z36.enum(MultiAttachExpiryDur
|
|
|
5940
6084
|
var MultiAttachRollover$outboundSchema = z36.pipe(
|
|
5941
6085
|
z36.object({
|
|
5942
6086
|
max: z36.optional(z36.number()),
|
|
6087
|
+
maxPercentage: z36.optional(z36.number()),
|
|
5943
6088
|
expiryDurationType: MultiAttachExpiryDurationType$outboundSchema,
|
|
5944
6089
|
expiryDurationLength: z36.optional(z36.number())
|
|
5945
6090
|
}),
|
|
5946
6091
|
z36.transform((v) => {
|
|
5947
6092
|
return remap(v, {
|
|
6093
|
+
maxPercentage: "max_percentage",
|
|
5948
6094
|
expiryDurationType: "expiry_duration_type",
|
|
5949
6095
|
expiryDurationLength: "expiry_duration_length"
|
|
5950
6096
|
});
|
|
@@ -6071,6 +6217,17 @@ var MultiAttachUsageAlert$outboundSchema = z36.pipe(
|
|
|
6071
6217
|
});
|
|
6072
6218
|
})
|
|
6073
6219
|
);
|
|
6220
|
+
var MultiAttachOverageAllowed$outboundSchema = z36.pipe(
|
|
6221
|
+
z36.object({
|
|
6222
|
+
featureId: z36.string(),
|
|
6223
|
+
enabled: z36._default(z36.boolean(), false)
|
|
6224
|
+
}),
|
|
6225
|
+
z36.transform((v) => {
|
|
6226
|
+
return remap(v, {
|
|
6227
|
+
featureId: "feature_id"
|
|
6228
|
+
});
|
|
6229
|
+
})
|
|
6230
|
+
);
|
|
6074
6231
|
var MultiAttachBillingControls$outboundSchema = z36.pipe(
|
|
6075
6232
|
z36.object({
|
|
6076
6233
|
spendLimits: z36.optional(
|
|
@@ -6078,12 +6235,16 @@ var MultiAttachBillingControls$outboundSchema = z36.pipe(
|
|
|
6078
6235
|
),
|
|
6079
6236
|
usageAlerts: z36.optional(
|
|
6080
6237
|
z36.array(z36.lazy(() => MultiAttachUsageAlert$outboundSchema))
|
|
6238
|
+
),
|
|
6239
|
+
overageAllowed: z36.optional(
|
|
6240
|
+
z36.array(z36.lazy(() => MultiAttachOverageAllowed$outboundSchema))
|
|
6081
6241
|
)
|
|
6082
6242
|
}),
|
|
6083
6243
|
z36.transform((v) => {
|
|
6084
6244
|
return remap(v, {
|
|
6085
6245
|
spendLimits: "spend_limits",
|
|
6086
|
-
usageAlerts: "usage_alerts"
|
|
6246
|
+
usageAlerts: "usage_alerts",
|
|
6247
|
+
overageAllowed: "overage_allowed"
|
|
6087
6248
|
});
|
|
6088
6249
|
})
|
|
6089
6250
|
);
|
|
@@ -6377,11 +6538,13 @@ var PreviewAttachExpiryDurationType$outboundSchema = z38.enum(PreviewAttachExpir
|
|
|
6377
6538
|
var PreviewAttachRollover$outboundSchema = z38.pipe(
|
|
6378
6539
|
z38.object({
|
|
6379
6540
|
max: z38.optional(z38.number()),
|
|
6541
|
+
maxPercentage: z38.optional(z38.number()),
|
|
6380
6542
|
expiryDurationType: PreviewAttachExpiryDurationType$outboundSchema,
|
|
6381
6543
|
expiryDurationLength: z38.optional(z38.number())
|
|
6382
6544
|
}),
|
|
6383
6545
|
z38.transform((v) => {
|
|
6384
6546
|
return remap(v, {
|
|
6547
|
+
maxPercentage: "max_percentage",
|
|
6385
6548
|
expiryDurationType: "expiry_duration_type",
|
|
6386
6549
|
expiryDurationLength: "expiry_duration_length"
|
|
6387
6550
|
});
|
|
@@ -6925,11 +7088,13 @@ var PreviewMultiAttachExpiryDurationType$outboundSchema = z39.enum(PreviewMultiA
|
|
|
6925
7088
|
var PreviewMultiAttachRollover$outboundSchema = z39.pipe(
|
|
6926
7089
|
z39.object({
|
|
6927
7090
|
max: z39.optional(z39.number()),
|
|
7091
|
+
maxPercentage: z39.optional(z39.number()),
|
|
6928
7092
|
expiryDurationType: PreviewMultiAttachExpiryDurationType$outboundSchema,
|
|
6929
7093
|
expiryDurationLength: z39.optional(z39.number())
|
|
6930
7094
|
}),
|
|
6931
7095
|
z39.transform((v) => {
|
|
6932
7096
|
return remap(v, {
|
|
7097
|
+
maxPercentage: "max_percentage",
|
|
6933
7098
|
expiryDurationType: "expiry_duration_type",
|
|
6934
7099
|
expiryDurationLength: "expiry_duration_length"
|
|
6935
7100
|
});
|
|
@@ -7069,6 +7234,17 @@ var PreviewMultiAttachUsageAlert$outboundSchema = z39.pipe(
|
|
|
7069
7234
|
});
|
|
7070
7235
|
})
|
|
7071
7236
|
);
|
|
7237
|
+
var PreviewMultiAttachOverageAllowed$outboundSchema = z39.pipe(
|
|
7238
|
+
z39.object({
|
|
7239
|
+
featureId: z39.string(),
|
|
7240
|
+
enabled: z39._default(z39.boolean(), false)
|
|
7241
|
+
}),
|
|
7242
|
+
z39.transform((v) => {
|
|
7243
|
+
return remap(v, {
|
|
7244
|
+
featureId: "feature_id"
|
|
7245
|
+
});
|
|
7246
|
+
})
|
|
7247
|
+
);
|
|
7072
7248
|
var PreviewMultiAttachBillingControls$outboundSchema = z39.pipe(
|
|
7073
7249
|
z39.object({
|
|
7074
7250
|
spendLimits: z39.optional(
|
|
@@ -7076,12 +7252,16 @@ var PreviewMultiAttachBillingControls$outboundSchema = z39.pipe(
|
|
|
7076
7252
|
),
|
|
7077
7253
|
usageAlerts: z39.optional(
|
|
7078
7254
|
z39.array(z39.lazy(() => PreviewMultiAttachUsageAlert$outboundSchema))
|
|
7255
|
+
),
|
|
7256
|
+
overageAllowed: z39.optional(
|
|
7257
|
+
z39.array(z39.lazy(() => PreviewMultiAttachOverageAllowed$outboundSchema))
|
|
7079
7258
|
)
|
|
7080
7259
|
}),
|
|
7081
7260
|
z39.transform((v) => {
|
|
7082
7261
|
return remap(v, {
|
|
7083
7262
|
spendLimits: "spend_limits",
|
|
7084
|
-
usageAlerts: "usage_alerts"
|
|
7263
|
+
usageAlerts: "usage_alerts",
|
|
7264
|
+
overageAllowed: "overage_allowed"
|
|
7085
7265
|
});
|
|
7086
7266
|
})
|
|
7087
7267
|
);
|
|
@@ -7537,11 +7717,13 @@ var PreviewUpdateExpiryDurationType$outboundSchema = z40.enum(PreviewUpdateExpir
|
|
|
7537
7717
|
var PreviewUpdateRollover$outboundSchema = z40.pipe(
|
|
7538
7718
|
z40.object({
|
|
7539
7719
|
max: z40.optional(z40.number()),
|
|
7720
|
+
maxPercentage: z40.optional(z40.number()),
|
|
7540
7721
|
expiryDurationType: PreviewUpdateExpiryDurationType$outboundSchema,
|
|
7541
7722
|
expiryDurationLength: z40.optional(z40.number())
|
|
7542
7723
|
}),
|
|
7543
7724
|
z40.transform((v) => {
|
|
7544
7725
|
return remap(v, {
|
|
7726
|
+
maxPercentage: "max_percentage",
|
|
7545
7727
|
expiryDurationType: "expiry_duration_type",
|
|
7546
7728
|
expiryDurationLength: "expiry_duration_length"
|
|
7547
7729
|
});
|
|
@@ -8057,11 +8239,13 @@ var SetupPaymentExpiryDurationType$outboundSchema = z42.enum(SetupPaymentExpiryD
|
|
|
8057
8239
|
var SetupPaymentRollover$outboundSchema = z42.pipe(
|
|
8058
8240
|
z42.object({
|
|
8059
8241
|
max: z42.optional(z42.number()),
|
|
8242
|
+
maxPercentage: z42.optional(z42.number()),
|
|
8060
8243
|
expiryDurationType: SetupPaymentExpiryDurationType$outboundSchema,
|
|
8061
8244
|
expiryDurationLength: z42.optional(z42.number())
|
|
8062
8245
|
}),
|
|
8063
8246
|
z42.transform((v) => {
|
|
8064
8247
|
return remap(v, {
|
|
8248
|
+
maxPercentage: "max_percentage",
|
|
8065
8249
|
expiryDurationType: "expiry_duration_type",
|
|
8066
8250
|
expiryDurationLength: "expiry_duration_length"
|
|
8067
8251
|
});
|
|
@@ -8366,12 +8550,14 @@ var UpdateCustomerAutoTopupRequest$outboundSchema = z45.pipe(
|
|
|
8366
8550
|
quantity: z45.number(),
|
|
8367
8551
|
purchaseLimit: z45.optional(
|
|
8368
8552
|
z45.lazy(() => UpdateCustomerPurchaseLimitRequest$outboundSchema)
|
|
8369
|
-
)
|
|
8553
|
+
),
|
|
8554
|
+
invoiceMode: z45.optional(z45.boolean())
|
|
8370
8555
|
}),
|
|
8371
8556
|
z45.transform((v) => {
|
|
8372
8557
|
return remap(v, {
|
|
8373
8558
|
featureId: "feature_id",
|
|
8374
|
-
purchaseLimit: "purchase_limit"
|
|
8559
|
+
purchaseLimit: "purchase_limit",
|
|
8560
|
+
invoiceMode: "invoice_mode"
|
|
8375
8561
|
});
|
|
8376
8562
|
})
|
|
8377
8563
|
);
|
|
@@ -8406,6 +8592,17 @@ var UpdateCustomerUsageAlertRequestBody$outboundSchema = z45.pipe(
|
|
|
8406
8592
|
});
|
|
8407
8593
|
})
|
|
8408
8594
|
);
|
|
8595
|
+
var UpdateCustomerOverageAllowedRequest$outboundSchema = z45.pipe(
|
|
8596
|
+
z45.object({
|
|
8597
|
+
featureId: z45.string(),
|
|
8598
|
+
enabled: z45._default(z45.boolean(), false)
|
|
8599
|
+
}),
|
|
8600
|
+
z45.transform((v) => {
|
|
8601
|
+
return remap(v, {
|
|
8602
|
+
featureId: "feature_id"
|
|
8603
|
+
});
|
|
8604
|
+
})
|
|
8605
|
+
);
|
|
8409
8606
|
var UpdateCustomerBillingControlsRequest$outboundSchema = z45.pipe(
|
|
8410
8607
|
z45.object({
|
|
8411
8608
|
autoTopups: z45.optional(
|
|
@@ -8416,13 +8613,17 @@ var UpdateCustomerBillingControlsRequest$outboundSchema = z45.pipe(
|
|
|
8416
8613
|
),
|
|
8417
8614
|
usageAlerts: z45.optional(
|
|
8418
8615
|
z45.array(z45.lazy(() => UpdateCustomerUsageAlertRequestBody$outboundSchema))
|
|
8616
|
+
),
|
|
8617
|
+
overageAllowed: z45.optional(
|
|
8618
|
+
z45.array(z45.lazy(() => UpdateCustomerOverageAllowedRequest$outboundSchema))
|
|
8419
8619
|
)
|
|
8420
8620
|
}),
|
|
8421
8621
|
z45.transform((v) => {
|
|
8422
8622
|
return remap(v, {
|
|
8423
8623
|
autoTopups: "auto_topups",
|
|
8424
8624
|
spendLimits: "spend_limits",
|
|
8425
|
-
usageAlerts: "usage_alerts"
|
|
8625
|
+
usageAlerts: "usage_alerts",
|
|
8626
|
+
overageAllowed: "overage_allowed"
|
|
8426
8627
|
});
|
|
8427
8628
|
})
|
|
8428
8629
|
);
|
|
@@ -8472,12 +8673,14 @@ var UpdateCustomerAutoTopupResponse$inboundSchema = z45.pipe(
|
|
|
8472
8673
|
quantity: number2(),
|
|
8473
8674
|
purchase_limit: optional2(
|
|
8474
8675
|
z45.lazy(() => UpdateCustomerPurchaseLimitResponse$inboundSchema)
|
|
8475
|
-
)
|
|
8676
|
+
),
|
|
8677
|
+
invoice_mode: optional2(boolean2())
|
|
8476
8678
|
}),
|
|
8477
8679
|
z45.transform((v) => {
|
|
8478
8680
|
return remap(v, {
|
|
8479
8681
|
"feature_id": "featureId",
|
|
8480
|
-
"purchase_limit": "purchaseLimit"
|
|
8682
|
+
"purchase_limit": "purchaseLimit",
|
|
8683
|
+
"invoice_mode": "invoiceMode"
|
|
8481
8684
|
});
|
|
8482
8685
|
})
|
|
8483
8686
|
);
|
|
@@ -8510,6 +8713,17 @@ var UpdateCustomerUsageAlertResponse$inboundSchema = z45.pipe(
|
|
|
8510
8713
|
});
|
|
8511
8714
|
})
|
|
8512
8715
|
);
|
|
8716
|
+
var UpdateCustomerOverageAllowedResponse$inboundSchema = z45.pipe(
|
|
8717
|
+
z45.object({
|
|
8718
|
+
feature_id: string4(),
|
|
8719
|
+
enabled: z45._default(boolean2(), false)
|
|
8720
|
+
}),
|
|
8721
|
+
z45.transform((v) => {
|
|
8722
|
+
return remap(v, {
|
|
8723
|
+
"feature_id": "featureId"
|
|
8724
|
+
});
|
|
8725
|
+
})
|
|
8726
|
+
);
|
|
8513
8727
|
var UpdateCustomerBillingControlsResponse$inboundSchema = z45.pipe(
|
|
8514
8728
|
z45.object({
|
|
8515
8729
|
auto_topups: optional2(
|
|
@@ -8520,13 +8734,17 @@ var UpdateCustomerBillingControlsResponse$inboundSchema = z45.pipe(
|
|
|
8520
8734
|
),
|
|
8521
8735
|
usage_alerts: optional2(
|
|
8522
8736
|
z45.array(z45.lazy(() => UpdateCustomerUsageAlertResponse$inboundSchema))
|
|
8737
|
+
),
|
|
8738
|
+
overage_allowed: optional2(
|
|
8739
|
+
z45.array(z45.lazy(() => UpdateCustomerOverageAllowedResponse$inboundSchema))
|
|
8523
8740
|
)
|
|
8524
8741
|
}),
|
|
8525
8742
|
z45.transform((v) => {
|
|
8526
8743
|
return remap(v, {
|
|
8527
8744
|
"auto_topups": "autoTopups",
|
|
8528
8745
|
"spend_limits": "spendLimits",
|
|
8529
|
-
"usage_alerts": "usageAlerts"
|
|
8746
|
+
"usage_alerts": "usageAlerts",
|
|
8747
|
+
"overage_allowed": "overageAllowed"
|
|
8530
8748
|
});
|
|
8531
8749
|
})
|
|
8532
8750
|
);
|
|
@@ -8718,6 +8936,17 @@ var UpdateEntityUsageAlertRequestBody$outboundSchema = z46.pipe(
|
|
|
8718
8936
|
});
|
|
8719
8937
|
})
|
|
8720
8938
|
);
|
|
8939
|
+
var UpdateEntityOverageAllowedRequest$outboundSchema = z46.pipe(
|
|
8940
|
+
z46.object({
|
|
8941
|
+
featureId: z46.string(),
|
|
8942
|
+
enabled: z46._default(z46.boolean(), false)
|
|
8943
|
+
}),
|
|
8944
|
+
z46.transform((v) => {
|
|
8945
|
+
return remap(v, {
|
|
8946
|
+
featureId: "feature_id"
|
|
8947
|
+
});
|
|
8948
|
+
})
|
|
8949
|
+
);
|
|
8721
8950
|
var UpdateEntityBillingControlsRequest$outboundSchema = z46.pipe(
|
|
8722
8951
|
z46.object({
|
|
8723
8952
|
spendLimits: z46.optional(
|
|
@@ -8725,12 +8954,16 @@ var UpdateEntityBillingControlsRequest$outboundSchema = z46.pipe(
|
|
|
8725
8954
|
),
|
|
8726
8955
|
usageAlerts: z46.optional(
|
|
8727
8956
|
z46.array(z46.lazy(() => UpdateEntityUsageAlertRequestBody$outboundSchema))
|
|
8957
|
+
),
|
|
8958
|
+
overageAllowed: z46.optional(
|
|
8959
|
+
z46.array(z46.lazy(() => UpdateEntityOverageAllowedRequest$outboundSchema))
|
|
8728
8960
|
)
|
|
8729
8961
|
}),
|
|
8730
8962
|
z46.transform((v) => {
|
|
8731
8963
|
return remap(v, {
|
|
8732
8964
|
spendLimits: "spend_limits",
|
|
8733
|
-
usageAlerts: "usage_alerts"
|
|
8965
|
+
usageAlerts: "usage_alerts",
|
|
8966
|
+
overageAllowed: "overage_allowed"
|
|
8734
8967
|
});
|
|
8735
8968
|
})
|
|
8736
8969
|
);
|
|
@@ -8882,6 +9115,17 @@ var UpdateEntityUsageAlertResponse$inboundSchema = z46.pipe(
|
|
|
8882
9115
|
});
|
|
8883
9116
|
})
|
|
8884
9117
|
);
|
|
9118
|
+
var UpdateEntityOverageAllowedResponse$inboundSchema = z46.pipe(
|
|
9119
|
+
z46.object({
|
|
9120
|
+
feature_id: string4(),
|
|
9121
|
+
enabled: z46._default(boolean2(), false)
|
|
9122
|
+
}),
|
|
9123
|
+
z46.transform((v) => {
|
|
9124
|
+
return remap(v, {
|
|
9125
|
+
"feature_id": "featureId"
|
|
9126
|
+
});
|
|
9127
|
+
})
|
|
9128
|
+
);
|
|
8885
9129
|
var UpdateEntityBillingControlsResponse$inboundSchema = z46.pipe(
|
|
8886
9130
|
z46.object({
|
|
8887
9131
|
spend_limits: optional2(
|
|
@@ -8889,12 +9133,16 @@ var UpdateEntityBillingControlsResponse$inboundSchema = z46.pipe(
|
|
|
8889
9133
|
),
|
|
8890
9134
|
usage_alerts: optional2(
|
|
8891
9135
|
z46.array(z46.lazy(() => UpdateEntityUsageAlertResponse$inboundSchema))
|
|
9136
|
+
),
|
|
9137
|
+
overage_allowed: optional2(
|
|
9138
|
+
z46.array(z46.lazy(() => UpdateEntityOverageAllowedResponse$inboundSchema))
|
|
8892
9139
|
)
|
|
8893
9140
|
}),
|
|
8894
9141
|
z46.transform((v) => {
|
|
8895
9142
|
return remap(v, {
|
|
8896
9143
|
"spend_limits": "spendLimits",
|
|
8897
|
-
"usage_alerts": "usageAlerts"
|
|
9144
|
+
"usage_alerts": "usageAlerts",
|
|
9145
|
+
"overage_allowed": "overageAllowed"
|
|
8898
9146
|
});
|
|
8899
9147
|
})
|
|
8900
9148
|
);
|
|
@@ -9247,11 +9495,13 @@ var UpdatePlanExpiryDurationTypeRequest$outboundSchema = z48.enum(UpdatePlanExpi
|
|
|
9247
9495
|
var UpdatePlanRolloverRequest$outboundSchema = z48.pipe(
|
|
9248
9496
|
z48.object({
|
|
9249
9497
|
max: z48.optional(z48.number()),
|
|
9498
|
+
maxPercentage: z48.optional(z48.number()),
|
|
9250
9499
|
expiryDurationType: UpdatePlanExpiryDurationTypeRequest$outboundSchema,
|
|
9251
9500
|
expiryDurationLength: z48.optional(z48.number())
|
|
9252
9501
|
}),
|
|
9253
9502
|
z48.transform((v) => {
|
|
9254
9503
|
return remap(v, {
|
|
9504
|
+
maxPercentage: "max_percentage",
|
|
9255
9505
|
expiryDurationType: "expiry_duration_type",
|
|
9256
9506
|
expiryDurationLength: "expiry_duration_length"
|
|
9257
9507
|
});
|
|
@@ -9436,11 +9686,13 @@ var UpdatePlanExpiryDurationTypeResponse$inboundSchema = inboundSchema(UpdatePla
|
|
|
9436
9686
|
var UpdatePlanRolloverResponse$inboundSchema = z48.pipe(
|
|
9437
9687
|
z48.object({
|
|
9438
9688
|
max: nullable(number2()),
|
|
9689
|
+
max_percentage: z48.optional(z48.nullable(number2())),
|
|
9439
9690
|
expiry_duration_type: UpdatePlanExpiryDurationTypeResponse$inboundSchema,
|
|
9440
9691
|
expiry_duration_length: optional2(number2())
|
|
9441
9692
|
}),
|
|
9442
9693
|
z48.transform((v) => {
|
|
9443
9694
|
return remap(v, {
|
|
9695
|
+
"max_percentage": "maxPercentage",
|
|
9444
9696
|
"expiry_duration_type": "expiryDurationType",
|
|
9445
9697
|
"expiry_duration_length": "expiryDurationLength"
|
|
9446
9698
|
});
|
|
@@ -9717,7 +9969,8 @@ async function $do2(client, request, options) {
|
|
|
9717
9969
|
var FAIL_OPEN_OPERATION_IDS = /* @__PURE__ */ new Set([
|
|
9718
9970
|
"check",
|
|
9719
9971
|
"track",
|
|
9720
|
-
"getOrCreateCustomer"
|
|
9972
|
+
"getOrCreateCustomer",
|
|
9973
|
+
"getEntity"
|
|
9721
9974
|
]);
|
|
9722
9975
|
var FAIL_OPEN_LOG_MESSAGE = "[Autumn] Request failed \u2014 failing open. Learn more: https://docs.useautumn.com/documentation/fail-open";
|
|
9723
9976
|
var FAIL_OPEN_BODIES = {
|
|
@@ -9747,6 +10000,18 @@ var FAIL_OPEN_BODIES = {
|
|
|
9747
10000
|
purchases: [],
|
|
9748
10001
|
balances: {},
|
|
9749
10002
|
flags: {}
|
|
10003
|
+
},
|
|
10004
|
+
getEntity: {
|
|
10005
|
+
id: null,
|
|
10006
|
+
name: null,
|
|
10007
|
+
customer_id: null,
|
|
10008
|
+
feature_id: null,
|
|
10009
|
+
created_at: 0,
|
|
10010
|
+
env: "live",
|
|
10011
|
+
subscriptions: [],
|
|
10012
|
+
purchases: [],
|
|
10013
|
+
balances: {},
|
|
10014
|
+
flags: {}
|
|
9750
10015
|
}
|
|
9751
10016
|
};
|
|
9752
10017
|
var FailOpenHook = class {
|