export type VagaroMerchantModelRequestPayrollHourlyPayRequest = {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, serviceProviderID?: number | undefined, fromDate?: string | undefined, toDate?: string | undefined, stateID?: number | undefined, columnName?: string | undefined, orderBy?: string | undefined, multiLocationBusinessIDs?: string | undefined, searchText?: string | undefined, isFromPayrollHistory?: boolean | undefined}; export type CreateApiGroupApiVVersionReportEmployeesPayrollHourlyPayArgs = {group: string, version: string, body: VagaroMerchantModelRequestPayrollHourlyPayRequest}; export type CreateApiGroupApiVVersionReportEmployeesPayrollHourlyPayOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * POST /{group}/api/v{version}/Report/employees/PayrollHourlyPay */ export const createApiGroupApiVVersionReportEmployeesPayrollHourlyPay = async (args: CreateApiGroupApiVVersionReportEmployeesPayrollHourlyPayArgs, options: CreateApiGroupApiVVersionReportEmployeesPayrollHourlyPayOptions) => { 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))}/Report/employees/PayrollHourlyPay${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 };