evo360-types 1.3.118 → 1.3.120
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.
|
@@ -41,9 +41,14 @@ exports.zChatbeeContactSchema = zod_1.z.object({
|
|
|
41
41
|
is_group: zod_1.z.preprocess((val) => {
|
|
42
42
|
if (typeof val === "boolean")
|
|
43
43
|
return val;
|
|
44
|
-
if (typeof val === "string")
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
if (typeof val === "string") {
|
|
45
|
+
const lowered = val.toLowerCase();
|
|
46
|
+
if (lowered === "true")
|
|
47
|
+
return true;
|
|
48
|
+
if (lowered === "false")
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
return undefined; // mantém compatibilidade com optional()
|
|
47
52
|
}, zod_1.z.boolean().optional()),
|
|
48
53
|
address: zod_1.z.string().optional(),
|
|
49
54
|
type: zod_1.z.string().optional(),
|
|
@@ -42,8 +42,12 @@ export const zChatbeeContactSchema = z.object({
|
|
|
42
42
|
name: z.string().optional(),
|
|
43
43
|
is_group: z.preprocess((val) => {
|
|
44
44
|
if (typeof val === "boolean") return val;
|
|
45
|
-
if (typeof val === "string")
|
|
46
|
-
|
|
45
|
+
if (typeof val === "string") {
|
|
46
|
+
const lowered = val.toLowerCase();
|
|
47
|
+
if (lowered === "true") return true;
|
|
48
|
+
if (lowered === "false") return false;
|
|
49
|
+
}
|
|
50
|
+
return undefined; // mantém compatibilidade com optional()
|
|
47
51
|
}, z.boolean().optional()),
|
|
48
52
|
address: z.string().optional(),
|
|
49
53
|
type: z.string().optional(),
|