Добавлены новые зависимости, обновлены стили и улучшена структура проекта. Обновлен README с описанием функционала и технологий. Реализована анимация и адаптивный дизайн. Настроена авторизация с использованием Apollo Client.

This commit is contained in:
Bivekich
2025-07-16 18:00:41 +03:00
parent d260749bc9
commit 823ef9a28c
69 changed files with 15539 additions and 210 deletions

358
src/graphql/mutations.ts Normal file
View File

@ -0,0 +1,358 @@
import { gql } from 'graphql-tag'
export const SEND_SMS_CODE = gql`
mutation SendSmsCode($phone: String!) {
sendSmsCode(phone: $phone) {
success
message
}
}
`
export const VERIFY_SMS_CODE = gql`
mutation VerifySmsCode($phone: String!, $code: String!) {
verifySmsCode(phone: $phone, code: $code) {
success
message
token
user {
id
phone
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
}
}
}
}
}
`
export const VERIFY_INN = gql`
mutation VerifyInn($inn: String!) {
verifyInn(inn: $inn) {
success
message
organization {
name
fullName
address
isActive
}
}
}
`
export const REGISTER_FULFILLMENT_ORGANIZATION = gql`
mutation RegisterFulfillmentOrganization($input: FulfillmentRegistrationInput!) {
registerFulfillmentOrganization(input: $input) {
success
message
user {
id
phone
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
}
}
}
}
}
`
export const REGISTER_SELLER_ORGANIZATION = gql`
mutation RegisterSellerOrganization($input: SellerRegistrationInput!) {
registerSellerOrganization(input: $input) {
success
message
user {
id
phone
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
}
}
}
}
}
`
export const ADD_MARKETPLACE_API_KEY = gql`
mutation AddMarketplaceApiKey($input: MarketplaceApiKeyInput!) {
addMarketplaceApiKey(input: $input) {
success
message
apiKey {
id
marketplace
isActive
validationData
}
}
}
`
export const REMOVE_MARKETPLACE_API_KEY = gql`
mutation RemoveMarketplaceApiKey($marketplace: MarketplaceType!) {
removeMarketplaceApiKey(marketplace: $marketplace)
}
`
export const UPDATE_USER_PROFILE = gql`
mutation UpdateUserProfile($input: UpdateUserProfileInput!) {
updateUserProfile(input: $input) {
success
message
user {
id
phone
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
}
}
}
}
}
`
export const UPDATE_ORGANIZATION_BY_INN = gql`
mutation UpdateOrganizationByInn($inn: String!) {
updateOrganizationByInn(inn: $inn) {
success
message
user {
id
phone
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
}
}
}
}
}
`
// Мутации для контрагентов
export const SEND_COUNTERPARTY_REQUEST = gql`
mutation SendCounterpartyRequest($organizationId: ID!, $message: String) {
sendCounterpartyRequest(organizationId: $organizationId, message: $message) {
success
message
request {
id
status
message
createdAt
sender {
id
inn
name
fullName
type
}
receiver {
id
inn
name
fullName
type
}
}
}
}
`
export const RESPOND_TO_COUNTERPARTY_REQUEST = gql`
mutation RespondToCounterpartyRequest($requestId: ID!, $accept: Boolean!) {
respondToCounterpartyRequest(requestId: $requestId, accept: $accept) {
success
message
request {
id
status
message
createdAt
sender {
id
inn
name
fullName
type
}
receiver {
id
inn
name
fullName
type
}
}
}
}
`
export const CANCEL_COUNTERPARTY_REQUEST = gql`
mutation CancelCounterpartyRequest($requestId: ID!) {
cancelCounterpartyRequest(requestId: $requestId)
}
`
export const REMOVE_COUNTERPARTY = gql`
mutation RemoveCounterparty($organizationId: ID!) {
removeCounterparty(organizationId: $organizationId)
}
`