@remnawave/backend-contract 0.0.52 → 0.0.54

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.
@@ -1,7 +1,7 @@
1
1
  export const API_TOKENS_CONTROLLER = 'tokens' as const;
2
2
 
3
3
  export const API_TOKENS_ROUTES = {
4
- CREATE: '',
5
- DELETE: '',
4
+ CREATE: 'create',
5
+ DELETE: 'delete',
6
6
  GET_ALL: '',
7
7
  } as const;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.API_TOKENS_ROUTES = exports.API_TOKENS_CONTROLLER = void 0;
4
4
  exports.API_TOKENS_CONTROLLER = 'tokens';
5
5
  exports.API_TOKENS_ROUTES = {
6
- CREATE: '',
7
- DELETE: '',
6
+ CREATE: 'create',
7
+ DELETE: 'delete',
8
8
  GET_ALL: '',
9
9
  };
@@ -263,4 +263,9 @@ exports.ERRORS = {
263
263
  message: 'Create config error',
264
264
  httpCode: 500,
265
265
  },
266
+ ENABLED_NODES_NOT_FOUND: {
267
+ code: 'A054',
268
+ message: 'Enabled nodes not found',
269
+ httpCode: 409,
270
+ },
266
271
  };
@@ -7,6 +7,6 @@ exports.ApiTokensSchema = zod_1.z.object({
7
7
  token: zod_1.z.string(),
8
8
  tokenName: zod_1.z.string(),
9
9
  tokenDescription: zod_1.z.nullable(zod_1.z.string()),
10
- createdAt: zod_1.z.date(),
11
- updatedAt: zod_1.z.date(),
10
+ createdAt: zod_1.z.string().transform((str) => new Date(str)),
11
+ updatedAt: zod_1.z.string().transform((str) => new Date(str)),
12
12
  });
@@ -30,6 +30,7 @@ export const ERRORS = {
30
30
  message: 'Node not found',
31
31
  httpCode: 404,
32
32
  },
33
+
33
34
  CONFIG_NOT_FOUND: {
34
35
  code: 'A012',
35
36
  message: 'Configuration not found',
@@ -260,4 +261,9 @@ export const ERRORS = {
260
261
  message: 'Create config error',
261
262
  httpCode: 500,
262
263
  },
264
+ ENABLED_NODES_NOT_FOUND: {
265
+ code: 'A054',
266
+ message: 'Enabled nodes not found',
267
+ httpCode: 409,
268
+ },
263
269
  } as const;
@@ -6,6 +6,6 @@ export const ApiTokensSchema = z.object({
6
6
  tokenName: z.string(),
7
7
  tokenDescription: z.nullable(z.string()),
8
8
 
9
- createdAt: z.date(),
10
- updatedAt: z.date(),
9
+ createdAt: z.string().transform((str) => new Date(str)),
10
+ updatedAt: z.string().transform((str) => new Date(str)),
11
11
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "0.0.52",
3
+ "version": "0.0.54",
4
4
  "description": "A contract library for Remnawave",
5
5
  "main": "index.js",
6
6
  "scripts": {