Skip to content

Scheduling infrastructure for absolutely everyone.

fix: (Hotfix)any group of rules in routing (#17869)

Hariom Balharaafd730e1c80a
diff --git a/packages/lib/raqb/zod.test.ts b/packages/lib/raqb/zod.test.ts
index 17df1c3a4cd..608d90717a9 100644
--- a/packages/lib/raqb/zod.test.ts
+++ b/packages/lib/raqb/zod.test.ts
@@ -247,4 +247,17 @@ describe("queryValueValidationSchema", () => {
});
expect(result.success).toBe(false);
});
+
+ it("should allow properties in the query that has rule grouping details", () => {
+ const result = raqbQueryValueSchema.parse({
+ id: "8",
+ type: "group",
+ properties: {
+ not: false,
+ conjunction: "OR",
+ },
+ });
+ expect(result.properties.not).toBe(false);
+ expect(result.properties.conjunction).toBe("OR");
+ });
});
diff --git a/packages/lib/raqb/zod.ts b/packages/lib/raqb/zod.ts
index 69c74aa2969..28fd0eef7db 100644
--- a/packages/lib/raqb/zod.ts
+++ b/packages/lib/raqb/zod.ts
@@ -88,11 +88,13 @@ export const raqbQueryValueSchema = z.union([
id: z.string().optional(),
type: z.literal("group"),
children1: raqbChildren1Schema.optional(),
+ properties: z.any(),
}),
z.object({
id: z.string().optional(),
type: z.literal("switch_group"),
children1: raqbChildren1Schema.optional(),
+ properties: z.any(),
}),
]);