gscdump 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/builder.d.mts +24 -0
- package/dist/_chunks/contracts.d.mts +47 -0
- package/dist/_chunks/dayjs.d.mts +3 -0
- package/dist/_chunks/dayjs.mjs +30 -0
- package/dist/_chunks/gsc-dates.d.mts +64 -0
- package/dist/_chunks/gsc-dates.mjs +100 -0
- package/dist/_chunks/plan.d.mts +175 -0
- package/dist/_chunks/resolver.mjs +1930 -0
- package/dist/_chunks/result.d.mts +20 -0
- package/dist/_chunks/types.d.mts +112 -0
- package/dist/contracts.d.mts +1 -46
- package/dist/core/result.d.mts +1 -19
- package/dist/dates.d.mts +2 -62
- package/dist/dates.mjs +2 -117
- package/dist/index.d.mts +7 -240
- package/dist/index.mjs +5 -1930
- package/dist/query/index.d.mts +6 -323
- package/dist/query/index.mjs +3 -2138
- package/dist/query/plan.d.mts +2 -234
- package/dist/query/plan.mjs +2 -1809
- package/package.json +2 -2
package/dist/query/index.d.mts
CHANGED
|
@@ -1,161 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
expression: string;
|
|
8
|
-
operator?: GscSearchAnalyticsFilterOperator;
|
|
9
|
-
}
|
|
10
|
-
interface GscSearchAnalyticsFilterGroup {
|
|
11
|
-
groupType?: 'and' | 'or';
|
|
12
|
-
filters: GscSearchAnalyticsFilter[];
|
|
13
|
-
}
|
|
14
|
-
type GscSearchType = 'web' | 'image' | 'video' | 'news' | 'discover' | 'googleNews';
|
|
15
|
-
type GscAggregationType = 'auto' | 'byPage' | 'byProperty' | 'byNewsShowcasePanel';
|
|
16
|
-
interface GscSearchAnalyticsRequest {
|
|
17
|
-
startDate: string;
|
|
18
|
-
endDate: string;
|
|
19
|
-
dimensions?: GscSearchAnalyticsDimension[];
|
|
20
|
-
dimensionFilterGroups?: GscSearchAnalyticsFilterGroup[];
|
|
21
|
-
rowLimit?: number;
|
|
22
|
-
startRow?: number;
|
|
23
|
-
/** GSC search corpus. Maps to wire field `type` (the API still accepts the deprecated `searchType` alias). */
|
|
24
|
-
type?: GscSearchType;
|
|
25
|
-
dataState?: GscDataState;
|
|
26
|
-
aggregationType?: GscAggregationType;
|
|
27
|
-
}
|
|
28
|
-
declare const _default: {
|
|
29
|
-
name: string;
|
|
30
|
-
'alpha-2': string;
|
|
31
|
-
'alpha-3': string;
|
|
32
|
-
'country-code': string;
|
|
33
|
-
}[];
|
|
34
|
-
declare const Devices: {
|
|
35
|
-
readonly MOBILE: "MOBILE";
|
|
36
|
-
readonly DESKTOP: "DESKTOP";
|
|
37
|
-
readonly TABLET: "TABLET";
|
|
38
|
-
};
|
|
39
|
-
type Device = typeof Devices[keyof typeof Devices];
|
|
40
|
-
declare const SearchTypes: {
|
|
41
|
-
readonly WEB: "web";
|
|
42
|
-
readonly IMAGE: "image";
|
|
43
|
-
readonly VIDEO: "video";
|
|
44
|
-
readonly NEWS: "news";
|
|
45
|
-
readonly DISCOVER: "discover";
|
|
46
|
-
readonly GOOGLE_NEWS: "googleNews";
|
|
47
|
-
};
|
|
48
|
-
type SearchType = typeof SearchTypes[keyof typeof SearchTypes];
|
|
49
|
-
declare const Countries: { [K in (typeof _default)[number]["alpha-3"]]: Lowercase<K>; };
|
|
50
|
-
type Country = typeof Countries[keyof typeof Countries];
|
|
51
|
-
interface DimensionValueMap {
|
|
52
|
-
query: string;
|
|
53
|
-
queryCanonical: string;
|
|
54
|
-
page: string;
|
|
55
|
-
country: Country;
|
|
56
|
-
device: Device;
|
|
57
|
-
searchAppearance: string;
|
|
58
|
-
date: string;
|
|
59
|
-
/** Hour bucket — ISO-8601 with PT offset, e.g. `2025-07-14T13:00:00-07:00`. Use with `dataState: 'hourly_all'`. */
|
|
60
|
-
hour: string;
|
|
61
|
-
}
|
|
62
|
-
type Dimension = keyof DimensionValueMap;
|
|
63
|
-
interface QueryParamValueMap {
|
|
64
|
-
searchType: SearchType;
|
|
65
|
-
}
|
|
66
|
-
type QueryParamName = keyof QueryParamValueMap;
|
|
67
|
-
interface Column<D extends Dimension> {
|
|
68
|
-
readonly __columnBrand: 'gscdump.Column';
|
|
69
|
-
readonly dimension: D;
|
|
70
|
-
}
|
|
71
|
-
interface QueryParam<P extends QueryParamName> {
|
|
72
|
-
readonly __queryParamBrand: 'gscdump.QueryParam';
|
|
73
|
-
readonly param: P;
|
|
74
|
-
}
|
|
75
|
-
type FilterOperator = 'equals' | 'notEquals' | 'contains' | 'notContains' | 'includingRegex' | 'excludingRegex';
|
|
76
|
-
type DateOperator = 'gte' | 'gt' | 'lte' | 'lt' | 'between';
|
|
77
|
-
type MetricOperator = 'metricGte' | 'metricGt' | 'metricLte' | 'metricLt' | 'metricBetween';
|
|
78
|
-
type SpecialOperator = 'topLevel';
|
|
79
|
-
interface InternalFilter {
|
|
80
|
-
dimension: Dimension | QueryParamName | Metric;
|
|
81
|
-
operator: FilterOperator | DateOperator | MetricOperator | SpecialOperator;
|
|
82
|
-
expression: string;
|
|
83
|
-
expression2?: string;
|
|
84
|
-
}
|
|
85
|
-
interface Filter<C = object> {
|
|
86
|
-
readonly __filterBrand: 'gscdump.Filter';
|
|
87
|
-
readonly _constraints: C;
|
|
88
|
-
readonly _filters: InternalFilter[];
|
|
89
|
-
readonly _nestedGroups?: Filter<any>[];
|
|
90
|
-
readonly _groupType?: 'and' | 'or';
|
|
91
|
-
}
|
|
92
|
-
type MergeConstraints<F extends Filter<any>[]> = UnionToIntersection<F[number]['_constraints']>;
|
|
93
|
-
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
|
|
94
|
-
interface GSCResult<D extends Dimension[], C> {
|
|
95
|
-
rows: Array<GSCRow<D, C>>;
|
|
96
|
-
}
|
|
97
|
-
type GSCRow<D extends Dimension[], C> = { [K in D[number]]: K extends keyof C ? C[K] : DimensionValueMap[K]; } & {
|
|
98
|
-
clicks: number;
|
|
99
|
-
impressions: number;
|
|
100
|
-
ctr: number;
|
|
101
|
-
position: number;
|
|
102
|
-
};
|
|
103
|
-
type Metric = 'clicks' | 'impressions' | 'ctr' | 'position';
|
|
104
|
-
interface MetricColumn<M extends Metric> {
|
|
105
|
-
readonly __metricColumnBrand: 'gscdump.MetricColumn';
|
|
106
|
-
readonly metric: M;
|
|
107
|
-
}
|
|
108
|
-
interface BuilderState {
|
|
109
|
-
dimensions: Dimension[];
|
|
110
|
-
metrics?: Metric[];
|
|
111
|
-
filter?: Filter<any>;
|
|
112
|
-
prefilter?: Filter<any>;
|
|
113
|
-
orderBy?: {
|
|
114
|
-
column: Metric | 'date';
|
|
115
|
-
dir: 'asc' | 'desc';
|
|
116
|
-
};
|
|
117
|
-
rowLimit?: number;
|
|
118
|
-
startRow?: number;
|
|
119
|
-
/** GSC `dataState`. `'hourly_all'` is required when grouping by `hour`. */
|
|
120
|
-
dataState?: GscDataState;
|
|
121
|
-
/** GSC `aggregationType`. `'byNewsShowcasePanel'` requires `type=discover|googleNews` with NEWS_SHOWCASE searchAppearance. */
|
|
122
|
-
aggregationType?: GscAggregationType;
|
|
123
|
-
/** GSC search corpus. Wins over any `searchType` filter when both are set. */
|
|
124
|
-
searchType?: SearchType;
|
|
125
|
-
}
|
|
126
|
-
interface JsonInternalFilter {
|
|
127
|
-
dimension: string;
|
|
128
|
-
operator: string;
|
|
129
|
-
expression: string;
|
|
130
|
-
expression2?: string;
|
|
131
|
-
}
|
|
132
|
-
interface JsonFilter {
|
|
133
|
-
_filters: JsonInternalFilter[];
|
|
134
|
-
_nestedGroups?: JsonFilter[];
|
|
135
|
-
_groupType?: 'and' | 'or';
|
|
136
|
-
}
|
|
137
|
-
type FilterInput = Filter<any> | JsonFilter;
|
|
138
|
-
type SelectableColumn = Column<Dimension> | MetricColumn<Metric>;
|
|
139
|
-
type OrderableColumn = MetricColumn<Metric> | Column<'date'>;
|
|
140
|
-
type ExtractDimensions<T extends SelectableColumn[]> = { [K in keyof T]: T[K] extends Column<infer D> ? D : never; }[number] extends (infer U) ? Exclude<U, never>[] : never;
|
|
141
|
-
interface GSCQueryBuilder<D extends Dimension[] = [], C = object> {
|
|
142
|
-
select: {
|
|
143
|
-
<T extends Dimension[]>(...dims: T): GSCQueryBuilder<T, C>;
|
|
144
|
-
<T extends SelectableColumn[]>(...cols: T): GSCQueryBuilder<ExtractDimensions<T> & Dimension[], C>;
|
|
145
|
-
};
|
|
146
|
-
where: <F extends Filter<any>>(filter: F) => GSCQueryBuilder<D, C & F['_constraints']>;
|
|
147
|
-
prefilter: <F extends Filter<any>>(filter: F) => GSCQueryBuilder<D, C>;
|
|
148
|
-
orderBy: (col: OrderableColumn, dir: 'asc' | 'desc') => GSCQueryBuilder<D, C>;
|
|
149
|
-
limit: (n: number) => GSCQueryBuilder<D, C>;
|
|
150
|
-
offset: (n: number) => GSCQueryBuilder<D, C>;
|
|
151
|
-
dataState: (state: GscDataState) => GSCQueryBuilder<D, C>;
|
|
152
|
-
aggregationType: (type: GscAggregationType) => GSCQueryBuilder<D, C>;
|
|
153
|
-
/** GSC search corpus (`type` on the wire). Equivalent to filtering by `searchType`. */
|
|
154
|
-
type: (t: GscSearchType) => GSCQueryBuilder<D, C>;
|
|
155
|
-
toBody: () => GscSearchAnalyticsRequest;
|
|
156
|
-
getState: () => BuilderState;
|
|
157
|
-
}
|
|
158
|
-
declare const gsc: GSCQueryBuilder<[], object>;
|
|
1
|
+
import { GscSearchAnalyticsRequest } from "../_chunks/contracts.mjs";
|
|
2
|
+
import { Result } from "../_chunks/result.mjs";
|
|
3
|
+
import { currentPstDate } from "../_chunks/dayjs.mjs";
|
|
4
|
+
import { BuilderState, Column, Countries, Country, Device, Devices, Dimension, DimensionValueMap, Filter, FilterInput, GSCResult, GSCRow, InternalFilter, JsonFilter, JsonInternalFilter, MergeConstraints, Metric, MetricColumn, QueryParam, QueryParamName, QueryParamValueMap, SearchType, SearchTypes } from "../_chunks/types.mjs";
|
|
5
|
+
import { GSCQueryBuilder, gsc } from "../_chunks/builder.mjs";
|
|
6
|
+
import { ComparisonFilter, LogicalComparisonPlan, LogicalDataset, LogicalDimensionFilter, LogicalMetricFilter, LogicalQueryPlan, PlannerCapabilities, QueryError, QueryErrorKind, UnresolvableDatasetError, UnsupportedLogicalCapabilityError, buildLogicalComparisonPlan, buildLogicalComparisonPlanResult, buildLogicalPlan, buildLogicalPlanResult, isQueryError, queryErrorToException, queryErrors } from "../_chunks/plan.mjs";
|
|
159
7
|
declare const page: Column<"page">;
|
|
160
8
|
declare const query: Column<"query">;
|
|
161
9
|
declare const queryCanonical: Column<"queryCanonical">;
|
|
@@ -169,89 +17,6 @@ declare const impressions: MetricColumn<"impressions">;
|
|
|
169
17
|
declare const ctr: MetricColumn<"ctr">;
|
|
170
18
|
declare const position: MetricColumn<"position">;
|
|
171
19
|
declare const searchType: QueryParam<"searchType">;
|
|
172
|
-
type QueryErrorKind = 'missing-date-range' | 'invalid-row-limit' | 'invalid-start-row' | 'invalid-data-state' | 'invalid-aggregation-type' | 'invalid-builder-state' | 'invalid-filter' | 'unsupported-capability' | 'unresolvable-dataset';
|
|
173
|
-
type QueryError = {
|
|
174
|
-
kind: 'missing-date-range';
|
|
175
|
-
message: string;
|
|
176
|
-
} | {
|
|
177
|
-
kind: 'invalid-row-limit';
|
|
178
|
-
value: unknown;
|
|
179
|
-
message: string;
|
|
180
|
-
} | {
|
|
181
|
-
kind: 'invalid-start-row';
|
|
182
|
-
value: unknown;
|
|
183
|
-
message: string;
|
|
184
|
-
} | {
|
|
185
|
-
kind: 'invalid-data-state';
|
|
186
|
-
message: string;
|
|
187
|
-
} | {
|
|
188
|
-
kind: 'invalid-aggregation-type';
|
|
189
|
-
message: string;
|
|
190
|
-
} | {
|
|
191
|
-
kind: 'invalid-builder-state';
|
|
192
|
-
message: string;
|
|
193
|
-
cause?: unknown;
|
|
194
|
-
} | {
|
|
195
|
-
kind: 'invalid-filter';
|
|
196
|
-
message: string;
|
|
197
|
-
} | {
|
|
198
|
-
kind: 'unsupported-capability';
|
|
199
|
-
capability: string;
|
|
200
|
-
context: string;
|
|
201
|
-
message: string;
|
|
202
|
-
} | {
|
|
203
|
-
kind: 'unresolvable-dataset';
|
|
204
|
-
dimensions: readonly Dimension[];
|
|
205
|
-
filterDims: readonly Dimension[];
|
|
206
|
-
message: string;
|
|
207
|
-
};
|
|
208
|
-
declare const queryErrors: {
|
|
209
|
-
readonly missingDateRange: () => QueryError;
|
|
210
|
-
readonly invalidRowLimit: (value: unknown) => QueryError;
|
|
211
|
-
readonly invalidStartRow: (value: unknown) => QueryError;
|
|
212
|
-
readonly hourDimensionRequiresHourlyState: () => QueryError;
|
|
213
|
-
readonly hourlyStateRequiresHourDimension: () => QueryError;
|
|
214
|
-
readonly byPropertyUnsupportedSearchType: () => QueryError;
|
|
215
|
-
readonly byPropertyNotAllowedWithPage: () => QueryError;
|
|
216
|
-
readonly byNewsShowcaseRequiresSearchType: () => QueryError;
|
|
217
|
-
readonly byNewsShowcaseNotAllowedWithPage: () => QueryError;
|
|
218
|
-
readonly byNewsShowcaseRequiresShowcaseFilter: () => QueryError;
|
|
219
|
-
readonly invalidBuilderState: (cause?: unknown) => QueryError;
|
|
220
|
-
readonly malformedFilterLeaf: () => QueryError;
|
|
221
|
-
readonly unsupportedCapability: (capability: string, context: string) => QueryError;
|
|
222
|
-
readonly unresolvableDataset: (dimensions: readonly Dimension[], filterDims?: readonly Dimension[]) => QueryError;
|
|
223
|
-
};
|
|
224
|
-
declare function isQueryError(value: unknown): value is QueryError;
|
|
225
|
-
/**
|
|
226
|
-
* Thrown when a query needs a planner capability (regex pushdown, comparison
|
|
227
|
-
* joins, multi-dataset reads) the target engine lacks. Engines catch it to fall
|
|
228
|
-
* back to the live GSC API. Carries the typed `queryError` value so a caller can
|
|
229
|
-
* read the modelled failure instead of parsing the message.
|
|
230
|
-
*/
|
|
231
|
-
declare class UnsupportedLogicalCapabilityError extends Error {
|
|
232
|
-
readonly queryError: Extract<QueryError, {
|
|
233
|
-
kind: 'unsupported-capability';
|
|
234
|
-
}>;
|
|
235
|
-
constructor(capability: string, context: string);
|
|
236
|
-
}
|
|
237
|
-
/**
|
|
238
|
-
* Thrown when a query's grouped + filtered dimensions span more than one stored
|
|
239
|
-
* dataset. Replaces the resolver's raw "unknown column" error so hosts can map
|
|
240
|
-
* it to a 4xx instead of leaking an opaque 500. Carries the typed `queryError`.
|
|
241
|
-
*/
|
|
242
|
-
declare class UnresolvableDatasetError extends Error {
|
|
243
|
-
readonly queryError: Extract<QueryError, {
|
|
244
|
-
kind: 'unresolvable-dataset';
|
|
245
|
-
}>;
|
|
246
|
-
constructor(dimensions: readonly Dimension[], filterDims?: readonly Dimension[]);
|
|
247
|
-
}
|
|
248
|
-
/**
|
|
249
|
-
* Re-raises a `QueryError` value as an `Error`, preserving the historical class
|
|
250
|
-
* identity for the two errors engines match on by name (`UnresolvableDatasetError`,
|
|
251
|
-
* `UnsupportedLogicalCapabilityError`). Pairs with `unwrapResult` so a
|
|
252
|
-
* `fooResult(): Result<A, QueryError>` core can back a throwing `foo()`.
|
|
253
|
-
*/
|
|
254
|
-
declare function queryErrorToException(error: QueryError): Error;
|
|
255
20
|
declare function eq<D extends Dimension, V extends DimensionValueMap[D]>(column: Column<D>, value: V): Filter<Record<D, V>>;
|
|
256
21
|
declare function eq<P extends QueryParamName, V extends QueryParamValueMap[P]>(param: QueryParam<P>, value: V): Filter<Record<P, V>>;
|
|
257
22
|
declare function ne<D extends Dimension>(column: Column<D>, value: DimensionValueMap[D]): Filter<object>;
|
|
@@ -274,87 +39,6 @@ declare function lt(column: Column<'date'>, value: string): Filter<object>;
|
|
|
274
39
|
declare function between<M extends Metric>(column: MetricColumn<M>, start: number, end: number): Filter<object>;
|
|
275
40
|
declare function between(column: Column<'date'>, start: string, end: string): Filter<object>;
|
|
276
41
|
declare function topLevel(column: Column<'page'>): Filter<object>;
|
|
277
|
-
interface Ok<A> {
|
|
278
|
-
readonly ok: true;
|
|
279
|
-
readonly value: A;
|
|
280
|
-
}
|
|
281
|
-
interface Err<E> {
|
|
282
|
-
readonly ok: false;
|
|
283
|
-
readonly error: E;
|
|
284
|
-
}
|
|
285
|
-
type Result<A, E> = Ok<A> | Err<E>;
|
|
286
|
-
type LogicalDataset = TableName;
|
|
287
|
-
type ComparisonFilter = 'new' | 'lost' | 'improving' | 'declining';
|
|
288
|
-
interface PlannerCapabilities {
|
|
289
|
-
regex?: boolean;
|
|
290
|
-
multiDataset?: boolean;
|
|
291
|
-
comparisonJoin?: boolean;
|
|
292
|
-
windowTotals?: boolean;
|
|
293
|
-
}
|
|
294
|
-
interface LogicalDimensionFilter {
|
|
295
|
-
dimension: Dimension;
|
|
296
|
-
operator: FilterOperator;
|
|
297
|
-
expression: string;
|
|
298
|
-
expression2?: string;
|
|
299
|
-
}
|
|
300
|
-
interface LogicalMetricFilter {
|
|
301
|
-
metric: Metric;
|
|
302
|
-
operator: MetricOperator;
|
|
303
|
-
expression: number;
|
|
304
|
-
expression2?: number;
|
|
305
|
-
}
|
|
306
|
-
interface LogicalFilterLeaf {
|
|
307
|
-
kind: 'leaf';
|
|
308
|
-
filter: LogicalDimensionFilter;
|
|
309
|
-
}
|
|
310
|
-
interface LogicalFilterGroup {
|
|
311
|
-
kind: 'group';
|
|
312
|
-
groupType: 'and' | 'or';
|
|
313
|
-
children: LogicalFilterNode[];
|
|
314
|
-
}
|
|
315
|
-
type LogicalFilterNode = LogicalFilterLeaf | LogicalFilterGroup;
|
|
316
|
-
interface LogicalQueryPlan {
|
|
317
|
-
dataset: LogicalDataset;
|
|
318
|
-
dimensions: Dimension[];
|
|
319
|
-
groupByDimensions: Dimension[];
|
|
320
|
-
hasDate: boolean;
|
|
321
|
-
metrics: Metric[];
|
|
322
|
-
dateRange: {
|
|
323
|
-
startDate: string;
|
|
324
|
-
endDate: string;
|
|
325
|
-
};
|
|
326
|
-
dimensionFilters: LogicalDimensionFilter[];
|
|
327
|
-
dimensionFilterTree?: LogicalFilterNode;
|
|
328
|
-
metricFilters: LogicalMetricFilter[];
|
|
329
|
-
prefilters: LogicalMetricFilter[];
|
|
330
|
-
specialFilters: {
|
|
331
|
-
topLevel: boolean;
|
|
332
|
-
};
|
|
333
|
-
queryParams: Partial<Record<QueryParamName, string>>;
|
|
334
|
-
orderBy?: BuilderState['orderBy'];
|
|
335
|
-
rowLimit?: number;
|
|
336
|
-
startRow?: number;
|
|
337
|
-
}
|
|
338
|
-
interface LogicalComparisonPlan {
|
|
339
|
-
current: LogicalQueryPlan;
|
|
340
|
-
previous: LogicalQueryPlan;
|
|
341
|
-
comparisonFilter?: ComparisonFilter;
|
|
342
|
-
}
|
|
343
|
-
/**
|
|
344
|
-
* Errors-as-values core: builds the logical plan or returns a typed `QueryError`
|
|
345
|
-
* for every modelled failure (missing date range, a regex filter on an engine
|
|
346
|
-
* without regex pushdown, a cross-dimension query with no stored home).
|
|
347
|
-
* `buildLogicalPlan` is the throwing wrapper for call sites that prefer exceptions.
|
|
348
|
-
*/
|
|
349
|
-
declare function buildLogicalPlanResult(state: BuilderState, capabilities?: PlannerCapabilities): Result<LogicalQueryPlan, QueryError>;
|
|
350
|
-
declare function buildLogicalPlan(state: BuilderState, capabilities?: PlannerCapabilities): LogicalQueryPlan;
|
|
351
|
-
/**
|
|
352
|
-
* Errors-as-values core for the comparison plan: returns a typed `QueryError`
|
|
353
|
-
* when the engine lacks the comparison-join or multi-dataset capability the
|
|
354
|
-
* paired queries need, or when either side fails to plan.
|
|
355
|
-
*/
|
|
356
|
-
declare function buildLogicalComparisonPlanResult(current: BuilderState, previous: BuilderState, capabilities?: PlannerCapabilities, comparisonFilter?: ComparisonFilter): Result<LogicalComparisonPlan, QueryError>;
|
|
357
|
-
declare function buildLogicalComparisonPlan(current: BuilderState, previous: BuilderState, capabilities?: PlannerCapabilities, comparisonFilter?: ComparisonFilter): LogicalComparisonPlan;
|
|
358
42
|
declare function normalizeFilter(input?: FilterInput): Filter<any> | undefined;
|
|
359
43
|
/**
|
|
360
44
|
* Errors-as-values core for {@link normalizeBuilderState}: returns an
|
|
@@ -389,7 +73,6 @@ declare function extractSearchType(state: BuilderState | undefined | null): Sear
|
|
|
389
73
|
*/
|
|
390
74
|
declare function resolveToBodyResult(state: BuilderState): Result<GscSearchAnalyticsRequest, QueryError>;
|
|
391
75
|
declare function resolveToBody(state: BuilderState): GscSearchAnalyticsRequest;
|
|
392
|
-
declare function currentPstDate(): string;
|
|
393
76
|
declare function today(): string;
|
|
394
77
|
declare function daysAgo(n: number): string;
|
|
395
78
|
export { type BuilderState, type Column, type ComparisonFilter, Countries, type Country, type Device, Devices, type Dimension, type DimensionValueMap, type Filter, type FilterInput, type GSCQueryBuilder, type GSCResult, type GSCRow, type InternalFilter, type JsonFilter, type JsonInternalFilter, type LogicalComparisonPlan, type LogicalDataset, type LogicalDimensionFilter, type LogicalMetricFilter, type LogicalQueryPlan, type Metric, type MetricColumn, type PlannerCapabilities, QueryError, QueryErrorKind, type QueryParam, type QueryParamName, type QueryParamValueMap, type SearchType, SearchTypes, UnresolvableDatasetError, UnsupportedLogicalCapabilityError, and, between, buildLogicalComparisonPlan, buildLogicalComparisonPlanResult, buildLogicalPlan, buildLogicalPlanResult, clicks, contains, country, ctr, currentPstDate, date, daysAgo, device, eq, extractDateRange, extractMetricFilters, extractSearchType, extractSpecialOperatorFilters, gsc, gt, gte, hour, impressions, inArray, isQueryError, like, lt, lte, ne, normalizeBuilderState, normalizeBuilderStateResult, normalizeFilter, not, notRegex, or, page, position, query, queryCanonical, queryErrorToException, queryErrors, regex, resolveToBody, resolveToBodyResult, searchAppearance, searchType, today, topLevel };
|