export type CreateApiApiMultichainGatesPortalsPortalSlugResyncRolesArgs = {portalSlug: string}; export type CreateApiApiMultichainGatesPortalsPortalSlugResyncRolesOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Resync Roles for portal gates * * POST /api/multichain-gates/portals/{portalSlug}/resync-roles */ export const createApiApiMultichainGatesPortalsPortalSlugResyncRoles = async (args: CreateApiApiMultichainGatesPortalsPortalSlugResyncRolesArgs, options: CreateApiApiMultichainGatesPortalsPortalSlugResyncRolesOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/api/multichain-gates/portals/${encodeURIComponent(String(args.portalSlug))}/resync-roles${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };