@gscdump/sdk 1.5.3 → 2.0.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 +1 -6
- package/dist/analytics-client.mjs +0 -15
- package/dist/client.d.mts +1 -14
- package/dist/client.mjs +0 -44
- package/dist/v1/http.d.mts +2 -0
- package/dist/v1/http.mjs +2 -0
- package/dist/v1/realtime.d.mts +1 -1
- package/dist/v1/realtime.mjs +2 -2
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
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,
|
|
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";
|
|
4
4
|
type AnalyticsFetch = HostedFetch;
|
|
5
5
|
type AnalyticsHeaders = HostedHeaders;
|
|
6
6
|
type AnalyticsFetchOptions = HostedFetchOptions;
|
|
@@ -24,11 +24,6 @@ interface AnalyticsClient {
|
|
|
24
24
|
end?: string;
|
|
25
25
|
}) => Promise<RollupEnvelope<T>>;
|
|
26
26
|
requestBackfill: (siteId: string, range: BackfillRange) => Promise<BackfillResponse>;
|
|
27
|
-
getSitemaps: (siteId: string) => Promise<SitemapIndex>;
|
|
28
|
-
getSitemapHistory: (siteId: string, hash: string) => Promise<SitemapHistoryResponse>;
|
|
29
|
-
getSitemapChanges: (siteId: string, params?: {
|
|
30
|
-
days?: number;
|
|
31
|
-
}) => Promise<SitemapChangesResponse>;
|
|
32
27
|
getInspections: (siteId: string) => Promise<InspectionIndex>;
|
|
33
28
|
getInspectionHistory: (siteId: string, hash: string) => Promise<InspectionHistoryResponse>;
|
|
34
29
|
getIndexingUrls: (siteId: string, params?: {
|
|
@@ -63,21 +63,6 @@ function createAnalyticsClient(options = {}) {
|
|
|
63
63
|
body
|
|
64
64
|
}, endpoint.response);
|
|
65
65
|
},
|
|
66
|
-
getSitemaps(siteId) {
|
|
67
|
-
const endpoint = analyticsEndpoints.getSitemaps;
|
|
68
|
-
return request(endpoint.path(siteId), { method: endpoint.method }, endpoint.response);
|
|
69
|
-
},
|
|
70
|
-
getSitemapHistory(siteId, hash) {
|
|
71
|
-
const endpoint = analyticsEndpoints.getSitemapHistory;
|
|
72
|
-
return request(endpoint.path(siteId, hash), { method: endpoint.method }, endpoint.response);
|
|
73
|
-
},
|
|
74
|
-
getSitemapChanges(siteId, params = {}) {
|
|
75
|
-
const endpoint = analyticsEndpoints.getSitemapChanges;
|
|
76
|
-
return request(endpoint.path(siteId), {
|
|
77
|
-
method: endpoint.method,
|
|
78
|
-
query: params
|
|
79
|
-
}, endpoint.response);
|
|
80
|
-
},
|
|
81
66
|
getInspections(siteId) {
|
|
82
67
|
const endpoint = analyticsEndpoints.getInspections;
|
|
83
68
|
return request(endpoint.path(siteId), { method: endpoint.method }, endpoint.response);
|
package/dist/client.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AnalysisSourcesOptions, SearchTypeOptions, SourceRangeOptions } from "./hosted-query.mjs";
|
|
2
2
|
import { HostedClientOptions, HostedFetch, HostedFetchOptions, HostedHeaders } from "./request.mjs";
|
|
3
|
-
import { AddPartnerTeamMemberParams, BindPartnerSiteTeamParams, BindPartnerTeamCatalogParams, BindPartnerTeamCatalogResponse, BuilderStateWire, BulkRegisterPartnerSitesParams, BulkRegisterPartnerSitesResponse, CreatePartnerTeamParams, DataDetailOptions, DataQueryOptions, DeletePartnerUserResponse, GscAddAndVerifyResponse, GscVerificationRequest, GscVerificationTokenResponse, GscdumpAnalysisSourcesResponse, GscdumpAvailableSite, GscdumpCanonicalMismatchesResponse, GscdumpDataDetailResponse, GscdumpDataResponse, GscdumpIndexPercentResponse, GscdumpIndexingDiagnosticsResponse, GscdumpIndexingResponse, GscdumpIndexingUrlsResponse, GscdumpKeywordSparklinesParams, GscdumpKeywordSparklinesResponse, GscdumpPageTrendParams, GscdumpPageTrendResponse, GscdumpPermissionRecovery, GscdumpQueryTrendParams, GscdumpQueryTrendResponse, GscdumpSiteIntIdCrosswalkResponse, GscdumpSiteRegistration,
|
|
3
|
+
import { AddPartnerTeamMemberParams, BindPartnerSiteTeamParams, BindPartnerTeamCatalogParams, BindPartnerTeamCatalogResponse, BuilderStateWire, BulkRegisterPartnerSitesParams, BulkRegisterPartnerSitesResponse, CreatePartnerTeamParams, DataDetailOptions, DataQueryOptions, DeletePartnerUserResponse, GscAddAndVerifyResponse, GscVerificationRequest, GscVerificationTokenResponse, GscdumpAnalysisSourcesResponse, GscdumpAvailableSite, GscdumpCanonicalMismatchesResponse, GscdumpDataDetailResponse, GscdumpDataResponse, GscdumpIndexPercentResponse, GscdumpIndexingDiagnosticsResponse, GscdumpIndexingResponse, GscdumpIndexingUrlsResponse, GscdumpKeywordSparklinesParams, GscdumpKeywordSparklinesResponse, GscdumpPageTrendParams, GscdumpPageTrendResponse, GscdumpPermissionRecovery, GscdumpQueryTrendParams, GscdumpQueryTrendResponse, GscdumpSiteIntIdCrosswalkResponse, GscdumpSiteRegistration, GscdumpSyncStatusResponse, GscdumpTeamCatalogRef, GscdumpTeamMemberRow, GscdumpTeamRow, GscdumpTopAssociationParams, GscdumpTopAssociationResponse, GscdumpUserRegistration, GscdumpUserSettings, GscdumpUserSite, GscdumpUserStatus, GscdumpUserTokenUpdate, IndexingDiagnosticsParams, IndexingInspectRateLimited, IndexingInspectRequest, IndexingInspectResponse, IndexingUrlsParams, PartnerLifecycleResponse, RegisterPartnerSiteParams, RegisterPartnerUserParams, UpdatePartnerUserTokensParams } from "@gscdump/contracts";
|
|
4
4
|
type PartnerFetch = HostedFetch;
|
|
5
5
|
type PartnerHeaders = HostedHeaders;
|
|
6
6
|
type PartnerFetchOptions = HostedFetchOptions;
|
|
@@ -52,19 +52,6 @@ interface PartnerClient {
|
|
|
52
52
|
getSiteSyncStatus: (siteId: string, userId?: string) => Promise<GscdumpSyncStatusResponse>;
|
|
53
53
|
getData: (siteId: string, state: BuilderStateWire, options?: DataQueryOptions) => Promise<GscdumpDataResponse>;
|
|
54
54
|
getDataDetail: (siteId: string, state: BuilderStateWire, options?: DataDetailOptions) => Promise<GscdumpDataDetailResponse>;
|
|
55
|
-
getSitemaps: (siteId: string) => Promise<GscdumpSitemapsResponse>;
|
|
56
|
-
getSitemapChanges: (siteId: string, days?: number) => Promise<GscdumpSitemapChangesResponse>;
|
|
57
|
-
getSitemapMembership: (siteId: string, params: GscdumpSitemapMembershipParams) => Promise<GscdumpSitemapMembershipResponse>;
|
|
58
|
-
postSitemapAction: (siteId: string, action: PartnerSitemapAction) => Promise<PartnerSitemapActionResponse>;
|
|
59
|
-
submitSitemap: (siteId: string, sitemapUrl: string, action?: 'submit' | 'delete') => Promise<Extract<PartnerSitemapActionResponse, {
|
|
60
|
-
action: 'submitted' | 'deleted';
|
|
61
|
-
}>>;
|
|
62
|
-
refreshSitemaps: (siteId: string) => Promise<Extract<PartnerSitemapActionResponse, {
|
|
63
|
-
action: 'refreshed';
|
|
64
|
-
}>>;
|
|
65
|
-
autoDiscoverSitemap: (siteId: string) => Promise<Extract<PartnerSitemapActionResponse, {
|
|
66
|
-
action: 'auto-discover';
|
|
67
|
-
}>>;
|
|
68
55
|
getIndexing: (siteId: string, days?: number) => Promise<GscdumpIndexingResponse>;
|
|
69
56
|
getIndexingUrls: (siteId: string, params?: IndexingUrlsParams) => Promise<GscdumpIndexingUrlsResponse>;
|
|
70
57
|
getIndexingDiagnostics: (siteId: string, params?: IndexingDiagnosticsParams) => Promise<GscdumpIndexingDiagnosticsResponse>;
|
package/dist/client.mjs
CHANGED
|
@@ -80,13 +80,6 @@ function createPartnerClient(options = {}) {
|
|
|
80
80
|
}));
|
|
81
81
|
return ok(lifecycleSiteToSyncStatus(site));
|
|
82
82
|
}
|
|
83
|
-
function postSitemapAction(siteId, action) {
|
|
84
|
-
const body = shouldValidate("request") ? endpoints.postSitemaps.body.parse(action) : action;
|
|
85
|
-
return request(endpoints.postSitemaps.path(siteId), {
|
|
86
|
-
method: endpoints.postSitemaps.method,
|
|
87
|
-
body
|
|
88
|
-
}, endpoints.postSitemaps.response);
|
|
89
|
-
}
|
|
90
83
|
return {
|
|
91
84
|
registerUser(params) {
|
|
92
85
|
const body = shouldValidate("request") ? endpoints.registerUser.body.parse(params) : params;
|
|
@@ -186,43 +179,6 @@ function createPartnerClient(options = {}) {
|
|
|
186
179
|
query: dataDetailQuery(state, queryOptions)
|
|
187
180
|
}, endpoints.getDataDetail.response);
|
|
188
181
|
},
|
|
189
|
-
getSitemaps(siteId) {
|
|
190
|
-
return request(endpoints.getSitemaps.path(siteId), { method: endpoints.getSitemaps.method }, endpoints.getSitemaps.response);
|
|
191
|
-
},
|
|
192
|
-
getSitemapChanges(siteId, days = 28) {
|
|
193
|
-
return request(endpoints.getSitemapChanges.path(siteId), {
|
|
194
|
-
method: endpoints.getSitemapChanges.method,
|
|
195
|
-
query: { days }
|
|
196
|
-
}, endpoints.getSitemapChanges.response);
|
|
197
|
-
},
|
|
198
|
-
getSitemapMembership(siteId, params) {
|
|
199
|
-
const body = shouldValidate("request") ? endpoints.getSitemapMembership.body.parse(params) : params;
|
|
200
|
-
return request(endpoints.getSitemapMembership.path(siteId), {
|
|
201
|
-
method: endpoints.getSitemapMembership.method,
|
|
202
|
-
body,
|
|
203
|
-
dedupe: true
|
|
204
|
-
}, endpoints.getSitemapMembership.response);
|
|
205
|
-
},
|
|
206
|
-
postSitemapAction,
|
|
207
|
-
async submitSitemap(siteId, sitemapUrl, action = "submit") {
|
|
208
|
-
const response = await postSitemapAction(siteId, {
|
|
209
|
-
action,
|
|
210
|
-
sitemapUrl
|
|
211
|
-
});
|
|
212
|
-
const expected = action === "submit" ? "submitted" : "deleted";
|
|
213
|
-
if (response.action !== expected) throw new TypeError(`Unexpected sitemap action response: expected ${expected}, got ${response.action}`);
|
|
214
|
-
return response;
|
|
215
|
-
},
|
|
216
|
-
async refreshSitemaps(siteId) {
|
|
217
|
-
const response = await postSitemapAction(siteId, { action: "refresh" });
|
|
218
|
-
if (response.action !== "refreshed") throw new TypeError(`Unexpected sitemap action response: expected refreshed, got ${response.action}`);
|
|
219
|
-
return response;
|
|
220
|
-
},
|
|
221
|
-
async autoDiscoverSitemap(siteId) {
|
|
222
|
-
const response = await postSitemapAction(siteId, { action: "auto-discover" });
|
|
223
|
-
if (response.action !== "auto-discover") throw new TypeError(`Unexpected sitemap action response: expected auto-discover, got ${response.action}`);
|
|
224
|
-
return response;
|
|
225
|
-
},
|
|
226
182
|
getIndexing(siteId, days = 28) {
|
|
227
183
|
return request(endpoints.getIndexing.path(siteId), {
|
|
228
184
|
method: endpoints.getIndexing.method,
|
package/dist/v1/http.d.mts
CHANGED
|
@@ -77,6 +77,8 @@ interface GscdumpV1Client {
|
|
|
77
77
|
getSiteIndexingDiagnostics: (input: GscdumpV1OperationInput<'partner.sites.indexing.diagnostics.get'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.indexing.diagnostics.get'>>;
|
|
78
78
|
getSiteSitemaps: (input: GscdumpV1OperationInput<'partner.sites.sitemaps.get'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.sitemaps.get'>>;
|
|
79
79
|
getSiteSitemapChanges: (input: GscdumpV1OperationInput<'partner.sites.sitemaps.changes.get'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.sitemaps.changes.get'>>;
|
|
80
|
+
listSitemapUrls: (input: GscdumpV1OperationInput<'partner.sites.sitemaps.urls.get'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.sitemaps.urls.get'>>;
|
|
81
|
+
getSitemapExport: (input: GscdumpV1OperationInput<'partner.sites.sitemaps.export.get'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.sitemaps.export.get'>>;
|
|
80
82
|
getSiteAnalysis: (input: GscdumpV1OperationInput<'partner.sites.analysis.get'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.analysis.get'>>;
|
|
81
83
|
getSiteAnalysisBundle: (input: GscdumpV1OperationInput<'partner.sites.analysis.bundle.get'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.analysis.bundle.get'>>;
|
|
82
84
|
deleteSite: (input: GscdumpV1OperationInput<'partner.sites.delete'>, options?: GscdumpV1ExecuteOptions) => Promise<GscdumpV1OperationResponse<'partner.sites.delete'>>;
|
package/dist/v1/http.mjs
CHANGED
|
@@ -383,6 +383,8 @@ function createGscdumpV1Client(options) {
|
|
|
383
383
|
getSiteIndexingDiagnostics: (input, executeOptions) => execute("partner.sites.indexing.diagnostics.get", input, executeOptions),
|
|
384
384
|
getSiteSitemaps: (input, executeOptions) => execute("partner.sites.sitemaps.get", input, executeOptions),
|
|
385
385
|
getSiteSitemapChanges: (input, executeOptions) => execute("partner.sites.sitemaps.changes.get", input, executeOptions),
|
|
386
|
+
listSitemapUrls: (input, executeOptions) => execute("partner.sites.sitemaps.urls.get", input, executeOptions),
|
|
387
|
+
getSitemapExport: (input, executeOptions) => execute("partner.sites.sitemaps.export.get", input, executeOptions),
|
|
386
388
|
getSiteAnalysis: (input, executeOptions) => execute("partner.sites.analysis.get", input, executeOptions),
|
|
387
389
|
getSiteAnalysisBundle: (input, executeOptions) => execute("partner.sites.analysis.bundle.get", input, executeOptions),
|
|
388
390
|
deleteSite: (input, executeOptions) => execute("partner.sites.delete", input, executeOptions),
|
package/dist/v1/realtime.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RealtimeV1Cursor, RealtimeV1Event, RealtimeV1StreamHead, RealtimeV1StreamId } from "@gscdump/contracts/v1/realtime";
|
|
2
2
|
type MaybePromise<T> = T | Promise<T>;
|
|
3
|
-
declare const GSCDUMP_REALTIME_V1_SDK_VERSION: "
|
|
3
|
+
declare const GSCDUMP_REALTIME_V1_SDK_VERSION: "2.0.0";
|
|
4
4
|
type GscdumpRealtimeV1TransportState = 'idle' | 'ticketing' | 'connecting' | 'handshaking' | 'replaying' | 'live' | 'waiting' | 'stopped' | 'terminal';
|
|
5
5
|
type GscdumpRealtimeV1Freshness = 'unknown' | 'stale' | 'applying' | 'fresh' | 'resyncing' | 'degraded';
|
|
6
6
|
type GscdumpRealtimeV1ErrorCode = 'cursor_store_failed' | 'effect_failed' | 'heartbeat_stale' | 'integration_failed' | 'protocol_error' | 'resync_failed' | 'runtime_unavailable' | 'socket_error' | 'ticket_invalid' | 'ticket_provider_failed' | 'upgrade_rejected';
|
package/dist/v1/realtime.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { utf8Size } from "../utf8.mjs";
|
|
2
2
|
import { GSCDUMP_REALTIME_ACK_POLICY, GSCDUMP_REALTIME_CLOSE_CODES, GSCDUMP_REALTIME_CONNECTION_POLICY, GSCDUMP_REALTIME_LIMITS, GSCDUMP_REALTIME_PING, GSCDUMP_REALTIME_PONG, GSCDUMP_REALTIME_PROTOCOL_VERSION, GSCDUMP_REALTIME_SUBPROTOCOL, REALTIME_V1_EVENT_NAMES, REALTIME_V1_RESOURCE_TYPES, createRealtimeV1Schemas } from "@gscdump/contracts/v1/realtime";
|
|
3
|
-
const GSCDUMP_REALTIME_V1_SDK_VERSION = "
|
|
3
|
+
const GSCDUMP_REALTIME_V1_SDK_VERSION = "2.0.0";
|
|
4
4
|
var GscdumpRealtimeV1Error = class extends Error {
|
|
5
5
|
tag = "GscdumpRealtimeV1Error";
|
|
6
6
|
code;
|
|
@@ -87,7 +87,7 @@ function createGscdumpRealtimeV1Client(options) {
|
|
|
87
87
|
const schemas = createRealtimeV1Schemas();
|
|
88
88
|
const runtime = options.runtime ?? defaultRuntime();
|
|
89
89
|
const cursorStore = options.cursorStore ?? createMemoryCursorStore();
|
|
90
|
-
const sdkVersion = options.sdkVersion ?? "
|
|
90
|
+
const sdkVersion = options.sdkVersion ?? "2.0.0";
|
|
91
91
|
if (!sdkVersion) throw new TypeError("sdkVersion cannot be empty.");
|
|
92
92
|
let running = false;
|
|
93
93
|
let epoch = 0;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gscdump/sdk",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"description": "Consumer SDK for hosted gscdump.com integrations.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -146,9 +146,9 @@
|
|
|
146
146
|
"dependencies": {
|
|
147
147
|
"ofetch": "^1.5.1",
|
|
148
148
|
"zod": "^4.4.3",
|
|
149
|
-
"@gscdump/contracts": "^
|
|
150
|
-
"@gscdump/engine": "^
|
|
151
|
-
"gscdump": "^
|
|
149
|
+
"@gscdump/contracts": "^2.0.0",
|
|
150
|
+
"@gscdump/engine": "^2.0.0",
|
|
151
|
+
"gscdump": "^2.0.0"
|
|
152
152
|
},
|
|
153
153
|
"devDependencies": {
|
|
154
154
|
"typescript": "^7.0.2",
|