export type GetApiMfV1ServiceStopNamespaceNameIdArgs = {id: number, namespace: unknown, name: unknown}; export type GetApiMfV1ServiceStopNamespaceNameIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get the list of Services in the given Namespace * * GET /mf/v1/serviceStop/{namespace}/{name}/{id} */ export const getApiMfV1ServiceStopNamespaceNameId = async (args: GetApiMfV1ServiceStopNamespaceNameIdArgs, options?: GetApiMfV1ServiceStopNamespaceNameIdOptions) => { const {baseUrl = "http://gateway.mlss.mf", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/mf/v1/serviceStop/${encodeURIComponent(String(args.namespace))}/${encodeURIComponent(String(args.name))}/${encodeURIComponent(String(args.id))}${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 };