@remnawave/backend-contract 2.8.12 → 2.8.15

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 (49) hide show
  1. package/build/backend/api/controllers/hosts.d.ts +2 -0
  2. package/build/backend/api/controllers/hosts.d.ts.map +1 -1
  3. package/build/backend/api/controllers/hosts.js +2 -0
  4. package/build/backend/api/routes.d.ts +2 -0
  5. package/build/backend/api/routes.d.ts.map +1 -1
  6. package/build/backend/api/routes.js +2 -0
  7. package/build/backend/commands/hosts/bulk/delete-many-hosts.command.d.ts +21 -14
  8. package/build/backend/commands/hosts/bulk/delete-many-hosts.command.d.ts.map +1 -1
  9. package/build/backend/commands/hosts/bulk/disable-many-hosts.command.d.ts +233 -0
  10. package/build/backend/commands/hosts/bulk/disable-many-hosts.command.d.ts.map +1 -0
  11. package/build/backend/commands/hosts/bulk/disable-many-hosts.command.js +19 -0
  12. package/build/backend/commands/hosts/bulk/enable-many-hosts.command.d.ts +233 -0
  13. package/build/backend/commands/hosts/bulk/enable-many-hosts.command.d.ts.map +1 -0
  14. package/build/backend/commands/hosts/bulk/enable-many-hosts.command.js +19 -0
  15. package/build/backend/commands/hosts/bulk/index.d.ts +2 -0
  16. package/build/backend/commands/hosts/bulk/index.d.ts.map +1 -1
  17. package/build/backend/commands/hosts/bulk/index.js +2 -0
  18. package/build/backend/commands/hosts/bulk/update-many-hosts.command.d.ts +31 -24
  19. package/build/backend/commands/hosts/bulk/update-many-hosts.command.d.ts.map +1 -1
  20. package/build/backend/commands/hosts/create.command.d.ts +32 -25
  21. package/build/backend/commands/hosts/create.command.d.ts.map +1 -1
  22. package/build/backend/commands/hosts/create.command.js +17 -17
  23. package/build/backend/commands/hosts/get-all.command.d.ts +21 -14
  24. package/build/backend/commands/hosts/get-all.command.d.ts.map +1 -1
  25. package/build/backend/commands/hosts/get-one.command.d.ts +21 -14
  26. package/build/backend/commands/hosts/get-one.command.d.ts.map +1 -1
  27. package/build/backend/commands/hosts/reorder.command.d.ts +11 -4
  28. package/build/backend/commands/hosts/reorder.command.d.ts.map +1 -1
  29. package/build/backend/commands/hosts/update.command.d.ts +43 -29
  30. package/build/backend/commands/hosts/update.command.d.ts.map +1 -1
  31. package/build/backend/commands/hosts/update.command.js +16 -16
  32. package/build/backend/constants/errors/errors.d.ts +10 -0
  33. package/build/backend/constants/errors/errors.d.ts.map +1 -1
  34. package/build/backend/constants/errors/errors.js +10 -0
  35. package/build/backend/constants/hosts/alpn.d.ts +1 -0
  36. package/build/backend/constants/hosts/alpn.d.ts.map +1 -1
  37. package/build/backend/models/hosts.schema.d.ts +16 -9
  38. package/build/backend/models/hosts.schema.d.ts.map +1 -1
  39. package/build/backend/models/hosts.schema.js +3 -3
  40. package/build/frontend/api/controllers/hosts.js +2 -0
  41. package/build/frontend/api/routes.js +2 -0
  42. package/build/frontend/commands/hosts/bulk/disable-many-hosts.command.js +19 -0
  43. package/build/frontend/commands/hosts/bulk/enable-many-hosts.command.js +19 -0
  44. package/build/frontend/commands/hosts/bulk/index.js +2 -0
  45. package/build/frontend/commands/hosts/create.command.js +17 -17
  46. package/build/frontend/commands/hosts/update.command.js +16 -16
  47. package/build/frontend/constants/errors/errors.js +10 -0
  48. package/build/frontend/models/hosts.schema.js +3 -3
  49. package/package.json +1 -1
@@ -38,23 +38,23 @@ var UpdateHostCommand;
38
38
  })
39
39
  .int()
40
40
  .optional(),
41
- path: zod_1.z.optional(zod_1.z.string()),
42
- sni: zod_1.z.optional(zod_1.z.string()),
43
- host: zod_1.z.optional(zod_1.z.string()),
44
- alpn: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.ALPN).nullable()),
45
- fingerprint: zod_1.z.optional(zod_1.z.string().nullable()),
46
- isDisabled: zod_1.z.optional(zod_1.z.boolean()),
41
+ path: zod_1.z.string().nullish(),
42
+ sni: zod_1.z.string().nullish(),
43
+ host: zod_1.z.string().nullish(),
44
+ alpn: zod_1.z.nativeEnum(constants_1.ALPN).nullish(),
45
+ fingerprint: zod_1.z.string().nullish(),
46
+ isDisabled: zod_1.z.boolean().default(false),
47
47
  securityLayer: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.SECURITY_LAYERS)),
48
- xHttpExtraParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
49
- muxParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
50
- sockoptParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
51
- finalMask: zod_1.z.optional(zod_1.z.nullable(zod_1.z.unknown())),
52
- serverDescription: zod_1.z.optional(zod_1.z
48
+ xHttpExtraParams: zod_1.z.unknown().nullish(),
49
+ muxParams: zod_1.z.unknown().nullish(),
50
+ sockoptParams: zod_1.z.unknown().nullish(),
51
+ finalMask: zod_1.z.unknown().nullish(),
52
+ serverDescription: zod_1.z
53
53
  .string()
54
54
  .max(30, {
55
55
  message: 'Server description must be less than 30 characters',
56
56
  })
57
- .nullable()),
57
+ .nullish(),
58
58
  tags: zod_1.z.optional(zod_1.z
59
59
  .array(zod_1.z
60
60
  .string()
@@ -65,13 +65,13 @@ var UpdateHostCommand;
65
65
  overrideSniFromAddress: zod_1.z.optional(zod_1.z.boolean()),
66
66
  keepSniBlank: zod_1.z.optional(zod_1.z.boolean()),
67
67
  vlessRouteId: zod_1.z.optional(zod_1.z.number().int().min(0).max(65535).nullable()),
68
- pinnedPeerCertSha256: zod_1.z.optional(zod_1.z.string().nullable()),
69
- verifyPeerCertByName: zod_1.z.optional(zod_1.z.string().nullable()),
68
+ pinnedPeerCertSha256: zod_1.z.string().nullish(),
69
+ verifyPeerCertByName: zod_1.z.string().nullish(),
70
70
  shuffleHost: zod_1.z.optional(zod_1.z.boolean()),
71
71
  mihomoX25519: zod_1.z.optional(zod_1.z.boolean()),
72
- mihomoIpVersion: zod_1.z.optional(zod_1.z.nativeEnum(constants_1.MIHOMO_IP_VERSION).nullable()),
72
+ mihomoIpVersion: zod_1.z.nativeEnum(constants_1.MIHOMO_IP_VERSION).nullish(),
73
73
  nodes: zod_1.z.optional(zod_1.z.array(zod_1.z.string().uuid())),
74
- xrayJsonTemplateUuid: zod_1.z.optional(zod_1.z.string().uuid().nullable()),
74
+ xrayJsonTemplateUuid: zod_1.z.string().uuid().nullish(),
75
75
  excludedInternalSquads: zod_1.z
76
76
  .optional(zod_1.z.array(zod_1.z.string().uuid()))
77
77
  .describe('Optional. Internal squads from which the host will be excluded.'),
@@ -390,6 +390,16 @@ exports.ERRORS = {
390
390
  message: 'Delete hosts error',
391
391
  httpCode: 500,
392
392
  },
393
+ BULK_ENABLE_HOSTS_ERROR: {
394
+ code: 'A080',
395
+ message: 'Bulk enable hosts error',
396
+ httpCode: 500,
397
+ },
398
+ BULK_DISABLE_HOSTS_ERROR: {
399
+ code: 'A081',
400
+ message: 'Bulk disable hosts error',
401
+ httpCode: 500,
402
+ },
393
403
  BULK_DELETE_USERS_BY_UUID_ERROR: {
394
404
  code: 'A084',
395
405
  message: 'Bulk delete users by UUID error',
@@ -13,9 +13,9 @@ exports.HostsSchema = zod_1.z.object({
13
13
  path: zod_1.z.string().nullable(),
14
14
  sni: zod_1.z.string().nullable(),
15
15
  host: zod_1.z.string().nullable(),
16
- alpn: zod_1.z.string().nullable(),
16
+ alpn: zod_1.z.nativeEnum(hosts_1.ALPN).nullable(),
17
17
  fingerprint: zod_1.z.string().nullable(),
18
- isDisabled: zod_1.z.boolean().default(false),
18
+ isDisabled: zod_1.z.boolean(),
19
19
  securityLayer: zod_1.z.nativeEnum(hosts_1.SECURITY_LAYERS).default(hosts_1.SECURITY_LAYERS.DEFAULT),
20
20
  xHttpExtraParams: zod_1.z.nullable(zod_1.z.unknown()),
21
21
  muxParams: zod_1.z.nullable(zod_1.z.unknown()),
@@ -39,5 +39,5 @@ exports.HostsSchema = zod_1.z.object({
39
39
  nodes: zod_1.z.array(zod_1.z.string().uuid()),
40
40
  xrayJsonTemplateUuid: zod_1.z.string().uuid().nullable(),
41
41
  excludedInternalSquads: zod_1.z.array(zod_1.z.string().uuid()),
42
- excludeFromSubscriptionTypes: zod_1.z.array(zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE)).optional(),
42
+ excludeFromSubscriptionTypes: zod_1.z.array(zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE)),
43
43
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "2.8.12",
3
+ "version": "2.8.15",
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.",