@zuplo/runtime 5.2191.0 → 5.2193.0
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/out/cjs/index.js +15 -15
- package/out/esm/index.js +14 -14
- package/out/types/index.d.ts +19 -11
- package/package.json +1 -1
package/out/types/index.d.ts
CHANGED
|
@@ -970,7 +970,14 @@ declare interface CompatibilityFlags {
|
|
|
970
970
|
removeAllVendorHeadersExceptListed: boolean;
|
|
971
971
|
}
|
|
972
972
|
|
|
973
|
-
|
|
973
|
+
/**
|
|
974
|
+
* @public
|
|
975
|
+
*/
|
|
976
|
+
export declare interface ComplexCustomRateLimitDetails extends CustomRateLimitDetailsBase {
|
|
977
|
+
limits?: Record<string, number>;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
export declare type ComplexRateLimitFunction = RateLimitFunction<ComplexCustomRateLimitDetails>;
|
|
974
981
|
|
|
975
982
|
/**
|
|
976
983
|
* The Complex Rate Limiting policy is an advanced rate limiting policy that
|
|
@@ -982,6 +989,7 @@ export declare type ComplexRateLimitFunction = (request: ZuploRequest, context:
|
|
|
982
989
|
*
|
|
983
990
|
* @title Complex Rate Limiting
|
|
984
991
|
* @beta
|
|
992
|
+
* @enterprise
|
|
985
993
|
* @param request - The ZuploRequest
|
|
986
994
|
* @param context - The ZuploContext
|
|
987
995
|
* @param options - The policy options set in policies.json
|
|
@@ -1011,7 +1019,6 @@ export declare class ComplexRateLimitInboundPolicy extends InboundPolicy<Complex
|
|
|
1011
1019
|
*/
|
|
1012
1020
|
static setIncrements(context: ZuploContext, increments: Record<string, number>): void;
|
|
1013
1021
|
static getIncrements(context: ZuploContext): Record<string, number>;
|
|
1014
|
-
private ttlSeconds;
|
|
1015
1022
|
constructor(options: ComplexRateLimitInboundPolicyOptions, policyName: string);
|
|
1016
1023
|
handler(request: ZuploRequest, context: ZuploContext): Promise<ZuploRequest<RequestGeneric> | Response>;
|
|
1017
1024
|
}
|
|
@@ -1278,21 +1285,20 @@ export declare interface CurityPhantomTokenInboundPolicyOptions {
|
|
|
1278
1285
|
cacheDurationSeconds?: number;
|
|
1279
1286
|
}
|
|
1280
1287
|
|
|
1281
|
-
export declare interface CustomComplexRateLimitDetails {
|
|
1282
|
-
key: string;
|
|
1283
|
-
limits?: Record<string, number>;
|
|
1284
|
-
timeWindowMinutes?: number;
|
|
1285
|
-
}
|
|
1286
|
-
|
|
1287
1288
|
/**
|
|
1288
|
-
* @
|
|
1289
|
+
* @public
|
|
1289
1290
|
*/
|
|
1290
|
-
export declare interface CustomRateLimitDetails {
|
|
1291
|
-
key: string;
|
|
1291
|
+
export declare interface CustomRateLimitDetails extends CustomRateLimitDetailsBase {
|
|
1292
1292
|
requestsAllowed?: number;
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
declare interface CustomRateLimitDetailsBase {
|
|
1296
|
+
key: string;
|
|
1293
1297
|
timeWindowMinutes?: number;
|
|
1294
1298
|
}
|
|
1295
1299
|
|
|
1300
|
+
export declare type CustomRateLimitFunction = RateLimitFunction<CustomRateLimitDetails>;
|
|
1301
|
+
|
|
1296
1302
|
declare interface DataDogLoggingOptions {
|
|
1297
1303
|
url?: string;
|
|
1298
1304
|
apiKey: string;
|
|
@@ -3949,6 +3955,8 @@ declare type RateLimitByType = "user" | "ip" | "function" | "all";
|
|
|
3949
3955
|
*/
|
|
3950
3956
|
declare type RateLimitByType_2 = "user" | "ip" | "function" | "all";
|
|
3951
3957
|
|
|
3958
|
+
declare type RateLimitFunction<T extends CustomRateLimitDetailsBase> = (request: ZuploRequest, context: ZuploContext, policyName: string) => (Partial<T> & CustomRateLimitDetailsBase) | Promise<Partial<T> & CustomRateLimitDetailsBase>;
|
|
3959
|
+
|
|
3952
3960
|
/**
|
|
3953
3961
|
* Adds the retry-after header.
|
|
3954
3962
|
*/
|