@remnawave/backend-contract 2.1.42 → 2.1.43

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 (52) hide show
  1. package/build/backend/api/controllers/subscription-settings.d.ts +4 -0
  2. package/build/backend/api/controllers/subscription-settings.d.ts.map +1 -1
  3. package/build/backend/api/controllers/subscription-settings.js +4 -0
  4. package/build/backend/api/routes.d.ts +4 -0
  5. package/build/backend/api/routes.d.ts.map +1 -1
  6. package/build/backend/api/routes.js +4 -0
  7. package/build/backend/commands/subscription-settings/index.d.ts +1 -0
  8. package/build/backend/commands/subscription-settings/index.d.ts.map +1 -1
  9. package/build/backend/commands/subscription-settings/index.js +1 -0
  10. package/build/backend/commands/subscription-settings/subscription-response-rules/get-subscription-response-rules.command.d.ts +59 -0
  11. package/build/backend/commands/subscription-settings/subscription-response-rules/get-subscription-response-rules.command.d.ts.map +1 -0
  12. package/build/backend/commands/subscription-settings/subscription-response-rules/get-subscription-response-rules.command.js +16 -0
  13. package/build/backend/commands/subscription-settings/subscription-response-rules/index.d.ts +3 -0
  14. package/build/backend/commands/subscription-settings/subscription-response-rules/index.d.ts.map +1 -0
  15. package/build/backend/commands/subscription-settings/subscription-response-rules/index.js +18 -0
  16. package/build/backend/commands/subscription-settings/subscription-response-rules/update-subscription-response-rules.command.d.ts +91 -0
  17. package/build/backend/commands/subscription-settings/subscription-response-rules/update-subscription-response-rules.command.d.ts.map +1 -0
  18. package/build/backend/commands/subscription-settings/subscription-response-rules/update-subscription-response-rules.command.js +24 -0
  19. package/build/backend/commands/subscription-template/get-template.command.d.ts +6 -6
  20. package/build/backend/commands/subscription-template/update-template.command.d.ts +6 -6
  21. package/build/backend/constants/index.d.ts +1 -0
  22. package/build/backend/constants/index.d.ts.map +1 -1
  23. package/build/backend/constants/index.js +1 -0
  24. package/build/backend/constants/subscription-response-rules/index.d.ts +2 -0
  25. package/build/backend/constants/subscription-response-rules/index.d.ts.map +1 -0
  26. package/build/backend/constants/subscription-response-rules/index.js +17 -0
  27. package/build/backend/constants/subscription-response-rules/subscription-response-type/index.d.ts +2 -0
  28. package/build/backend/constants/subscription-response-rules/subscription-response-type/index.d.ts.map +1 -0
  29. package/build/backend/constants/subscription-response-rules/subscription-response-type/index.js +17 -0
  30. package/build/backend/constants/subscription-response-rules/subscription-response-type/subscription-response-type.constant.d.ts +13 -0
  31. package/build/backend/constants/subscription-response-rules/subscription-response-type/subscription-response-type.constant.d.ts.map +1 -0
  32. package/build/backend/constants/subscription-response-rules/subscription-response-type/subscription-response-type.constant.js +14 -0
  33. package/build/backend/constants/subscription-template/template-type/template-type.constant.d.ts +1 -1
  34. package/build/backend/models/index.d.ts +1 -0
  35. package/build/backend/models/index.d.ts.map +1 -1
  36. package/build/backend/models/index.js +1 -0
  37. package/build/backend/models/subscription-response-rules.schema.d.ts +33 -0
  38. package/build/backend/models/subscription-response-rules.schema.d.ts.map +1 -0
  39. package/build/backend/models/subscription-response-rules.schema.js +13 -0
  40. package/build/frontend/api/controllers/subscription-settings.js +4 -0
  41. package/build/frontend/api/routes.js +4 -0
  42. package/build/frontend/commands/subscription-settings/index.js +1 -0
  43. package/build/frontend/commands/subscription-settings/subscription-response-rules/get-subscription-response-rules.command.js +16 -0
  44. package/build/frontend/commands/subscription-settings/subscription-response-rules/index.js +18 -0
  45. package/build/frontend/commands/subscription-settings/subscription-response-rules/update-subscription-response-rules.command.js +24 -0
  46. package/build/frontend/constants/index.js +1 -0
  47. package/build/frontend/constants/subscription-response-rules/index.js +17 -0
  48. package/build/frontend/constants/subscription-response-rules/subscription-response-type/index.js +17 -0
  49. package/build/frontend/constants/subscription-response-rules/subscription-response-type/subscription-response-type.constant.js +14 -0
  50. package/build/frontend/models/index.js +1 -0
  51. package/build/frontend/models/subscription-response-rules.schema.js +13 -0
  52. package/package.json +1 -1
@@ -2,5 +2,9 @@ export declare const SUBSCRIPTION_SETTINGS_CONTROLLER: "subscription-settings";
2
2
  export declare const SUBSCRIPTION_SETTINGS_ROUTES: {
3
3
  readonly GET: "";
4
4
  readonly UPDATE: "";
5
+ readonly RESPONSE_RULES: {
6
+ readonly GET: "/response-rules";
7
+ readonly UPDATE: "/response-rules";
8
+ };
5
9
  };
6
10
  //# sourceMappingURL=subscription-settings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"subscription-settings.d.ts","sourceRoot":"","sources":["../../../../api/controllers/subscription-settings.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC,EAAG,uBAAgC,CAAC;AAEjF,eAAO,MAAM,4BAA4B;;;CAG/B,CAAC"}
1
+ {"version":3,"file":"subscription-settings.d.ts","sourceRoot":"","sources":["../../../../api/controllers/subscription-settings.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC,EAAG,uBAAgC,CAAC;AAEjF,eAAO,MAAM,4BAA4B;;;;;;;CAQ/B,CAAC"}
@@ -5,4 +5,8 @@ exports.SUBSCRIPTION_SETTINGS_CONTROLLER = 'subscription-settings';
5
5
  exports.SUBSCRIPTION_SETTINGS_ROUTES = {
6
6
  GET: '',
7
7
  UPDATE: '',
8
+ RESPONSE_RULES: {
9
+ GET: '/response-rules',
10
+ UPDATE: '/response-rules',
11
+ },
8
12
  };
@@ -125,6 +125,10 @@ export declare const REST_API: {
125
125
  readonly SUBSCRIPTION_SETTINGS: {
126
126
  readonly GET: "/api/subscription-settings/";
127
127
  readonly UPDATE: "/api/subscription-settings/";
128
+ readonly RESPONSE_RULES: {
129
+ readonly GET: "/api/subscription-settings//response-rules";
130
+ readonly UPDATE: "/api/subscription-settings//response-rules";
131
+ };
128
132
  };
129
133
  readonly HWID: {
130
134
  readonly GET_ALL_HWID_DEVICES: "/api/hwid/devices";
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAChD,eAAO,MAAM,WAAW,EAAG,SAAkB,CAAC;AAC9C,eAAO,MAAM,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;gCAcE,MAAM;;;;;;;;;qCAYD,MAAM;;gCAGX,MAAM;;oCAIF,MAAM;qCAIL,MAAM;qCAIN,MAAM;;;;;;iDAUM,MAAM;;;;;;;;gCAWvB,MAAM;qCAGD,MAAM;0CAED,MAAM;sDAEM,MAAM;;qCAMvB,MAAM;oCAIP,MAAM;2CAIC,MAAM;iDAIA,MAAM;;;6CAOV,MAAM;0CAIT,MAAM;2DAIW,MAAM;+CAIlB,MAAM;oCAIjB,MAAM;gCAIV,MAAM;;;;;;;;;;;;;;;gDAmBU,MAAM;;;;;;;kCAWpB,MAAM;0CAEE,MAAM;uCAET,MAAM;;;;;;qCASR,MAAM;gCAEX,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCA+BD,MAAM;;;;;;;;;;mDAaQ,MAAM;;;;;;;;0CAWf,MAAM;kCAId,MAAM;6CAIK,MAAM;iDAIF,MAAM;;;;;;;qCAUlB,MAAM;gCAIX,MAAM;sDAIgB,MAAM;;;;;;;qCAUvB,MAAM;gCAIX,MAAM;0CAII,MAAM;;uCAKT,MAAM;0CAEH,MAAM;;;;;;;yCASP,MAAM;8CAED,MAAM;;;;6CAMP,MAAM;;;gDAKH,MAAM;;CAGnC,CAAC"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAChD,eAAO,MAAM,WAAW,EAAG,SAAkB,CAAC;AAC9C,eAAO,MAAM,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;gCAcE,MAAM;;;;;;;;;qCAYD,MAAM;;gCAGX,MAAM;;oCAIF,MAAM;qCAIL,MAAM;qCAIN,MAAM;;;;;;iDAUM,MAAM;;;;;;;;gCAWvB,MAAM;qCAGD,MAAM;0CAED,MAAM;sDAEM,MAAM;;qCAMvB,MAAM;oCAIP,MAAM;2CAIC,MAAM;iDAIA,MAAM;;;6CAOV,MAAM;0CAIT,MAAM;2DAIW,MAAM;+CAIlB,MAAM;oCAIjB,MAAM;gCAIV,MAAM;;;;;;;;;;;;;;;gDAmBU,MAAM;;;;;;;kCAWpB,MAAM;0CAEE,MAAM;uCAET,MAAM;;;;;;qCASR,MAAM;gCAEX,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCA+BD,MAAM;;;;;;;;;;;;;;mDAiBQ,MAAM;;;;;;;;0CAWf,MAAM;kCAId,MAAM;6CAIK,MAAM;iDAIF,MAAM;;;;;;;qCAUlB,MAAM;gCAIX,MAAM;sDAIgB,MAAM;;;;;;;qCAUvB,MAAM;gCAIX,MAAM;0CAII,MAAM;;uCAKT,MAAM;0CAEH,MAAM;;;;;;;yCASP,MAAM;8CAED,MAAM;;;;6CAMP,MAAM;;;gDAKH,MAAM;;CAGnC,CAAC"}
@@ -162,6 +162,10 @@ exports.REST_API = {
162
162
  SUBSCRIPTION_SETTINGS: {
163
163
  GET: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_ROUTES.GET}`,
164
164
  UPDATE: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_ROUTES.UPDATE}`,
165
+ RESPONSE_RULES: {
166
+ GET: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_ROUTES.RESPONSE_RULES.GET}`,
167
+ UPDATE: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_ROUTES.RESPONSE_RULES.UPDATE}`,
168
+ },
165
169
  },
166
170
  HWID: {
167
171
  GET_ALL_HWID_DEVICES: `${exports.ROOT}/${CONTROLLERS.HWID_CONTROLLER}/${CONTROLLERS.HWID_ROUTES.GET_ALL_HWID_DEVICES}`,
@@ -1,3 +1,4 @@
1
1
  export * from './get-subscription-settings.command';
2
+ export * from './subscription-response-rules';
2
3
  export * from './update-subscription-settings.command';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/subscription-settings/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,wCAAwC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/subscription-settings/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wCAAwC,CAAC"}
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./get-subscription-settings.command"), exports);
18
+ __exportStar(require("./subscription-response-rules"), exports);
18
19
  __exportStar(require("./update-subscription-settings.command"), exports);
@@ -0,0 +1,59 @@
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
+ 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
+ }>;
23
+ }, "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";
30
+ }, {
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";
37
+ }>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ 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";
46
+ };
47
+ }, {
48
+ 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";
55
+ };
56
+ }>;
57
+ type Response = z.infer<typeof ResponseSchema>;
58
+ }
59
+ //# sourceMappingURL=get-subscription-response-rules.command.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,16 @@
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: models_1.SubscriptionResponseRulesSchema,
15
+ });
16
+ })(GetSubscriptionResponseRulesCommand || (exports.GetSubscriptionResponseRulesCommand = GetSubscriptionResponseRulesCommand = {}));
@@ -0,0 +1,3 @@
1
+ export * from './get-subscription-response-rules.command';
2
+ export * from './update-subscription-response-rules.command';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,18 @@
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("./get-subscription-response-rules.command"), exports);
18
+ __exportStar(require("./update-subscription-response-rules.command"), exports);
@@ -0,0 +1,91 @@
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.ZodArray<z.ZodObject<{
7
+ uuid: z.ZodString;
8
+ order: z.ZodNumber;
9
+ isFallback: z.ZodBoolean;
10
+ userAgentRegex: z.ZodNullable<z.ZodString>;
11
+ xDeviceOsHeader: z.ZodNullable<z.ZodString>;
12
+ responseType: z.ZodNativeEnum<{
13
+ readonly XRAY_BASE64: "XRAY_BASE64";
14
+ readonly XRAY_JSON: "XRAY_JSON";
15
+ readonly MIHOMO: "MIHOMO";
16
+ readonly STASH: "STASH";
17
+ readonly CLASH: "CLASH";
18
+ readonly SINGBOX: "SINGBOX";
19
+ readonly OUTLINE: "OUTLINE";
20
+ readonly BLOCK: "BLOCK";
21
+ }>;
22
+ }, "strip", z.ZodTypeAny, {
23
+ uuid: string;
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
+ }, {
30
+ uuid: string;
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
+ }>, "many">;
37
+ type Request = z.infer<typeof RequestSchema>;
38
+ const ResponseSchema: z.ZodObject<{
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
+ }>;
55
+ }, "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";
62
+ }, {
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";
69
+ }>;
70
+ }, "strip", z.ZodTypeAny, {
71
+ 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";
78
+ };
79
+ }, {
80
+ 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";
87
+ };
88
+ }>;
89
+ type Response = z.infer<typeof ResponseSchema>;
90
+ }
91
+ //# sourceMappingURL=update-subscription-response-rules.command.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,24 @@
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, 'patch', 'Update subscription response rules');
13
+ UpdateSubscriptionResponseRulesCommand.RequestSchema = zod_1.z.array(zod_1.z.object({
14
+ uuid: zod_1.z.string().uuid(),
15
+ order: zod_1.z.number(),
16
+ isFallback: zod_1.z.boolean(),
17
+ userAgentRegex: zod_1.z.string().nullable(),
18
+ xDeviceOsHeader: zod_1.z.string().nullable(),
19
+ responseType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_RESPONSE_TYPE),
20
+ }));
21
+ UpdateSubscriptionResponseRulesCommand.ResponseSchema = zod_1.z.object({
22
+ response: models_1.SubscriptionResponseRulesSchema,
23
+ });
24
+ })(UpdateSubscriptionResponseRulesCommand || (exports.UpdateSubscriptionResponseRulesCommand = UpdateSubscriptionResponseRulesCommand = {}));
@@ -13,9 +13,9 @@ export declare namespace GetSubscriptionTemplateCommand {
13
13
  readonly CLASH: "CLASH";
14
14
  }>;
15
15
  }, "strip", z.ZodTypeAny, {
16
- templateType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO" | "XRAY_JSON" | "CLASH";
16
+ templateType: "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "SINGBOX_LEGACY";
17
17
  }, {
18
- templateType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO" | "XRAY_JSON" | "CLASH";
18
+ templateType: "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "SINGBOX_LEGACY";
19
19
  }>;
20
20
  type Request = z.infer<typeof RequestSchema>;
21
21
  const ResponseSchema: z.ZodObject<{
@@ -33,26 +33,26 @@ export declare namespace GetSubscriptionTemplateCommand {
33
33
  encodedTemplateYaml: z.ZodNullable<z.ZodString>;
34
34
  }, "strip", z.ZodTypeAny, {
35
35
  uuid: string;
36
- templateType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO" | "XRAY_JSON" | "CLASH";
36
+ templateType: "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "SINGBOX_LEGACY";
37
37
  encodedTemplateYaml: string | null;
38
38
  templateJson?: unknown;
39
39
  }, {
40
40
  uuid: string;
41
- templateType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO" | "XRAY_JSON" | "CLASH";
41
+ templateType: "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "SINGBOX_LEGACY";
42
42
  encodedTemplateYaml: string | null;
43
43
  templateJson?: unknown;
44
44
  }>;
45
45
  }, "strip", z.ZodTypeAny, {
46
46
  response: {
47
47
  uuid: string;
48
- templateType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO" | "XRAY_JSON" | "CLASH";
48
+ templateType: "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "SINGBOX_LEGACY";
49
49
  encodedTemplateYaml: string | null;
50
50
  templateJson?: unknown;
51
51
  };
52
52
  }, {
53
53
  response: {
54
54
  uuid: string;
55
- templateType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO" | "XRAY_JSON" | "CLASH";
55
+ templateType: "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "SINGBOX_LEGACY";
56
56
  encodedTemplateYaml: string | null;
57
57
  templateJson?: unknown;
58
58
  };
@@ -15,11 +15,11 @@ export declare namespace UpdateSubscriptionTemplateCommand {
15
15
  templateJson: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
16
16
  encodedTemplateYaml: z.ZodOptional<z.ZodString>;
17
17
  }, "strip", z.ZodTypeAny, {
18
- templateType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO" | "XRAY_JSON" | "CLASH";
18
+ templateType: "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "SINGBOX_LEGACY";
19
19
  templateJson?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
20
20
  encodedTemplateYaml?: string | undefined;
21
21
  }, {
22
- templateType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO" | "XRAY_JSON" | "CLASH";
22
+ templateType: "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "SINGBOX_LEGACY";
23
23
  templateJson?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
24
24
  encodedTemplateYaml?: string | undefined;
25
25
  }>;
@@ -39,26 +39,26 @@ export declare namespace UpdateSubscriptionTemplateCommand {
39
39
  encodedTemplateYaml: z.ZodNullable<z.ZodString>;
40
40
  }, "strip", z.ZodTypeAny, {
41
41
  uuid: string;
42
- templateType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO" | "XRAY_JSON" | "CLASH";
42
+ templateType: "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "SINGBOX_LEGACY";
43
43
  encodedTemplateYaml: string | null;
44
44
  templateJson?: unknown;
45
45
  }, {
46
46
  uuid: string;
47
- templateType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO" | "XRAY_JSON" | "CLASH";
47
+ templateType: "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "SINGBOX_LEGACY";
48
48
  encodedTemplateYaml: string | null;
49
49
  templateJson?: unknown;
50
50
  }>;
51
51
  }, "strip", z.ZodTypeAny, {
52
52
  response: {
53
53
  uuid: string;
54
- templateType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO" | "XRAY_JSON" | "CLASH";
54
+ templateType: "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "SINGBOX_LEGACY";
55
55
  encodedTemplateYaml: string | null;
56
56
  templateJson?: unknown;
57
57
  };
58
58
  }, {
59
59
  response: {
60
60
  uuid: string;
61
- templateType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO" | "XRAY_JSON" | "CLASH";
61
+ templateType: "XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "SINGBOX_LEGACY";
62
62
  encodedTemplateYaml: string | null;
63
63
  templateJson?: unknown;
64
64
  };
@@ -9,6 +9,7 @@ export * from './metrics';
9
9
  export * from './nodes';
10
10
  export * from './oauth2';
11
11
  export * from './roles';
12
+ export * from './subscription-response-rules';
12
13
  export * from './subscription-template';
13
14
  export * from './templates';
14
15
  export * from './users';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
@@ -25,6 +25,7 @@ __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);
28
29
  __exportStar(require("./subscription-template"), exports);
29
30
  __exportStar(require("./templates"), exports);
30
31
  __exportStar(require("./users"), exports);
@@ -0,0 +1,2 @@
1
+ export * from './subscription-response-type';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../constants/subscription-response-rules/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./subscription-response-type"), exports);
@@ -0,0 +1,2 @@
1
+ export * from './subscription-response-type.constant';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../constants/subscription-response-rules/subscription-response-type/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./subscription-response-type.constant"), exports);
@@ -0,0 +1,13 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,14 @@
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);
@@ -7,5 +7,5 @@ export declare const SUBSCRIPTION_TEMPLATE_TYPE: {
7
7
  readonly CLASH: "CLASH";
8
8
  };
9
9
  export type TSubscriptionTemplateType = [keyof typeof SUBSCRIPTION_TEMPLATE_TYPE][number];
10
- export declare const SUBSCRIPTION_TEMPLATE_TYPE_VALUES: ("STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO" | "XRAY_JSON" | "CLASH")[];
10
+ export declare const SUBSCRIPTION_TEMPLATE_TYPE_VALUES: ("XRAY_JSON" | "MIHOMO" | "STASH" | "CLASH" | "SINGBOX" | "SINGBOX_LEGACY")[];
11
11
  //# sourceMappingURL=template-type.constant.d.ts.map
@@ -16,6 +16,7 @@ export * from './internal-squad.schema';
16
16
  export * from './last-connected-node.schema';
17
17
  export * from './nodes.schema';
18
18
  export * from './subscription-info.schema';
19
+ export * from './subscription-response-rules.schema';
19
20
  export * from './subscription-settings.schema';
20
21
  export * from './users.schema';
21
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../models/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kCAAkC,CAAC;AACjD,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../models/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kCAAkC,CAAC;AACjD,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gBAAgB,CAAC"}
@@ -32,5 +32,6 @@ __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
36
  __exportStar(require("./subscription-settings.schema"), exports);
36
37
  __exportStar(require("./users.schema"), exports);
@@ -0,0 +1,33 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,13 @@
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
+ });
@@ -5,4 +5,8 @@ exports.SUBSCRIPTION_SETTINGS_CONTROLLER = 'subscription-settings';
5
5
  exports.SUBSCRIPTION_SETTINGS_ROUTES = {
6
6
  GET: '',
7
7
  UPDATE: '',
8
+ RESPONSE_RULES: {
9
+ GET: '/response-rules',
10
+ UPDATE: '/response-rules',
11
+ },
8
12
  };
@@ -162,6 +162,10 @@ exports.REST_API = {
162
162
  SUBSCRIPTION_SETTINGS: {
163
163
  GET: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_ROUTES.GET}`,
164
164
  UPDATE: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_ROUTES.UPDATE}`,
165
+ RESPONSE_RULES: {
166
+ GET: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_ROUTES.RESPONSE_RULES.GET}`,
167
+ UPDATE: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_ROUTES.RESPONSE_RULES.UPDATE}`,
168
+ },
165
169
  },
166
170
  HWID: {
167
171
  GET_ALL_HWID_DEVICES: `${exports.ROOT}/${CONTROLLERS.HWID_CONTROLLER}/${CONTROLLERS.HWID_ROUTES.GET_ALL_HWID_DEVICES}`,
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./get-subscription-settings.command"), exports);
18
+ __exportStar(require("./subscription-response-rules"), exports);
18
19
  __exportStar(require("./update-subscription-settings.command"), exports);
@@ -0,0 +1,16 @@
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: models_1.SubscriptionResponseRulesSchema,
15
+ });
16
+ })(GetSubscriptionResponseRulesCommand || (exports.GetSubscriptionResponseRulesCommand = GetSubscriptionResponseRulesCommand = {}));
@@ -0,0 +1,18 @@
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("./get-subscription-response-rules.command"), exports);
18
+ __exportStar(require("./update-subscription-response-rules.command"), exports);
@@ -0,0 +1,24 @@
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, 'patch', 'Update subscription response rules');
13
+ UpdateSubscriptionResponseRulesCommand.RequestSchema = zod_1.z.array(zod_1.z.object({
14
+ uuid: zod_1.z.string().uuid(),
15
+ order: zod_1.z.number(),
16
+ isFallback: zod_1.z.boolean(),
17
+ userAgentRegex: zod_1.z.string().nullable(),
18
+ xDeviceOsHeader: zod_1.z.string().nullable(),
19
+ responseType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_RESPONSE_TYPE),
20
+ }));
21
+ UpdateSubscriptionResponseRulesCommand.ResponseSchema = zod_1.z.object({
22
+ response: models_1.SubscriptionResponseRulesSchema,
23
+ });
24
+ })(UpdateSubscriptionResponseRulesCommand || (exports.UpdateSubscriptionResponseRulesCommand = UpdateSubscriptionResponseRulesCommand = {}));
@@ -25,6 +25,7 @@ __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);
28
29
  __exportStar(require("./subscription-template"), exports);
29
30
  __exportStar(require("./templates"), exports);
30
31
  __exportStar(require("./users"), 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("./subscription-response-type"), 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("./subscription-response-type.constant"), exports);
@@ -0,0 +1,14 @@
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);
@@ -32,5 +32,6 @@ __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
36
  __exportStar(require("./subscription-settings.schema"), exports);
36
37
  __exportStar(require("./users.schema"), exports);
@@ -0,0 +1,13 @@
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
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "2.1.42",
3
+ "version": "2.1.43",
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.",