@aeriajs/security 0.0.198 → 0.0.200
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/rateLimiting.d.ts +2 -56
- package/package.json +4 -4
package/dist/rateLimiting.d.ts
CHANGED
|
@@ -1,40 +1,6 @@
|
|
|
1
1
|
import type { RouteContext, RateLimitingParams } from '@aeriajs/types';
|
|
2
2
|
import { Result, HTTPStatus, RateLimitingError } from '@aeriajs/types';
|
|
3
|
-
export declare const getOrCreateUsageEntry: (params: RateLimitingParams, context: RouteContext) => Promise<
|
|
4
|
-
readonly $id: "resourceUsage";
|
|
5
|
-
readonly icon: "wrench";
|
|
6
|
-
readonly required: readonly ["usage"];
|
|
7
|
-
readonly properties: {
|
|
8
|
-
readonly user: {
|
|
9
|
-
readonly $ref: "user";
|
|
10
|
-
};
|
|
11
|
-
readonly address: {
|
|
12
|
-
readonly type: "string";
|
|
13
|
-
};
|
|
14
|
-
readonly usage: {
|
|
15
|
-
readonly type: "object";
|
|
16
|
-
readonly additionalProperties: {
|
|
17
|
-
readonly type: "object";
|
|
18
|
-
readonly properties: {
|
|
19
|
-
readonly hits: {
|
|
20
|
-
readonly type: "integer";
|
|
21
|
-
};
|
|
22
|
-
readonly points: {
|
|
23
|
-
readonly type: "integer";
|
|
24
|
-
};
|
|
25
|
-
readonly last_reach: {
|
|
26
|
-
readonly type: "string";
|
|
27
|
-
readonly format: "date-time";
|
|
28
|
-
};
|
|
29
|
-
readonly last_maximum_reach: {
|
|
30
|
-
readonly type: "string";
|
|
31
|
-
readonly format: "date-time";
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
}>>, "_id">> | null>;
|
|
3
|
+
export declare const getOrCreateUsageEntry: (params: RateLimitingParams, context: RouteContext) => Promise<any>;
|
|
38
4
|
export declare const limitRate: (params: RateLimitingParams, context: RouteContext) => Promise<Result.Error<{
|
|
39
5
|
readonly code: RateLimitingError.Unauthenticated;
|
|
40
6
|
} & {
|
|
@@ -46,25 +12,5 @@ export declare const limitRate: (params: RateLimitingParams, context: RouteConte
|
|
|
46
12
|
}> | {
|
|
47
13
|
readonly _tag: "Result";
|
|
48
14
|
readonly error: undefined;
|
|
49
|
-
readonly result:
|
|
50
|
-
readonly hits: {
|
|
51
|
-
readonly type: "integer";
|
|
52
|
-
};
|
|
53
|
-
readonly points: {
|
|
54
|
-
readonly type: "integer";
|
|
55
|
-
};
|
|
56
|
-
readonly last_reach: {
|
|
57
|
-
readonly type: "string";
|
|
58
|
-
readonly format: "date-time";
|
|
59
|
-
};
|
|
60
|
-
readonly last_maximum_reach: {
|
|
61
|
-
readonly type: "string";
|
|
62
|
-
readonly format: "date-time";
|
|
63
|
-
};
|
|
64
|
-
}>> & {
|
|
65
|
-
hits: number;
|
|
66
|
-
points: number;
|
|
67
|
-
last_reach: Date;
|
|
68
|
-
last_maximum_reach: Date;
|
|
69
|
-
}, never>>;
|
|
15
|
+
readonly result: any;
|
|
70
16
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeriajs/security",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.200",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"mongodb": "^6.5.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@aeriajs/core": "^0.0.
|
|
32
|
-
"@aeriajs/common": "^0.0.
|
|
33
|
-
"@aeriajs/types": "^0.0.
|
|
31
|
+
"@aeriajs/core": "^0.0.200",
|
|
32
|
+
"@aeriajs/common": "^0.0.121",
|
|
33
|
+
"@aeriajs/types": "^0.0.103",
|
|
34
34
|
"mongodb": "^6.5.0"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|