This repository has been archived on 2025-05-09. You can view files and clone it, but cannot push or open issues or pull requests.
2021-07-29 13:28:00 +03:00

52 lines
1.1 KiB
TypeScript

import { gql } from '@apollo/client';
import { IQueryToCRMGQL } from 'core/types/Calculation/Requests';
const query = gql`
query($statecode: Int, $domainname: String) {
selectLead: leads(statecode: $statecode, owner_domainname: $domainname) {
customerid
leadid
fullname
evo_opportunityid
evo_agent_accountid
evo_double_agent_accountid
evo_broker_accountid
evo_fin_department_accountid
accountidData {
evo_address_legalidData {
evo_region_fias_id
evo_city_fias_id
}
}
evo_inn
link
}
selectOpportunity: opportunities(
statecode: $statecode
owner_domainname: $domainname
) {
opportunityid
name
accountid
evo_leadid
evo_client_riskid
parentaccountid
evo_programsolution
accountidData {
evo_address_legalidData {
evo_region_fias_id
evo_city_fias_id
}
}
link
}
}
`;
const toOptions = ['selectLead', 'selectOpportunity'];
export default {
query,
toOptions,
} as IQueryToCRMGQL;