export type GetApiSpacesSpaceIdentifierInterruptionsIdResponsibleArgs = {spaceIdentifier: string, id: string}; export type GetApiSpacesSpaceIdentifierInterruptionsIdResponsibleOptions = {baseUrl?: string | undefined, APIKeyHeader?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get the User that is currently responsible for this Interruption (if any). * * GET /spaces/{spaceIdentifier}/interruptions/{id}/responsible * * Also accepts auth: APIKeyQuery, NugetApiKeyHeader */ export const getApiSpacesSpaceIdentifierInterruptionsIdResponsible = async (args: GetApiSpacesSpaceIdentifierInterruptionsIdResponsibleArgs, options?: GetApiSpacesSpaceIdentifierInterruptionsIdResponsibleOptions) => { const {baseUrl = "https://demo.octopus.app/api", fetch: fetchFn = fetch, APIKeyHeader} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (APIKeyHeader !== undefined) headers.set("X-Octopus-ApiKey", APIKeyHeader) const url = `${baseUrl.replace(/\/+$/, '')}/spaces/${encodeURIComponent(String(args.spaceIdentifier))}/interruptions/${encodeURIComponent(String(args.id))}/responsible${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 };