fix: Use isValidPhoneNumber from libphonenumber-js/max (#23353)
* import from max * fix --------- Co-authored-by: Alex van Andel <me@alexvanandel.com>
This commit is contained in:
co-authored by
Alex van Andel
parent
268a142370
commit
fdb0e5d004
@@ -1,6 +1,6 @@
|
||||
import { ErrorMessage } from "@hookform/error-message";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { isValidPhoneNumber } from "libphonenumber-js";
|
||||
import { isValidPhoneNumber } from "libphonenumber-js/max";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Controller, useForm, useWatch, useFormContext } from "react-hook-form";
|
||||
import { z } from "zod";
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* TODO: Consolidate this file with BookingLocationService and add tests
|
||||
*/
|
||||
import type { TFunction } from "i18next";
|
||||
import { isValidPhoneNumber } from "libphonenumber-js";
|
||||
import { isValidPhoneNumber } from "libphonenumber-js/max";
|
||||
import { z } from "zod";
|
||||
|
||||
import { appStoreMetadata } from "@calcom/app-store/bookerAppsMetaData";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isValidPhoneNumber } from "libphonenumber-js";
|
||||
import { isValidPhoneNumber } from "libphonenumber-js/max";
|
||||
import z from "zod";
|
||||
|
||||
import type { ALL_VIEWS } from "@calcom/features/form-builder/schema";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isValidPhoneNumber } from "libphonenumber-js";
|
||||
import { isValidPhoneNumber } from "libphonenumber-js/max";
|
||||
import z from "zod";
|
||||
|
||||
import type { EventTypeCustomInput } from "@calcom/prisma/client";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isValidPhoneNumber } from "libphonenumber-js";
|
||||
import { isValidPhoneNumber } from "libphonenumber-js/max";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
|
||||
import { replaceEventTypePlaceholders } from "@calcom/features/ee/workflows/components/agent-configuration/utils/promptUtils";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isValidPhoneNumber } from "libphonenumber-js";
|
||||
import { isValidPhoneNumber } from "libphonenumber-js/max";
|
||||
import z from "zod";
|
||||
|
||||
export const templateTypeEnum = z.enum(["CHECK_IN_APPOINTMENT", "CUSTOM_TEMPLATE"]);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { isValidPhoneNumber } from "libphonenumber-js";
|
||||
import { isValidPhoneNumber } from "libphonenumber-js/max";
|
||||
import type { Dispatch, SetStateAction } from "react";
|
||||
import { useState } from "react";
|
||||
import { Controller, useForm } from "react-hook-form";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isValidPhoneNumber } from "libphonenumber-js";
|
||||
import { isValidPhoneNumber } from "libphonenumber-js/max";
|
||||
import { z } from "zod";
|
||||
|
||||
export const agentSchema = z.object({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isValidPhoneNumber } from "libphonenumber-js";
|
||||
import { isValidPhoneNumber } from "libphonenumber-js/max";
|
||||
import { z } from "zod";
|
||||
|
||||
import { TimeUnit, WorkflowActions, WorkflowTemplates, WorkflowTriggerEvents } from "@calcom/prisma/enums";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isValidPhoneNumber } from "libphonenumber-js";
|
||||
import { isValidPhoneNumber } from "libphonenumber-js/max";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { z } from "zod";
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
Validate,
|
||||
IsDefined,
|
||||
} from "class-validator";
|
||||
import { isValidPhoneNumber } from "libphonenumber-js";
|
||||
import { isValidPhoneNumber } from "libphonenumber-js/max";
|
||||
|
||||
import type { BookingLanguageType } from "./language";
|
||||
import { BookingLanguage } from "./language";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isValidPhoneNumber } from "libphonenumber-js";
|
||||
import { isValidPhoneNumber } from "libphonenumber-js/max";
|
||||
import { z } from "zod";
|
||||
|
||||
export const ZDeleteInputSchema = z.object({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isValidPhoneNumber } from "libphonenumber-js";
|
||||
import { isValidPhoneNumber } from "libphonenumber-js/max";
|
||||
import { z } from "zod";
|
||||
|
||||
export const ZImportInputSchema = z.object({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isValidPhoneNumber } from "libphonenumber-js";
|
||||
import { isValidPhoneNumber } from "libphonenumber-js/max";
|
||||
import { z } from "zod";
|
||||
|
||||
export const ZUpdateInputSchema = z.object({
|
||||
|
||||
Reference in New Issue
Block a user