@remnawave/backend-contract 0.0.30 → 0.0.31

Sign up to get free protection for your applications and to get access to all the features.
@@ -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("./get-config.command"), exports);
18
+ __exportStar(require("./update-config.command"), exports);
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateXrayConfigCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../api");
6
+ var UpdateXrayConfigCommand;
7
+ (function (UpdateXrayConfigCommand) {
8
+ UpdateXrayConfigCommand.url = api_1.REST_API.XRAY.UPDATE_CONFIG;
9
+ UpdateXrayConfigCommand.RequestSchema = zod_1.z.record(zod_1.z.any());
10
+ UpdateXrayConfigCommand.ResponseSchema = zod_1.z.object({
11
+ response: zod_1.z.object({
12
+ config: zod_1.z.record(zod_1.z.any()),
13
+ }),
14
+ });
15
+ })(UpdateXrayConfigCommand || (exports.UpdateXrayConfigCommand = UpdateXrayConfigCommand = {}));
@@ -258,4 +258,9 @@ exports.ERRORS = {
258
258
  message: 'Update host error',
259
259
  httpCode: 500,
260
260
  },
261
+ CREATE_CONFIG_ERROR: {
262
+ code: 'A053',
263
+ message: 'Create config error',
264
+ httpCode: 500,
265
+ },
261
266
  };
@@ -1 +1,2 @@
1
1
  export * from './get-config.command';
2
+ export * from './update-config.command';
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ import { REST_API } from '../../api';
3
+
4
+ export namespace UpdateXrayConfigCommand {
5
+ export const url = REST_API.XRAY.UPDATE_CONFIG;
6
+
7
+ export const RequestSchema = z.record(z.any());
8
+
9
+ export type Request = z.infer<typeof RequestSchema>;
10
+
11
+ export const ResponseSchema = z.object({
12
+ response: z.object({
13
+ config: z.record(z.any()),
14
+ }),
15
+ });
16
+
17
+ export type Response = z.infer<typeof ResponseSchema>;
18
+ }
@@ -255,4 +255,9 @@ export const ERRORS = {
255
255
  message: 'Update host error',
256
256
  httpCode: 500,
257
257
  },
258
+ CREATE_CONFIG_ERROR: {
259
+ code: 'A053',
260
+ message: 'Create config error',
261
+ httpCode: 500,
262
+ },
258
263
  } as const;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "0.0.30",
3
+ "version": "0.0.31",
4
4
  "description": "A contract library for Remnawave",
5
5
  "main": "index.js",
6
6
  "scripts": {