export type CreateApiGroupQuoteIntentsGroupQuoteIntentIdRejectArgs = {group_quote_intent_id: string}; export type CreateApiGroupQuoteIntentsGroupQuoteIntentIdRejectOptions = {baseUrl?: string | undefined, bearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Reject a group quote intent * * POST /group_quote_intents/{group_quote_intent_id}/reject */ export const createApiGroupQuoteIntentsGroupQuoteIntentIdReject = async (args: CreateApiGroupQuoteIntentsGroupQuoteIntentIdRejectArgs, options?: CreateApiGroupQuoteIntentsGroupQuoteIntentIdRejectOptions) => { const {baseUrl = "https://test.api.kota.io", fetch: fetchFn = fetch, bearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (bearerAuth !== undefined) headers.set('authorization', `Bearer ${bearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/group_quote_intents/${encodeURIComponent(String(args.group_quote_intent_id))}/reject${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 };