gscdump 0.37.6 → 0.38.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/api/index.d.mts +15 -9
- package/dist/index.d.mts +15 -9
- package/dist/query/index.d.mts +3 -3
- package/dist/query/plan.d.mts +1 -1
- package/package.json +2 -2
package/dist/api/index.d.mts
CHANGED
|
@@ -55,7 +55,7 @@ declare const SearchTypes: {
|
|
|
55
55
|
readonly GOOGLE_NEWS: "googleNews";
|
|
56
56
|
};
|
|
57
57
|
type SearchType = typeof SearchTypes[keyof typeof SearchTypes];
|
|
58
|
-
declare const Countries: { [K in (typeof _default)[number]["alpha-3"]]: Lowercase<K
|
|
58
|
+
declare const Countries: { [K in (typeof _default)[number]["alpha-3"]]: Lowercase<K>; };
|
|
59
59
|
type Country = typeof Countries[keyof typeof Countries];
|
|
60
60
|
interface DimensionValueMap {
|
|
61
61
|
query: string;
|
|
@@ -94,7 +94,7 @@ interface Filter<C = object> {
|
|
|
94
94
|
readonly _nestedGroups?: Filter<any>[];
|
|
95
95
|
readonly _groupType?: 'and' | 'or';
|
|
96
96
|
}
|
|
97
|
-
type GSCRow<D extends Dimension[], C> = { [K in D[number]]: K extends keyof C ? C[K] : DimensionValueMap[K] } & {
|
|
97
|
+
type GSCRow<D extends Dimension[], C> = { [K in D[number]]: K extends keyof C ? C[K] : DimensionValueMap[K]; } & {
|
|
98
98
|
clicks: number;
|
|
99
99
|
impressions: number;
|
|
100
100
|
ctr: number;
|
|
@@ -125,7 +125,7 @@ interface BuilderState {
|
|
|
125
125
|
}
|
|
126
126
|
type SelectableColumn = Column<Dimension> | MetricColumn<Metric>;
|
|
127
127
|
type OrderableColumn = MetricColumn<Metric> | Column<'date'>;
|
|
128
|
-
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;
|
|
128
|
+
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;
|
|
129
129
|
interface GSCQueryBuilder<D extends Dimension[] = [], C = object> {
|
|
130
130
|
select: {
|
|
131
131
|
<T extends Dimension[]>(...dims: T): GSCQueryBuilder<T, C>;
|
|
@@ -267,17 +267,22 @@ interface GoogleSearchConsoleClient {
|
|
|
267
267
|
* `client.sites.list()`.
|
|
268
268
|
*/
|
|
269
269
|
sites: ((opts?: CallOptions) => Promise<ApiSite[]>) & {
|
|
270
|
-
list: (opts?: CallOptions) => Promise<ApiSite[]>;
|
|
271
|
-
|
|
272
|
-
|
|
270
|
+
list: (opts?: CallOptions) => Promise<ApiSite[]>;
|
|
271
|
+
/** Retrieve a single property (with permission level). 404 if not in the user's account. */
|
|
272
|
+
get: (siteUrl: string, opts?: CallOptions) => Promise<ApiSite>;
|
|
273
|
+
/** Add a property in unverified state. Caller must verify ownership separately. */
|
|
274
|
+
add: (siteUrl: string, opts?: CallOptions) => Promise<void>;
|
|
275
|
+
/** Remove a property from the user's account. */
|
|
273
276
|
delete: (siteUrl: string, opts?: CallOptions) => Promise<void>;
|
|
274
277
|
};
|
|
275
278
|
/** Site Verification API (siteverification.googleapis.com). Required to flip a property from unverified to verified. */
|
|
276
279
|
verification: {
|
|
277
|
-
/** Returns the token to place on the site/DNS, plus the resolved method. */
|
|
280
|
+
/** Returns the token to place on the site/DNS, plus the resolved method. */
|
|
281
|
+
getToken: (params: {
|
|
278
282
|
site: VerificationSite;
|
|
279
283
|
verificationMethod: VerificationMethod;
|
|
280
|
-
}, opts?: CallOptions) => Promise<VerificationToken>;
|
|
284
|
+
}, opts?: CallOptions) => Promise<VerificationToken>;
|
|
285
|
+
/** Triggers Google to fetch + validate; returns the verified WebResource. */
|
|
281
286
|
insert: (params: {
|
|
282
287
|
site: VerificationSite;
|
|
283
288
|
verificationMethod: VerificationMethod;
|
|
@@ -292,7 +297,8 @@ interface GoogleSearchConsoleClient {
|
|
|
292
297
|
}) => Promise<InspectUrlIndexResponse>;
|
|
293
298
|
/** Sitemap operations */
|
|
294
299
|
sitemaps: {
|
|
295
|
-
/** List sitemaps. Pass `sitemapIndex` to list children of a sitemap-index file. */
|
|
300
|
+
/** List sitemaps. Pass `sitemapIndex` to list children of a sitemap-index file. */
|
|
301
|
+
list: (siteUrl: string, opts?: CallOptions & {
|
|
296
302
|
sitemapIndex?: string;
|
|
297
303
|
}) => Promise<ApiSitemap[]>;
|
|
298
304
|
get: (siteUrl: string, feedpath: string, opts?: CallOptions) => Promise<ApiSitemap>;
|
package/dist/index.d.mts
CHANGED
|
@@ -67,7 +67,7 @@ declare const SearchTypes: {
|
|
|
67
67
|
readonly GOOGLE_NEWS: "googleNews";
|
|
68
68
|
};
|
|
69
69
|
type SearchType = typeof SearchTypes[keyof typeof SearchTypes];
|
|
70
|
-
declare const Countries: { [K in (typeof _default)[number]["alpha-3"]]: Lowercase<K
|
|
70
|
+
declare const Countries: { [K in (typeof _default)[number]["alpha-3"]]: Lowercase<K>; };
|
|
71
71
|
type Country = typeof Countries[keyof typeof Countries];
|
|
72
72
|
interface DimensionValueMap {
|
|
73
73
|
query: string;
|
|
@@ -106,7 +106,7 @@ interface Filter<C = object> {
|
|
|
106
106
|
readonly _nestedGroups?: Filter<any>[];
|
|
107
107
|
readonly _groupType?: 'and' | 'or';
|
|
108
108
|
}
|
|
109
|
-
type GSCRow<D extends Dimension[], C> = { [K in D[number]]: K extends keyof C ? C[K] : DimensionValueMap[K] } & {
|
|
109
|
+
type GSCRow<D extends Dimension[], C> = { [K in D[number]]: K extends keyof C ? C[K] : DimensionValueMap[K]; } & {
|
|
110
110
|
clicks: number;
|
|
111
111
|
impressions: number;
|
|
112
112
|
ctr: number;
|
|
@@ -137,7 +137,7 @@ interface BuilderState {
|
|
|
137
137
|
}
|
|
138
138
|
type SelectableColumn = Column<Dimension> | MetricColumn<Metric>;
|
|
139
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;
|
|
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
141
|
interface GSCQueryBuilder<D extends Dimension[] = [], C = object> {
|
|
142
142
|
select: {
|
|
143
143
|
<T extends Dimension[]>(...dims: T): GSCQueryBuilder<T, C>;
|
|
@@ -279,17 +279,22 @@ interface GoogleSearchConsoleClient {
|
|
|
279
279
|
* `client.sites.list()`.
|
|
280
280
|
*/
|
|
281
281
|
sites: ((opts?: CallOptions) => Promise<ApiSite[]>) & {
|
|
282
|
-
list: (opts?: CallOptions) => Promise<ApiSite[]>;
|
|
283
|
-
|
|
284
|
-
|
|
282
|
+
list: (opts?: CallOptions) => Promise<ApiSite[]>;
|
|
283
|
+
/** Retrieve a single property (with permission level). 404 if not in the user's account. */
|
|
284
|
+
get: (siteUrl: string, opts?: CallOptions) => Promise<ApiSite>;
|
|
285
|
+
/** Add a property in unverified state. Caller must verify ownership separately. */
|
|
286
|
+
add: (siteUrl: string, opts?: CallOptions) => Promise<void>;
|
|
287
|
+
/** Remove a property from the user's account. */
|
|
285
288
|
delete: (siteUrl: string, opts?: CallOptions) => Promise<void>;
|
|
286
289
|
};
|
|
287
290
|
/** Site Verification API (siteverification.googleapis.com). Required to flip a property from unverified to verified. */
|
|
288
291
|
verification: {
|
|
289
|
-
/** Returns the token to place on the site/DNS, plus the resolved method. */
|
|
292
|
+
/** Returns the token to place on the site/DNS, plus the resolved method. */
|
|
293
|
+
getToken: (params: {
|
|
290
294
|
site: VerificationSite;
|
|
291
295
|
verificationMethod: VerificationMethod;
|
|
292
|
-
}, opts?: CallOptions) => Promise<VerificationToken>;
|
|
296
|
+
}, opts?: CallOptions) => Promise<VerificationToken>;
|
|
297
|
+
/** Triggers Google to fetch + validate; returns the verified WebResource. */
|
|
293
298
|
insert: (params: {
|
|
294
299
|
site: VerificationSite;
|
|
295
300
|
verificationMethod: VerificationMethod;
|
|
@@ -304,7 +309,8 @@ interface GoogleSearchConsoleClient {
|
|
|
304
309
|
}) => Promise<InspectUrlIndexResponse>;
|
|
305
310
|
/** Sitemap operations */
|
|
306
311
|
sitemaps: {
|
|
307
|
-
/** List sitemaps. Pass `sitemapIndex` to list children of a sitemap-index file. */
|
|
312
|
+
/** List sitemaps. Pass `sitemapIndex` to list children of a sitemap-index file. */
|
|
313
|
+
list: (siteUrl: string, opts?: CallOptions & {
|
|
308
314
|
sitemapIndex?: string;
|
|
309
315
|
}) => Promise<ApiSitemap[]>;
|
|
310
316
|
get: (siteUrl: string, feedpath: string, opts?: CallOptions) => Promise<ApiSitemap>;
|
package/dist/query/index.d.mts
CHANGED
|
@@ -46,7 +46,7 @@ declare const SearchTypes: {
|
|
|
46
46
|
readonly GOOGLE_NEWS: "googleNews";
|
|
47
47
|
};
|
|
48
48
|
type SearchType = typeof SearchTypes[keyof typeof SearchTypes];
|
|
49
|
-
declare const Countries: { [K in (typeof _default)[number]["alpha-3"]]: Lowercase<K
|
|
49
|
+
declare const Countries: { [K in (typeof _default)[number]["alpha-3"]]: Lowercase<K>; };
|
|
50
50
|
type Country = typeof Countries[keyof typeof Countries];
|
|
51
51
|
interface DimensionValueMap {
|
|
52
52
|
query: string;
|
|
@@ -94,7 +94,7 @@ type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (
|
|
|
94
94
|
interface GSCResult<D extends Dimension[], C> {
|
|
95
95
|
rows: Array<GSCRow<D, C>>;
|
|
96
96
|
}
|
|
97
|
-
type GSCRow<D extends Dimension[], C> = { [K in D[number]]: K extends keyof C ? C[K] : DimensionValueMap[K] } & {
|
|
97
|
+
type GSCRow<D extends Dimension[], C> = { [K in D[number]]: K extends keyof C ? C[K] : DimensionValueMap[K]; } & {
|
|
98
98
|
clicks: number;
|
|
99
99
|
impressions: number;
|
|
100
100
|
ctr: number;
|
|
@@ -137,7 +137,7 @@ interface JsonFilter {
|
|
|
137
137
|
type FilterInput = Filter<any> | JsonFilter;
|
|
138
138
|
type SelectableColumn = Column<Dimension> | MetricColumn<Metric>;
|
|
139
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;
|
|
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
141
|
interface GSCQueryBuilder<D extends Dimension[] = [], C = object> {
|
|
142
142
|
select: {
|
|
143
143
|
<T extends Dimension[]>(...dims: T): GSCQueryBuilder<T, C>;
|
package/dist/query/plan.d.mts
CHANGED
|
@@ -31,7 +31,7 @@ declare const SearchTypes: {
|
|
|
31
31
|
readonly GOOGLE_NEWS: "googleNews";
|
|
32
32
|
};
|
|
33
33
|
type SearchType = typeof SearchTypes[keyof typeof SearchTypes];
|
|
34
|
-
declare const Countries: { [K in (typeof _default)[number]["alpha-3"]]: Lowercase<K
|
|
34
|
+
declare const Countries: { [K in (typeof _default)[number]["alpha-3"]]: Lowercase<K>; };
|
|
35
35
|
type Country = typeof Countries[keyof typeof Countries];
|
|
36
36
|
interface DimensionValueMap {
|
|
37
37
|
query: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gscdump",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.38.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",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"defu": "^6.1.7",
|
|
104
104
|
"ofetch": "^1.5.1",
|
|
105
105
|
"ufo": "^1.6.4",
|
|
106
|
-
"@gscdump/contracts": "0.
|
|
106
|
+
"@gscdump/contracts": "0.38.0"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"@googleapis/indexing": "^6.0.1",
|