@middlewr/contracts 0.0.42 → 0.0.43
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 +24 -24
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/link-templates.schema.d.ts +8 -8
- 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 +24 -24
- package/dist/esm/index.js +4 -4
- package/dist/esm/link-templates.schema.d.ts +8 -8
- 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/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.
|
|
405
|
+
rule_graph: z.ZodObject<{
|
|
406
406
|
entry: z.ZodString;
|
|
407
407
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
408
408
|
id: z.ZodString;
|
|
@@ -485,13 +485,13 @@ 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;
|
|
492
492
|
title: z.ZodString;
|
|
493
493
|
description: z.ZodNullable<z.ZodString>;
|
|
494
|
-
rule_graph: z.
|
|
494
|
+
rule_graph: z.ZodObject<{
|
|
495
495
|
entry: z.ZodString;
|
|
496
496
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
497
497
|
id: z.ZodString;
|
|
@@ -574,7 +574,7 @@ export declare const linkTemplatesContract: {
|
|
|
574
574
|
}, z.core.$strip>;
|
|
575
575
|
next: z.ZodNullable<z.ZodString>;
|
|
576
576
|
}, z.core.$strip>], "type">>;
|
|
577
|
-
}, z.core.$strip
|
|
577
|
+
}, z.core.$strip>;
|
|
578
578
|
created_at: z.ZodCoercedDate<unknown>;
|
|
579
579
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
580
580
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -589,7 +589,7 @@ export declare const linkTemplatesContract: {
|
|
|
589
589
|
workspace_id: z.ZodString;
|
|
590
590
|
title: z.ZodString;
|
|
591
591
|
description: z.ZodNullable<z.ZodString>;
|
|
592
|
-
rule_graph: z.
|
|
592
|
+
rule_graph: z.ZodObject<{
|
|
593
593
|
entry: z.ZodString;
|
|
594
594
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
595
595
|
id: z.ZodString;
|
|
@@ -672,7 +672,7 @@ export declare const linkTemplatesContract: {
|
|
|
672
672
|
}, z.core.$strip>;
|
|
673
673
|
next: z.ZodNullable<z.ZodString>;
|
|
674
674
|
}, z.core.$strip>], "type">>;
|
|
675
|
-
}, z.core.$strip
|
|
675
|
+
}, z.core.$strip>;
|
|
676
676
|
created_at: z.ZodCoercedDate<unknown>;
|
|
677
677
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
678
678
|
}, z.core.$strip>>;
|
|
@@ -689,7 +689,7 @@ export declare const linkTemplatesContract: {
|
|
|
689
689
|
workspace_id: z.ZodString;
|
|
690
690
|
title: z.ZodString;
|
|
691
691
|
description: z.ZodNullable<z.ZodString>;
|
|
692
|
-
rule_graph: z.
|
|
692
|
+
rule_graph: z.ZodObject<{
|
|
693
693
|
entry: z.ZodString;
|
|
694
694
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
695
695
|
id: z.ZodString;
|
|
@@ -772,7 +772,7 @@ export declare const linkTemplatesContract: {
|
|
|
772
772
|
}, z.core.$strip>;
|
|
773
773
|
next: z.ZodNullable<z.ZodString>;
|
|
774
774
|
}, z.core.$strip>], "type">>;
|
|
775
|
-
}, z.core.$strip
|
|
775
|
+
}, z.core.$strip>;
|
|
776
776
|
created_at: z.ZodCoercedDate<unknown>;
|
|
777
777
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
778
778
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -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,13 +864,13 @@ 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;
|
|
871
871
|
title: z.ZodString;
|
|
872
872
|
description: z.ZodNullable<z.ZodString>;
|
|
873
|
-
rule_graph: z.
|
|
873
|
+
rule_graph: z.ZodObject<{
|
|
874
874
|
entry: z.ZodString;
|
|
875
875
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
876
876
|
id: z.ZodString;
|
|
@@ -953,7 +953,7 @@ export declare const linkTemplatesContract: {
|
|
|
953
953
|
}, z.core.$strip>;
|
|
954
954
|
next: z.ZodNullable<z.ZodString>;
|
|
955
955
|
}, z.core.$strip>], "type">>;
|
|
956
|
-
}, z.core.$strip
|
|
956
|
+
}, z.core.$strip>;
|
|
957
957
|
created_at: z.ZodCoercedDate<unknown>;
|
|
958
958
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
959
959
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -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.
|
|
2874
|
+
rule_graph: z.ZodObject<{
|
|
2875
2875
|
entry: z.ZodString;
|
|
2876
2876
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2877
2877
|
id: z.ZodString;
|
|
@@ -2954,13 +2954,13 @@ 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;
|
|
2961
2961
|
title: z.ZodString;
|
|
2962
2962
|
description: z.ZodNullable<z.ZodString>;
|
|
2963
|
-
rule_graph: z.
|
|
2963
|
+
rule_graph: z.ZodObject<{
|
|
2964
2964
|
entry: z.ZodString;
|
|
2965
2965
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2966
2966
|
id: z.ZodString;
|
|
@@ -3043,7 +3043,7 @@ export declare const contract: {
|
|
|
3043
3043
|
}, z.core.$strip>;
|
|
3044
3044
|
next: z.ZodNullable<z.ZodString>;
|
|
3045
3045
|
}, z.core.$strip>], "type">>;
|
|
3046
|
-
}, z.core.$strip
|
|
3046
|
+
}, z.core.$strip>;
|
|
3047
3047
|
created_at: z.ZodCoercedDate<unknown>;
|
|
3048
3048
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
3049
3049
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -3058,7 +3058,7 @@ export declare const contract: {
|
|
|
3058
3058
|
workspace_id: z.ZodString;
|
|
3059
3059
|
title: z.ZodString;
|
|
3060
3060
|
description: z.ZodNullable<z.ZodString>;
|
|
3061
|
-
rule_graph: z.
|
|
3061
|
+
rule_graph: z.ZodObject<{
|
|
3062
3062
|
entry: z.ZodString;
|
|
3063
3063
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3064
3064
|
id: z.ZodString;
|
|
@@ -3141,7 +3141,7 @@ export declare const contract: {
|
|
|
3141
3141
|
}, z.core.$strip>;
|
|
3142
3142
|
next: z.ZodNullable<z.ZodString>;
|
|
3143
3143
|
}, z.core.$strip>], "type">>;
|
|
3144
|
-
}, z.core.$strip
|
|
3144
|
+
}, z.core.$strip>;
|
|
3145
3145
|
created_at: z.ZodCoercedDate<unknown>;
|
|
3146
3146
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
3147
3147
|
}, z.core.$strip>>;
|
|
@@ -3158,7 +3158,7 @@ export declare const contract: {
|
|
|
3158
3158
|
workspace_id: z.ZodString;
|
|
3159
3159
|
title: z.ZodString;
|
|
3160
3160
|
description: z.ZodNullable<z.ZodString>;
|
|
3161
|
-
rule_graph: z.
|
|
3161
|
+
rule_graph: z.ZodObject<{
|
|
3162
3162
|
entry: z.ZodString;
|
|
3163
3163
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3164
3164
|
id: z.ZodString;
|
|
@@ -3241,7 +3241,7 @@ export declare const contract: {
|
|
|
3241
3241
|
}, z.core.$strip>;
|
|
3242
3242
|
next: z.ZodNullable<z.ZodString>;
|
|
3243
3243
|
}, z.core.$strip>], "type">>;
|
|
3244
|
-
}, z.core.$strip
|
|
3244
|
+
}, z.core.$strip>;
|
|
3245
3245
|
created_at: z.ZodCoercedDate<unknown>;
|
|
3246
3246
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
3247
3247
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -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,13 +3333,13 @@ 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;
|
|
3340
3340
|
title: z.ZodString;
|
|
3341
3341
|
description: z.ZodNullable<z.ZodString>;
|
|
3342
|
-
rule_graph: z.
|
|
3342
|
+
rule_graph: z.ZodObject<{
|
|
3343
3343
|
entry: z.ZodString;
|
|
3344
3344
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3345
3345
|
id: z.ZodString;
|
|
@@ -3422,7 +3422,7 @@ export declare const contract: {
|
|
|
3422
3422
|
}, z.core.$strip>;
|
|
3423
3423
|
next: z.ZodNullable<z.ZodString>;
|
|
3424
3424
|
}, z.core.$strip>], "type">>;
|
|
3425
|
-
}, z.core.$strip
|
|
3425
|
+
}, z.core.$strip>;
|
|
3426
3426
|
created_at: z.ZodCoercedDate<unknown>;
|
|
3427
3427
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
3428
3428
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
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({
|
|
@@ -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"]
|
|
@@ -4,7 +4,7 @@ export declare const LinkTemplateSchema: z.ZodObject<{
|
|
|
4
4
|
workspace_id: z.ZodString;
|
|
5
5
|
title: z.ZodString;
|
|
6
6
|
description: z.ZodNullable<z.ZodString>;
|
|
7
|
-
rule_graph: z.
|
|
7
|
+
rule_graph: z.ZodObject<{
|
|
8
8
|
entry: z.ZodString;
|
|
9
9
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
10
10
|
id: z.ZodString;
|
|
@@ -87,14 +87,14 @@ export declare const LinkTemplateSchema: z.ZodObject<{
|
|
|
87
87
|
}, z.core.$strip>;
|
|
88
88
|
next: z.ZodNullable<z.ZodString>;
|
|
89
89
|
}, z.core.$strip>], "type">>;
|
|
90
|
-
}, z.core.$strip
|
|
90
|
+
}, z.core.$strip>;
|
|
91
91
|
created_at: z.ZodCoercedDate<unknown>;
|
|
92
92
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
93
93
|
}, z.core.$strip>;
|
|
94
94
|
export declare const CreateLinkTemplateInputSchema: z.ZodObject<{
|
|
95
95
|
title: z.ZodString;
|
|
96
96
|
description: z.ZodOptional<z.ZodString>;
|
|
97
|
-
rule_graph: z.
|
|
97
|
+
rule_graph: 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>;
|
|
@@ -278,7 +278,7 @@ export declare const PaginatedLinkTemplatesSchema: z.ZodObject<{
|
|
|
278
278
|
workspace_id: z.ZodString;
|
|
279
279
|
title: z.ZodString;
|
|
280
280
|
description: z.ZodNullable<z.ZodString>;
|
|
281
|
-
rule_graph: z.
|
|
281
|
+
rule_graph: z.ZodObject<{
|
|
282
282
|
entry: z.ZodString;
|
|
283
283
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
284
284
|
id: z.ZodString;
|
|
@@ -361,7 +361,7 @@ export declare const PaginatedLinkTemplatesSchema: z.ZodObject<{
|
|
|
361
361
|
}, z.core.$strip>;
|
|
362
362
|
next: z.ZodNullable<z.ZodString>;
|
|
363
363
|
}, z.core.$strip>], "type">>;
|
|
364
|
-
}, z.core.$strip
|
|
364
|
+
}, z.core.$strip>;
|
|
365
365
|
created_at: z.ZodCoercedDate<unknown>;
|
|
366
366
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
367
367
|
}, z.core.$strip>>;
|
|
@@ -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.
|
|
405
|
+
rule_graph: z.ZodObject<{
|
|
406
406
|
entry: z.ZodString;
|
|
407
407
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
408
408
|
id: z.ZodString;
|
|
@@ -485,13 +485,13 @@ 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;
|
|
492
492
|
title: z.ZodString;
|
|
493
493
|
description: z.ZodNullable<z.ZodString>;
|
|
494
|
-
rule_graph: z.
|
|
494
|
+
rule_graph: z.ZodObject<{
|
|
495
495
|
entry: z.ZodString;
|
|
496
496
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
497
497
|
id: z.ZodString;
|
|
@@ -574,7 +574,7 @@ export declare const linkTemplatesContract: {
|
|
|
574
574
|
}, z.core.$strip>;
|
|
575
575
|
next: z.ZodNullable<z.ZodString>;
|
|
576
576
|
}, z.core.$strip>], "type">>;
|
|
577
|
-
}, z.core.$strip
|
|
577
|
+
}, z.core.$strip>;
|
|
578
578
|
created_at: z.ZodCoercedDate<unknown>;
|
|
579
579
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
580
580
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -589,7 +589,7 @@ export declare const linkTemplatesContract: {
|
|
|
589
589
|
workspace_id: z.ZodString;
|
|
590
590
|
title: z.ZodString;
|
|
591
591
|
description: z.ZodNullable<z.ZodString>;
|
|
592
|
-
rule_graph: z.
|
|
592
|
+
rule_graph: z.ZodObject<{
|
|
593
593
|
entry: z.ZodString;
|
|
594
594
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
595
595
|
id: z.ZodString;
|
|
@@ -672,7 +672,7 @@ export declare const linkTemplatesContract: {
|
|
|
672
672
|
}, z.core.$strip>;
|
|
673
673
|
next: z.ZodNullable<z.ZodString>;
|
|
674
674
|
}, z.core.$strip>], "type">>;
|
|
675
|
-
}, z.core.$strip
|
|
675
|
+
}, z.core.$strip>;
|
|
676
676
|
created_at: z.ZodCoercedDate<unknown>;
|
|
677
677
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
678
678
|
}, z.core.$strip>>;
|
|
@@ -689,7 +689,7 @@ export declare const linkTemplatesContract: {
|
|
|
689
689
|
workspace_id: z.ZodString;
|
|
690
690
|
title: z.ZodString;
|
|
691
691
|
description: z.ZodNullable<z.ZodString>;
|
|
692
|
-
rule_graph: z.
|
|
692
|
+
rule_graph: z.ZodObject<{
|
|
693
693
|
entry: z.ZodString;
|
|
694
694
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
695
695
|
id: z.ZodString;
|
|
@@ -772,7 +772,7 @@ export declare const linkTemplatesContract: {
|
|
|
772
772
|
}, z.core.$strip>;
|
|
773
773
|
next: z.ZodNullable<z.ZodString>;
|
|
774
774
|
}, z.core.$strip>], "type">>;
|
|
775
|
-
}, z.core.$strip
|
|
775
|
+
}, z.core.$strip>;
|
|
776
776
|
created_at: z.ZodCoercedDate<unknown>;
|
|
777
777
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
778
778
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -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,13 +864,13 @@ 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;
|
|
871
871
|
title: z.ZodString;
|
|
872
872
|
description: z.ZodNullable<z.ZodString>;
|
|
873
|
-
rule_graph: z.
|
|
873
|
+
rule_graph: z.ZodObject<{
|
|
874
874
|
entry: z.ZodString;
|
|
875
875
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
876
876
|
id: z.ZodString;
|
|
@@ -953,7 +953,7 @@ export declare const linkTemplatesContract: {
|
|
|
953
953
|
}, z.core.$strip>;
|
|
954
954
|
next: z.ZodNullable<z.ZodString>;
|
|
955
955
|
}, z.core.$strip>], "type">>;
|
|
956
|
-
}, z.core.$strip
|
|
956
|
+
}, z.core.$strip>;
|
|
957
957
|
created_at: z.ZodCoercedDate<unknown>;
|
|
958
958
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
959
959
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -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.
|
|
2874
|
+
rule_graph: z.ZodObject<{
|
|
2875
2875
|
entry: z.ZodString;
|
|
2876
2876
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2877
2877
|
id: z.ZodString;
|
|
@@ -2954,13 +2954,13 @@ 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;
|
|
2961
2961
|
title: z.ZodString;
|
|
2962
2962
|
description: z.ZodNullable<z.ZodString>;
|
|
2963
|
-
rule_graph: z.
|
|
2963
|
+
rule_graph: z.ZodObject<{
|
|
2964
2964
|
entry: z.ZodString;
|
|
2965
2965
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2966
2966
|
id: z.ZodString;
|
|
@@ -3043,7 +3043,7 @@ export declare const contract: {
|
|
|
3043
3043
|
}, z.core.$strip>;
|
|
3044
3044
|
next: z.ZodNullable<z.ZodString>;
|
|
3045
3045
|
}, z.core.$strip>], "type">>;
|
|
3046
|
-
}, z.core.$strip
|
|
3046
|
+
}, z.core.$strip>;
|
|
3047
3047
|
created_at: z.ZodCoercedDate<unknown>;
|
|
3048
3048
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
3049
3049
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -3058,7 +3058,7 @@ export declare const contract: {
|
|
|
3058
3058
|
workspace_id: z.ZodString;
|
|
3059
3059
|
title: z.ZodString;
|
|
3060
3060
|
description: z.ZodNullable<z.ZodString>;
|
|
3061
|
-
rule_graph: z.
|
|
3061
|
+
rule_graph: z.ZodObject<{
|
|
3062
3062
|
entry: z.ZodString;
|
|
3063
3063
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3064
3064
|
id: z.ZodString;
|
|
@@ -3141,7 +3141,7 @@ export declare const contract: {
|
|
|
3141
3141
|
}, z.core.$strip>;
|
|
3142
3142
|
next: z.ZodNullable<z.ZodString>;
|
|
3143
3143
|
}, z.core.$strip>], "type">>;
|
|
3144
|
-
}, z.core.$strip
|
|
3144
|
+
}, z.core.$strip>;
|
|
3145
3145
|
created_at: z.ZodCoercedDate<unknown>;
|
|
3146
3146
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
3147
3147
|
}, z.core.$strip>>;
|
|
@@ -3158,7 +3158,7 @@ export declare const contract: {
|
|
|
3158
3158
|
workspace_id: z.ZodString;
|
|
3159
3159
|
title: z.ZodString;
|
|
3160
3160
|
description: z.ZodNullable<z.ZodString>;
|
|
3161
|
-
rule_graph: z.
|
|
3161
|
+
rule_graph: z.ZodObject<{
|
|
3162
3162
|
entry: z.ZodString;
|
|
3163
3163
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3164
3164
|
id: z.ZodString;
|
|
@@ -3241,7 +3241,7 @@ export declare const contract: {
|
|
|
3241
3241
|
}, z.core.$strip>;
|
|
3242
3242
|
next: z.ZodNullable<z.ZodString>;
|
|
3243
3243
|
}, z.core.$strip>], "type">>;
|
|
3244
|
-
}, z.core.$strip
|
|
3244
|
+
}, z.core.$strip>;
|
|
3245
3245
|
created_at: z.ZodCoercedDate<unknown>;
|
|
3246
3246
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
3247
3247
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -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,13 +3333,13 @@ 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;
|
|
3340
3340
|
title: z.ZodString;
|
|
3341
3341
|
description: z.ZodNullable<z.ZodString>;
|
|
3342
|
-
rule_graph: z.
|
|
3342
|
+
rule_graph: z.ZodObject<{
|
|
3343
3343
|
entry: z.ZodString;
|
|
3344
3344
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3345
3345
|
id: z.ZodString;
|
|
@@ -3422,7 +3422,7 @@ export declare const contract: {
|
|
|
3422
3422
|
}, z.core.$strip>;
|
|
3423
3423
|
next: z.ZodNullable<z.ZodString>;
|
|
3424
3424
|
}, z.core.$strip>], "type">>;
|
|
3425
|
-
}, z.core.$strip
|
|
3425
|
+
}, z.core.$strip>;
|
|
3426
3426
|
created_at: z.ZodCoercedDate<unknown>;
|
|
3427
3427
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
3428
3428
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
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({
|
|
@@ -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"]
|
|
@@ -4,7 +4,7 @@ export declare const LinkTemplateSchema: z.ZodObject<{
|
|
|
4
4
|
workspace_id: z.ZodString;
|
|
5
5
|
title: z.ZodString;
|
|
6
6
|
description: z.ZodNullable<z.ZodString>;
|
|
7
|
-
rule_graph: z.
|
|
7
|
+
rule_graph: z.ZodObject<{
|
|
8
8
|
entry: z.ZodString;
|
|
9
9
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
10
10
|
id: z.ZodString;
|
|
@@ -87,14 +87,14 @@ export declare const LinkTemplateSchema: z.ZodObject<{
|
|
|
87
87
|
}, z.core.$strip>;
|
|
88
88
|
next: z.ZodNullable<z.ZodString>;
|
|
89
89
|
}, z.core.$strip>], "type">>;
|
|
90
|
-
}, z.core.$strip
|
|
90
|
+
}, z.core.$strip>;
|
|
91
91
|
created_at: z.ZodCoercedDate<unknown>;
|
|
92
92
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
93
93
|
}, z.core.$strip>;
|
|
94
94
|
export declare const CreateLinkTemplateInputSchema: z.ZodObject<{
|
|
95
95
|
title: z.ZodString;
|
|
96
96
|
description: z.ZodOptional<z.ZodString>;
|
|
97
|
-
rule_graph: z.
|
|
97
|
+
rule_graph: 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>;
|
|
@@ -278,7 +278,7 @@ export declare const PaginatedLinkTemplatesSchema: z.ZodObject<{
|
|
|
278
278
|
workspace_id: z.ZodString;
|
|
279
279
|
title: z.ZodString;
|
|
280
280
|
description: z.ZodNullable<z.ZodString>;
|
|
281
|
-
rule_graph: z.
|
|
281
|
+
rule_graph: z.ZodObject<{
|
|
282
282
|
entry: z.ZodString;
|
|
283
283
|
nodes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
284
284
|
id: z.ZodString;
|
|
@@ -361,7 +361,7 @@ export declare const PaginatedLinkTemplatesSchema: z.ZodObject<{
|
|
|
361
361
|
}, z.core.$strip>;
|
|
362
362
|
next: z.ZodNullable<z.ZodString>;
|
|
363
363
|
}, z.core.$strip>], "type">>;
|
|
364
|
-
}, z.core.$strip
|
|
364
|
+
}, z.core.$strip>;
|
|
365
365
|
created_at: z.ZodCoercedDate<unknown>;
|
|
366
366
|
updated_at: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
367
367
|
}, z.core.$strip>>;
|
|
@@ -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
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