graphql: share common queries

packages: add @graphql-codegen/typed-document-node
This commit is contained in:
vchikalkin 2023-02-01 15:13:40 +03:00
parent 6ffc830469
commit 079446181a
18 changed files with 1094 additions and 352 deletions

View File

@ -1,4 +1,5 @@
.next
public
graphql
**/graphql/*.types.ts
**/graphql/*.schema.graphql
node_modules

View File

@ -6,6 +6,7 @@ generates:
plugins:
- typescript
- typescript-operations
- typed-document-node
config:
onlyOperationTypes: true
useTypeImports: true

View File

@ -0,0 +1,122 @@
import { gql } from '@apollo/client';
export const QUERY_GET_TARIFS = gql`
query GetTarifs($currentDate: DateTime) {
evo_tarifs(
statecode: 0
evo_datefrom_param: { lte: $currentDate }
evo_dateto_param: { gte: $currentDate }
) {
label: evo_name
value: evo_tarifid
evo_tarifid
evo_baseproductid
evo_min_period
evo_max_period
evo_delivery_time
evo_min_first_payment
evo_max_first_payment
evo_min_last_payment
evo_max_last_payment
evo_used
}
}
`;
export const QUERY_GET_TARIF = gql`
query GetTarif($tarifId: Uuid!) {
evo_tarif(evo_tarifid: $tarifId) {
evo_irr
evo_graphtype_exception
evo_seasons_type_exception
evo_min_decreasing_perc
}
}
`;
export const QUERY_GET_TRANSACTION_CURRENCIES = gql`
query GetTransactionCurrencies {
transactioncurrencies {
label: currencyname
value: transactioncurrencyid
transactioncurrencyid
isocurrencycode
currencysymbol
}
}
`;
export const QUERY_GET_BRANDS = gql`
query GetBrands {
evo_brands(statecode: 0) {
label: evo_name
value: evo_brandid
evo_brandid
evo_vehicle_type
}
}
`;
export const QUERY_GET_PRODUCTS = gql`
query GetProducts($currentDate: DateTime) {
evo_baseproducts(
statecode: 0
evo_relation: [100000000]
evo_datefrom_param: { lte: $currentDate }
evo_dateto_param: { gte: $currentDate }
) {
label: evo_name
value: evo_baseproductid
evo_baseproductid
}
}
`;
export const QUERY_GET_LEASE_OBJECT_TYPES = gql`
query GetLeaseObjectTypes {
evo_leasingobject_types(statecode: 0) {
label: evo_name
value: evo_leasingobject_typeid
evo_leasingobject_typeid
}
}
`;
export const QUERY_GET_DEALERS = gql`
query GetDealers {
dealers: accounts(evo_account_type: [100000001], statecode: 0, evo_legal_form: 100000001) {
label: name
value: accountid
accountid
}
}
`;
export const QUERY_GET_DEALER_PERSON = gql`
query GetDealerPersons($dealerId: Uuid!) {
salon_providers(statecode: 0, salonaccountid: $dealerId) {
label: name
value: accountid
accountid
evo_inn
evo_kpp
}
}
`;
export const QUERY_GET_AGENT = gql`
query GetAgent($agentid: Uuid!) {
agent: account(accountid: $agentid) {
label: name
value: accountid
}
}
`;
export const QUERY_GET_DEALER_RETURN_LEASING = gql`
query GetDealerReturnLeasing($dealerId: Uuid!) {
dealer: account(accountid: $dealerId) {
evo_return_leasing_dealer
}
}
`;

View File

@ -1,3 +1,4 @@
import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
export type Maybe<T> = T | null;
export type InputMaybe<T> = Maybe<T>;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
@ -122,17 +123,67 @@ export type GetCurrencySymbolQueryVariables = Exact<{
export type GetCurrencySymbolQuery = { __typename?: 'Query', transactioncurrency: { __typename?: 'transactioncurrency', currencysymbol: string | null } | null };
export type GetTarif_ProcessConfiguratorQueryVariables = Exact<{
export type GetTarifsQueryVariables = Exact<{
currentDate: InputMaybe<Scalars['DateTime']>;
}>;
export type GetTarifsQuery = { __typename?: 'Query', evo_tarifs: Array<{ __typename?: 'evo_tarif', evo_tarifid: string | null, evo_baseproductid: string | null, evo_min_period: number | null, evo_max_period: number | null, evo_delivery_time: Array<number> | null, evo_min_first_payment: number | null, evo_max_first_payment: number | null, evo_min_last_payment: number | null, evo_max_last_payment: number | null, evo_used: boolean | null, label: string | null, value: string | null } | null> | null };
export type GetTarifQueryVariables = Exact<{
tarifId: Scalars['Uuid'];
}>;
export type GetTarif_ProcessConfiguratorQuery = { __typename?: 'Query', evo_tarif: { __typename?: 'evo_tarif', evo_irr: number | null, evo_graphtype_exception: Array<number> | null, evo_seasons_type_exception: Array<number> | null, evo_min_decreasing_perc: number | null } | null };
export type GetTarifQuery = { __typename?: 'Query', evo_tarif: { __typename?: 'evo_tarif', evo_irr: number | null, evo_graphtype_exception: Array<number> | null, evo_seasons_type_exception: Array<number> | null, evo_min_decreasing_perc: number | null } | null };
export type GetLeaseObjectTypes_ProcessConfiguratorQueryVariables = Exact<{ [key: string]: never; }>;
export type GetTransactionCurrenciesQueryVariables = Exact<{ [key: string]: never; }>;
export type GetLeaseObjectTypes_ProcessConfiguratorQuery = { __typename?: 'Query', evo_leasingobject_types: Array<{ __typename?: 'evo_leasingobject_type', evo_leasingobject_typeid: string | null, label: string | null, value: string | null } | null> | null };
export type GetTransactionCurrenciesQuery = { __typename?: 'Query', transactioncurrencies: Array<{ __typename?: 'transactioncurrency', transactioncurrencyid: string | null, isocurrencycode: string | null, currencysymbol: string | null, label: string | null, value: string | null } | null> | null };
export type GetBrandsQueryVariables = Exact<{ [key: string]: never; }>;
export type GetBrandsQuery = { __typename?: 'Query', evo_brands: Array<{ __typename?: 'evo_brand', evo_brandid: string | null, evo_vehicle_type: Array<number> | null, label: string | null, value: string | null } | null> | null };
export type GetProductsQueryVariables = Exact<{
currentDate: InputMaybe<Scalars['DateTime']>;
}>;
export type GetProductsQuery = { __typename?: 'Query', evo_baseproducts: Array<{ __typename?: 'evo_baseproduct', evo_baseproductid: string | null, label: string | null, value: string | null } | null> | null };
export type GetLeaseObjectTypesQueryVariables = Exact<{ [key: string]: never; }>;
export type GetLeaseObjectTypesQuery = { __typename?: 'Query', evo_leasingobject_types: Array<{ __typename?: 'evo_leasingobject_type', evo_leasingobject_typeid: string | null, label: string | null, value: string | null } | null> | null };
export type GetDealersQueryVariables = Exact<{ [key: string]: never; }>;
export type GetDealersQuery = { __typename?: 'Query', dealers: Array<{ __typename?: 'account', accountid: string | null, label: string | null, value: string | null } | null> | null };
export type GetDealerPersonsQueryVariables = Exact<{
dealerId: Scalars['Uuid'];
}>;
export type GetDealerPersonsQuery = { __typename?: 'Query', salon_providers: Array<{ __typename?: 'account', accountid: string | null, evo_inn: string | null, evo_kpp: string | null, label: string | null, value: string | null } | null> | null };
export type GetAgentQueryVariables = Exact<{
agentid: Scalars['Uuid'];
}>;
export type GetAgentQuery = { __typename?: 'Query', agent: { __typename?: 'account', label: string | null, value: string | null } | null };
export type GetDealerReturnLeasingQueryVariables = Exact<{
dealerId: Scalars['Uuid'];
}>;
export type GetDealerReturnLeasingQuery = { __typename?: 'Query', dealer: { __typename?: 'account', evo_return_leasing_dealer: boolean | null } | null };
export type GetProduct_ProcessConfiguratorQueryVariables = Exact<{
productId: Scalars['Uuid'];
@ -155,11 +206,6 @@ export type GetImportProgram_ProcessConfiguratorQueryVariables = Exact<{
export type GetImportProgram_ProcessConfiguratorQuery = { __typename?: 'Query', importProgram: { __typename?: 'evo_subsidy', evo_leasingobject_types: Array<{ __typename?: 'evo_leasingobject_type', evo_leasingobject_typeid: string | null } | null> | null, accounts: Array<{ __typename?: 'account', accountid: string | null } | null> | null } | null };
export type GetDealers_ProcessConfiguratorQueryVariables = Exact<{ [key: string]: never; }>;
export type GetDealers_ProcessConfiguratorQuery = { __typename?: 'Query', dealers: Array<{ __typename?: 'account', accountid: string | null, label: string | null, value: string | null } | null> | null };
export type GetDealerPersons_ProcessConfiguratorQueryVariables = Exact<{
dealerId: Scalars['Uuid'];
}>;
@ -174,20 +220,6 @@ export type GetQuote_ProcessConfiguratorQueryVariables = Exact<{
export type GetQuote_ProcessConfiguratorQuery = { __typename?: 'Query', quote: { __typename?: 'quote', evo_baseproductid: string | null } | null };
export type GetProducts_ProcessConfiguratorQueryVariables = Exact<{
currentDate: InputMaybe<Scalars['DateTime']>;
}>;
export type GetProducts_ProcessConfiguratorQuery = { __typename?: 'Query', evo_baseproducts: Array<{ __typename?: 'evo_baseproduct', evo_baseproductid: string | null } | null> | null };
export type GetTarifs_ProcessConfiguratorQueryVariables = Exact<{
currentDate: InputMaybe<Scalars['DateTime']>;
}>;
export type GetTarifs_ProcessConfiguratorQuery = { __typename?: 'Query', evo_tarifs: Array<{ __typename?: 'evo_tarif', evo_tarifid: string | null, evo_baseproductid: string | null, evo_min_period: number | null, evo_max_period: number | null, evo_delivery_time: Array<number> | null, evo_min_first_payment: number | null, evo_max_first_payment: number | null, evo_min_last_payment: number | null, evo_max_last_payment: number | null, evo_used: boolean | null, label: string | null, value: string | null } | null> | null };
export type GetRisksDataFromQuoteQueryVariables = Exact<{
quoteId: Scalars['Uuid'];
}>;
@ -209,17 +241,10 @@ export type GetInsuranceDataQueryVariables = Exact<{
export type GetInsuranceDataQuery = { __typename?: 'Query', osago: Array<{ __typename?: 'account', value: string | null, label: string | null } | null> | null, kasko: Array<{ __typename?: 'account', value: string | null, label: string | null } | null> | null, fingap: Array<{ __typename?: 'account', value: string | null, label: string | null } | null> | null };
export type GetMainOptionsQueryVariables = Exact<{ [key: string]: never; }>;
export type GetGpsBrandsQueryVariables = Exact<{ [key: string]: never; }>;
export type GetMainOptionsQuery = { __typename?: 'Query', selectSupplierCurrency: Array<{ __typename?: 'transactioncurrency', currencysymbol: string | null, label: string | null, value: string | null } | null> | null, selectLeaseObjectType: Array<{ __typename?: 'evo_leasingobject_type', label: string | null, value: string | null } | null> | null, selectGPSBrand: Array<{ __typename?: 'evo_gps_brand', label: string | null, value: string | null } | null> | null };
export type GetProductsQueryVariables = Exact<{
currentDate: InputMaybe<Scalars['DateTime']>;
}>;
export type GetProductsQuery = { __typename?: 'Query', selectProduct: Array<{ __typename?: 'evo_baseproduct', label: string | null, value: string | null } | null> | null };
export type GetGpsBrandsQuery = { __typename?: 'Query', selectGPSBrand: Array<{ __typename?: 'evo_gps_brand', label: string | null, value: string | null } | null> | null };
export type GetSubsidiesQueryVariables = Exact<{
currentDate: InputMaybe<Scalars['DateTime']>;
@ -233,16 +258,6 @@ export type GetRegionsQueryVariables = Exact<{ [key: string]: never; }>;
export type GetRegionsQuery = { __typename?: 'Query', evo_regions: Array<{ __typename?: 'evo_region', label: string | null, value: string | null } | null> | null };
export type GetBrandsQueryVariables = Exact<{ [key: string]: never; }>;
export type GetBrandsQuery = { __typename?: 'Query', selectBrand: Array<{ __typename?: 'evo_brand', label: string | null, value: string | null } | null> | null };
export type GetDealersQueryVariables = Exact<{ [key: string]: never; }>;
export type GetDealersQuery = { __typename?: 'Query', selectDealer: Array<{ __typename?: 'account', label: string | null, value: string | null } | null> | null };
export type GetAddproductTypesQueryVariables = Exact<{
currentDate: InputMaybe<Scalars['DateTime']>;
}>;
@ -250,13 +265,6 @@ export type GetAddproductTypesQueryVariables = Exact<{
export type GetAddproductTypesQuery = { __typename?: 'Query', evo_addproduct_types: Array<{ __typename?: 'evo_addproduct_type', evo_graph_price: number | null, evo_product_type: number | null, label: string | null, value: string | null } | null> | null };
export type GetTarifsQueryVariables = Exact<{
currentDate: InputMaybe<Scalars['DateTime']>;
}>;
export type GetTarifsQuery = { __typename?: 'Query', selectTarif: Array<{ __typename?: 'evo_tarif', label: string | null, value: string | null } | null> | null };
export type GetOwnerDataQueryVariables = Exact<{
domainname: InputMaybe<Scalars['String']>;
}>;
@ -264,11 +272,6 @@ export type GetOwnerDataQueryVariables = Exact<{
export type GetOwnerDataQuery = { __typename?: 'Query', selectLead: Array<{ __typename?: 'lead', label: string | null, value: string | null } | null> | null, selectOpportunity: Array<{ __typename?: 'opportunity', label: string | null, value: string | null } | null> | null };
export type GetTransactionCurrenciesQueryVariables = Exact<{ [key: string]: never; }>;
export type GetTransactionCurrenciesQuery = { __typename?: 'Query', transactioncurrencies: Array<{ __typename?: 'transactioncurrency', isocurrencycode: string | null, transactioncurrencyid: string | null } | null> | null };
export type GetOpportunityByLeadQueryVariables = Exact<{
leadid: Scalars['Uuid'];
}>;
@ -346,11 +349,6 @@ export type GetImportProgram_ProcessLeasingObjectQueryVariables = Exact<{
export type GetImportProgram_ProcessLeasingObjectQuery = { __typename?: 'Query', importProgram: { __typename?: 'evo_subsidy', evo_brands: Array<{ __typename?: 'evo_brand', evo_brandid: string | null } | null> | null, evo_models: Array<{ __typename?: 'evo_model', evo_modelid: string | null } | null> | null } | null };
export type GetBrands_ProcessLeasingObjectQueryVariables = Exact<{ [key: string]: never; }>;
export type GetBrands_ProcessLeasingObjectQuery = { __typename?: 'Query', evo_brands: Array<{ __typename?: 'evo_brand', evo_brandid: string | null, evo_vehicle_type: Array<number> | null, label: string | null, value: string | null } | null> | null };
export type GetProduct_ProcessLeasingObjectQueryVariables = Exact<{
productId: Scalars['Uuid'];
}>;
@ -464,20 +462,6 @@ export type GetFinDepartmentAccountIdQueryVariables = Exact<{
export type GetFinDepartmentAccountIdQuery = { __typename?: 'Query', lead: { __typename?: 'lead', agentid: string | null } | null };
export type GetAgentQueryVariables = Exact<{
agentid: Scalars['Uuid'];
}>;
export type GetAgentQuery = { __typename?: 'Query', agent: { __typename?: 'account', label: string | null, value: string | null } | null };
export type GetDealerReturnLeasingQueryVariables = Exact<{
dealerId: Scalars['Uuid'];
}>;
export type GetDealerReturnLeasingQuery = { __typename?: 'Query', dealer: { __typename?: 'account', evo_return_leasing_dealer: boolean | null } | null };
export type GetRewardWithoutOtherAgentQueryVariables = Exact<{
conditionId: Scalars['Uuid'];
}>;
@ -485,16 +469,64 @@ export type GetRewardWithoutOtherAgentQueryVariables = Exact<{
export type GetRewardWithoutOtherAgentQuery = { __typename?: 'Query', evo_reward_condition: { __typename?: 'evo_reward_condition', evo_agency_agreementidData: { __typename?: 'evo_agency_agreement', evo_reward_without_other_agent: boolean | null } | null } | null };
export type GetDealerPersonQueryVariables = Exact<{
dealerId: Scalars['Uuid'];
}>;
export type GetDealerPersonQuery = { __typename?: 'Query', salon_providers: Array<{ __typename?: 'account', evo_inn: string | null, evo_kpp: string | null, label: string | null, value: string | null } | null> | null };
export type GetBrokerAccountIdFromDealerQueryVariables = Exact<{
dealerId: Scalars['Uuid'];
}>;
export type GetBrokerAccountIdFromDealerQuery = { __typename?: 'Query', dealer: { __typename?: 'account', evo_broker_accountid: string | null } | null };
export const GetCurrencySymbolDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetCurrencySymbol"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currencyid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"transactioncurrency"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"transactioncurrencyid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currencyid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currencysymbol"}}]}}]}}]} as unknown as DocumentNode<GetCurrencySymbolQuery, GetCurrencySymbolQueryVariables>;
export const GetTarifsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTarifs"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_tarifs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_tarifid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_tarifid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_baseproductid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_delivery_time"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_first_payment"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_first_payment"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_last_payment"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_last_payment"}},{"kind":"Field","name":{"kind":"Name","value":"evo_used"}}]}}]}}]} as unknown as DocumentNode<GetTarifsQuery, GetTarifsQueryVariables>;
export const GetTarifDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTarif"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"tarifId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_tarif"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_tarifid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"tarifId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_irr"}},{"kind":"Field","name":{"kind":"Name","value":"evo_graphtype_exception"}},{"kind":"Field","name":{"kind":"Name","value":"evo_seasons_type_exception"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_decreasing_perc"}}]}}]}}]} as unknown as DocumentNode<GetTarifQuery, GetTarifQueryVariables>;
export const GetTransactionCurrenciesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTransactionCurrencies"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"transactioncurrencies"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"currencyname"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"transactioncurrencyid"}},{"kind":"Field","name":{"kind":"Name","value":"transactioncurrencyid"}},{"kind":"Field","name":{"kind":"Name","value":"isocurrencycode"}},{"kind":"Field","name":{"kind":"Name","value":"currencysymbol"}}]}}]}}]} as unknown as DocumentNode<GetTransactionCurrenciesQuery, GetTransactionCurrenciesQueryVariables>;
export const GetBrandsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetBrands"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_brands"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_brandid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_brandid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_vehicle_type"}}]}}]}}]} as unknown as DocumentNode<GetBrandsQuery, GetBrandsQueryVariables>;
export const GetProductsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetProducts"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_baseproducts"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_relation"},"value":{"kind":"ListValue","values":[{"kind":"IntValue","value":"100000000"}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_baseproductid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_baseproductid"}}]}}]}}]} as unknown as DocumentNode<GetProductsQuery, GetProductsQueryVariables>;
export const GetLeaseObjectTypesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetLeaseObjectTypes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_types"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_leasingobject_typeid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_typeid"}}]}}]}}]} as unknown as DocumentNode<GetLeaseObjectTypesQuery, GetLeaseObjectTypesQueryVariables>;
export const GetDealersDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetDealers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dealers"},"name":{"kind":"Name","value":"accounts"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_account_type"},"value":{"kind":"ListValue","values":[{"kind":"IntValue","value":"100000001"}]}},{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_legal_form"},"value":{"kind":"IntValue","value":"100000001"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"accountid"}},{"kind":"Field","name":{"kind":"Name","value":"accountid"}}]}}]}}]} as unknown as DocumentNode<GetDealersQuery, GetDealersQueryVariables>;
export const GetDealerPersonsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetDealerPersons"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"dealerId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"salon_providers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"salonaccountid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"dealerId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"accountid"}},{"kind":"Field","name":{"kind":"Name","value":"accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_inn"}},{"kind":"Field","name":{"kind":"Name","value":"evo_kpp"}}]}}]}}]} as unknown as DocumentNode<GetDealerPersonsQuery, GetDealerPersonsQueryVariables>;
export const GetAgentDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAgent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"agentid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agent"},"name":{"kind":"Name","value":"account"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"accountid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"agentid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"accountid"}}]}}]}}]} as unknown as DocumentNode<GetAgentQuery, GetAgentQueryVariables>;
export const GetDealerReturnLeasingDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetDealerReturnLeasing"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"dealerId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dealer"},"name":{"kind":"Name","value":"account"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"accountid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"dealerId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_return_leasing_dealer"}}]}}]}}]} as unknown as DocumentNode<GetDealerReturnLeasingQuery, GetDealerReturnLeasingQueryVariables>;
export const GetProduct_ProcessConfiguratorDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetProduct_ProcessConfigurator"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"productId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_baseproduct"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_baseproductid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"productId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_types"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_typeid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_calculation_method"}},{"kind":"Field","name":{"kind":"Name","value":"evo_baseproducts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_baseproductid"}}]}}]}}]}}]} as unknown as DocumentNode<GetProduct_ProcessConfiguratorQuery, GetProduct_ProcessConfiguratorQueryVariables>;
export const GetSubsidy_ProcessConfiguratorDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSubsidy_ProcessConfigurator"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"subsidyId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"subsidy"},"name":{"kind":"Name","value":"evo_subsidy"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_subsidyid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"subsidyId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_types"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_typeid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"accounts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accountid"}}]}}]}}]}}]} as unknown as DocumentNode<GetSubsidy_ProcessConfiguratorQuery, GetSubsidy_ProcessConfiguratorQueryVariables>;
export const GetImportProgram_ProcessConfiguratorDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetImportProgram_ProcessConfigurator"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"importProgramId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"importProgram"},"name":{"kind":"Name","value":"evo_subsidy"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_subsidyid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"importProgramId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_types"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_typeid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"accounts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accountid"}}]}}]}}]}}]} as unknown as DocumentNode<GetImportProgram_ProcessConfiguratorQuery, GetImportProgram_ProcessConfiguratorQueryVariables>;
export const GetDealerPersons_ProcessConfiguratorDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetDealerPersons_ProcessConfigurator"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"dealerId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dealerPersons"},"name":{"kind":"Name","value":"salon_providers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"salonaccountid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"dealerId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"accountid"}},{"kind":"Field","name":{"kind":"Name","value":"accountid"}}]}}]}}]} as unknown as DocumentNode<GetDealerPersons_ProcessConfiguratorQuery, GetDealerPersons_ProcessConfiguratorQueryVariables>;
export const GetQuote_ProcessConfiguratorDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetQuote_ProcessConfigurator"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"quote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"quoteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_baseproductid"}}]}}]}}]} as unknown as DocumentNode<GetQuote_ProcessConfiguratorQuery, GetQuote_ProcessConfiguratorQueryVariables>;
export const GetRisksDataFromQuoteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRisksDataFromQuote"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"quote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"quoteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_fingap_accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_fingap_payer"}},{"kind":"Field","name":{"kind":"Name","value":"evo_fingap_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_product_risks"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_typeid"}}]}}]}}]}}]} as unknown as DocumentNode<GetRisksDataFromQuoteQuery, GetRisksDataFromQuoteQueryVariables>;
export const GetFinGapAddProductTypesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetFinGAPAddProductTypes"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_types"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_product_type"},"value":{"kind":"IntValue","value":"100000006"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_typeid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","name":{"kind":"Name","value":"evo_type_calc_cerebellum"}},{"kind":"Field","name":{"kind":"Name","value":"evo_cost_service_provider_withoutnds"}},{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_types"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_typeid"}}]}}]}}]}}]} as unknown as DocumentNode<GetFinGapAddProductTypesQuery, GetFinGapAddProductTypesQueryVariables>;
export const GetInsuranceDataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetInsuranceData"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"evo_account_type"}},"type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"osago"},"name":{"kind":"Name","value":"accounts"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_account_type"},"value":{"kind":"Variable","name":{"kind":"Name","value":"evo_account_type"}}},{"kind":"Argument","name":{"kind":"Name","value":"evo_type_ins_policy"},"value":{"kind":"ListValue","values":[{"kind":"IntValue","value":"100000001"}]}},{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"accountid"}},{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"kasko"},"name":{"kind":"Name","value":"accounts"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_account_type"},"value":{"kind":"Variable","name":{"kind":"Name","value":"evo_account_type"}}},{"kind":"Argument","name":{"kind":"Name","value":"evo_type_ins_policy"},"value":{"kind":"ListValue","values":[{"kind":"IntValue","value":"100000000"}]}},{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"accountid"}},{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"fingap"},"name":{"kind":"Name","value":"accounts"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_account_type"},"value":{"kind":"Variable","name":{"kind":"Name","value":"evo_account_type"}}},{"kind":"Argument","name":{"kind":"Name","value":"evo_type_ins_policy"},"value":{"kind":"ListValue","values":[{"kind":"IntValue","value":"100000002"}]}},{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"accountid"}},{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode<GetInsuranceDataQuery, GetInsuranceDataQueryVariables>;
export const GetGpsBrandsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetGPSBrands"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"selectGPSBrand"},"name":{"kind":"Name","value":"evo_gps_brands"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_gps_brandid"}}]}}]}}]} as unknown as DocumentNode<GetGpsBrandsQuery, GetGpsBrandsQueryVariables>;
export const GetSubsidiesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSubsidies"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_subsidies"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_subsidyid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_subsidy_type"}}]}}]}}]} as unknown as DocumentNode<GetSubsidiesQuery, GetSubsidiesQueryVariables>;
export const GetRegionsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRegions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_regions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_regionid"}}]}}]}}]} as unknown as DocumentNode<GetRegionsQuery, GetRegionsQueryVariables>;
export const GetAddproductTypesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAddproductTypes"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_types"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_addproduct_typeid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_graph_price"}},{"kind":"Field","name":{"kind":"Name","value":"evo_product_type"}}]}}]}}]} as unknown as DocumentNode<GetAddproductTypesQuery, GetAddproductTypesQueryVariables>;
export const GetOwnerDataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetOwnerData"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"domainname"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"selectLead"},"name":{"kind":"Name","value":"leads"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"owner_domainname"},"value":{"kind":"Variable","name":{"kind":"Name","value":"domainname"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"fullname"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"leadid"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"selectOpportunity"},"name":{"kind":"Name","value":"opportunities"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"owner_domainname"},"value":{"kind":"Variable","name":{"kind":"Name","value":"domainname"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"opportunityid"}}]}}]}}]} as unknown as DocumentNode<GetOwnerDataQuery, GetOwnerDataQueryVariables>;
export const GetOpportunityByLeadDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetOpportunityByLead"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"leadid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"lead"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"leadid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"leadid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_opportunityidData"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"opportunityid"}}]}}]}}]}}]} as unknown as DocumentNode<GetOpportunityByLeadQuery, GetOpportunityByLeadQueryVariables>;
export const GetLeadidByOpportunityDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetLeadidByOpportunity"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"opportunityid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"opportunity"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"opportunityid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"opportunityid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leadid"}}]}}]}}]} as unknown as DocumentNode<GetLeadidByOpportunityQuery, GetLeadidByOpportunityQueryVariables>;
export const GetQuotesByLeadDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetQuotesByLead"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"leadid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"quotes"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_leadid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"leadid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_quotename"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"quoteid"}}]}}]}}]} as unknown as DocumentNode<GetQuotesByLeadQuery, GetQuotesByLeadQueryVariables>;
export const GetLeadUrlDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetLeadUrl"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"entity"},"name":{"kind":"Name","value":"lead"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"leadid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"link"}}]}}]}}]} as unknown as DocumentNode<GetLeadUrlQuery, GetLeadUrlQueryVariables>;
export const GetOpportunityUrlDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetOpportunityUrl"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"entity"},"name":{"kind":"Name","value":"opportunity"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"opportunityid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"link"}}]}}]}}]} as unknown as DocumentNode<GetOpportunityUrlQuery, GetOpportunityUrlQueryVariables>;
export const GetQuoteUrlDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetQuoteUrl"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"entity"},"name":{"kind":"Name","value":"quote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"quoteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"link"}}]}}]}}]} as unknown as DocumentNode<GetQuoteUrlQuery, GetQuoteUrlQueryVariables>;
export const GetLeasingObjectDataFromQuoteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetLeasingObjectDataFromQuote"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"quote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"quoteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_brandid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_modelid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_equipmentid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_typeid"}}]}}]}}]} as unknown as DocumentNode<GetLeasingObjectDataFromQuoteQuery, GetLeasingObjectDataFromQuoteQueryVariables>;
export const GetModels_ProcessLeasingObjectDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetModels_ProcessLeasingObject"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"brandid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_models"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_brandid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"brandid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_modelid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_modelid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_vehicle_type"}}]}}]}}]} as unknown as DocumentNode<GetModels_ProcessLeasingObjectQuery, GetModels_ProcessLeasingObjectQueryVariables>;
export const GetLeaseObjectType_ProcessLeasingObjectDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetLeaseObjectType_ProcessLeasingObject"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"leaseObjectTypeId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"leaseObjectType"},"name":{"kind":"Name","value":"evo_leasingobject_type"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_leasingobject_typeid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"leaseObjectTypeId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_vehicle_type"}}]}}]}}]} as unknown as DocumentNode<GetLeaseObjectType_ProcessLeasingObjectQuery, GetLeaseObjectType_ProcessLeasingObjectQueryVariables>;
export const GetSubsidy_ProcessLeasingObjectDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSubsidy_ProcessLeasingObject"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"subsidyId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"subsidy"},"name":{"kind":"Name","value":"evo_subsidy"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_subsidyid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"subsidyId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_brands"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_brandid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_models"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_modelid"}}]}}]}}]}}]} as unknown as DocumentNode<GetSubsidy_ProcessLeasingObjectQuery, GetSubsidy_ProcessLeasingObjectQueryVariables>;
export const GetImportProgram_ProcessLeasingObjectDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetImportProgram_ProcessLeasingObject"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"importProgramId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"importProgram"},"name":{"kind":"Name","value":"evo_subsidy"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_subsidyid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"importProgramId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_brands"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_brandid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_models"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_modelid"}}]}}]}}]}}]} as unknown as DocumentNode<GetImportProgram_ProcessLeasingObjectQuery, GetImportProgram_ProcessLeasingObjectQueryVariables>;
export const GetProduct_ProcessLeasingObjectDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetProduct_ProcessLeasingObject"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"productId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_baseproduct"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_baseproductid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"productId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_brands"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_brandid"}}]}}]}}]}}]} as unknown as DocumentNode<GetProduct_ProcessLeasingObjectQuery, GetProduct_ProcessLeasingObjectQueryVariables>;
export const GetConfigurations_ProcessLeasingObjectDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetConfigurations_ProcessLeasingObject"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"modelId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_equipments"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_modelid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"modelId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_equipmentid"}}]}}]}}]} as unknown as DocumentNode<GetConfigurations_ProcessLeasingObjectQuery, GetConfigurations_ProcessLeasingObjectQueryVariables>;
export const GetLeasingWithoutKaskoOptionsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetLeasingWithoutKaskoOptions"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_addproduct_types"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_product_type"},"value":{"kind":"IntValue","value":"100000007"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_addproduct_typeid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_product_type"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_price"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_price"}},{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_types"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_leasingobject_typeid"}}]}},{"kind":"Field","name":{"kind":"Name","value":"evo_visible_calc"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_first_payment_perc"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_first_payment_perc"}},{"kind":"Field","name":{"kind":"Name","value":"evo_models"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_modelid"}}]}}]}}]}}]} as unknown as DocumentNode<GetLeasingWithoutKaskoOptionsQuery, GetLeasingWithoutKaskoOptionsQueryVariables>;
export const GetPaymentsDataFromQuoteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetPaymentsDataFromQuote"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"quote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"quoteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_accept_period"}},{"kind":"Field","name":{"kind":"Name","value":"evo_first_payment_perc"}},{"kind":"Field","name":{"kind":"Name","value":"evo_last_payment_perc"}},{"kind":"Field","name":{"kind":"Name","value":"evo_graph_type"}},{"kind":"Field","name":{"kind":"Name","value":"evo_payments_decrease_perc"}},{"kind":"Field","name":{"kind":"Name","value":"evo_seasons_type"}},{"kind":"Field","name":{"kind":"Name","value":"evo_high_season"}},{"kind":"Field","name":{"kind":"Name","value":"evo_graphs"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createdon"}},{"kind":"Field","name":{"kind":"Name","value":"evo_sumpay_withnds"}},{"kind":"Field","name":{"kind":"Name","value":"evo_planpayments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_payment_ratio"}}]}}]}}]}}]}}]} as unknown as DocumentNode<GetPaymentsDataFromQuoteQuery, GetPaymentsDataFromQuoteQueryVariables>;
export const GetCurrencyChangesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetCurrencyChanges"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_currencychanges"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_coursedate_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"eq"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_currencychange"}},{"kind":"Field","name":{"kind":"Name","value":"evo_ref_transactioncurrency"}}]}}]}}]} as unknown as DocumentNode<GetCurrencyChangesQuery, GetCurrencyChangesQueryVariables>;
export const GetCurrencyIsoCodeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetCurrencyISOCode"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"transactioncurrency"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"transactioncurrencyid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isocurrencycode"}}]}}]}}]} as unknown as DocumentNode<GetCurrencyIsoCodeQuery, GetCurrencyIsoCodeQueryVariables>;
export const GetImportProgramSubsidyDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetImportProgramSubsidy"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"importProgramId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"importProgram"},"name":{"kind":"Name","value":"evo_subsidy"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_subsidyid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"importProgramId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_subsidy_summ"}},{"kind":"Field","name":{"kind":"Name","value":"evo_percent_subsidy"}},{"kind":"Field","name":{"kind":"Name","value":"evo_max_subsidy_summ"}}]}}]}}]} as unknown as DocumentNode<GetImportProgramSubsidyQuery, GetImportProgramSubsidyQueryVariables>;
export const GetRewardRulesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRewardRules"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"conditionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_reward_condition"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_reward_conditionid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"conditionId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_calc_reward_rules"}}]}}]}}]} as unknown as DocumentNode<GetRewardRulesQuery, GetRewardRulesQueryVariables>;
export const GetAgentsDataFromQuoteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAgentsDataFromQuote"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"quote"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"quoteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"quoteId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_supplier_accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_dealer_person_accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_dealer_reward_conditionid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_dealer_reward_total"}},{"kind":"Field","name":{"kind":"Name","value":"evo_dealer_reward_summ"}},{"kind":"Field","name":{"kind":"Name","value":"evo_dealer_broker_accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_dealer_broker_reward_conditionid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_dealer_broker_reward_total"}},{"kind":"Field","name":{"kind":"Name","value":"evo_dealer_broker_reward_summ"}},{"kind":"Field","name":{"kind":"Name","value":"evo_agent_accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_agent_reward_conditionid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_agent_reward_total"}},{"kind":"Field","name":{"kind":"Name","value":"evo_agent_reward_summ"}},{"kind":"Field","name":{"kind":"Name","value":"evo_double_agent_accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_double_agent_reward_conditionid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_double_agent_reward_total"}},{"kind":"Field","name":{"kind":"Name","value":"evo_double_agent_reward_summ"}},{"kind":"Field","name":{"kind":"Name","value":"evo_broker_accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_broker_reward_conditionid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_broker_reward_total"}},{"kind":"Field","name":{"kind":"Name","value":"evo_broker_reward_summ"}},{"kind":"Field","name":{"kind":"Name","value":"evo_fin_department_accountid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_fin_department_reward_conditionid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_fin_department_reward_total"}},{"kind":"Field","name":{"kind":"Name","value":"evo_fin_department_reward_summ"}}]}}]}}]} as unknown as DocumentNode<GetAgentsDataFromQuoteQuery, GetAgentsDataFromQuoteQueryVariables>;
export const GetRewardConditionsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRewardConditions"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"agentid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_reward_conditions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_agent_accountid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"agentid"}}},{"kind":"Argument","name":{"kind":"Name","value":"evo_datefrom_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"lte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"evo_dateto_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"gte"},"value":{"kind":"Variable","name":{"kind":"Name","value":"currentDate"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"statecode"},"value":{"kind":"IntValue","value":"0"}},{"kind":"Argument","name":{"kind":"Name","value":"evo_agency_agreementid_param"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"has"},"value":{"kind":"BooleanValue","value":true}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"label"},"name":{"kind":"Name","value":"evo_name"}},{"kind":"Field","alias":{"kind":"Name","value":"value"},"name":{"kind":"Name","value":"evo_reward_conditionid"}},{"kind":"Field","name":{"kind":"Name","value":"evo_reward_summ"}}]}}]}}]} as unknown as DocumentNode<GetRewardConditionsQuery, GetRewardConditionsQueryVariables>;
export const GetRewardSummDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRewardSumm"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"conditionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_reward_condition"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_reward_conditionid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"conditionId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_reward_summ"}}]}}]}}]} as unknown as DocumentNode<GetRewardSummQuery, GetRewardSummQueryVariables>;
export const GetRewardConditionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRewardCondition"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"conditionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_reward_condition"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_reward_conditionid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"conditionId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_reward_summ"}},{"kind":"Field","name":{"kind":"Name","value":"evo_reduce_reward"}},{"kind":"Field","name":{"kind":"Name","value":"evo_min_reward_summ"}},{"kind":"Field","name":{"kind":"Name","value":"evo_agency_agreementidData"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_required_reward"}}]}}]}}]}}]} as unknown as DocumentNode<GetRewardConditionQuery, GetRewardConditionQueryVariables>;
export const GetAgentAccountIdFromLeadDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAgentAccountIdFromLead"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"leadid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"lead"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"leadid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"leadid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentid"},"name":{"kind":"Name","value":"evo_agent_accountid"}}]}}]}}]} as unknown as DocumentNode<GetAgentAccountIdFromLeadQuery, GetAgentAccountIdFromLeadQueryVariables>;
export const GetDoubleAgentAccountIdDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetDoubleAgentAccountId"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"leadid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"lead"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"leadid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"leadid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentid"},"name":{"kind":"Name","value":"evo_double_agent_accountid"}}]}}]}}]} as unknown as DocumentNode<GetDoubleAgentAccountIdQuery, GetDoubleAgentAccountIdQueryVariables>;
export const GetBrokerAccountIdDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetBrokerAccountId"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"leadid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"lead"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"leadid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"leadid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentid"},"name":{"kind":"Name","value":"evo_broker_accountid"}}]}}]}}]} as unknown as DocumentNode<GetBrokerAccountIdQuery, GetBrokerAccountIdQueryVariables>;
export const GetFinDepartmentAccountIdDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetFinDepartmentAccountId"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"leadid"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"lead"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"leadid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"leadid"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentid"},"name":{"kind":"Name","value":"evo_fin_department_accountid"}}]}}]}}]} as unknown as DocumentNode<GetFinDepartmentAccountIdQuery, GetFinDepartmentAccountIdQueryVariables>;
export const GetRewardWithoutOtherAgentDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRewardWithoutOtherAgent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"conditionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_reward_condition"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"evo_reward_conditionid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"conditionId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_agency_agreementidData"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_reward_without_other_agent"}}]}}]}}]}}]} as unknown as DocumentNode<GetRewardWithoutOtherAgentQuery, GetRewardWithoutOtherAgentQueryVariables>;
export const GetBrokerAccountIdFromDealerDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetBrokerAccountIdFromDealer"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"dealerId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Uuid"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dealer"},"name":{"kind":"Name","value":"account"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"accountid"},"value":{"kind":"Variable","name":{"kind":"Name","value":"dealerId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evo_broker_accountid"}}]}}]}}]} as unknown as DocumentNode<GetBrokerAccountIdFromDealerQuery, GetBrokerAccountIdFromDealerQueryVariables>;

View File

@ -42,8 +42,10 @@
},
"devDependencies": {
"@graphql-codegen/cli": "^2.16.3",
"@graphql-codegen/typed-document-node": "^2.3.13",
"@graphql-codegen/typescript": "^2.8.7",
"@graphql-codegen/typescript-operations": "^2.5.12",
"@graphql-typed-document-node/patch-cli": "^3.0.9",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@types/node": "^18.11.18",

View File

@ -1,13 +0,0 @@
/* eslint-disable import/prefer-default-export */
import { gql } from '@apollo/client';
export const QUERY_GET_TARIF = gql`
query GetTarif_ProcessConfigurator($tarifId: Uuid!) {
evo_tarif(evo_tarifid: $tarifId) {
evo_irr
evo_graphtype_exception
evo_seasons_type_exception
evo_min_decreasing_perc
}
}
`;

View File

@ -3,26 +3,15 @@ import { gql } from '@apollo/client';
import { radioGraphType, selectSeasonType } from 'config/default-options';
import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc';
import type * as CRMTypes from 'graphql/crm.types';
import * as CRMTypes from 'graphql/crm.types';
import { reaction } from 'mobx';
import { SEASON_TYPES } from 'process/payments/lib/seasons-constants';
import type { ReactionsContext } from 'process/types';
import { diff } from 'radash';
import { normalizeOptions } from 'tools';
import { QUERY_GET_TARIF } from '../lib/query';
dayjs.extend(utc);
const QUERY_GET_LEASE_OBJECT_TYPES = gql`
query GetLeaseObjectTypes_ProcessConfigurator {
evo_leasingobject_types(statecode: 0) {
label: evo_name
value: evo_leasingobject_typeid
evo_leasingobject_typeid
}
}
`;
const QUERY_GET_PRODUCT = gql`
query GetProduct_ProcessConfigurator($productId: Uuid!) {
evo_baseproduct(evo_baseproductid: $productId) {
@ -63,16 +52,6 @@ const QUERY_GET_IMPORT_PROGRAM = gql`
}
`;
const QUERY_GET_DEALERS = gql`
query GetDealers_ProcessConfigurator {
dealers: accounts(evo_account_type: [100000001], statecode: 0, evo_legal_form: 100000001) {
label: name
value: accountid
accountid
}
}
`;
const QUERY_GET_DEALER_PERSONS = gql`
query GetDealerPersons_ProcessConfigurator($dealerId: Uuid!) {
dealerPersons: salon_providers(statecode: 0, salonaccountid: $dealerId) {
@ -91,19 +70,6 @@ const QUERY_GET_QUOTE = gql`
}
`;
const QUERY_GET_PRODUCTS = gql`
query GetProducts_ProcessConfigurator($currentDate: DateTime) {
evo_baseproducts(
statecode: 0
evo_relation: [100000000]
evo_datefrom_param: { lte: $currentDate }
evo_dateto_param: { gte: $currentDate }
) {
evo_baseproductid
}
}
`;
export default function commonReactions({ store, apolloClient }: ReactionsContext) {
const { $calculation } = store;
@ -144,20 +110,14 @@ export default function commonReactions({ store, apolloClient }: ReactionsContex
let {
data: { evo_leasingobject_types: leaseObjectTypes = [] },
} = await apolloClient.query<
CRMTypes.GetLeaseObjectTypes_ProcessConfiguratorQuery,
CRMTypes.GetLeaseObjectTypes_ProcessConfiguratorQueryVariables
>({
query: QUERY_GET_LEASE_OBJECT_TYPES,
} = await apolloClient.query({
query: CRMTypes.GetLeaseObjectTypesDocument,
});
let {
data: { dealers = [] },
} = await apolloClient.query<
CRMTypes.GetDealers_ProcessConfiguratorQuery,
CRMTypes.GetDealers_ProcessConfiguratorQueryVariables
>({
query: QUERY_GET_DEALERS,
} = await apolloClient.query({
query: CRMTypes.GetDealersDocument,
});
let dealerPersons: CRMTypes.GetDealerPersons_ProcessConfiguratorQuery['dealerPersons'] = [];
@ -307,14 +267,11 @@ export default function commonReactions({ store, apolloClient }: ReactionsContex
reaction(
() => $calculation.element('selectTarif').getValue(),
async (tarifId) => {
let evo_tarif: CRMTypes.GetTarif_ProcessConfiguratorQuery['evo_tarif'] = null;
let evo_tarif: CRMTypes.GetTarifQuery['evo_tarif'] = null;
if (tarifId) {
const { data } = await apolloClient.query<
CRMTypes.GetTarif_ProcessConfiguratorQuery,
CRMTypes.GetTarif_ProcessConfiguratorQueryVariables
>({
query: QUERY_GET_TARIF,
const { data } = await apolloClient.query({
query: CRMTypes.GetTarifDocument,
variables: {
tarifId,
},
@ -346,14 +303,11 @@ export default function commonReactions({ store, apolloClient }: ReactionsContex
graphType: $calculation.element('radioGraphType').getValue(),
}),
async ({ tarif, graphType }) => {
let evo_tarif: CRMTypes.GetTarif_ProcessConfiguratorQuery['evo_tarif'] = null;
let evo_tarif: CRMTypes.GetTarifQuery['evo_tarif'] = null;
if (tarif) {
const { data } = await apolloClient.query<
CRMTypes.GetTarif_ProcessConfiguratorQuery,
CRMTypes.GetTarif_ProcessConfiguratorQueryVariables
>({
query: QUERY_GET_TARIF,
const { data } = await apolloClient.query({
query: CRMTypes.GetTarifDocument,
variables: {
tarifId: tarif,
},
@ -431,11 +385,8 @@ export default function commonReactions({ store, apolloClient }: ReactionsContex
const {
data: { evo_baseproducts },
} = await apolloClient.query<
CRMTypes.GetProducts_ProcessConfiguratorQuery,
CRMTypes.GetProducts_ProcessConfiguratorQueryVariables
>({
query: QUERY_GET_PRODUCTS,
} = await apolloClient.query({
query: CRMTypes.GetProductsDocument,
variables: {
currentDate,
},

View File

@ -1,7 +1,6 @@
import type * as CRMTypes from 'graphql/crm.types';
import * as CRMTypes from 'graphql/crm.types';
import { reaction } from 'mobx';
import type { ReactionsContext } from 'process/types';
import { QUERY_GET_TARIF } from '../lib/query';
export default function validationReactions({ store, apolloClient }: ReactionsContext) {
const { $calculation } = store;
@ -22,14 +21,11 @@ export default function validationReactions({ store, apolloClient }: ReactionsCo
}),
async ({ parmentsDecreasePercent, tarifId }) => {
// eslint-disable-next-line @typescript-eslint/naming-convention
let evo_tarif: CRMTypes.GetTarif_ProcessConfiguratorQuery['evo_tarif'] = null;
let evo_tarif: CRMTypes.GetTarifQuery['evo_tarif'] = null;
if (tarifId) {
const { data } = await apolloClient.query<
CRMTypes.GetTarif_ProcessConfiguratorQuery,
CRMTypes.GetTarif_ProcessConfiguratorQueryVariables
>({
query: QUERY_GET_TARIF,
const { data } = await apolloClient.query({
query: CRMTypes.GetTarifDocument,
variables: {
tarifId,
},

View File

@ -1,39 +1,14 @@
/* eslint-disable @typescript-eslint/naming-convention */
import { gql } from '@apollo/client';
import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc';
import { autorun, reaction } from 'mobx';
import type * as CRMTypes from 'graphql/crm.types';
import * as CRMTypes from 'graphql/crm.types';
import type { ReactionsContext } from 'process/types';
import { makeDisposable, normalizeOptions } from 'tools';
import { QUERY_GET_TARIF } from '../lib/query';
dayjs.extend(utc);
const QUERY_GET_TARIFS = gql`
query GetTarifs_ProcessConfigurator($currentDate: DateTime) {
evo_tarifs(
statecode: 0
evo_datefrom_param: { lte: $currentDate }
evo_dateto_param: { gte: $currentDate }
) {
label: evo_name
value: evo_tarifid
evo_tarifid
evo_baseproductid
evo_min_period
evo_max_period
evo_delivery_time
evo_min_first_payment
evo_max_first_payment
evo_min_last_payment
evo_max_last_payment
evo_used
}
}
`;
export default function valuesReactions({ store, apolloClient }: ReactionsContext) {
const { $calculation, $process } = store;
@ -52,11 +27,8 @@ export default function valuesReactions({ store, apolloClient }: ReactionsContex
let {
data: { evo_tarifs = [] },
} = await apolloClient.query<
CRMTypes.GetTarifs_ProcessConfiguratorQuery,
CRMTypes.GetTarifs_ProcessConfiguratorQueryVariables
>({
query: QUERY_GET_TARIFS,
} = await apolloClient.query({
query: CRMTypes.GetTarifsDocument,
variables: {
currentDate,
},
@ -117,11 +89,8 @@ export default function valuesReactions({ store, apolloClient }: ReactionsContex
}
const {
data: { evo_tarif },
} = await apolloClient.query<
CRMTypes.GetTarif_ProcessConfiguratorQuery,
CRMTypes.GetTarif_ProcessConfiguratorQueryVariables
>({
query: QUERY_GET_TARIF,
} = await apolloClient.query({
query: CRMTypes.GetTarifDocument,
variables: {
tarifId,
},

View File

@ -2,24 +2,15 @@
import { gql, useApolloClient } from '@apollo/client';
import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc';
import * as CRMTypes from 'graphql/crm.types';
import { useEffect } from 'react';
import { useStore } from 'stores/hooks';
import { normalizeOptions } from 'tools';
dayjs.extend(utc);
const QUERY_GET_MAIN_OPTIONS = gql`
query GetMainOptions {
selectSupplierCurrency: transactioncurrencies {
label: currencyname
currencysymbol
value: transactioncurrencyid
}
selectLeaseObjectType: evo_leasingobject_types(statecode: 0) {
label: evo_name
value: evo_leasingobject_typeid
}
const QUERY_GET_GPS_BRANDS = gql`
query GetGPSBrands {
selectGPSBrand: evo_gps_brands(statecode: 0) {
label: evo_name
value: evo_gps_brandid
@ -27,20 +18,6 @@ const QUERY_GET_MAIN_OPTIONS = gql`
}
`;
const QUERY_GET_PRODUCTS = gql`
query GetProducts($currentDate: DateTime) {
selectProduct: evo_baseproducts(
statecode: 0
evo_relation: [100000000]
evo_datefrom_param: { lte: $currentDate }
evo_dateto_param: { gte: $currentDate }
) {
label: evo_name
value: evo_baseproductid
}
}
`;
const QUERY_GET_SUBSIDIES = gql`
query GetSubsidies($currentDate: DateTime) {
evo_subsidies(
@ -64,24 +41,6 @@ const QUERY_GET_REGIONS = gql`
}
`;
const QUERY_GET_BRANDS = gql`
query GetBrands {
selectBrand: evo_brands(statecode: 0) {
label: evo_name
value: evo_brandid
}
}
`;
const QUERY_GET_DEALERS = gql`
query GetDealers {
selectDealer: accounts(evo_account_type: [100000001], statecode: 0, evo_legal_form: 100000001) {
label: name
value: accountid
}
}
`;
const QUERY_GET_ADDPRODUCT_TYPES = gql`
query GetAddproductTypes($currentDate: DateTime) {
evo_addproduct_types(
@ -97,35 +56,51 @@ const QUERY_GET_ADDPRODUCT_TYPES = gql`
}
`;
const QUERY_GET_TARIFS = gql`
query GetTarifs($currentDate: DateTime) {
selectTarif: evo_tarifs(
statecode: 0
evo_datefrom_param: { lte: $currentDate }
evo_dateto_param: { gte: $currentDate }
) {
label: evo_name
value: evo_tarifid
}
}
`;
const currentDate = dayjs().utc(false).toISOString();
/**
*
* @param {import('@apollo/client').ApolloClient['query']} query
* @param {*} onCompleted
*/
function getMainData(query, onCompleted) {
query({
query: QUERY_GET_MAIN_OPTIONS,
query: CRMTypes.GetTransactionCurrenciesDocument,
variables: {
currentDate,
},
}).then(({ data }) => {
onCompleted({
selectSupplierCurrency: data?.transactioncurrencies,
});
});
query({
query: CRMTypes.GetLeaseObjectTypesDocument,
variables: {
currentDate,
},
}).then(({ data }) => {
onCompleted({
selectLeaseObjectType: data?.evo_baseproducts,
});
});
query({
query: QUERY_GET_GPS_BRANDS,
}).then(({ data }) => {
onCompleted(data);
});
query({
query: QUERY_GET_PRODUCTS,
query: CRMTypes.GetProductsDocument,
variables: {
currentDate,
},
}).then(({ data }) => {
onCompleted(data);
onCompleted({
selectProduct: data?.evo_baseproducts,
});
});
query({
@ -163,15 +138,19 @@ function getMainData(query, onCompleted) {
});
query({
query: QUERY_GET_BRANDS,
query: CRMTypes.GetBrandsDocument,
}).then(({ data }) => {
onCompleted(data);
onCompleted({
selectBrand: data?.evo_brands,
});
});
query({
query: QUERY_GET_DEALERS,
query: CRMTypes.GetDealersDocument,
}).then(({ data }) => {
onCompleted(data);
onCompleted({
selectDealer: data?.dealers,
});
});
query({
@ -227,12 +206,14 @@ function getMainData(query, onCompleted) {
});
query({
query: QUERY_GET_TARIFS,
query: CRMTypes.GetTarifsDocument,
variables: {
currentDate,
},
}).then(({ data }) => {
onCompleted(data);
onCompleted({
selectTarif: data?.evo_tarifs,
});
});
}
@ -243,7 +224,7 @@ export function useMainData() {
function handleOnCompleted(options) {
Object.keys(options).forEach((elementName) => {
const elementOptions = options[elementName];
$calculation.element(elementName).setOptions(elementOptions);
$calculation.element(elementName).setOptions(normalizeOptions(elementOptions));
});
}

View File

@ -1,19 +1,9 @@
/* eslint-disable @typescript-eslint/naming-convention */
import { gql } from '@apollo/client';
import type { GetTransactionCurrenciesQuery } from 'graphql/crm.types';
import { GetTransactionCurrenciesDocument } from 'graphql/crm.types';
import { when } from 'mobx';
import type { ReactionsContext } from 'process/types';
export default function setInitialValuesReactions({ store, apolloClient }: ReactionsContext) {
const QUERY_GET_TRANSACTION_CURRENCIES = gql`
query GetTransactionCurrencies {
transactioncurrencies {
isocurrencycode
transactioncurrencyid
}
}
`;
const { $calculation } = store;
when(
@ -21,8 +11,8 @@ export default function setInitialValuesReactions({ store, apolloClient }: React
async () => {
const {
data: { transactioncurrencies },
} = await apolloClient.query<GetTransactionCurrenciesQuery>({
query: QUERY_GET_TRANSACTION_CURRENCIES,
} = await apolloClient.query({
query: GetTransactionCurrenciesDocument,
});
const transactioncurrency_rub = transactioncurrencies?.find(

View File

@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/naming-convention */
import { gql } from '@apollo/client';
import type * as CRMTypes from 'graphql/crm.types';
import * as CRMTypes from 'graphql/crm.types';
import { reaction } from 'mobx';
import type { ReactionsContext } from 'process/types';
import { intersects } from 'radash';
@ -51,17 +51,6 @@ const QUERY_GET_IMPORT_PROGRAM = gql`
}
`;
const QUERY_GET_BRANDS = gql`
query GetBrands_ProcessLeasingObject {
evo_brands(statecode: 0) {
label: evo_name
value: evo_brandid
evo_brandid
evo_vehicle_type
}
}
`;
const QUERY_GET_PRODUCT = gql`
query GetProduct_ProcessLeasingObject($productId: Uuid!) {
evo_baseproduct(evo_baseproductid: $productId) {
@ -222,11 +211,8 @@ export default function commonReactions({ store, apolloClient }: ReactionsContex
async ({ productId, subsidyId, importProgramId, leaseObjectTypeId }) => {
const {
data: { evo_brands },
} = await apolloClient.query<
CRMTypes.GetBrands_ProcessLeasingObjectQuery,
CRMTypes.GetBrands_ProcessLeasingObjectQueryVariables
>({
query: QUERY_GET_BRANDS,
} = await apolloClient.query({
query: CRMTypes.GetBrandsDocument,
});
let brands = evo_brands;

View File

@ -2,10 +2,10 @@
import type { ApolloClient, DocumentNode } from '@apollo/client';
import { gql } from '@apollo/client';
import type { Elements } from 'Components/Calculation/config/map/values';
import { QUERY_GET_AGENT } from 'graphql/crm.query';
import type { GetAgentQuery, GetAgentQueryVariables } from 'graphql/crm.types';
import type RootStore from 'stores/root';
import { normalizeOptions } from 'tools/entity';
import { QUERY_GET_AGENT } from './query';
function makeFillAgentFromLead(
elementName: Elements,

View File

@ -1,18 +0,0 @@
import { gql } from '@apollo/client';
export const QUERY_GET_AGENT = gql`
query GetAgent($agentid: Uuid!) {
agent: account(accountid: $agentid) {
label: name
value: accountid
}
}
`;
export const QUERY_GET_DEALER_RETURN_LEASING = gql`
query GetDealerReturnLeasing($dealerId: Uuid!) {
dealer: account(accountid: $dealerId) {
evo_return_leasing_dealer
}
}
`;

View File

@ -1,7 +1,7 @@
import { QUERY_GET_DEALER_RETURN_LEASING } from 'graphql/crm.query';
import type * as CRMTypes from 'graphql/crm.types';
import { autorun, reaction } from 'mobx';
import type { ReactionsContext } from 'process/types';
import * as query from '../lib/query';
export default function leasebackReactions({ store, apolloClient }: ReactionsContext) {
const { $calculation, $tables } = store;
@ -31,7 +31,7 @@ export default function leasebackReactions({ store, apolloClient }: ReactionsCon
CRMTypes.GetDealerReturnLeasingQuery,
CRMTypes.GetDealerReturnLeasingQueryVariables
>({
query: query.QUERY_GET_DEALER_RETURN_LEASING,
query: QUERY_GET_DEALER_RETURN_LEASING,
variables: {
dealerId,
},
@ -65,7 +65,7 @@ export default function leasebackReactions({ store, apolloClient }: ReactionsCon
CRMTypes.GetDealerReturnLeasingQuery,
CRMTypes.GetDealerReturnLeasingQueryVariables
>({
query: query.QUERY_GET_DEALER_RETURN_LEASING,
query: QUERY_GET_DEALER_RETURN_LEASING,
variables: {
dealerId,
},
@ -105,7 +105,7 @@ export default function leasebackReactions({ store, apolloClient }: ReactionsCon
CRMTypes.GetDealerReturnLeasingQuery,
CRMTypes.GetDealerReturnLeasingQueryVariables
>({
query: query.QUERY_GET_DEALER_RETURN_LEASING,
query: QUERY_GET_DEALER_RETURN_LEASING,
variables: {
dealerId,
},

View File

@ -2,13 +2,15 @@
import { gql } from '@apollo/client';
import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc';
import type * as CRMTypes from 'graphql/crm.types';
import * as query from 'graphql/crm.query';
import * as CRMTypes from 'graphql/crm.types';
import { reaction } from 'mobx';
import type { ReactionsContext } from 'process/types';
import { sift } from 'radash';
import { normalizeOptions } from 'tools/entity';
import * as createReactions from '../lib/create-reactions';
import * as query from '../lib/query';
const { QUERY_GET_DEALER_RETURN_LEASING, QUERY_GET_AGENT } = query;
dayjs.extend(utc);
@ -22,17 +24,6 @@ export function commonReactions({ store, apolloClient }: ReactionsContext) {
* И связаны с карточкой Контрагент из поля "Салон приобретения" по связи Салон-ЮЛ
*/
const QUERY_GET_DEALER_PERSON = gql`
query GetDealerPerson($dealerId: Uuid!) {
salon_providers(statecode: 0, salonaccountid: $dealerId) {
label: name
value: accountid
evo_inn
evo_kpp
}
}
`;
reaction(
() => $calculation.element('selectDealer').getValue(),
async (dealerId) => {
@ -48,7 +39,7 @@ export function commonReactions({ store, apolloClient }: ReactionsContext) {
CRMTypes.GetDealerReturnLeasingQuery,
CRMTypes.GetDealerReturnLeasingQueryVariables
>({
query: query.QUERY_GET_DEALER_RETURN_LEASING,
query: QUERY_GET_DEALER_RETURN_LEASING,
variables: {
dealerId,
},
@ -60,11 +51,8 @@ export function commonReactions({ store, apolloClient }: ReactionsContext) {
const {
data: { salon_providers },
} = await apolloClient.query<
CRMTypes.GetDealerPersonQuery,
CRMTypes.GetDealerPersonQueryVariables
>({
query: QUERY_GET_DEALER_PERSON,
} = await apolloClient.query({
query: CRMTypes.GetDealerPersonsDocument,
variables: {
dealerId,
},
@ -127,7 +115,7 @@ export function commonReactions({ store, apolloClient }: ReactionsContext) {
const {
data: { agent: dealerBroker },
} = await apolloClient.query<CRMTypes.GetAgentQuery, CRMTypes.GetAgentQueryVariables>({
query: query.QUERY_GET_AGENT,
query: QUERY_GET_AGENT,
variables: {
agentid: dealer?.evo_broker_accountid,
},

View File

@ -3,5 +3,12 @@ import { isEmpty } from 'radash';
import type { BaseOption } from 'ui/elements/types';
export function normalizeOptions(options: any[] | null | undefined) {
return (isEmpty(options) ? [] : options) as BaseOption[];
if (isEmpty(options)) {
return [];
}
return options?.map(({ label, value }) => ({
label,
value,
})) as BaseOption[];
}

767
yarn.lock

File diff suppressed because it is too large Load Diff