@remnawave/backend-contract 2.6.32 → 2.6.34
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/backend/api/controllers/node-plugins.d.ts +5 -0
- package/build/backend/api/controllers/node-plugins.d.ts.map +1 -1
- package/build/backend/api/controllers/node-plugins.js +6 -0
- package/build/backend/api/controllers/subscription.d.ts +0 -1
- package/build/backend/api/controllers/subscription.d.ts.map +1 -1
- package/build/backend/api/controllers/subscription.js +0 -1
- package/build/backend/api/routes.d.ts +5 -1
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +5 -1
- package/build/backend/commands/node-plugins/index.d.ts +1 -0
- package/build/backend/commands/node-plugins/index.d.ts.map +1 -1
- package/build/backend/commands/node-plugins/index.js +1 -0
- package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports-stats.command.d.ts +60 -0
- package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports-stats.command.d.ts.map +1 -0
- package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports-stats.command.js +22 -0
- package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports.command.d.ts +626 -0
- package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports.command.d.ts.map +1 -0
- package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports.command.js +20 -0
- package/build/backend/commands/node-plugins/torrent-blocker/index.d.ts +3 -0
- package/build/backend/commands/node-plugins/torrent-blocker/index.d.ts.map +1 -0
- package/build/backend/commands/node-plugins/torrent-blocker/index.js +18 -0
- package/build/backend/commands/node-plugins/torrent-blocker/truncate-torrent-blocker-reports.command.d.ts +573 -0
- package/build/backend/commands/node-plugins/torrent-blocker/truncate-torrent-blocker-reports.command.d.ts.map +1 -0
- package/build/backend/commands/node-plugins/torrent-blocker/truncate-torrent-blocker-reports.command.js +19 -0
- package/build/backend/commands/subscription/index.d.ts +0 -1
- package/build/backend/commands/subscription/index.d.ts.map +1 -1
- package/build/backend/commands/subscription/index.js +0 -1
- package/build/backend/constants/errors/errors.d.ts +5 -0
- package/build/backend/constants/errors/errors.d.ts.map +1 -1
- package/build/backend/constants/errors/errors.js +5 -0
- package/build/backend/models/index.d.ts +1 -0
- package/build/backend/models/index.d.ts.map +1 -1
- package/build/backend/models/index.js +1 -0
- package/build/backend/models/torrent-blocker-report.schema.d.ts +390 -0
- package/build/backend/models/torrent-blocker-report.schema.d.ts.map +1 -0
- package/build/backend/models/torrent-blocker-report.schema.js +55 -0
- package/build/backend/models/webhook/webhook.schema.d.ts +16 -16
- package/build/frontend/api/controllers/node-plugins.js +6 -0
- package/build/frontend/api/controllers/subscription.js +0 -1
- package/build/frontend/api/routes.js +5 -1
- package/build/frontend/commands/node-plugins/index.js +1 -0
- package/build/frontend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports-stats.command.js +22 -0
- package/build/frontend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports.command.js +20 -0
- package/build/frontend/commands/node-plugins/torrent-blocker/index.js +18 -0
- package/build/frontend/commands/node-plugins/torrent-blocker/truncate-torrent-blocker-reports.command.js +19 -0
- package/build/frontend/commands/subscription/index.js +0 -1
- package/build/frontend/constants/errors/errors.js +5 -0
- package/build/frontend/models/index.js +1 -0
- package/build/frontend/models/torrent-blocker-report.schema.js +55 -0
- package/package.json +1 -1
- package/build/backend/commands/subscription/get-outline-subscription-by-short-uuid.command.d.ts +0 -20
- package/build/backend/commands/subscription/get-outline-subscription-by-short-uuid.command.d.ts.map +0 -1
- package/build/backend/commands/subscription/get-outline-subscription-by-short-uuid.command.js +0 -15
- package/build/frontend/commands/subscription/get-outline-subscription-by-short-uuid.command.js +0 -15
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetTorrentBlockerReportsStatsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../../api");
|
|
6
|
+
const constants_1 = require("../../../constants");
|
|
7
|
+
var GetTorrentBlockerReportsStatsCommand;
|
|
8
|
+
(function (GetTorrentBlockerReportsStatsCommand) {
|
|
9
|
+
GetTorrentBlockerReportsStatsCommand.url = api_1.REST_API.NODE_PLUGINS.TORRENT_BLOCKER.GET_REPORTS_STATS;
|
|
10
|
+
GetTorrentBlockerReportsStatsCommand.TSQ_url = GetTorrentBlockerReportsStatsCommand.url;
|
|
11
|
+
GetTorrentBlockerReportsStatsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.NODE_PLUGINS_ROUTES.TORRENT_BLOCKER.GET_REPORTS_STATS, 'get', 'Get Torrent Blocker Reports Stats');
|
|
12
|
+
GetTorrentBlockerReportsStatsCommand.ResponseSchema = zod_1.z.object({
|
|
13
|
+
response: zod_1.z.object({
|
|
14
|
+
stats: zod_1.z.object({
|
|
15
|
+
distinctNodes: zod_1.z.number(),
|
|
16
|
+
distinctUsers: zod_1.z.number(),
|
|
17
|
+
totalReports: zod_1.z.number(),
|
|
18
|
+
reportsLast24Hours: zod_1.z.number(),
|
|
19
|
+
}),
|
|
20
|
+
}),
|
|
21
|
+
});
|
|
22
|
+
})(GetTorrentBlockerReportsStatsCommand || (exports.GetTorrentBlockerReportsStatsCommand = GetTorrentBlockerReportsStatsCommand = {}));
|
package/build/frontend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports.command.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetTorrentBlockerReportsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
|
+
const api_1 = require("../../../api");
|
|
7
|
+
const constants_1 = require("../../../constants");
|
|
8
|
+
var GetTorrentBlockerReportsCommand;
|
|
9
|
+
(function (GetTorrentBlockerReportsCommand) {
|
|
10
|
+
GetTorrentBlockerReportsCommand.url = api_1.REST_API.NODE_PLUGINS.TORRENT_BLOCKER.GET_REPORTS;
|
|
11
|
+
GetTorrentBlockerReportsCommand.TSQ_url = GetTorrentBlockerReportsCommand.url;
|
|
12
|
+
GetTorrentBlockerReportsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.NODE_PLUGINS_ROUTES.TORRENT_BLOCKER.GET_REPORTS, 'get', 'Get Torrent Blocker Reports');
|
|
13
|
+
GetTorrentBlockerReportsCommand.RequestQuerySchema = models_1.TanstackQueryRequestQuerySchema;
|
|
14
|
+
GetTorrentBlockerReportsCommand.ResponseSchema = zod_1.z.object({
|
|
15
|
+
response: zod_1.z.object({
|
|
16
|
+
records: zod_1.z.array(models_1.TorrentBlockerReportSchema),
|
|
17
|
+
total: zod_1.z.number(),
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
})(GetTorrentBlockerReportsCommand || (exports.GetTorrentBlockerReportsCommand = GetTorrentBlockerReportsCommand = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./get-torrent-blocker-reports.command"), exports);
|
|
18
|
+
__exportStar(require("./truncate-torrent-blocker-reports.command"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TruncateTorrentBlockerReportsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
|
+
const api_1 = require("../../../api");
|
|
7
|
+
const constants_1 = require("../../../constants");
|
|
8
|
+
var TruncateTorrentBlockerReportsCommand;
|
|
9
|
+
(function (TruncateTorrentBlockerReportsCommand) {
|
|
10
|
+
TruncateTorrentBlockerReportsCommand.url = api_1.REST_API.NODE_PLUGINS.TORRENT_BLOCKER.TRUNCATE_REPORTS;
|
|
11
|
+
TruncateTorrentBlockerReportsCommand.TSQ_url = TruncateTorrentBlockerReportsCommand.url;
|
|
12
|
+
TruncateTorrentBlockerReportsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.NODE_PLUGINS_ROUTES.TORRENT_BLOCKER.TRUNCATE_REPORTS, 'delete', 'Truncate Torrent Blocker Reports');
|
|
13
|
+
TruncateTorrentBlockerReportsCommand.ResponseSchema = zod_1.z.object({
|
|
14
|
+
response: zod_1.z.object({
|
|
15
|
+
records: zod_1.z.array(models_1.TorrentBlockerReportSchema),
|
|
16
|
+
total: zod_1.z.number(),
|
|
17
|
+
}),
|
|
18
|
+
});
|
|
19
|
+
})(TruncateTorrentBlockerReportsCommand || (exports.TruncateTorrentBlockerReportsCommand = TruncateTorrentBlockerReportsCommand = {}));
|
|
@@ -15,7 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("../subscriptions/get-by/get-raw-subscription-by-short-uuid.command"), exports);
|
|
18
|
-
__exportStar(require("./get-outline-subscription-by-short-uuid.command"), exports);
|
|
19
18
|
__exportStar(require("./get-subscription-by-short-uuid-by-client-type.command"), exports);
|
|
20
19
|
__exportStar(require("./get-subscription-by-short-uuid.command"), exports);
|
|
21
20
|
__exportStar(require("./get-subscription-info-by-short-uuid.command"), exports);
|
|
@@ -43,6 +43,7 @@ __exportStar(require("./subscription-settings"), exports);
|
|
|
43
43
|
__exportStar(require("./subscription-settings.schema"), exports);
|
|
44
44
|
__exportStar(require("./subscription-template.schema"), exports);
|
|
45
45
|
__exportStar(require("./tanstack-query"), exports);
|
|
46
|
+
__exportStar(require("./torrent-blocker-report.schema"), exports);
|
|
46
47
|
__exportStar(require("./users.schema"), exports);
|
|
47
48
|
__exportStar(require("./webhook"), exports);
|
|
48
49
|
__exportStar(require("./xray-json-advanced"), exports);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TorrentBlockerReportSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const extended_users_schema_1 = require("./extended-users.schema");
|
|
6
|
+
const nodes_schema_1 = require("./nodes.schema");
|
|
7
|
+
exports.TorrentBlockerReportSchema = zod_1.z.object({
|
|
8
|
+
id: zod_1.z.number(),
|
|
9
|
+
userId: zod_1.z.number(),
|
|
10
|
+
nodeId: zod_1.z.number(),
|
|
11
|
+
user: extended_users_schema_1.ExtendedUsersSchema.pick({
|
|
12
|
+
uuid: true,
|
|
13
|
+
username: true,
|
|
14
|
+
}),
|
|
15
|
+
node: nodes_schema_1.NodesSchema.pick({
|
|
16
|
+
uuid: true,
|
|
17
|
+
name: true,
|
|
18
|
+
countryCode: true,
|
|
19
|
+
}),
|
|
20
|
+
report: zod_1.z.object({
|
|
21
|
+
actionReport: zod_1.z.object({
|
|
22
|
+
blocked: zod_1.z.boolean(),
|
|
23
|
+
ip: zod_1.z.string(),
|
|
24
|
+
blockDuration: zod_1.z.number(),
|
|
25
|
+
willUnblockAt: zod_1.z
|
|
26
|
+
.string()
|
|
27
|
+
.datetime({ offset: true, local: true })
|
|
28
|
+
.transform((str) => new Date(str)),
|
|
29
|
+
userId: zod_1.z.string(),
|
|
30
|
+
processedAt: zod_1.z
|
|
31
|
+
.string()
|
|
32
|
+
.datetime({ offset: true, local: true })
|
|
33
|
+
.transform((str) => new Date(str)),
|
|
34
|
+
}),
|
|
35
|
+
xrayReport: zod_1.z.object({
|
|
36
|
+
email: zod_1.z.string().nullable(),
|
|
37
|
+
level: zod_1.z.number().nullable(),
|
|
38
|
+
protocol: zod_1.z.string().nullable(),
|
|
39
|
+
network: zod_1.z.string(),
|
|
40
|
+
source: zod_1.z.string().nullable(),
|
|
41
|
+
destination: zod_1.z.string(),
|
|
42
|
+
routeTarget: zod_1.z.string().nullable(),
|
|
43
|
+
originalTarget: zod_1.z.string().nullable(),
|
|
44
|
+
inboundTag: zod_1.z.string().nullable(),
|
|
45
|
+
inboundName: zod_1.z.string().nullable(),
|
|
46
|
+
inboundLocal: zod_1.z.string().nullable(),
|
|
47
|
+
outboundTag: zod_1.z.string().nullable(),
|
|
48
|
+
ts: zod_1.z.number(),
|
|
49
|
+
}),
|
|
50
|
+
}),
|
|
51
|
+
createdAt: zod_1.z
|
|
52
|
+
.string()
|
|
53
|
+
.datetime()
|
|
54
|
+
.transform((str) => new Date(str)),
|
|
55
|
+
});
|
package/package.json
CHANGED
package/build/backend/commands/subscription/get-outline-subscription-by-short-uuid.command.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare namespace GetOutlineSubscriptionByShortUuidCommand {
|
|
3
|
-
const url: (shortUuid: string) => string;
|
|
4
|
-
const TSQ_url: string;
|
|
5
|
-
const RequestSchema: z.ZodObject<{
|
|
6
|
-
shortUuid: z.ZodString;
|
|
7
|
-
type: z.ZodOptional<z.ZodString>;
|
|
8
|
-
encodedTag: z.ZodOptional<z.ZodString>;
|
|
9
|
-
}, "strip", z.ZodTypeAny, {
|
|
10
|
-
shortUuid: string;
|
|
11
|
-
type?: string | undefined;
|
|
12
|
-
encodedTag?: string | undefined;
|
|
13
|
-
}, {
|
|
14
|
-
shortUuid: string;
|
|
15
|
-
type?: string | undefined;
|
|
16
|
-
encodedTag?: string | undefined;
|
|
17
|
-
}>;
|
|
18
|
-
type Request = z.infer<typeof RequestSchema>;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=get-outline-subscription-by-short-uuid.command.d.ts.map
|
package/build/backend/commands/subscription/get-outline-subscription-by-short-uuid.command.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-outline-subscription-by-short-uuid.command.d.ts","sourceRoot":"","sources":["../../../../commands/subscription/get-outline-subscription-by-short-uuid.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,wCAAwC,CAAC;IAC/C,MAAM,GAAG,+BAA4B,CAAC;IACtC,MAAM,OAAO,QAAoB,CAAC;IAElC,MAAM,aAAa;;;;;;;;;;;;MAIxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;CACvD"}
|
package/build/backend/commands/subscription/get-outline-subscription-by-short-uuid.command.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetOutlineSubscriptionByShortUuidCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const api_1 = require("../../api");
|
|
6
|
-
var GetOutlineSubscriptionByShortUuidCommand;
|
|
7
|
-
(function (GetOutlineSubscriptionByShortUuidCommand) {
|
|
8
|
-
GetOutlineSubscriptionByShortUuidCommand.url = api_1.REST_API.SUBSCRIPTION.GET;
|
|
9
|
-
GetOutlineSubscriptionByShortUuidCommand.TSQ_url = GetOutlineSubscriptionByShortUuidCommand.url(':shortUuid');
|
|
10
|
-
GetOutlineSubscriptionByShortUuidCommand.RequestSchema = zod_1.z.object({
|
|
11
|
-
shortUuid: zod_1.z.string(),
|
|
12
|
-
type: zod_1.z.optional(zod_1.z.string()),
|
|
13
|
-
encodedTag: zod_1.z.optional(zod_1.z.string()),
|
|
14
|
-
});
|
|
15
|
-
})(GetOutlineSubscriptionByShortUuidCommand || (exports.GetOutlineSubscriptionByShortUuidCommand = GetOutlineSubscriptionByShortUuidCommand = {}));
|
package/build/frontend/commands/subscription/get-outline-subscription-by-short-uuid.command.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetOutlineSubscriptionByShortUuidCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const api_1 = require("../../api");
|
|
6
|
-
var GetOutlineSubscriptionByShortUuidCommand;
|
|
7
|
-
(function (GetOutlineSubscriptionByShortUuidCommand) {
|
|
8
|
-
GetOutlineSubscriptionByShortUuidCommand.url = api_1.REST_API.SUBSCRIPTION.GET;
|
|
9
|
-
GetOutlineSubscriptionByShortUuidCommand.TSQ_url = GetOutlineSubscriptionByShortUuidCommand.url(':shortUuid');
|
|
10
|
-
GetOutlineSubscriptionByShortUuidCommand.RequestSchema = zod_1.z.object({
|
|
11
|
-
shortUuid: zod_1.z.string(),
|
|
12
|
-
type: zod_1.z.optional(zod_1.z.string()),
|
|
13
|
-
encodedTag: zod_1.z.optional(zod_1.z.string()),
|
|
14
|
-
});
|
|
15
|
-
})(GetOutlineSubscriptionByShortUuidCommand || (exports.GetOutlineSubscriptionByShortUuidCommand = GetOutlineSubscriptionByShortUuidCommand = {}));
|