export type GetApiApiGraphchainEdgeFromDictFromSdoIdLabelToDictToSdoIdArgs = {fromDict: string, fromSdoId: string, label: string, toDict: string, toSdoId: string};
export type GetApiApiGraphchainEdgeFromDictFromSdoIdLabelToDictToSdoIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined};
/**
* Allowed user roles:
gets an edge between 2 SDOs; must be owner or limited owner
*
* GET /api/graphchain/edge/{fromDict}/{fromSdoId}/{label}/{toDict}/{toSdoId}
*/
export const getApiApiGraphchainEdgeFromDictFromSdoIdLabelToDictToSdoId = async (args: GetApiApiGraphchainEdgeFromDictFromSdoIdLabelToDictToSdoIdArgs, options?: GetApiApiGraphchainEdgeFromDictFromSdoIdLabelToDictToSdoIdOptions) => {
const {baseUrl = "https://api.burstiq.com", fetch: fetchFn = fetch} = options ?? {}
const query = new URLSearchParams()
const headers = new Headers()
headers.set('accept', "*/*")
const url = `${baseUrl.replace(/\/+$/, '')}/api/graphchain/edge/${encodeURIComponent(String(args.fromDict))}/${encodeURIComponent(String(args.fromSdoId))}/${encodeURIComponent(String(args.label))}/${encodeURIComponent(String(args.toDict))}/${encodeURIComponent(String(args.toSdoId))}${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()
};