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

This commit is contained in:
Hariom Balhara authored and GitHub committed 2024-11-27 10:44:45 +05:30
1 parent 471f5bd7eb
commit afd730e1c8
2 files changed
+15

No files matched your search

+13
View File
@@ -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");
});
});
+2
View File
@@ -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(),
}),
]);