@remnawave/backend-contract 2.9.30 → 2.9.32
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.
- package/build/backend/commands/subscription-settings/get-subscription-settings.command.d.ts +3 -25
- package/build/backend/commands/subscription-settings/get-subscription-settings.command.d.ts.map +1 -1
- package/build/backend/commands/subscription-settings/update-subscription-settings.command.d.ts +6 -50
- package/build/backend/commands/subscription-settings/update-subscription-settings.command.d.ts.map +1 -1
- package/build/backend/commands/system/testers/test-srr-matcher.command.d.ts +5 -47
- package/build/backend/commands/system/testers/test-srr-matcher.command.d.ts.map +1 -1
- package/build/backend/commands/users/actions/revoke-user-subscription.command.js +2 -2
- package/build/backend/commands/users/resolve-user.command.d.ts +0 -2
- package/build/backend/commands/users/resolve-user.command.d.ts.map +1 -1
- package/build/backend/commands/users/resolve-user.command.js +2 -4
- package/build/backend/constants/response-rules/response-rules.contants.d.ts +23 -3
- package/build/backend/constants/response-rules/response-rules.contants.d.ts.map +1 -1
- package/build/backend/constants/response-rules/response-rules.contants.js +22 -3
- package/build/backend/models/response-rules/index.d.ts +2 -0
- package/build/backend/models/response-rules/index.d.ts.map +1 -1
- package/build/backend/models/response-rules/index.js +2 -0
- package/build/backend/models/response-rules/response-rule-condition.schema.d.ts +40 -3
- package/build/backend/models/response-rules/response-rule-condition.schema.d.ts.map +1 -1
- package/build/backend/models/response-rules/response-rule-condition.schema.js +156 -6
- package/build/backend/models/response-rules/response-rule.schema.d.ts +4 -44
- package/build/backend/models/response-rules/response-rule.schema.d.ts.map +1 -1
- package/build/backend/models/response-rules/response-rule.schema.js +26 -10
- package/build/backend/models/response-rules/response-rules-config.schema.d.ts +3 -25
- package/build/backend/models/response-rules/response-rules-config.schema.d.ts.map +1 -1
- package/build/backend/models/response-rules/response-rules-config.schema.js +9 -4
- package/build/backend/models/response-rules/response-rules-examples.d.ts +2 -2
- package/build/backend/models/response-rules/response-rules-examples.d.ts.map +1 -1
- package/build/backend/models/response-rules/response-rules-examples.js +30 -22
- package/build/backend/models/response-rules/response-rules-legacy.schema.d.ts +157 -0
- package/build/backend/models/response-rules/response-rules-legacy.schema.d.ts.map +1 -0
- package/build/backend/models/response-rules/response-rules-legacy.schema.js +33 -0
- package/build/backend/models/response-rules/response-rules-migration.d.ts +10 -0
- package/build/backend/models/response-rules/response-rules-migration.d.ts.map +1 -0
- package/build/backend/models/response-rules/response-rules-migration.js +45 -0
- package/build/backend/models/subscription-settings.schema.d.ts +3 -25
- package/build/backend/models/subscription-settings.schema.d.ts.map +1 -1
- package/build/frontend/commands/users/actions/revoke-user-subscription.command.js +2 -2
- package/build/frontend/commands/users/resolve-user.command.js +2 -4
- package/build/frontend/constants/response-rules/response-rules.contants.js +22 -3
- package/build/frontend/models/response-rules/index.js +2 -0
- package/build/frontend/models/response-rules/response-rule-condition.schema.js +156 -6
- package/build/frontend/models/response-rules/response-rule.schema.js +26 -10
- package/build/frontend/models/response-rules/response-rules-config.schema.js +9 -4
- package/build/frontend/models/response-rules/response-rules-examples.js +30 -22
- package/build/frontend/models/response-rules/response-rules-legacy.schema.js +33 -0
- package/build/frontend/models/response-rules/response-rules-migration.js +45 -0
- package/package.json +1 -1
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ResponseRuleConditionSchema = void 0;
|
|
3
|
+
exports.ResponseRuleConditionNodeSchema = exports.ResponseRuleConditionNotSchema = exports.ResponseRuleConditionGroupSchema = exports.ResponseRuleConditionSchema = exports.RESPONSE_RULES_MAX_CONDITION_NODES = exports.RESPONSE_RULES_MAX_CONDITION_DEPTH = void 0;
|
|
4
|
+
exports.forEachResponseRuleCondition = forEachResponseRuleCondition;
|
|
5
|
+
exports.measureResponseRuleConditionTree = measureResponseRuleConditionTree;
|
|
4
6
|
const zod_1 = require("zod");
|
|
5
7
|
const constants_1 = require("../../constants");
|
|
8
|
+
exports.RESPONSE_RULES_MAX_CONDITION_DEPTH = 10;
|
|
9
|
+
exports.RESPONSE_RULES_MAX_CONDITION_NODES = 100;
|
|
10
|
+
const OPERATORS_WITHOUT_VALUE = [
|
|
11
|
+
constants_1.RESPONSE_RULES_CONDITION_OPERATORS.EXISTS,
|
|
12
|
+
constants_1.RESPONSE_RULES_CONDITION_OPERATORS.NOT_EXISTS,
|
|
13
|
+
];
|
|
6
14
|
exports.ResponseRuleConditionSchema = zod_1.z
|
|
7
|
-
.
|
|
15
|
+
.strictObject({
|
|
8
16
|
headerName: zod_1.z
|
|
9
17
|
.string()
|
|
10
18
|
.regex(/^[!#$%&'*+\-.0-9A-Z^_`a-z|~]+$/, 'Invalid header name. Only letters(a-z, A-Z), numbers(0-9), underscores(_) and hyphens(-) are allowed.')
|
|
@@ -21,14 +29,27 @@ exports.ResponseRuleConditionSchema = zod_1.z
|
|
|
21
29
|
.string()
|
|
22
30
|
.min(1, 'Value is required')
|
|
23
31
|
.max(255, 'Value must be less than 255 characters')
|
|
32
|
+
.optional()
|
|
24
33
|
.meta({
|
|
25
|
-
markdownDescription: '**Value** to check against the **headerName**.',
|
|
34
|
+
markdownDescription: '**Value** to check against the **headerName**. Required for all operators except `EXISTS` and `NOT_EXISTS`.',
|
|
26
35
|
}),
|
|
27
|
-
caseSensitive: zod_1.z.boolean().meta({
|
|
28
|
-
|
|
36
|
+
caseSensitive: zod_1.z.boolean().optional().meta({
|
|
37
|
+
default: false,
|
|
38
|
+
markdownDescription: 'Whether the value is **case sensitive**. Optional, defaults to `false`. \n\n - `true`: the value will be compared as is. \n\n - `false`: the value will be lowercased **before** comparison.',
|
|
29
39
|
}),
|
|
40
|
+
})
|
|
41
|
+
.superRefine((condition, ctx) => {
|
|
42
|
+
if (condition.value === undefined &&
|
|
43
|
+
!OPERATORS_WITHOUT_VALUE.includes(condition.operator)) {
|
|
44
|
+
ctx.addIssue({
|
|
45
|
+
code: 'custom',
|
|
46
|
+
path: ['value'],
|
|
47
|
+
message: `Value is required for operator "${condition.operator}".`,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
30
50
|
})
|
|
31
51
|
.meta({
|
|
52
|
+
title: 'Condition',
|
|
32
53
|
markdownDescription: 'Condition to check against the **headerName**.',
|
|
33
54
|
defaultSnippets: [
|
|
34
55
|
{
|
|
@@ -38,8 +59,137 @@ exports.ResponseRuleConditionSchema = zod_1.z
|
|
|
38
59
|
headerName: 'accept',
|
|
39
60
|
operator: 'CONTAINS',
|
|
40
61
|
value: 'text/html',
|
|
41
|
-
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
label: 'Examples: Check if header exists',
|
|
66
|
+
markdownDescription: 'Condition to check if **headerName** is present in the request',
|
|
67
|
+
body: {
|
|
68
|
+
headerName: 'x-hwid',
|
|
69
|
+
operator: 'EXISTS',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
});
|
|
74
|
+
exports.ResponseRuleConditionGroupSchema = zod_1.z
|
|
75
|
+
.strictObject({
|
|
76
|
+
operator: zod_1.z
|
|
77
|
+
.enum([constants_1.RESPONSE_RULES_GROUP_OPERATORS.AND, constants_1.RESPONSE_RULES_GROUP_OPERATORS.OR])
|
|
78
|
+
.meta({
|
|
79
|
+
markdownDescription: 'Logical operator to use for combining nested **conditions**.',
|
|
80
|
+
markdownEnumDescriptions: [
|
|
81
|
+
constants_1.RESPONSE_RULES_GROUP_OPERATORS_DESCRIPTION.AND,
|
|
82
|
+
constants_1.RESPONSE_RULES_GROUP_OPERATORS_DESCRIPTION.OR,
|
|
83
|
+
],
|
|
84
|
+
}),
|
|
85
|
+
get conditions() {
|
|
86
|
+
return zod_1.z
|
|
87
|
+
.array(exports.ResponseRuleConditionNodeSchema)
|
|
88
|
+
.min(1, 'Group must contain at least one condition')
|
|
89
|
+
.meta({
|
|
90
|
+
title: 'Conditions',
|
|
91
|
+
markdownDescription: 'Array of nested conditions. Each item is either a **condition** or another **group** (`AND`/`OR`/`NOT`), so groups can be nested to express complex logic.',
|
|
92
|
+
});
|
|
93
|
+
},
|
|
94
|
+
})
|
|
95
|
+
.meta({
|
|
96
|
+
title: 'Condition Group',
|
|
97
|
+
markdownDescription: 'Group of nested conditions combined with a logical **operator** (`AND`/`OR`). Groups can be nested inside each other.',
|
|
98
|
+
defaultSnippets: [
|
|
99
|
+
{
|
|
100
|
+
label: 'Examples: OR group',
|
|
101
|
+
markdownDescription: 'Group that matches if **at least one** nested condition matches',
|
|
102
|
+
body: {
|
|
103
|
+
operator: 'OR',
|
|
104
|
+
conditions: [
|
|
105
|
+
{
|
|
106
|
+
headerName: 'user-agent',
|
|
107
|
+
operator: 'CONTAINS',
|
|
108
|
+
value: 'Hiddify',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
headerName: 'user-agent',
|
|
112
|
+
operator: 'CONTAINS',
|
|
113
|
+
value: 'FoxRay',
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
});
|
|
120
|
+
exports.ResponseRuleConditionNotSchema = zod_1.z
|
|
121
|
+
.strictObject({
|
|
122
|
+
operator: zod_1.z.literal(constants_1.RESPONSE_RULES_GROUP_OPERATORS.NOT).meta({
|
|
123
|
+
markdownDescription: constants_1.RESPONSE_RULES_GROUP_OPERATORS_DESCRIPTION.NOT,
|
|
124
|
+
}),
|
|
125
|
+
get condition() {
|
|
126
|
+
return exports.ResponseRuleConditionNodeSchema.meta({
|
|
127
|
+
title: 'Condition',
|
|
128
|
+
markdownDescription: 'Nested condition to invert. Can be a **condition** or a **group**.',
|
|
129
|
+
});
|
|
130
|
+
},
|
|
131
|
+
})
|
|
132
|
+
.meta({
|
|
133
|
+
title: 'NOT Group',
|
|
134
|
+
markdownDescription: 'Inverts the result of the nested **condition**. The nested condition can be a single condition or a whole group.',
|
|
135
|
+
defaultSnippets: [
|
|
136
|
+
{
|
|
137
|
+
label: 'Examples: NOT group',
|
|
138
|
+
markdownDescription: 'Matches if the nested condition does **not** match',
|
|
139
|
+
body: {
|
|
140
|
+
operator: 'NOT',
|
|
141
|
+
condition: {
|
|
142
|
+
headerName: 'user-agent',
|
|
143
|
+
operator: 'CONTAINS',
|
|
144
|
+
value: 'Happ',
|
|
145
|
+
},
|
|
42
146
|
},
|
|
43
147
|
},
|
|
44
148
|
],
|
|
45
149
|
});
|
|
150
|
+
exports.ResponseRuleConditionNodeSchema = zod_1.z
|
|
151
|
+
.lazy(() => zod_1.z.discriminatedUnion('operator', [
|
|
152
|
+
exports.ResponseRuleConditionSchema,
|
|
153
|
+
exports.ResponseRuleConditionGroupSchema,
|
|
154
|
+
exports.ResponseRuleConditionNotSchema,
|
|
155
|
+
]))
|
|
156
|
+
.meta({
|
|
157
|
+
title: 'Condition Node',
|
|
158
|
+
markdownDescription: 'Either a single **condition** (header check) or a **group** (`AND`/`OR`/`NOT`) with nested conditions. Groups can be nested to express complex logic, e.g. `A AND (B OR C)`.',
|
|
159
|
+
});
|
|
160
|
+
function forEachResponseRuleCondition(node, callback) {
|
|
161
|
+
switch (node.operator) {
|
|
162
|
+
case constants_1.RESPONSE_RULES_GROUP_OPERATORS.AND:
|
|
163
|
+
case constants_1.RESPONSE_RULES_GROUP_OPERATORS.OR:
|
|
164
|
+
for (const child of node.conditions) {
|
|
165
|
+
forEachResponseRuleCondition(child, callback);
|
|
166
|
+
}
|
|
167
|
+
return;
|
|
168
|
+
case constants_1.RESPONSE_RULES_GROUP_OPERATORS.NOT:
|
|
169
|
+
forEachResponseRuleCondition(node.condition, callback);
|
|
170
|
+
return;
|
|
171
|
+
default:
|
|
172
|
+
callback(node);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
function measureResponseRuleConditionTree(node) {
|
|
176
|
+
switch (node.operator) {
|
|
177
|
+
case constants_1.RESPONSE_RULES_GROUP_OPERATORS.AND:
|
|
178
|
+
case constants_1.RESPONSE_RULES_GROUP_OPERATORS.OR: {
|
|
179
|
+
let depth = 0;
|
|
180
|
+
let nodes = 1;
|
|
181
|
+
for (const child of node.conditions) {
|
|
182
|
+
const childMetrics = measureResponseRuleConditionTree(child);
|
|
183
|
+
depth = Math.max(depth, childMetrics.depth);
|
|
184
|
+
nodes += childMetrics.nodes;
|
|
185
|
+
}
|
|
186
|
+
return { depth: depth + 1, nodes };
|
|
187
|
+
}
|
|
188
|
+
case constants_1.RESPONSE_RULES_GROUP_OPERATORS.NOT: {
|
|
189
|
+
const childMetrics = measureResponseRuleConditionTree(node.condition);
|
|
190
|
+
return { depth: childMetrics.depth + 1, nodes: childMetrics.nodes + 1 };
|
|
191
|
+
}
|
|
192
|
+
default:
|
|
193
|
+
return { depth: 1, nodes: 1 };
|
|
194
|
+
}
|
|
195
|
+
}
|
|
@@ -3,27 +3,7 @@ export declare const ResponseRuleSchemaBase: z.ZodObject<{
|
|
|
3
3
|
name: z.ZodString;
|
|
4
4
|
description: z.ZodOptional<z.ZodString>;
|
|
5
5
|
enabled: z.ZodBoolean;
|
|
6
|
-
|
|
7
|
-
readonly AND: "AND";
|
|
8
|
-
readonly OR: "OR";
|
|
9
|
-
}>;
|
|
10
|
-
conditions: z.ZodArray<z.ZodObject<{
|
|
11
|
-
headerName: z.ZodString;
|
|
12
|
-
operator: z.ZodEnum<{
|
|
13
|
-
readonly EQUALS: "EQUALS";
|
|
14
|
-
readonly NOT_EQUALS: "NOT_EQUALS";
|
|
15
|
-
readonly CONTAINS: "CONTAINS";
|
|
16
|
-
readonly NOT_CONTAINS: "NOT_CONTAINS";
|
|
17
|
-
readonly STARTS_WITH: "STARTS_WITH";
|
|
18
|
-
readonly NOT_STARTS_WITH: "NOT_STARTS_WITH";
|
|
19
|
-
readonly ENDS_WITH: "ENDS_WITH";
|
|
20
|
-
readonly NOT_ENDS_WITH: "NOT_ENDS_WITH";
|
|
21
|
-
readonly REGEX: "REGEX";
|
|
22
|
-
readonly NOT_REGEX: "NOT_REGEX";
|
|
23
|
-
}>;
|
|
24
|
-
value: z.ZodString;
|
|
25
|
-
caseSensitive: z.ZodBoolean;
|
|
26
|
-
}, z.core.$strip>>;
|
|
6
|
+
when: z.ZodOptional<z.ZodType<import("./response-rule-condition.schema").TResponseRuleConditionNode, unknown, z.core.$ZodTypeInternals<import("./response-rule-condition.schema").TResponseRuleConditionNode, unknown>>>;
|
|
27
7
|
responseType: z.ZodEnum<{
|
|
28
8
|
readonly BROWSER: "BROWSER";
|
|
29
9
|
readonly BLOCK: "BLOCK";
|
|
@@ -57,32 +37,12 @@ export declare const ResponseRuleSchemaBase: z.ZodObject<{
|
|
|
57
37
|
}, z.core.$strip>>;
|
|
58
38
|
excludeHostsByTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
59
39
|
}, z.core.$strip>>;
|
|
60
|
-
}, z.core.$
|
|
40
|
+
}, z.core.$strict>;
|
|
61
41
|
export declare const ResponseRuleSchema: z.ZodObject<{
|
|
62
42
|
name: z.ZodString;
|
|
63
43
|
description: z.ZodOptional<z.ZodString>;
|
|
64
44
|
enabled: z.ZodBoolean;
|
|
65
|
-
|
|
66
|
-
readonly AND: "AND";
|
|
67
|
-
readonly OR: "OR";
|
|
68
|
-
}>;
|
|
69
|
-
conditions: z.ZodArray<z.ZodObject<{
|
|
70
|
-
headerName: z.ZodString;
|
|
71
|
-
operator: z.ZodEnum<{
|
|
72
|
-
readonly EQUALS: "EQUALS";
|
|
73
|
-
readonly NOT_EQUALS: "NOT_EQUALS";
|
|
74
|
-
readonly CONTAINS: "CONTAINS";
|
|
75
|
-
readonly NOT_CONTAINS: "NOT_CONTAINS";
|
|
76
|
-
readonly STARTS_WITH: "STARTS_WITH";
|
|
77
|
-
readonly NOT_STARTS_WITH: "NOT_STARTS_WITH";
|
|
78
|
-
readonly ENDS_WITH: "ENDS_WITH";
|
|
79
|
-
readonly NOT_ENDS_WITH: "NOT_ENDS_WITH";
|
|
80
|
-
readonly REGEX: "REGEX";
|
|
81
|
-
readonly NOT_REGEX: "NOT_REGEX";
|
|
82
|
-
}>;
|
|
83
|
-
value: z.ZodString;
|
|
84
|
-
caseSensitive: z.ZodBoolean;
|
|
85
|
-
}, z.core.$strip>>;
|
|
45
|
+
when: z.ZodOptional<z.ZodType<import("./response-rule-condition.schema").TResponseRuleConditionNode, unknown, z.core.$ZodTypeInternals<import("./response-rule-condition.schema").TResponseRuleConditionNode, unknown>>>;
|
|
86
46
|
responseType: z.ZodEnum<{
|
|
87
47
|
readonly BROWSER: "BROWSER";
|
|
88
48
|
readonly BLOCK: "BLOCK";
|
|
@@ -116,5 +76,5 @@ export declare const ResponseRuleSchema: z.ZodObject<{
|
|
|
116
76
|
}, z.core.$strip>>;
|
|
117
77
|
excludeHostsByTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
118
78
|
}, z.core.$strip>>;
|
|
119
|
-
}, z.core.$
|
|
79
|
+
}, z.core.$strict>;
|
|
120
80
|
//# sourceMappingURL=response-rule.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-rule.schema.d.ts","sourceRoot":"","sources":["../../../../models/response-rules/response-rule.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"response-rule.schema.d.ts","sourceRoot":"","sources":["../../../../models/response-rules/response-rule.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA0DjC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAmB7B,CAAC"}
|
|
@@ -6,7 +6,7 @@ const constants_1 = require("../../constants");
|
|
|
6
6
|
const response_rule_condition_schema_1 = require("./response-rule-condition.schema");
|
|
7
7
|
const response_rule_modifications_schema_1 = require("./response-rule-modifications.schema");
|
|
8
8
|
const response_rules_examples_1 = require("./response-rules-examples");
|
|
9
|
-
exports.ResponseRuleSchemaBase = zod_1.z.
|
|
9
|
+
exports.ResponseRuleSchemaBase = zod_1.z.strictObject({
|
|
10
10
|
name: zod_1.z
|
|
11
11
|
.string()
|
|
12
12
|
.min(1, 'Name is required')
|
|
@@ -28,12 +28,28 @@ exports.ResponseRuleSchemaBase = zod_1.z.object({
|
|
|
28
28
|
title: 'Enabled',
|
|
29
29
|
markdownDescription: 'Control whether the response rule is enabled or disabled. \n\n - `true` the rule will be applied. \n\n - `false` the rule will be always ignored.',
|
|
30
30
|
}),
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
when: response_rule_condition_schema_1.ResponseRuleConditionNodeSchema.optional()
|
|
32
|
+
.superRefine((node, ctx) => {
|
|
33
|
+
if (!node) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const { depth, nodes } = (0, response_rule_condition_schema_1.measureResponseRuleConditionTree)(node);
|
|
37
|
+
if (depth > response_rule_condition_schema_1.RESPONSE_RULES_MAX_CONDITION_DEPTH) {
|
|
38
|
+
ctx.addIssue({
|
|
39
|
+
code: 'custom',
|
|
40
|
+
message: `Condition tree is too deep. Maximum depth is ${response_rule_condition_schema_1.RESPONSE_RULES_MAX_CONDITION_DEPTH}.`,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
if (nodes > response_rule_condition_schema_1.RESPONSE_RULES_MAX_CONDITION_NODES) {
|
|
44
|
+
ctx.addIssue({
|
|
45
|
+
code: 'custom',
|
|
46
|
+
message: `Condition tree is too big. Maximum number of nodes is ${response_rule_condition_schema_1.RESPONSE_RULES_MAX_CONDITION_NODES}.`,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
.meta({
|
|
51
|
+
title: 'When',
|
|
52
|
+
markdownDescription: 'Condition tree to check against the request headers. The root is either a single **condition** or a **group** (`AND`/`OR`/`NOT`) with nested conditions — groups can be nested to express complex logic, e.g. `A AND (B OR C)`. If **when** is omitted, the rule will always be matched.',
|
|
37
53
|
}),
|
|
38
54
|
responseType: zod_1.z.enum(constants_1.RESPONSE_RULES_RESPONSE_TYPES).meta({
|
|
39
55
|
errorMessage: 'Invalid response type. Please select a valid response type.',
|
|
@@ -54,10 +70,10 @@ exports.ResponseRuleSchema = exports.ResponseRuleSchemaBase.meta({
|
|
|
54
70
|
},
|
|
55
71
|
},
|
|
56
72
|
{
|
|
57
|
-
label: 'Examples:
|
|
58
|
-
markdownDescription: `Block requests from legacy clients
|
|
73
|
+
label: 'Examples: Nested conditions (AND with OR inside)',
|
|
74
|
+
markdownDescription: `Block browser requests from legacy clients using nested conditions: \`accept AND (user-agent OR user-agent)\`\n\`\`\`json\n${JSON.stringify(response_rules_examples_1.EXAMPLES_SRR_NESTED_CONDITIONS_RULE, null, 2)}\n\`\`\``,
|
|
59
75
|
body: {
|
|
60
|
-
...response_rules_examples_1.
|
|
76
|
+
...response_rules_examples_1.EXAMPLES_SRR_NESTED_CONDITIONS_RULE,
|
|
61
77
|
},
|
|
62
78
|
},
|
|
63
79
|
],
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const ResponseRulesConfigSchema: z.ZodObject<{
|
|
3
|
-
version: z.
|
|
4
|
-
readonly 1: "1";
|
|
5
|
-
}>;
|
|
3
|
+
version: z.ZodLiteral<"2">;
|
|
6
4
|
settings: z.ZodOptional<z.ZodObject<{
|
|
7
5
|
disableSubscriptionAccessByPath: z.ZodOptional<z.ZodBoolean>;
|
|
8
6
|
}, z.core.$strip>>;
|
|
@@ -10,27 +8,7 @@ export declare const ResponseRulesConfigSchema: z.ZodObject<{
|
|
|
10
8
|
name: z.ZodString;
|
|
11
9
|
description: z.ZodOptional<z.ZodString>;
|
|
12
10
|
enabled: z.ZodBoolean;
|
|
13
|
-
|
|
14
|
-
readonly AND: "AND";
|
|
15
|
-
readonly OR: "OR";
|
|
16
|
-
}>;
|
|
17
|
-
conditions: z.ZodArray<z.ZodObject<{
|
|
18
|
-
headerName: z.ZodString;
|
|
19
|
-
operator: z.ZodEnum<{
|
|
20
|
-
readonly EQUALS: "EQUALS";
|
|
21
|
-
readonly NOT_EQUALS: "NOT_EQUALS";
|
|
22
|
-
readonly CONTAINS: "CONTAINS";
|
|
23
|
-
readonly NOT_CONTAINS: "NOT_CONTAINS";
|
|
24
|
-
readonly STARTS_WITH: "STARTS_WITH";
|
|
25
|
-
readonly NOT_STARTS_WITH: "NOT_STARTS_WITH";
|
|
26
|
-
readonly ENDS_WITH: "ENDS_WITH";
|
|
27
|
-
readonly NOT_ENDS_WITH: "NOT_ENDS_WITH";
|
|
28
|
-
readonly REGEX: "REGEX";
|
|
29
|
-
readonly NOT_REGEX: "NOT_REGEX";
|
|
30
|
-
}>;
|
|
31
|
-
value: z.ZodString;
|
|
32
|
-
caseSensitive: z.ZodBoolean;
|
|
33
|
-
}, z.core.$strip>>;
|
|
11
|
+
when: z.ZodOptional<z.ZodType<import("./response-rule-condition.schema").TResponseRuleConditionNode, unknown, z.core.$ZodTypeInternals<import("./response-rule-condition.schema").TResponseRuleConditionNode, unknown>>>;
|
|
34
12
|
responseType: z.ZodEnum<{
|
|
35
13
|
readonly BROWSER: "BROWSER";
|
|
36
14
|
readonly BLOCK: "BLOCK";
|
|
@@ -64,6 +42,6 @@ export declare const ResponseRulesConfigSchema: z.ZodObject<{
|
|
|
64
42
|
}, z.core.$strip>>;
|
|
65
43
|
excludeHostsByTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
66
44
|
}, z.core.$strip>>;
|
|
67
|
-
}, z.core.$
|
|
45
|
+
}, z.core.$strict>>;
|
|
68
46
|
}, z.core.$strip>;
|
|
69
47
|
//# sourceMappingURL=response-rules-config.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-rules-config.schema.d.ts","sourceRoot":"","sources":["../../../../models/response-rules/response-rules-config.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,yBAAyB
|
|
1
|
+
{"version":3,"file":"response-rules-config.schema.d.ts","sourceRoot":"","sources":["../../../../models/response-rules/response-rules-config.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiBhC,CAAC"}
|
|
@@ -6,15 +6,20 @@ const constants_1 = require("../../constants");
|
|
|
6
6
|
const response_rule_settings_schema_1 = require("./response-rule-settings.schema");
|
|
7
7
|
const response_rule_schema_1 = require("./response-rule.schema");
|
|
8
8
|
const response_rules_examples_1 = require("./response-rules-examples");
|
|
9
|
-
exports.ResponseRulesConfigSchema = zod_1.z
|
|
10
|
-
|
|
9
|
+
exports.ResponseRulesConfigSchema = zod_1.z
|
|
10
|
+
.object({
|
|
11
|
+
version: zod_1.z.literal(constants_1.RESPONSE_RULES_CONFIG_VERSION[2]).meta({
|
|
11
12
|
title: 'Response Rules Config Version',
|
|
12
|
-
markdownDescription: 'Version of the **response rules** config. Currently supported version is **1
|
|
13
|
+
markdownDescription: 'Version of the **response rules** config. Currently supported version is **2**. Legacy version **1** configs can be migrated with `migrateResponseRulesConfig`.',
|
|
13
14
|
}),
|
|
14
15
|
settings: response_rule_settings_schema_1.ResponseRuleSettingsSchema,
|
|
15
16
|
rules: zod_1.z.array(response_rule_schema_1.ResponseRuleSchema).meta({
|
|
16
17
|
title: 'Response Rules',
|
|
17
|
-
markdownDescription: `Array of **response rules**. Rules are evaluated in order and the first rule that matches is applied. If no rule matches, request will be blocked by default.\n\n**Example:**\n\`\`\`json\n${JSON.stringify([response_rules_examples_1.
|
|
18
|
+
markdownDescription: `Array of **response rules**. Rules are evaluated in order and the first rule that matches is applied. If no rule matches, request will be blocked by default.\n\n**Example:**\n\`\`\`json\n${JSON.stringify([response_rules_examples_1.EXAMPLES_SRR_NESTED_CONDITIONS_RULE], null, 2)}\n\`\`\``,
|
|
18
19
|
defaultSnippets: [],
|
|
19
20
|
}),
|
|
21
|
+
})
|
|
22
|
+
.meta({
|
|
23
|
+
title: 'Response Rules Config',
|
|
24
|
+
markdownDescription: 'Configuration of the **response rules**.',
|
|
20
25
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import z from 'zod';
|
|
2
1
|
import type { ResponseRuleSchemaBase } from './response-rule.schema';
|
|
2
|
+
import z from 'zod';
|
|
3
3
|
export declare const EXAMPLES_SRR_BLANK_RULE: z.infer<typeof ResponseRuleSchemaBase>;
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const EXAMPLES_SRR_NESTED_CONDITIONS_RULE: z.infer<typeof ResponseRuleSchemaBase>;
|
|
5
5
|
export declare function generateResponseRuleDescription(schema: typeof ResponseRuleSchemaBase): string;
|
|
6
6
|
//# sourceMappingURL=response-rules-examples.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-rules-examples.d.ts","sourceRoot":"","sources":["../../../../models/response-rules/response-rules-examples.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"response-rules-examples.d.ts","sourceRoot":"","sources":["../../../../models/response-rules/response-rules-examples.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,CAAC,MAAM,KAAK,CAAC;AAQpB,eAAO,MAAM,uBAAuB,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAQ1E,CAAC;AAEF,eAAO,MAAM,mCAAmC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CA8BtF,CAAC;AAEF,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,OAAO,sBAAsB,UAcpF"}
|
|
@@ -1,38 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.EXAMPLES_SRR_NESTED_CONDITIONS_RULE = exports.EXAMPLES_SRR_BLANK_RULE = void 0;
|
|
4
4
|
exports.generateResponseRuleDescription = generateResponseRuleDescription;
|
|
5
5
|
const constants_1 = require("../../constants");
|
|
6
6
|
exports.EXAMPLES_SRR_BLANK_RULE = {
|
|
7
7
|
name: 'Blank rule',
|
|
8
8
|
description: 'Blank rule',
|
|
9
|
-
operator: 'AND',
|
|
10
9
|
enabled: true,
|
|
11
|
-
conditions: [],
|
|
12
10
|
responseType: 'BLOCK',
|
|
13
11
|
responseModifications: {
|
|
14
12
|
headers: [],
|
|
15
13
|
},
|
|
16
14
|
};
|
|
17
|
-
exports.
|
|
18
|
-
name: 'Block Legacy
|
|
19
|
-
description: 'Block requests from legacy clients',
|
|
15
|
+
exports.EXAMPLES_SRR_NESTED_CONDITIONS_RULE = {
|
|
16
|
+
name: 'Block Legacy Browsers',
|
|
17
|
+
description: 'Block browser requests from legacy clients',
|
|
20
18
|
enabled: true,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
19
|
+
when: {
|
|
20
|
+
operator: constants_1.RESPONSE_RULES_GROUP_OPERATORS.AND,
|
|
21
|
+
conditions: [
|
|
22
|
+
{
|
|
23
|
+
headerName: 'accept',
|
|
24
|
+
operator: constants_1.RESPONSE_RULES_CONDITION_OPERATORS.CONTAINS,
|
|
25
|
+
value: 'text/html',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
operator: constants_1.RESPONSE_RULES_GROUP_OPERATORS.OR,
|
|
29
|
+
conditions: [
|
|
30
|
+
{
|
|
31
|
+
headerName: 'user-agent',
|
|
32
|
+
operator: constants_1.RESPONSE_RULES_CONDITION_OPERATORS.CONTAINS,
|
|
33
|
+
value: 'Hiddify',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
headerName: 'user-agent',
|
|
37
|
+
operator: constants_1.RESPONSE_RULES_CONDITION_OPERATORS.CONTAINS,
|
|
38
|
+
value: 'FoxRay',
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
},
|
|
36
44
|
responseType: constants_1.RESPONSE_RULES_RESPONSE_TYPES.BLOCK,
|
|
37
45
|
};
|
|
38
46
|
function generateResponseRuleDescription(schema) {
|
|
@@ -46,5 +54,5 @@ function generateResponseRuleDescription(schema) {
|
|
|
46
54
|
const fieldsText = fields
|
|
47
55
|
.map((field) => `- **${field.name}**: ${field.description}`)
|
|
48
56
|
.join('\n');
|
|
49
|
-
return `Response rule configuration.\n\n**Fields:**\n${fieldsText}\n\n**Example:**\n\`\`\`json\n${JSON.stringify(exports.
|
|
57
|
+
return `Response rule configuration.\n\n**Fields:**\n${fieldsText}\n\n**Example:**\n\`\`\`json\n${JSON.stringify(exports.EXAMPLES_SRR_NESTED_CONDITIONS_RULE, null, 2)}\n\`\`\``;
|
|
50
58
|
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Frozen legacy (version 1) response rules config.
|
|
4
|
+
*
|
|
5
|
+
* Kept only to accept old configs and migrate them to version 2
|
|
6
|
+
* via `migrateResponseRulesConfig`. Do not extend.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ResponseRuleLegacyConditionSchema: z.ZodObject<{
|
|
9
|
+
headerName: z.ZodString;
|
|
10
|
+
operator: z.ZodEnum<{
|
|
11
|
+
readonly EQUALS: "EQUALS";
|
|
12
|
+
readonly NOT_EQUALS: "NOT_EQUALS";
|
|
13
|
+
readonly CONTAINS: "CONTAINS";
|
|
14
|
+
readonly NOT_CONTAINS: "NOT_CONTAINS";
|
|
15
|
+
readonly STARTS_WITH: "STARTS_WITH";
|
|
16
|
+
readonly NOT_STARTS_WITH: "NOT_STARTS_WITH";
|
|
17
|
+
readonly ENDS_WITH: "ENDS_WITH";
|
|
18
|
+
readonly NOT_ENDS_WITH: "NOT_ENDS_WITH";
|
|
19
|
+
readonly REGEX: "REGEX";
|
|
20
|
+
readonly NOT_REGEX: "NOT_REGEX";
|
|
21
|
+
readonly EXISTS: "EXISTS";
|
|
22
|
+
readonly NOT_EXISTS: "NOT_EXISTS";
|
|
23
|
+
}>;
|
|
24
|
+
value: z.ZodString;
|
|
25
|
+
caseSensitive: z.ZodBoolean;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export declare const ResponseRuleLegacySchema: z.ZodObject<{
|
|
28
|
+
name: z.ZodString;
|
|
29
|
+
description: z.ZodOptional<z.ZodString>;
|
|
30
|
+
enabled: z.ZodBoolean;
|
|
31
|
+
operator: z.ZodEnum<{
|
|
32
|
+
readonly AND: "AND";
|
|
33
|
+
readonly OR: "OR";
|
|
34
|
+
}>;
|
|
35
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
36
|
+
headerName: z.ZodString;
|
|
37
|
+
operator: z.ZodEnum<{
|
|
38
|
+
readonly EQUALS: "EQUALS";
|
|
39
|
+
readonly NOT_EQUALS: "NOT_EQUALS";
|
|
40
|
+
readonly CONTAINS: "CONTAINS";
|
|
41
|
+
readonly NOT_CONTAINS: "NOT_CONTAINS";
|
|
42
|
+
readonly STARTS_WITH: "STARTS_WITH";
|
|
43
|
+
readonly NOT_STARTS_WITH: "NOT_STARTS_WITH";
|
|
44
|
+
readonly ENDS_WITH: "ENDS_WITH";
|
|
45
|
+
readonly NOT_ENDS_WITH: "NOT_ENDS_WITH";
|
|
46
|
+
readonly REGEX: "REGEX";
|
|
47
|
+
readonly NOT_REGEX: "NOT_REGEX";
|
|
48
|
+
readonly EXISTS: "EXISTS";
|
|
49
|
+
readonly NOT_EXISTS: "NOT_EXISTS";
|
|
50
|
+
}>;
|
|
51
|
+
value: z.ZodString;
|
|
52
|
+
caseSensitive: z.ZodBoolean;
|
|
53
|
+
}, z.core.$strip>>;
|
|
54
|
+
responseType: z.ZodEnum<{
|
|
55
|
+
readonly BROWSER: "BROWSER";
|
|
56
|
+
readonly BLOCK: "BLOCK";
|
|
57
|
+
readonly STATUS_CODE_404: "STATUS_CODE_404";
|
|
58
|
+
readonly STATUS_CODE_451: "STATUS_CODE_451";
|
|
59
|
+
readonly SOCKET_DROP: "SOCKET_DROP";
|
|
60
|
+
readonly XRAY_JSON: "XRAY_JSON";
|
|
61
|
+
readonly XRAY_BASE64: "XRAY_BASE64";
|
|
62
|
+
readonly MIHOMO: "MIHOMO";
|
|
63
|
+
readonly STASH: "STASH";
|
|
64
|
+
readonly CLASH: "CLASH";
|
|
65
|
+
readonly SINGBOX: "SINGBOX";
|
|
66
|
+
}>;
|
|
67
|
+
responseModifications: z.ZodOptional<z.ZodObject<{
|
|
68
|
+
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
69
|
+
key: z.ZodString;
|
|
70
|
+
value: z.ZodString;
|
|
71
|
+
}, z.core.$strip>>>;
|
|
72
|
+
applyHeadersToEnd: z.ZodOptional<z.ZodBoolean>;
|
|
73
|
+
subscriptionTemplate: z.ZodOptional<z.ZodString>;
|
|
74
|
+
ignoreHostXrayJsonTemplate: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
+
ignoreServeJsonAtBaseSubscription: z.ZodOptional<z.ZodBoolean>;
|
|
76
|
+
additionalExtendedClientsRegex: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
77
|
+
disableHwidCheck: z.ZodOptional<z.ZodBoolean>;
|
|
78
|
+
encryption: z.ZodOptional<z.ZodObject<{
|
|
79
|
+
method: z.ZodEnum<{
|
|
80
|
+
age1: "age1";
|
|
81
|
+
age1pq1: "age1pq1";
|
|
82
|
+
}>;
|
|
83
|
+
key: z.ZodString;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
excludeHostsByTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
86
|
+
}, z.core.$strip>>;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
export declare const ResponseRulesLegacyConfigSchema: z.ZodObject<{
|
|
89
|
+
version: z.ZodLiteral<"1">;
|
|
90
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
91
|
+
disableSubscriptionAccessByPath: z.ZodOptional<z.ZodBoolean>;
|
|
92
|
+
}, z.core.$strip>>;
|
|
93
|
+
rules: z.ZodArray<z.ZodObject<{
|
|
94
|
+
name: z.ZodString;
|
|
95
|
+
description: z.ZodOptional<z.ZodString>;
|
|
96
|
+
enabled: z.ZodBoolean;
|
|
97
|
+
operator: z.ZodEnum<{
|
|
98
|
+
readonly AND: "AND";
|
|
99
|
+
readonly OR: "OR";
|
|
100
|
+
}>;
|
|
101
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
102
|
+
headerName: z.ZodString;
|
|
103
|
+
operator: z.ZodEnum<{
|
|
104
|
+
readonly EQUALS: "EQUALS";
|
|
105
|
+
readonly NOT_EQUALS: "NOT_EQUALS";
|
|
106
|
+
readonly CONTAINS: "CONTAINS";
|
|
107
|
+
readonly NOT_CONTAINS: "NOT_CONTAINS";
|
|
108
|
+
readonly STARTS_WITH: "STARTS_WITH";
|
|
109
|
+
readonly NOT_STARTS_WITH: "NOT_STARTS_WITH";
|
|
110
|
+
readonly ENDS_WITH: "ENDS_WITH";
|
|
111
|
+
readonly NOT_ENDS_WITH: "NOT_ENDS_WITH";
|
|
112
|
+
readonly REGEX: "REGEX";
|
|
113
|
+
readonly NOT_REGEX: "NOT_REGEX";
|
|
114
|
+
readonly EXISTS: "EXISTS";
|
|
115
|
+
readonly NOT_EXISTS: "NOT_EXISTS";
|
|
116
|
+
}>;
|
|
117
|
+
value: z.ZodString;
|
|
118
|
+
caseSensitive: z.ZodBoolean;
|
|
119
|
+
}, z.core.$strip>>;
|
|
120
|
+
responseType: z.ZodEnum<{
|
|
121
|
+
readonly BROWSER: "BROWSER";
|
|
122
|
+
readonly BLOCK: "BLOCK";
|
|
123
|
+
readonly STATUS_CODE_404: "STATUS_CODE_404";
|
|
124
|
+
readonly STATUS_CODE_451: "STATUS_CODE_451";
|
|
125
|
+
readonly SOCKET_DROP: "SOCKET_DROP";
|
|
126
|
+
readonly XRAY_JSON: "XRAY_JSON";
|
|
127
|
+
readonly XRAY_BASE64: "XRAY_BASE64";
|
|
128
|
+
readonly MIHOMO: "MIHOMO";
|
|
129
|
+
readonly STASH: "STASH";
|
|
130
|
+
readonly CLASH: "CLASH";
|
|
131
|
+
readonly SINGBOX: "SINGBOX";
|
|
132
|
+
}>;
|
|
133
|
+
responseModifications: z.ZodOptional<z.ZodObject<{
|
|
134
|
+
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
135
|
+
key: z.ZodString;
|
|
136
|
+
value: z.ZodString;
|
|
137
|
+
}, z.core.$strip>>>;
|
|
138
|
+
applyHeadersToEnd: z.ZodOptional<z.ZodBoolean>;
|
|
139
|
+
subscriptionTemplate: z.ZodOptional<z.ZodString>;
|
|
140
|
+
ignoreHostXrayJsonTemplate: z.ZodOptional<z.ZodBoolean>;
|
|
141
|
+
ignoreServeJsonAtBaseSubscription: z.ZodOptional<z.ZodBoolean>;
|
|
142
|
+
additionalExtendedClientsRegex: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
143
|
+
disableHwidCheck: z.ZodOptional<z.ZodBoolean>;
|
|
144
|
+
encryption: z.ZodOptional<z.ZodObject<{
|
|
145
|
+
method: z.ZodEnum<{
|
|
146
|
+
age1: "age1";
|
|
147
|
+
age1pq1: "age1pq1";
|
|
148
|
+
}>;
|
|
149
|
+
key: z.ZodString;
|
|
150
|
+
}, z.core.$strip>>;
|
|
151
|
+
excludeHostsByTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
152
|
+
}, z.core.$strip>>;
|
|
153
|
+
}, z.core.$strip>>;
|
|
154
|
+
}, z.core.$strip>;
|
|
155
|
+
export type TResponseRuleLegacy = z.infer<typeof ResponseRuleLegacySchema>;
|
|
156
|
+
export type TResponseRulesLegacyConfig = z.infer<typeof ResponseRulesLegacyConfigSchema>;
|
|
157
|
+
//# sourceMappingURL=response-rules-legacy.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-rules-legacy.schema.d.ts","sourceRoot":"","sources":["../../../../models/response-rules/response-rules-legacy.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB;;;;;GAKG;AAEH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;iBAK5C,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQnC,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAI1C,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC3E,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC"}
|