gscdump 0.11.5 → 0.12.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/contracts.d.mts +51 -2
- package/dist/index.d.mts +21 -1
- package/dist/query/index.d.mts +22 -1
- package/dist/query/plan.d.mts +1 -1
- package/package.json +2 -2
package/dist/contracts.d.mts
CHANGED
|
@@ -1,2 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
type TableName = 'pages' | 'keywords' | 'countries' | 'devices' | 'page_keywords' | 'search_appearance';
|
|
2
|
+
type Row = Record<string, unknown>;
|
|
3
|
+
type ColumnType = 'DATE' | 'VARCHAR' | 'INTEGER' | 'BIGINT' | 'DOUBLE';
|
|
4
|
+
interface ColumnDef {
|
|
5
|
+
name: string;
|
|
6
|
+
type: ColumnType;
|
|
7
|
+
nullable: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface TableSchema {
|
|
10
|
+
name: TableName;
|
|
11
|
+
columns: ColumnDef[];
|
|
12
|
+
sortKey: string[];
|
|
13
|
+
version: number;
|
|
14
|
+
}
|
|
15
|
+
interface TenantCtx {
|
|
16
|
+
userId: string;
|
|
17
|
+
siteId?: string;
|
|
18
|
+
}
|
|
19
|
+
type GscSearchAnalyticsDimension = 'page' | 'query' | 'country' | 'device' | 'date' | 'searchAppearance';
|
|
20
|
+
type GscSearchAnalyticsFilterOperator = 'equals' | 'notEquals' | 'contains' | 'notContains' | 'includingRegex' | 'excludingRegex';
|
|
21
|
+
interface GscSearchAnalyticsFilter {
|
|
22
|
+
dimension: GscSearchAnalyticsDimension;
|
|
23
|
+
expression: string;
|
|
24
|
+
operator?: GscSearchAnalyticsFilterOperator;
|
|
25
|
+
}
|
|
26
|
+
interface GscSearchAnalyticsFilterGroup {
|
|
27
|
+
groupType?: 'and' | 'or';
|
|
28
|
+
filters: GscSearchAnalyticsFilter[];
|
|
29
|
+
}
|
|
30
|
+
type GscSearchType = 'web' | 'image' | 'video' | 'news' | 'discover' | 'googleNews';
|
|
31
|
+
interface GscSearchAnalyticsRequest {
|
|
32
|
+
startDate: string;
|
|
33
|
+
endDate: string;
|
|
34
|
+
dimensions?: GscSearchAnalyticsDimension[];
|
|
35
|
+
dimensionFilterGroups?: GscSearchAnalyticsFilterGroup[];
|
|
36
|
+
rowLimit?: number;
|
|
37
|
+
startRow?: number;
|
|
38
|
+
searchType?: GscSearchType;
|
|
39
|
+
}
|
|
40
|
+
interface GscSearchAnalyticsRow {
|
|
41
|
+
keys: string[];
|
|
42
|
+
clicks: number;
|
|
43
|
+
impressions: number;
|
|
44
|
+
ctr: number;
|
|
45
|
+
position: number;
|
|
46
|
+
}
|
|
47
|
+
interface GscSearchAnalyticsResponse {
|
|
48
|
+
rows?: GscSearchAnalyticsRow[];
|
|
49
|
+
responseAggregationType?: string;
|
|
50
|
+
}
|
|
51
|
+
export { ColumnDef, ColumnType, GscSearchAnalyticsDimension, GscSearchAnalyticsFilter, GscSearchAnalyticsFilterGroup, GscSearchAnalyticsFilterOperator, GscSearchAnalyticsRequest, GscSearchAnalyticsResponse, GscSearchAnalyticsRow, GscSearchType, Row, TableName, TableSchema, TenantCtx };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { $Fetch, FetchOptions } from "ofetch";
|
|
2
2
|
import { indexing_v3 } from "@googleapis/indexing/build/v3";
|
|
3
|
-
import { GscSearchAnalyticsRequest } from "@gscdump/contracts";
|
|
4
3
|
import { searchconsole_v1 } from "@googleapis/searchconsole/build/v1";
|
|
5
4
|
/**
|
|
6
5
|
* Batch runner with optional concurrency, inter-call delay, and progress.
|
|
@@ -13,6 +12,27 @@ declare function runSequentialBatch<I, R>(items: I[], operation: (item: I, index
|
|
|
13
12
|
concurrency?: number;
|
|
14
13
|
onProgress?: (result: R, index: number, total: number) => void;
|
|
15
14
|
}): Promise<R[]>;
|
|
15
|
+
type GscSearchAnalyticsDimension = 'page' | 'query' | 'country' | 'device' | 'date' | 'searchAppearance';
|
|
16
|
+
type GscSearchAnalyticsFilterOperator = 'equals' | 'notEquals' | 'contains' | 'notContains' | 'includingRegex' | 'excludingRegex';
|
|
17
|
+
interface GscSearchAnalyticsFilter {
|
|
18
|
+
dimension: GscSearchAnalyticsDimension;
|
|
19
|
+
expression: string;
|
|
20
|
+
operator?: GscSearchAnalyticsFilterOperator;
|
|
21
|
+
}
|
|
22
|
+
interface GscSearchAnalyticsFilterGroup {
|
|
23
|
+
groupType?: 'and' | 'or';
|
|
24
|
+
filters: GscSearchAnalyticsFilter[];
|
|
25
|
+
}
|
|
26
|
+
type GscSearchType = 'web' | 'image' | 'video' | 'news' | 'discover' | 'googleNews';
|
|
27
|
+
interface GscSearchAnalyticsRequest {
|
|
28
|
+
startDate: string;
|
|
29
|
+
endDate: string;
|
|
30
|
+
dimensions?: GscSearchAnalyticsDimension[];
|
|
31
|
+
dimensionFilterGroups?: GscSearchAnalyticsFilterGroup[];
|
|
32
|
+
rowLimit?: number;
|
|
33
|
+
startRow?: number;
|
|
34
|
+
searchType?: GscSearchType;
|
|
35
|
+
}
|
|
16
36
|
declare const _default: {
|
|
17
37
|
name: string;
|
|
18
38
|
'alpha-2': string;
|
package/dist/query/index.d.mts
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
import _dayjs, { Dayjs } from "dayjs";
|
|
2
|
-
|
|
2
|
+
type TableName = 'pages' | 'keywords' | 'countries' | 'devices' | 'page_keywords' | 'search_appearance';
|
|
3
|
+
type GscSearchAnalyticsDimension = 'page' | 'query' | 'country' | 'device' | 'date' | 'searchAppearance';
|
|
4
|
+
type GscSearchAnalyticsFilterOperator = 'equals' | 'notEquals' | 'contains' | 'notContains' | 'includingRegex' | 'excludingRegex';
|
|
5
|
+
interface GscSearchAnalyticsFilter {
|
|
6
|
+
dimension: GscSearchAnalyticsDimension;
|
|
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
|
+
interface GscSearchAnalyticsRequest {
|
|
16
|
+
startDate: string;
|
|
17
|
+
endDate: string;
|
|
18
|
+
dimensions?: GscSearchAnalyticsDimension[];
|
|
19
|
+
dimensionFilterGroups?: GscSearchAnalyticsFilterGroup[];
|
|
20
|
+
rowLimit?: number;
|
|
21
|
+
startRow?: number;
|
|
22
|
+
searchType?: GscSearchType;
|
|
23
|
+
}
|
|
3
24
|
declare const _default: {
|
|
4
25
|
name: string;
|
|
5
26
|
'alpha-2': string;
|
package/dist/query/plan.d.mts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gscdump",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.12.0",
|
|
5
5
|
"description": "Google Search Console API wrapper with typed query builder, streaming pagination, and SEO analysis functions",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"defu": "^6.1.7",
|
|
109
109
|
"ofetch": "^1.5.1",
|
|
110
110
|
"ufo": "^1.6.4",
|
|
111
|
-
"@gscdump/contracts": "0.
|
|
111
|
+
"@gscdump/contracts": "0.12.0"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@googleapis/indexing": "^6.0.1",
|