@middlewr/contracts 0.0.27 → 0.0.28
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/dist/cjs/index.d.ts +637 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +283 -219
- package/dist/cjs/links.schema.d.ts +212 -0
- package/dist/cjs/links.schema.d.ts.map +1 -1
- package/dist/cjs/rules.schema.d.ts +97 -0
- package/dist/cjs/rules.schema.d.ts.map +1 -0
- package/dist/esm/index.d.ts +637 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +281 -219
- package/dist/esm/links.schema.d.ts +212 -0
- package/dist/esm/links.schema.d.ts.map +1 -1
- package/dist/esm/rules.schema.d.ts +97 -0
- package/dist/esm/rules.schema.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/links.schema.ts +72 -55
- package/src/rules.schema.ts +58 -0
|
@@ -73,6 +73,59 @@ export declare const LinkSchema: z.ZodObject<{
|
|
|
73
73
|
frame_color: z.ZodString;
|
|
74
74
|
frame_text_color: z.ZodString;
|
|
75
75
|
}, z.core.$strip>>;
|
|
76
|
+
link_type: z.ZodDefault<z.ZodEnum<{
|
|
77
|
+
redirect: "redirect";
|
|
78
|
+
rules: "rules";
|
|
79
|
+
}>>;
|
|
80
|
+
rule_graph: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
81
|
+
entry: z.ZodString;
|
|
82
|
+
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
83
|
+
id: z.ZodString;
|
|
84
|
+
type: z.ZodLiteral<"condition">;
|
|
85
|
+
position: z.ZodObject<{
|
|
86
|
+
x: z.ZodNumber;
|
|
87
|
+
y: z.ZodNumber;
|
|
88
|
+
}, z.core.$strip>;
|
|
89
|
+
field: z.ZodString;
|
|
90
|
+
operator: z.ZodEnum<{
|
|
91
|
+
eq: "eq";
|
|
92
|
+
neq: "neq";
|
|
93
|
+
in: "in";
|
|
94
|
+
not_in: "not_in";
|
|
95
|
+
contains: "contains";
|
|
96
|
+
not_contains: "not_contains";
|
|
97
|
+
gt: "gt";
|
|
98
|
+
lt: "lt";
|
|
99
|
+
gte: "gte";
|
|
100
|
+
lte: "lte";
|
|
101
|
+
regex: "regex";
|
|
102
|
+
}>;
|
|
103
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber]>;
|
|
104
|
+
outputs: z.ZodObject<{
|
|
105
|
+
true: z.ZodNullable<z.ZodString>;
|
|
106
|
+
false: z.ZodNullable<z.ZodString>;
|
|
107
|
+
}, z.core.$strip>;
|
|
108
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
109
|
+
id: z.ZodString;
|
|
110
|
+
type: z.ZodLiteral<"split">;
|
|
111
|
+
position: z.ZodObject<{
|
|
112
|
+
x: z.ZodNumber;
|
|
113
|
+
y: z.ZodNumber;
|
|
114
|
+
}, z.core.$strip>;
|
|
115
|
+
variants: z.ZodArray<z.ZodObject<{
|
|
116
|
+
weight: z.ZodNumber;
|
|
117
|
+
target: z.ZodNullable<z.ZodString>;
|
|
118
|
+
}, z.core.$strip>>;
|
|
119
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
120
|
+
id: z.ZodString;
|
|
121
|
+
type: z.ZodLiteral<"destination">;
|
|
122
|
+
position: z.ZodObject<{
|
|
123
|
+
x: z.ZodNumber;
|
|
124
|
+
y: z.ZodNumber;
|
|
125
|
+
}, z.core.$strip>;
|
|
126
|
+
url: z.ZodString;
|
|
127
|
+
}, z.core.$strip>], "type">>;
|
|
128
|
+
}, z.core.$strip>>>;
|
|
76
129
|
tags: z.ZodArray<z.ZodObject<{
|
|
77
130
|
id: z.ZodString;
|
|
78
131
|
workspace_id: z.ZodString;
|
|
@@ -124,6 +177,59 @@ export declare const CreateLinkInputSchema: z.ZodObject<{
|
|
|
124
177
|
frame_text_color: z.ZodString;
|
|
125
178
|
}, z.core.$strip>>>;
|
|
126
179
|
tag_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
180
|
+
link_type: z.ZodOptional<z.ZodEnum<{
|
|
181
|
+
redirect: "redirect";
|
|
182
|
+
rules: "rules";
|
|
183
|
+
}>>;
|
|
184
|
+
rule_graph: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
185
|
+
entry: z.ZodString;
|
|
186
|
+
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
187
|
+
id: z.ZodString;
|
|
188
|
+
type: z.ZodLiteral<"condition">;
|
|
189
|
+
position: z.ZodObject<{
|
|
190
|
+
x: z.ZodNumber;
|
|
191
|
+
y: z.ZodNumber;
|
|
192
|
+
}, z.core.$strip>;
|
|
193
|
+
field: z.ZodString;
|
|
194
|
+
operator: z.ZodEnum<{
|
|
195
|
+
eq: "eq";
|
|
196
|
+
neq: "neq";
|
|
197
|
+
in: "in";
|
|
198
|
+
not_in: "not_in";
|
|
199
|
+
contains: "contains";
|
|
200
|
+
not_contains: "not_contains";
|
|
201
|
+
gt: "gt";
|
|
202
|
+
lt: "lt";
|
|
203
|
+
gte: "gte";
|
|
204
|
+
lte: "lte";
|
|
205
|
+
regex: "regex";
|
|
206
|
+
}>;
|
|
207
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber]>;
|
|
208
|
+
outputs: z.ZodObject<{
|
|
209
|
+
true: z.ZodNullable<z.ZodString>;
|
|
210
|
+
false: z.ZodNullable<z.ZodString>;
|
|
211
|
+
}, z.core.$strip>;
|
|
212
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
213
|
+
id: z.ZodString;
|
|
214
|
+
type: z.ZodLiteral<"split">;
|
|
215
|
+
position: z.ZodObject<{
|
|
216
|
+
x: z.ZodNumber;
|
|
217
|
+
y: z.ZodNumber;
|
|
218
|
+
}, z.core.$strip>;
|
|
219
|
+
variants: z.ZodArray<z.ZodObject<{
|
|
220
|
+
weight: z.ZodNumber;
|
|
221
|
+
target: z.ZodNullable<z.ZodString>;
|
|
222
|
+
}, z.core.$strip>>;
|
|
223
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
224
|
+
id: z.ZodString;
|
|
225
|
+
type: z.ZodLiteral<"destination">;
|
|
226
|
+
position: z.ZodObject<{
|
|
227
|
+
x: z.ZodNumber;
|
|
228
|
+
y: z.ZodNumber;
|
|
229
|
+
}, z.core.$strip>;
|
|
230
|
+
url: z.ZodString;
|
|
231
|
+
}, z.core.$strip>], "type">>;
|
|
232
|
+
}, z.core.$strip>>>;
|
|
127
233
|
}, z.core.$strip>;
|
|
128
234
|
export declare const UpdateLinkInputSchema: z.ZodObject<{
|
|
129
235
|
original_url: z.ZodOptional<z.ZodString>;
|
|
@@ -168,6 +274,59 @@ export declare const UpdateLinkInputSchema: z.ZodObject<{
|
|
|
168
274
|
frame_text_color: z.ZodString;
|
|
169
275
|
}, z.core.$strip>>>;
|
|
170
276
|
tag_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
277
|
+
link_type: z.ZodOptional<z.ZodEnum<{
|
|
278
|
+
redirect: "redirect";
|
|
279
|
+
rules: "rules";
|
|
280
|
+
}>>;
|
|
281
|
+
rule_graph: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
282
|
+
entry: z.ZodString;
|
|
283
|
+
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
284
|
+
id: z.ZodString;
|
|
285
|
+
type: z.ZodLiteral<"condition">;
|
|
286
|
+
position: z.ZodObject<{
|
|
287
|
+
x: z.ZodNumber;
|
|
288
|
+
y: z.ZodNumber;
|
|
289
|
+
}, z.core.$strip>;
|
|
290
|
+
field: z.ZodString;
|
|
291
|
+
operator: z.ZodEnum<{
|
|
292
|
+
eq: "eq";
|
|
293
|
+
neq: "neq";
|
|
294
|
+
in: "in";
|
|
295
|
+
not_in: "not_in";
|
|
296
|
+
contains: "contains";
|
|
297
|
+
not_contains: "not_contains";
|
|
298
|
+
gt: "gt";
|
|
299
|
+
lt: "lt";
|
|
300
|
+
gte: "gte";
|
|
301
|
+
lte: "lte";
|
|
302
|
+
regex: "regex";
|
|
303
|
+
}>;
|
|
304
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber]>;
|
|
305
|
+
outputs: z.ZodObject<{
|
|
306
|
+
true: z.ZodNullable<z.ZodString>;
|
|
307
|
+
false: z.ZodNullable<z.ZodString>;
|
|
308
|
+
}, z.core.$strip>;
|
|
309
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
310
|
+
id: z.ZodString;
|
|
311
|
+
type: z.ZodLiteral<"split">;
|
|
312
|
+
position: z.ZodObject<{
|
|
313
|
+
x: z.ZodNumber;
|
|
314
|
+
y: z.ZodNumber;
|
|
315
|
+
}, z.core.$strip>;
|
|
316
|
+
variants: z.ZodArray<z.ZodObject<{
|
|
317
|
+
weight: z.ZodNumber;
|
|
318
|
+
target: z.ZodNullable<z.ZodString>;
|
|
319
|
+
}, z.core.$strip>>;
|
|
320
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
321
|
+
id: z.ZodString;
|
|
322
|
+
type: z.ZodLiteral<"destination">;
|
|
323
|
+
position: z.ZodObject<{
|
|
324
|
+
x: z.ZodNumber;
|
|
325
|
+
y: z.ZodNumber;
|
|
326
|
+
}, z.core.$strip>;
|
|
327
|
+
url: z.ZodString;
|
|
328
|
+
}, z.core.$strip>], "type">>;
|
|
329
|
+
}, z.core.$strip>>>;
|
|
171
330
|
}, z.core.$strip>;
|
|
172
331
|
export declare const LinkFiltersSchema: z.ZodObject<{
|
|
173
332
|
search: z.ZodOptional<z.ZodString>;
|
|
@@ -252,6 +411,59 @@ export declare const PaginatedLinksSchema: z.ZodObject<{
|
|
|
252
411
|
frame_color: z.ZodString;
|
|
253
412
|
frame_text_color: z.ZodString;
|
|
254
413
|
}, z.core.$strip>>;
|
|
414
|
+
link_type: z.ZodDefault<z.ZodEnum<{
|
|
415
|
+
redirect: "redirect";
|
|
416
|
+
rules: "rules";
|
|
417
|
+
}>>;
|
|
418
|
+
rule_graph: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
419
|
+
entry: z.ZodString;
|
|
420
|
+
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
421
|
+
id: z.ZodString;
|
|
422
|
+
type: z.ZodLiteral<"condition">;
|
|
423
|
+
position: z.ZodObject<{
|
|
424
|
+
x: z.ZodNumber;
|
|
425
|
+
y: z.ZodNumber;
|
|
426
|
+
}, z.core.$strip>;
|
|
427
|
+
field: z.ZodString;
|
|
428
|
+
operator: z.ZodEnum<{
|
|
429
|
+
eq: "eq";
|
|
430
|
+
neq: "neq";
|
|
431
|
+
in: "in";
|
|
432
|
+
not_in: "not_in";
|
|
433
|
+
contains: "contains";
|
|
434
|
+
not_contains: "not_contains";
|
|
435
|
+
gt: "gt";
|
|
436
|
+
lt: "lt";
|
|
437
|
+
gte: "gte";
|
|
438
|
+
lte: "lte";
|
|
439
|
+
regex: "regex";
|
|
440
|
+
}>;
|
|
441
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber]>;
|
|
442
|
+
outputs: z.ZodObject<{
|
|
443
|
+
true: z.ZodNullable<z.ZodString>;
|
|
444
|
+
false: z.ZodNullable<z.ZodString>;
|
|
445
|
+
}, z.core.$strip>;
|
|
446
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
447
|
+
id: z.ZodString;
|
|
448
|
+
type: z.ZodLiteral<"split">;
|
|
449
|
+
position: z.ZodObject<{
|
|
450
|
+
x: z.ZodNumber;
|
|
451
|
+
y: z.ZodNumber;
|
|
452
|
+
}, z.core.$strip>;
|
|
453
|
+
variants: z.ZodArray<z.ZodObject<{
|
|
454
|
+
weight: z.ZodNumber;
|
|
455
|
+
target: z.ZodNullable<z.ZodString>;
|
|
456
|
+
}, z.core.$strip>>;
|
|
457
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
458
|
+
id: z.ZodString;
|
|
459
|
+
type: z.ZodLiteral<"destination">;
|
|
460
|
+
position: z.ZodObject<{
|
|
461
|
+
x: z.ZodNumber;
|
|
462
|
+
y: z.ZodNumber;
|
|
463
|
+
}, z.core.$strip>;
|
|
464
|
+
url: z.ZodString;
|
|
465
|
+
}, z.core.$strip>], "type">>;
|
|
466
|
+
}, z.core.$strip>>>;
|
|
255
467
|
tags: z.ZodArray<z.ZodObject<{
|
|
256
468
|
id: z.ZodString;
|
|
257
469
|
workspace_id: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"links.schema.d.ts","sourceRoot":"","sources":["../../src/links.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"links.schema.d.ts","sourceRoot":"","sources":["../../src/links.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;iBAU/B,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4BrB,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiC5B,CAAC;AAEP,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkC5B,CAAC;AAMP,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAe5B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAM/B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;iBAYxB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;iBAG/B,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const RuleGraphNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
type: z.ZodLiteral<"condition">;
|
|
5
|
+
position: z.ZodObject<{
|
|
6
|
+
x: z.ZodNumber;
|
|
7
|
+
y: z.ZodNumber;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
field: z.ZodString;
|
|
10
|
+
operator: z.ZodEnum<{
|
|
11
|
+
eq: "eq";
|
|
12
|
+
neq: "neq";
|
|
13
|
+
in: "in";
|
|
14
|
+
not_in: "not_in";
|
|
15
|
+
contains: "contains";
|
|
16
|
+
not_contains: "not_contains";
|
|
17
|
+
gt: "gt";
|
|
18
|
+
lt: "lt";
|
|
19
|
+
gte: "gte";
|
|
20
|
+
lte: "lte";
|
|
21
|
+
regex: "regex";
|
|
22
|
+
}>;
|
|
23
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber]>;
|
|
24
|
+
outputs: z.ZodObject<{
|
|
25
|
+
true: z.ZodNullable<z.ZodString>;
|
|
26
|
+
false: z.ZodNullable<z.ZodString>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
+
id: z.ZodString;
|
|
30
|
+
type: z.ZodLiteral<"split">;
|
|
31
|
+
position: z.ZodObject<{
|
|
32
|
+
x: z.ZodNumber;
|
|
33
|
+
y: z.ZodNumber;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
variants: z.ZodArray<z.ZodObject<{
|
|
36
|
+
weight: z.ZodNumber;
|
|
37
|
+
target: z.ZodNullable<z.ZodString>;
|
|
38
|
+
}, z.core.$strip>>;
|
|
39
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
40
|
+
id: z.ZodString;
|
|
41
|
+
type: z.ZodLiteral<"destination">;
|
|
42
|
+
position: z.ZodObject<{
|
|
43
|
+
x: z.ZodNumber;
|
|
44
|
+
y: z.ZodNumber;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
url: z.ZodString;
|
|
47
|
+
}, z.core.$strip>], "type">;
|
|
48
|
+
export declare const RuleGraphSchema: z.ZodNullable<z.ZodObject<{
|
|
49
|
+
entry: z.ZodString;
|
|
50
|
+
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
51
|
+
id: z.ZodString;
|
|
52
|
+
type: z.ZodLiteral<"condition">;
|
|
53
|
+
position: z.ZodObject<{
|
|
54
|
+
x: z.ZodNumber;
|
|
55
|
+
y: z.ZodNumber;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
field: z.ZodString;
|
|
58
|
+
operator: z.ZodEnum<{
|
|
59
|
+
eq: "eq";
|
|
60
|
+
neq: "neq";
|
|
61
|
+
in: "in";
|
|
62
|
+
not_in: "not_in";
|
|
63
|
+
contains: "contains";
|
|
64
|
+
not_contains: "not_contains";
|
|
65
|
+
gt: "gt";
|
|
66
|
+
lt: "lt";
|
|
67
|
+
gte: "gte";
|
|
68
|
+
lte: "lte";
|
|
69
|
+
regex: "regex";
|
|
70
|
+
}>;
|
|
71
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber]>;
|
|
72
|
+
outputs: z.ZodObject<{
|
|
73
|
+
true: z.ZodNullable<z.ZodString>;
|
|
74
|
+
false: z.ZodNullable<z.ZodString>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
77
|
+
id: z.ZodString;
|
|
78
|
+
type: z.ZodLiteral<"split">;
|
|
79
|
+
position: z.ZodObject<{
|
|
80
|
+
x: z.ZodNumber;
|
|
81
|
+
y: z.ZodNumber;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
variants: z.ZodArray<z.ZodObject<{
|
|
84
|
+
weight: z.ZodNumber;
|
|
85
|
+
target: z.ZodNullable<z.ZodString>;
|
|
86
|
+
}, z.core.$strip>>;
|
|
87
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
88
|
+
id: z.ZodString;
|
|
89
|
+
type: z.ZodLiteral<"destination">;
|
|
90
|
+
position: z.ZodObject<{
|
|
91
|
+
x: z.ZodNumber;
|
|
92
|
+
y: z.ZodNumber;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
url: z.ZodString;
|
|
95
|
+
}, z.core.$strip>], "type">>;
|
|
96
|
+
}, z.core.$strip>>;
|
|
97
|
+
//# sourceMappingURL=rules.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.schema.d.ts","sourceRoot":"","sources":["../../src/rules.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA8CxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAA8F,CAAC;AAE/H,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBASb,CAAC"}
|