export type GetApiApiMetadataEdgeArgs = {name?: string | undefined, fromDictionary?: string | undefined, toDictionary?: string | undefined, orderBy?: Array | undefined, limit?: number | undefined, skip?: number | undefined}; export type GetApiApiMetadataEdgeOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Allowed user roles:


query edges from the secure data zone * * GET /api/metadata/edge */ export const getApiApiMetadataEdge = async (args: GetApiApiMetadataEdgeArgs, options?: GetApiApiMetadataEdgeOptions) => { const {baseUrl = "https://api.burstiq.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") if (args.name != null) query.append("name", String(args.name)) if (args.fromDictionary != null) query.append("fromDictionary", String(args.fromDictionary)) if (args.toDictionary != null) query.append("toDictionary", String(args.toDictionary)) for (const item of args.orderBy ?? []) query.append("orderBy", String(item)) if (args.limit != null) query.append("limit", String(args.limit)) if (args.skip != null) query.append("skip", String(args.skip)) const url = `${baseUrl.replace(/\/+$/, '')}/api/metadata/edge${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() };