export interface IGetP2POrders {
	userId: string;
	exchangeId: string;
	exchangeName: string;
	shortName: string;
	// objParams: any;
	objParams: {
		asset?: string,
		fiat?: string,
		arrPayments?: string[],
		sideType?: string,
		quantityPages?: string,
		amount?: string,
		page?: number,
		rows?: number,
		uid?: string, // BT
	};
}

export interface IGetMerchantOrders {
	userId: string;
	exchangeId: string;
	exchangeName: string;
	shortName: string;
	// objParams: any;
	objParams: {
		page?: number, // BN, HB, MG
		rows?: number, // BN
		orderStatus?: string, // BN, HB
		tradeType?: string, // BN, MG
		orderType?: string, // HB
		asset?: string, // BN
		quantityPages?: string, // all
		coinName?: string, // MG
		orderDealStates?: string, // MG
	};
}

export interface IGetMerchantDetails {
	userId: string;
	exchangeId: string;
	exchangeName: string;
	shortName: string;
	merchantId: string;
}

export interface IGetMerchantAdvs {
	userId: string;
	exchangeId: string;
	exchangeName: string;
	shortName: string;
	objParams: {
		page?: number,
		rows?: number,
		inDeal?: number,
		advStatus?: string,
		tradeType?: string,
		asset?: string,
		quantityPages?: string,
	};
}

export interface IGetHistorySpotOrders {
	userId: string;
	typeOrder: string;
	exchangeId: string;
	exchange: string;
	shortName: string;
	params: {
		page?: number,
		rows?: number,
		startTime?: any,
		endTime?: any,
		quantityPages?: string,
	};
}

export interface IGetActiveSpotOrders {
	userId: string;
	typeOrder: string;
	exchangeId: string;
	exchange: string;
	shortName: string;
}

export interface IInsertOrderToDB {
	userId: string;
	orders: any; // for GT merchantOrders[]
	typeOrder: string; // SPOT or MERCHANT
	shortName: string; // BN, HB, ...
	exchangeId: string; // ID биржи
	// requestHeader?: any;
}

export interface IInsertNewItemToDB {
	userId: string;
	typeItem: string;
	objItem: any;
}

export interface IGetGroupItems {
	userId: string;
	typeItems: string; // allAdvs, allBalances, allOtcOrders
}

export interface IInsertBalanceToDB {
	userId: string;
	localDate: string;
	balances: any;
	cashBalanceRUB: string;
	creditBalanceRUB: string;
	creditAcceptedRUB: string;
	creditReturnedRUB: string;
}

export interface IGetReportOrders {
	userId: string;
	startTime: number | string;
	endTime: number | string;
	exchangeId: string;
	payTypeId: string;
	coin: string;
	fiat: string;
	subAccount: string;
	sideType: string;
	orderType: string;
	isMonthStats: boolean;
	isYearStatsV1: boolean;
	isYearStatsV2: boolean;
}

export interface IGetBalances {
	userId: string;
	exchange: string;
	exchangeId: string;
	shortName: string;
}

export interface ITransferAsset {
	userId: string;
	exchange: string;
	shortName: string;
	toNameAccount: string;
	requestHeader?: any;
}

export interface IGetEditableAdv {
	userId: string;
	exchangeId: string;
	exchangeName: string;
	shortName: string;
	advIdNumber: string;
}

export interface IGetEditableOrder {
	userId: string;
	orderId: string;
	exchange: string;
}

export interface IUpdateAdv {
	userId: string;
	exchangeId: string;
	exchangeName: string;
	shortName: string;
	advDetails: any;
	objOrder: {
		quantityPages: string,
		page: number,
		rows: number,
		fiat: string,
		asset: string,
		tradeType: string,
		payTypeList: string[],
		transAmount: string,
	};
}

export interface IUpdateItemDetails {
	itemFlag: string; // "payTypeItem" || "orderItem" || "exchangeItem" || "currencyItem"
	itemDetails: any;
}

export interface IChangeAdvStatus {
	userId: string;
	exchangeId: string;
	exchangeName: string;
	shortName: string;
	arrayAdvNumbers: string[];
	advStatus: number;
}

export interface ILoginUser {
	login: string;
	pass: string;
}

export interface ICreateNewUser {
	inputEmail: string;
	inputPassword: string;
}

export interface ICheckOrderStatus {
	userId: string;
}

export interface IUpdateUser {
	id: string;
	fieldChangeable: string;
	exchange?: string;
	exchangeId?: string;
	lang?: string;
	theme?: string;
	advSell?: number;
	objExchange?: any;
	userNickName?: string;
	updateOrders?: boolean;
	exchangeUserId?: string;
	payTypeList?: string[];
	favoriteUser?: { nickName: string, userId: string };
	inputOldPass?: any;
	inputNewPass?: any;
	apiKeys?: any;
	requestHeader?: {
		// ------- Binance -------
		cookie?: string,
		csrftoken?: string,
		deviceInfo?: string,
		userAgent?: string,
		// ------- Huobi --------
		token?: string,
		fingerprint?: string,
		// userAgent?: string,
		traceId?: string,
		// ------- Okex ---------
		authorization?: string,
		// cookie?: string,
		// userAgent?: string,
		devId?: string,
		// ------- Bitzlato ---------
		// cookie?: string,
		// userAgent?: string,
		// ------- Bybit ---------
		usertoken?: string,
		// cookie?: string,
		// userAgent?: string,
		// ------- BingX ---------
		appVersion?: string,
		// authorization?: string,
		deviceId?: string,
		sign?: string,
		timestamp?: number,
		// traceId?: string,
		// userAgent?: string,
		additionals?: Array<{
			appVersion: string,
			authorization: string,
			deviceId: string,
			sign: string,
			timestamp: number,
			traceId: string,
			userAgent: string,
			typeRequest: string,
		}>,
	};
}
