@remnawave/node-contract 2.6.4 → 2.6.6
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/build/api/controllers/plugin.d.ts +6 -0
- package/build/api/controllers/plugin.d.ts.map +1 -1
- package/build/api/controllers/plugin.js +7 -1
- package/build/api/routes.d.ts +5 -0
- package/build/api/routes.d.ts.map +1 -1
- package/build/api/routes.js +5 -0
- package/build/commands/plugin/index.d.ts +1 -0
- package/build/commands/plugin/index.d.ts.map +1 -1
- package/build/commands/plugin/index.js +1 -0
- package/build/commands/plugin/nftables/block-ips.schema.d.ts +46 -0
- package/build/commands/plugin/nftables/block-ips.schema.d.ts.map +1 -0
- package/build/commands/plugin/nftables/block-ips.schema.js +20 -0
- package/build/commands/plugin/nftables/index.d.ts +4 -0
- package/build/commands/plugin/nftables/index.d.ts.map +1 -0
- package/build/commands/plugin/nftables/index.js +19 -0
- package/build/commands/plugin/nftables/recreate-tables.schema.d.ts +23 -0
- package/build/commands/plugin/nftables/recreate-tables.schema.d.ts.map +1 -0
- package/build/commands/plugin/nftables/recreate-tables.schema.js +10 -0
- package/build/commands/plugin/nftables/unblock-ips.schema.d.ts +31 -0
- package/build/commands/plugin/nftables/unblock-ips.schema.d.ts.map +1 -0
- package/build/commands/plugin/nftables/unblock-ips.schema.js +17 -0
- package/build/commands/plugin/torrent-blocker/collect-reports.schema.d.ts +17 -17
- package/build/models/torrent-blocker.report.schema.d.ts +9 -9
- package/build/models/torrent-blocker.report.schema.d.ts.map +1 -1
- package/build/models/torrent-blocker.report.schema.js +4 -1
- package/package.json +1 -1
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
export declare const PLUGIN_CONTROLLER: "plugin";
|
|
2
2
|
export declare const TORRENT_BLOCKER_ROUTE: "torrent-blocker";
|
|
3
|
+
export declare const NFTABLES_ROUTE: "nftables";
|
|
3
4
|
export declare const PLUGIN_ROUTES: {
|
|
4
5
|
readonly SYNC: "sync";
|
|
5
6
|
readonly TORRENT_BLOCKER: {
|
|
6
7
|
readonly COLLECT: "torrent-blocker/collect";
|
|
7
8
|
};
|
|
9
|
+
readonly NFTABLES: {
|
|
10
|
+
readonly UNBLOCK_IPS: "nftables/unblock-ips";
|
|
11
|
+
readonly BLOCK_IPS: "nftables/block-ips";
|
|
12
|
+
readonly RECREATE_TABLES: "nftables/recreate-tables";
|
|
13
|
+
};
|
|
8
14
|
};
|
|
9
15
|
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../api/controllers/plugin.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,EAAG,QAAiB,CAAC;AAEnD,eAAO,MAAM,qBAAqB,EAAG,iBAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../api/controllers/plugin.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,EAAG,QAAiB,CAAC;AAEnD,eAAO,MAAM,qBAAqB,EAAG,iBAA0B,CAAC;AAChE,eAAO,MAAM,cAAc,EAAG,UAAmB,CAAC;AAElD,eAAO,MAAM,aAAa;;;;;;;;;;CAWhB,CAAC"}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PLUGIN_ROUTES = exports.TORRENT_BLOCKER_ROUTE = exports.PLUGIN_CONTROLLER = void 0;
|
|
3
|
+
exports.PLUGIN_ROUTES = exports.NFTABLES_ROUTE = exports.TORRENT_BLOCKER_ROUTE = exports.PLUGIN_CONTROLLER = void 0;
|
|
4
4
|
exports.PLUGIN_CONTROLLER = 'plugin';
|
|
5
5
|
exports.TORRENT_BLOCKER_ROUTE = 'torrent-blocker';
|
|
6
|
+
exports.NFTABLES_ROUTE = 'nftables';
|
|
6
7
|
exports.PLUGIN_ROUTES = {
|
|
7
8
|
SYNC: 'sync',
|
|
8
9
|
TORRENT_BLOCKER: {
|
|
9
10
|
COLLECT: `${exports.TORRENT_BLOCKER_ROUTE}/collect`,
|
|
10
11
|
},
|
|
12
|
+
NFTABLES: {
|
|
13
|
+
UNBLOCK_IPS: `${exports.NFTABLES_ROUTE}/unblock-ips`,
|
|
14
|
+
BLOCK_IPS: `${exports.NFTABLES_ROUTE}/block-ips`,
|
|
15
|
+
RECREATE_TABLES: `${exports.NFTABLES_ROUTE}/recreate-tables`,
|
|
16
|
+
},
|
|
11
17
|
};
|
package/build/api/routes.d.ts
CHANGED
|
@@ -36,6 +36,11 @@ export declare const REST_API: {
|
|
|
36
36
|
readonly TORRENT_BLOCKER: {
|
|
37
37
|
readonly COLLECT: "/node/plugin/torrent-blocker/collect";
|
|
38
38
|
};
|
|
39
|
+
readonly NFTABLES: {
|
|
40
|
+
readonly UNBLOCK_IPS: "/node/plugin/nftables/unblock-ips";
|
|
41
|
+
readonly BLOCK_IPS: "/node/plugin/nftables/block-ips";
|
|
42
|
+
readonly RECREATE_TABLES: "/node/plugin/nftables/recreate-tables";
|
|
43
|
+
};
|
|
39
44
|
};
|
|
40
45
|
};
|
|
41
46
|
//# sourceMappingURL=routes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,OAAgB,CAAC;AAErC,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,OAAgB,CAAC;AAErC,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CX,CAAC"}
|
package/build/api/routes.js
CHANGED
|
@@ -73,5 +73,10 @@ exports.REST_API = {
|
|
|
73
73
|
TORRENT_BLOCKER: {
|
|
74
74
|
COLLECT: `${exports.ROOT}/${CONTROLLERS.PLUGIN_CONTROLLER}/${CONTROLLERS.PLUGIN_ROUTES.TORRENT_BLOCKER.COLLECT}`,
|
|
75
75
|
},
|
|
76
|
+
NFTABLES: {
|
|
77
|
+
UNBLOCK_IPS: `${exports.ROOT}/${CONTROLLERS.PLUGIN_CONTROLLER}/${CONTROLLERS.PLUGIN_ROUTES.NFTABLES.UNBLOCK_IPS}`,
|
|
78
|
+
BLOCK_IPS: `${exports.ROOT}/${CONTROLLERS.PLUGIN_CONTROLLER}/${CONTROLLERS.PLUGIN_ROUTES.NFTABLES.BLOCK_IPS}`,
|
|
79
|
+
RECREATE_TABLES: `${exports.ROOT}/${CONTROLLERS.PLUGIN_CONTROLLER}/${CONTROLLERS.PLUGIN_ROUTES.NFTABLES.RECREATE_TABLES}`,
|
|
80
|
+
},
|
|
76
81
|
},
|
|
77
82
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../commands/plugin/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../commands/plugin/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC"}
|
|
@@ -14,5 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./nftables"), exports);
|
|
17
18
|
__exportStar(require("./sync.command"), exports);
|
|
18
19
|
__exportStar(require("./torrent-blocker"), exports);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare namespace BlockIpsCommand {
|
|
3
|
+
const url: "/node/plugin/nftables/block-ips";
|
|
4
|
+
const RequestSchema: z.ZodObject<{
|
|
5
|
+
ips: z.ZodArray<z.ZodObject<{
|
|
6
|
+
ip: z.ZodString;
|
|
7
|
+
timeout: z.ZodNumber;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
ip: string;
|
|
10
|
+
timeout: number;
|
|
11
|
+
}, {
|
|
12
|
+
ip: string;
|
|
13
|
+
timeout: number;
|
|
14
|
+
}>, "many">;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
ips: {
|
|
17
|
+
ip: string;
|
|
18
|
+
timeout: number;
|
|
19
|
+
}[];
|
|
20
|
+
}, {
|
|
21
|
+
ips: {
|
|
22
|
+
ip: string;
|
|
23
|
+
timeout: number;
|
|
24
|
+
}[];
|
|
25
|
+
}>;
|
|
26
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
27
|
+
const ResponseSchema: z.ZodObject<{
|
|
28
|
+
response: z.ZodObject<{
|
|
29
|
+
accepted: z.ZodBoolean;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
accepted: boolean;
|
|
32
|
+
}, {
|
|
33
|
+
accepted: boolean;
|
|
34
|
+
}>;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
response: {
|
|
37
|
+
accepted: boolean;
|
|
38
|
+
};
|
|
39
|
+
}, {
|
|
40
|
+
response: {
|
|
41
|
+
accepted: boolean;
|
|
42
|
+
};
|
|
43
|
+
}>;
|
|
44
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=block-ips.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-ips.schema.d.ts","sourceRoot":"","sources":["../../../../commands/plugin/nftables/block-ips.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,eAAe,CAAC;IACtB,MAAM,GAAG,mCAAqC,CAAC;IAE/C,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;MAOxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;MAIzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BlockIpsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../../api");
|
|
6
|
+
var BlockIpsCommand;
|
|
7
|
+
(function (BlockIpsCommand) {
|
|
8
|
+
BlockIpsCommand.url = api_1.REST_API.PLUGIN.NFTABLES.BLOCK_IPS;
|
|
9
|
+
BlockIpsCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
ips: zod_1.z.array(zod_1.z.object({
|
|
11
|
+
ip: zod_1.z.string().ip(),
|
|
12
|
+
timeout: zod_1.z.number(),
|
|
13
|
+
})),
|
|
14
|
+
});
|
|
15
|
+
BlockIpsCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
response: zod_1.z.object({
|
|
17
|
+
accepted: zod_1.z.boolean(),
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
})(BlockIpsCommand || (exports.BlockIpsCommand = BlockIpsCommand = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/plugin/nftables/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./block-ips.schema"), exports);
|
|
18
|
+
__exportStar(require("./recreate-tables.schema"), exports);
|
|
19
|
+
__exportStar(require("./unblock-ips.schema"), exports);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare namespace RecreateTablesCommand {
|
|
3
|
+
const url: "/node/plugin/nftables/recreate-tables";
|
|
4
|
+
const ResponseSchema: z.ZodObject<{
|
|
5
|
+
response: z.ZodObject<{
|
|
6
|
+
accepted: z.ZodBoolean;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
accepted: boolean;
|
|
9
|
+
}, {
|
|
10
|
+
accepted: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
response: {
|
|
14
|
+
accepted: boolean;
|
|
15
|
+
};
|
|
16
|
+
}, {
|
|
17
|
+
response: {
|
|
18
|
+
accepted: boolean;
|
|
19
|
+
};
|
|
20
|
+
}>;
|
|
21
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=recreate-tables.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recreate-tables.schema.d.ts","sourceRoot":"","sources":["../../../../commands/plugin/nftables/recreate-tables.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,qBAAqB,CAAC;IAC5B,MAAM,GAAG,yCAA2C,CAAC;IAErD,MAAM,cAAc;;;;;;;;;;;;;;;;MAA8D,CAAC;IAC1F,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RecreateTablesCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../../api");
|
|
6
|
+
var RecreateTablesCommand;
|
|
7
|
+
(function (RecreateTablesCommand) {
|
|
8
|
+
RecreateTablesCommand.url = api_1.REST_API.PLUGIN.NFTABLES.RECREATE_TABLES;
|
|
9
|
+
RecreateTablesCommand.ResponseSchema = zod_1.z.object({ response: zod_1.z.object({ accepted: zod_1.z.boolean() }) });
|
|
10
|
+
})(RecreateTablesCommand || (exports.RecreateTablesCommand = RecreateTablesCommand = {}));
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare namespace UnblockIpsCommand {
|
|
3
|
+
const url: "/node/plugin/nftables/unblock-ips";
|
|
4
|
+
const RequestSchema: z.ZodObject<{
|
|
5
|
+
ips: z.ZodArray<z.ZodString, "many">;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
ips: string[];
|
|
8
|
+
}, {
|
|
9
|
+
ips: string[];
|
|
10
|
+
}>;
|
|
11
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
12
|
+
const ResponseSchema: z.ZodObject<{
|
|
13
|
+
response: z.ZodObject<{
|
|
14
|
+
accepted: z.ZodBoolean;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
accepted: boolean;
|
|
17
|
+
}, {
|
|
18
|
+
accepted: boolean;
|
|
19
|
+
}>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
response: {
|
|
22
|
+
accepted: boolean;
|
|
23
|
+
};
|
|
24
|
+
}, {
|
|
25
|
+
response: {
|
|
26
|
+
accepted: boolean;
|
|
27
|
+
};
|
|
28
|
+
}>;
|
|
29
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=unblock-ips.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unblock-ips.schema.d.ts","sourceRoot":"","sources":["../../../../commands/plugin/nftables/unblock-ips.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,qCAAuC,CAAC;IAEjD,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;MAIzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UnblockIpsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../../api");
|
|
6
|
+
var UnblockIpsCommand;
|
|
7
|
+
(function (UnblockIpsCommand) {
|
|
8
|
+
UnblockIpsCommand.url = api_1.REST_API.PLUGIN.NFTABLES.UNBLOCK_IPS;
|
|
9
|
+
UnblockIpsCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
ips: zod_1.z.array(zod_1.z.string().ip()),
|
|
11
|
+
});
|
|
12
|
+
UnblockIpsCommand.ResponseSchema = zod_1.z.object({
|
|
13
|
+
response: zod_1.z.object({
|
|
14
|
+
accepted: zod_1.z.boolean(),
|
|
15
|
+
}),
|
|
16
|
+
});
|
|
17
|
+
})(UnblockIpsCommand || (exports.UnblockIpsCommand = UnblockIpsCommand = {}));
|
|
@@ -6,24 +6,24 @@ export declare namespace CollectReportsCommand {
|
|
|
6
6
|
reports: z.ZodArray<z.ZodObject<{
|
|
7
7
|
actionReport: z.ZodObject<{
|
|
8
8
|
blocked: z.ZodBoolean;
|
|
9
|
-
whitelisted: z.ZodBoolean;
|
|
10
9
|
ip: z.ZodString;
|
|
11
10
|
blockDuration: z.ZodNumber;
|
|
11
|
+
willUnblockAt: z.ZodEffects<z.ZodString, Date, string>;
|
|
12
12
|
userId: z.ZodString;
|
|
13
13
|
processedAt: z.ZodEffects<z.ZodString, Date, string>;
|
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
|
15
15
|
userId: string;
|
|
16
|
-
blocked: boolean;
|
|
17
|
-
whitelisted: boolean;
|
|
18
16
|
ip: string;
|
|
17
|
+
blocked: boolean;
|
|
19
18
|
blockDuration: number;
|
|
19
|
+
willUnblockAt: Date;
|
|
20
20
|
processedAt: Date;
|
|
21
21
|
}, {
|
|
22
22
|
userId: string;
|
|
23
|
-
blocked: boolean;
|
|
24
|
-
whitelisted: boolean;
|
|
25
23
|
ip: string;
|
|
24
|
+
blocked: boolean;
|
|
26
25
|
blockDuration: number;
|
|
26
|
+
willUnblockAt: string;
|
|
27
27
|
processedAt: string;
|
|
28
28
|
}>;
|
|
29
29
|
xrayReport: z.ZodObject<{
|
|
@@ -72,10 +72,10 @@ export declare namespace CollectReportsCommand {
|
|
|
72
72
|
}, "strip", z.ZodTypeAny, {
|
|
73
73
|
actionReport: {
|
|
74
74
|
userId: string;
|
|
75
|
-
blocked: boolean;
|
|
76
|
-
whitelisted: boolean;
|
|
77
75
|
ip: string;
|
|
76
|
+
blocked: boolean;
|
|
78
77
|
blockDuration: number;
|
|
78
|
+
willUnblockAt: Date;
|
|
79
79
|
processedAt: Date;
|
|
80
80
|
};
|
|
81
81
|
xrayReport: {
|
|
@@ -96,10 +96,10 @@ export declare namespace CollectReportsCommand {
|
|
|
96
96
|
}, {
|
|
97
97
|
actionReport: {
|
|
98
98
|
userId: string;
|
|
99
|
-
blocked: boolean;
|
|
100
|
-
whitelisted: boolean;
|
|
101
99
|
ip: string;
|
|
100
|
+
blocked: boolean;
|
|
102
101
|
blockDuration: number;
|
|
102
|
+
willUnblockAt: string;
|
|
103
103
|
processedAt: string;
|
|
104
104
|
};
|
|
105
105
|
xrayReport: {
|
|
@@ -122,10 +122,10 @@ export declare namespace CollectReportsCommand {
|
|
|
122
122
|
reports: {
|
|
123
123
|
actionReport: {
|
|
124
124
|
userId: string;
|
|
125
|
-
blocked: boolean;
|
|
126
|
-
whitelisted: boolean;
|
|
127
125
|
ip: string;
|
|
126
|
+
blocked: boolean;
|
|
128
127
|
blockDuration: number;
|
|
128
|
+
willUnblockAt: Date;
|
|
129
129
|
processedAt: Date;
|
|
130
130
|
};
|
|
131
131
|
xrayReport: {
|
|
@@ -148,10 +148,10 @@ export declare namespace CollectReportsCommand {
|
|
|
148
148
|
reports: {
|
|
149
149
|
actionReport: {
|
|
150
150
|
userId: string;
|
|
151
|
-
blocked: boolean;
|
|
152
|
-
whitelisted: boolean;
|
|
153
151
|
ip: string;
|
|
152
|
+
blocked: boolean;
|
|
154
153
|
blockDuration: number;
|
|
154
|
+
willUnblockAt: string;
|
|
155
155
|
processedAt: string;
|
|
156
156
|
};
|
|
157
157
|
xrayReport: {
|
|
@@ -176,10 +176,10 @@ export declare namespace CollectReportsCommand {
|
|
|
176
176
|
reports: {
|
|
177
177
|
actionReport: {
|
|
178
178
|
userId: string;
|
|
179
|
-
blocked: boolean;
|
|
180
|
-
whitelisted: boolean;
|
|
181
179
|
ip: string;
|
|
180
|
+
blocked: boolean;
|
|
182
181
|
blockDuration: number;
|
|
182
|
+
willUnblockAt: Date;
|
|
183
183
|
processedAt: Date;
|
|
184
184
|
};
|
|
185
185
|
xrayReport: {
|
|
@@ -204,10 +204,10 @@ export declare namespace CollectReportsCommand {
|
|
|
204
204
|
reports: {
|
|
205
205
|
actionReport: {
|
|
206
206
|
userId: string;
|
|
207
|
-
blocked: boolean;
|
|
208
|
-
whitelisted: boolean;
|
|
209
207
|
ip: string;
|
|
208
|
+
blocked: boolean;
|
|
210
209
|
blockDuration: number;
|
|
210
|
+
willUnblockAt: string;
|
|
211
211
|
processedAt: string;
|
|
212
212
|
};
|
|
213
213
|
xrayReport: {
|
|
@@ -2,24 +2,24 @@ import z from 'zod';
|
|
|
2
2
|
export declare const TorrentBlockerReportSchema: z.ZodObject<{
|
|
3
3
|
actionReport: z.ZodObject<{
|
|
4
4
|
blocked: z.ZodBoolean;
|
|
5
|
-
whitelisted: z.ZodBoolean;
|
|
6
5
|
ip: z.ZodString;
|
|
7
6
|
blockDuration: z.ZodNumber;
|
|
7
|
+
willUnblockAt: z.ZodEffects<z.ZodString, Date, string>;
|
|
8
8
|
userId: z.ZodString;
|
|
9
9
|
processedAt: z.ZodEffects<z.ZodString, Date, string>;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
11
|
userId: string;
|
|
12
|
-
blocked: boolean;
|
|
13
|
-
whitelisted: boolean;
|
|
14
12
|
ip: string;
|
|
13
|
+
blocked: boolean;
|
|
15
14
|
blockDuration: number;
|
|
15
|
+
willUnblockAt: Date;
|
|
16
16
|
processedAt: Date;
|
|
17
17
|
}, {
|
|
18
18
|
userId: string;
|
|
19
|
-
blocked: boolean;
|
|
20
|
-
whitelisted: boolean;
|
|
21
19
|
ip: string;
|
|
20
|
+
blocked: boolean;
|
|
22
21
|
blockDuration: number;
|
|
22
|
+
willUnblockAt: string;
|
|
23
23
|
processedAt: string;
|
|
24
24
|
}>;
|
|
25
25
|
xrayReport: z.ZodObject<{
|
|
@@ -68,10 +68,10 @@ export declare const TorrentBlockerReportSchema: z.ZodObject<{
|
|
|
68
68
|
}, "strip", z.ZodTypeAny, {
|
|
69
69
|
actionReport: {
|
|
70
70
|
userId: string;
|
|
71
|
-
blocked: boolean;
|
|
72
|
-
whitelisted: boolean;
|
|
73
71
|
ip: string;
|
|
72
|
+
blocked: boolean;
|
|
74
73
|
blockDuration: number;
|
|
74
|
+
willUnblockAt: Date;
|
|
75
75
|
processedAt: Date;
|
|
76
76
|
};
|
|
77
77
|
xrayReport: {
|
|
@@ -92,10 +92,10 @@ export declare const TorrentBlockerReportSchema: z.ZodObject<{
|
|
|
92
92
|
}, {
|
|
93
93
|
actionReport: {
|
|
94
94
|
userId: string;
|
|
95
|
-
blocked: boolean;
|
|
96
|
-
whitelisted: boolean;
|
|
97
95
|
ip: string;
|
|
96
|
+
blocked: boolean;
|
|
98
97
|
blockDuration: number;
|
|
98
|
+
willUnblockAt: string;
|
|
99
99
|
processedAt: string;
|
|
100
100
|
};
|
|
101
101
|
xrayReport: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"torrent-blocker.report.schema.d.ts","sourceRoot":"","sources":["../../models/torrent-blocker.report.schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAIpB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"torrent-blocker.report.schema.d.ts","sourceRoot":"","sources":["../../models/torrent-blocker.report.schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAIpB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBrC,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -9,9 +9,12 @@ const xray_webhook_schema_1 = require("./xray-webhook.schema");
|
|
|
9
9
|
exports.TorrentBlockerReportSchema = zod_1.default.object({
|
|
10
10
|
actionReport: zod_1.default.object({
|
|
11
11
|
blocked: zod_1.default.boolean(),
|
|
12
|
-
whitelisted: zod_1.default.boolean(),
|
|
13
12
|
ip: zod_1.default.string(),
|
|
14
13
|
blockDuration: zod_1.default.number(),
|
|
14
|
+
willUnblockAt: zod_1.default
|
|
15
|
+
.string()
|
|
16
|
+
.datetime({ offset: true, local: true })
|
|
17
|
+
.transform((str) => new Date(str)),
|
|
15
18
|
userId: zod_1.default.string(),
|
|
16
19
|
processedAt: zod_1.default
|
|
17
20
|
.string()
|