diff --git a/packages/domain/customer/providers/whmcs/mapper.ts b/packages/domain/customer/providers/whmcs/mapper.ts index 2fef2657..9a01d49e 100644 --- a/packages/domain/customer/providers/whmcs/mapper.ts +++ b/packages/domain/customer/providers/whmcs/mapper.ts @@ -56,7 +56,7 @@ function normalizeAddress(client: WhmcsRawClient): Address | undefined { country: client.country ?? null, countryCode: client.countrycode ?? null, phoneNumber: client.phonenumberformatted ?? client.phonenumber ?? null, - phoneCountryCode: client.phonecc ?? null, + phoneCountryCode: client.phonecc == null ? null : String(client.phonecc), }); const hasValues = Object.values(address).some(v => v !== undefined && v !== null && v !== ""); diff --git a/packages/domain/customer/providers/whmcs/raw.types.ts b/packages/domain/customer/providers/whmcs/raw.types.ts index edb7c334..3b91dd6a 100644 --- a/packages/domain/customer/providers/whmcs/raw.types.ts +++ b/packages/domain/customer/providers/whmcs/raw.types.ts @@ -119,7 +119,7 @@ export const whmcsClientSchema = z postcode: z.string().optional(), country: z.string().optional(), countrycode: z.string().optional(), - phonecc: z.string().optional(), + phonecc: numberLike.optional(), phonenumber: z.string().optional(), phonenumberformatted: z.string().optional(), telephoneNumber: z.string().optional(),