@gscdump/sdk 7.2.0 → 7.3.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/analytics-client.d.mts +4 -2
- package/dist/hosted-query.d.mts +3 -2
- package/dist/hosted-query.mjs +11 -2
- package/dist/package.mjs +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { AnalysisSourcesOptions, SearchTypeOptions, SourceRangeOptions } from "./hosted-query.mjs";
|
|
2
2
|
import { HostedClientOptions, HostedFetch, HostedFetchOptions, HostedHeaders } from "./request.mjs";
|
|
3
|
-
import { AnalysisSourcesResponse, BackfillRange, BackfillResponse, BulkFileResolutionRequest, BulkFileResolutionResponse, CountriesResponse, IndexingDiagnostics, IndexingDiagnosticsParams, IndexingInspectRateLimited, IndexingInspectRequest, IndexingInspectResponse, IndexingUrlStatus, IndexingUrlsResponse, InspectionHistoryResponse, InspectionIndex, QueryDimSourceResponse, RollupEnvelope, SearchAppearanceResponse, SiteListItem, SourceInfoOptions, SourceInfoResponse, WhoamiResponse } from "@gscdump/contracts";
|
|
3
|
+
import { AnalysisSourcesResponse, BackfillRange, BackfillResponse, BulkFileResolutionRequest, BulkFileResolutionResponse, CountriesResponse, IndexingDiagnostics, IndexingDiagnosticsParams, IndexingInspectRateLimited, IndexingInspectRequest, IndexingInspectResponse, IndexingSitemapFilterParams, IndexingUrlStatus, IndexingUrlsResponse, InspectionHistoryResponse, InspectionIndex, QueryDimSourceResponse, RollupEnvelope, SearchAppearanceResponse, SiteListItem, SourceInfoOptions, SourceInfoResponse, WhoamiResponse } from "@gscdump/contracts";
|
|
4
|
+
/** The analytics app routes take no Sitemap filter; only the partner reads count by Sitemap. */
|
|
5
|
+
type AnalyticsIndexingDiagnosticsParams = Omit<IndexingDiagnosticsParams, keyof IndexingSitemapFilterParams>;
|
|
4
6
|
export type AnalyticsFetch = HostedFetch;
|
|
5
7
|
export type AnalyticsHeaders = HostedHeaders;
|
|
6
8
|
export type AnalyticsFetchOptions = HostedFetchOptions;
|
|
@@ -33,7 +35,7 @@ export interface AnalyticsClient {
|
|
|
33
35
|
issue?: string;
|
|
34
36
|
search?: string;
|
|
35
37
|
}) => Promise<IndexingUrlsResponse>;
|
|
36
|
-
getIndexingDiagnostics: (siteId: string, params?:
|
|
38
|
+
getIndexingDiagnostics: (siteId: string, params?: AnalyticsIndexingDiagnosticsParams) => Promise<IndexingDiagnostics>;
|
|
37
39
|
requestIndexingInspect: (siteId: string, body: IndexingInspectRequest) => Promise<IndexingInspectResponse | IndexingInspectRateLimited>;
|
|
38
40
|
getCountries: (siteId: string, range: {
|
|
39
41
|
start: string;
|
package/dist/hosted-query.d.mts
CHANGED
|
@@ -22,6 +22,7 @@ export declare function sourceInfoQuery(options: SourceInfoOptions | undefined):
|
|
|
22
22
|
export declare function tablesQuery(tablesOrOptions: string[] | string | AnalysisSourcesOptions | undefined, options?: AnalysisSourcesOptions): Record<string, string>;
|
|
23
23
|
export declare function dataQuery(state: BuilderStateWire, options?: DataQueryOptions): Record<string, string>;
|
|
24
24
|
export declare function dataDetailQuery(state: BuilderStateWire, options?: DataDetailOptions): Record<string, string>;
|
|
25
|
-
|
|
26
|
-
export declare function
|
|
25
|
+
type IndexingQuery = Record<string, string | number | string[]>;
|
|
26
|
+
export declare function indexingUrlsQuery(params?: IndexingUrlsParams): IndexingQuery;
|
|
27
|
+
export declare function indexingDiagnosticsQuery(params?: IndexingDiagnosticsParams): IndexingQuery;
|
|
27
28
|
export type { GscSearchType };
|
package/dist/hosted-query.mjs
CHANGED
|
@@ -62,8 +62,17 @@ function dataDetailQuery(state, options) {
|
|
|
62
62
|
if (opts?.comparison) query.qc = canonicalJson(withDefaultSearchType(opts.comparison, scoped.searchType));
|
|
63
63
|
return query;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function sortedFeedpaths(value) {
|
|
66
|
+
return [...new Set((Array.isArray(value) ? value : [value]).map((item) => item.trim()).filter(Boolean))].sort();
|
|
67
|
+
}
|
|
68
|
+
function indexingSitemapFilterQuery(params) {
|
|
66
69
|
const query = {};
|
|
70
|
+
if (params.feedpath !== void 0) query.feedpath = sortedFeedpaths(params.feedpath);
|
|
71
|
+
if (params.excludeFeedpath !== void 0) query.excludeFeedpath = sortedFeedpaths(params.excludeFeedpath);
|
|
72
|
+
return query;
|
|
73
|
+
}
|
|
74
|
+
function indexingUrlsQuery(params = {}) {
|
|
75
|
+
const query = indexingSitemapFilterQuery(params);
|
|
67
76
|
if (params.limit != null) query.limit = params.limit;
|
|
68
77
|
if (params.offset != null) query.offset = params.offset;
|
|
69
78
|
if (params.status) query.status = params.status;
|
|
@@ -73,7 +82,7 @@ function indexingUrlsQuery(params = {}) {
|
|
|
73
82
|
return query;
|
|
74
83
|
}
|
|
75
84
|
function indexingDiagnosticsQuery(params = {}) {
|
|
76
|
-
const query =
|
|
85
|
+
const query = indexingSitemapFilterQuery(params);
|
|
77
86
|
if (params.sampleIssues) query.sampleIssues = Array.isArray(params.sampleIssues) ? [...new Set(params.sampleIssues.map((item) => String(item).trim()).filter(Boolean))].sort().join(",") : params.sampleIssues;
|
|
78
87
|
if (params.sampleLimit != null) query.sampleLimit = params.sampleLimit;
|
|
79
88
|
return query;
|
package/dist/package.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var version = "7.
|
|
1
|
+
var version = "7.3.0";
|
|
2
2
|
export { version };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gscdump/sdk",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.3.0",
|
|
5
5
|
"description": "Consumer SDK for hosted gscdump.com integrations.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -144,8 +144,8 @@
|
|
|
144
144
|
"node": ">=22.13.0"
|
|
145
145
|
},
|
|
146
146
|
"dependencies": {
|
|
147
|
-
"@gscdump/contracts": "^7.
|
|
148
|
-
"gscdump": "^7.
|
|
147
|
+
"@gscdump/contracts": "^7.3.0",
|
|
148
|
+
"gscdump": "^7.3.0",
|
|
149
149
|
"ofetch": "^1.5.1",
|
|
150
150
|
"zod": "^4.6.5"
|
|
151
151
|
},
|