export type GetApiV1OrganizationsOrganizationIdSupportBovTimelineArgs = {printerId?: string | undefined, completedJobId?: number | undefined, watchId?: string | undefined, batchId?: string | undefined, batchItemId?: string | undefined, limit?: number | undefined, organizationId: string}; export type GetApiV1OrganizationsOrganizationIdSupportBovTimelineOptions = {baseUrl?: string | undefined, bearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Read the durable BOV and Bed-Clear Watch chronology * * GET /v1/organizations/{organizationId}/support/bov-timeline */ export const getApiV1OrganizationsOrganizationIdSupportBovTimeline = async (args: GetApiV1OrganizationsOrganizationIdSupportBovTimelineArgs, options?: GetApiV1OrganizationsOrganizationIdSupportBovTimelineOptions) => { const {baseUrl = "https://api.printhiv3d.com", fetch: fetchFn = fetch, bearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.printerId != null) query.append("printerId", String(args.printerId)) if (args.completedJobId != null) query.append("completedJobId", String(args.completedJobId)) if (args.watchId != null) query.append("watchId", String(args.watchId)) if (args.batchId != null) query.append("batchId", String(args.batchId)) if (args.batchItemId != null) query.append("batchItemId", String(args.batchItemId)) if (args.limit != null) query.append("limit", String(args.limit)) if (bearerAuth !== undefined) headers.set('authorization', `Bearer ${bearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/organizations/${encodeURIComponent(String(args.organizationId))}/support/bov-timeline${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };