export type LodgifyMessagingLegacyPublicApiModelsBatchBookingDto = {id?: number | undefined, type?: (string | null) | undefined}; export type CreateApiV1ReservationNotRepliedArgs = {body: Array}; export type CreateApiV1ReservationNotRepliedOptions = {baseUrl?: string | undefined, ApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Batch mark as not replied bookings and enquiries * * POST /v1/reservation/not_replied */ export const createApiV1ReservationNotReplied = async (args: CreateApiV1ReservationNotRepliedArgs, options?: CreateApiV1ReservationNotRepliedOptions) => { const {baseUrl = "https://api.lodgify.com", fetch: fetchFn = fetch, ApiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (ApiKey !== undefined) headers.set("X-ApiKey", ApiKey) const url = `${baseUrl.replace(/\/+$/, '')}/v1/reservation/not_replied${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 };