From 0b188ee5edb1f87b875eb402ae95b809627baa8d Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Mon, 8 Sep 2025 13:42:30 +0300 Subject: [PATCH] refactor(contacts): rename masters to invited and update related functionality - Changed the terminology from "masters" to "invited" and "invitedBy" across the codebase for clarity and consistency. - Updated the `addContact` function to reflect the new naming convention. - Refactored API actions and server methods to support the new invited structure. - Adjusted components and hooks to utilize the updated invited data, enhancing user experience and simplifying logic. --- apps/bot/src/bot/conversations/add-contact.ts | 6 +-- apps/web/actions/api/customers.ts | 6 +-- apps/web/actions/api/server/customers.ts | 20 +++---- .../components/contacts/dropdown-filter.tsx | 8 +-- .../orders/order-form/contacts-grid.tsx | 12 ++--- .../components/orders/order-form/index.tsx | 6 +-- apps/web/context/contacts.tsx | 2 +- apps/web/hooks/api/contacts/query.ts | 14 ++--- .../api/contacts/use-customer-contacts.ts | 46 ++++++++-------- packages/graphql/api/customers.ts | 52 ++++++++++--------- packages/graphql/api/orders.test.js | 44 ++++++++-------- packages/graphql/operations/customers.graphql | 8 +-- .../graphql/types/operations.generated.ts | 20 +++---- 13 files changed, 123 insertions(+), 121 deletions(-) diff --git a/apps/bot/src/bot/conversations/add-contact.ts b/apps/bot/src/bot/conversations/add-contact.ts index d7ea928..047c6a1 100644 --- a/apps/bot/src/bot/conversations/add-contact.ts +++ b/apps/bot/src/bot/conversations/add-contact.ts @@ -57,9 +57,9 @@ export async function addContact(conversation: Conversation, c if (!documentId) throw new Error('Клиент не создан'); } - // Добавляем текущего мастера к клиенту - const masters = [customer.documentId]; - await customerService.addMasters({ data: { masters }, documentId }); + // Добавляем текущего пользователя к приглашенному + const invitedBy = [customer.documentId]; + await customerService.addInvitedBy({ data: { invitedBy }, documentId }); // Отправляем подтверждения и инструкции await ctx.reply(await conversation.external(({ t }) => t('msg-contact-added', { name }))); diff --git a/apps/web/actions/api/customers.ts b/apps/web/actions/api/customers.ts index f39b0e1..32d5522 100644 --- a/apps/web/actions/api/customers.ts +++ b/apps/web/actions/api/customers.ts @@ -1,8 +1,8 @@ import * as customers from './server/customers'; import { wrapClientAction } from '@/utils/actions'; -export const addMasters = wrapClientAction(customers.addMasters); -export const getClients = wrapClientAction(customers.getClients); +export const addInvitedBy = wrapClientAction(customers.addInvitedBy); +export const getInvited = wrapClientAction(customers.getInvited); export const getCustomer = wrapClientAction(customers.getCustomer); -export const getMasters = wrapClientAction(customers.getMasters); +export const getInvitedBy = wrapClientAction(customers.getInvitedBy); export const updateCustomer = wrapClientAction(customers.updateCustomer); diff --git a/apps/web/actions/api/server/customers.ts b/apps/web/actions/api/server/customers.ts index 6739e23..97a6f6f 100644 --- a/apps/web/actions/api/server/customers.ts +++ b/apps/web/actions/api/server/customers.ts @@ -6,16 +6,10 @@ import { CustomersService } from '@repo/graphql/api/customers'; const getService = useService(CustomersService); -export async function addMasters(...variables: Parameters) { +export async function addInvitedBy(...variables: Parameters) { const service = await getService(); - return wrapServerAction(() => service.addMasters(...variables)); -} - -export async function getClients(...variables: Parameters) { - const service = await getService(); - - return wrapServerAction(() => service.getClients(...variables)); + return wrapServerAction(() => service.addInvitedBy(...variables)); } export async function getCustomer(...variables: Parameters) { @@ -24,10 +18,16 @@ export async function getCustomer(...variables: Parameters service.getCustomer(...variables)); } -export async function getMasters(...variables: Parameters) { +export async function getInvited(...variables: Parameters) { const service = await getService(); - return wrapServerAction(() => service.getMasters(...variables)); + return wrapServerAction(() => service.getInvited(...variables)); +} + +export async function getInvitedBy(...variables: Parameters) { + const service = await getService(); + + return wrapServerAction(() => service.getInvitedBy(...variables)); } export async function updateCustomer(...variables: Parameters) { diff --git a/apps/web/components/contacts/dropdown-filter.tsx b/apps/web/components/contacts/dropdown-filter.tsx index b6e9bbc..dcffaa3 100644 --- a/apps/web/components/contacts/dropdown-filter.tsx +++ b/apps/web/components/contacts/dropdown-filter.tsx @@ -13,8 +13,8 @@ import { use } from 'react'; const filterLabels: Record = { all: 'Все', - clients: 'Клиенты', - masters: 'Мастера', + invited: 'Приглашенные', + invitedBy: 'Кто пригласил', }; export function ContactsFilter() { @@ -30,8 +30,8 @@ export function ContactsFilter() { setFilter('all')}>Все - setFilter('clients')}>Клиенты - setFilter('masters')}>Мастера + setFilter('invited')}>Приглашенные + setFilter('invitedBy')}>Кто пригласил ); diff --git a/apps/web/components/orders/order-form/contacts-grid.tsx b/apps/web/components/orders/order-form/contacts-grid.tsx index c44fe5e..d996ee2 100644 --- a/apps/web/components/orders/order-form/contacts-grid.tsx +++ b/apps/web/components/orders/order-form/contacts-grid.tsx @@ -86,13 +86,13 @@ export function ContactsGridBase({ contacts, onSelect, selected, title }: Contac ); } -export const MastersGrid = withContext(ContactsContextProvider)(function () { +export const InvitedByGrid = withContext(ContactsContextProvider)(function () { const { contacts, isLoading, setFilter } = useCustomerContacts(); const masterId = useOrderStore((store) => store.masterId); const setMasterId = useOrderStore((store) => store.setMasterId); useEffect(() => { - setFilter('masters'); + setFilter('invitedBy'); }, [setFilter]); if (isLoading) return ; @@ -102,18 +102,18 @@ export const MastersGrid = withContext(ContactsContextProvider)(function () { contacts={contacts} onSelect={(contactId) => setMasterId(contactId)} selected={masterId} - title="Мастера" + title="Кто пригласил" /> ); }); -export const ClientsGrid = withContext(ContactsContextProvider)(function () { +export const InvitedGrid = withContext(ContactsContextProvider)(function () { const { contacts, isLoading, setFilter } = useCustomerContacts(); const clientId = useOrderStore((store) => store.clientId); const setClientId = useOrderStore((store) => store.setClientId); useEffect(() => { - setFilter('clients'); + setFilter('invited'); }, [setFilter]); if (isLoading) return ; @@ -123,7 +123,7 @@ export const ClientsGrid = withContext(ContactsContextProvider)(function () { contacts={contacts} onSelect={(contactId) => setClientId(contactId)} selected={clientId} - title="Клиенты" + title="Приглашенные" /> ); }); diff --git a/apps/web/components/orders/order-form/index.tsx b/apps/web/components/orders/order-form/index.tsx index 92f1bca..ec670f9 100644 --- a/apps/web/components/orders/order-form/index.tsx +++ b/apps/web/components/orders/order-form/index.tsx @@ -1,7 +1,7 @@ 'use client'; import { BackButton } from './back-button'; -import { ClientsGrid, MastersGrid } from './contacts-grid'; +import { InvitedGrid, InvitedByGrid } from './contacts-grid'; import { DateTimeSelect } from './datetime-select'; import { NextButton } from './next-button'; import { ErrorPage, SuccessPage } from './result'; @@ -15,10 +15,10 @@ import { LoadingSpinner } from '@repo/ui/components/ui/spinner'; import { type JSX } from 'react'; const STEP_COMPONENTS: Record = { - 'client-select': , + 'client-select': , 'datetime-select': , error: , - 'master-select': , + 'master-select': , 'service-select': , success: , }; diff --git a/apps/web/context/contacts.tsx b/apps/web/context/contacts.tsx index 9b55a0c..a5049a8 100644 --- a/apps/web/context/contacts.tsx +++ b/apps/web/context/contacts.tsx @@ -2,7 +2,7 @@ import { createContext, type PropsWithChildren, useMemo, useState } from 'react'; -export type FilterType = 'all' | 'clients' | 'masters'; +export type FilterType = 'all' | 'invited' | 'invitedBy'; type ContextType = { filter: FilterType; setFilter: (filter: FilterType) => void }; diff --git a/apps/web/hooks/api/contacts/query.ts b/apps/web/hooks/api/contacts/query.ts index afe8e97..fc07155 100644 --- a/apps/web/hooks/api/contacts/query.ts +++ b/apps/web/hooks/api/contacts/query.ts @@ -1,23 +1,23 @@ -import { getClients, getMasters } from '@/actions/api/customers'; +import { getInvited, getInvitedBy } from '@/actions/api/customers'; import { useQuery } from '@tanstack/react-query'; import { useSession } from 'next-auth/react'; -export const useClientsQuery = (props?: Parameters[0]) => { +export const useInvitedQuery = (props?: Parameters[0]) => { const { data: session } = useSession(); const telegramId = props?.telegramId || session?.user?.telegramId; return useQuery({ - queryFn: () => getClients({ telegramId }), - queryKey: ['customer', 'telegramId', telegramId, 'clients'], + queryFn: () => getInvited({ telegramId }), + queryKey: ['customer', 'telegramId', telegramId, 'invited'], }); }; -export const useMastersQuery = (props?: Parameters[0]) => { +export const useInvitedByQuery = (props?: Parameters[0]) => { const { data: session } = useSession(); const telegramId = props?.telegramId || session?.user?.telegramId; return useQuery({ - queryFn: () => getMasters({ telegramId }), - queryKey: ['customer', 'telegramId', telegramId, 'masters'], + queryFn: () => getInvitedBy({ telegramId }), + queryKey: ['customer', 'telegramId', telegramId, 'invitedBy'], }); }; diff --git a/apps/web/hooks/api/contacts/use-customer-contacts.ts b/apps/web/hooks/api/contacts/use-customer-contacts.ts index cd11a02..3ecd709 100644 --- a/apps/web/hooks/api/contacts/use-customer-contacts.ts +++ b/apps/web/hooks/api/contacts/use-customer-contacts.ts @@ -1,6 +1,6 @@ 'use client'; -import { useClientsQuery, useMastersQuery } from './query'; +import { useInvitedByQuery, useInvitedQuery } from './query'; import { ContactsContext } from '@/context/contacts'; import { sift } from 'radashi'; import { use, useEffect, useMemo } from 'react'; @@ -9,39 +9,39 @@ export function useCustomerContacts() { const { filter, setFilter } = use(ContactsContext); const { - data: clientsData, - isLoading: isLoadingClients, - refetch: refetchClients, - } = useClientsQuery(); + data: invitedData, + isLoading: isLoadingInvited, + refetch: refetchInvited, + } = useInvitedQuery(); const { - data: mastersData, - isLoading: isLoadingMasters, - refetch: refetchMasters, - } = useMastersQuery(); + data: invitedByData, + isLoading: isLoadingInvitedBy, + refetch: refetchInvitedBy, + } = useInvitedByQuery(); - const clients = clientsData?.clients || []; - const masters = mastersData?.masters || []; + const invited = invitedData?.invited || []; + const invitedBy = invitedByData?.invitedBy || []; - const isLoading = isLoadingClients || isLoadingMasters; + const isLoading = isLoadingInvited || isLoadingInvitedBy; useEffect(() => { - if (filter === 'clients') { - refetchClients(); - } else if (filter === 'masters') { - refetchMasters(); + if (filter === 'invited') { + refetchInvited(); + } else if (filter === 'invitedBy') { + refetchInvitedBy(); } else { - refetchClients(); - refetchMasters(); + refetchInvited(); + refetchInvitedBy(); } - }, [filter, refetchClients, refetchMasters]); + }, [filter, refetchInvited, refetchInvitedBy]); const contacts = useMemo(() => { - if (filter === 'clients') return sift(clients); - if (filter === 'masters') return sift(masters); + if (filter === 'invited') return sift(invited); + if (filter === 'invitedBy') return sift(invitedBy); - return [...sift(clients), ...sift(masters)]; - }, [clients, masters, filter]); + return [...sift(invited), ...sift(invitedBy)]; + }, [invited, invitedBy, filter]); return { contacts, filter, isLoading, setFilter }; } diff --git a/packages/graphql/api/customers.ts b/packages/graphql/api/customers.ts index c8bec94..a902e7d 100644 --- a/packages/graphql/api/customers.ts +++ b/packages/graphql/api/customers.ts @@ -5,10 +5,10 @@ import { BaseService } from './base'; import { type VariablesOf } from '@graphql-typed-document-node/core'; export class CustomersService extends BaseService { - async addMasters(variables: VariablesOf) { + async addInvitedBy(variables: VariablesOf) { await this.checkIsBanned(); - const newMasterIds = variables.data.masters; + const newInvitedByIds = variables.data.invitedBy; // Проверяем, что пользователь не пытается изменить поле bannedUntil if (variables.data.bannedUntil !== undefined) { @@ -16,21 +16,23 @@ export class CustomersService extends BaseService { } const { mutate, query } = await getClientWithToken(); - const getMastersResult = await query({ - query: GQL.GetMastersDocument, + const getInvitedByResult = await query({ + query: GQL.GetInvitedByDocument, variables, }); - const existingMasterIds = getMastersResult?.data?.customers + const existingInvitedByIds = getInvitedByResult?.data?.customers ?.at(0) - ?.masters.map((x) => x?.documentId); + ?.invitedBy.map((x) => x?.documentId); - const newMastersIds = [...new Set([...(existingMasterIds || []), ...(newMasterIds || [])])]; + const newInvitedByIdsList = [ + ...new Set([...(existingInvitedByIds || []), ...(newInvitedByIds || [])]), + ]; const mutationResult = await mutate({ mutation: GQL.UpdateCustomerDocument, variables: { - data: { masters: newMastersIds }, + data: { invitedBy: newInvitedByIdsList }, documentId: variables.documentId, }, }); @@ -41,21 +43,6 @@ export class CustomersService extends BaseService { return mutationResult.data; } - async getClients(variables?: VariablesOf) { - await this.checkIsBanned(); - - const { query } = await getClientWithToken(); - - const result = await query({ - query: GQL.GetClientsDocument, - variables, - }); - - const customer = result.data.customers.at(0); - - return customer; - } - async getCustomer(variables: VariablesOf) { await this.checkIsBanned(); @@ -71,13 +58,28 @@ export class CustomersService extends BaseService { return { customer }; } - async getMasters(variables?: VariablesOf) { + async getInvited(variables?: VariablesOf) { await this.checkIsBanned(); const { query } = await getClientWithToken(); const result = await query({ - query: GQL.GetMastersDocument, + query: GQL.GetInvitedDocument, + variables, + }); + + const customer = result.data.customers.at(0); + + return customer; + } + + async getInvitedBy(variables?: VariablesOf) { + await this.checkIsBanned(); + + const { query } = await getClientWithToken(); + + const result = await query({ + query: GQL.GetInvitedByDocument, variables, }); diff --git a/packages/graphql/api/orders.test.js b/packages/graphql/api/orders.test.js index c20643d..934bdd4 100644 --- a/packages/graphql/api/orders.test.js +++ b/packages/graphql/api/orders.test.js @@ -121,8 +121,8 @@ describe('OrdersService', () => { getCustomer: vi.fn().mockResolvedValue({ customer: mockCustomer, }), - getMasters: vi.fn().mockResolvedValue({ - masters: [mockMaster], + getInvitedBy: vi.fn().mockResolvedValue({ + invitedBy: [mockMaster], }), })); @@ -240,8 +240,8 @@ describe('OrdersService', () => { getCustomer: vi.fn().mockResolvedValue({ customer: masterCustomer, }), - getMasters: vi.fn().mockResolvedValue({ - masters: [masterCustomer], + getInvitedBy: vi.fn().mockResolvedValue({ + invitedBy: [masterCustomer], }), })); @@ -381,8 +381,8 @@ describe('OrdersService', () => { }); mockCustomersService.mockImplementation(() => ({ getCustomer: mockGetCustomer, - getMasters: vi.fn().mockResolvedValue({ - masters: [mockMaster], + getInvitedBy: vi.fn().mockResolvedValue({ + invitedBy: [mockMaster], }), })); @@ -432,8 +432,8 @@ describe('OrdersService', () => { }); mockCustomersService.mockImplementation(() => ({ getCustomer: mockGetCustomer, - getMasters: vi.fn().mockResolvedValue({ - masters: [mockMaster], + getInvitedBy: vi.fn().mockResolvedValue({ + invitedBy: [mockMaster], }), })); @@ -468,8 +468,8 @@ describe('OrdersService', () => { }); mockCustomersService.mockImplementation(() => ({ getCustomer: mockGetCustomer, - getMasters: vi.fn().mockResolvedValue({ - masters: [mockMaster], + getInvitedBy: vi.fn().mockResolvedValue({ + invitedBy: [mockMaster], }), })); @@ -509,8 +509,8 @@ describe('OrdersService', () => { }); mockCustomersService.mockImplementation(() => ({ getCustomer: mockGetCustomer, - getMasters: vi.fn().mockResolvedValue({ - masters: [mockMaster], + getInvitedBy: vi.fn().mockResolvedValue({ + invitedBy: [mockMaster], }), })); @@ -555,8 +555,8 @@ describe('OrdersService', () => { }); mockCustomersService.mockImplementation(() => ({ getCustomer: mockGetCustomer, - getMasters: vi.fn().mockResolvedValue({ - masters: [inactiveMaster], + getInvitedBy: vi.fn().mockResolvedValue({ + invitedBy: [inactiveMaster], }), })); @@ -602,8 +602,8 @@ describe('OrdersService', () => { }); mockCustomersService.mockImplementation(() => ({ getCustomer: mockGetCustomer, - getMasters: vi.fn().mockResolvedValue({ - masters: [activeCustomerAsMaster], + getInvitedBy: vi.fn().mockResolvedValue({ + invitedBy: [activeCustomerAsMaster], }), })); @@ -638,8 +638,8 @@ describe('OrdersService', () => { }); mockCustomersService.mockImplementation(() => ({ getCustomer: mockGetCustomer, - getMasters: vi.fn().mockResolvedValue({ - masters: [], // клиент не связан с мастером + getInvitedBy: vi.fn().mockResolvedValue({ + invitedBy: [], // клиент не связан с мастером }), })); @@ -685,8 +685,8 @@ describe('OrdersService', () => { }); mockCustomersService.mockImplementation(() => ({ getCustomer: mockGetCustomer, - getMasters: vi.fn().mockResolvedValue({ - masters: [mockMaster], + getInvitedBy: vi.fn().mockResolvedValue({ + invitedBy: [mockMaster], }), })); @@ -726,8 +726,8 @@ describe('OrdersService', () => { }); mockCustomersService.mockImplementation(() => ({ getCustomer: mockGetCustomer, - getMasters: vi.fn().mockResolvedValue({ - masters: [mockMaster], + getInvitedBy: vi.fn().mockResolvedValue({ + invitedBy: [mockMaster], }), })); diff --git a/packages/graphql/operations/customers.graphql b/packages/graphql/operations/customers.graphql index f059be2..9066186 100644 --- a/packages/graphql/operations/customers.graphql +++ b/packages/graphql/operations/customers.graphql @@ -33,7 +33,7 @@ query GetCustomer($phone: String, $telegramId: Long, $documentId: ID) { } } -query GetMasters($phone: String, $telegramId: Long, $documentId: ID) { +query GetInvitedBy($phone: String, $telegramId: Long, $documentId: ID) { customers( filters: { or: [ @@ -45,13 +45,13 @@ query GetMasters($phone: String, $telegramId: Long, $documentId: ID) { } ) { documentId - masters { + invitedBy { ...CustomerFields } } } -query GetClients($phone: String, $telegramId: Long) { +query GetInvited($phone: String, $telegramId: Long) { customers( filters: { or: [{ phone: { eq: $phone } }, { telegramId: { eq: $telegramId } }] @@ -59,7 +59,7 @@ query GetClients($phone: String, $telegramId: Long) { } ) { documentId - clients { + invited { ...CustomerFields } } diff --git a/packages/graphql/types/operations.generated.ts b/packages/graphql/types/operations.generated.ts index 38bc18e..2b62f78 100644 --- a/packages/graphql/types/operations.generated.ts +++ b/packages/graphql/types/operations.generated.ts @@ -79,10 +79,10 @@ export type CustomerFiltersInput = { and?: InputMaybe>>; bannedUntil?: InputMaybe; blocks?: InputMaybe; - clients?: InputMaybe; createdAt?: InputMaybe; documentId?: InputMaybe; - masters?: InputMaybe; + invited?: InputMaybe; + invitedBy?: InputMaybe; name?: InputMaybe; not?: InputMaybe; or?: InputMaybe>>; @@ -102,8 +102,8 @@ export type CustomerInput = { active?: InputMaybe; bannedUntil?: InputMaybe; blocks?: InputMaybe>>; - clients?: InputMaybe>>; - masters?: InputMaybe>>; + invited?: InputMaybe>>; + invitedBy?: InputMaybe>>; name?: InputMaybe; orders?: InputMaybe>>; phone?: InputMaybe; @@ -768,22 +768,22 @@ export type GetCustomerQueryVariables = Exact<{ export type GetCustomerQuery = { __typename?: 'Query', customers: Array<{ __typename?: 'Customer', active?: boolean | null | undefined, bannedUntil?: string | null | undefined, documentId: string, name: string, phone: string, photoUrl?: string | null | undefined, role: Enum_Customer_Role, telegramId?: number | null | undefined, services: Array<{ __typename?: 'Service', documentId: string, name: string } | null | undefined> } | null | undefined> }; -export type GetMastersQueryVariables = Exact<{ +export type GetInvitedByQueryVariables = Exact<{ phone?: InputMaybe; telegramId?: InputMaybe; documentId?: InputMaybe; }>; -export type GetMastersQuery = { __typename?: 'Query', customers: Array<{ __typename?: 'Customer', documentId: string, masters: Array<{ __typename?: 'Customer', active?: boolean | null | undefined, bannedUntil?: string | null | undefined, documentId: string, name: string, phone: string, photoUrl?: string | null | undefined, role: Enum_Customer_Role, telegramId?: number | null | undefined, services: Array<{ __typename?: 'Service', documentId: string, name: string } | null | undefined> } | null | undefined> } | null | undefined> }; +export type GetInvitedByQuery = { __typename?: 'Query', customers: Array<{ __typename?: 'Customer', documentId: string, invitedBy: Array<{ __typename?: 'Customer', active?: boolean | null | undefined, bannedUntil?: string | null | undefined, documentId: string, name: string, phone: string, photoUrl?: string | null | undefined, role: Enum_Customer_Role, telegramId?: number | null | undefined, services: Array<{ __typename?: 'Service', documentId: string, name: string } | null | undefined> } | null | undefined> } | null | undefined> }; -export type GetClientsQueryVariables = Exact<{ +export type GetInvitedQueryVariables = Exact<{ phone?: InputMaybe; telegramId?: InputMaybe; }>; -export type GetClientsQuery = { __typename?: 'Query', customers: Array<{ __typename?: 'Customer', documentId: string, clients: Array<{ __typename?: 'Customer', active?: boolean | null | undefined, bannedUntil?: string | null | undefined, documentId: string, name: string, phone: string, photoUrl?: string | null | undefined, role: Enum_Customer_Role, telegramId?: number | null | undefined, services: Array<{ __typename?: 'Service', documentId: string, name: string } | null | undefined> } | null | undefined> } | null | undefined> }; +export type GetInvitedQuery = { __typename?: 'Query', customers: Array<{ __typename?: 'Customer', documentId: string, invited: Array<{ __typename?: 'Customer', active?: boolean | null | undefined, bannedUntil?: string | null | undefined, documentId: string, name: string, phone: string, photoUrl?: string | null | undefined, role: Enum_Customer_Role, telegramId?: number | null | undefined, services: Array<{ __typename?: 'Service', documentId: string, name: string } | null | undefined> } | null | undefined> } | null | undefined> }; export type UpdateCustomerMutationVariables = Exact<{ documentId: Scalars['ID']['input']; @@ -978,8 +978,8 @@ export const RegisterDocument = {"kind":"Document","definitions":[{"kind":"Opera 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":"NamedType","name":{"kind":"Name","value":"Long"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"phone"}},"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"}}]}}]}}]} 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":"phone"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"telegramId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Long"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"documentId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}],"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":"or"},"value":{"kind":"ListValue","values":[{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"phone"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"phone"}}}]}}]},{"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"}}}]}}]},{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"documentId"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"documentId"}}}]}}]}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomerFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomerFields"},"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":"bannedUntil"}},{"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"}},{"kind":"Field","name":{"kind":"Name","value":"services"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filters"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"active"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"eq"},"value":{"kind":"BooleanValue","value":true}}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"documentId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode; -export const GetMastersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetMasters"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"phone"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"telegramId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Long"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"documentId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}],"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":"or"},"value":{"kind":"ListValue","values":[{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"phone"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"phone"}}}]}}]},{"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"}}}]}}]},{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"documentId"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"documentId"}}}]}}]}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"documentId"}},{"kind":"Field","name":{"kind":"Name","value":"masters"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomerFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomerFields"},"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":"bannedUntil"}},{"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"}},{"kind":"Field","name":{"kind":"Name","value":"services"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filters"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"active"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"eq"},"value":{"kind":"BooleanValue","value":true}}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"documentId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode; -export const GetClientsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetClients"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"phone"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"telegramId"}},"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":"or"},"value":{"kind":"ListValue","values":[{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"phone"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"phone"}}}]}}]},{"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":"documentId"}},{"kind":"Field","name":{"kind":"Name","value":"clients"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomerFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomerFields"},"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":"bannedUntil"}},{"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"}},{"kind":"Field","name":{"kind":"Name","value":"services"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filters"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"active"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"eq"},"value":{"kind":"BooleanValue","value":true}}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"documentId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode; +export const GetInvitedByDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetInvitedBy"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"phone"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"telegramId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Long"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"documentId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}],"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":"or"},"value":{"kind":"ListValue","values":[{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"phone"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"phone"}}}]}}]},{"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"}}}]}}]},{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"documentId"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"documentId"}}}]}}]}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"documentId"}},{"kind":"Field","name":{"kind":"Name","value":"invitedBy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomerFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomerFields"},"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":"bannedUntil"}},{"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"}},{"kind":"Field","name":{"kind":"Name","value":"services"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filters"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"active"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"eq"},"value":{"kind":"BooleanValue","value":true}}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"documentId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode; +export const GetInvitedDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetInvited"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"phone"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"telegramId"}},"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":"or"},"value":{"kind":"ListValue","values":[{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"phone"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"phone"}}}]}}]},{"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":"documentId"}},{"kind":"Field","name":{"kind":"Name","value":"invited"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomerFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomerFields"},"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":"bannedUntil"}},{"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"}},{"kind":"Field","name":{"kind":"Name","value":"services"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filters"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"active"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"eq"},"value":{"kind":"BooleanValue","value":true}}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"documentId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode; export const UpdateCustomerDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateCustomer"},"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":"CustomerFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomerFields"},"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":"bannedUntil"}},{"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"}},{"kind":"Field","name":{"kind":"Name","value":"services"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filters"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"active"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"eq"},"value":{"kind":"BooleanValue","value":true}}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"documentId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode; export const GetOrdersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetOrders"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filters"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"OrderFiltersInput"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"pagination"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PaginationArg"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"sort"}},"type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"orders"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filters"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filters"}}},{"kind":"Argument","name":{"kind":"Name","value":"sort"},"value":{"kind":"Variable","name":{"kind":"Name","value":"sort"}}},{"kind":"Argument","name":{"kind":"Name","value":"pagination"},"value":{"kind":"Variable","name":{"kind":"Name","value":"pagination"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"OrderFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomerFields"},"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":"bannedUntil"}},{"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"}},{"kind":"Field","name":{"kind":"Name","value":"services"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filters"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"active"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"eq"},"value":{"kind":"BooleanValue","value":true}}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"documentId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ServiceFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Service"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"documentId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"active"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}},{"kind":"Field","name":{"kind":"Name","value":"master"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomerFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SlotFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Slot"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"documentId"}},{"kind":"Field","name":{"kind":"Name","value":"datetime_start"}},{"kind":"Field","name":{"kind":"Name","value":"datetime_end"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"master"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomerFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"OrderFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Order"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"documentId"}},{"kind":"Field","name":{"kind":"Name","value":"datetime_start"}},{"kind":"Field","name":{"kind":"Name","value":"datetime_end"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"order_number"}},{"kind":"Field","name":{"kind":"Name","value":"services"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ServiceFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"client"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomerFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"slot"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SlotFields"}}]}}]}}]} as unknown as DocumentNode; export const GetOrderDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetOrder"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"documentId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"order"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"documentId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"documentId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"OrderFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomerFields"},"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":"bannedUntil"}},{"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"}},{"kind":"Field","name":{"kind":"Name","value":"services"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filters"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"active"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"eq"},"value":{"kind":"BooleanValue","value":true}}]}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"documentId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ServiceFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Service"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"documentId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"active"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}},{"kind":"Field","name":{"kind":"Name","value":"master"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomerFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SlotFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Slot"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"documentId"}},{"kind":"Field","name":{"kind":"Name","value":"datetime_start"}},{"kind":"Field","name":{"kind":"Name","value":"datetime_end"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"master"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomerFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"OrderFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Order"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"documentId"}},{"kind":"Field","name":{"kind":"Name","value":"datetime_start"}},{"kind":"Field","name":{"kind":"Name","value":"datetime_end"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"order_number"}},{"kind":"Field","name":{"kind":"Name","value":"services"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ServiceFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"client"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomerFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"slot"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SlotFields"}}]}}]}}]} as unknown as DocumentNode;