169 lines
2.5 KiB
TypeScript
169 lines
2.5 KiB
TypeScript
import { gql } from 'graphql-tag'
|
|
|
|
export const GET_ME = gql`
|
|
query GetMe {
|
|
me {
|
|
id
|
|
phone
|
|
avatar
|
|
createdAt
|
|
organization {
|
|
id
|
|
inn
|
|
kpp
|
|
name
|
|
fullName
|
|
address
|
|
addressFull
|
|
ogrn
|
|
ogrnDate
|
|
type
|
|
status
|
|
actualityDate
|
|
registrationDate
|
|
liquidationDate
|
|
managementName
|
|
managementPost
|
|
opfCode
|
|
opfFull
|
|
opfShort
|
|
okato
|
|
oktmo
|
|
okpo
|
|
okved
|
|
employeeCount
|
|
revenue
|
|
taxSystem
|
|
phones
|
|
emails
|
|
apiKeys {
|
|
id
|
|
marketplace
|
|
isActive
|
|
validationData
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`
|
|
|
|
// Запросы для контрагентов
|
|
export const SEARCH_ORGANIZATIONS = gql`
|
|
query SearchOrganizations($type: OrganizationType, $search: String) {
|
|
searchOrganizations(type: $type, search: $search) {
|
|
id
|
|
inn
|
|
name
|
|
fullName
|
|
type
|
|
address
|
|
phones
|
|
emails
|
|
createdAt
|
|
isCounterparty
|
|
users {
|
|
id
|
|
avatar
|
|
}
|
|
}
|
|
}
|
|
`
|
|
|
|
export const GET_MY_COUNTERPARTIES = gql`
|
|
query GetMyCounterparties {
|
|
myCounterparties {
|
|
id
|
|
inn
|
|
name
|
|
fullName
|
|
type
|
|
address
|
|
phones
|
|
emails
|
|
createdAt
|
|
users {
|
|
id
|
|
avatar
|
|
}
|
|
}
|
|
}
|
|
`
|
|
|
|
export const GET_INCOMING_REQUESTS = gql`
|
|
query GetIncomingRequests {
|
|
incomingRequests {
|
|
id
|
|
status
|
|
message
|
|
createdAt
|
|
sender {
|
|
id
|
|
inn
|
|
name
|
|
fullName
|
|
type
|
|
address
|
|
phones
|
|
emails
|
|
}
|
|
receiver {
|
|
id
|
|
inn
|
|
name
|
|
fullName
|
|
type
|
|
}
|
|
}
|
|
}
|
|
`
|
|
|
|
export const GET_OUTGOING_REQUESTS = gql`
|
|
query GetOutgoingRequests {
|
|
outgoingRequests {
|
|
id
|
|
status
|
|
message
|
|
createdAt
|
|
sender {
|
|
id
|
|
inn
|
|
name
|
|
fullName
|
|
type
|
|
}
|
|
receiver {
|
|
id
|
|
inn
|
|
name
|
|
fullName
|
|
type
|
|
address
|
|
phones
|
|
emails
|
|
}
|
|
}
|
|
}
|
|
`
|
|
|
|
export const GET_ORGANIZATION = gql`
|
|
query GetOrganization($id: ID!) {
|
|
organization(id: $id) {
|
|
id
|
|
inn
|
|
name
|
|
fullName
|
|
address
|
|
type
|
|
apiKeys {
|
|
id
|
|
marketplace
|
|
isActive
|
|
validationData
|
|
createdAt
|
|
updatedAt
|
|
}
|
|
createdAt
|
|
updatedAt
|
|
}
|
|
}
|
|
`
|