Добавлены новые зависимости для работы с эмодзи и улучшена структура базы данных. Реализована модель сообщений и обновлены компоненты для поддержки новых функций мессенджера. Обновлены запросы и мутации для работы с сообщениями и чатом.

This commit is contained in:
Bivekich
2025-07-16 22:07:38 +03:00
parent 823ef9a28c
commit 205c9eae98
33 changed files with 3288 additions and 229 deletions

View File

@ -6,6 +6,7 @@ export const GET_ME = gql`
id
phone
avatar
managerName
createdAt
organization {
id
@ -61,9 +62,13 @@ export const SEARCH_ORGANIZATIONS = gql`
emails
createdAt
isCounterparty
isCurrentUser
hasOutgoingRequest
hasIncomingRequest
users {
id
avatar
managerName
}
}
}
@ -76,6 +81,7 @@ export const GET_MY_COUNTERPARTIES = gql`
inn
name
fullName
managementName
type
address
phones
@ -84,6 +90,7 @@ export const GET_MY_COUNTERPARTIES = gql`
users {
id
avatar
managerName
}
}
}
@ -105,6 +112,11 @@ export const GET_INCOMING_REQUESTS = gql`
address
phones
emails
createdAt
users {
id
avatar
}
}
receiver {
id
@ -112,6 +124,10 @@ export const GET_INCOMING_REQUESTS = gql`
name
fullName
type
users {
id
avatar
}
}
}
}
@ -130,6 +146,10 @@ export const GET_OUTGOING_REQUESTS = gql`
name
fullName
type
users {
id
avatar
}
}
receiver {
id
@ -140,6 +160,11 @@ export const GET_OUTGOING_REQUESTS = gql`
address
phones
emails
createdAt
users {
id
avatar
}
}
}
}
@ -166,4 +191,84 @@ export const GET_ORGANIZATION = gql`
updatedAt
}
}
`
// Запросы для сообщений
export const GET_MESSAGES = gql`
query GetMessages($counterpartyId: ID!, $limit: Int, $offset: Int) {
messages(counterpartyId: $counterpartyId, limit: $limit, offset: $offset) {
id
content
type
voiceUrl
voiceDuration
fileUrl
fileName
fileSize
fileType
senderId
senderOrganization {
id
name
fullName
type
users {
id
avatar
managerName
}
}
receiverOrganization {
id
name
fullName
type
users {
id
avatar
managerName
}
}
isRead
createdAt
updatedAt
}
}
`
export const GET_CONVERSATIONS = gql`
query GetConversations {
conversations {
id
counterparty {
id
inn
name
fullName
type
address
users {
id
avatar
managerName
}
}
lastMessage {
id
content
type
voiceUrl
voiceDuration
fileUrl
fileName
fileSize
fileType
senderId
isRead
createdAt
}
unreadCount
updatedAt
}
}
`