export type DeleteApiV3ModelsUidArchivesExtraLatestOptions = {baseUrl?: string | undefined, Token?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a model's extra archive, only for orgs and users with a paid plan. * * DELETE /v3/models/{uid}/archives/extra/latest */ export const deleteApiV3ModelsUidArchivesExtraLatest = async (options?: DeleteApiV3ModelsUidArchivesExtraLatestOptions) => { const {baseUrl = "https://api.sketchfab.com", fetch: fetchFn = fetch, Token} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (Token !== undefined) headers.set("Authorization", Token) const url = `${baseUrl.replace(/\/+$/, '')}/v3/models/${encodeURIComponent(String(args.uid))}/archives/extra/latest${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };