This commit is contained in:
Bivekich
2025-07-28 13:19:28 +03:00
18 changed files with 1561 additions and 538 deletions

View File

@ -1,4 +1,4 @@
import { gql } from 'graphql-tag'
import { gql } from "graphql-tag";
export const GET_ME = gql`
query GetMe {
@ -49,7 +49,7 @@ export const GET_ME = gql`
}
}
}
`
`;
export const GET_MY_SERVICES = gql`
query GetMyServices {
@ -63,7 +63,7 @@ export const GET_MY_SERVICES = gql`
updatedAt
}
}
`
`;
export const GET_MY_SUPPLIES = gql`
query GetMySupplies {
@ -85,7 +85,7 @@ export const GET_MY_SUPPLIES = gql`
updatedAt
}
}
`
`;
export const GET_MY_LOGISTICS = gql`
query GetMyLogistics {
@ -100,7 +100,7 @@ export const GET_MY_LOGISTICS = gql`
updatedAt
}
}
`
`;
export const GET_MY_PRODUCTS = gql`
query GetMyProducts {
@ -129,7 +129,41 @@ export const GET_MY_PRODUCTS = gql`
updatedAt
}
}
`
`;
export const GET_WAREHOUSE_PRODUCTS = gql`
query GetWarehouseProducts {
warehouseProducts {
id
name
article
description
price
quantity
type
category {
id
name
}
brand
color
size
weight
dimensions
material
images
mainImage
isActive
organization {
id
name
fullName
}
createdAt
updatedAt
}
}
`;
// Запросы для контрагентов
export const SEARCH_ORGANIZATIONS = gql`
@ -155,7 +189,7 @@ export const SEARCH_ORGANIZATIONS = gql`
}
}
}
`
`;
export const GET_MY_COUNTERPARTIES = gql`
query GetMyCounterparties {
@ -177,7 +211,7 @@ export const GET_MY_COUNTERPARTIES = gql`
}
}
}
`
`;
export const GET_SUPPLY_SUPPLIERS = gql`
query GetSupplySuppliers {
@ -193,7 +227,7 @@ export const GET_SUPPLY_SUPPLIERS = gql`
createdAt
}
}
`
`;
export const GET_ORGANIZATION_LOGISTICS = gql`
query GetOrganizationLogistics($organizationId: ID!) {
@ -206,7 +240,7 @@ export const GET_ORGANIZATION_LOGISTICS = gql`
description
}
}
`
`;
export const GET_INCOMING_REQUESTS = gql`
query GetIncomingRequests {
@ -243,7 +277,7 @@ export const GET_INCOMING_REQUESTS = gql`
}
}
}
`
`;
export const GET_OUTGOING_REQUESTS = gql`
query GetOutgoingRequests {
@ -280,7 +314,7 @@ export const GET_OUTGOING_REQUESTS = gql`
}
}
}
`
`;
export const GET_ORGANIZATION = gql`
query GetOrganization($id: ID!) {
@ -304,7 +338,7 @@ export const GET_ORGANIZATION = gql`
updatedAt
}
}
`
`;
// Запросы для сообщений
export const GET_MESSAGES = gql`
@ -347,7 +381,7 @@ export const GET_MESSAGES = gql`
updatedAt
}
}
`
`;
export const GET_CONVERSATIONS = gql`
query GetConversations {
@ -384,7 +418,7 @@ export const GET_CONVERSATIONS = gql`
updatedAt
}
}
`
`;
export const GET_CATEGORIES = gql`
query GetCategories {
@ -395,7 +429,7 @@ export const GET_CATEGORIES = gql`
updatedAt
}
}
`
`;
export const GET_ALL_PRODUCTS = gql`
query GetAllProducts($search: String, $category: String) {
@ -438,7 +472,7 @@ export const GET_ALL_PRODUCTS = gql`
}
}
}
`
`;
export const GET_MY_CART = gql`
query GetMyCart {
@ -492,7 +526,7 @@ export const GET_MY_CART = gql`
updatedAt
}
}
`
`;
export const GET_MY_FAVORITES = gql`
query GetMyFavorites {
@ -532,7 +566,7 @@ export const GET_MY_FAVORITES = gql`
}
}
}
`
`;
// Запросы для сотрудников
export const GET_MY_EMPLOYEES = gql`
@ -565,7 +599,7 @@ export const GET_MY_EMPLOYEES = gql`
updatedAt
}
}
`
`;
export const GET_EMPLOYEE = gql`
query GetEmployee($id: ID!) {
@ -594,7 +628,7 @@ export const GET_EMPLOYEE = gql`
updatedAt
}
}
`
`;
export const GET_EMPLOYEE_SCHEDULE = gql`
query GetEmployeeSchedule($employeeId: ID!, $year: Int!, $month: Int!) {
@ -609,7 +643,7 @@ export const GET_EMPLOYEE_SCHEDULE = gql`
}
}
}
`
`;
export const GET_MY_WILDBERRIES_SUPPLIES = gql`
query GetMyWildberriesSupplies {
@ -640,7 +674,7 @@ export const GET_MY_WILDBERRIES_SUPPLIES = gql`
}
}
}
`
`;
// Запросы для получения услуг и расходников от конкретных организаций-контрагентов
export const GET_COUNTERPARTY_SERVICES = gql`
@ -655,7 +689,7 @@ export const GET_COUNTERPARTY_SERVICES = gql`
updatedAt
}
}
`
`;
export const GET_COUNTERPARTY_SUPPLIES = gql`
query GetCounterpartySupplies($organizationId: ID!) {
@ -673,12 +707,20 @@ export const GET_COUNTERPARTY_SUPPLIES = gql`
updatedAt
}
}
`
`;
// Wildberries запросы
export const GET_WILDBERRIES_STATISTICS = gql`
query GetWildberriesStatistics($period: String, $startDate: String, $endDate: String) {
getWildberriesStatistics(period: $period, startDate: $startDate, endDate: $endDate) {
query GetWildberriesStatistics(
$period: String
$startDate: String
$endDate: String
) {
getWildberriesStatistics(
period: $period
startDate: $startDate
endDate: $endDate
) {
success
message
data {
@ -693,7 +735,7 @@ export const GET_WILDBERRIES_STATISTICS = gql`
}
}
}
`
`;
export const GET_WILDBERRIES_CAMPAIGN_STATS = gql`
query GetWildberriesCampaignStats($input: WildberriesCampaignStatsInput!) {
@ -764,7 +806,7 @@ export const GET_WILDBERRIES_CAMPAIGN_STATS = gql`
}
}
}
`
`;
export const GET_WILDBERRIES_CAMPAIGNS_LIST = gql`
query GetWildberriesCampaignsList {
@ -800,7 +842,7 @@ export const ADMIN_ME = gql`
updatedAt
}
}
`
`;
export const ALL_USERS = gql`
query AllUsers($search: String, $limit: Int, $offset: Int) {
@ -826,7 +868,7 @@ export const ALL_USERS = gql`
hasMore
}
}
`
`;
export const GET_SUPPLY_ORDERS = gql`
query GetSupplyOrders {
@ -889,4 +931,4 @@ export const GET_PENDING_SUPPLIES_COUNT = gql`
total
}
}
`;
`;