@remnawave/backend-contract 2.1.79 → 2.1.81

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.
@@ -1 +1 @@
1
- {"version":3,"file":"response-rule-modifications.schema.d.ts","sourceRoot":"","sources":["../../../../models/response-rules/response-rule-modifications.schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAepB,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;GAwCvC,CAAC"}
1
+ {"version":3,"file":"response-rule-modifications.schema.d.ts","sourceRoot":"","sources":["../../../../models/response-rules/response-rule-modifications.schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AA0BpB,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;GAyCvC,CAAC"}
@@ -13,6 +13,12 @@ const exampleJson = JSON.stringify({
13
13
  },
14
14
  ],
15
15
  }, null, 2);
16
+ const exampleHeaderJson = JSON.stringify([
17
+ {
18
+ key: 'X-Custom-Header',
19
+ value: 'Custom Value',
20
+ },
21
+ ], null, 2);
16
22
  exports.ResponseRuleModificationsSchema = zod_1.default
17
23
  .object({
18
24
  headers: zod_1.default
@@ -33,7 +39,7 @@ exports.ResponseRuleModificationsSchema = zod_1.default
33
39
  })),
34
40
  }))
35
41
  .describe(JSON.stringify({
36
- markdownDescription: 'Response headers to be added when the rule is matched.',
42
+ markdownDescription: `Array of headers to be added when the rule is matched.\n\nExample:\n\`\`\`json\n${exampleHeaderJson}\n\`\`\``,
37
43
  })),
38
44
  })
39
45
  .optional()
@@ -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;AAqCxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6E1B,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;AAqCxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8E1B,CAAC"}
@@ -62,6 +62,7 @@ exports.ResponseRuleSchema = zod_1.z
62
62
  })
63
63
  .describe(JSON.stringify({
64
64
  title: 'Response Rule',
65
+ description: 'Response rule to be applied when the conditions are met.',
65
66
  markdownDescription: `\n\nFields:\n- **name**: Name of the response rule (required)\n- **description**: Description of the response rule (optional)\n- **enabled**: Whether the response rule is enabled. If disabled, the rule will not be applied.\n- **operator**: Operator to combine conditions (AND/OR)\n- **conditions**: Array of conditions to match against HTTP headers\n - **headerName**: Name of the HTTP header to check (case insensitive)\n - **operator**: Comparison operator (CONTAINS, EQUALS, etc)\n - **value**: Value to compare against (case sensitive, max 255 chars)\n- **responseType**: Type of response when rule matches (e.g. BLOCK)\n\nExample:\n\`\`\`json\n${RuleExampleJson}\n\`\`\``,
66
67
  examples: [
67
68
  {
@@ -13,6 +13,12 @@ const exampleJson = JSON.stringify({
13
13
  },
14
14
  ],
15
15
  }, null, 2);
16
+ const exampleHeaderJson = JSON.stringify([
17
+ {
18
+ key: 'X-Custom-Header',
19
+ value: 'Custom Value',
20
+ },
21
+ ], null, 2);
16
22
  exports.ResponseRuleModificationsSchema = zod_1.default
17
23
  .object({
18
24
  headers: zod_1.default
@@ -33,7 +39,7 @@ exports.ResponseRuleModificationsSchema = zod_1.default
33
39
  })),
34
40
  }))
35
41
  .describe(JSON.stringify({
36
- markdownDescription: 'Response headers to be added when the rule is matched.',
42
+ markdownDescription: `Array of headers to be added when the rule is matched.\n\nExample:\n\`\`\`json\n${exampleHeaderJson}\n\`\`\``,
37
43
  })),
38
44
  })
39
45
  .optional()
@@ -62,6 +62,7 @@ exports.ResponseRuleSchema = zod_1.z
62
62
  })
63
63
  .describe(JSON.stringify({
64
64
  title: 'Response Rule',
65
+ description: 'Response rule to be applied when the conditions are met.',
65
66
  markdownDescription: `\n\nFields:\n- **name**: Name of the response rule (required)\n- **description**: Description of the response rule (optional)\n- **enabled**: Whether the response rule is enabled. If disabled, the rule will not be applied.\n- **operator**: Operator to combine conditions (AND/OR)\n- **conditions**: Array of conditions to match against HTTP headers\n - **headerName**: Name of the HTTP header to check (case insensitive)\n - **operator**: Comparison operator (CONTAINS, EQUALS, etc)\n - **value**: Value to compare against (case sensitive, max 255 chars)\n- **responseType**: Type of response when rule matches (e.g. BLOCK)\n\nExample:\n\`\`\`json\n${RuleExampleJson}\n\`\`\``,
66
67
  examples: [
67
68
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "2.1.79",
3
+ "version": "2.1.81",
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.",