export type GetApiApiMetadataWorkflowArgs = {access?: string | undefined, metadata?: boolean | undefined, tagKey?: string | undefined, tagValue?: string | undefined, name?: string | undefined, short?: boolean | undefined, classifier?: string | undefined}; export type GetApiApiMetadataWorkflowOptions = {baseUrl?: string | undefined, apiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Retrieves all workflow definition along with blueprint * * GET /api/metadata/workflow */ export const getApiApiMetadataWorkflow = async (args: GetApiApiMetadataWorkflowArgs, options?: GetApiApiMetadataWorkflowOptions) => { const {baseUrl = "https://developer.orkescloud.com", fetch: fetchFn = fetch, apiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") if (args.access != null) query.append("access", String(args.access)) if (args.metadata != null) query.append("metadata", String(args.metadata)) if (args.tagKey != null) query.append("tagKey", String(args.tagKey)) if (args.tagValue != null) query.append("tagValue", String(args.tagValue)) if (args.name != null) query.append("name", String(args.name)) if (args.short != null) query.append("short", String(args.short)) if (args.classifier != null) query.append("classifier", String(args.classifier)) if (apiKey !== undefined) headers.set("X-Authorization", apiKey) const url = `${baseUrl.replace(/\/+$/, '')}/api/metadata/workflow${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 res.blob() };