export type GetApiRuntimeScenariosDescriptionByProjectProjectIdArgs = {projectId: string}; export type GetApiRuntimeScenariosDescriptionByProjectProjectIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Lists scenarios without profiles or backendListeners by project ID * * GET /runtime/scenarios/description/by-project/{projectId} */ export const getApiRuntimeScenariosDescriptionByProjectProjectId = async (args: GetApiRuntimeScenariosDescriptionByProjectProjectIdArgs, options?: GetApiRuntimeScenariosDescriptionByProjectProjectIdOptions) => { const {baseUrl = "https://api.octoperf.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/runtime/scenarios/description/by-project/${encodeURIComponent(String(args.projectId))}${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() };