export type UpdateApiNftsTokensIdArgs = {'X-End-User-Wallet-Id'?: string | undefined, id: string, 'Idempotency-Key'?: string | undefined}; export type UpdateApiNftsTokensIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Refresh token metadata * * PUT /nfts/tokens/{id} */ export const updateApiNftsTokensId = async (args: UpdateApiNftsTokensIdArgs, options?: UpdateApiNftsTokensIdOptions) => { const {baseUrl = "https://api.fireblocks.io/v1", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['X-End-User-Wallet-Id'] != null) headers.set("X-End-User-Wallet-Id", String(args['X-End-User-Wallet-Id'])) if (args['Idempotency-Key'] != null) headers.set("Idempotency-Key", String(args['Idempotency-Key'])) const url = `${baseUrl.replace(/\/+$/, '')}/nfts/tokens/${encodeURIComponent(String(args.id))}${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 };