Commit 2fb743ec authored by Neosoulink's avatar Neosoulink
Browse files

feat: base merchant client support

parent a9febf8c
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
import type { MaybeType, ScalarsInterface } from '../../types';
import type { GeoLocationInputInterface } from '../types';

export interface MerchantsSearchedInterface {
	__typename: string;
	id: string;
	isActive: boolean;
	logo: string;
	name: string;
	username: string;
}

export interface QueryGetCloseMerchantsArgsInterface {
	geoLocation: GeoLocationInputInterface;
}

export interface MerchantsOrdersInterface {
	_id?: MaybeType<ScalarsInterface['String']>;
	ordersCount?: MaybeType<ScalarsInterface['Int']>;
}

export interface QueryGetMerchantsByNameArgsInterface {
	searchName: ScalarsInterface['String'];
	geoLocation?: MaybeType<GeoLocationInputInterface>;
}
+1 −0
Original line number Diff line number Diff line
// import { gql, TypedDocumentNode } from '@apollo/client';
+22 −0
Original line number Diff line number Diff line
import { gql, TypedDocumentNode } from '@apollo/client';

/**
 * Query to retrieve merchants by name
 */
export const GET_MERCHANTS_QUERY: TypedDocumentNode = gql`
	query GetMerchantsBuyName(
		$searchName: String!
		$geoLocation: GeoLocationFindInput
	) {
		getMerchantsBuyName(
			searchName: $searchName
			geoLocation: $geoLocation
		) {
			id
			username
			name
			logo
			isActive
		}
	}
`;