@remnawave/backend-contract 2.1.43 → 2.1.45

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 (21) hide show
  1. package/build/backend/api/controllers/subscription-settings.d.ts +2 -2
  2. package/build/backend/api/controllers/subscription-settings.js +2 -2
  3. package/build/backend/api/routes.d.ts +2 -2
  4. package/build/backend/commands/subscription-settings/subscription-response-rules/get-subscription-response-rules.command.d.ts +65 -41
  5. package/build/backend/commands/subscription-settings/subscription-response-rules/get-subscription-response-rules.command.d.ts.map +1 -1
  6. package/build/backend/commands/subscription-settings/subscription-response-rules/get-subscription-response-rules.command.js +3 -1
  7. package/build/backend/commands/subscription-settings/subscription-response-rules/update-subscription-response-rules.command.d.ts +65 -41
  8. package/build/backend/commands/subscription-settings/subscription-response-rules/update-subscription-response-rules.command.d.ts.map +1 -1
  9. package/build/backend/commands/subscription-settings/subscription-response-rules/update-subscription-response-rules.command.js +3 -1
  10. package/build/backend/constants/cache-keys/cache-keys.constants.d.ts +1 -0
  11. package/build/backend/constants/cache-keys/cache-keys.constants.d.ts.map +1 -1
  12. package/build/backend/constants/cache-keys/cache-keys.constants.js +1 -0
  13. package/build/backend/constants/errors/errors.d.ts +10 -0
  14. package/build/backend/constants/errors/errors.d.ts.map +1 -1
  15. package/build/backend/constants/errors/errors.js +10 -0
  16. package/build/frontend/api/controllers/subscription-settings.js +2 -2
  17. package/build/frontend/commands/subscription-settings/subscription-response-rules/get-subscription-response-rules.command.js +3 -1
  18. package/build/frontend/commands/subscription-settings/subscription-response-rules/update-subscription-response-rules.command.js +3 -1
  19. package/build/frontend/constants/cache-keys/cache-keys.constants.js +1 -0
  20. package/build/frontend/constants/errors/errors.js +10 -0
  21. package/package.json +1 -1
@@ -3,8 +3,8 @@ export declare const SUBSCRIPTION_SETTINGS_ROUTES: {
3
3
  readonly GET: "";
4
4
  readonly UPDATE: "";
5
5
  readonly RESPONSE_RULES: {
6
- readonly GET: "/response-rules";
7
- readonly UPDATE: "/response-rules";
6
+ readonly GET: "response-rules";
7
+ readonly UPDATE: "response-rules";
8
8
  };
9
9
  };
10
10
  //# sourceMappingURL=subscription-settings.d.ts.map
@@ -6,7 +6,7 @@ exports.SUBSCRIPTION_SETTINGS_ROUTES = {
6
6
  GET: '',
7
7
  UPDATE: '',
8
8
  RESPONSE_RULES: {
9
- GET: '/response-rules',
10
- UPDATE: '/response-rules',
9
+ GET: 'response-rules',
10
+ UPDATE: 'response-rules',
11
11
  },
12
12
  };
@@ -126,8 +126,8 @@ export declare const REST_API: {
126
126
  readonly GET: "/api/subscription-settings/";
127
127
  readonly UPDATE: "/api/subscription-settings/";
128
128
  readonly RESPONSE_RULES: {
129
- readonly GET: "/api/subscription-settings//response-rules";
130
- readonly UPDATE: "/api/subscription-settings//response-rules";
129
+ readonly GET: "/api/subscription-settings/response-rules";
130
+ readonly UPDATE: "/api/subscription-settings/response-rules";
131
131
  };
132
132
  };
133
133
  readonly HWID: {
@@ -1,57 +1,81 @@
1
1
  import { z } from 'zod';
2
2
  export declare namespace GetSubscriptionResponseRulesCommand {
3
- const url: "/api/subscription-settings//response-rules";
4
- const TSQ_url: "/api/subscription-settings//response-rules";
3
+ const url: "/api/subscription-settings/response-rules";
4
+ const TSQ_url: "/api/subscription-settings/response-rules";
5
5
  const endpointDetails: import("../../../constants").EndpointDetails;
6
6
  const ResponseSchema: z.ZodObject<{
7
7
  response: z.ZodObject<{
8
- uuid: 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
- }>;
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">;
23
39
  }, "strip", z.ZodTypeAny, {
24
- uuid: string;
25
- order: number;
26
- isFallback: boolean;
27
- userAgentRegex: string | null;
28
- xDeviceOsHeader: string | null;
29
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
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
+ }[];
30
48
  }, {
31
- uuid: string;
32
- order: number;
33
- isFallback: boolean;
34
- userAgentRegex: string | null;
35
- xDeviceOsHeader: string | null;
36
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
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
+ }[];
37
57
  }>;
38
58
  }, "strip", z.ZodTypeAny, {
39
59
  response: {
40
- uuid: string;
41
- order: number;
42
- isFallback: boolean;
43
- userAgentRegex: string | null;
44
- xDeviceOsHeader: string | null;
45
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
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
+ }[];
46
68
  };
47
69
  }, {
48
70
  response: {
49
- uuid: string;
50
- order: number;
51
- isFallback: boolean;
52
- userAgentRegex: string | null;
53
- xDeviceOsHeader: string | null;
54
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
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
+ }[];
55
79
  };
56
80
  }>;
57
81
  type Response = z.infer<typeof ResponseSchema>;
@@ -1 +1 @@
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,8CAAoD,CAAC;IAC9D,MAAM,OAAO,8CAAM,CAAC;IAEpB,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
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"}
@@ -11,6 +11,8 @@ var GetSubscriptionResponseRulesCommand;
11
11
  GetSubscriptionResponseRulesCommand.TSQ_url = GetSubscriptionResponseRulesCommand.url;
12
12
  GetSubscriptionResponseRulesCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTION_SETTINGS_ROUTES.RESPONSE_RULES.GET, 'get', 'Get subscription response rules');
13
13
  GetSubscriptionResponseRulesCommand.ResponseSchema = zod_1.z.object({
14
- response: models_1.SubscriptionResponseRulesSchema,
14
+ response: zod_1.z.object({
15
+ rules: zod_1.z.array(models_1.SubscriptionResponseRulesSchema),
16
+ }),
15
17
  });
16
18
  })(GetSubscriptionResponseRulesCommand || (exports.GetSubscriptionResponseRulesCommand = GetSubscriptionResponseRulesCommand = {}));
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare namespace UpdateSubscriptionResponseRulesCommand {
3
- const url: "/api/subscription-settings//response-rules";
4
- const TSQ_url: "/api/subscription-settings//response-rules";
3
+ const url: "/api/subscription-settings/response-rules";
4
+ const TSQ_url: "/api/subscription-settings/response-rules";
5
5
  const endpointDetails: import("../../../constants").EndpointDetails;
6
6
  const RequestSchema: z.ZodArray<z.ZodObject<{
7
7
  uuid: z.ZodString;
@@ -37,53 +37,77 @@ export declare namespace UpdateSubscriptionResponseRulesCommand {
37
37
  type Request = z.infer<typeof RequestSchema>;
38
38
  const ResponseSchema: z.ZodObject<{
39
39
  response: z.ZodObject<{
40
- uuid: z.ZodString;
41
- order: z.ZodNumber;
42
- isFallback: z.ZodBoolean;
43
- userAgentRegex: z.ZodNullable<z.ZodString>;
44
- xDeviceOsHeader: z.ZodNullable<z.ZodString>;
45
- responseType: z.ZodNativeEnum<{
46
- readonly XRAY_BASE64: "XRAY_BASE64";
47
- readonly XRAY_JSON: "XRAY_JSON";
48
- readonly MIHOMO: "MIHOMO";
49
- readonly STASH: "STASH";
50
- readonly CLASH: "CLASH";
51
- readonly SINGBOX: "SINGBOX";
52
- readonly OUTLINE: "OUTLINE";
53
- readonly BLOCK: "BLOCK";
54
- }>;
40
+ rules: z.ZodArray<z.ZodObject<{
41
+ uuid: z.ZodString;
42
+ order: z.ZodNumber;
43
+ isFallback: z.ZodBoolean;
44
+ userAgentRegex: z.ZodNullable<z.ZodString>;
45
+ xDeviceOsHeader: z.ZodNullable<z.ZodString>;
46
+ responseType: z.ZodNativeEnum<{
47
+ readonly XRAY_BASE64: "XRAY_BASE64";
48
+ readonly XRAY_JSON: "XRAY_JSON";
49
+ readonly MIHOMO: "MIHOMO";
50
+ readonly STASH: "STASH";
51
+ readonly CLASH: "CLASH";
52
+ readonly SINGBOX: "SINGBOX";
53
+ readonly OUTLINE: "OUTLINE";
54
+ readonly BLOCK: "BLOCK";
55
+ }>;
56
+ }, "strip", z.ZodTypeAny, {
57
+ uuid: string;
58
+ order: number;
59
+ isFallback: boolean;
60
+ userAgentRegex: string | null;
61
+ xDeviceOsHeader: string | null;
62
+ responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
63
+ }, {
64
+ uuid: string;
65
+ order: number;
66
+ isFallback: boolean;
67
+ userAgentRegex: string | null;
68
+ xDeviceOsHeader: string | null;
69
+ responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
70
+ }>, "many">;
55
71
  }, "strip", z.ZodTypeAny, {
56
- uuid: string;
57
- order: number;
58
- isFallback: boolean;
59
- userAgentRegex: string | null;
60
- xDeviceOsHeader: string | null;
61
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
72
+ rules: {
73
+ uuid: string;
74
+ order: number;
75
+ isFallback: boolean;
76
+ userAgentRegex: string | null;
77
+ xDeviceOsHeader: string | null;
78
+ responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
79
+ }[];
62
80
  }, {
63
- uuid: string;
64
- order: number;
65
- isFallback: boolean;
66
- userAgentRegex: string | null;
67
- xDeviceOsHeader: string | null;
68
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
81
+ rules: {
82
+ uuid: string;
83
+ order: number;
84
+ isFallback: boolean;
85
+ userAgentRegex: string | null;
86
+ xDeviceOsHeader: string | null;
87
+ responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
88
+ }[];
69
89
  }>;
70
90
  }, "strip", z.ZodTypeAny, {
71
91
  response: {
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";
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
+ }[];
78
100
  };
79
101
  }, {
80
102
  response: {
81
- uuid: string;
82
- order: number;
83
- isFallback: boolean;
84
- userAgentRegex: string | null;
85
- xDeviceOsHeader: string | null;
86
- responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
103
+ rules: {
104
+ uuid: string;
105
+ order: number;
106
+ isFallback: boolean;
107
+ userAgentRegex: string | null;
108
+ xDeviceOsHeader: string | null;
109
+ responseType: "XRAY_BASE64" | "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "OUTLINE" | "BLOCK";
110
+ }[];
87
111
  };
88
112
  }>;
89
113
  type Response = z.infer<typeof ResponseSchema>;
@@ -1 +1 @@
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,8CAAuD,CAAC;IACjE,MAAM,OAAO,8CAAM,CAAC;IAEpB,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eASzB,CAAC;IAEF,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eASzB,CAAC;IAEF,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"}
@@ -19,6 +19,8 @@ var UpdateSubscriptionResponseRulesCommand;
19
19
  responseType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_RESPONSE_TYPE),
20
20
  }));
21
21
  UpdateSubscriptionResponseRulesCommand.ResponseSchema = zod_1.z.object({
22
- response: models_1.SubscriptionResponseRulesSchema,
22
+ response: zod_1.z.object({
23
+ rules: zod_1.z.array(models_1.SubscriptionResponseRulesSchema),
24
+ }),
23
25
  });
24
26
  })(UpdateSubscriptionResponseRulesCommand || (exports.UpdateSubscriptionResponseRulesCommand = UpdateSubscriptionResponseRulesCommand = {}));
@@ -1,4 +1,5 @@
1
1
  export declare const CACHE_KEYS: {
2
2
  readonly SUBSCRIPTION_SETTINGS: "subscription_settings";
3
+ readonly SUBSCRIPTION_RESPONSE_RULES: "subscription_response_rules";
3
4
  };
4
5
  //# sourceMappingURL=cache-keys.constants.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"cache-keys.constants.d.ts","sourceRoot":"","sources":["../../../../constants/cache-keys/cache-keys.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;CAGb,CAAC"}
@@ -3,4 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CACHE_KEYS = void 0;
4
4
  exports.CACHE_KEYS = {
5
5
  SUBSCRIPTION_SETTINGS: 'subscription_settings',
6
+ SUBSCRIPTION_RESPONSE_RULES: 'subscription_response_rules',
6
7
  };
@@ -824,5 +824,15 @@ export declare const ERRORS: {
824
824
  readonly message: "Get hwid devices stats error";
825
825
  readonly httpCode: 500;
826
826
  };
827
+ readonly GET_SUBSCRIPTION_RESPONSE_RULES_ERROR: {
828
+ readonly code: "A160";
829
+ readonly message: "Get subscription response rules error";
830
+ readonly httpCode: 500;
831
+ };
832
+ readonly UPDATE_SUBSCRIPTION_RESPONSE_RULES_ERROR: {
833
+ readonly code: "A161";
834
+ readonly message: "Update subscription response rules error";
835
+ readonly httpCode: 500;
836
+ };
827
837
  };
828
838
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwJY,MAAM;;;;;;;;;;wCAUN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4IN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8e3B,CAAC"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwJY,MAAM;;;;;;;;;;wCAUN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4IN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwf3B,CAAC"}
@@ -795,4 +795,14 @@ exports.ERRORS = {
795
795
  message: 'Get hwid devices stats error',
796
796
  httpCode: 500,
797
797
  },
798
+ GET_SUBSCRIPTION_RESPONSE_RULES_ERROR: {
799
+ code: 'A160',
800
+ message: 'Get subscription response rules error',
801
+ httpCode: 500,
802
+ },
803
+ UPDATE_SUBSCRIPTION_RESPONSE_RULES_ERROR: {
804
+ code: 'A161',
805
+ message: 'Update subscription response rules error',
806
+ httpCode: 500,
807
+ },
798
808
  };
@@ -6,7 +6,7 @@ exports.SUBSCRIPTION_SETTINGS_ROUTES = {
6
6
  GET: '',
7
7
  UPDATE: '',
8
8
  RESPONSE_RULES: {
9
- GET: '/response-rules',
10
- UPDATE: '/response-rules',
9
+ GET: 'response-rules',
10
+ UPDATE: 'response-rules',
11
11
  },
12
12
  };
@@ -11,6 +11,8 @@ var GetSubscriptionResponseRulesCommand;
11
11
  GetSubscriptionResponseRulesCommand.TSQ_url = GetSubscriptionResponseRulesCommand.url;
12
12
  GetSubscriptionResponseRulesCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTION_SETTINGS_ROUTES.RESPONSE_RULES.GET, 'get', 'Get subscription response rules');
13
13
  GetSubscriptionResponseRulesCommand.ResponseSchema = zod_1.z.object({
14
- response: models_1.SubscriptionResponseRulesSchema,
14
+ response: zod_1.z.object({
15
+ rules: zod_1.z.array(models_1.SubscriptionResponseRulesSchema),
16
+ }),
15
17
  });
16
18
  })(GetSubscriptionResponseRulesCommand || (exports.GetSubscriptionResponseRulesCommand = GetSubscriptionResponseRulesCommand = {}));
@@ -19,6 +19,8 @@ var UpdateSubscriptionResponseRulesCommand;
19
19
  responseType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_RESPONSE_TYPE),
20
20
  }));
21
21
  UpdateSubscriptionResponseRulesCommand.ResponseSchema = zod_1.z.object({
22
- response: models_1.SubscriptionResponseRulesSchema,
22
+ response: zod_1.z.object({
23
+ rules: zod_1.z.array(models_1.SubscriptionResponseRulesSchema),
24
+ }),
23
25
  });
24
26
  })(UpdateSubscriptionResponseRulesCommand || (exports.UpdateSubscriptionResponseRulesCommand = UpdateSubscriptionResponseRulesCommand = {}));
@@ -3,4 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CACHE_KEYS = void 0;
4
4
  exports.CACHE_KEYS = {
5
5
  SUBSCRIPTION_SETTINGS: 'subscription_settings',
6
+ SUBSCRIPTION_RESPONSE_RULES: 'subscription_response_rules',
6
7
  };
@@ -795,4 +795,14 @@ exports.ERRORS = {
795
795
  message: 'Get hwid devices stats error',
796
796
  httpCode: 500,
797
797
  },
798
+ GET_SUBSCRIPTION_RESPONSE_RULES_ERROR: {
799
+ code: 'A160',
800
+ message: 'Get subscription response rules error',
801
+ httpCode: 500,
802
+ },
803
+ UPDATE_SUBSCRIPTION_RESPONSE_RULES_ERROR: {
804
+ code: 'A161',
805
+ message: 'Update subscription response rules error',
806
+ httpCode: 500,
807
+ },
798
808
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "2.1.43",
3
+ "version": "2.1.45",
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.",