export type Watermark = {displayAngle?: string | undefined, enabled?: string | undefined, font?: string | undefined, fontColor?: string | undefined, fontSize?: string | undefined, id?: string | undefined, imageBase64?: string | undefined, transparency?: string | undefined, watermarkText?: string | undefined}; export type UpdateApiV21AccountsAccountIdWatermarkArgs = {accountId: string, body: Watermark}; export type UpdateApiV21AccountsAccountIdWatermarkOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Update watermark information. * * PUT /v2.1/accounts/{accountId}/watermark */ export const updateApiV21AccountsAccountIdWatermark = async (args: UpdateApiV21AccountsAccountIdWatermarkArgs, options?: UpdateApiV21AccountsAccountIdWatermarkOptions) => { const {baseUrl = "https://www.docusign.net/restapi", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/v2.1/accounts/${encodeURIComponent(String(args.accountId))}/watermark${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };