@remnawave/node-contract 0.4.1 → 0.5.1

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.
@@ -2,14 +2,11 @@ import { z } from 'zod';
2
2
  export declare namespace RemoveUserCommand {
3
3
  const url: "/node/handler/remove-user";
4
4
  const RequestSchema: z.ZodObject<{
5
- tags: z.ZodArray<z.ZodString, "many">;
6
5
  username: z.ZodString;
7
6
  }, "strip", z.ZodTypeAny, {
8
7
  username: string;
9
- tags: string[];
10
8
  }, {
11
9
  username: string;
12
- tags: string[];
13
10
  }>;
14
11
  type Request = z.infer<typeof RequestSchema>;
15
12
  const ResponseSchema: z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"remove-user.command.d.ts","sourceRoot":"","sources":["../../../commands/handler/remove-user.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,6BAA+B,CAAC;IAEzC,MAAM,aAAa;;;;;;;;;MAGxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;MAKzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"remove-user.command.d.ts","sourceRoot":"","sources":["../../../commands/handler/remove-user.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,6BAA+B,CAAC;IAEzC,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;MAKzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -7,7 +7,6 @@ var RemoveUserCommand;
7
7
  (function (RemoveUserCommand) {
8
8
  RemoveUserCommand.url = api_1.REST_API.HANDLER.REMOVE_USER;
9
9
  RemoveUserCommand.RequestSchema = zod_1.z.object({
10
- tags: zod_1.z.array(zod_1.z.string()),
11
10
  username: zod_1.z.string(),
12
11
  });
13
12
  RemoveUserCommand.ResponseSchema = zod_1.z.object({
@@ -1,2 +1,3 @@
1
1
  export * from './errors';
2
+ export * from './known-errors';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../constants/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../constants/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC"}
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./errors"), exports);
18
+ __exportStar(require("./known-errors"), exports);
@@ -0,0 +1,9 @@
1
+ export declare const REMNAWAVE_NODE_KNOWN_ERROR = "Remnawave Node Known Error";
2
+ export declare const KNOWN_ERRORS: {
3
+ XRAY_FAILED_TO_START: {
4
+ code: string;
5
+ message: string;
6
+ documentationUrl: string;
7
+ };
8
+ };
9
+ //# sourceMappingURL=known-errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"known-errors.d.ts","sourceRoot":"","sources":["../../../constants/errors/known-errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,+BAA+B,CAAC;AAEvE,eAAO,MAAM,YAAY;;;;;;CAOxB,CAAC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KNOWN_ERRORS = exports.REMNAWAVE_NODE_KNOWN_ERROR = void 0;
4
+ exports.REMNAWAVE_NODE_KNOWN_ERROR = 'Remnawave Node Known Error';
5
+ exports.KNOWN_ERRORS = {
6
+ XRAY_FAILED_TO_START: {
7
+ code: 'RN-001',
8
+ message: 'Xray core failed to start',
9
+ documentationUrl: 'https://remna.st/docs/guides/common-errors#xml-rpc-fault-spawn-error-xray',
10
+ },
11
+ };
@@ -20,7 +20,8 @@ export declare const XRAY_DEFAULT_STATS_MODEL: {
20
20
  export declare const XRAY_DEFAULT_API_MODEL: {
21
21
  readonly api: {
22
22
  readonly services: readonly ["HandlerService", "StatsService", "RoutingService"];
23
- readonly tag: "api";
23
+ readonly listen: "127.0.0.1:61000";
24
+ readonly tag: "REMNAWAVE_API";
24
25
  };
25
26
  };
26
27
  export declare const XRAY_API_INBOUND_MODEL: {
@@ -1 +1 @@
1
- {"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../../constants/xray/stats.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;CAe5B,CAAC;AAEX,eAAO,MAAM,wBAAwB;;CAE3B,CAAC;AAEX,eAAO,MAAM,sBAAsB;;;;;CAKzB,CAAC;AAEX,eAAO,MAAM,sBAAsB;;;;;;;;CAQzB,CAAC;AAEX,eAAO,MAAM,wBAAwB;;;;CAI3B,CAAC"}
1
+ {"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../../constants/xray/stats.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;CAe5B,CAAC;AAEX,eAAO,MAAM,wBAAwB;;CAE3B,CAAC;AAEX,eAAO,MAAM,sBAAsB;;;;;;CAMzB,CAAC;AAEX,eAAO,MAAM,sBAAsB;;;;;;;;CAQzB,CAAC;AAEX,eAAO,MAAM,wBAAwB;;;;CAI3B,CAAC"}
@@ -23,7 +23,8 @@ exports.XRAY_DEFAULT_STATS_MODEL = {
23
23
  exports.XRAY_DEFAULT_API_MODEL = {
24
24
  api: {
25
25
  services: ['HandlerService', 'StatsService', 'RoutingService'],
26
- tag: 'api',
26
+ listen: '127.0.0.1:61000',
27
+ tag: 'REMNAWAVE_API',
27
28
  },
28
29
  };
29
30
  exports.XRAY_API_INBOUND_MODEL = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/node-contract",
3
- "version": "0.4.1",
3
+ "version": "0.5.1",
4
4
  "description": "A node-contract library for Remnawave Panel",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",