From 9d106de1817f0c06bd05bcaed12158c2e42c0cd7 Mon Sep 17 00:00:00 2001 From: Daniel Ramos Date: Mon, 1 Apr 2024 10:55:32 +0200 Subject: [PATCH] fix: birthday being undefined (#23) * fix: birthday being undefined * fix: add test --- src/infrastructure/factorial-client/schema/Employee.ts | 2 +- test/fixtures/employees.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/infrastructure/factorial-client/schema/Employee.ts b/src/infrastructure/factorial-client/schema/Employee.ts index f8f606a..decdc68 100644 --- a/src/infrastructure/factorial-client/schema/Employee.ts +++ b/src/infrastructure/factorial-client/schema/Employee.ts @@ -23,7 +23,7 @@ export const Employee = z.object({ preferredName: z.string().nullable(), pronouns: z.string().nullable(), regularAccessStartsOn: z.string().nullable(), - showBirthday: z.boolean(), + showBirthday: z.boolean().optional(), supervisedByCurrent: z.boolean(), tenureStartDate: z.string().nullable(), terminatedOn: z.string().nullable(), diff --git a/test/fixtures/employees.json b/test/fixtures/employees.json index 99a0c18..b3579bc 100644 --- a/test/fixtures/employees.json +++ b/test/fixtures/employees.json @@ -267,7 +267,6 @@ "regularAccessStartsOn": "2019-10-04", "irpf": null, "pronouns": null, - "showBirthday": true, "permissions": { "hirings": { "read": true,