export type CreateApiV1TrustPortalCustomLinksReorderArgs = {body: {organizationId: string, linkIds: Array}}; export type CreateApiV1TrustPortalCustomLinksReorderOptions = {baseUrl?: string | undefined, apikey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Reorder custom links * * POST /v1/trust-portal/custom-links/reorder */ export const createApiV1TrustPortalCustomLinksReorder = async (args: CreateApiV1TrustPortalCustomLinksReorderArgs, options?: CreateApiV1TrustPortalCustomLinksReorderOptions) => { const {baseUrl = "https://api.trycomp.ai", fetch: fetchFn = fetch, apikey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (apikey !== undefined) headers.set("X-API-Key", apikey) const url = `${baseUrl.replace(/\/+$/, '')}/v1/trust-portal/custom-links/reorder${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };