@middlewr/contracts 0.0.48 → 0.0.50
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 +684 -64
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +22 -9
- package/dist/cjs/link-templates.schema.d.ts +96 -0
- package/dist/cjs/link-templates.schema.d.ts.map +1 -1
- package/dist/cjs/links.schema.d.ts +98 -16
- package/dist/cjs/links.schema.d.ts.map +1 -1
- package/dist/cjs/rules.schema.d.ts +72 -0
- package/dist/cjs/rules.schema.d.ts.map +1 -1
- package/dist/esm/index.d.ts +684 -64
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +22 -9
- package/dist/esm/link-templates.schema.d.ts +96 -0
- package/dist/esm/link-templates.schema.d.ts.map +1 -1
- package/dist/esm/links.schema.d.ts +98 -16
- package/dist/esm/links.schema.d.ts.map +1 -1
- package/dist/esm/rules.schema.d.ts +72 -0
- package/dist/esm/rules.schema.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/links.schema.ts +52 -64
- package/src/rules.schema.ts +26 -0
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA+DxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAE9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CA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Q,CAAC;AACvC,MAAM,MAAM,MAAM,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -272,6 +272,25 @@ var PasswordNodeSchema = z6.object({
|
|
|
272
272
|
position: PositionSchema,
|
|
273
273
|
next: z6.string().nullable()
|
|
274
274
|
});
|
|
275
|
+
var CountdownNodeSchema = z6.object({
|
|
276
|
+
id: z6.string(),
|
|
277
|
+
type: z6.literal("countdown"),
|
|
278
|
+
position: PositionSchema,
|
|
279
|
+
seconds: z6.number().int().min(1).max(300),
|
|
280
|
+
message: z6.string().max(500).nullable(),
|
|
281
|
+
next: z6.string().nullable()
|
|
282
|
+
});
|
|
283
|
+
var WebhookNodeSchema = z6.object({
|
|
284
|
+
id: z6.string(),
|
|
285
|
+
type: z6.literal("webhook"),
|
|
286
|
+
position: PositionSchema,
|
|
287
|
+
url: z6.string().url().refine((u) => u.startsWith("https://") || u.startsWith("http://"), {
|
|
288
|
+
message: "Webhook URL must use http or https protocol"
|
|
289
|
+
}),
|
|
290
|
+
method: z6.enum(["POST", "GET"]),
|
|
291
|
+
headers: z6.record(z6.string(), z6.string().regex(/^[^\r\n]*$/, "Header value must not contain newlines")).optional(),
|
|
292
|
+
next: z6.string().nullable()
|
|
293
|
+
});
|
|
275
294
|
var EntryNodeSchema = z6.object({
|
|
276
295
|
id: z6.string(),
|
|
277
296
|
type: z6.literal("entry"),
|
|
@@ -287,6 +306,8 @@ var RuleGraphNodeSchema = z6.discriminatedUnion("type", [
|
|
|
287
306
|
DestinationNodeSchema,
|
|
288
307
|
TransformNodeSchema,
|
|
289
308
|
PasswordNodeSchema,
|
|
309
|
+
CountdownNodeSchema,
|
|
310
|
+
WebhookNodeSchema,
|
|
290
311
|
EntryNodeSchema
|
|
291
312
|
]);
|
|
292
313
|
var BaseRuleGraphSchema = z6.object({
|
|
@@ -412,10 +433,10 @@ var LinkSchema = z9.object({
|
|
|
412
433
|
click_count_updated_at: z9.coerce.date().nullable(),
|
|
413
434
|
created_at: z9.coerce.date(),
|
|
414
435
|
updated_at: z9.coerce.date().nullable(),
|
|
436
|
+
version: z9.number().int(),
|
|
415
437
|
qr_code_settings: QrCodeSettingsSchema.nullable(),
|
|
416
438
|
qr_logo_key: z9.string().nullable(),
|
|
417
439
|
logo_url: z9.string().nullable(),
|
|
418
|
-
link_type: z9.enum(["redirect", "rules"]).default("redirect"),
|
|
419
440
|
rule_graph: RuleGraphOutputSchema.nullable().optional(),
|
|
420
441
|
tags: z9.array(TagSchema)
|
|
421
442
|
});
|
|
@@ -434,11 +455,7 @@ var CreateLinkInputSchema = z9.object({
|
|
|
434
455
|
redirect_type: z9.coerce.number().refine((v) => [301, 302, 307, 308].includes(v)).optional(),
|
|
435
456
|
qr_code_settings: QrCodeSettingsSchema.nullable().optional(),
|
|
436
457
|
tag_ids: z9.array(z9.string().uuid()).optional(),
|
|
437
|
-
link_type: z9.enum(["redirect", "rules"]).optional(),
|
|
438
458
|
rule_graph: RuleGraphSchema.nullable().optional()
|
|
439
|
-
}).refine((data) => data.link_type !== "rules" || data.rule_graph != null, {
|
|
440
|
-
message: 'rule_graph is required when link_type is "rules"',
|
|
441
|
-
path: ["rule_graph"]
|
|
442
459
|
});
|
|
443
460
|
var UpdateLinkInputSchema = z9.object({
|
|
444
461
|
original_url: z9.string().url().max(2048).optional(),
|
|
@@ -456,11 +473,7 @@ var UpdateLinkInputSchema = z9.object({
|
|
|
456
473
|
redirect_type: z9.coerce.number().refine((v) => [301, 302, 307, 308].includes(v)).optional(),
|
|
457
474
|
qr_code_settings: QrCodeSettingsSchema.nullable().optional(),
|
|
458
475
|
tag_ids: z9.array(z9.string().uuid()).optional(),
|
|
459
|
-
link_type: z9.enum(["redirect", "rules"]).optional(),
|
|
460
476
|
rule_graph: RuleGraphSchema.nullable().optional()
|
|
461
|
-
}).refine((data) => data.link_type !== "rules" || data.rule_graph != null, {
|
|
462
|
-
message: 'rule_graph is required when link_type is "rules"',
|
|
463
|
-
path: ["rule_graph"]
|
|
464
477
|
});
|
|
465
478
|
var stringToBoolean = z9.union([z9.boolean(), z9.enum(["true", "false"])]).transform((val) => typeof val === "string" ? val === "true" : val);
|
|
466
479
|
var LinkFiltersSchema = z9.object({
|
|
@@ -86,6 +86,30 @@ export declare const LinkTemplateSchema: z.ZodObject<{
|
|
|
86
86
|
y: z.ZodNumber;
|
|
87
87
|
}, z.core.$strip>;
|
|
88
88
|
next: z.ZodNullable<z.ZodString>;
|
|
89
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
90
|
+
id: z.ZodString;
|
|
91
|
+
type: z.ZodLiteral<"countdown">;
|
|
92
|
+
position: z.ZodObject<{
|
|
93
|
+
x: z.ZodNumber;
|
|
94
|
+
y: z.ZodNumber;
|
|
95
|
+
}, z.core.$strip>;
|
|
96
|
+
seconds: z.ZodNumber;
|
|
97
|
+
message: z.ZodNullable<z.ZodString>;
|
|
98
|
+
next: z.ZodNullable<z.ZodString>;
|
|
99
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
100
|
+
id: z.ZodString;
|
|
101
|
+
type: z.ZodLiteral<"webhook">;
|
|
102
|
+
position: z.ZodObject<{
|
|
103
|
+
x: z.ZodNumber;
|
|
104
|
+
y: z.ZodNumber;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
url: z.ZodString;
|
|
107
|
+
method: z.ZodEnum<{
|
|
108
|
+
POST: "POST";
|
|
109
|
+
GET: "GET";
|
|
110
|
+
}>;
|
|
111
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
112
|
+
next: z.ZodNullable<z.ZodString>;
|
|
89
113
|
}, z.core.$strip>, z.ZodObject<{
|
|
90
114
|
id: z.ZodString;
|
|
91
115
|
type: z.ZodLiteral<"entry">;
|
|
@@ -187,6 +211,30 @@ export declare const CreateLinkTemplateInputSchema: z.ZodObject<{
|
|
|
187
211
|
y: z.ZodNumber;
|
|
188
212
|
}, z.core.$strip>;
|
|
189
213
|
next: z.ZodNullable<z.ZodString>;
|
|
214
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
215
|
+
id: z.ZodString;
|
|
216
|
+
type: z.ZodLiteral<"countdown">;
|
|
217
|
+
position: z.ZodObject<{
|
|
218
|
+
x: z.ZodNumber;
|
|
219
|
+
y: z.ZodNumber;
|
|
220
|
+
}, z.core.$strip>;
|
|
221
|
+
seconds: z.ZodNumber;
|
|
222
|
+
message: z.ZodNullable<z.ZodString>;
|
|
223
|
+
next: z.ZodNullable<z.ZodString>;
|
|
224
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
225
|
+
id: z.ZodString;
|
|
226
|
+
type: z.ZodLiteral<"webhook">;
|
|
227
|
+
position: z.ZodObject<{
|
|
228
|
+
x: z.ZodNumber;
|
|
229
|
+
y: z.ZodNumber;
|
|
230
|
+
}, z.core.$strip>;
|
|
231
|
+
url: z.ZodString;
|
|
232
|
+
method: z.ZodEnum<{
|
|
233
|
+
POST: "POST";
|
|
234
|
+
GET: "GET";
|
|
235
|
+
}>;
|
|
236
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
237
|
+
next: z.ZodNullable<z.ZodString>;
|
|
190
238
|
}, z.core.$strip>, z.ZodObject<{
|
|
191
239
|
id: z.ZodString;
|
|
192
240
|
type: z.ZodLiteral<"entry">;
|
|
@@ -286,6 +334,30 @@ export declare const UpdateLinkTemplateInputSchema: z.ZodObject<{
|
|
|
286
334
|
y: z.ZodNumber;
|
|
287
335
|
}, z.core.$strip>;
|
|
288
336
|
next: z.ZodNullable<z.ZodString>;
|
|
337
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
338
|
+
id: z.ZodString;
|
|
339
|
+
type: z.ZodLiteral<"countdown">;
|
|
340
|
+
position: z.ZodObject<{
|
|
341
|
+
x: z.ZodNumber;
|
|
342
|
+
y: z.ZodNumber;
|
|
343
|
+
}, z.core.$strip>;
|
|
344
|
+
seconds: z.ZodNumber;
|
|
345
|
+
message: z.ZodNullable<z.ZodString>;
|
|
346
|
+
next: z.ZodNullable<z.ZodString>;
|
|
347
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
348
|
+
id: z.ZodString;
|
|
349
|
+
type: z.ZodLiteral<"webhook">;
|
|
350
|
+
position: z.ZodObject<{
|
|
351
|
+
x: z.ZodNumber;
|
|
352
|
+
y: z.ZodNumber;
|
|
353
|
+
}, z.core.$strip>;
|
|
354
|
+
url: z.ZodString;
|
|
355
|
+
method: z.ZodEnum<{
|
|
356
|
+
POST: "POST";
|
|
357
|
+
GET: "GET";
|
|
358
|
+
}>;
|
|
359
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
360
|
+
next: z.ZodNullable<z.ZodString>;
|
|
289
361
|
}, z.core.$strip>, z.ZodObject<{
|
|
290
362
|
id: z.ZodString;
|
|
291
363
|
type: z.ZodLiteral<"entry">;
|
|
@@ -393,6 +465,30 @@ export declare const PaginatedLinkTemplatesSchema: z.ZodObject<{
|
|
|
393
465
|
y: z.ZodNumber;
|
|
394
466
|
}, z.core.$strip>;
|
|
395
467
|
next: z.ZodNullable<z.ZodString>;
|
|
468
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
469
|
+
id: z.ZodString;
|
|
470
|
+
type: z.ZodLiteral<"countdown">;
|
|
471
|
+
position: z.ZodObject<{
|
|
472
|
+
x: z.ZodNumber;
|
|
473
|
+
y: z.ZodNumber;
|
|
474
|
+
}, z.core.$strip>;
|
|
475
|
+
seconds: z.ZodNumber;
|
|
476
|
+
message: z.ZodNullable<z.ZodString>;
|
|
477
|
+
next: z.ZodNullable<z.ZodString>;
|
|
478
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
479
|
+
id: z.ZodString;
|
|
480
|
+
type: z.ZodLiteral<"webhook">;
|
|
481
|
+
position: z.ZodObject<{
|
|
482
|
+
x: z.ZodNumber;
|
|
483
|
+
y: z.ZodNumber;
|
|
484
|
+
}, z.core.$strip>;
|
|
485
|
+
url: z.ZodString;
|
|
486
|
+
method: z.ZodEnum<{
|
|
487
|
+
POST: "POST";
|
|
488
|
+
GET: "GET";
|
|
489
|
+
}>;
|
|
490
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
491
|
+
next: z.ZodNullable<z.ZodString>;
|
|
396
492
|
}, z.core.$strip>, z.ZodObject<{
|
|
397
493
|
id: z.ZodString;
|
|
398
494
|
type: z.ZodLiteral<"entry">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-templates.schema.d.ts","sourceRoot":"","sources":["../../src/link-templates.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"link-templates.schema.d.ts","sourceRoot":"","sources":["../../src/link-templates.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQ7B,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIxC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIxC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;iBAIpC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMvC,CAAC"}
|
|
@@ -46,6 +46,7 @@ export declare const LinkSchema: z.ZodObject<{
|
|
|
46
46
|
click_count_updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
47
47
|
created_at: z.ZodCoercedDate<unknown>;
|
|
48
48
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
49
|
+
version: z.ZodNumber;
|
|
49
50
|
qr_code_settings: z.ZodNullable<z.ZodObject<{
|
|
50
51
|
fg_color: z.ZodString;
|
|
51
52
|
bg_color: z.ZodString;
|
|
@@ -74,10 +75,6 @@ export declare const LinkSchema: z.ZodObject<{
|
|
|
74
75
|
}, z.core.$strip>>;
|
|
75
76
|
qr_logo_key: z.ZodNullable<z.ZodString>;
|
|
76
77
|
logo_url: z.ZodNullable<z.ZodString>;
|
|
77
|
-
link_type: z.ZodDefault<z.ZodEnum<{
|
|
78
|
-
redirect: "redirect";
|
|
79
|
-
rules: "rules";
|
|
80
|
-
}>>;
|
|
81
78
|
rule_graph: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
82
79
|
entry: z.ZodString;
|
|
83
80
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -160,6 +157,30 @@ export declare const LinkSchema: z.ZodObject<{
|
|
|
160
157
|
y: z.ZodNumber;
|
|
161
158
|
}, z.core.$strip>;
|
|
162
159
|
next: z.ZodNullable<z.ZodString>;
|
|
160
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
161
|
+
id: z.ZodString;
|
|
162
|
+
type: z.ZodLiteral<"countdown">;
|
|
163
|
+
position: z.ZodObject<{
|
|
164
|
+
x: z.ZodNumber;
|
|
165
|
+
y: z.ZodNumber;
|
|
166
|
+
}, z.core.$strip>;
|
|
167
|
+
seconds: z.ZodNumber;
|
|
168
|
+
message: z.ZodNullable<z.ZodString>;
|
|
169
|
+
next: z.ZodNullable<z.ZodString>;
|
|
170
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
171
|
+
id: z.ZodString;
|
|
172
|
+
type: z.ZodLiteral<"webhook">;
|
|
173
|
+
position: z.ZodObject<{
|
|
174
|
+
x: z.ZodNumber;
|
|
175
|
+
y: z.ZodNumber;
|
|
176
|
+
}, z.core.$strip>;
|
|
177
|
+
url: z.ZodString;
|
|
178
|
+
method: z.ZodEnum<{
|
|
179
|
+
POST: "POST";
|
|
180
|
+
GET: "GET";
|
|
181
|
+
}>;
|
|
182
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
183
|
+
next: z.ZodNullable<z.ZodString>;
|
|
163
184
|
}, z.core.$strip>, z.ZodObject<{
|
|
164
185
|
id: z.ZodString;
|
|
165
186
|
type: z.ZodLiteral<"entry">;
|
|
@@ -222,10 +243,6 @@ export declare const CreateLinkInputSchema: z.ZodObject<{
|
|
|
222
243
|
logo_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
223
244
|
}, z.core.$strip>>>;
|
|
224
245
|
tag_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
225
|
-
link_type: z.ZodOptional<z.ZodEnum<{
|
|
226
|
-
redirect: "redirect";
|
|
227
|
-
rules: "rules";
|
|
228
|
-
}>>;
|
|
229
246
|
rule_graph: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
230
247
|
entry: z.ZodString;
|
|
231
248
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -308,6 +325,30 @@ export declare const CreateLinkInputSchema: z.ZodObject<{
|
|
|
308
325
|
y: z.ZodNumber;
|
|
309
326
|
}, z.core.$strip>;
|
|
310
327
|
next: z.ZodNullable<z.ZodString>;
|
|
328
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
329
|
+
id: z.ZodString;
|
|
330
|
+
type: z.ZodLiteral<"countdown">;
|
|
331
|
+
position: z.ZodObject<{
|
|
332
|
+
x: z.ZodNumber;
|
|
333
|
+
y: z.ZodNumber;
|
|
334
|
+
}, z.core.$strip>;
|
|
335
|
+
seconds: z.ZodNumber;
|
|
336
|
+
message: z.ZodNullable<z.ZodString>;
|
|
337
|
+
next: z.ZodNullable<z.ZodString>;
|
|
338
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
339
|
+
id: z.ZodString;
|
|
340
|
+
type: z.ZodLiteral<"webhook">;
|
|
341
|
+
position: z.ZodObject<{
|
|
342
|
+
x: z.ZodNumber;
|
|
343
|
+
y: z.ZodNumber;
|
|
344
|
+
}, z.core.$strip>;
|
|
345
|
+
url: z.ZodString;
|
|
346
|
+
method: z.ZodEnum<{
|
|
347
|
+
POST: "POST";
|
|
348
|
+
GET: "GET";
|
|
349
|
+
}>;
|
|
350
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
351
|
+
next: z.ZodNullable<z.ZodString>;
|
|
311
352
|
}, z.core.$strip>, z.ZodObject<{
|
|
312
353
|
id: z.ZodString;
|
|
313
354
|
type: z.ZodLiteral<"entry">;
|
|
@@ -363,10 +404,6 @@ export declare const UpdateLinkInputSchema: z.ZodObject<{
|
|
|
363
404
|
logo_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
364
405
|
}, z.core.$strip>>>;
|
|
365
406
|
tag_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
366
|
-
link_type: z.ZodOptional<z.ZodEnum<{
|
|
367
|
-
redirect: "redirect";
|
|
368
|
-
rules: "rules";
|
|
369
|
-
}>>;
|
|
370
407
|
rule_graph: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
371
408
|
entry: z.ZodString;
|
|
372
409
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -449,6 +486,30 @@ export declare const UpdateLinkInputSchema: z.ZodObject<{
|
|
|
449
486
|
y: z.ZodNumber;
|
|
450
487
|
}, z.core.$strip>;
|
|
451
488
|
next: z.ZodNullable<z.ZodString>;
|
|
489
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
490
|
+
id: z.ZodString;
|
|
491
|
+
type: z.ZodLiteral<"countdown">;
|
|
492
|
+
position: z.ZodObject<{
|
|
493
|
+
x: z.ZodNumber;
|
|
494
|
+
y: z.ZodNumber;
|
|
495
|
+
}, z.core.$strip>;
|
|
496
|
+
seconds: z.ZodNumber;
|
|
497
|
+
message: z.ZodNullable<z.ZodString>;
|
|
498
|
+
next: z.ZodNullable<z.ZodString>;
|
|
499
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
500
|
+
id: z.ZodString;
|
|
501
|
+
type: z.ZodLiteral<"webhook">;
|
|
502
|
+
position: z.ZodObject<{
|
|
503
|
+
x: z.ZodNumber;
|
|
504
|
+
y: z.ZodNumber;
|
|
505
|
+
}, z.core.$strip>;
|
|
506
|
+
url: z.ZodString;
|
|
507
|
+
method: z.ZodEnum<{
|
|
508
|
+
POST: "POST";
|
|
509
|
+
GET: "GET";
|
|
510
|
+
}>;
|
|
511
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
512
|
+
next: z.ZodNullable<z.ZodString>;
|
|
452
513
|
}, z.core.$strip>, z.ZodObject<{
|
|
453
514
|
id: z.ZodString;
|
|
454
515
|
type: z.ZodLiteral<"entry">;
|
|
@@ -529,6 +590,7 @@ export declare const PaginatedLinksSchema: z.ZodObject<{
|
|
|
529
590
|
click_count_updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
530
591
|
created_at: z.ZodCoercedDate<unknown>;
|
|
531
592
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
593
|
+
version: z.ZodNumber;
|
|
532
594
|
qr_code_settings: z.ZodNullable<z.ZodObject<{
|
|
533
595
|
fg_color: z.ZodString;
|
|
534
596
|
bg_color: z.ZodString;
|
|
@@ -557,10 +619,6 @@ export declare const PaginatedLinksSchema: z.ZodObject<{
|
|
|
557
619
|
}, z.core.$strip>>;
|
|
558
620
|
qr_logo_key: z.ZodNullable<z.ZodString>;
|
|
559
621
|
logo_url: z.ZodNullable<z.ZodString>;
|
|
560
|
-
link_type: z.ZodDefault<z.ZodEnum<{
|
|
561
|
-
redirect: "redirect";
|
|
562
|
-
rules: "rules";
|
|
563
|
-
}>>;
|
|
564
622
|
rule_graph: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
565
623
|
entry: z.ZodString;
|
|
566
624
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -643,6 +701,30 @@ export declare const PaginatedLinksSchema: z.ZodObject<{
|
|
|
643
701
|
y: z.ZodNumber;
|
|
644
702
|
}, z.core.$strip>;
|
|
645
703
|
next: z.ZodNullable<z.ZodString>;
|
|
704
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
705
|
+
id: z.ZodString;
|
|
706
|
+
type: z.ZodLiteral<"countdown">;
|
|
707
|
+
position: z.ZodObject<{
|
|
708
|
+
x: z.ZodNumber;
|
|
709
|
+
y: z.ZodNumber;
|
|
710
|
+
}, z.core.$strip>;
|
|
711
|
+
seconds: z.ZodNumber;
|
|
712
|
+
message: z.ZodNullable<z.ZodString>;
|
|
713
|
+
next: z.ZodNullable<z.ZodString>;
|
|
714
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
715
|
+
id: z.ZodString;
|
|
716
|
+
type: z.ZodLiteral<"webhook">;
|
|
717
|
+
position: z.ZodObject<{
|
|
718
|
+
x: z.ZodNumber;
|
|
719
|
+
y: z.ZodNumber;
|
|
720
|
+
}, z.core.$strip>;
|
|
721
|
+
url: z.ZodString;
|
|
722
|
+
method: z.ZodEnum<{
|
|
723
|
+
POST: "POST";
|
|
724
|
+
GET: "GET";
|
|
725
|
+
}>;
|
|
726
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
727
|
+
next: z.ZodNullable<z.ZodString>;
|
|
646
728
|
}, z.core.$strip>, z.ZodObject<{
|
|
647
729
|
id: z.ZodString;
|
|
648
730
|
type: z.ZodLiteral<"entry">;
|
|
@@ -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;AASxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;iBAW/B,CAAC;AAEH,eAAO,MAAM,UAAU
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;iBAW/B,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2BrB,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwBhC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyBhC,CAAC;AAMH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;iBAW5B,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;iBAAyD,CAAC;AAE/F,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAM/B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;iBAYxB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;iBAG/B,CAAC"}
|
|
@@ -79,6 +79,30 @@ export declare const RuleGraphNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
79
79
|
y: z.ZodNumber;
|
|
80
80
|
}, z.core.$strip>;
|
|
81
81
|
next: z.ZodNullable<z.ZodString>;
|
|
82
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
83
|
+
id: z.ZodString;
|
|
84
|
+
type: z.ZodLiteral<"countdown">;
|
|
85
|
+
position: z.ZodObject<{
|
|
86
|
+
x: z.ZodNumber;
|
|
87
|
+
y: z.ZodNumber;
|
|
88
|
+
}, z.core.$strip>;
|
|
89
|
+
seconds: z.ZodNumber;
|
|
90
|
+
message: z.ZodNullable<z.ZodString>;
|
|
91
|
+
next: z.ZodNullable<z.ZodString>;
|
|
92
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
93
|
+
id: z.ZodString;
|
|
94
|
+
type: z.ZodLiteral<"webhook">;
|
|
95
|
+
position: z.ZodObject<{
|
|
96
|
+
x: z.ZodNumber;
|
|
97
|
+
y: z.ZodNumber;
|
|
98
|
+
}, z.core.$strip>;
|
|
99
|
+
url: z.ZodString;
|
|
100
|
+
method: z.ZodEnum<{
|
|
101
|
+
POST: "POST";
|
|
102
|
+
GET: "GET";
|
|
103
|
+
}>;
|
|
104
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
105
|
+
next: z.ZodNullable<z.ZodString>;
|
|
82
106
|
}, z.core.$strip>, z.ZodObject<{
|
|
83
107
|
id: z.ZodString;
|
|
84
108
|
type: z.ZodLiteral<"entry">;
|
|
@@ -173,6 +197,30 @@ export declare const RuleGraphOutputSchema: z.ZodObject<{
|
|
|
173
197
|
y: z.ZodNumber;
|
|
174
198
|
}, z.core.$strip>;
|
|
175
199
|
next: z.ZodNullable<z.ZodString>;
|
|
200
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
201
|
+
id: z.ZodString;
|
|
202
|
+
type: z.ZodLiteral<"countdown">;
|
|
203
|
+
position: z.ZodObject<{
|
|
204
|
+
x: z.ZodNumber;
|
|
205
|
+
y: z.ZodNumber;
|
|
206
|
+
}, z.core.$strip>;
|
|
207
|
+
seconds: z.ZodNumber;
|
|
208
|
+
message: z.ZodNullable<z.ZodString>;
|
|
209
|
+
next: z.ZodNullable<z.ZodString>;
|
|
210
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
211
|
+
id: z.ZodString;
|
|
212
|
+
type: z.ZodLiteral<"webhook">;
|
|
213
|
+
position: z.ZodObject<{
|
|
214
|
+
x: z.ZodNumber;
|
|
215
|
+
y: z.ZodNumber;
|
|
216
|
+
}, z.core.$strip>;
|
|
217
|
+
url: z.ZodString;
|
|
218
|
+
method: z.ZodEnum<{
|
|
219
|
+
POST: "POST";
|
|
220
|
+
GET: "GET";
|
|
221
|
+
}>;
|
|
222
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
223
|
+
next: z.ZodNullable<z.ZodString>;
|
|
176
224
|
}, z.core.$strip>, z.ZodObject<{
|
|
177
225
|
id: z.ZodString;
|
|
178
226
|
type: z.ZodLiteral<"entry">;
|
|
@@ -268,6 +316,30 @@ export declare const RuleGraphSchema: z.ZodObject<{
|
|
|
268
316
|
y: z.ZodNumber;
|
|
269
317
|
}, z.core.$strip>;
|
|
270
318
|
next: z.ZodNullable<z.ZodString>;
|
|
319
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
320
|
+
id: z.ZodString;
|
|
321
|
+
type: z.ZodLiteral<"countdown">;
|
|
322
|
+
position: z.ZodObject<{
|
|
323
|
+
x: z.ZodNumber;
|
|
324
|
+
y: z.ZodNumber;
|
|
325
|
+
}, z.core.$strip>;
|
|
326
|
+
seconds: z.ZodNumber;
|
|
327
|
+
message: z.ZodNullable<z.ZodString>;
|
|
328
|
+
next: z.ZodNullable<z.ZodString>;
|
|
329
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
330
|
+
id: z.ZodString;
|
|
331
|
+
type: z.ZodLiteral<"webhook">;
|
|
332
|
+
position: z.ZodObject<{
|
|
333
|
+
x: z.ZodNumber;
|
|
334
|
+
y: z.ZodNumber;
|
|
335
|
+
}, z.core.$strip>;
|
|
336
|
+
url: z.ZodString;
|
|
337
|
+
method: z.ZodEnum<{
|
|
338
|
+
POST: "POST";
|
|
339
|
+
GET: "GET";
|
|
340
|
+
}>;
|
|
341
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
342
|
+
next: z.ZodNullable<z.ZodString>;
|
|
271
343
|
}, z.core.$strip>, z.ZodObject<{
|
|
272
344
|
id: z.ZodString;
|
|
273
345
|
type: z.ZodLiteral<"entry">;
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"rules.schema.d.ts","sourceRoot":"","sources":["../../src/rules.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0HxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAS9B,CAAC;AAOH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGhC,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuBvB,CAAC"}
|
package/package.json
CHANGED
package/src/links.schema.ts
CHANGED
|
@@ -41,78 +41,66 @@ export const LinkSchema = z.object({
|
|
|
41
41
|
click_count_updated_at: z.coerce.date().nullable(),
|
|
42
42
|
created_at: z.coerce.date(),
|
|
43
43
|
updated_at: z.coerce.date().nullable(),
|
|
44
|
+
version: z.number().int(),
|
|
44
45
|
qr_code_settings: QrCodeSettingsSchema.nullable(),
|
|
45
46
|
qr_logo_key: z.string().nullable(),
|
|
46
47
|
logo_url: z.string().nullable(),
|
|
47
|
-
link_type: z.enum(['redirect', 'rules']).default('redirect'),
|
|
48
48
|
rule_graph: RuleGraphOutputSchema.nullable().optional(),
|
|
49
49
|
tags: z.array(TagSchema),
|
|
50
50
|
});
|
|
51
51
|
|
|
52
|
-
export const CreateLinkInputSchema = z
|
|
53
|
-
.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
rule_graph: RuleGraphSchema.nullable().optional(),
|
|
78
|
-
})
|
|
79
|
-
.refine((data) => data.link_type !== 'rules' || data.rule_graph != null, {
|
|
80
|
-
message: 'rule_graph is required when link_type is "rules"',
|
|
81
|
-
path: ['rule_graph'],
|
|
82
|
-
});
|
|
52
|
+
export const CreateLinkInputSchema = z.object({
|
|
53
|
+
original_url: z.string().url().max(2048),
|
|
54
|
+
domain_id: z.string().uuid().optional(),
|
|
55
|
+
short_code: z
|
|
56
|
+
.string()
|
|
57
|
+
.min(3)
|
|
58
|
+
.max(50)
|
|
59
|
+
.regex(/^[a-zA-Z0-9-]+$/)
|
|
60
|
+
.optional(),
|
|
61
|
+
title: z.string().max(255).optional(),
|
|
62
|
+
description: z.string().max(2000).optional(),
|
|
63
|
+
utm_source: z.string().max(255).optional(),
|
|
64
|
+
utm_medium: z.string().max(255).optional(),
|
|
65
|
+
utm_campaign: z.string().max(255).optional(),
|
|
66
|
+
utm_term: z.string().max(255).optional(),
|
|
67
|
+
utm_content: z.string().max(255).optional(),
|
|
68
|
+
password: z.string().min(4).max(100).optional(),
|
|
69
|
+
redirect_type: z.coerce
|
|
70
|
+
.number()
|
|
71
|
+
.refine((v) => [301, 302, 307, 308].includes(v))
|
|
72
|
+
.optional(),
|
|
73
|
+
qr_code_settings: QrCodeSettingsSchema.nullable().optional(),
|
|
74
|
+
tag_ids: z.array(z.string().uuid()).optional(),
|
|
75
|
+
rule_graph: RuleGraphSchema.nullable().optional(),
|
|
76
|
+
});
|
|
83
77
|
|
|
84
|
-
export const UpdateLinkInputSchema = z
|
|
85
|
-
.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
rule_graph: RuleGraphSchema.nullable().optional(),
|
|
111
|
-
})
|
|
112
|
-
.refine((data) => data.link_type !== 'rules' || data.rule_graph != null, {
|
|
113
|
-
message: 'rule_graph is required when link_type is "rules"',
|
|
114
|
-
path: ['rule_graph'],
|
|
115
|
-
});
|
|
78
|
+
export const UpdateLinkInputSchema = z.object({
|
|
79
|
+
original_url: z.string().url().max(2048).optional(),
|
|
80
|
+
domain_id: z.string().uuid().optional(),
|
|
81
|
+
short_code: z
|
|
82
|
+
.string()
|
|
83
|
+
.min(3)
|
|
84
|
+
.max(50)
|
|
85
|
+
.regex(/^[a-zA-Z0-9-]+$/)
|
|
86
|
+
.optional(),
|
|
87
|
+
title: z.string().max(255).nullable().optional(),
|
|
88
|
+
description: z.string().max(2000).nullable().optional(),
|
|
89
|
+
utm_source: z.string().max(255).nullable().optional(),
|
|
90
|
+
utm_medium: z.string().max(255).nullable().optional(),
|
|
91
|
+
utm_campaign: z.string().max(255).nullable().optional(),
|
|
92
|
+
utm_term: z.string().max(255).nullable().optional(),
|
|
93
|
+
utm_content: z.string().max(255).nullable().optional(),
|
|
94
|
+
password: z.string().min(4).max(100).nullable().optional(),
|
|
95
|
+
is_active: z.boolean().optional(),
|
|
96
|
+
redirect_type: z.coerce
|
|
97
|
+
.number()
|
|
98
|
+
.refine((v) => [301, 302, 307, 308].includes(v))
|
|
99
|
+
.optional(),
|
|
100
|
+
qr_code_settings: QrCodeSettingsSchema.nullable().optional(),
|
|
101
|
+
tag_ids: z.array(z.string().uuid()).optional(),
|
|
102
|
+
rule_graph: RuleGraphSchema.nullable().optional(),
|
|
103
|
+
});
|
|
116
104
|
|
|
117
105
|
const stringToBoolean = z
|
|
118
106
|
.union([z.boolean(), z.enum(['true', 'false'])])
|