import OrderappClientApi from './index' export default class MerchantApi { api: OrderappClientApi constructor (api: OrderappClientApi) { this.api = api } async getMerchant (merchantId: string): Promise { const endpoint = `/c/merchant/${merchantId}` const response = await this.api.axiosGo.get(endpoint) return response.data } async getTimeslot (merchantId: string): Promise { const endpoint = `/c/merchant/${merchantId}/timeslots` const response = await this.api.axiosGo.get(endpoint) return response.data } async link (): Promise { const endpoint = '/c/merchant/link' const response = await this.api.axiosGo.get(endpoint) return response.data } async getUiVersion (client: string): Promise { const response = await this.api.axiosGo.post('/s/health/version', { client: client }) return response.data } }