@remnawave/backend-contract 2.1.77 → 2.1.79

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.
@@ -72,8 +72,8 @@ export declare namespace GetSubscriptionSettingsCommand {
72
72
  readonly CLASH: "CLASH";
73
73
  readonly SINGBOX: "SINGBOX";
74
74
  }>;
75
- responseModifications: z.ZodObject<{
76
- headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
75
+ responseModifications: z.ZodOptional<z.ZodObject<{
76
+ headers: z.ZodArray<z.ZodObject<{
77
77
  key: z.ZodString;
78
78
  value: z.ZodString;
79
79
  }, "strip", z.ZodTypeAny, {
@@ -82,18 +82,18 @@ export declare namespace GetSubscriptionSettingsCommand {
82
82
  }, {
83
83
  value: string;
84
84
  key: string;
85
- }>, "many">>;
85
+ }>, "many">;
86
86
  }, "strip", z.ZodTypeAny, {
87
- headers?: {
87
+ headers: {
88
88
  value: string;
89
89
  key: string;
90
- }[] | undefined;
90
+ }[];
91
91
  }, {
92
- headers?: {
92
+ headers: {
93
93
  value: string;
94
94
  key: string;
95
- }[] | undefined;
96
- }>;
95
+ }[];
96
+ }>>;
97
97
  }, "strip", z.ZodTypeAny, {
98
98
  name: string;
99
99
  operator: "AND" | "OR";
@@ -105,13 +105,13 @@ export declare namespace GetSubscriptionSettingsCommand {
105
105
  caseSensitive: boolean;
106
106
  }[];
107
107
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
108
- responseModifications: {
109
- headers?: {
108
+ description?: string | undefined;
109
+ responseModifications?: {
110
+ headers: {
110
111
  value: string;
111
112
  key: string;
112
- }[] | undefined;
113
- };
114
- description?: string | undefined;
113
+ }[];
114
+ } | undefined;
115
115
  }, {
116
116
  name: string;
117
117
  operator: "AND" | "OR";
@@ -123,13 +123,13 @@ export declare namespace GetSubscriptionSettingsCommand {
123
123
  caseSensitive: boolean;
124
124
  }[];
125
125
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
126
- responseModifications: {
127
- headers?: {
126
+ description?: string | undefined;
127
+ responseModifications?: {
128
+ headers: {
128
129
  value: string;
129
130
  key: string;
130
- }[] | undefined;
131
- };
132
- description?: string | undefined;
131
+ }[];
132
+ } | undefined;
133
133
  }>, "many">;
134
134
  }, "strip", z.ZodTypeAny, {
135
135
  version: "1";
@@ -144,13 +144,13 @@ export declare namespace GetSubscriptionSettingsCommand {
144
144
  caseSensitive: boolean;
145
145
  }[];
146
146
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
147
- responseModifications: {
148
- headers?: {
147
+ description?: string | undefined;
148
+ responseModifications?: {
149
+ headers: {
149
150
  value: string;
150
151
  key: string;
151
- }[] | undefined;
152
- };
153
- description?: string | undefined;
152
+ }[];
153
+ } | undefined;
154
154
  }[];
155
155
  }, {
156
156
  version: "1";
@@ -165,13 +165,13 @@ export declare namespace GetSubscriptionSettingsCommand {
165
165
  caseSensitive: boolean;
166
166
  }[];
167
167
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
168
- responseModifications: {
169
- headers?: {
168
+ description?: string | undefined;
169
+ responseModifications?: {
170
+ headers: {
170
171
  value: string;
171
172
  key: string;
172
- }[] | undefined;
173
- };
174
- description?: string | undefined;
173
+ }[];
174
+ } | undefined;
175
175
  }[];
176
176
  }>>;
177
177
  createdAt: z.ZodEffects<z.ZodString, Date, string>;
@@ -207,13 +207,13 @@ export declare namespace GetSubscriptionSettingsCommand {
207
207
  caseSensitive: boolean;
208
208
  }[];
209
209
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
210
- responseModifications: {
211
- headers?: {
210
+ description?: string | undefined;
211
+ responseModifications?: {
212
+ headers: {
212
213
  value: string;
213
214
  key: string;
214
- }[] | undefined;
215
- };
216
- description?: string | undefined;
215
+ }[];
216
+ } | undefined;
217
217
  }[];
218
218
  } | null;
219
219
  }, {
@@ -247,13 +247,13 @@ export declare namespace GetSubscriptionSettingsCommand {
247
247
  caseSensitive: boolean;
248
248
  }[];
249
249
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
250
- responseModifications: {
251
- headers?: {
250
+ description?: string | undefined;
251
+ responseModifications?: {
252
+ headers: {
252
253
  value: string;
253
254
  key: string;
254
- }[] | undefined;
255
- };
256
- description?: string | undefined;
255
+ }[];
256
+ } | undefined;
257
257
  }[];
258
258
  } | null;
259
259
  }>;
@@ -289,13 +289,13 @@ export declare namespace GetSubscriptionSettingsCommand {
289
289
  caseSensitive: boolean;
290
290
  }[];
291
291
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
292
- responseModifications: {
293
- headers?: {
292
+ description?: string | undefined;
293
+ responseModifications?: {
294
+ headers: {
294
295
  value: string;
295
296
  key: string;
296
- }[] | undefined;
297
- };
298
- description?: string | undefined;
297
+ }[];
298
+ } | undefined;
299
299
  }[];
300
300
  } | null;
301
301
  };
@@ -331,13 +331,13 @@ export declare namespace GetSubscriptionSettingsCommand {
331
331
  caseSensitive: boolean;
332
332
  }[];
333
333
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
334
- responseModifications: {
335
- headers?: {
334
+ description?: string | undefined;
335
+ responseModifications?: {
336
+ headers: {
336
337
  value: string;
337
338
  key: string;
338
- }[] | undefined;
339
- };
340
- description?: string | undefined;
339
+ }[];
340
+ } | undefined;
341
341
  }[];
342
342
  } | null;
343
343
  };
@@ -71,8 +71,8 @@ export declare namespace UpdateSubscriptionSettingsCommand {
71
71
  readonly CLASH: "CLASH";
72
72
  readonly SINGBOX: "SINGBOX";
73
73
  }>;
74
- responseModifications: z.ZodObject<{
75
- headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
74
+ responseModifications: z.ZodOptional<z.ZodObject<{
75
+ headers: z.ZodArray<z.ZodObject<{
76
76
  key: z.ZodString;
77
77
  value: z.ZodString;
78
78
  }, "strip", z.ZodTypeAny, {
@@ -81,18 +81,18 @@ export declare namespace UpdateSubscriptionSettingsCommand {
81
81
  }, {
82
82
  value: string;
83
83
  key: string;
84
- }>, "many">>;
84
+ }>, "many">;
85
85
  }, "strip", z.ZodTypeAny, {
86
- headers?: {
86
+ headers: {
87
87
  value: string;
88
88
  key: string;
89
- }[] | undefined;
89
+ }[];
90
90
  }, {
91
- headers?: {
91
+ headers: {
92
92
  value: string;
93
93
  key: string;
94
- }[] | undefined;
95
- }>;
94
+ }[];
95
+ }>>;
96
96
  }, "strip", z.ZodTypeAny, {
97
97
  name: string;
98
98
  operator: "AND" | "OR";
@@ -104,13 +104,13 @@ export declare namespace UpdateSubscriptionSettingsCommand {
104
104
  caseSensitive: boolean;
105
105
  }[];
106
106
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
107
- responseModifications: {
108
- headers?: {
107
+ description?: string | undefined;
108
+ responseModifications?: {
109
+ headers: {
109
110
  value: string;
110
111
  key: string;
111
- }[] | undefined;
112
- };
113
- description?: string | undefined;
112
+ }[];
113
+ } | undefined;
114
114
  }, {
115
115
  name: string;
116
116
  operator: "AND" | "OR";
@@ -122,13 +122,13 @@ export declare namespace UpdateSubscriptionSettingsCommand {
122
122
  caseSensitive: boolean;
123
123
  }[];
124
124
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
125
- responseModifications: {
126
- headers?: {
125
+ description?: string | undefined;
126
+ responseModifications?: {
127
+ headers: {
127
128
  value: string;
128
129
  key: string;
129
- }[] | undefined;
130
- };
131
- description?: string | undefined;
130
+ }[];
131
+ } | undefined;
132
132
  }>, "many">;
133
133
  }, "strip", z.ZodTypeAny, {
134
134
  version: "1";
@@ -143,13 +143,13 @@ export declare namespace UpdateSubscriptionSettingsCommand {
143
143
  caseSensitive: boolean;
144
144
  }[];
145
145
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
146
- responseModifications: {
147
- headers?: {
146
+ description?: string | undefined;
147
+ responseModifications?: {
148
+ headers: {
148
149
  value: string;
149
150
  key: string;
150
- }[] | undefined;
151
- };
152
- description?: string | undefined;
151
+ }[];
152
+ } | undefined;
153
153
  }[];
154
154
  }, {
155
155
  version: "1";
@@ -164,13 +164,13 @@ export declare namespace UpdateSubscriptionSettingsCommand {
164
164
  caseSensitive: boolean;
165
165
  }[];
166
166
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
167
- responseModifications: {
168
- headers?: {
167
+ description?: string | undefined;
168
+ responseModifications?: {
169
+ headers: {
169
170
  value: string;
170
171
  key: string;
171
- }[] | undefined;
172
- };
173
- description?: string | undefined;
172
+ }[];
173
+ } | undefined;
174
174
  }[];
175
175
  }>>;
176
176
  }, "strip", z.ZodTypeAny, {
@@ -202,13 +202,13 @@ export declare namespace UpdateSubscriptionSettingsCommand {
202
202
  caseSensitive: boolean;
203
203
  }[];
204
204
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
205
- responseModifications: {
206
- headers?: {
205
+ description?: string | undefined;
206
+ responseModifications?: {
207
+ headers: {
207
208
  value: string;
208
209
  key: string;
209
- }[] | undefined;
210
- };
211
- description?: string | undefined;
210
+ }[];
211
+ } | undefined;
212
212
  }[];
213
213
  } | undefined;
214
214
  }, {
@@ -240,13 +240,13 @@ export declare namespace UpdateSubscriptionSettingsCommand {
240
240
  caseSensitive: boolean;
241
241
  }[];
242
242
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
243
- responseModifications: {
244
- headers?: {
243
+ description?: string | undefined;
244
+ responseModifications?: {
245
+ headers: {
245
246
  value: string;
246
247
  key: string;
247
- }[] | undefined;
248
- };
249
- description?: string | undefined;
248
+ }[];
249
+ } | undefined;
250
250
  }[];
251
251
  } | undefined;
252
252
  }>;
@@ -320,8 +320,8 @@ export declare namespace UpdateSubscriptionSettingsCommand {
320
320
  readonly CLASH: "CLASH";
321
321
  readonly SINGBOX: "SINGBOX";
322
322
  }>;
323
- responseModifications: z.ZodObject<{
324
- headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
323
+ responseModifications: z.ZodOptional<z.ZodObject<{
324
+ headers: z.ZodArray<z.ZodObject<{
325
325
  key: z.ZodString;
326
326
  value: z.ZodString;
327
327
  }, "strip", z.ZodTypeAny, {
@@ -330,18 +330,18 @@ export declare namespace UpdateSubscriptionSettingsCommand {
330
330
  }, {
331
331
  value: string;
332
332
  key: string;
333
- }>, "many">>;
333
+ }>, "many">;
334
334
  }, "strip", z.ZodTypeAny, {
335
- headers?: {
335
+ headers: {
336
336
  value: string;
337
337
  key: string;
338
- }[] | undefined;
338
+ }[];
339
339
  }, {
340
- headers?: {
340
+ headers: {
341
341
  value: string;
342
342
  key: string;
343
- }[] | undefined;
344
- }>;
343
+ }[];
344
+ }>>;
345
345
  }, "strip", z.ZodTypeAny, {
346
346
  name: string;
347
347
  operator: "AND" | "OR";
@@ -353,13 +353,13 @@ export declare namespace UpdateSubscriptionSettingsCommand {
353
353
  caseSensitive: boolean;
354
354
  }[];
355
355
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
356
- responseModifications: {
357
- headers?: {
356
+ description?: string | undefined;
357
+ responseModifications?: {
358
+ headers: {
358
359
  value: string;
359
360
  key: string;
360
- }[] | undefined;
361
- };
362
- description?: string | undefined;
361
+ }[];
362
+ } | undefined;
363
363
  }, {
364
364
  name: string;
365
365
  operator: "AND" | "OR";
@@ -371,13 +371,13 @@ export declare namespace UpdateSubscriptionSettingsCommand {
371
371
  caseSensitive: boolean;
372
372
  }[];
373
373
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
374
- responseModifications: {
375
- headers?: {
374
+ description?: string | undefined;
375
+ responseModifications?: {
376
+ headers: {
376
377
  value: string;
377
378
  key: string;
378
- }[] | undefined;
379
- };
380
- description?: string | undefined;
379
+ }[];
380
+ } | undefined;
381
381
  }>, "many">;
382
382
  }, "strip", z.ZodTypeAny, {
383
383
  version: "1";
@@ -392,13 +392,13 @@ export declare namespace UpdateSubscriptionSettingsCommand {
392
392
  caseSensitive: boolean;
393
393
  }[];
394
394
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
395
- responseModifications: {
396
- headers?: {
395
+ description?: string | undefined;
396
+ responseModifications?: {
397
+ headers: {
397
398
  value: string;
398
399
  key: string;
399
- }[] | undefined;
400
- };
401
- description?: string | undefined;
400
+ }[];
401
+ } | undefined;
402
402
  }[];
403
403
  }, {
404
404
  version: "1";
@@ -413,13 +413,13 @@ export declare namespace UpdateSubscriptionSettingsCommand {
413
413
  caseSensitive: boolean;
414
414
  }[];
415
415
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
416
- responseModifications: {
417
- headers?: {
416
+ description?: string | undefined;
417
+ responseModifications?: {
418
+ headers: {
418
419
  value: string;
419
420
  key: string;
420
- }[] | undefined;
421
- };
422
- description?: string | undefined;
421
+ }[];
422
+ } | undefined;
423
423
  }[];
424
424
  }>>;
425
425
  createdAt: z.ZodEffects<z.ZodString, Date, string>;
@@ -455,13 +455,13 @@ export declare namespace UpdateSubscriptionSettingsCommand {
455
455
  caseSensitive: boolean;
456
456
  }[];
457
457
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
458
- responseModifications: {
459
- headers?: {
458
+ description?: string | undefined;
459
+ responseModifications?: {
460
+ headers: {
460
461
  value: string;
461
462
  key: string;
462
- }[] | undefined;
463
- };
464
- description?: string | undefined;
463
+ }[];
464
+ } | undefined;
465
465
  }[];
466
466
  } | null;
467
467
  }, {
@@ -495,13 +495,13 @@ export declare namespace UpdateSubscriptionSettingsCommand {
495
495
  caseSensitive: boolean;
496
496
  }[];
497
497
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
498
- responseModifications: {
499
- headers?: {
498
+ description?: string | undefined;
499
+ responseModifications?: {
500
+ headers: {
500
501
  value: string;
501
502
  key: string;
502
- }[] | undefined;
503
- };
504
- description?: string | undefined;
503
+ }[];
504
+ } | undefined;
505
505
  }[];
506
506
  } | null;
507
507
  }>;
@@ -537,13 +537,13 @@ export declare namespace UpdateSubscriptionSettingsCommand {
537
537
  caseSensitive: boolean;
538
538
  }[];
539
539
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
540
- responseModifications: {
541
- headers?: {
540
+ description?: string | undefined;
541
+ responseModifications?: {
542
+ headers: {
542
543
  value: string;
543
544
  key: string;
544
- }[] | undefined;
545
- };
546
- description?: string | undefined;
545
+ }[];
546
+ } | undefined;
547
547
  }[];
548
548
  } | null;
549
549
  };
@@ -579,13 +579,13 @@ export declare namespace UpdateSubscriptionSettingsCommand {
579
579
  caseSensitive: boolean;
580
580
  }[];
581
581
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
582
- responseModifications: {
583
- headers?: {
582
+ description?: string | undefined;
583
+ responseModifications?: {
584
+ headers: {
584
585
  value: string;
585
586
  key: string;
586
- }[] | undefined;
587
- };
588
- description?: string | undefined;
587
+ }[];
588
+ } | undefined;
589
589
  }[];
590
590
  } | null;
591
591
  };
@@ -0,0 +1,24 @@
1
+ import z from 'zod';
2
+ export declare const ResponseRuleModificationsSchema: z.ZodOptional<z.ZodObject<{
3
+ headers: z.ZodArray<z.ZodObject<{
4
+ key: z.ZodString;
5
+ value: z.ZodString;
6
+ }, "strip", z.ZodTypeAny, {
7
+ value: string;
8
+ key: string;
9
+ }, {
10
+ value: string;
11
+ key: string;
12
+ }>, "many">;
13
+ }, "strip", z.ZodTypeAny, {
14
+ headers: {
15
+ value: string;
16
+ key: string;
17
+ }[];
18
+ }, {
19
+ headers: {
20
+ value: string;
21
+ key: string;
22
+ }[];
23
+ }>>;
24
+ //# sourceMappingURL=response-rule-modifications.schema.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ResponseRuleModificationsSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ const exampleJson = JSON.stringify({
9
+ headers: [
10
+ {
11
+ key: 'X-Custom-Header',
12
+ value: 'Custom Value',
13
+ },
14
+ ],
15
+ }, null, 2);
16
+ exports.ResponseRuleModificationsSchema = zod_1.default
17
+ .object({
18
+ headers: zod_1.default
19
+ .array(zod_1.default.object({
20
+ key: zod_1.default
21
+ .string()
22
+ .regex(/^[!#$%&'*+\-.0-9A-Z^_`a-z|~]+$/, 'Invalid header name. Only letters(a-z, A-Z), numbers(0-9), underscores(_) and hyphens(-) are allowed.')
23
+ .describe(JSON.stringify({
24
+ title: 'Key',
25
+ markdownDescription: 'Key of the response header. Must comply with RFC 7230.',
26
+ })),
27
+ value: zod_1.default
28
+ .string()
29
+ .min(1, 'Value is required')
30
+ .describe(JSON.stringify({
31
+ title: 'Value',
32
+ markdownDescription: 'Value of the response header. ',
33
+ })),
34
+ }))
35
+ .describe(JSON.stringify({
36
+ markdownDescription: 'Response headers to be added when the rule is matched.',
37
+ })),
38
+ })
39
+ .optional()
40
+ .describe(JSON.stringify({
41
+ markdownDescription: `Response modifications to be applied when the rule is matched.\n\nExample:\n\`\`\`json\n${exampleJson}\n\`\`\``,
42
+ }));
@@ -47,8 +47,8 @@ export declare const ResponseRuleSchema: z.ZodObject<{
47
47
  readonly CLASH: "CLASH";
48
48
  readonly SINGBOX: "SINGBOX";
49
49
  }>;
50
- responseModifications: z.ZodObject<{
51
- headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
50
+ responseModifications: z.ZodOptional<z.ZodObject<{
51
+ headers: z.ZodArray<z.ZodObject<{
52
52
  key: z.ZodString;
53
53
  value: z.ZodString;
54
54
  }, "strip", z.ZodTypeAny, {
@@ -57,18 +57,18 @@ export declare const ResponseRuleSchema: z.ZodObject<{
57
57
  }, {
58
58
  value: string;
59
59
  key: string;
60
- }>, "many">>;
60
+ }>, "many">;
61
61
  }, "strip", z.ZodTypeAny, {
62
- headers?: {
62
+ headers: {
63
63
  value: string;
64
64
  key: string;
65
- }[] | undefined;
65
+ }[];
66
66
  }, {
67
- headers?: {
67
+ headers: {
68
68
  value: string;
69
69
  key: string;
70
- }[] | undefined;
71
- }>;
70
+ }[];
71
+ }>>;
72
72
  }, "strip", z.ZodTypeAny, {
73
73
  name: string;
74
74
  operator: "AND" | "OR";
@@ -80,13 +80,13 @@ export declare const ResponseRuleSchema: z.ZodObject<{
80
80
  caseSensitive: boolean;
81
81
  }[];
82
82
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
83
- responseModifications: {
84
- headers?: {
83
+ description?: string | undefined;
84
+ responseModifications?: {
85
+ headers: {
85
86
  value: string;
86
87
  key: string;
87
- }[] | undefined;
88
- };
89
- description?: string | undefined;
88
+ }[];
89
+ } | undefined;
90
90
  }, {
91
91
  name: string;
92
92
  operator: "AND" | "OR";
@@ -98,12 +98,12 @@ export declare const ResponseRuleSchema: z.ZodObject<{
98
98
  caseSensitive: boolean;
99
99
  }[];
100
100
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
101
- responseModifications: {
102
- headers?: {
101
+ description?: string | undefined;
102
+ responseModifications?: {
103
+ headers: {
103
104
  value: string;
104
105
  key: string;
105
- }[] | undefined;
106
- };
107
- description?: string | undefined;
106
+ }[];
107
+ } | undefined;
108
108
  }>;
109
109
  //# 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;AAoCxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgH1B,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6E1B,CAAC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ResponseRuleSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const constants_1 = require("../../constants");
6
+ const response_rule_modifications_schema_1 = require("./response-rule-modifications.schema");
6
7
  const response_rule_condition_schema_1 = require("./response-rule-condition.schema");
7
8
  const RuleExampleJson = JSON.stringify({
8
9
  name: 'Block Legacy Clients',
@@ -57,29 +58,7 @@ exports.ResponseRuleSchema = zod_1.z
57
58
  .map(([key, description]) => `- **${key}**: ${description}\n`)
58
59
  .join('\n')}`,
59
60
  })),
60
- responseModifications: zod_1.z.object({
61
- headers: zod_1.z
62
- .array(zod_1.z.object({
63
- key: zod_1.z
64
- .string()
65
- .regex(/^[!#$%&'*+\-.0-9A-Z^_`a-z|~]+$/, 'Invalid header name. Only letters(a-z, A-Z), numbers(0-9), underscores(_) and hyphens(-) are allowed.')
66
- .describe(JSON.stringify({
67
- title: 'Key',
68
- markdownDescription: 'Key of the response header. Must comply with RFC 7230.',
69
- })),
70
- value: zod_1.z
71
- .string()
72
- .min(1, 'Value is required')
73
- .describe(JSON.stringify({
74
- title: 'Value',
75
- markdownDescription: 'Value of the response header. ',
76
- })),
77
- }))
78
- .optional()
79
- .describe(JSON.stringify({
80
- markdownDescription: 'Response headers to be added when the rule is matched.',
81
- })),
82
- }),
61
+ responseModifications: response_rule_modifications_schema_1.ResponseRuleModificationsSchema,
83
62
  })
84
63
  .describe(JSON.stringify({
85
64
  title: 'Response Rule',
@@ -51,8 +51,8 @@ export declare const ResponseRulesConfigSchema: z.ZodObject<{
51
51
  readonly CLASH: "CLASH";
52
52
  readonly SINGBOX: "SINGBOX";
53
53
  }>;
54
- responseModifications: z.ZodObject<{
55
- headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
54
+ responseModifications: z.ZodOptional<z.ZodObject<{
55
+ headers: z.ZodArray<z.ZodObject<{
56
56
  key: z.ZodString;
57
57
  value: z.ZodString;
58
58
  }, "strip", z.ZodTypeAny, {
@@ -61,18 +61,18 @@ export declare const ResponseRulesConfigSchema: z.ZodObject<{
61
61
  }, {
62
62
  value: string;
63
63
  key: string;
64
- }>, "many">>;
64
+ }>, "many">;
65
65
  }, "strip", z.ZodTypeAny, {
66
- headers?: {
66
+ headers: {
67
67
  value: string;
68
68
  key: string;
69
- }[] | undefined;
69
+ }[];
70
70
  }, {
71
- headers?: {
71
+ headers: {
72
72
  value: string;
73
73
  key: string;
74
- }[] | undefined;
75
- }>;
74
+ }[];
75
+ }>>;
76
76
  }, "strip", z.ZodTypeAny, {
77
77
  name: string;
78
78
  operator: "AND" | "OR";
@@ -84,13 +84,13 @@ export declare const ResponseRulesConfigSchema: z.ZodObject<{
84
84
  caseSensitive: boolean;
85
85
  }[];
86
86
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
87
- responseModifications: {
88
- headers?: {
87
+ description?: string | undefined;
88
+ responseModifications?: {
89
+ headers: {
89
90
  value: string;
90
91
  key: string;
91
- }[] | undefined;
92
- };
93
- description?: string | undefined;
92
+ }[];
93
+ } | undefined;
94
94
  }, {
95
95
  name: string;
96
96
  operator: "AND" | "OR";
@@ -102,13 +102,13 @@ export declare const ResponseRulesConfigSchema: z.ZodObject<{
102
102
  caseSensitive: boolean;
103
103
  }[];
104
104
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
105
- responseModifications: {
106
- headers?: {
105
+ description?: string | undefined;
106
+ responseModifications?: {
107
+ headers: {
107
108
  value: string;
108
109
  key: string;
109
- }[] | undefined;
110
- };
111
- description?: string | undefined;
110
+ }[];
111
+ } | undefined;
112
112
  }>, "many">;
113
113
  }, "strip", z.ZodTypeAny, {
114
114
  version: "1";
@@ -123,13 +123,13 @@ export declare const ResponseRulesConfigSchema: z.ZodObject<{
123
123
  caseSensitive: boolean;
124
124
  }[];
125
125
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
126
- responseModifications: {
127
- headers?: {
126
+ description?: string | undefined;
127
+ responseModifications?: {
128
+ headers: {
128
129
  value: string;
129
130
  key: string;
130
- }[] | undefined;
131
- };
132
- description?: string | undefined;
131
+ }[];
132
+ } | undefined;
133
133
  }[];
134
134
  }, {
135
135
  version: "1";
@@ -144,13 +144,13 @@ export declare const ResponseRulesConfigSchema: z.ZodObject<{
144
144
  caseSensitive: boolean;
145
145
  }[];
146
146
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
147
- responseModifications: {
148
- headers?: {
147
+ description?: string | undefined;
148
+ responseModifications?: {
149
+ headers: {
149
150
  value: string;
150
151
  key: string;
151
- }[] | undefined;
152
- };
153
- description?: string | undefined;
152
+ }[];
153
+ } | undefined;
154
154
  }[];
155
155
  }>;
156
156
  //# sourceMappingURL=response-rules-config.schema.d.ts.map
@@ -67,8 +67,8 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
67
67
  readonly CLASH: "CLASH";
68
68
  readonly SINGBOX: "SINGBOX";
69
69
  }>;
70
- responseModifications: z.ZodObject<{
71
- headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
70
+ responseModifications: z.ZodOptional<z.ZodObject<{
71
+ headers: z.ZodArray<z.ZodObject<{
72
72
  key: z.ZodString;
73
73
  value: z.ZodString;
74
74
  }, "strip", z.ZodTypeAny, {
@@ -77,18 +77,18 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
77
77
  }, {
78
78
  value: string;
79
79
  key: string;
80
- }>, "many">>;
80
+ }>, "many">;
81
81
  }, "strip", z.ZodTypeAny, {
82
- headers?: {
82
+ headers: {
83
83
  value: string;
84
84
  key: string;
85
- }[] | undefined;
85
+ }[];
86
86
  }, {
87
- headers?: {
87
+ headers: {
88
88
  value: string;
89
89
  key: string;
90
- }[] | undefined;
91
- }>;
90
+ }[];
91
+ }>>;
92
92
  }, "strip", z.ZodTypeAny, {
93
93
  name: string;
94
94
  operator: "AND" | "OR";
@@ -100,13 +100,13 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
100
100
  caseSensitive: boolean;
101
101
  }[];
102
102
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
103
- responseModifications: {
104
- headers?: {
103
+ description?: string | undefined;
104
+ responseModifications?: {
105
+ headers: {
105
106
  value: string;
106
107
  key: string;
107
- }[] | undefined;
108
- };
109
- description?: string | undefined;
108
+ }[];
109
+ } | undefined;
110
110
  }, {
111
111
  name: string;
112
112
  operator: "AND" | "OR";
@@ -118,13 +118,13 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
118
118
  caseSensitive: boolean;
119
119
  }[];
120
120
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
121
- responseModifications: {
122
- headers?: {
121
+ description?: string | undefined;
122
+ responseModifications?: {
123
+ headers: {
123
124
  value: string;
124
125
  key: string;
125
- }[] | undefined;
126
- };
127
- description?: string | undefined;
126
+ }[];
127
+ } | undefined;
128
128
  }>, "many">;
129
129
  }, "strip", z.ZodTypeAny, {
130
130
  version: "1";
@@ -139,13 +139,13 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
139
139
  caseSensitive: boolean;
140
140
  }[];
141
141
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
142
- responseModifications: {
143
- headers?: {
142
+ description?: string | undefined;
143
+ responseModifications?: {
144
+ headers: {
144
145
  value: string;
145
146
  key: string;
146
- }[] | undefined;
147
- };
148
- description?: string | undefined;
147
+ }[];
148
+ } | undefined;
149
149
  }[];
150
150
  }, {
151
151
  version: "1";
@@ -160,13 +160,13 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
160
160
  caseSensitive: boolean;
161
161
  }[];
162
162
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
163
- responseModifications: {
164
- headers?: {
163
+ description?: string | undefined;
164
+ responseModifications?: {
165
+ headers: {
165
166
  value: string;
166
167
  key: string;
167
- }[] | undefined;
168
- };
169
- description?: string | undefined;
168
+ }[];
169
+ } | undefined;
170
170
  }[];
171
171
  }>>;
172
172
  createdAt: z.ZodEffects<z.ZodString, Date, string>;
@@ -202,13 +202,13 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
202
202
  caseSensitive: boolean;
203
203
  }[];
204
204
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
205
- responseModifications: {
206
- headers?: {
205
+ description?: string | undefined;
206
+ responseModifications?: {
207
+ headers: {
207
208
  value: string;
208
209
  key: string;
209
- }[] | undefined;
210
- };
211
- description?: string | undefined;
210
+ }[];
211
+ } | undefined;
212
212
  }[];
213
213
  } | null;
214
214
  }, {
@@ -242,13 +242,13 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
242
242
  caseSensitive: boolean;
243
243
  }[];
244
244
  responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
245
- responseModifications: {
246
- headers?: {
245
+ description?: string | undefined;
246
+ responseModifications?: {
247
+ headers: {
247
248
  value: string;
248
249
  key: string;
249
- }[] | undefined;
250
- };
251
- description?: string | undefined;
250
+ }[];
251
+ } | undefined;
252
252
  }[];
253
253
  } | null;
254
254
  }>;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ResponseRuleModificationsSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ const exampleJson = JSON.stringify({
9
+ headers: [
10
+ {
11
+ key: 'X-Custom-Header',
12
+ value: 'Custom Value',
13
+ },
14
+ ],
15
+ }, null, 2);
16
+ exports.ResponseRuleModificationsSchema = zod_1.default
17
+ .object({
18
+ headers: zod_1.default
19
+ .array(zod_1.default.object({
20
+ key: zod_1.default
21
+ .string()
22
+ .regex(/^[!#$%&'*+\-.0-9A-Z^_`a-z|~]+$/, 'Invalid header name. Only letters(a-z, A-Z), numbers(0-9), underscores(_) and hyphens(-) are allowed.')
23
+ .describe(JSON.stringify({
24
+ title: 'Key',
25
+ markdownDescription: 'Key of the response header. Must comply with RFC 7230.',
26
+ })),
27
+ value: zod_1.default
28
+ .string()
29
+ .min(1, 'Value is required')
30
+ .describe(JSON.stringify({
31
+ title: 'Value',
32
+ markdownDescription: 'Value of the response header. ',
33
+ })),
34
+ }))
35
+ .describe(JSON.stringify({
36
+ markdownDescription: 'Response headers to be added when the rule is matched.',
37
+ })),
38
+ })
39
+ .optional()
40
+ .describe(JSON.stringify({
41
+ markdownDescription: `Response modifications to be applied when the rule is matched.\n\nExample:\n\`\`\`json\n${exampleJson}\n\`\`\``,
42
+ }));
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ResponseRuleSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const constants_1 = require("../../constants");
6
+ const response_rule_modifications_schema_1 = require("./response-rule-modifications.schema");
6
7
  const response_rule_condition_schema_1 = require("./response-rule-condition.schema");
7
8
  const RuleExampleJson = JSON.stringify({
8
9
  name: 'Block Legacy Clients',
@@ -57,29 +58,7 @@ exports.ResponseRuleSchema = zod_1.z
57
58
  .map(([key, description]) => `- **${key}**: ${description}\n`)
58
59
  .join('\n')}`,
59
60
  })),
60
- responseModifications: zod_1.z.object({
61
- headers: zod_1.z
62
- .array(zod_1.z.object({
63
- key: zod_1.z
64
- .string()
65
- .regex(/^[!#$%&'*+\-.0-9A-Z^_`a-z|~]+$/, 'Invalid header name. Only letters(a-z, A-Z), numbers(0-9), underscores(_) and hyphens(-) are allowed.')
66
- .describe(JSON.stringify({
67
- title: 'Key',
68
- markdownDescription: 'Key of the response header. Must comply with RFC 7230.',
69
- })),
70
- value: zod_1.z
71
- .string()
72
- .min(1, 'Value is required')
73
- .describe(JSON.stringify({
74
- title: 'Value',
75
- markdownDescription: 'Value of the response header. ',
76
- })),
77
- }))
78
- .optional()
79
- .describe(JSON.stringify({
80
- markdownDescription: 'Response headers to be added when the rule is matched.',
81
- })),
82
- }),
61
+ responseModifications: response_rule_modifications_schema_1.ResponseRuleModificationsSchema,
83
62
  })
84
63
  .describe(JSON.stringify({
85
64
  title: 'Response Rule',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "2.1.77",
3
+ "version": "2.1.79",
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.",