@remnawave/backend-contract 2.1.47 → 2.1.51

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 (110) hide show
  1. package/build/backend/api/controllers/index.d.ts +1 -0
  2. package/build/backend/api/controllers/index.d.ts.map +1 -1
  3. package/build/backend/api/controllers/index.js +1 -0
  4. package/build/backend/api/controllers/subscription-request-history.d.ts +6 -0
  5. package/build/backend/api/controllers/subscription-request-history.d.ts.map +1 -0
  6. package/build/backend/api/controllers/subscription-request-history.js +8 -0
  7. package/build/backend/api/controllers/subscription-settings.d.ts +0 -4
  8. package/build/backend/api/controllers/subscription-settings.d.ts.map +1 -1
  9. package/build/backend/api/controllers/subscription-settings.js +0 -4
  10. package/build/backend/api/controllers-info.d.ts +4 -0
  11. package/build/backend/api/controllers-info.d.ts.map +1 -1
  12. package/build/backend/api/controllers-info.js +4 -0
  13. package/build/backend/api/routes.d.ts +4 -4
  14. package/build/backend/api/routes.d.ts.map +1 -1
  15. package/build/backend/api/routes.js +4 -4
  16. package/build/backend/commands/hwid/get-all-hwid-devices.command.d.ts.map +1 -1
  17. package/build/backend/commands/hwid/get-all-hwid-devices.command.js +2 -31
  18. package/build/backend/commands/index.d.ts +1 -0
  19. package/build/backend/commands/index.d.ts.map +1 -1
  20. package/build/backend/commands/index.js +1 -0
  21. package/build/backend/commands/subscription-request-history/get-subscription-request-history-stats.command.d.ts +46 -0
  22. package/build/backend/commands/subscription-request-history/get-subscription-request-history-stats.command.d.ts.map +1 -0
  23. package/build/backend/commands/subscription-request-history/get-subscription-request-history-stats.command.js +20 -0
  24. package/build/backend/commands/subscription-request-history/get-subscription-request-history.command.d.ts +125 -0
  25. package/build/backend/commands/subscription-request-history/get-subscription-request-history.command.d.ts.map +1 -0
  26. package/build/backend/commands/subscription-request-history/get-subscription-request-history.command.js +20 -0
  27. package/build/backend/commands/subscription-request-history/index.d.ts +3 -0
  28. package/build/backend/commands/subscription-request-history/index.d.ts.map +1 -0
  29. package/build/backend/commands/{subscription-settings/subscription-response-rules → subscription-request-history}/index.js +2 -2
  30. package/build/backend/commands/subscription-settings/index.d.ts +0 -1
  31. package/build/backend/commands/subscription-settings/index.d.ts.map +1 -1
  32. package/build/backend/commands/subscription-settings/index.js +0 -1
  33. package/build/backend/commands/subscription-template/get-template.command.d.ts +6 -6
  34. package/build/backend/commands/subscription-template/update-template.command.d.ts +6 -6
  35. package/build/backend/commands/users/get-all-users.command.d.ts.map +1 -1
  36. package/build/backend/commands/users/get-all-users.command.js +2 -31
  37. package/build/backend/constants/cache-keys/cache-keys.constants.d.ts +0 -1
  38. package/build/backend/constants/cache-keys/cache-keys.constants.d.ts.map +1 -1
  39. package/build/backend/constants/cache-keys/cache-keys.constants.js +0 -1
  40. package/build/backend/constants/errors/errors.d.ts +2 -7
  41. package/build/backend/constants/errors/errors.d.ts.map +1 -1
  42. package/build/backend/constants/errors/errors.js +2 -7
  43. package/build/backend/constants/index.d.ts +0 -1
  44. package/build/backend/constants/index.d.ts.map +1 -1
  45. package/build/backend/constants/index.js +0 -1
  46. package/build/backend/constants/subscription-template/template-type/template-type.constant.d.ts +1 -1
  47. package/build/backend/models/index.d.ts +2 -1
  48. package/build/backend/models/index.d.ts.map +1 -1
  49. package/build/backend/models/index.js +2 -1
  50. package/build/backend/models/subscription-request-history.schema.d.ts +21 -0
  51. package/build/backend/models/subscription-request-history.schema.d.ts.map +1 -0
  52. package/build/backend/models/subscription-request-history.schema.js +14 -0
  53. package/build/backend/models/tanstack-query/index.d.ts +4 -0
  54. package/build/backend/models/tanstack-query/index.d.ts.map +1 -0
  55. package/build/{frontend/constants/subscription-response-rules/subscription-response-type → backend/models/tanstack-query}/index.js +3 -1
  56. package/build/backend/models/tanstack-query/tanstask-query-filter.schema.d.ts +12 -0
  57. package/build/backend/models/tanstack-query/tanstask-query-filter.schema.d.ts.map +1 -0
  58. package/build/backend/models/tanstack-query/tanstask-query-filter.schema.js +11 -0
  59. package/build/backend/models/tanstack-query/tanstask-query-request-query.schema.d.ts +54 -0
  60. package/build/backend/models/tanstack-query/tanstask-query-request-query.schema.d.ts.map +1 -0
  61. package/build/backend/models/tanstack-query/tanstask-query-request-query.schema.js +28 -0
  62. package/build/backend/models/tanstack-query/tanstask-query-sorting.schema.d.ts +12 -0
  63. package/build/backend/models/tanstack-query/tanstask-query-sorting.schema.d.ts.map +1 -0
  64. package/build/backend/models/tanstack-query/tanstask-query-sorting.schema.js +8 -0
  65. package/build/frontend/api/controllers/index.js +1 -0
  66. package/build/frontend/api/controllers/subscription-request-history.js +8 -0
  67. package/build/frontend/api/controllers/subscription-settings.js +0 -4
  68. package/build/frontend/api/controllers-info.js +4 -0
  69. package/build/frontend/api/routes.js +4 -4
  70. package/build/frontend/commands/hwid/get-all-hwid-devices.command.js +2 -31
  71. package/build/frontend/commands/index.js +1 -0
  72. package/build/frontend/commands/subscription-request-history/get-subscription-request-history-stats.command.js +20 -0
  73. package/build/frontend/commands/subscription-request-history/get-subscription-request-history.command.js +20 -0
  74. package/build/{backend/constants/subscription-response-rules/subscription-response-type → frontend/commands/subscription-request-history}/index.js +2 -1
  75. package/build/frontend/commands/subscription-settings/index.js +0 -1
  76. package/build/frontend/commands/users/get-all-users.command.js +2 -31
  77. package/build/frontend/constants/cache-keys/cache-keys.constants.js +0 -1
  78. package/build/frontend/constants/errors/errors.js +2 -7
  79. package/build/frontend/constants/index.js +0 -1
  80. package/build/frontend/models/index.js +2 -1
  81. package/build/frontend/models/subscription-request-history.schema.js +14 -0
  82. package/build/frontend/{commands/subscription-settings/subscription-response-rules → models/tanstack-query}/index.js +3 -2
  83. package/build/frontend/models/tanstack-query/tanstask-query-filter.schema.js +11 -0
  84. package/build/frontend/models/tanstack-query/tanstask-query-request-query.schema.js +28 -0
  85. package/build/frontend/models/tanstack-query/tanstask-query-sorting.schema.js +8 -0
  86. package/package.json +1 -1
  87. package/build/backend/commands/subscription-settings/subscription-response-rules/get-subscription-response-rules.command.d.ts +0 -83
  88. package/build/backend/commands/subscription-settings/subscription-response-rules/get-subscription-response-rules.command.d.ts.map +0 -1
  89. package/build/backend/commands/subscription-settings/subscription-response-rules/get-subscription-response-rules.command.js +0 -18
  90. package/build/backend/commands/subscription-settings/subscription-response-rules/index.d.ts +0 -3
  91. package/build/backend/commands/subscription-settings/subscription-response-rules/index.d.ts.map +0 -1
  92. package/build/backend/commands/subscription-settings/subscription-response-rules/update-subscription-response-rules.command.d.ts +0 -135
  93. package/build/backend/commands/subscription-settings/subscription-response-rules/update-subscription-response-rules.command.d.ts.map +0 -1
  94. package/build/backend/commands/subscription-settings/subscription-response-rules/update-subscription-response-rules.command.js +0 -28
  95. package/build/backend/constants/subscription-response-rules/index.d.ts +0 -2
  96. package/build/backend/constants/subscription-response-rules/index.d.ts.map +0 -1
  97. package/build/backend/constants/subscription-response-rules/index.js +0 -17
  98. package/build/backend/constants/subscription-response-rules/subscription-response-type/index.d.ts +0 -2
  99. package/build/backend/constants/subscription-response-rules/subscription-response-type/index.d.ts.map +0 -1
  100. package/build/backend/constants/subscription-response-rules/subscription-response-type/subscription-response-type.constant.d.ts +0 -13
  101. package/build/backend/constants/subscription-response-rules/subscription-response-type/subscription-response-type.constant.d.ts.map +0 -1
  102. package/build/backend/constants/subscription-response-rules/subscription-response-type/subscription-response-type.constant.js +0 -14
  103. package/build/backend/models/subscription-response-rules.schema.d.ts +0 -33
  104. package/build/backend/models/subscription-response-rules.schema.d.ts.map +0 -1
  105. package/build/backend/models/subscription-response-rules.schema.js +0 -13
  106. package/build/frontend/commands/subscription-settings/subscription-response-rules/get-subscription-response-rules.command.js +0 -18
  107. package/build/frontend/commands/subscription-settings/subscription-response-rules/update-subscription-response-rules.command.js +0 -28
  108. package/build/frontend/constants/subscription-response-rules/index.js +0 -17
  109. package/build/frontend/constants/subscription-response-rules/subscription-response-type/subscription-response-type.constant.js +0 -14
  110. package/build/frontend/models/subscription-response-rules.schema.js +0 -13
@@ -25,7 +25,6 @@ __exportStar(require("./metrics"), exports);
25
25
  __exportStar(require("./nodes"), exports);
26
26
  __exportStar(require("./oauth2"), exports);
27
27
  __exportStar(require("./roles"), exports);
28
- __exportStar(require("./subscription-response-rules"), exports);
29
28
  __exportStar(require("./subscription-template"), exports);
30
29
  __exportStar(require("./templates"), exports);
31
30
  __exportStar(require("./users"), exports);
@@ -32,6 +32,7 @@ __exportStar(require("./internal-squad.schema"), exports);
32
32
  __exportStar(require("./last-connected-node.schema"), exports);
33
33
  __exportStar(require("./nodes.schema"), exports);
34
34
  __exportStar(require("./subscription-info.schema"), exports);
35
- __exportStar(require("./subscription-response-rules.schema"), exports);
35
+ __exportStar(require("./subscription-request-history.schema"), exports);
36
36
  __exportStar(require("./subscription-settings.schema"), exports);
37
+ __exportStar(require("./tanstack-query"), exports);
37
38
  __exportStar(require("./users.schema"), exports);
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubscriptionRequestHistorySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.SubscriptionRequestHistorySchema = zod_1.z.object({
6
+ id: zod_1.z.number(),
7
+ userUuid: zod_1.z.string().uuid(),
8
+ requestIp: zod_1.z.nullable(zod_1.z.string()),
9
+ userAgent: zod_1.z.nullable(zod_1.z.string()),
10
+ requestAt: zod_1.z
11
+ .string()
12
+ .datetime()
13
+ .transform((str) => new Date(str)),
14
+ });
@@ -14,5 +14,6 @@ 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("./get-subscription-response-rules.command"), exports);
18
- __exportStar(require("./update-subscription-response-rules.command"), exports);
17
+ __exportStar(require("./tanstask-query-filter.schema"), exports);
18
+ __exportStar(require("./tanstask-query-request-query.schema"), exports);
19
+ __exportStar(require("./tanstask-query-sorting.schema"), exports);
@@ -0,0 +1,11 @@
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.TanstackQueryFilterSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ exports.TanstackQueryFilterSchema = zod_1.default.object({
9
+ id: zod_1.default.string(),
10
+ value: zod_1.default.unknown(),
11
+ });
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TanstackQueryRequestQuerySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const tanstask_query_sorting_schema_1 = require("./tanstask-query-sorting.schema");
6
+ const tanstask_query_filter_schema_1 = require("./tanstask-query-filter.schema");
7
+ exports.TanstackQueryRequestQuerySchema = zod_1.z.object({
8
+ start: zod_1.z.coerce
9
+ .number()
10
+ .default(0)
11
+ .describe('Start index (offset) of the results to return, default is 0'),
12
+ size: zod_1.z.coerce
13
+ .number()
14
+ .min(1, 'Size (limit) must be greater than 0')
15
+ .max(1000, 'Size (limit) must be less than 1000')
16
+ .describe('Number of results to return, no more than 1000')
17
+ .default(25),
18
+ filters: zod_1.z
19
+ .preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.array(tanstask_query_filter_schema_1.TanstackQueryFilterSchema))
20
+ .optional(),
21
+ filterModes: zod_1.z
22
+ .preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.record(zod_1.z.string(), zod_1.z.string()))
23
+ .optional(),
24
+ globalFilterMode: zod_1.z.string().optional(),
25
+ sorting: zod_1.z
26
+ .preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.array(tanstask_query_sorting_schema_1.TanstackQuerySortingSchema))
27
+ .optional(),
28
+ });
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TanstackQuerySortingSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.TanstackQuerySortingSchema = zod_1.z.object({
6
+ id: zod_1.z.string(),
7
+ desc: zod_1.z.boolean(),
8
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "2.1.47",
3
+ "version": "2.1.51",
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.",
@@ -1,83 +0,0 @@
1
- import { z } from 'zod';
2
- export declare namespace GetSubscriptionResponseRulesCommand {
3
- const url: "/api/subscription-settings/response-rules";
4
- const TSQ_url: "/api/subscription-settings/response-rules";
5
- const endpointDetails: import("../../../constants").EndpointDetails;
6
- const ResponseSchema: z.ZodObject<{
7
- response: z.ZodObject<{
8
- rules: z.ZodArray<z.ZodObject<{
9
- uuid: z.ZodString;
10
- order: z.ZodNumber;
11
- isFallback: z.ZodBoolean;
12
- userAgentRegex: z.ZodNullable<z.ZodString>;
13
- xDeviceOsHeader: z.ZodNullable<z.ZodString>;
14
- responseType: z.ZodNativeEnum<{
15
- readonly XRAY_BASE64: "XRAY_BASE64";
16
- readonly XRAY_JSON: "XRAY_JSON";
17
- readonly MIHOMO: "MIHOMO";
18
- readonly STASH: "STASH";
19
- readonly CLASH: "CLASH";
20
- readonly SINGBOX: "SINGBOX";
21
- readonly OUTLINE: "OUTLINE";
22
- readonly BLOCK: "BLOCK";
23
- }>;
24
- }, "strip", z.ZodTypeAny, {
25
- uuid: string;
26
- order: number;
27
- isFallback: boolean;
28
- userAgentRegex: string | null;
29
- xDeviceOsHeader: string | null;
30
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
31
- }, {
32
- uuid: string;
33
- order: number;
34
- isFallback: boolean;
35
- userAgentRegex: string | null;
36
- xDeviceOsHeader: string | null;
37
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
38
- }>, "many">;
39
- }, "strip", z.ZodTypeAny, {
40
- rules: {
41
- uuid: string;
42
- order: number;
43
- isFallback: boolean;
44
- userAgentRegex: string | null;
45
- xDeviceOsHeader: string | null;
46
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
47
- }[];
48
- }, {
49
- rules: {
50
- uuid: string;
51
- order: number;
52
- isFallback: boolean;
53
- userAgentRegex: string | null;
54
- xDeviceOsHeader: string | null;
55
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
56
- }[];
57
- }>;
58
- }, "strip", z.ZodTypeAny, {
59
- response: {
60
- rules: {
61
- uuid: string;
62
- order: number;
63
- isFallback: boolean;
64
- userAgentRegex: string | null;
65
- xDeviceOsHeader: string | null;
66
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
67
- }[];
68
- };
69
- }, {
70
- response: {
71
- rules: {
72
- uuid: string;
73
- order: number;
74
- isFallback: boolean;
75
- userAgentRegex: string | null;
76
- xDeviceOsHeader: string | null;
77
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
78
- }[];
79
- };
80
- }>;
81
- type Response = z.infer<typeof ResponseSchema>;
82
- }
83
- //# sourceMappingURL=get-subscription-response-rules.command.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-subscription-response-rules.command.d.ts","sourceRoot":"","sources":["../../../../../commands/subscription-settings/subscription-response-rules/get-subscription-response-rules.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,mCAAmC,CAAC;IAC1C,MAAM,GAAG,6CAAoD,CAAC;IAC9D,MAAM,OAAO,6CAAM,CAAC;IAEpB,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAIzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetSubscriptionResponseRulesCommand = 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 GetSubscriptionResponseRulesCommand;
9
- (function (GetSubscriptionResponseRulesCommand) {
10
- GetSubscriptionResponseRulesCommand.url = api_1.REST_API.SUBSCRIPTION_SETTINGS.RESPONSE_RULES.GET;
11
- GetSubscriptionResponseRulesCommand.TSQ_url = GetSubscriptionResponseRulesCommand.url;
12
- GetSubscriptionResponseRulesCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTION_SETTINGS_ROUTES.RESPONSE_RULES.GET, 'get', 'Get subscription response rules');
13
- GetSubscriptionResponseRulesCommand.ResponseSchema = zod_1.z.object({
14
- response: zod_1.z.object({
15
- rules: zod_1.z.array(models_1.SubscriptionResponseRulesSchema),
16
- }),
17
- });
18
- })(GetSubscriptionResponseRulesCommand || (exports.GetSubscriptionResponseRulesCommand = GetSubscriptionResponseRulesCommand = {}));
@@ -1,3 +0,0 @@
1
- export * from './get-subscription-response-rules.command';
2
- export * from './update-subscription-response-rules.command';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../commands/subscription-settings/subscription-response-rules/index.ts"],"names":[],"mappings":"AAAA,cAAc,2CAA2C,CAAC;AAC1D,cAAc,8CAA8C,CAAC"}
@@ -1,135 +0,0 @@
1
- import { z } from 'zod';
2
- export declare namespace UpdateSubscriptionResponseRulesCommand {
3
- const url: "/api/subscription-settings/response-rules";
4
- const TSQ_url: "/api/subscription-settings/response-rules";
5
- const endpointDetails: import("../../../constants").EndpointDetails;
6
- const RequestSchema: z.ZodObject<{
7
- rules: z.ZodArray<z.ZodObject<{
8
- uuid: z.ZodOptional<z.ZodString>;
9
- order: z.ZodNumber;
10
- isFallback: z.ZodBoolean;
11
- userAgentRegex: z.ZodNullable<z.ZodString>;
12
- xDeviceOsHeader: z.ZodNullable<z.ZodString>;
13
- responseType: z.ZodNativeEnum<{
14
- readonly XRAY_BASE64: "XRAY_BASE64";
15
- readonly XRAY_JSON: "XRAY_JSON";
16
- readonly MIHOMO: "MIHOMO";
17
- readonly STASH: "STASH";
18
- readonly CLASH: "CLASH";
19
- readonly SINGBOX: "SINGBOX";
20
- readonly OUTLINE: "OUTLINE";
21
- readonly BLOCK: "BLOCK";
22
- }>;
23
- }, "strip", z.ZodTypeAny, {
24
- order: number;
25
- isFallback: boolean;
26
- userAgentRegex: string | null;
27
- xDeviceOsHeader: string | null;
28
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
29
- uuid?: string | undefined;
30
- }, {
31
- order: number;
32
- isFallback: boolean;
33
- userAgentRegex: string | null;
34
- xDeviceOsHeader: string | null;
35
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
36
- uuid?: string | undefined;
37
- }>, "many">;
38
- }, "strip", z.ZodTypeAny, {
39
- rules: {
40
- order: number;
41
- isFallback: boolean;
42
- userAgentRegex: string | null;
43
- xDeviceOsHeader: string | null;
44
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
45
- uuid?: string | undefined;
46
- }[];
47
- }, {
48
- rules: {
49
- order: number;
50
- isFallback: boolean;
51
- userAgentRegex: string | null;
52
- xDeviceOsHeader: string | null;
53
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
54
- uuid?: string | undefined;
55
- }[];
56
- }>;
57
- type Request = z.infer<typeof RequestSchema>;
58
- const ResponseSchema: z.ZodObject<{
59
- response: z.ZodObject<{
60
- rules: z.ZodArray<z.ZodObject<{
61
- uuid: z.ZodString;
62
- order: z.ZodNumber;
63
- isFallback: z.ZodBoolean;
64
- userAgentRegex: z.ZodNullable<z.ZodString>;
65
- xDeviceOsHeader: z.ZodNullable<z.ZodString>;
66
- responseType: z.ZodNativeEnum<{
67
- readonly XRAY_BASE64: "XRAY_BASE64";
68
- readonly XRAY_JSON: "XRAY_JSON";
69
- readonly MIHOMO: "MIHOMO";
70
- readonly STASH: "STASH";
71
- readonly CLASH: "CLASH";
72
- readonly SINGBOX: "SINGBOX";
73
- readonly OUTLINE: "OUTLINE";
74
- readonly BLOCK: "BLOCK";
75
- }>;
76
- }, "strip", z.ZodTypeAny, {
77
- uuid: string;
78
- order: number;
79
- isFallback: boolean;
80
- userAgentRegex: string | null;
81
- xDeviceOsHeader: string | null;
82
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
83
- }, {
84
- uuid: string;
85
- order: number;
86
- isFallback: boolean;
87
- userAgentRegex: string | null;
88
- xDeviceOsHeader: string | null;
89
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
90
- }>, "many">;
91
- }, "strip", z.ZodTypeAny, {
92
- rules: {
93
- uuid: string;
94
- order: number;
95
- isFallback: boolean;
96
- userAgentRegex: string | null;
97
- xDeviceOsHeader: string | null;
98
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
99
- }[];
100
- }, {
101
- rules: {
102
- uuid: string;
103
- order: number;
104
- isFallback: boolean;
105
- userAgentRegex: string | null;
106
- xDeviceOsHeader: string | null;
107
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
108
- }[];
109
- }>;
110
- }, "strip", z.ZodTypeAny, {
111
- response: {
112
- rules: {
113
- uuid: string;
114
- order: number;
115
- isFallback: boolean;
116
- userAgentRegex: string | null;
117
- xDeviceOsHeader: string | null;
118
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
119
- }[];
120
- };
121
- }, {
122
- response: {
123
- rules: {
124
- uuid: string;
125
- order: number;
126
- isFallback: boolean;
127
- userAgentRegex: string | null;
128
- xDeviceOsHeader: string | null;
129
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
130
- }[];
131
- };
132
- }>;
133
- type Response = z.infer<typeof ResponseSchema>;
134
- }
135
- //# sourceMappingURL=update-subscription-response-rules.command.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-subscription-response-rules.command.d.ts","sourceRoot":"","sources":["../../../../../commands/subscription-settings/subscription-response-rules/update-subscription-response-rules.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,sCAAsC,CAAC;IAC7C,MAAM,GAAG,6CAAuD,CAAC;IACjE,MAAM,OAAO,6CAAM,CAAC;IAEpB,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAWxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAIzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpdateSubscriptionResponseRulesCommand = void 0;
4
- const zod_1 = require("zod");
5
- const constants_1 = require("../../../constants");
6
- const api_1 = require("../../../api");
7
- const models_1 = require("../../../models");
8
- var UpdateSubscriptionResponseRulesCommand;
9
- (function (UpdateSubscriptionResponseRulesCommand) {
10
- UpdateSubscriptionResponseRulesCommand.url = api_1.REST_API.SUBSCRIPTION_SETTINGS.RESPONSE_RULES.UPDATE;
11
- UpdateSubscriptionResponseRulesCommand.TSQ_url = UpdateSubscriptionResponseRulesCommand.url;
12
- UpdateSubscriptionResponseRulesCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTION_SETTINGS_ROUTES.RESPONSE_RULES.UPDATE, 'post', 'Update subscription response rules');
13
- UpdateSubscriptionResponseRulesCommand.RequestSchema = zod_1.z.object({
14
- rules: zod_1.z.array(zod_1.z.object({
15
- uuid: zod_1.z.string().uuid().optional(),
16
- order: zod_1.z.number(),
17
- isFallback: zod_1.z.boolean(),
18
- userAgentRegex: zod_1.z.string().nullable(),
19
- xDeviceOsHeader: zod_1.z.string().nullable(),
20
- responseType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_RESPONSE_TYPE),
21
- })),
22
- });
23
- UpdateSubscriptionResponseRulesCommand.ResponseSchema = zod_1.z.object({
24
- response: zod_1.z.object({
25
- rules: zod_1.z.array(models_1.SubscriptionResponseRulesSchema),
26
- }),
27
- });
28
- })(UpdateSubscriptionResponseRulesCommand || (exports.UpdateSubscriptionResponseRulesCommand = UpdateSubscriptionResponseRulesCommand = {}));
@@ -1,2 +0,0 @@
1
- export * from './subscription-response-type';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../constants/subscription-response-rules/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC"}
@@ -1,17 +0,0 @@
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("./subscription-response-type"), exports);
@@ -1,2 +0,0 @@
1
- export * from './subscription-response-type.constant';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../constants/subscription-response-rules/subscription-response-type/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC"}
@@ -1,13 +0,0 @@
1
- export declare const SUBSCRIPTION_RESPONSE_TYPE: {
2
- readonly XRAY_BASE64: "XRAY_BASE64";
3
- readonly XRAY_JSON: "XRAY_JSON";
4
- readonly MIHOMO: "MIHOMO";
5
- readonly STASH: "STASH";
6
- readonly CLASH: "CLASH";
7
- readonly SINGBOX: "SINGBOX";
8
- readonly OUTLINE: "OUTLINE";
9
- readonly BLOCK: "BLOCK";
10
- };
11
- export type TSubscriptionResponseType = [keyof typeof SUBSCRIPTION_RESPONSE_TYPE][number];
12
- export declare const SUBSCRIPTION_RESPONSE_TYPE_VALUES: ("XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK")[];
13
- //# sourceMappingURL=subscription-response-type.constant.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"subscription-response-type.constant.d.ts","sourceRoot":"","sources":["../../../../../constants/subscription-response-rules/subscription-response-type/subscription-response-type.constant.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B;;;;;;;;;CAa7B,CAAC;AAEX,MAAM,MAAM,yBAAyB,GAAG,CAAC,MAAM,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAC1F,eAAO,MAAM,iCAAiC,kGAA4C,CAAC"}
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SUBSCRIPTION_RESPONSE_TYPE_VALUES = exports.SUBSCRIPTION_RESPONSE_TYPE = void 0;
4
- exports.SUBSCRIPTION_RESPONSE_TYPE = {
5
- XRAY_BASE64: 'XRAY_BASE64',
6
- XRAY_JSON: 'XRAY_JSON',
7
- MIHOMO: 'MIHOMO',
8
- STASH: 'STASH',
9
- CLASH: 'CLASH',
10
- SINGBOX: 'SINGBOX',
11
- OUTLINE: 'OUTLINE',
12
- BLOCK: 'BLOCK',
13
- };
14
- exports.SUBSCRIPTION_RESPONSE_TYPE_VALUES = Object.values(exports.SUBSCRIPTION_RESPONSE_TYPE);
@@ -1,33 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const SubscriptionResponseRulesSchema: z.ZodObject<{
3
- uuid: z.ZodString;
4
- order: z.ZodNumber;
5
- isFallback: z.ZodBoolean;
6
- userAgentRegex: z.ZodNullable<z.ZodString>;
7
- xDeviceOsHeader: z.ZodNullable<z.ZodString>;
8
- responseType: z.ZodNativeEnum<{
9
- readonly XRAY_BASE64: "XRAY_BASE64";
10
- readonly XRAY_JSON: "XRAY_JSON";
11
- readonly MIHOMO: "MIHOMO";
12
- readonly STASH: "STASH";
13
- readonly CLASH: "CLASH";
14
- readonly SINGBOX: "SINGBOX";
15
- readonly OUTLINE: "OUTLINE";
16
- readonly BLOCK: "BLOCK";
17
- }>;
18
- }, "strip", z.ZodTypeAny, {
19
- uuid: string;
20
- order: number;
21
- isFallback: boolean;
22
- userAgentRegex: string | null;
23
- xDeviceOsHeader: string | null;
24
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
25
- }, {
26
- uuid: string;
27
- order: number;
28
- isFallback: boolean;
29
- userAgentRegex: string | null;
30
- xDeviceOsHeader: string | null;
31
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
32
- }>;
33
- //# sourceMappingURL=subscription-response-rules.schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"subscription-response-rules.schema.d.ts","sourceRoot":"","sources":["../../../models/subscription-response-rules.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO1C,CAAC"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SubscriptionResponseRulesSchema = void 0;
4
- const zod_1 = require("zod");
5
- const constants_1 = require("../constants");
6
- exports.SubscriptionResponseRulesSchema = zod_1.z.object({
7
- uuid: zod_1.z.string().uuid(),
8
- order: zod_1.z.number(),
9
- isFallback: zod_1.z.boolean(),
10
- userAgentRegex: zod_1.z.string().nullable(),
11
- xDeviceOsHeader: zod_1.z.string().nullable(),
12
- responseType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_RESPONSE_TYPE),
13
- });
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetSubscriptionResponseRulesCommand = 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 GetSubscriptionResponseRulesCommand;
9
- (function (GetSubscriptionResponseRulesCommand) {
10
- GetSubscriptionResponseRulesCommand.url = api_1.REST_API.SUBSCRIPTION_SETTINGS.RESPONSE_RULES.GET;
11
- GetSubscriptionResponseRulesCommand.TSQ_url = GetSubscriptionResponseRulesCommand.url;
12
- GetSubscriptionResponseRulesCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTION_SETTINGS_ROUTES.RESPONSE_RULES.GET, 'get', 'Get subscription response rules');
13
- GetSubscriptionResponseRulesCommand.ResponseSchema = zod_1.z.object({
14
- response: zod_1.z.object({
15
- rules: zod_1.z.array(models_1.SubscriptionResponseRulesSchema),
16
- }),
17
- });
18
- })(GetSubscriptionResponseRulesCommand || (exports.GetSubscriptionResponseRulesCommand = GetSubscriptionResponseRulesCommand = {}));
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpdateSubscriptionResponseRulesCommand = void 0;
4
- const zod_1 = require("zod");
5
- const constants_1 = require("../../../constants");
6
- const api_1 = require("../../../api");
7
- const models_1 = require("../../../models");
8
- var UpdateSubscriptionResponseRulesCommand;
9
- (function (UpdateSubscriptionResponseRulesCommand) {
10
- UpdateSubscriptionResponseRulesCommand.url = api_1.REST_API.SUBSCRIPTION_SETTINGS.RESPONSE_RULES.UPDATE;
11
- UpdateSubscriptionResponseRulesCommand.TSQ_url = UpdateSubscriptionResponseRulesCommand.url;
12
- UpdateSubscriptionResponseRulesCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTION_SETTINGS_ROUTES.RESPONSE_RULES.UPDATE, 'post', 'Update subscription response rules');
13
- UpdateSubscriptionResponseRulesCommand.RequestSchema = zod_1.z.object({
14
- rules: zod_1.z.array(zod_1.z.object({
15
- uuid: zod_1.z.string().uuid().optional(),
16
- order: zod_1.z.number(),
17
- isFallback: zod_1.z.boolean(),
18
- userAgentRegex: zod_1.z.string().nullable(),
19
- xDeviceOsHeader: zod_1.z.string().nullable(),
20
- responseType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_RESPONSE_TYPE),
21
- })),
22
- });
23
- UpdateSubscriptionResponseRulesCommand.ResponseSchema = zod_1.z.object({
24
- response: zod_1.z.object({
25
- rules: zod_1.z.array(models_1.SubscriptionResponseRulesSchema),
26
- }),
27
- });
28
- })(UpdateSubscriptionResponseRulesCommand || (exports.UpdateSubscriptionResponseRulesCommand = UpdateSubscriptionResponseRulesCommand = {}));
@@ -1,17 +0,0 @@
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("./subscription-response-type"), exports);
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SUBSCRIPTION_RESPONSE_TYPE_VALUES = exports.SUBSCRIPTION_RESPONSE_TYPE = void 0;
4
- exports.SUBSCRIPTION_RESPONSE_TYPE = {
5
- XRAY_BASE64: 'XRAY_BASE64',
6
- XRAY_JSON: 'XRAY_JSON',
7
- MIHOMO: 'MIHOMO',
8
- STASH: 'STASH',
9
- CLASH: 'CLASH',
10
- SINGBOX: 'SINGBOX',
11
- OUTLINE: 'OUTLINE',
12
- BLOCK: 'BLOCK',
13
- };
14
- exports.SUBSCRIPTION_RESPONSE_TYPE_VALUES = Object.values(exports.SUBSCRIPTION_RESPONSE_TYPE);
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SubscriptionResponseRulesSchema = void 0;
4
- const zod_1 = require("zod");
5
- const constants_1 = require("../constants");
6
- exports.SubscriptionResponseRulesSchema = zod_1.z.object({
7
- uuid: zod_1.z.string().uuid(),
8
- order: zod_1.z.number(),
9
- isFallback: zod_1.z.boolean(),
10
- userAgentRegex: zod_1.z.string().nullable(),
11
- xDeviceOsHeader: zod_1.z.string().nullable(),
12
- responseType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_RESPONSE_TYPE),
13
- });