@gscdump/engine-gsc-api 0.9.1 → 0.10.0
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/index.d.mts +3 -14
- package/dist/index.mjs +3 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { GoogleSearchConsoleClient } from "gscdump";
|
|
2
2
|
import { BuilderState, Column, Dimension } from "gscdump/query";
|
|
3
|
-
import { AnalysisQuerySource
|
|
4
|
-
import { PlannerCapabilities } from "gscdump/query/plan";
|
|
3
|
+
import { AnalysisQuerySource } from "@gscdump/engine/source";
|
|
5
4
|
declare function canProxyToGsc(state: BuilderState): boolean;
|
|
6
5
|
interface CreateLiveGscSourceOptions {
|
|
7
6
|
/** GSC property URL (e.g. `sc-domain:example.com` or `https://example.com/`). */
|
|
@@ -13,8 +12,6 @@ interface CreateLiveGscSourceOptions {
|
|
|
13
12
|
getAccessToken: () => Promise<string>;
|
|
14
13
|
}
|
|
15
14
|
declare function createLiveGscSource(opts: CreateLiveGscSourceOptions): AnalysisQuerySource;
|
|
16
|
-
declare function applyBuilderStatePostProcessing(rows: Record<string, unknown>[], state: BuilderState): Record<string, unknown>[];
|
|
17
|
-
declare function collectRows<T>(gen: AsyncGenerator<T[]>): Promise<T[]>;
|
|
18
15
|
interface GscRange {
|
|
19
16
|
start: string;
|
|
20
17
|
end: string;
|
|
@@ -53,17 +50,9 @@ declare function fetchGscDaily(opts: {
|
|
|
53
50
|
siteUrl: string;
|
|
54
51
|
range: GscRange;
|
|
55
52
|
}): Promise<GscDailyRow[]>;
|
|
56
|
-
/**
|
|
57
|
-
* Capabilities the live GSC API can satisfy. Regex pushes down via the
|
|
58
|
-
* `INCLUDING_REGEX` / `EXCLUDING_REGEX` filter types; comparison joins and
|
|
59
|
-
* cross-dataset queries do not exist on the wire, and the API does not
|
|
60
|
-
* expose window aggregations. Metric filters and ordering are honored by
|
|
61
|
-
* the source-layer post-process pass after row collection.
|
|
62
|
-
*/
|
|
63
|
-
declare const GSC_API_CAPABILITIES: PlannerCapabilities;
|
|
64
53
|
interface GscApiQuerySourceOptions {
|
|
65
54
|
client: GoogleSearchConsoleClient;
|
|
66
55
|
siteUrl: string;
|
|
67
56
|
}
|
|
68
|
-
declare function createGscApiQuerySource(options: GscApiQuerySourceOptions):
|
|
69
|
-
export { type CreateLiveGscSourceOptions, type FetchTopNOptions,
|
|
57
|
+
declare function createGscApiQuerySource(options: GscApiQuerySourceOptions): AnalysisQuerySource;
|
|
58
|
+
export { type CreateLiveGscSourceOptions, type FetchTopNOptions, type GscApiQuerySourceOptions, type GscDailyRow, type GscRange, type GscTopNRow, canProxyToGsc, createGscApiQuerySource, createLiveGscSource, fetchGscDaily, fetchGscTopN };
|
package/dist/index.mjs
CHANGED
|
@@ -96,6 +96,7 @@ function createGscApiQuerySource(options) {
|
|
|
96
96
|
const { client, siteUrl } = options;
|
|
97
97
|
return {
|
|
98
98
|
name: "gsc-api",
|
|
99
|
+
kind: "live",
|
|
99
100
|
capabilities: GSC_API_CAPABILITIES,
|
|
100
101
|
async queryRows(state) {
|
|
101
102
|
buildLogicalPlan(state, GSC_API_CAPABILITIES);
|
|
@@ -120,6 +121,7 @@ function createLiveGscSource(opts) {
|
|
|
120
121
|
}
|
|
121
122
|
return {
|
|
122
123
|
name: "gsc-api",
|
|
124
|
+
kind: "live",
|
|
123
125
|
capabilities: {
|
|
124
126
|
regex: true,
|
|
125
127
|
multiDataset: false,
|
|
@@ -134,4 +136,4 @@ function createLiveGscSource(opts) {
|
|
|
134
136
|
}
|
|
135
137
|
};
|
|
136
138
|
}
|
|
137
|
-
export {
|
|
139
|
+
export { canProxyToGsc, createGscApiQuerySource, createLiveGscSource, fetchGscDaily, fetchGscTopN };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gscdump/engine-gsc-api",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.10.0",
|
|
5
5
|
"description": "GSC live-API engine adapter — wraps the Search Analytics REST API as an AnalysisQuerySource for typed analyzer dispatch.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"node": ">=18"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"gscdump": "0.
|
|
40
|
-
"
|
|
39
|
+
"@gscdump/engine": "0.10.0",
|
|
40
|
+
"gscdump": "0.10.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"vitest": "^4.1.5"
|