@remnawave/backend-contract 2.1.2 → 2.1.3

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.
Files changed (23) hide show
  1. package/build/backend/commands/nodes/create.command.js +1 -1
  2. package/build/backend/commands/nodes/update.command.js +1 -1
  3. package/build/backend/commands/subscription/get-raw-subscription-by-short-uuid.command.d.ts +9 -0
  4. package/build/backend/commands/subscription/get-raw-subscription-by-short-uuid.command.d.ts.map +1 -1
  5. package/build/backend/commands/subscription/get-raw-subscription-by-short-uuid.command.js +1 -0
  6. package/build/backend/commands/users/create-user.command.js +2 -2
  7. package/build/backend/constants/cache-keys/cache-keys.constants.d.ts +4 -0
  8. package/build/backend/constants/cache-keys/cache-keys.constants.d.ts.map +1 -0
  9. package/build/backend/constants/cache-keys/cache-keys.constants.js +6 -0
  10. package/build/backend/constants/cache-keys/index.d.ts +2 -0
  11. package/build/backend/constants/cache-keys/index.d.ts.map +1 -0
  12. package/build/backend/constants/cache-keys/index.js +17 -0
  13. package/build/backend/constants/index.d.ts +1 -0
  14. package/build/backend/constants/index.d.ts.map +1 -1
  15. package/build/backend/constants/index.js +1 -0
  16. package/build/frontend/commands/nodes/create.command.js +1 -1
  17. package/build/frontend/commands/nodes/update.command.js +1 -1
  18. package/build/frontend/commands/subscription/get-raw-subscription-by-short-uuid.command.js +1 -0
  19. package/build/frontend/commands/users/create-user.command.js +2 -2
  20. package/build/frontend/constants/cache-keys/cache-keys.constants.js +6 -0
  21. package/build/frontend/constants/cache-keys/index.js +17 -0
  22. package/build/frontend/constants/index.js +1 -0
  23. package/package.json +1 -1
@@ -11,7 +11,7 @@ var CreateNodeCommand;
11
11
  CreateNodeCommand.TSQ_url = CreateNodeCommand.url;
12
12
  CreateNodeCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.NODES_ROUTES.CREATE, 'post', 'Create a new node');
13
13
  CreateNodeCommand.RequestSchema = zod_1.z.object({
14
- name: zod_1.z.string().min(5, 'Minimum 5 characters!'),
14
+ name: zod_1.z.string().min(3, 'Minimum 3 characters!'),
15
15
  address: zod_1.z.string().min(2, 'Minimum 2 characters!'),
16
16
  port: zod_1.z.number().int().min(1, 'Port is required').optional(),
17
17
  isTrafficTrackingActive: zod_1.z.boolean().optional().default(false),
@@ -13,7 +13,7 @@ var UpdateNodeCommand;
13
13
  UpdateNodeCommand.RequestSchema = models_1.NodesSchema.pick({
14
14
  uuid: true,
15
15
  }).extend({
16
- name: zod_1.z.optional(zod_1.z.string().min(5, 'Min. 5 characters')),
16
+ name: zod_1.z.optional(zod_1.z.string().min(3, 'Min. 3 characters')),
17
17
  address: zod_1.z.optional(zod_1.z.string().min(2, 'Min. 2 characters')),
18
18
  port: zod_1.z.optional(zod_1.z.number()),
19
19
  isTrafficTrackingActive: zod_1.z.optional(zod_1.z.boolean()),
@@ -120,11 +120,13 @@ export declare namespace GetRawSubscriptionByShortUuidCommand {
120
120
  configProfileInboundUuid: z.ZodNullable<z.ZodString>;
121
121
  isDisabled: z.ZodBoolean;
122
122
  viewPosition: z.ZodNumber;
123
+ remark: z.ZodString;
123
124
  }, "strip", z.ZodTypeAny, {
124
125
  uuid: string;
125
126
  tag: string;
126
127
  rawInbound: {} | null;
127
128
  viewPosition: number;
129
+ remark: string;
128
130
  isDisabled: boolean;
129
131
  configProfileUuid: string | null;
130
132
  configProfileInboundUuid: string | null;
@@ -133,6 +135,7 @@ export declare namespace GetRawSubscriptionByShortUuidCommand {
133
135
  tag: string;
134
136
  rawInbound: {} | null;
135
137
  viewPosition: number;
138
+ remark: string;
136
139
  isDisabled: boolean;
137
140
  configProfileUuid: string | null;
138
141
  configProfileInboundUuid: string | null;
@@ -173,6 +176,7 @@ export declare namespace GetRawSubscriptionByShortUuidCommand {
173
176
  tag: string;
174
177
  rawInbound: {} | null;
175
178
  viewPosition: number;
179
+ remark: string;
176
180
  isDisabled: boolean;
177
181
  configProfileUuid: string | null;
178
182
  configProfileInboundUuid: string | null;
@@ -213,6 +217,7 @@ export declare namespace GetRawSubscriptionByShortUuidCommand {
213
217
  tag: string;
214
218
  rawInbound: {} | null;
215
219
  viewPosition: number;
220
+ remark: string;
216
221
  isDisabled: boolean;
217
222
  configProfileUuid: string | null;
218
223
  configProfileInboundUuid: string | null;
@@ -269,6 +274,7 @@ export declare namespace GetRawSubscriptionByShortUuidCommand {
269
274
  tag: string;
270
275
  rawInbound: {} | null;
271
276
  viewPosition: number;
277
+ remark: string;
272
278
  isDisabled: boolean;
273
279
  configProfileUuid: string | null;
274
280
  configProfileInboundUuid: string | null;
@@ -325,6 +331,7 @@ export declare namespace GetRawSubscriptionByShortUuidCommand {
325
331
  tag: string;
326
332
  rawInbound: {} | null;
327
333
  viewPosition: number;
334
+ remark: string;
328
335
  isDisabled: boolean;
329
336
  configProfileUuid: string | null;
330
337
  configProfileInboundUuid: string | null;
@@ -383,6 +390,7 @@ export declare namespace GetRawSubscriptionByShortUuidCommand {
383
390
  tag: string;
384
391
  rawInbound: {} | null;
385
392
  viewPosition: number;
393
+ remark: string;
386
394
  isDisabled: boolean;
387
395
  configProfileUuid: string | null;
388
396
  configProfileInboundUuid: string | null;
@@ -441,6 +449,7 @@ export declare namespace GetRawSubscriptionByShortUuidCommand {
441
449
  tag: string;
442
450
  rawInbound: {} | null;
443
451
  viewPosition: number;
452
+ remark: string;
444
453
  isDisabled: boolean;
445
454
  configProfileUuid: string | null;
446
455
  configProfileInboundUuid: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"get-raw-subscription-by-short-uuid.command.d.ts","sourceRoot":"","sources":["../../../../commands/subscription/get-raw-subscription-by-short-uuid.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,oCAAoC,CAAC;IAC3C,MAAM,GAAG,+BAAgC,CAAC;IAC1C,MAAM,OAAO,QAAoB,CAAC;IAElC,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,kBAAkB;;;;;;MAM7B,CAAC;IAEH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAEvD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6EzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"get-raw-subscription-by-short-uuid.command.d.ts","sourceRoot":"","sources":["../../../../commands/subscription/get-raw-subscription-by-short-uuid.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,oCAAoC,CAAC;IAC3C,MAAM,GAAG,+BAAgC,CAAC;IAC1C,MAAM,OAAO,QAAoB,CAAC;IAElC,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,kBAAkB;;;;;;MAM7B,CAAC;IAEH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAEvD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA8EzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -76,6 +76,7 @@ var GetRawSubscriptionByShortUuidCommand;
76
76
  configProfileInboundUuid: zod_1.z.nullable(zod_1.z.string()),
77
77
  isDisabled: zod_1.z.boolean(),
78
78
  viewPosition: zod_1.z.number(),
79
+ remark: zod_1.z.string(),
79
80
  })),
80
81
  })),
81
82
  headers: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
@@ -18,8 +18,8 @@ var CreateUserCommand;
18
18
  })
19
19
  .regex(/^[a-zA-Z0-9_-]+$/, 'Username can only contain letters, numbers, underscores and dashes')
20
20
  .max(36, 'Username must be less than 36 characters')
21
- .min(6, 'Username must be at least 6 characters')
22
- .describe('Unique username for the user. Required. Must be 6-36 characters long and contain only letters, numbers, underscores and dashes.'),
21
+ .min(3, 'Username must be at least 3 characters')
22
+ .describe('Unique username for the user. Required. Must be 3-36 characters long and contain only letters, numbers, underscores and dashes.'),
23
23
  status: models_1.UsersSchema.shape.status
24
24
  .optional()
25
25
  .default(constants_1.USERS_STATUS.ACTIVE)
@@ -0,0 +1,4 @@
1
+ export declare const CACHE_KEYS: {
2
+ readonly SUBSCRIPTION_SETTINGS: "subscription_settings";
3
+ };
4
+ //# sourceMappingURL=cache-keys.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache-keys.constants.d.ts","sourceRoot":"","sources":["../../../../constants/cache-keys/cache-keys.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;CAEb,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CACHE_KEYS = void 0;
4
+ exports.CACHE_KEYS = {
5
+ SUBSCRIPTION_SETTINGS: 'subscription_settings',
6
+ };
@@ -0,0 +1,2 @@
1
+ export * from './cache-keys.constants';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../constants/cache-keys/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,17 @@
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("./cache-keys.constants"), exports);
@@ -1,3 +1,4 @@
1
+ export * from './cache-keys';
1
2
  export * from './endpoint-details';
2
3
  export * from './errors';
3
4
  export * from './events';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
@@ -14,6 +14,7 @@ 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("./cache-keys"), exports);
17
18
  __exportStar(require("./endpoint-details"), exports);
18
19
  __exportStar(require("./errors"), exports);
19
20
  __exportStar(require("./events"), exports);
@@ -11,7 +11,7 @@ var CreateNodeCommand;
11
11
  CreateNodeCommand.TSQ_url = CreateNodeCommand.url;
12
12
  CreateNodeCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.NODES_ROUTES.CREATE, 'post', 'Create a new node');
13
13
  CreateNodeCommand.RequestSchema = zod_1.z.object({
14
- name: zod_1.z.string().min(5, 'Minimum 5 characters!'),
14
+ name: zod_1.z.string().min(3, 'Minimum 3 characters!'),
15
15
  address: zod_1.z.string().min(2, 'Minimum 2 characters!'),
16
16
  port: zod_1.z.number().int().min(1, 'Port is required').optional(),
17
17
  isTrafficTrackingActive: zod_1.z.boolean().optional().default(false),
@@ -13,7 +13,7 @@ var UpdateNodeCommand;
13
13
  UpdateNodeCommand.RequestSchema = models_1.NodesSchema.pick({
14
14
  uuid: true,
15
15
  }).extend({
16
- name: zod_1.z.optional(zod_1.z.string().min(5, 'Min. 5 characters')),
16
+ name: zod_1.z.optional(zod_1.z.string().min(3, 'Min. 3 characters')),
17
17
  address: zod_1.z.optional(zod_1.z.string().min(2, 'Min. 2 characters')),
18
18
  port: zod_1.z.optional(zod_1.z.number()),
19
19
  isTrafficTrackingActive: zod_1.z.optional(zod_1.z.boolean()),
@@ -76,6 +76,7 @@ var GetRawSubscriptionByShortUuidCommand;
76
76
  configProfileInboundUuid: zod_1.z.nullable(zod_1.z.string()),
77
77
  isDisabled: zod_1.z.boolean(),
78
78
  viewPosition: zod_1.z.number(),
79
+ remark: zod_1.z.string(),
79
80
  })),
80
81
  })),
81
82
  headers: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
@@ -18,8 +18,8 @@ var CreateUserCommand;
18
18
  })
19
19
  .regex(/^[a-zA-Z0-9_-]+$/, 'Username can only contain letters, numbers, underscores and dashes')
20
20
  .max(36, 'Username must be less than 36 characters')
21
- .min(6, 'Username must be at least 6 characters')
22
- .describe('Unique username for the user. Required. Must be 6-36 characters long and contain only letters, numbers, underscores and dashes.'),
21
+ .min(3, 'Username must be at least 3 characters')
22
+ .describe('Unique username for the user. Required. Must be 3-36 characters long and contain only letters, numbers, underscores and dashes.'),
23
23
  status: models_1.UsersSchema.shape.status
24
24
  .optional()
25
25
  .default(constants_1.USERS_STATUS.ACTIVE)
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CACHE_KEYS = void 0;
4
+ exports.CACHE_KEYS = {
5
+ SUBSCRIPTION_SETTINGS: 'subscription_settings',
6
+ };
@@ -0,0 +1,17 @@
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("./cache-keys.constants"), exports);
@@ -14,6 +14,7 @@ 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("./cache-keys"), exports);
17
18
  __exportStar(require("./endpoint-details"), exports);
18
19
  __exportStar(require("./errors"), exports);
19
20
  __exportStar(require("./events"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "2.1.2",
3
+ "version": "2.1.3",
4
4
  "public": true,
5
5
  "license": "AGPL-3.0-only",
6
6
  "description": "A contract library for Remnawave Backend. It can be used in backend and frontend.",