export type SendReminderEmailOptions = {approvalRequestId: string}; export type CreateApiV1OrgOrgIdCompReviewCompReviewIdSendReminderEmailArgs = {orgId: string, compReviewId: string, body: SendReminderEmailOptions}; export type CreateApiV1OrgOrgIdCompReviewCompReviewIdSendReminderEmailOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Send a reminder email to someone participating in a comp review * * POST /v1/org/{orgId}/comp-review/{compReviewId}/send-reminder-email */ export const createApiV1OrgOrgIdCompReviewCompReviewIdSendReminderEmail = async (args: CreateApiV1OrgOrgIdCompReviewCompReviewIdSendReminderEmailArgs, options?: CreateApiV1OrgOrgIdCompReviewCompReviewIdSendReminderEmailOptions) => { const {baseUrl = "https://localhost", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/v1/org/${encodeURIComponent(String(args.orgId))}/comp-review/${encodeURIComponent(String(args.compReviewId))}/send-reminder-email${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", 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 undefined };