export type GetApiV1IngateManagementCurrentOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Current Gate Target - Returns all ingate targets related to the authorized list of 633s. **Prerequisites: Access to the “Ingate Planning” web tool is REQUIRED before using this endpoint. * * GET /v1/ingate-management/current */ export const getApiV1IngateManagementCurrent = async (options?: GetApiV1IngateManagementCurrentOptions) => { const {baseUrl = "https://api.bnsf.com:6443", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "application/json1") const url = `${baseUrl.replace(/\/+$/, '')}/v1/ingate-management/current${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() };