export type UpdateApiV1CryptotokenCryptotokenNameDeactivateArgs = {cryptotoken_name: string}; export type UpdateApiV1CryptotokenCryptotokenNameDeactivateOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Deactivate a Crypto Token * * PUT /v1/cryptotoken/{cryptotoken_name}/deactivate */ export const updateApiV1CryptotokenCryptotokenNameDeactivate = async (args: UpdateApiV1CryptotokenCryptotokenNameDeactivateArgs, options: UpdateApiV1CryptotokenCryptotokenNameDeactivateOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/v1/cryptotoken/${encodeURIComponent(String(args.cryptotoken_name))}/deactivate${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };