From 702fc131dee048332fafb79c27dad03daba6fa74 Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Mon, 6 Jan 2025 17:59:44 +0300 Subject: [PATCH] app/web: handle update profile name --- apps/web/actions/profile.ts | 21 +- apps/web/app/(main)/profile/page.tsx | 13 +- apps/web/components/profile/profile-field.tsx | 44 +- apps/web/package.json | 1 + packages/graphql/api/customer.ts | 9 + packages/graphql/graphql.config.cjs | 3 +- packages/graphql/operations/customer.graphql | 31 +- .../graphql/types/operations.generated.ts | 823 +++++++++--------- pnpm-lock.yaml | 13 + 9 files changed, 525 insertions(+), 433 deletions(-) diff --git a/apps/web/actions/profile.ts b/apps/web/actions/profile.ts index ca7dc2b..4d9cd4f 100644 --- a/apps/web/actions/profile.ts +++ b/apps/web/actions/profile.ts @@ -1,11 +1,28 @@ 'use server'; - +import { authOptions } from '@/config/auth'; +import { getCustomer, updateCustomerProfile } from '@repo/graphql/api'; +import { type CustomerInput } from '@repo/graphql/types'; +import { getServerSession } from 'next-auth/next'; import { revalidatePath } from 'next/cache'; export async function becomeMaster() { revalidatePath('/profile'); } -export async function updateName() { +export async function updateProfile(input: CustomerInput) { + const session = await getServerSession(authOptions); + + if (session) { + const { user } = session; + const getCustomerResponse = await getCustomer({ telegramId: user?.telegramId }); + const customer = getCustomerResponse.data.customers.at(0); + if (customer) { + await updateCustomerProfile({ + data: input, + documentId: customer.documentId, + }); + } + } + revalidatePath('/profile'); } diff --git a/apps/web/app/(main)/profile/page.tsx b/apps/web/app/(main)/profile/page.tsx index 557785f..396368e 100644 --- a/apps/web/app/(main)/profile/page.tsx +++ b/apps/web/app/(main)/profile/page.tsx @@ -1,5 +1,4 @@ -/* eslint-disable sonarjs/different-types-comparison */ -import { becomeMaster, updateName } from '@/actions/profile'; +import { becomeMaster, updateProfile } from '@/actions/profile'; import { ProfileField } from '@/components/profile/profile-field'; import { authOptions } from '@/config/auth'; import { getCustomer } from '@repo/graphql/api'; @@ -14,6 +13,8 @@ export default async function ProfilePage() { const user = data.customers.at(0); const photoUrl = user?.photoUrl ?? 'https://github.com/shadcn.png'; + if (!user) return 'Профиль не найден'; + return (
@@ -25,7 +26,13 @@ export default async function ProfilePage() {

{user?.name}

- + void; + readonly onChange?: (value: CustomerInput) => Promise | void; readonly value: string; }; export function ProfileField({ disabled = false, + fieldName, id, label, onChange, value: initialValue, }: ProfileFieldProps) { const [value, setValue] = useState(initialValue); - const [isPending, startTransition] = useTransition(); + + const [isPending, setIsPending] = useState(false); + const debouncedCallback = useDebouncedCallback((newValue: string) => { + if (!onChange || !fieldName) return; + + setIsPending(true); + const result = onChange({ [fieldName]: newValue }); + + if (result instanceof Promise) { + result.finally(() => setIsPending(false)); + } else { + setIsPending(false); + } + }, 300); + + const inputRef = useFocus(isPending); const handleChange = (event: ChangeEvent) => { const newValue = event.target.value; setValue(newValue); - if (onChange) { - startTransition(() => { - onChange(newValue); - }); - } + debouncedCallback(newValue); }; return ( @@ -39,8 +55,20 @@ export function ProfileField({ disabled={disabled || isPending} id={id} onChange={handleChange} + ref={inputRef} value={value} />
); } + +function useFocus(isPending: boolean) { + const inputRef = useRef(null); + + useEffect(() => { + if (inputRef.current) { + inputRef.current.focus(); + } + }, [isPending]); + return inputRef; +} diff --git a/apps/web/package.json b/apps/web/package.json index ec60d87..18a219a 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -24,6 +24,7 @@ "next-themes": "^0.4.4", "react": "catalog:", "react-dom": "catalog:", + "use-debounce": "^10.0.4", "zod": "catalog:" }, "devDependencies": { diff --git a/packages/graphql/api/customer.ts b/packages/graphql/api/customer.ts index 4ed3316..a0bd9cb 100644 --- a/packages/graphql/api/customer.ts +++ b/packages/graphql/api/customer.ts @@ -19,3 +19,12 @@ export async function getCustomer(variables: GQL.GetCustomerQueryVariables) { variables, }); } + +export async function updateCustomerProfile(variables: GQL.UpdateCustomerProfileMutationVariables) { + const { mutate } = await getClientWithToken(); + + return mutate({ + mutation: GQL.UpdateCustomerProfileDocument, + variables, + }); +} diff --git a/packages/graphql/graphql.config.cjs b/packages/graphql/graphql.config.cjs index a9c2fad..c1d69b9 100644 --- a/packages/graphql/graphql.config.cjs +++ b/packages/graphql/graphql.config.cjs @@ -4,9 +4,10 @@ module.exports = { generates: { './types/operations.generated.ts': { config: { - avoidOptionals: true, + avoidOptionals: false, onlyOperationTypes: true, useTypeImports: true, + maybeValue: 'T | null | undefined' }, plugins: ['typescript', 'typescript-operations', 'typed-document-node'], }, diff --git a/packages/graphql/operations/customer.graphql b/packages/graphql/operations/customer.graphql index 2d144ba..d6e9f15 100644 --- a/packages/graphql/operations/customer.graphql +++ b/packages/graphql/operations/customer.graphql @@ -1,22 +1,27 @@ +fragment CustomerProfile on Customer { + active + documentId + name + phone + photoUrl + role + telegramId +} + mutation CreateCustomer($name: String!, $telegramId: Long!, $phone: String!) { createCustomer(data: { name: $name, telegramId: $telegramId, phone: $phone, role: client }) { - documentId - name - telegramId - phone - role - active - createdAt - updatedAt - publishedAt + ...CustomerProfile } } query GetCustomer($telegramId: Long!) { customers(filters: { telegramId: { eq: $telegramId } }) { - name - phone - role - photoUrl + ...CustomerProfile + } +} + +mutation UpdateCustomerProfile($documentId: ID!, $data: CustomerInput!) { + updateCustomer(documentId: $documentId, data: $data) { + ...CustomerProfile } } diff --git a/packages/graphql/types/operations.generated.ts b/packages/graphql/types/operations.generated.ts index d960e41..caec0c5 100644 --- a/packages/graphql/types/operations.generated.ts +++ b/packages/graphql/types/operations.generated.ts @@ -1,6 +1,6 @@ import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type InputMaybe = Maybe; +export type Maybe = T | null | undefined; +export type InputMaybe = T | null | undefined; export type Exact = { [K in keyof T]: T[K] }; export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; @@ -19,121 +19,121 @@ export type Scalars = { }; export type BlockFiltersInput = { - and: InputMaybe>>; - client: InputMaybe; - createdAt: InputMaybe; - dateend: InputMaybe; - datestart: InputMaybe; - documentId: InputMaybe; - master: InputMaybe; - not: InputMaybe; - or: InputMaybe>>; - orders: InputMaybe; - publishedAt: InputMaybe; - sessionsCompleted: InputMaybe; - sessionsTotal: InputMaybe; - state: InputMaybe; - updatedAt: InputMaybe; + and?: InputMaybe>>; + client?: InputMaybe; + createdAt?: InputMaybe; + dateend?: InputMaybe; + datestart?: InputMaybe; + documentId?: InputMaybe; + master?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + orders?: InputMaybe; + publishedAt?: InputMaybe; + sessionsCompleted?: InputMaybe; + sessionsTotal?: InputMaybe; + state?: InputMaybe; + updatedAt?: InputMaybe; }; export type BlockInput = { - client: InputMaybe; - dateend: InputMaybe; - datestart: InputMaybe; - master: InputMaybe; - orders: InputMaybe>>; - publishedAt: InputMaybe; - sessionsCompleted: InputMaybe; - sessionsTotal: InputMaybe; - state: InputMaybe; + client?: InputMaybe; + dateend?: InputMaybe; + datestart?: InputMaybe; + master?: InputMaybe; + orders?: InputMaybe>>; + publishedAt?: InputMaybe; + sessionsCompleted?: InputMaybe; + sessionsTotal?: InputMaybe; + state?: InputMaybe; }; export type BooleanFilterInput = { - and: InputMaybe>>; - between: InputMaybe>>; - contains: InputMaybe; - containsi: InputMaybe; - endsWith: InputMaybe; - eq: InputMaybe; - eqi: InputMaybe; - gt: InputMaybe; - gte: InputMaybe; - in: InputMaybe>>; - lt: InputMaybe; - lte: InputMaybe; - ne: InputMaybe; - nei: InputMaybe; - not: InputMaybe; - notContains: InputMaybe; - notContainsi: InputMaybe; - notIn: InputMaybe>>; - notNull: InputMaybe; - null: InputMaybe; - or: InputMaybe>>; - startsWith: InputMaybe; + and?: InputMaybe>>; + between?: InputMaybe>>; + contains?: InputMaybe; + containsi?: InputMaybe; + endsWith?: InputMaybe; + eq?: InputMaybe; + eqi?: InputMaybe; + gt?: InputMaybe; + gte?: InputMaybe; + in?: InputMaybe>>; + lt?: InputMaybe; + lte?: InputMaybe; + ne?: InputMaybe; + nei?: InputMaybe; + not?: InputMaybe; + notContains?: InputMaybe; + notContainsi?: InputMaybe; + notIn?: InputMaybe>>; + notNull?: InputMaybe; + null?: InputMaybe; + or?: InputMaybe>>; + startsWith?: InputMaybe; }; export type CustomerFiltersInput = { - active: InputMaybe; - and: InputMaybe>>; - blocks: InputMaybe; - clients: InputMaybe; - createdAt: InputMaybe; - documentId: InputMaybe; - masters: InputMaybe; - name: InputMaybe; - not: InputMaybe; - or: InputMaybe>>; - orders: InputMaybe; - phone: InputMaybe; - photoUrl: InputMaybe; - publishedAt: InputMaybe; - role: InputMaybe; - setting: InputMaybe; - slots: InputMaybe; - telegramId: InputMaybe; - updatedAt: InputMaybe; + active?: InputMaybe; + and?: InputMaybe>>; + blocks?: InputMaybe; + clients?: InputMaybe; + createdAt?: InputMaybe; + documentId?: InputMaybe; + masters?: InputMaybe; + name?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + orders?: InputMaybe; + phone?: InputMaybe; + photoUrl?: InputMaybe; + publishedAt?: InputMaybe; + role?: InputMaybe; + setting?: InputMaybe; + slots?: InputMaybe; + telegramId?: InputMaybe; + updatedAt?: InputMaybe; }; export type CustomerInput = { - active: InputMaybe; - blocks: InputMaybe>>; - clients: InputMaybe>>; - masters: InputMaybe>>; - name: InputMaybe; - orders: InputMaybe>>; - phone: InputMaybe; - photoUrl: InputMaybe; - publishedAt: InputMaybe; - role: InputMaybe; - setting: InputMaybe; - slots: InputMaybe>>; - telegramId: InputMaybe; + active?: InputMaybe; + blocks?: InputMaybe>>; + clients?: InputMaybe>>; + masters?: InputMaybe>>; + name?: InputMaybe; + orders?: InputMaybe>>; + phone?: InputMaybe; + photoUrl?: InputMaybe; + publishedAt?: InputMaybe; + role?: InputMaybe; + setting?: InputMaybe; + slots?: InputMaybe>>; + telegramId?: InputMaybe; }; export type DateTimeFilterInput = { - and: InputMaybe>>; - between: InputMaybe>>; - contains: InputMaybe; - containsi: InputMaybe; - endsWith: InputMaybe; - eq: InputMaybe; - eqi: InputMaybe; - gt: InputMaybe; - gte: InputMaybe; - in: InputMaybe>>; - lt: InputMaybe; - lte: InputMaybe; - ne: InputMaybe; - nei: InputMaybe; - not: InputMaybe; - notContains: InputMaybe; - notContainsi: InputMaybe; - notIn: InputMaybe>>; - notNull: InputMaybe; - null: InputMaybe; - or: InputMaybe>>; - startsWith: InputMaybe; + and?: InputMaybe>>; + between?: InputMaybe>>; + contains?: InputMaybe; + containsi?: InputMaybe; + endsWith?: InputMaybe; + eq?: InputMaybe; + eqi?: InputMaybe; + gt?: InputMaybe; + gte?: InputMaybe; + in?: InputMaybe>>; + lt?: InputMaybe; + lte?: InputMaybe; + ne?: InputMaybe; + nei?: InputMaybe; + not?: InputMaybe; + notContains?: InputMaybe; + notContainsi?: InputMaybe; + notIn?: InputMaybe>>; + notNull?: InputMaybe; + null?: InputMaybe; + or?: InputMaybe>>; + startsWith?: InputMaybe; }; export enum Enum_Block_State { @@ -162,179 +162,179 @@ export enum Enum_Slot_State { } export type FileInfoInput = { - alternativeText: InputMaybe; - caption: InputMaybe; - name: InputMaybe; + alternativeText?: InputMaybe; + caption?: InputMaybe; + name?: InputMaybe; }; export type FloatFilterInput = { - and: InputMaybe>>; - between: InputMaybe>>; - contains: InputMaybe; - containsi: InputMaybe; - endsWith: InputMaybe; - eq: InputMaybe; - eqi: InputMaybe; - gt: InputMaybe; - gte: InputMaybe; - in: InputMaybe>>; - lt: InputMaybe; - lte: InputMaybe; - ne: InputMaybe; - nei: InputMaybe; - not: InputMaybe; - notContains: InputMaybe; - notContainsi: InputMaybe; - notIn: InputMaybe>>; - notNull: InputMaybe; - null: InputMaybe; - or: InputMaybe>>; - startsWith: InputMaybe; + and?: InputMaybe>>; + between?: InputMaybe>>; + contains?: InputMaybe; + containsi?: InputMaybe; + endsWith?: InputMaybe; + eq?: InputMaybe; + eqi?: InputMaybe; + gt?: InputMaybe; + gte?: InputMaybe; + in?: InputMaybe>>; + lt?: InputMaybe; + lte?: InputMaybe; + ne?: InputMaybe; + nei?: InputMaybe; + not?: InputMaybe; + notContains?: InputMaybe; + notContainsi?: InputMaybe; + notIn?: InputMaybe>>; + notNull?: InputMaybe; + null?: InputMaybe; + or?: InputMaybe>>; + startsWith?: InputMaybe; }; export type I18NLocaleFiltersInput = { - and: InputMaybe>>; - code: InputMaybe; - createdAt: InputMaybe; - documentId: InputMaybe; - name: InputMaybe; - not: InputMaybe; - or: InputMaybe>>; - publishedAt: InputMaybe; - updatedAt: InputMaybe; + and?: InputMaybe>>; + code?: InputMaybe; + createdAt?: InputMaybe; + documentId?: InputMaybe; + name?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + publishedAt?: InputMaybe; + updatedAt?: InputMaybe; }; export type IdFilterInput = { - and: InputMaybe>>; - between: InputMaybe>>; - contains: InputMaybe; - containsi: InputMaybe; - endsWith: InputMaybe; - eq: InputMaybe; - eqi: InputMaybe; - gt: InputMaybe; - gte: InputMaybe; - in: InputMaybe>>; - lt: InputMaybe; - lte: InputMaybe; - ne: InputMaybe; - nei: InputMaybe; - not: InputMaybe; - notContains: InputMaybe; - notContainsi: InputMaybe; - notIn: InputMaybe>>; - notNull: InputMaybe; - null: InputMaybe; - or: InputMaybe>>; - startsWith: InputMaybe; + and?: InputMaybe>>; + between?: InputMaybe>>; + contains?: InputMaybe; + containsi?: InputMaybe; + endsWith?: InputMaybe; + eq?: InputMaybe; + eqi?: InputMaybe; + gt?: InputMaybe; + gte?: InputMaybe; + in?: InputMaybe>>; + lt?: InputMaybe; + lte?: InputMaybe; + ne?: InputMaybe; + nei?: InputMaybe; + not?: InputMaybe; + notContains?: InputMaybe; + notContainsi?: InputMaybe; + notIn?: InputMaybe>>; + notNull?: InputMaybe; + null?: InputMaybe; + or?: InputMaybe>>; + startsWith?: InputMaybe; }; export type IntFilterInput = { - and: InputMaybe>>; - between: InputMaybe>>; - contains: InputMaybe; - containsi: InputMaybe; - endsWith: InputMaybe; - eq: InputMaybe; - eqi: InputMaybe; - gt: InputMaybe; - gte: InputMaybe; - in: InputMaybe>>; - lt: InputMaybe; - lte: InputMaybe; - ne: InputMaybe; - nei: InputMaybe; - not: InputMaybe; - notContains: InputMaybe; - notContainsi: InputMaybe; - notIn: InputMaybe>>; - notNull: InputMaybe; - null: InputMaybe; - or: InputMaybe>>; - startsWith: InputMaybe; + and?: InputMaybe>>; + between?: InputMaybe>>; + contains?: InputMaybe; + containsi?: InputMaybe; + endsWith?: InputMaybe; + eq?: InputMaybe; + eqi?: InputMaybe; + gt?: InputMaybe; + gte?: InputMaybe; + in?: InputMaybe>>; + lt?: InputMaybe; + lte?: InputMaybe; + ne?: InputMaybe; + nei?: InputMaybe; + not?: InputMaybe; + notContains?: InputMaybe; + notContainsi?: InputMaybe; + notIn?: InputMaybe>>; + notNull?: InputMaybe; + null?: InputMaybe; + or?: InputMaybe>>; + startsWith?: InputMaybe; }; export type JsonFilterInput = { - and: InputMaybe>>; - between: InputMaybe>>; - contains: InputMaybe; - containsi: InputMaybe; - endsWith: InputMaybe; - eq: InputMaybe; - eqi: InputMaybe; - gt: InputMaybe; - gte: InputMaybe; - in: InputMaybe>>; - lt: InputMaybe; - lte: InputMaybe; - ne: InputMaybe; - nei: InputMaybe; - not: InputMaybe; - notContains: InputMaybe; - notContainsi: InputMaybe; - notIn: InputMaybe>>; - notNull: InputMaybe; - null: InputMaybe; - or: InputMaybe>>; - startsWith: InputMaybe; + and?: InputMaybe>>; + between?: InputMaybe>>; + contains?: InputMaybe; + containsi?: InputMaybe; + endsWith?: InputMaybe; + eq?: InputMaybe; + eqi?: InputMaybe; + gt?: InputMaybe; + gte?: InputMaybe; + in?: InputMaybe>>; + lt?: InputMaybe; + lte?: InputMaybe; + ne?: InputMaybe; + nei?: InputMaybe; + not?: InputMaybe; + notContains?: InputMaybe; + notContainsi?: InputMaybe; + notIn?: InputMaybe>>; + notNull?: InputMaybe; + null?: InputMaybe; + or?: InputMaybe>>; + startsWith?: InputMaybe; }; export type LongFilterInput = { - and: InputMaybe>>; - between: InputMaybe>>; - contains: InputMaybe; - containsi: InputMaybe; - endsWith: InputMaybe; - eq: InputMaybe; - eqi: InputMaybe; - gt: InputMaybe; - gte: InputMaybe; - in: InputMaybe>>; - lt: InputMaybe; - lte: InputMaybe; - ne: InputMaybe; - nei: InputMaybe; - not: InputMaybe; - notContains: InputMaybe; - notContainsi: InputMaybe; - notIn: InputMaybe>>; - notNull: InputMaybe; - null: InputMaybe; - or: InputMaybe>>; - startsWith: InputMaybe; + and?: InputMaybe>>; + between?: InputMaybe>>; + contains?: InputMaybe; + containsi?: InputMaybe; + endsWith?: InputMaybe; + eq?: InputMaybe; + eqi?: InputMaybe; + gt?: InputMaybe; + gte?: InputMaybe; + in?: InputMaybe>>; + lt?: InputMaybe; + lte?: InputMaybe; + ne?: InputMaybe; + nei?: InputMaybe; + not?: InputMaybe; + notContains?: InputMaybe; + notContainsi?: InputMaybe; + notIn?: InputMaybe>>; + notNull?: InputMaybe; + null?: InputMaybe; + or?: InputMaybe>>; + startsWith?: InputMaybe; }; export type OrderFiltersInput = { - and: InputMaybe>>; - block: InputMaybe; - client: InputMaybe; - createdAt: InputMaybe; - documentId: InputMaybe; - not: InputMaybe; - or: InputMaybe>>; - price: InputMaybe; - publishedAt: InputMaybe; - service: InputMaybe; - slot: InputMaybe; - state: InputMaybe; - updatedAt: InputMaybe; + and?: InputMaybe>>; + block?: InputMaybe; + client?: InputMaybe; + createdAt?: InputMaybe; + documentId?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + price?: InputMaybe; + publishedAt?: InputMaybe; + service?: InputMaybe; + slot?: InputMaybe; + state?: InputMaybe; + updatedAt?: InputMaybe; }; export type OrderInput = { - block: InputMaybe; - client: InputMaybe; - price: InputMaybe; - publishedAt: InputMaybe; - service: InputMaybe; - slot: InputMaybe; - state: InputMaybe; + block?: InputMaybe; + client?: InputMaybe; + price?: InputMaybe; + publishedAt?: InputMaybe; + service?: InputMaybe; + slot?: InputMaybe; + state?: InputMaybe; }; export type PaginationArg = { - limit: InputMaybe; - page: InputMaybe; - pageSize: InputMaybe; - start: InputMaybe; + limit?: InputMaybe; + page?: InputMaybe; + pageSize?: InputMaybe; + start?: InputMaybe; }; export enum PublicationStatus { @@ -343,154 +343,154 @@ export enum PublicationStatus { } export type ReviewWorkflowsWorkflowFiltersInput = { - and: InputMaybe>>; - contentTypes: InputMaybe; - createdAt: InputMaybe; - documentId: InputMaybe; - name: InputMaybe; - not: InputMaybe; - or: InputMaybe>>; - publishedAt: InputMaybe; - stageRequiredToPublish: InputMaybe; - stages: InputMaybe; - updatedAt: InputMaybe; + and?: InputMaybe>>; + contentTypes?: InputMaybe; + createdAt?: InputMaybe; + documentId?: InputMaybe; + name?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + publishedAt?: InputMaybe; + stageRequiredToPublish?: InputMaybe; + stages?: InputMaybe; + updatedAt?: InputMaybe; }; export type ReviewWorkflowsWorkflowInput = { - contentTypes: InputMaybe; - name: InputMaybe; - publishedAt: InputMaybe; - stageRequiredToPublish: InputMaybe; - stages: InputMaybe>>; + contentTypes?: InputMaybe; + name?: InputMaybe; + publishedAt?: InputMaybe; + stageRequiredToPublish?: InputMaybe; + stages?: InputMaybe>>; }; export type ReviewWorkflowsWorkflowStageFiltersInput = { - and: InputMaybe>>; - color: InputMaybe; - createdAt: InputMaybe; - documentId: InputMaybe; - name: InputMaybe; - not: InputMaybe; - or: InputMaybe>>; - publishedAt: InputMaybe; - updatedAt: InputMaybe; - workflow: InputMaybe; + and?: InputMaybe>>; + color?: InputMaybe; + createdAt?: InputMaybe; + documentId?: InputMaybe; + name?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + publishedAt?: InputMaybe; + updatedAt?: InputMaybe; + workflow?: InputMaybe; }; export type ReviewWorkflowsWorkflowStageInput = { - color: InputMaybe; - name: InputMaybe; - publishedAt: InputMaybe; - workflow: InputMaybe; + color?: InputMaybe; + name?: InputMaybe; + publishedAt?: InputMaybe; + workflow?: InputMaybe; }; export type SettingFiltersInput = { - and: InputMaybe>>; - createdAt: InputMaybe; - customer: InputMaybe; - documentId: InputMaybe; - not: InputMaybe; - or: InputMaybe>>; - publishedAt: InputMaybe; - recordingByBlocks: InputMaybe; - updatedAt: InputMaybe; + and?: InputMaybe>>; + createdAt?: InputMaybe; + customer?: InputMaybe; + documentId?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + publishedAt?: InputMaybe; + recordingByBlocks?: InputMaybe; + updatedAt?: InputMaybe; }; export type SettingInput = { - customer: InputMaybe; - publishedAt: InputMaybe; - recordingByBlocks: InputMaybe; + customer?: InputMaybe; + publishedAt?: InputMaybe; + recordingByBlocks?: InputMaybe; }; export type SlotFiltersInput = { - and: InputMaybe>>; - createdAt: InputMaybe; - dateend: InputMaybe; - datestart: InputMaybe; - documentId: InputMaybe; - master: InputMaybe; - not: InputMaybe; - or: InputMaybe>>; - orders: InputMaybe; - publishedAt: InputMaybe; - state: InputMaybe; - updatedAt: InputMaybe; + and?: InputMaybe>>; + createdAt?: InputMaybe; + dateend?: InputMaybe; + datestart?: InputMaybe; + documentId?: InputMaybe; + master?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + orders?: InputMaybe; + publishedAt?: InputMaybe; + state?: InputMaybe; + updatedAt?: InputMaybe; }; export type SlotInput = { - dateend: InputMaybe; - datestart: InputMaybe; - master: InputMaybe; - orders: InputMaybe; - publishedAt: InputMaybe; - state: InputMaybe; + dateend?: InputMaybe; + datestart?: InputMaybe; + master?: InputMaybe; + orders?: InputMaybe; + publishedAt?: InputMaybe; + state?: InputMaybe; }; export type StringFilterInput = { - and: InputMaybe>>; - between: InputMaybe>>; - contains: InputMaybe; - containsi: InputMaybe; - endsWith: InputMaybe; - eq: InputMaybe; - eqi: InputMaybe; - gt: InputMaybe; - gte: InputMaybe; - in: InputMaybe>>; - lt: InputMaybe; - lte: InputMaybe; - ne: InputMaybe; - nei: InputMaybe; - not: InputMaybe; - notContains: InputMaybe; - notContainsi: InputMaybe; - notIn: InputMaybe>>; - notNull: InputMaybe; - null: InputMaybe; - or: InputMaybe>>; - startsWith: InputMaybe; + and?: InputMaybe>>; + between?: InputMaybe>>; + contains?: InputMaybe; + containsi?: InputMaybe; + endsWith?: InputMaybe; + eq?: InputMaybe; + eqi?: InputMaybe; + gt?: InputMaybe; + gte?: InputMaybe; + in?: InputMaybe>>; + lt?: InputMaybe; + lte?: InputMaybe; + ne?: InputMaybe; + nei?: InputMaybe; + not?: InputMaybe; + notContains?: InputMaybe; + notContainsi?: InputMaybe; + notIn?: InputMaybe>>; + notNull?: InputMaybe; + null?: InputMaybe; + or?: InputMaybe>>; + startsWith?: InputMaybe; }; export type UploadFileFiltersInput = { - alternativeText: InputMaybe; - and: InputMaybe>>; - caption: InputMaybe; - createdAt: InputMaybe; - documentId: InputMaybe; - ext: InputMaybe; - formats: InputMaybe; - hash: InputMaybe; - height: InputMaybe; - mime: InputMaybe; - name: InputMaybe; - not: InputMaybe; - or: InputMaybe>>; - previewUrl: InputMaybe; - provider: InputMaybe; - provider_metadata: InputMaybe; - publishedAt: InputMaybe; - size: InputMaybe; - updatedAt: InputMaybe; - url: InputMaybe; - width: InputMaybe; + alternativeText?: InputMaybe; + and?: InputMaybe>>; + caption?: InputMaybe; + createdAt?: InputMaybe; + documentId?: InputMaybe; + ext?: InputMaybe; + formats?: InputMaybe; + hash?: InputMaybe; + height?: InputMaybe; + mime?: InputMaybe; + name?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + previewUrl?: InputMaybe; + provider?: InputMaybe; + provider_metadata?: InputMaybe; + publishedAt?: InputMaybe; + size?: InputMaybe; + updatedAt?: InputMaybe; + url?: InputMaybe; + width?: InputMaybe; }; export type UsersPermissionsLoginInput = { identifier: Scalars['String']['input']; password: Scalars['String']['input']; - provider: Scalars['String']['input']; + provider?: Scalars['String']['input']; }; export type UsersPermissionsPermissionFiltersInput = { - action: InputMaybe; - and: InputMaybe>>; - createdAt: InputMaybe; - documentId: InputMaybe; - not: InputMaybe; - or: InputMaybe>>; - publishedAt: InputMaybe; - role: InputMaybe; - updatedAt: InputMaybe; + action?: InputMaybe; + and?: InputMaybe>>; + createdAt?: InputMaybe; + documentId?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + publishedAt?: InputMaybe; + role?: InputMaybe; + updatedAt?: InputMaybe; }; export type UsersPermissionsRegisterInput = { @@ -500,54 +500,54 @@ export type UsersPermissionsRegisterInput = { }; export type UsersPermissionsRoleFiltersInput = { - and: InputMaybe>>; - createdAt: InputMaybe; - description: InputMaybe; - documentId: InputMaybe; - name: InputMaybe; - not: InputMaybe; - or: InputMaybe>>; - permissions: InputMaybe; - publishedAt: InputMaybe; - type: InputMaybe; - updatedAt: InputMaybe; - users: InputMaybe; + and?: InputMaybe>>; + createdAt?: InputMaybe; + description?: InputMaybe; + documentId?: InputMaybe; + name?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + permissions?: InputMaybe; + publishedAt?: InputMaybe; + type?: InputMaybe; + updatedAt?: InputMaybe; + users?: InputMaybe; }; export type UsersPermissionsRoleInput = { - description: InputMaybe; - name: InputMaybe; - permissions: InputMaybe>>; - publishedAt: InputMaybe; - type: InputMaybe; - users: InputMaybe>>; + description?: InputMaybe; + name?: InputMaybe; + permissions?: InputMaybe>>; + publishedAt?: InputMaybe; + type?: InputMaybe; + users?: InputMaybe>>; }; export type UsersPermissionsUserFiltersInput = { - and: InputMaybe>>; - blocked: InputMaybe; - confirmed: InputMaybe; - createdAt: InputMaybe; - documentId: InputMaybe; - email: InputMaybe; - not: InputMaybe; - or: InputMaybe>>; - provider: InputMaybe; - publishedAt: InputMaybe; - role: InputMaybe; - updatedAt: InputMaybe; - username: InputMaybe; + and?: InputMaybe>>; + blocked?: InputMaybe; + confirmed?: InputMaybe; + createdAt?: InputMaybe; + documentId?: InputMaybe; + email?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; + provider?: InputMaybe; + publishedAt?: InputMaybe; + role?: InputMaybe; + updatedAt?: InputMaybe; + username?: InputMaybe; }; export type UsersPermissionsUserInput = { - blocked: InputMaybe; - confirmed: InputMaybe; - email: InputMaybe; - password: InputMaybe; - provider: InputMaybe; - publishedAt: InputMaybe; - role: InputMaybe; - username: InputMaybe; + blocked?: InputMaybe; + confirmed?: InputMaybe; + email?: InputMaybe; + password?: InputMaybe; + provider?: InputMaybe; + publishedAt?: InputMaybe; + role?: InputMaybe; + username?: InputMaybe; }; export type RegisterMutationVariables = Exact<{ @@ -557,7 +557,7 @@ export type RegisterMutationVariables = Exact<{ }>; -export type RegisterMutation = { __typename?: 'Mutation', register: { __typename?: 'UsersPermissionsLoginPayload', jwt: string | null, user: { __typename?: 'UsersPermissionsMe', username: string } } }; +export type RegisterMutation = { __typename?: 'Mutation', register: { __typename?: 'UsersPermissionsLoginPayload', jwt?: string | null | undefined, user: { __typename?: 'UsersPermissionsMe', username: string } } }; export type LoginMutationVariables = Exact<{ identifier: Scalars['String']['input']; @@ -565,7 +565,9 @@ export type LoginMutationVariables = Exact<{ }>; -export type LoginMutation = { __typename?: 'Mutation', login: { __typename?: 'UsersPermissionsLoginPayload', jwt: string | null } }; +export type LoginMutation = { __typename?: 'Mutation', login: { __typename?: 'UsersPermissionsLoginPayload', jwt?: string | null | undefined } }; + +export type CustomerProfileFragment = { __typename?: 'Customer', active?: boolean | null | undefined, documentId: string, name: string, phone: string, photoUrl?: string | null | undefined, role: Enum_Customer_Role, telegramId?: any | null | undefined }; export type CreateCustomerMutationVariables = Exact<{ name: Scalars['String']['input']; @@ -574,17 +576,26 @@ export type CreateCustomerMutationVariables = Exact<{ }>; -export type CreateCustomerMutation = { __typename?: 'Mutation', createCustomer: { __typename?: 'Customer', documentId: string, name: string, telegramId: any | null, phone: string, role: Enum_Customer_Role, active: boolean | null, createdAt: any | null, updatedAt: any | null, publishedAt: any | null } | null }; +export type CreateCustomerMutation = { __typename?: 'Mutation', createCustomer?: { __typename?: 'Customer', active?: boolean | null | undefined, documentId: string, name: string, phone: string, photoUrl?: string | null | undefined, role: Enum_Customer_Role, telegramId?: any | null | undefined } | null | undefined }; export type GetCustomerQueryVariables = Exact<{ telegramId: Scalars['Long']['input']; }>; -export type GetCustomerQuery = { __typename?: 'Query', customers: Array<{ __typename?: 'Customer', name: string, phone: string, role: Enum_Customer_Role, photoUrl: string | null } | null> }; +export type GetCustomerQuery = { __typename?: 'Query', customers: Array<{ __typename?: 'Customer', active?: boolean | null | undefined, documentId: string, name: string, phone: string, photoUrl?: string | null | undefined, role: Enum_Customer_Role, telegramId?: any | null | undefined } | null | undefined> }; + +export type UpdateCustomerProfileMutationVariables = Exact<{ + documentId: Scalars['ID']['input']; + data: CustomerInput; +}>; +export type UpdateCustomerProfileMutation = { __typename?: 'Mutation', updateCustomer?: { __typename?: 'Customer', active?: boolean | null | undefined, documentId: string, name: string, phone: string, photoUrl?: string | null | undefined, role: Enum_Customer_Role, telegramId?: any | null | undefined } | null | undefined }; + +export const CustomerProfileFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomerProfile"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Customer"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"active"}},{"kind":"Field","name":{"kind":"Name","value":"documentId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"phone"}},{"kind":"Field","name":{"kind":"Name","value":"photoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"telegramId"}}]}}]} as unknown as DocumentNode; export const RegisterDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"Register"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"identifier"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"password"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"email"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"register"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"username"},"value":{"kind":"Variable","name":{"kind":"Name","value":"identifier"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"password"},"value":{"kind":"Variable","name":{"kind":"Name","value":"password"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"email"},"value":{"kind":"Variable","name":{"kind":"Name","value":"email"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"jwt"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"username"}}]}}]}}]}}]} as unknown as DocumentNode; export const LoginDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"Login"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"identifier"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"password"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"login"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"identifier"},"value":{"kind":"Variable","name":{"kind":"Name","value":"identifier"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"password"},"value":{"kind":"Variable","name":{"kind":"Name","value":"password"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"jwt"}}]}}]}}]} as unknown as DocumentNode; -export const CreateCustomerDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateCustomer"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"name"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"telegramId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Long"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"phone"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createCustomer"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"data"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"name"},"value":{"kind":"Variable","name":{"kind":"Name","value":"name"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"telegramId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"telegramId"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"phone"},"value":{"kind":"Variable","name":{"kind":"Name","value":"phone"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"role"},"value":{"kind":"EnumValue","value":"client"}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"documentId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"telegramId"}},{"kind":"Field","name":{"kind":"Name","value":"phone"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"active"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"publishedAt"}}]}}]}}]} as unknown as DocumentNode; -export const GetCustomerDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetCustomer"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"telegramId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Long"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"customers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filters"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"telegramId"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"telegramId"}}}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"phone"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"photoUrl"}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const CreateCustomerDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateCustomer"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"name"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"telegramId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Long"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"phone"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createCustomer"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"data"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"name"},"value":{"kind":"Variable","name":{"kind":"Name","value":"name"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"telegramId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"telegramId"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"phone"},"value":{"kind":"Variable","name":{"kind":"Name","value":"phone"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"role"},"value":{"kind":"EnumValue","value":"client"}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomerProfile"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomerProfile"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Customer"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"active"}},{"kind":"Field","name":{"kind":"Name","value":"documentId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"phone"}},{"kind":"Field","name":{"kind":"Name","value":"photoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"telegramId"}}]}}]} as unknown as DocumentNode; +export const GetCustomerDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetCustomer"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"telegramId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Long"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"customers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filters"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"telegramId"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"telegramId"}}}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomerProfile"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomerProfile"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Customer"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"active"}},{"kind":"Field","name":{"kind":"Name","value":"documentId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"phone"}},{"kind":"Field","name":{"kind":"Name","value":"photoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"telegramId"}}]}}]} as unknown as DocumentNode; +export const UpdateCustomerProfileDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateCustomerProfile"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"documentId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"data"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CustomerInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateCustomer"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"documentId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"documentId"}}},{"kind":"Argument","name":{"kind":"Name","value":"data"},"value":{"kind":"Variable","name":{"kind":"Name","value":"data"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomerProfile"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomerProfile"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Customer"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"active"}},{"kind":"Field","name":{"kind":"Name","value":"documentId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"phone"}},{"kind":"Field","name":{"kind":"Name","value":"photoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"telegramId"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1577049..53005d3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -243,6 +243,9 @@ importers: react-dom: specifier: 'catalog:' version: 19.0.0(react@19.0.0) + use-debounce: + specifier: ^10.0.4 + version: 10.0.4(react@19.0.0) zod: specifier: 'catalog:' version: 3.24.1 @@ -5741,6 +5744,12 @@ packages: urlpattern-polyfill@8.0.2: resolution: {integrity: sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==} + use-debounce@10.0.4: + resolution: {integrity: sha512-6Cf7Yr7Wk7Kdv77nnJMf6de4HuDE4dTxKij+RqE9rufDsI6zsbjyAxcH5y2ueJCQAnfgKbzXbZHYlkFwmBlWkw==} + engines: {node: '>= 16.0.0'} + peerDependencies: + react: '*' + use-intl@3.26.0: resolution: {integrity: sha512-HGXmpjGlbEv1uFZPfm557LK8p/hv0pKF9UwnrJeHUTxQx6bUGzMgpmPRLCVY3zkr7hfjy4LPwQJfk4Fhnn+dIg==} peerDependencies: @@ -12141,6 +12150,10 @@ snapshots: urlpattern-polyfill@8.0.2: {} + use-debounce@10.0.4(react@19.0.0): + dependencies: + react: 19.0.0 + use-intl@3.26.0(react@19.0.0): dependencies: '@formatjs/fast-memoize': 2.2.5