import { ColumnDef, ColumnType, Row, TableName, TableSchema, TenantCtx } from "@gscdump/contracts"; type GscSearchAnalyticsDimension = 'page' | 'query' | 'country' | 'device' | 'date' | 'hour' | 'searchAppearance'; type GscDataState = 'final' | 'all' | 'hourly_all'; interface GscSearchAnalyticsMetadata { /** First date (YYYY-MM-DD, PT) still being collected. Populated when dataState=`all` and grouped by `date`. */ first_incomplete_date?: string; /** First hour (YYYY-MM-DDThh:mm:ss±hh:mm, PT) still being collected. Populated when dataState=`hourly_all` and grouped by `hour`. */ first_incomplete_hour?: string; } type GscSearchAnalyticsFilterOperator = 'equals' | 'notEquals' | 'contains' | 'notContains' | 'includingRegex' | 'excludingRegex'; interface GscSearchAnalyticsFilter { dimension: GscSearchAnalyticsDimension; expression: string; operator?: GscSearchAnalyticsFilterOperator; } interface GscSearchAnalyticsFilterGroup { groupType?: 'and' | 'or'; filters: GscSearchAnalyticsFilter[]; } type GscSearchType = 'web' | 'image' | 'video' | 'news' | 'discover' | 'googleNews'; type GscAggregationType = 'auto' | 'byPage' | 'byProperty' | 'byNewsShowcasePanel'; type GscResponseAggregationType = 'auto' | 'byPage' | 'byProperty' | 'byNewsShowcasePanel'; interface GscSearchAnalyticsRequest { startDate: string; endDate: string; dimensions?: GscSearchAnalyticsDimension[]; dimensionFilterGroups?: GscSearchAnalyticsFilterGroup[]; rowLimit?: number; startRow?: number; /** GSC search corpus. Maps to wire field `type` (the API still accepts the deprecated `searchType` alias). */ type?: GscSearchType; dataState?: GscDataState; aggregationType?: GscAggregationType; } interface GscSearchAnalyticsRow { keys: string[]; clicks: number; impressions: number; ctr: number; position: number; } interface GscSearchAnalyticsResponse { rows?: GscSearchAnalyticsRow[]; responseAggregationType?: GscResponseAggregationType; metadata?: GscSearchAnalyticsMetadata; } export { type ColumnDef, type ColumnType, GscAggregationType, GscDataState, GscResponseAggregationType, GscSearchAnalyticsDimension, GscSearchAnalyticsFilter, GscSearchAnalyticsFilterGroup, GscSearchAnalyticsFilterOperator, GscSearchAnalyticsMetadata, GscSearchAnalyticsRequest, GscSearchAnalyticsResponse, GscSearchAnalyticsRow, GscSearchType, type Row, type TableName, type TableSchema, type TenantCtx };