export type GetApiReportsAiModelInsightsAiOverviewResultsArgs = {project_id: number, range?: number | undefined, from?: string | undefined, to?: string | undefined, granularity?: ('day' | 'week' | 'month') | undefined, collection_id?: string | undefined, country_code?: string | undefined, language_code?: string | undefined, prompt_type?: string | undefined, brand_kind?: ('brand' | 'brand_other' | 'non_brand') | undefined, page?: number | undefined, per_page?: number | undefined}; export type GetApiReportsAiModelInsightsAiOverviewResultsOptions = {baseUrl?: string | undefined, BearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Google AI Overview result availability * * GET /reports/ai_model_insights/ai_overview_results */ export const getApiReportsAiModelInsightsAiOverviewResults = async (args: GetApiReportsAiModelInsightsAiOverviewResultsArgs, options?: GetApiReportsAiModelInsightsAiOverviewResultsOptions) => { const {baseUrl = "https://api.llmpulse.ai/api/v1", fetch: fetchFn = fetch, BearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.project_id != null) query.append("project_id", String(args.project_id)) if (args.range != null) query.append("range", String(args.range)) if (args.from != null) query.append("from", String(args.from)) if (args.to != null) query.append("to", String(args.to)) if (args.granularity != null) query.append("granularity", String(args.granularity)) if (args.collection_id != null) query.append("collection_id", String(args.collection_id)) if (args.country_code != null) query.append("country_code", String(args.country_code)) if (args.language_code != null) query.append("language_code", String(args.language_code)) if (args.prompt_type != null) query.append("prompt_type", String(args.prompt_type)) if (args.brand_kind != null) query.append("brand_kind", String(args.brand_kind)) if (args.page != null) query.append("page", String(args.page)) if (args.per_page != null) query.append("per_page", String(args.per_page)) if (BearerAuth !== undefined) headers.set("Authorization", BearerAuth) const url = `${baseUrl.replace(/\/+$/, '')}/reports/ai_model_insights/ai_overview_results${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };