export type DeleteApiInflightTestModelsInflightTestModelIdBreakpointDefinitionsActivityIdArgs = {inflightTestModelId: string, activityId: string, scopeDefinitionId: string, scopeType: string, actionId: string}; export type DeleteApiInflightTestModelsInflightTestModelIdBreakpointDefinitionsActivityIdOptions = {baseUrl?: string | undefined, basicAuth?: {username: string, password: string} | undefined, fetch?: typeof fetch | undefined}; /** * Delete a breakpoint definition * * DELETE /inflight-test-models/{inflightTestModelId}/breakpoint-definitions/{activityId} */ export const deleteApiInflightTestModelsInflightTestModelIdBreakpointDefinitionsActivityId = async (args: DeleteApiInflightTestModelsInflightTestModelIdBreakpointDefinitionsActivityIdArgs, options?: DeleteApiInflightTestModelsInflightTestModelIdBreakpointDefinitionsActivityIdOptions) => { const {baseUrl = "http://localhost:8090/inspect-api", fetch: fetchFn = fetch, basicAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.scopeDefinitionId != null) query.append("scopeDefinitionId", String(args.scopeDefinitionId)) if (args.scopeType != null) query.append("scopeType", String(args.scopeType)) if (args.actionId != null) query.append("actionId", String(args.actionId)) if (basicAuth !== undefined) headers.set('authorization', `Basic ${btoa(`${basicAuth.username}:${basicAuth.password}`)}`) const url = `${baseUrl.replace(/\/+$/, '')}/inflight-test-models/${encodeURIComponent(String(args.inflightTestModelId))}/breakpoint-definitions/${encodeURIComponent(String(args.activityId))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };