export type LodgifyMessagingLegacyPublicApiModelsBatchBookingDto = {id?: number | undefined, type?: (string | null) | undefined}; export type CreateApiV1ReservationRepliedArgs = {body: Array}; export type CreateApiV1ReservationRepliedOptions = {baseUrl?: string | undefined, ApiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Batch marks as replied bookings or enquiries * * POST /v1/reservation/replied */ export const createApiV1ReservationReplied = async (args: CreateApiV1ReservationRepliedArgs, options?: CreateApiV1ReservationRepliedOptions) => { 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/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 };