@middlewr/contracts 0.0.42 → 0.0.44
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 +8 -8
- package/dist/cjs/index.js +6 -6
- package/dist/cjs/link-templates.schema.d.ts +4 -4
- package/dist/cjs/rules.schema.d.ts +2 -2
- package/dist/cjs/rules.schema.d.ts.map +1 -1
- package/dist/esm/index.d.ts +8 -8
- package/dist/esm/index.js +6 -6
- package/dist/esm/link-templates.schema.d.ts +4 -4
- package/dist/esm/rules.schema.d.ts +2 -2
- package/dist/esm/rules.schema.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/link-templates.schema.ts +2 -2
- package/src/links.schema.ts +3 -3
- package/src/rules.schema.ts +1 -2
package/dist/cjs/index.d.ts
CHANGED
|
@@ -402,7 +402,7 @@ export declare const linkTemplatesContract: {
|
|
|
402
402
|
workspace_id: z.ZodString;
|
|
403
403
|
title: z.ZodString;
|
|
404
404
|
description: z.ZodOptional<z.ZodString>;
|
|
405
|
-
rule_graph: z.ZodNullable<z.ZodObject<{
|
|
405
|
+
rule_graph: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
406
406
|
entry: z.ZodString;
|
|
407
407
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
408
408
|
id: z.ZodString;
|
|
@@ -485,7 +485,7 @@ export declare const linkTemplatesContract: {
|
|
|
485
485
|
}, z.core.$strip>;
|
|
486
486
|
next: z.ZodNullable<z.ZodString>;
|
|
487
487
|
}, z.core.$strip>], "type">>;
|
|
488
|
-
}, z.core.$strip
|
|
488
|
+
}, z.core.$strip>>>;
|
|
489
489
|
}, z.core.$strip>, z.ZodObject<{
|
|
490
490
|
id: z.ZodString;
|
|
491
491
|
workspace_id: z.ZodString;
|
|
@@ -781,7 +781,7 @@ export declare const linkTemplatesContract: {
|
|
|
781
781
|
link_template_id: z.ZodString;
|
|
782
782
|
title: z.ZodOptional<z.ZodString>;
|
|
783
783
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
784
|
-
rule_graph: z.ZodOptional<z.
|
|
784
|
+
rule_graph: z.ZodOptional<z.ZodObject<{
|
|
785
785
|
entry: z.ZodString;
|
|
786
786
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
787
787
|
id: z.ZodString;
|
|
@@ -864,7 +864,7 @@ export declare const linkTemplatesContract: {
|
|
|
864
864
|
}, z.core.$strip>;
|
|
865
865
|
next: z.ZodNullable<z.ZodString>;
|
|
866
866
|
}, z.core.$strip>], "type">>;
|
|
867
|
-
}, z.core.$strip
|
|
867
|
+
}, z.core.$strip>>;
|
|
868
868
|
}, z.core.$strip>, z.ZodObject<{
|
|
869
869
|
id: z.ZodString;
|
|
870
870
|
workspace_id: z.ZodString;
|
|
@@ -2871,7 +2871,7 @@ export declare const contract: {
|
|
|
2871
2871
|
workspace_id: z.ZodString;
|
|
2872
2872
|
title: z.ZodString;
|
|
2873
2873
|
description: z.ZodOptional<z.ZodString>;
|
|
2874
|
-
rule_graph: z.ZodNullable<z.ZodObject<{
|
|
2874
|
+
rule_graph: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2875
2875
|
entry: z.ZodString;
|
|
2876
2876
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2877
2877
|
id: z.ZodString;
|
|
@@ -2954,7 +2954,7 @@ export declare const contract: {
|
|
|
2954
2954
|
}, z.core.$strip>;
|
|
2955
2955
|
next: z.ZodNullable<z.ZodString>;
|
|
2956
2956
|
}, z.core.$strip>], "type">>;
|
|
2957
|
-
}, z.core.$strip
|
|
2957
|
+
}, z.core.$strip>>>;
|
|
2958
2958
|
}, z.core.$strip>, z.ZodObject<{
|
|
2959
2959
|
id: z.ZodString;
|
|
2960
2960
|
workspace_id: z.ZodString;
|
|
@@ -3250,7 +3250,7 @@ export declare const contract: {
|
|
|
3250
3250
|
link_template_id: z.ZodString;
|
|
3251
3251
|
title: z.ZodOptional<z.ZodString>;
|
|
3252
3252
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3253
|
-
rule_graph: z.ZodOptional<z.
|
|
3253
|
+
rule_graph: z.ZodOptional<z.ZodObject<{
|
|
3254
3254
|
entry: z.ZodString;
|
|
3255
3255
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3256
3256
|
id: z.ZodString;
|
|
@@ -3333,7 +3333,7 @@ export declare const contract: {
|
|
|
3333
3333
|
}, z.core.$strip>;
|
|
3334
3334
|
next: z.ZodNullable<z.ZodString>;
|
|
3335
3335
|
}, z.core.$strip>], "type">>;
|
|
3336
|
-
}, z.core.$strip
|
|
3336
|
+
}, z.core.$strip>>;
|
|
3337
3337
|
}, z.core.$strip>, z.ZodObject<{
|
|
3338
3338
|
id: z.ZodString;
|
|
3339
3339
|
workspace_id: z.ZodString;
|
package/dist/cjs/index.js
CHANGED
|
@@ -385,7 +385,7 @@ var RuleGraphSchema = import_zod6.z.object({
|
|
|
385
385
|
}).refine((data) => data.nodes[data.entry] !== void 0, {
|
|
386
386
|
message: "Entry node must reference an existing node in the graph",
|
|
387
387
|
path: ["entry"]
|
|
388
|
-
})
|
|
388
|
+
});
|
|
389
389
|
|
|
390
390
|
// src/link-templates.schema.ts
|
|
391
391
|
var LinkTemplateSchema = import_zod7.z.object({
|
|
@@ -393,14 +393,14 @@ var LinkTemplateSchema = import_zod7.z.object({
|
|
|
393
393
|
workspace_id: import_zod7.z.string().uuid(),
|
|
394
394
|
title: import_zod7.z.string(),
|
|
395
395
|
description: import_zod7.z.string().nullable(),
|
|
396
|
-
rule_graph: RuleGraphSchema,
|
|
396
|
+
rule_graph: RuleGraphSchema.nullable(),
|
|
397
397
|
created_at: import_zod7.z.coerce.date(),
|
|
398
398
|
updated_at: import_zod7.z.coerce.date().nullable()
|
|
399
399
|
});
|
|
400
400
|
var CreateLinkTemplateInputSchema = import_zod7.z.object({
|
|
401
401
|
title: import_zod7.z.string().min(1).max(255),
|
|
402
402
|
description: import_zod7.z.string().max(2e3).optional(),
|
|
403
|
-
rule_graph: RuleGraphSchema
|
|
403
|
+
rule_graph: RuleGraphSchema.nullable().optional()
|
|
404
404
|
});
|
|
405
405
|
var UpdateLinkTemplateInputSchema = import_zod7.z.object({
|
|
406
406
|
title: import_zod7.z.string().min(1).max(255).optional(),
|
|
@@ -486,7 +486,7 @@ var LinkSchema = import_zod9.z.object({
|
|
|
486
486
|
qr_logo_key: import_zod9.z.string().nullable(),
|
|
487
487
|
logo_url: import_zod9.z.string().nullable(),
|
|
488
488
|
link_type: import_zod9.z.enum(["redirect", "rules"]).default("redirect"),
|
|
489
|
-
rule_graph: RuleGraphSchema.optional(),
|
|
489
|
+
rule_graph: RuleGraphSchema.nullable().optional(),
|
|
490
490
|
tags: import_zod9.z.array(TagSchema)
|
|
491
491
|
});
|
|
492
492
|
var CreateLinkInputSchema = import_zod9.z.object({
|
|
@@ -508,7 +508,7 @@ var CreateLinkInputSchema = import_zod9.z.object({
|
|
|
508
508
|
qr_code_settings: QrCodeSettingsSchema.nullable().optional(),
|
|
509
509
|
tag_ids: import_zod9.z.array(import_zod9.z.string().uuid()).optional(),
|
|
510
510
|
link_type: import_zod9.z.enum(["redirect", "rules"]).optional(),
|
|
511
|
-
rule_graph: RuleGraphSchema.optional()
|
|
511
|
+
rule_graph: RuleGraphSchema.nullable().optional()
|
|
512
512
|
}).refine((data) => data.link_type !== "rules" || data.rule_graph != null, {
|
|
513
513
|
message: 'rule_graph is required when link_type is "rules"',
|
|
514
514
|
path: ["rule_graph"]
|
|
@@ -533,7 +533,7 @@ var UpdateLinkInputSchema = import_zod9.z.object({
|
|
|
533
533
|
qr_code_settings: QrCodeSettingsSchema.nullable().optional(),
|
|
534
534
|
tag_ids: import_zod9.z.array(import_zod9.z.string().uuid()).optional(),
|
|
535
535
|
link_type: import_zod9.z.enum(["redirect", "rules"]).optional(),
|
|
536
|
-
rule_graph: RuleGraphSchema.optional()
|
|
536
|
+
rule_graph: RuleGraphSchema.nullable().optional()
|
|
537
537
|
}).refine((data) => data.link_type !== "rules" || data.rule_graph != null, {
|
|
538
538
|
message: 'rule_graph is required when link_type is "rules"',
|
|
539
539
|
path: ["rule_graph"]
|
|
@@ -94,7 +94,7 @@ export declare const LinkTemplateSchema: z.ZodObject<{
|
|
|
94
94
|
export declare const CreateLinkTemplateInputSchema: z.ZodObject<{
|
|
95
95
|
title: z.ZodString;
|
|
96
96
|
description: z.ZodOptional<z.ZodString>;
|
|
97
|
-
rule_graph: z.ZodNullable<z.ZodObject<{
|
|
97
|
+
rule_graph: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
98
98
|
entry: z.ZodString;
|
|
99
99
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
100
100
|
id: z.ZodString;
|
|
@@ -177,12 +177,12 @@ export declare const CreateLinkTemplateInputSchema: z.ZodObject<{
|
|
|
177
177
|
}, z.core.$strip>;
|
|
178
178
|
next: z.ZodNullable<z.ZodString>;
|
|
179
179
|
}, z.core.$strip>], "type">>;
|
|
180
|
-
}, z.core.$strip
|
|
180
|
+
}, z.core.$strip>>>;
|
|
181
181
|
}, z.core.$strip>;
|
|
182
182
|
export declare const UpdateLinkTemplateInputSchema: z.ZodObject<{
|
|
183
183
|
title: z.ZodOptional<z.ZodString>;
|
|
184
184
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
185
|
-
rule_graph: z.ZodOptional<z.
|
|
185
|
+
rule_graph: z.ZodOptional<z.ZodObject<{
|
|
186
186
|
entry: z.ZodString;
|
|
187
187
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
188
188
|
id: z.ZodString;
|
|
@@ -265,7 +265,7 @@ export declare const UpdateLinkTemplateInputSchema: z.ZodObject<{
|
|
|
265
265
|
}, z.core.$strip>;
|
|
266
266
|
next: z.ZodNullable<z.ZodString>;
|
|
267
267
|
}, z.core.$strip>], "type">>;
|
|
268
|
-
}, z.core.$strip
|
|
268
|
+
}, z.core.$strip>>;
|
|
269
269
|
}, z.core.$strip>;
|
|
270
270
|
export declare const LinkTemplateFiltersSchema: z.ZodObject<{
|
|
271
271
|
search: z.ZodOptional<z.ZodString>;
|
|
@@ -80,7 +80,7 @@ export declare const RuleGraphNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
80
80
|
}, z.core.$strip>;
|
|
81
81
|
next: z.ZodNullable<z.ZodString>;
|
|
82
82
|
}, z.core.$strip>], "type">;
|
|
83
|
-
export declare const RuleGraphSchema: z.
|
|
83
|
+
export declare const RuleGraphSchema: z.ZodObject<{
|
|
84
84
|
entry: z.ZodString;
|
|
85
85
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
86
86
|
id: z.ZodString;
|
|
@@ -163,5 +163,5 @@ export declare const RuleGraphSchema: z.ZodNullable<z.ZodObject<{
|
|
|
163
163
|
}, z.core.$strip>;
|
|
164
164
|
next: z.ZodNullable<z.ZodString>;
|
|
165
165
|
}, z.core.$strip>], "type">>;
|
|
166
|
-
}, z.core.$strip
|
|
166
|
+
}, z.core.$strip>;
|
|
167
167
|
//# sourceMappingURL=rules.schema.d.ts.map
|
|
@@ -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;AAwFxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAM9B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"rules.schema.d.ts","sourceRoot":"","sources":["../../src/rules.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwFxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAM9B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQtB,CAAC"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -402,7 +402,7 @@ export declare const linkTemplatesContract: {
|
|
|
402
402
|
workspace_id: z.ZodString;
|
|
403
403
|
title: z.ZodString;
|
|
404
404
|
description: z.ZodOptional<z.ZodString>;
|
|
405
|
-
rule_graph: z.ZodNullable<z.ZodObject<{
|
|
405
|
+
rule_graph: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
406
406
|
entry: z.ZodString;
|
|
407
407
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
408
408
|
id: z.ZodString;
|
|
@@ -485,7 +485,7 @@ export declare const linkTemplatesContract: {
|
|
|
485
485
|
}, z.core.$strip>;
|
|
486
486
|
next: z.ZodNullable<z.ZodString>;
|
|
487
487
|
}, z.core.$strip>], "type">>;
|
|
488
|
-
}, z.core.$strip
|
|
488
|
+
}, z.core.$strip>>>;
|
|
489
489
|
}, z.core.$strip>, z.ZodObject<{
|
|
490
490
|
id: z.ZodString;
|
|
491
491
|
workspace_id: z.ZodString;
|
|
@@ -781,7 +781,7 @@ export declare const linkTemplatesContract: {
|
|
|
781
781
|
link_template_id: z.ZodString;
|
|
782
782
|
title: z.ZodOptional<z.ZodString>;
|
|
783
783
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
784
|
-
rule_graph: z.ZodOptional<z.
|
|
784
|
+
rule_graph: z.ZodOptional<z.ZodObject<{
|
|
785
785
|
entry: z.ZodString;
|
|
786
786
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
787
787
|
id: z.ZodString;
|
|
@@ -864,7 +864,7 @@ export declare const linkTemplatesContract: {
|
|
|
864
864
|
}, z.core.$strip>;
|
|
865
865
|
next: z.ZodNullable<z.ZodString>;
|
|
866
866
|
}, z.core.$strip>], "type">>;
|
|
867
|
-
}, z.core.$strip
|
|
867
|
+
}, z.core.$strip>>;
|
|
868
868
|
}, z.core.$strip>, z.ZodObject<{
|
|
869
869
|
id: z.ZodString;
|
|
870
870
|
workspace_id: z.ZodString;
|
|
@@ -2871,7 +2871,7 @@ export declare const contract: {
|
|
|
2871
2871
|
workspace_id: z.ZodString;
|
|
2872
2872
|
title: z.ZodString;
|
|
2873
2873
|
description: z.ZodOptional<z.ZodString>;
|
|
2874
|
-
rule_graph: z.ZodNullable<z.ZodObject<{
|
|
2874
|
+
rule_graph: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2875
2875
|
entry: z.ZodString;
|
|
2876
2876
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2877
2877
|
id: z.ZodString;
|
|
@@ -2954,7 +2954,7 @@ export declare const contract: {
|
|
|
2954
2954
|
}, z.core.$strip>;
|
|
2955
2955
|
next: z.ZodNullable<z.ZodString>;
|
|
2956
2956
|
}, z.core.$strip>], "type">>;
|
|
2957
|
-
}, z.core.$strip
|
|
2957
|
+
}, z.core.$strip>>>;
|
|
2958
2958
|
}, z.core.$strip>, z.ZodObject<{
|
|
2959
2959
|
id: z.ZodString;
|
|
2960
2960
|
workspace_id: z.ZodString;
|
|
@@ -3250,7 +3250,7 @@ export declare const contract: {
|
|
|
3250
3250
|
link_template_id: z.ZodString;
|
|
3251
3251
|
title: z.ZodOptional<z.ZodString>;
|
|
3252
3252
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3253
|
-
rule_graph: z.ZodOptional<z.
|
|
3253
|
+
rule_graph: z.ZodOptional<z.ZodObject<{
|
|
3254
3254
|
entry: z.ZodString;
|
|
3255
3255
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3256
3256
|
id: z.ZodString;
|
|
@@ -3333,7 +3333,7 @@ export declare const contract: {
|
|
|
3333
3333
|
}, z.core.$strip>;
|
|
3334
3334
|
next: z.ZodNullable<z.ZodString>;
|
|
3335
3335
|
}, z.core.$strip>], "type">>;
|
|
3336
|
-
}, z.core.$strip
|
|
3336
|
+
}, z.core.$strip>>;
|
|
3337
3337
|
}, z.core.$strip>, z.ZodObject<{
|
|
3338
3338
|
id: z.ZodString;
|
|
3339
3339
|
workspace_id: z.ZodString;
|
package/dist/esm/index.js
CHANGED
|
@@ -285,7 +285,7 @@ var RuleGraphSchema = z6.object({
|
|
|
285
285
|
}).refine((data) => data.nodes[data.entry] !== void 0, {
|
|
286
286
|
message: "Entry node must reference an existing node in the graph",
|
|
287
287
|
path: ["entry"]
|
|
288
|
-
})
|
|
288
|
+
});
|
|
289
289
|
|
|
290
290
|
// src/link-templates.schema.ts
|
|
291
291
|
var LinkTemplateSchema = z7.object({
|
|
@@ -293,14 +293,14 @@ var LinkTemplateSchema = z7.object({
|
|
|
293
293
|
workspace_id: z7.string().uuid(),
|
|
294
294
|
title: z7.string(),
|
|
295
295
|
description: z7.string().nullable(),
|
|
296
|
-
rule_graph: RuleGraphSchema,
|
|
296
|
+
rule_graph: RuleGraphSchema.nullable(),
|
|
297
297
|
created_at: z7.coerce.date(),
|
|
298
298
|
updated_at: z7.coerce.date().nullable()
|
|
299
299
|
});
|
|
300
300
|
var CreateLinkTemplateInputSchema = z7.object({
|
|
301
301
|
title: z7.string().min(1).max(255),
|
|
302
302
|
description: z7.string().max(2e3).optional(),
|
|
303
|
-
rule_graph: RuleGraphSchema
|
|
303
|
+
rule_graph: RuleGraphSchema.nullable().optional()
|
|
304
304
|
});
|
|
305
305
|
var UpdateLinkTemplateInputSchema = z7.object({
|
|
306
306
|
title: z7.string().min(1).max(255).optional(),
|
|
@@ -386,7 +386,7 @@ var LinkSchema = z9.object({
|
|
|
386
386
|
qr_logo_key: z9.string().nullable(),
|
|
387
387
|
logo_url: z9.string().nullable(),
|
|
388
388
|
link_type: z9.enum(["redirect", "rules"]).default("redirect"),
|
|
389
|
-
rule_graph: RuleGraphSchema.optional(),
|
|
389
|
+
rule_graph: RuleGraphSchema.nullable().optional(),
|
|
390
390
|
tags: z9.array(TagSchema)
|
|
391
391
|
});
|
|
392
392
|
var CreateLinkInputSchema = z9.object({
|
|
@@ -408,7 +408,7 @@ var CreateLinkInputSchema = z9.object({
|
|
|
408
408
|
qr_code_settings: QrCodeSettingsSchema.nullable().optional(),
|
|
409
409
|
tag_ids: z9.array(z9.string().uuid()).optional(),
|
|
410
410
|
link_type: z9.enum(["redirect", "rules"]).optional(),
|
|
411
|
-
rule_graph: RuleGraphSchema.optional()
|
|
411
|
+
rule_graph: RuleGraphSchema.nullable().optional()
|
|
412
412
|
}).refine((data) => data.link_type !== "rules" || data.rule_graph != null, {
|
|
413
413
|
message: 'rule_graph is required when link_type is "rules"',
|
|
414
414
|
path: ["rule_graph"]
|
|
@@ -433,7 +433,7 @@ var UpdateLinkInputSchema = z9.object({
|
|
|
433
433
|
qr_code_settings: QrCodeSettingsSchema.nullable().optional(),
|
|
434
434
|
tag_ids: z9.array(z9.string().uuid()).optional(),
|
|
435
435
|
link_type: z9.enum(["redirect", "rules"]).optional(),
|
|
436
|
-
rule_graph: RuleGraphSchema.optional()
|
|
436
|
+
rule_graph: RuleGraphSchema.nullable().optional()
|
|
437
437
|
}).refine((data) => data.link_type !== "rules" || data.rule_graph != null, {
|
|
438
438
|
message: 'rule_graph is required when link_type is "rules"',
|
|
439
439
|
path: ["rule_graph"]
|
|
@@ -94,7 +94,7 @@ export declare const LinkTemplateSchema: z.ZodObject<{
|
|
|
94
94
|
export declare const CreateLinkTemplateInputSchema: z.ZodObject<{
|
|
95
95
|
title: z.ZodString;
|
|
96
96
|
description: z.ZodOptional<z.ZodString>;
|
|
97
|
-
rule_graph: z.ZodNullable<z.ZodObject<{
|
|
97
|
+
rule_graph: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
98
98
|
entry: z.ZodString;
|
|
99
99
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
100
100
|
id: z.ZodString;
|
|
@@ -177,12 +177,12 @@ export declare const CreateLinkTemplateInputSchema: z.ZodObject<{
|
|
|
177
177
|
}, z.core.$strip>;
|
|
178
178
|
next: z.ZodNullable<z.ZodString>;
|
|
179
179
|
}, z.core.$strip>], "type">>;
|
|
180
|
-
}, z.core.$strip
|
|
180
|
+
}, z.core.$strip>>>;
|
|
181
181
|
}, z.core.$strip>;
|
|
182
182
|
export declare const UpdateLinkTemplateInputSchema: z.ZodObject<{
|
|
183
183
|
title: z.ZodOptional<z.ZodString>;
|
|
184
184
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
185
|
-
rule_graph: z.ZodOptional<z.
|
|
185
|
+
rule_graph: z.ZodOptional<z.ZodObject<{
|
|
186
186
|
entry: z.ZodString;
|
|
187
187
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
188
188
|
id: z.ZodString;
|
|
@@ -265,7 +265,7 @@ export declare const UpdateLinkTemplateInputSchema: z.ZodObject<{
|
|
|
265
265
|
}, z.core.$strip>;
|
|
266
266
|
next: z.ZodNullable<z.ZodString>;
|
|
267
267
|
}, z.core.$strip>], "type">>;
|
|
268
|
-
}, z.core.$strip
|
|
268
|
+
}, z.core.$strip>>;
|
|
269
269
|
}, z.core.$strip>;
|
|
270
270
|
export declare const LinkTemplateFiltersSchema: z.ZodObject<{
|
|
271
271
|
search: z.ZodOptional<z.ZodString>;
|
|
@@ -80,7 +80,7 @@ export declare const RuleGraphNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
80
80
|
}, z.core.$strip>;
|
|
81
81
|
next: z.ZodNullable<z.ZodString>;
|
|
82
82
|
}, z.core.$strip>], "type">;
|
|
83
|
-
export declare const RuleGraphSchema: z.
|
|
83
|
+
export declare const RuleGraphSchema: z.ZodObject<{
|
|
84
84
|
entry: z.ZodString;
|
|
85
85
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
86
86
|
id: z.ZodString;
|
|
@@ -163,5 +163,5 @@ export declare const RuleGraphSchema: z.ZodNullable<z.ZodObject<{
|
|
|
163
163
|
}, z.core.$strip>;
|
|
164
164
|
next: z.ZodNullable<z.ZodString>;
|
|
165
165
|
}, z.core.$strip>], "type">>;
|
|
166
|
-
}, z.core.$strip
|
|
166
|
+
}, z.core.$strip>;
|
|
167
167
|
//# sourceMappingURL=rules.schema.d.ts.map
|
|
@@ -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;AAwFxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAM9B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"rules.schema.d.ts","sourceRoot":"","sources":["../../src/rules.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwFxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAM9B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQtB,CAAC"}
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ export const LinkTemplateSchema = z.object({
|
|
|
7
7
|
workspace_id: z.string().uuid(),
|
|
8
8
|
title: z.string(),
|
|
9
9
|
description: z.string().nullable(),
|
|
10
|
-
rule_graph: RuleGraphSchema,
|
|
10
|
+
rule_graph: RuleGraphSchema.nullable(),
|
|
11
11
|
created_at: z.coerce.date(),
|
|
12
12
|
updated_at: z.coerce.date().nullable(),
|
|
13
13
|
});
|
|
@@ -15,7 +15,7 @@ export const LinkTemplateSchema = z.object({
|
|
|
15
15
|
export const CreateLinkTemplateInputSchema = z.object({
|
|
16
16
|
title: z.string().min(1).max(255),
|
|
17
17
|
description: z.string().max(2000).optional(),
|
|
18
|
-
rule_graph: RuleGraphSchema,
|
|
18
|
+
rule_graph: RuleGraphSchema.nullable().optional(),
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
export const UpdateLinkTemplateInputSchema = z.object({
|
package/src/links.schema.ts
CHANGED
|
@@ -48,7 +48,7 @@ export const LinkSchema = z.object({
|
|
|
48
48
|
qr_logo_key: z.string().nullable(),
|
|
49
49
|
logo_url: z.string().nullable(),
|
|
50
50
|
link_type: z.enum(['redirect', 'rules']).default('redirect'),
|
|
51
|
-
rule_graph: RuleGraphSchema.optional(),
|
|
51
|
+
rule_graph: RuleGraphSchema.nullable().optional(),
|
|
52
52
|
tags: z.array(TagSchema),
|
|
53
53
|
});
|
|
54
54
|
|
|
@@ -80,7 +80,7 @@ export const CreateLinkInputSchema = z
|
|
|
80
80
|
qr_code_settings: QrCodeSettingsSchema.nullable().optional(),
|
|
81
81
|
tag_ids: z.array(z.string().uuid()).optional(),
|
|
82
82
|
link_type: z.enum(['redirect', 'rules']).optional(),
|
|
83
|
-
rule_graph: RuleGraphSchema.optional(),
|
|
83
|
+
rule_graph: RuleGraphSchema.nullable().optional(),
|
|
84
84
|
})
|
|
85
85
|
.refine((data) => data.link_type !== 'rules' || data.rule_graph != null, {
|
|
86
86
|
message: 'rule_graph is required when link_type is "rules"',
|
|
@@ -116,7 +116,7 @@ export const UpdateLinkInputSchema = z
|
|
|
116
116
|
qr_code_settings: QrCodeSettingsSchema.nullable().optional(),
|
|
117
117
|
tag_ids: z.array(z.string().uuid()).optional(),
|
|
118
118
|
link_type: z.enum(['redirect', 'rules']).optional(),
|
|
119
|
-
rule_graph: RuleGraphSchema.optional(),
|
|
119
|
+
rule_graph: RuleGraphSchema.nullable().optional(),
|
|
120
120
|
})
|
|
121
121
|
.refine((data) => data.link_type !== 'rules' || data.rule_graph != null, {
|
|
122
122
|
message: 'rule_graph is required when link_type is "rules"',
|
package/src/rules.schema.ts
CHANGED