export type DeleteApiWalletWalletIdLinkBankPointsrewardPointsRewardBankIdArgs = {walletId: unknown, pointsRewardBankId: unknown}; export type DeleteApiWalletWalletIdLinkBankPointsrewardPointsRewardBankIdOptions = {baseUrl?: string | undefined, eesAuthenticationClientId?: string | undefined, eesAuthenticationHash?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Reward Bank Link * * DELETE /wallet/{walletId}/link/bank/pointsreward/{pointsRewardBankId} */ export const deleteApiWalletWalletIdLinkBankPointsrewardPointsRewardBankId = async (args: DeleteApiWalletWalletIdLinkBankPointsrewardPointsRewardBankIdArgs, options?: DeleteApiWalletWalletIdLinkBankPointsrewardPointsRewardBankIdOptions) => { const {baseUrl = "https://wallet.uk.eagleeye.com/2.0", fetch: fetchFn = fetch, eesAuthenticationClientId, eesAuthenticationHash} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (eesAuthenticationClientId !== undefined) headers.set("X-EES-AUTH-CLIENT-ID", eesAuthenticationClientId) if (eesAuthenticationHash !== undefined) headers.set("X-EES-AUTH-HASH", eesAuthenticationHash) const url = `${baseUrl.replace(/\/+$/, '')}/wallet/${encodeURIComponent(String(args.walletId))}/link/bank/pointsreward/${encodeURIComponent(String(args.pointsRewardBankId))}${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 };