export type VagaroMerchantModelGetServiceProviderInTodayRequest = {businessID?: number | undefined, loginUserID?: number | undefined, device?: string | undefined, version?: string | undefined, pageIndex?: number | undefined, pageSize?: number | undefined, deviceID?: string | undefined, osVersion?: string | undefined, groupId?: string | undefined, isGroupWiseCall?: boolean | undefined, isReadOnly?: boolean | undefined, clientId?: string | undefined, clientSecret?: string | undefined, vbi?: string | undefined, vui?: string | undefined, strLoginUserId?: string | undefined, strBusinessId?: string | undefined, enc_BusinessID?: string | undefined, enc_LoginUserID?: string | undefined, calendarIDs?: string | undefined, selectedDate?: string | undefined}; export type CreateApiGroupApiVVersionCalendarGetserviceproviderintodayArgs = {group: string, version: string, body: VagaroMerchantModelGetServiceProviderInTodayRequest}; export type CreateApiGroupApiVVersionCalendarGetserviceproviderintodayOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Gets the service provider in today. * * POST /{group}/api/v{version}/calendar/getserviceproviderintoday */ export const createApiGroupApiVVersionCalendarGetserviceproviderintoday = async (args: CreateApiGroupApiVVersionCalendarGetserviceproviderintodayArgs, options: CreateApiGroupApiVVersionCalendarGetserviceproviderintodayOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/${encodeURIComponent(String(args.group))}/api/v${encodeURIComponent(String(args.version))}/calendar/getserviceproviderintoday${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };