export type SimplePublicObjectId = {id: string}; export type BatchInputSimplePublicObjectId = {inputs: Array}; export type CreateApiCrmV3ObjectsQuotesBatchArchiveArgs = {body: BatchInputSimplePublicObjectId}; export type CreateApiCrmV3ObjectsQuotesBatchArchiveOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Archive a batch of quotes by ID * * POST /crm/v3/objects/quotes/batch/archive */ export const createApiCrmV3ObjectsQuotesBatchArchive = async (args: CreateApiCrmV3ObjectsQuotesBatchArchiveArgs, options?: CreateApiCrmV3ObjectsQuotesBatchArchiveOptions) => { const {baseUrl = "https://api.hubapi.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/crm/v3/objects/quotes/batch/archive${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 };