export type CreateApiV1OrgOrgIdSignatureRequestIdCancelArgs = {orgId: string, id: string}; export type CreateApiV1OrgOrgIdSignatureRequestIdCancelOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Cancel an existing signature request * * POST /v1/org/{orgId}/signature-request/{id}/cancel */ export const createApiV1OrgOrgIdSignatureRequestIdCancel = async (args: CreateApiV1OrgOrgIdSignatureRequestIdCancelArgs, options?: CreateApiV1OrgOrgIdSignatureRequestIdCancelOptions) => { const {baseUrl = "https://localhost", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/v1/org/${encodeURIComponent(String(args.orgId))}/signature-request/${encodeURIComponent(String(args.id))}/cancel${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };