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