@remnawave/backend-contract 2.3.8 → 2.3.10

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 (143) hide show
  1. package/build/backend/api/controllers/config-profiles.d.ts +3 -0
  2. package/build/backend/api/controllers/config-profiles.d.ts.map +1 -1
  3. package/build/backend/api/controllers/config-profiles.js +4 -0
  4. package/build/backend/api/controllers/external-squads.d.ts +3 -0
  5. package/build/backend/api/controllers/external-squads.d.ts.map +1 -1
  6. package/build/backend/api/controllers/external-squads.js +4 -0
  7. package/build/backend/api/controllers/internal-squads.d.ts +3 -0
  8. package/build/backend/api/controllers/internal-squads.d.ts.map +1 -1
  9. package/build/backend/api/controllers/internal-squads.js +4 -0
  10. package/build/backend/api/controllers/subscription-template.d.ts +3 -0
  11. package/build/backend/api/controllers/subscription-template.d.ts.map +1 -1
  12. package/build/backend/api/controllers/subscription-template.js +4 -0
  13. package/build/backend/api/routes.d.ts +12 -0
  14. package/build/backend/api/routes.d.ts.map +1 -1
  15. package/build/backend/api/routes.js +12 -0
  16. package/build/backend/commands/config-profiles/actions/index.d.ts +2 -0
  17. package/build/backend/commands/config-profiles/actions/index.d.ts.map +1 -0
  18. package/build/backend/commands/config-profiles/actions/index.js +17 -0
  19. package/build/backend/commands/config-profiles/actions/reorder.command.d.ts +278 -0
  20. package/build/backend/commands/config-profiles/actions/reorder.command.d.ts.map +1 -0
  21. package/build/backend/commands/config-profiles/actions/reorder.command.js +25 -0
  22. package/build/backend/commands/config-profiles/create-config-profile.command.d.ts +5 -0
  23. package/build/backend/commands/config-profiles/create-config-profile.command.d.ts.map +1 -1
  24. package/build/backend/commands/config-profiles/get-computed-config-profile-by-uuid.command.d.ts +5 -0
  25. package/build/backend/commands/config-profiles/get-computed-config-profile-by-uuid.command.d.ts.map +1 -1
  26. package/build/backend/commands/config-profiles/get-config-profile-by-uuid.command.d.ts +5 -0
  27. package/build/backend/commands/config-profiles/get-config-profile-by-uuid.command.d.ts.map +1 -1
  28. package/build/backend/commands/config-profiles/get-config-profiles.command.d.ts +7 -0
  29. package/build/backend/commands/config-profiles/get-config-profiles.command.d.ts.map +1 -1
  30. package/build/backend/commands/config-profiles/index.d.ts +1 -0
  31. package/build/backend/commands/config-profiles/index.d.ts.map +1 -1
  32. package/build/backend/commands/config-profiles/index.js +1 -0
  33. package/build/backend/commands/config-profiles/update-config-profile.command.d.ts +5 -0
  34. package/build/backend/commands/config-profiles/update-config-profile.command.d.ts.map +1 -1
  35. package/build/backend/commands/external-squads/actions/index.d.ts +2 -0
  36. package/build/backend/commands/external-squads/actions/index.d.ts.map +1 -0
  37. package/build/backend/commands/external-squads/actions/index.js +17 -0
  38. package/build/backend/commands/external-squads/actions/reorder.command.d.ts +436 -0
  39. package/build/backend/commands/external-squads/actions/reorder.command.d.ts.map +1 -0
  40. package/build/backend/commands/external-squads/actions/reorder.command.js +25 -0
  41. package/build/backend/commands/external-squads/create-external-squad.command.d.ts +5 -0
  42. package/build/backend/commands/external-squads/create-external-squad.command.d.ts.map +1 -1
  43. package/build/backend/commands/external-squads/get-external-squad-by-uuid.command.d.ts +5 -0
  44. package/build/backend/commands/external-squads/get-external-squad-by-uuid.command.d.ts.map +1 -1
  45. package/build/backend/commands/external-squads/get-external-squads.command.d.ts +7 -0
  46. package/build/backend/commands/external-squads/get-external-squads.command.d.ts.map +1 -1
  47. package/build/backend/commands/external-squads/index.d.ts +1 -0
  48. package/build/backend/commands/external-squads/index.d.ts.map +1 -1
  49. package/build/backend/commands/external-squads/index.js +1 -0
  50. package/build/backend/commands/external-squads/update-external-squad.command.d.ts +5 -0
  51. package/build/backend/commands/external-squads/update-external-squad.command.d.ts.map +1 -1
  52. package/build/backend/commands/internal-squads/actions/index.d.ts +2 -0
  53. package/build/backend/commands/internal-squads/actions/index.d.ts.map +1 -0
  54. package/build/backend/commands/internal-squads/actions/index.js +17 -0
  55. package/build/backend/commands/internal-squads/actions/reorder.command.d.ts +258 -0
  56. package/build/backend/commands/internal-squads/actions/reorder.command.d.ts.map +1 -0
  57. package/build/backend/commands/internal-squads/actions/reorder.command.js +25 -0
  58. package/build/backend/commands/internal-squads/create-internal-squad.command.d.ts +5 -0
  59. package/build/backend/commands/internal-squads/create-internal-squad.command.d.ts.map +1 -1
  60. package/build/backend/commands/internal-squads/get-internal-squad-by-uuid.d.ts +5 -0
  61. package/build/backend/commands/internal-squads/get-internal-squad-by-uuid.d.ts.map +1 -1
  62. package/build/backend/commands/internal-squads/get-internal-squads.command.d.ts +7 -0
  63. package/build/backend/commands/internal-squads/get-internal-squads.command.d.ts.map +1 -1
  64. package/build/backend/commands/internal-squads/index.d.ts +1 -0
  65. package/build/backend/commands/internal-squads/index.d.ts.map +1 -1
  66. package/build/backend/commands/internal-squads/index.js +1 -0
  67. package/build/backend/commands/internal-squads/update-internal-squad.command.d.ts +5 -0
  68. package/build/backend/commands/internal-squads/update-internal-squad.command.d.ts.map +1 -1
  69. package/build/backend/commands/nodes/actions/disable.command.d.ts +4 -4
  70. package/build/backend/commands/nodes/actions/enable.command.d.ts +4 -4
  71. package/build/backend/commands/nodes/actions/reorder.command.d.ts +4 -4
  72. package/build/backend/commands/nodes/create.command.d.ts +4 -4
  73. package/build/backend/commands/nodes/get-all.command.d.ts +4 -4
  74. package/build/backend/commands/nodes/get-one.command.d.ts +4 -4
  75. package/build/backend/commands/nodes/update.command.d.ts +4 -4
  76. package/build/backend/commands/subscription-template/actions/index.d.ts +2 -0
  77. package/build/backend/commands/subscription-template/actions/index.d.ts.map +1 -0
  78. package/build/backend/commands/subscription-template/actions/index.js +17 -0
  79. package/build/backend/commands/subscription-template/actions/reorder.command.d.ts +120 -0
  80. package/build/backend/commands/subscription-template/actions/reorder.command.d.ts.map +1 -0
  81. package/build/backend/commands/subscription-template/actions/reorder.command.js +25 -0
  82. package/build/backend/commands/subscription-template/create-template.command.d.ts +5 -0
  83. package/build/backend/commands/subscription-template/create-template.command.d.ts.map +1 -1
  84. package/build/backend/commands/subscription-template/create-template.command.js +4 -10
  85. package/build/backend/commands/subscription-template/get-template.command.d.ts +5 -0
  86. package/build/backend/commands/subscription-template/get-template.command.d.ts.map +1 -1
  87. package/build/backend/commands/subscription-template/get-template.command.js +3 -9
  88. package/build/backend/commands/subscription-template/get-templates.command.d.ts +7 -0
  89. package/build/backend/commands/subscription-template/get-templates.command.d.ts.map +1 -1
  90. package/build/backend/commands/subscription-template/get-templates.command.js +3 -9
  91. package/build/backend/commands/subscription-template/index.d.ts +1 -0
  92. package/build/backend/commands/subscription-template/index.d.ts.map +1 -1
  93. package/build/backend/commands/subscription-template/index.js +1 -0
  94. package/build/backend/commands/subscription-template/update-template.command.d.ts +5 -0
  95. package/build/backend/commands/subscription-template/update-template.command.d.ts.map +1 -1
  96. package/build/backend/commands/subscription-template/update-template.command.js +3 -9
  97. package/build/backend/constants/errors/errors.d.ts +5 -0
  98. package/build/backend/constants/errors/errors.d.ts.map +1 -1
  99. package/build/backend/constants/errors/errors.js +5 -0
  100. package/build/backend/models/config-profile.schema.d.ts +3 -0
  101. package/build/backend/models/config-profile.schema.d.ts.map +1 -1
  102. package/build/backend/models/config-profile.schema.js +1 -0
  103. package/build/backend/models/external-squad.schema.d.ts +3 -0
  104. package/build/backend/models/external-squad.schema.d.ts.map +1 -1
  105. package/build/backend/models/external-squad.schema.js +1 -0
  106. package/build/backend/models/index.d.ts +1 -0
  107. package/build/backend/models/index.d.ts.map +1 -1
  108. package/build/backend/models/index.js +1 -0
  109. package/build/backend/models/internal-squad.schema.d.ts +3 -0
  110. package/build/backend/models/internal-squad.schema.d.ts.map +1 -1
  111. package/build/backend/models/internal-squad.schema.js +1 -0
  112. package/build/backend/models/nodes.schema.d.ts +2 -2
  113. package/build/backend/models/subscription-template.schema.d.ts +31 -0
  114. package/build/backend/models/subscription-template.schema.d.ts.map +1 -0
  115. package/build/backend/models/subscription-template.schema.js +16 -0
  116. package/build/frontend/api/controllers/config-profiles.js +4 -0
  117. package/build/frontend/api/controllers/external-squads.js +4 -0
  118. package/build/frontend/api/controllers/internal-squads.js +4 -0
  119. package/build/frontend/api/controllers/subscription-template.js +4 -0
  120. package/build/frontend/api/routes.js +12 -0
  121. package/build/frontend/commands/config-profiles/actions/index.js +17 -0
  122. package/build/frontend/commands/config-profiles/actions/reorder.command.js +25 -0
  123. package/build/frontend/commands/config-profiles/index.js +1 -0
  124. package/build/frontend/commands/external-squads/actions/index.js +17 -0
  125. package/build/frontend/commands/external-squads/actions/reorder.command.js +25 -0
  126. package/build/frontend/commands/external-squads/index.js +1 -0
  127. package/build/frontend/commands/internal-squads/actions/index.js +17 -0
  128. package/build/frontend/commands/internal-squads/actions/reorder.command.js +25 -0
  129. package/build/frontend/commands/internal-squads/index.js +1 -0
  130. package/build/frontend/commands/subscription-template/actions/index.js +17 -0
  131. package/build/frontend/commands/subscription-template/actions/reorder.command.js +25 -0
  132. package/build/frontend/commands/subscription-template/create-template.command.js +4 -10
  133. package/build/frontend/commands/subscription-template/get-template.command.js +3 -9
  134. package/build/frontend/commands/subscription-template/get-templates.command.js +3 -9
  135. package/build/frontend/commands/subscription-template/index.js +1 -0
  136. package/build/frontend/commands/subscription-template/update-template.command.js +3 -9
  137. package/build/frontend/constants/errors/errors.js +5 -0
  138. package/build/frontend/models/config-profile.schema.js +1 -0
  139. package/build/frontend/models/external-squad.schema.js +1 -0
  140. package/build/frontend/models/index.js +1 -0
  141. package/build/frontend/models/internal-squad.schema.js +1 -0
  142. package/build/frontend/models/subscription-template.schema.js +16 -0
  143. package/package.json +1 -1
@@ -177,6 +177,9 @@ exports.REST_API = {
177
177
  DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_ROUTES.DELETE(uuid)}`,
178
178
  GET_ALL: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_ROUTES.GET_ALL}`,
179
179
  CREATE: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_ROUTES.CREATE}`,
180
+ ACTIONS: {
181
+ REORDER: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_ROUTES.ACTIONS.REORDER}`,
182
+ },
180
183
  },
181
184
  SUBSCRIPTION_SETTINGS: {
182
185
  GET: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_ROUTES.GET}`,
@@ -208,6 +211,9 @@ exports.REST_API = {
208
211
  GET_INBOUNDS_BY_PROFILE_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.CONFIG_PROFILES_CONTROLLER}/${CONTROLLERS.CONFIG_PROFILES_ROUTES.GET_INBOUNDS_BY_PROFILE_UUID(uuid)}`,
209
212
  GET_COMPUTED_CONFIG_BY_PROFILE_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.CONFIG_PROFILES_CONTROLLER}/${CONTROLLERS.CONFIG_PROFILES_ROUTES.GET_COMPUTED_CONFIG_BY_PROFILE_UUID(uuid)}`,
210
213
  GET_ALL_INBOUNDS: `${exports.ROOT}/${CONTROLLERS.CONFIG_PROFILES_CONTROLLER}/${CONTROLLERS.CONFIG_PROFILES_ROUTES.GET_ALL_INBOUNDS}`,
214
+ ACTIONS: {
215
+ REORDER: `${exports.ROOT}/${CONTROLLERS.CONFIG_PROFILES_CONTROLLER}/${CONTROLLERS.CONFIG_PROFILES_ROUTES.ACTIONS.REORDER}`,
216
+ },
211
217
  },
212
218
  INTERNAL_SQUADS: {
213
219
  GET: `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.GET}`,
@@ -220,6 +226,9 @@ exports.REST_API = {
220
226
  ADD_USERS: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.BULK_ACTIONS.ADD_USERS(uuid)}`,
221
227
  REMOVE_USERS: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.BULK_ACTIONS.REMOVE_USERS(uuid)}`,
222
228
  },
229
+ ACTIONS: {
230
+ REORDER: `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.ACTIONS.REORDER}`,
231
+ },
223
232
  },
224
233
  INFRA_BILLING: {
225
234
  GET_PROVIDERS: `${exports.ROOT}/${CONTROLLERS.INFRA_BILLING_CONTROLLER}/${CONTROLLERS.INFRA_BILLING_ROUTES.GET_PROVIDERS}`,
@@ -255,6 +264,9 @@ exports.REST_API = {
255
264
  ADD_USERS: (uuid) => `${exports.ROOT}/${CONTROLLERS.EXTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.EXTERNAL_SQUADS_ROUTES.BULK_ACTIONS.ADD_USERS(uuid)}`,
256
265
  REMOVE_USERS: (uuid) => `${exports.ROOT}/${CONTROLLERS.EXTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.EXTERNAL_SQUADS_ROUTES.BULK_ACTIONS.REMOVE_USERS(uuid)}`,
257
266
  },
267
+ ACTIONS: {
268
+ REORDER: `${exports.ROOT}/${CONTROLLERS.EXTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.EXTERNAL_SQUADS_ROUTES.ACTIONS.REORDER}`,
269
+ },
258
270
  },
259
271
  REMNAAWAVE_SETTINGS: {
260
272
  GET: `${exports.ROOT}/${CONTROLLERS.REMNAAWAVE_SETTINGS_CONTROLLER}/${CONTROLLERS.REMNAAWAVE_SETTINGS_ROUTES.GET}`,
@@ -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("./reorder.command"), exports);
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReorderConfigProfileCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../../api");
6
+ const constants_1 = require("../../../constants");
7
+ const models_1 = require("../../../models");
8
+ var ReorderConfigProfileCommand;
9
+ (function (ReorderConfigProfileCommand) {
10
+ ReorderConfigProfileCommand.url = api_1.REST_API.CONFIG_PROFILES.ACTIONS.REORDER;
11
+ ReorderConfigProfileCommand.TSQ_url = ReorderConfigProfileCommand.url;
12
+ ReorderConfigProfileCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.CONFIG_PROFILES_ROUTES.ACTIONS.REORDER, 'post', 'Reorder config profiles');
13
+ ReorderConfigProfileCommand.RequestSchema = zod_1.z.object({
14
+ items: zod_1.z.array(models_1.ConfigProfileSchema.pick({
15
+ viewPosition: true,
16
+ uuid: true,
17
+ })),
18
+ });
19
+ ReorderConfigProfileCommand.ResponseSchema = zod_1.z.object({
20
+ response: zod_1.z.object({
21
+ total: zod_1.z.number(),
22
+ configProfiles: zod_1.z.array(models_1.ConfigProfileSchema),
23
+ }),
24
+ });
25
+ })(ReorderConfigProfileCommand || (exports.ReorderConfigProfileCommand = ReorderConfigProfileCommand = {}));
@@ -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("./actions"), exports);
17
18
  __exportStar(require("./create-config-profile.command"), exports);
18
19
  __exportStar(require("./delete-config-profile.command"), exports);
19
20
  __exportStar(require("./get-all-inbounds.command"), exports);
@@ -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("./reorder.command"), exports);
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReorderExternalSquadCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../../api");
6
+ const constants_1 = require("../../../constants");
7
+ const models_1 = require("../../../models");
8
+ var ReorderExternalSquadCommand;
9
+ (function (ReorderExternalSquadCommand) {
10
+ ReorderExternalSquadCommand.url = api_1.REST_API.EXTERNAL_SQUADS.ACTIONS.REORDER;
11
+ ReorderExternalSquadCommand.TSQ_url = ReorderExternalSquadCommand.url;
12
+ ReorderExternalSquadCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.EXTERNAL_SQUADS_ROUTES.ACTIONS.REORDER, 'post', 'Reorder external squads');
13
+ ReorderExternalSquadCommand.RequestSchema = zod_1.z.object({
14
+ items: zod_1.z.array(models_1.ExternalSquadSchema.pick({
15
+ viewPosition: true,
16
+ uuid: true,
17
+ })),
18
+ });
19
+ ReorderExternalSquadCommand.ResponseSchema = zod_1.z.object({
20
+ response: zod_1.z.object({
21
+ total: zod_1.z.number(),
22
+ externalSquads: zod_1.z.array(models_1.ExternalSquadSchema),
23
+ }),
24
+ });
25
+ })(ReorderExternalSquadCommand || (exports.ReorderExternalSquadCommand = ReorderExternalSquadCommand = {}));
@@ -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("./actions"), exports);
17
18
  __exportStar(require("./bulk-actions"), exports);
18
19
  __exportStar(require("./create-external-squad.command"), exports);
19
20
  __exportStar(require("./delete-external-squad.command"), exports);
@@ -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("./reorder.command"), exports);
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReorderInternalSquadCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../../api");
6
+ const constants_1 = require("../../../constants");
7
+ const models_1 = require("../../../models");
8
+ var ReorderInternalSquadCommand;
9
+ (function (ReorderInternalSquadCommand) {
10
+ ReorderInternalSquadCommand.url = api_1.REST_API.INTERNAL_SQUADS.ACTIONS.REORDER;
11
+ ReorderInternalSquadCommand.TSQ_url = ReorderInternalSquadCommand.url;
12
+ ReorderInternalSquadCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INTERNAL_SQUADS_ROUTES.ACTIONS.REORDER, 'post', 'Reorder internal squads');
13
+ ReorderInternalSquadCommand.RequestSchema = zod_1.z.object({
14
+ items: zod_1.z.array(models_1.InternalSquadSchema.pick({
15
+ viewPosition: true,
16
+ uuid: true,
17
+ })),
18
+ });
19
+ ReorderInternalSquadCommand.ResponseSchema = zod_1.z.object({
20
+ response: zod_1.z.object({
21
+ total: zod_1.z.number(),
22
+ internalSquads: zod_1.z.array(models_1.InternalSquadSchema),
23
+ }),
24
+ });
25
+ })(ReorderInternalSquadCommand || (exports.ReorderInternalSquadCommand = ReorderInternalSquadCommand = {}));
@@ -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("./actions"), exports);
17
18
  __exportStar(require("./bulk-actions"), exports);
18
19
  __exportStar(require("./create-internal-squad.command"), exports);
19
20
  __exportStar(require("./delete-internal-squad.command"), exports);
@@ -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("./reorder.command"), exports);
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReorderSubscriptionTemplateCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../../api");
6
+ const models_1 = require("../../../models");
7
+ const constants_1 = require("../../../constants");
8
+ var ReorderSubscriptionTemplateCommand;
9
+ (function (ReorderSubscriptionTemplateCommand) {
10
+ ReorderSubscriptionTemplateCommand.url = api_1.REST_API.SUBSCRIPTION_TEMPLATE.ACTIONS.REORDER;
11
+ ReorderSubscriptionTemplateCommand.TSQ_url = ReorderSubscriptionTemplateCommand.url;
12
+ ReorderSubscriptionTemplateCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTION_TEMPLATE_ROUTES.ACTIONS.REORDER, 'post', 'Reorder subscription templates');
13
+ ReorderSubscriptionTemplateCommand.RequestSchema = zod_1.z.object({
14
+ items: zod_1.z.array(models_1.SubscriptionTemplateSchema.pick({
15
+ viewPosition: true,
16
+ uuid: true,
17
+ })),
18
+ });
19
+ ReorderSubscriptionTemplateCommand.ResponseSchema = zod_1.z.object({
20
+ response: zod_1.z.object({
21
+ total: zod_1.z.number(),
22
+ templates: zod_1.z.array(models_1.SubscriptionTemplateSchema),
23
+ }),
24
+ });
25
+ })(ReorderSubscriptionTemplateCommand || (exports.ReorderSubscriptionTemplateCommand = ReorderSubscriptionTemplateCommand = {}));
@@ -2,14 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CreateSubscriptionTemplateCommand = void 0;
4
4
  const zod_1 = require("zod");
5
- const api_1 = require("../../api");
6
5
  const constants_1 = require("../../constants");
7
- const constants_2 = require("../../constants");
6
+ const api_1 = require("../../api");
7
+ const models_1 = require("../../models");
8
8
  var CreateSubscriptionTemplateCommand;
9
9
  (function (CreateSubscriptionTemplateCommand) {
10
10
  CreateSubscriptionTemplateCommand.url = api_1.REST_API.SUBSCRIPTION_TEMPLATE.CREATE;
11
11
  CreateSubscriptionTemplateCommand.TSQ_url = CreateSubscriptionTemplateCommand.url;
12
- CreateSubscriptionTemplateCommand.endpointDetails = (0, constants_2.getEndpointDetails)(api_1.SUBSCRIPTION_TEMPLATE_ROUTES.CREATE, 'post', 'Create subscription template');
12
+ CreateSubscriptionTemplateCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTION_TEMPLATE_ROUTES.CREATE, 'post', 'Create subscription template');
13
13
  CreateSubscriptionTemplateCommand.RequestSchema = zod_1.z.object({
14
14
  name: zod_1.z
15
15
  .string()
@@ -19,12 +19,6 @@ var CreateSubscriptionTemplateCommand;
19
19
  templateType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE),
20
20
  });
21
21
  CreateSubscriptionTemplateCommand.ResponseSchema = zod_1.z.object({
22
- response: zod_1.z.object({
23
- uuid: zod_1.z.string().uuid(),
24
- name: zod_1.z.string(),
25
- templateType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE),
26
- templateJson: zod_1.z.nullable(zod_1.z.unknown()),
27
- encodedTemplateYaml: zod_1.z.nullable(zod_1.z.string()),
28
- }),
22
+ response: models_1.SubscriptionTemplateSchema,
29
23
  });
30
24
  })(CreateSubscriptionTemplateCommand || (exports.CreateSubscriptionTemplateCommand = CreateSubscriptionTemplateCommand = {}));
@@ -3,23 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetSubscriptionTemplateCommand = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const api_1 = require("../../api");
6
+ const models_1 = require("../../models");
6
7
  const constants_1 = require("../../constants");
7
- const constants_2 = require("../../constants");
8
8
  var GetSubscriptionTemplateCommand;
9
9
  (function (GetSubscriptionTemplateCommand) {
10
10
  GetSubscriptionTemplateCommand.url = api_1.REST_API.SUBSCRIPTION_TEMPLATE.GET;
11
11
  GetSubscriptionTemplateCommand.TSQ_url = GetSubscriptionTemplateCommand.url(':uuid');
12
- GetSubscriptionTemplateCommand.endpointDetails = (0, constants_2.getEndpointDetails)(api_1.SUBSCRIPTION_TEMPLATE_ROUTES.GET(':uuid'), 'get', 'Get subscription template by uuid');
12
+ GetSubscriptionTemplateCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTION_TEMPLATE_ROUTES.GET(':uuid'), 'get', 'Get subscription template by uuid');
13
13
  GetSubscriptionTemplateCommand.RequestSchema = zod_1.z.object({
14
14
  uuid: zod_1.z.string().uuid(),
15
15
  });
16
16
  GetSubscriptionTemplateCommand.ResponseSchema = zod_1.z.object({
17
- response: zod_1.z.object({
18
- uuid: zod_1.z.string().uuid(),
19
- name: zod_1.z.string(),
20
- templateType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE),
21
- templateJson: zod_1.z.nullable(zod_1.z.unknown()),
22
- encodedTemplateYaml: zod_1.z.nullable(zod_1.z.string()),
23
- }),
17
+ response: models_1.SubscriptionTemplateSchema,
24
18
  });
25
19
  })(GetSubscriptionTemplateCommand || (exports.GetSubscriptionTemplateCommand = GetSubscriptionTemplateCommand = {}));
@@ -3,23 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetSubscriptionTemplatesCommand = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const api_1 = require("../../api");
6
+ const models_1 = require("../../models");
6
7
  const constants_1 = require("../../constants");
7
- const constants_2 = require("../../constants");
8
8
  var GetSubscriptionTemplatesCommand;
9
9
  (function (GetSubscriptionTemplatesCommand) {
10
10
  GetSubscriptionTemplatesCommand.url = api_1.REST_API.SUBSCRIPTION_TEMPLATE.GET_ALL;
11
11
  GetSubscriptionTemplatesCommand.TSQ_url = GetSubscriptionTemplatesCommand.url;
12
- GetSubscriptionTemplatesCommand.endpointDetails = (0, constants_2.getEndpointDetails)(api_1.SUBSCRIPTION_TEMPLATE_ROUTES.GET_ALL, 'get', 'Get all subscription templates (wihout content)');
12
+ GetSubscriptionTemplatesCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTION_TEMPLATE_ROUTES.GET_ALL, 'get', 'Get all subscription templates (wihout content)');
13
13
  GetSubscriptionTemplatesCommand.ResponseSchema = zod_1.z.object({
14
14
  response: zod_1.z.object({
15
15
  total: zod_1.z.number(),
16
- templates: zod_1.z.array(zod_1.z.object({
17
- uuid: zod_1.z.string().uuid(),
18
- name: zod_1.z.string(),
19
- templateType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE),
20
- templateJson: zod_1.z.nullable(zod_1.z.unknown()),
21
- encodedTemplateYaml: zod_1.z.nullable(zod_1.z.string()),
22
- })),
16
+ templates: zod_1.z.array(models_1.SubscriptionTemplateSchema),
23
17
  }),
24
18
  });
25
19
  })(GetSubscriptionTemplatesCommand || (exports.GetSubscriptionTemplatesCommand = GetSubscriptionTemplatesCommand = {}));
@@ -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("./actions"), exports);
17
18
  __exportStar(require("./create-template.command"), exports);
18
19
  __exportStar(require("./delete-subscription-template.command"), exports);
19
20
  __exportStar(require("./get-template.command"), exports);
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UpdateSubscriptionTemplateCommand = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const api_1 = require("../../api");
6
+ const models_1 = require("../../models");
6
7
  const constants_1 = require("../../constants");
7
- const constants_2 = require("../../constants");
8
8
  var UpdateSubscriptionTemplateCommand;
9
9
  (function (UpdateSubscriptionTemplateCommand) {
10
10
  UpdateSubscriptionTemplateCommand.url = api_1.REST_API.SUBSCRIPTION_TEMPLATE.UPDATE;
11
11
  UpdateSubscriptionTemplateCommand.TSQ_url = UpdateSubscriptionTemplateCommand.url;
12
- UpdateSubscriptionTemplateCommand.endpointDetails = (0, constants_2.getEndpointDetails)(api_1.SUBSCRIPTION_TEMPLATE_ROUTES.UPDATE, 'patch', 'Update subscription template');
12
+ UpdateSubscriptionTemplateCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTION_TEMPLATE_ROUTES.UPDATE, 'patch', 'Update subscription template');
13
13
  UpdateSubscriptionTemplateCommand.RequestSchema = zod_1.z.object({
14
14
  uuid: zod_1.z.string().uuid(),
15
15
  name: zod_1.z
@@ -22,12 +22,6 @@ var UpdateSubscriptionTemplateCommand;
22
22
  encodedTemplateYaml: zod_1.z.optional(zod_1.z.string()),
23
23
  });
24
24
  UpdateSubscriptionTemplateCommand.ResponseSchema = zod_1.z.object({
25
- response: zod_1.z.object({
26
- uuid: zod_1.z.string().uuid(),
27
- name: zod_1.z.string(),
28
- templateType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE),
29
- templateJson: zod_1.z.nullable(zod_1.z.unknown()),
30
- encodedTemplateYaml: zod_1.z.nullable(zod_1.z.string()),
31
- }),
25
+ response: models_1.SubscriptionTemplateSchema,
32
26
  });
33
27
  })(UpdateSubscriptionTemplateCommand || (exports.UpdateSubscriptionTemplateCommand = UpdateSubscriptionTemplateCommand = {}));
@@ -1020,4 +1020,9 @@ exports.ERRORS = {
1020
1020
  message: 'Update passkey error',
1021
1021
  httpCode: 500,
1022
1022
  },
1023
+ GENERIC_REORDER_ERROR: {
1024
+ code: 'A203',
1025
+ message: 'Generic reorder error',
1026
+ httpCode: 500,
1027
+ },
1023
1028
  };
@@ -5,6 +5,7 @@ const zod_1 = require("zod");
5
5
  const config_profile_inbounds_schema_1 = require("./config-profile-inbounds.schema");
6
6
  exports.ConfigProfileSchema = zod_1.z.object({
7
7
  uuid: zod_1.z.string().uuid(),
8
+ viewPosition: zod_1.z.number().int(),
8
9
  name: zod_1.z.string(),
9
10
  config: zod_1.z.unknown(),
10
11
  inbounds: zod_1.z.array(config_profile_inbounds_schema_1.ConfigProfileInboundsSchema),
@@ -7,6 +7,7 @@ const hwid_settings_schema_1 = require("./subscription-settings/hwid-settings.sc
7
7
  const constants_1 = require("../constants");
8
8
  exports.ExternalSquadSchema = zod_1.z.object({
9
9
  uuid: zod_1.z.string().uuid(),
10
+ viewPosition: zod_1.z.number().int(),
10
11
  name: zod_1.z.string(),
11
12
  info: zod_1.z.object({
12
13
  membersCount: zod_1.z.number(),
@@ -39,5 +39,6 @@ __exportStar(require("./subscription-info.schema"), exports);
39
39
  __exportStar(require("./subscription-request-history.schema"), exports);
40
40
  __exportStar(require("./subscription-settings"), exports);
41
41
  __exportStar(require("./subscription-settings.schema"), exports);
42
+ __exportStar(require("./subscription-template.schema"), exports);
42
43
  __exportStar(require("./tanstack-query"), exports);
43
44
  __exportStar(require("./users.schema"), exports);
@@ -5,6 +5,7 @@ const zod_1 = require("zod");
5
5
  const config_profile_inbounds_schema_1 = require("./config-profile-inbounds.schema");
6
6
  exports.InternalSquadSchema = zod_1.z.object({
7
7
  uuid: zod_1.z.string().uuid(),
8
+ viewPosition: zod_1.z.number().int(),
8
9
  name: zod_1.z.string(),
9
10
  info: zod_1.z.object({
10
11
  membersCount: zod_1.z.number(),
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SubscriptionTemplateSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ const constants_1 = require("../constants");
9
+ exports.SubscriptionTemplateSchema = zod_1.default.object({
10
+ uuid: zod_1.default.string().uuid(),
11
+ viewPosition: zod_1.default.number().int(),
12
+ name: zod_1.default.string(),
13
+ templateType: zod_1.default.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE),
14
+ templateJson: zod_1.default.nullable(zod_1.default.unknown()),
15
+ encodedTemplateYaml: zod_1.default.nullable(zod_1.default.string()),
16
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "2.3.8",
3
+ "version": "2.3.10",
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.",