@gscdump/contracts 1.4.0 → 1.4.1
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.d.mts +5 -3
- package/dist/analytics.mjs +3 -3
- package/dist/archetypes.d.mts +1 -1
- package/dist/file-resolution.d.mts +155 -0
- package/dist/index.d.mts +6 -3
- package/dist/index.mjs +4 -2
- package/dist/onboarding.d.mts +113 -0
- package/dist/onboarding.mjs +122 -0
- package/dist/partner.d.mts +6 -4
- package/dist/partner.mjs +5 -3
- package/dist/routes.d.mts +88 -0
- package/dist/{_chunks/schemas.d.mts → schemas.d.mts} +1 -88
- package/dist/{_chunks/schemas.mjs → schemas.mjs} +3 -137
- package/dist/{_chunks/types.d.mts → types.d.mts} +3 -266
- package/dist/v1/documents.d.mts +4 -0
- package/dist/v1/documents.mjs +227 -0
- package/dist/v1/http.d.mts +94 -0
- package/dist/v1/http.mjs +162 -0
- package/dist/v1/index.d.mts +4 -12440
- package/dist/v1/index.mjs +4 -5107
- package/dist/v1/operations.d.mts +11699 -0
- package/dist/v1/operations.mjs +4282 -0
- package/dist/v1/realtime.d.mts +650 -0
- package/dist/v1/realtime.mjs +447 -0
- package/dist/webhook-constants.mjs +16 -0
- package/package.json +1 -1
- package/dist/{_chunks/endpoints.d.mts → endpoints.d.mts} +0 -0
- package/dist/{_chunks/endpoints.mjs → endpoints.mjs} +1 -1
- /package/dist/{_chunks/routes.mjs → routes.mjs} +0 -0
- /package/dist/{_chunks/webhook-constants.d.mts → webhook-constants.d.mts} +0 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
declare const partnerRoutes: {
|
|
2
|
+
readonly partner: {
|
|
3
|
+
readonly users: {
|
|
4
|
+
readonly byId: (userId: string) => string;
|
|
5
|
+
readonly lifecycle: (userId: string) => string;
|
|
6
|
+
readonly siteTeam: (userId: string, siteId: string) => string;
|
|
7
|
+
readonly siteIntIdCrosswalk: (userId: string) => string;
|
|
8
|
+
};
|
|
9
|
+
readonly sites: {
|
|
10
|
+
readonly register: '/partner/sites/register';
|
|
11
|
+
readonly bulkRegister: '/partner/sites/bulk-register';
|
|
12
|
+
readonly verificationToken: '/partner/sites/verification-token';
|
|
13
|
+
readonly addAndVerify: '/partner/sites/add-and-verify';
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
readonly users: {
|
|
17
|
+
readonly register: '/users/register';
|
|
18
|
+
readonly tokens: (userId: string) => string;
|
|
19
|
+
readonly status: (userId: string) => string;
|
|
20
|
+
readonly lifecycle: (userId: string) => string;
|
|
21
|
+
readonly sites: (userId: string) => string;
|
|
22
|
+
readonly availableSites: (userId: string) => string;
|
|
23
|
+
readonly siteTeam: (userId: string, siteId: string) => string;
|
|
24
|
+
};
|
|
25
|
+
readonly sites: {
|
|
26
|
+
readonly register: '/sites/register';
|
|
27
|
+
readonly bulkRegister: '/sites/bulk-register';
|
|
28
|
+
readonly byId: (siteId: string) => string;
|
|
29
|
+
readonly analysisSources: (siteId: string) => string;
|
|
30
|
+
readonly syncStatus: (siteId: string) => string;
|
|
31
|
+
readonly data: (siteId: string) => string;
|
|
32
|
+
readonly dataDetail: (siteId: string) => string;
|
|
33
|
+
readonly sitemaps: (siteId: string) => string;
|
|
34
|
+
readonly sitemapChanges: (siteId: string) => string;
|
|
35
|
+
readonly sitemapMembership: (siteId: string) => string;
|
|
36
|
+
readonly indexing: (siteId: string) => string;
|
|
37
|
+
readonly indexingUrls: (siteId: string) => string;
|
|
38
|
+
readonly indexingDiagnostics: (siteId: string) => string;
|
|
39
|
+
readonly indexingInspect: (siteId: string) => string;
|
|
40
|
+
readonly recoverPermission: (siteId: string) => string;
|
|
41
|
+
readonly canonicalMismatches: (siteId: string) => string;
|
|
42
|
+
readonly topAssociation: (siteId: string) => string;
|
|
43
|
+
readonly keywordSparklines: (siteId: string) => string;
|
|
44
|
+
readonly queryTrend: (siteId: string) => string;
|
|
45
|
+
readonly pageTrend: (siteId: string) => string;
|
|
46
|
+
readonly indexPercent: (siteId: string) => string;
|
|
47
|
+
};
|
|
48
|
+
readonly settings: {
|
|
49
|
+
readonly user: '/user/settings';
|
|
50
|
+
};
|
|
51
|
+
readonly teams: {
|
|
52
|
+
readonly create: '/partner/teams';
|
|
53
|
+
readonly byId: (teamId: string) => string;
|
|
54
|
+
readonly catalog: (teamId: string) => string;
|
|
55
|
+
readonly members: (teamId: string) => string;
|
|
56
|
+
readonly member: (teamId: string, userId: string) => string;
|
|
57
|
+
};
|
|
58
|
+
readonly realtime: {
|
|
59
|
+
readonly partner: '/ws/partner';
|
|
60
|
+
readonly user: '/ws/user';
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
declare const analyticsRoutes: {
|
|
64
|
+
readonly whoami: '/api/__gsc/whoami';
|
|
65
|
+
readonly sites: '/api/__gsc/sites';
|
|
66
|
+
readonly bulkSources: '/api/__gsc/bulk-sources';
|
|
67
|
+
readonly site: {
|
|
68
|
+
readonly sourceInfo: (siteId: string) => string;
|
|
69
|
+
readonly analysisSources: (siteId: string) => string;
|
|
70
|
+
readonly queryDimSource: (siteId: string) => string;
|
|
71
|
+
readonly analyze: (siteId: string) => string;
|
|
72
|
+
readonly rollup: (siteId: string, rollupId: string) => string;
|
|
73
|
+
readonly backfill: (siteId: string) => string;
|
|
74
|
+
readonly sitemaps: (siteId: string) => string;
|
|
75
|
+
readonly sitemapHistory: (siteId: string, hash: string) => string;
|
|
76
|
+
readonly sitemapChanges: (siteId: string) => string;
|
|
77
|
+
readonly inspections: (siteId: string) => string;
|
|
78
|
+
readonly inspectionHistory: (siteId: string, hash: string) => string;
|
|
79
|
+
readonly indexingUrls: (siteId: string) => string;
|
|
80
|
+
readonly indexingDiagnostics: (siteId: string) => string;
|
|
81
|
+
readonly indexingInspect: (siteId: string) => string;
|
|
82
|
+
readonly countries: (siteId: string) => string;
|
|
83
|
+
readonly searchAppearance: (siteId: string) => string;
|
|
84
|
+
readonly topAssociation: (siteId: string) => string;
|
|
85
|
+
};
|
|
86
|
+
readonly syncProgress: '/api/sync-progress';
|
|
87
|
+
};
|
|
88
|
+
export { analyticsRoutes, partnerRoutes };
|
|
@@ -1,92 +1,5 @@
|
|
|
1
1
|
import { GscSearchType } from "./types.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
declare const partnerRoutes: {
|
|
4
|
-
readonly partner: {
|
|
5
|
-
readonly users: {
|
|
6
|
-
readonly byId: (userId: string) => string;
|
|
7
|
-
readonly lifecycle: (userId: string) => string;
|
|
8
|
-
readonly siteTeam: (userId: string, siteId: string) => string;
|
|
9
|
-
readonly siteIntIdCrosswalk: (userId: string) => string;
|
|
10
|
-
};
|
|
11
|
-
readonly sites: {
|
|
12
|
-
readonly register: '/partner/sites/register';
|
|
13
|
-
readonly bulkRegister: '/partner/sites/bulk-register';
|
|
14
|
-
readonly verificationToken: '/partner/sites/verification-token';
|
|
15
|
-
readonly addAndVerify: '/partner/sites/add-and-verify';
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
readonly users: {
|
|
19
|
-
readonly register: '/users/register';
|
|
20
|
-
readonly tokens: (userId: string) => string;
|
|
21
|
-
readonly status: (userId: string) => string;
|
|
22
|
-
readonly lifecycle: (userId: string) => string;
|
|
23
|
-
readonly sites: (userId: string) => string;
|
|
24
|
-
readonly availableSites: (userId: string) => string;
|
|
25
|
-
readonly siteTeam: (userId: string, siteId: string) => string;
|
|
26
|
-
};
|
|
27
|
-
readonly sites: {
|
|
28
|
-
readonly register: '/sites/register';
|
|
29
|
-
readonly bulkRegister: '/sites/bulk-register';
|
|
30
|
-
readonly byId: (siteId: string) => string;
|
|
31
|
-
readonly analysisSources: (siteId: string) => string;
|
|
32
|
-
readonly syncStatus: (siteId: string) => string;
|
|
33
|
-
readonly data: (siteId: string) => string;
|
|
34
|
-
readonly dataDetail: (siteId: string) => string;
|
|
35
|
-
readonly sitemaps: (siteId: string) => string;
|
|
36
|
-
readonly sitemapChanges: (siteId: string) => string;
|
|
37
|
-
readonly sitemapMembership: (siteId: string) => string;
|
|
38
|
-
readonly indexing: (siteId: string) => string;
|
|
39
|
-
readonly indexingUrls: (siteId: string) => string;
|
|
40
|
-
readonly indexingDiagnostics: (siteId: string) => string;
|
|
41
|
-
readonly indexingInspect: (siteId: string) => string;
|
|
42
|
-
readonly recoverPermission: (siteId: string) => string;
|
|
43
|
-
readonly canonicalMismatches: (siteId: string) => string;
|
|
44
|
-
readonly topAssociation: (siteId: string) => string;
|
|
45
|
-
readonly keywordSparklines: (siteId: string) => string;
|
|
46
|
-
readonly queryTrend: (siteId: string) => string;
|
|
47
|
-
readonly pageTrend: (siteId: string) => string;
|
|
48
|
-
readonly indexPercent: (siteId: string) => string;
|
|
49
|
-
};
|
|
50
|
-
readonly settings: {
|
|
51
|
-
readonly user: '/user/settings';
|
|
52
|
-
};
|
|
53
|
-
readonly teams: {
|
|
54
|
-
readonly create: '/partner/teams';
|
|
55
|
-
readonly byId: (teamId: string) => string;
|
|
56
|
-
readonly catalog: (teamId: string) => string;
|
|
57
|
-
readonly members: (teamId: string) => string;
|
|
58
|
-
readonly member: (teamId: string, userId: string) => string;
|
|
59
|
-
};
|
|
60
|
-
readonly realtime: {
|
|
61
|
-
readonly partner: '/ws/partner';
|
|
62
|
-
readonly user: '/ws/user';
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
declare const analyticsRoutes: {
|
|
66
|
-
readonly whoami: '/api/__gsc/whoami';
|
|
67
|
-
readonly sites: '/api/__gsc/sites';
|
|
68
|
-
readonly bulkSources: '/api/__gsc/bulk-sources';
|
|
69
|
-
readonly site: {
|
|
70
|
-
readonly sourceInfo: (siteId: string) => string;
|
|
71
|
-
readonly analysisSources: (siteId: string) => string;
|
|
72
|
-
readonly queryDimSource: (siteId: string) => string;
|
|
73
|
-
readonly analyze: (siteId: string) => string;
|
|
74
|
-
readonly rollup: (siteId: string, rollupId: string) => string;
|
|
75
|
-
readonly backfill: (siteId: string) => string;
|
|
76
|
-
readonly sitemaps: (siteId: string) => string;
|
|
77
|
-
readonly sitemapHistory: (siteId: string, hash: string) => string;
|
|
78
|
-
readonly sitemapChanges: (siteId: string) => string;
|
|
79
|
-
readonly inspections: (siteId: string) => string;
|
|
80
|
-
readonly inspectionHistory: (siteId: string, hash: string) => string;
|
|
81
|
-
readonly indexingUrls: (siteId: string) => string;
|
|
82
|
-
readonly indexingDiagnostics: (siteId: string) => string;
|
|
83
|
-
readonly indexingInspect: (siteId: string) => string;
|
|
84
|
-
readonly countries: (siteId: string) => string;
|
|
85
|
-
readonly searchAppearance: (siteId: string) => string;
|
|
86
|
-
readonly topAssociation: (siteId: string) => string;
|
|
87
|
-
};
|
|
88
|
-
readonly syncProgress: '/api/sync-progress';
|
|
89
|
-
};
|
|
90
3
|
/**
|
|
91
4
|
* GSC search-type slice validator. Mirrors the `GscSearchType` union from
|
|
92
5
|
* `gscdump/contracts` and the `SearchTypes` constants in `gscdump/query`. Used by consumers
|
|
@@ -7255,4 +7168,4 @@ declare const partnerEndpointSchemas: {
|
|
|
7255
7168
|
}, z.core.$loose>;
|
|
7256
7169
|
};
|
|
7257
7170
|
};
|
|
7258
|
-
export { SEARCH_TYPE_CAPABILITIES, addPartnerTeamMemberSchema, analyticsEndpointSchemas,
|
|
7171
|
+
export { SEARCH_TYPE_CAPABILITIES, addPartnerTeamMemberSchema, analyticsEndpointSchemas, backfillRangeSchema, backfillResponseSchema, bindPartnerSiteTeamSchema, bindPartnerTeamCatalogResponseSchema, bindPartnerTeamCatalogSchema, builderStateSchema, bulkFileResolutionResponseSchema, bulkRegisterPartnerSitesResponseSchema, bulkRegisterPartnerSitesSchema, canonicalWebhookEventTypeSchema, countriesResponseSchema, countryRowSchema, createPartnerTeamSchema, dataDetailOptionsSchema, dataQueryOptionsSchema, gscAddAndVerifyResponseSchema, gscApiRangeSchema, gscComparisonFilterSchema, gscRowQueryMetaSchema, gscRowQueryResponseSchema, gscVerificationDnsRecordSchema, gscVerificationMethodSchema, gscVerificationRequestSchema, gscVerificationSiteSchema, gscVerificationTokenResponseSchema, gscdumpAnalysisBaseParamsSchema, gscdumpAnalysisBundleResponseSchema, gscdumpAnalysisMetaSchema, gscdumpAnalysisParamsSchema, gscdumpAnalysisPresetSchema, gscdumpAnalysisResponseSchema, gscdumpAnalysisSourcesResponseSchema, gscdumpAvailableSiteSchema, gscdumpCanonicalMismatchesResponseSchema, gscdumpDataDetailResponseSchema, gscdumpDataResponseSchema, gscdumpDataRowSchema, gscdumpDeletePartnerUserResponseSchema, gscdumpHealthResponseSchema, gscdumpIndexPercentParamsSchema, gscdumpIndexPercentResponseSchema, gscdumpIndexingDiagnosticsResponseSchema, gscdumpIndexingResponseSchema, gscdumpIndexingUrlsResponseSchema, gscdumpKeywordSparklinesParamsSchema, gscdumpKeywordSparklinesResponseSchema, gscdumpMetaSchema, gscdumpPageTrendParamsSchema, gscdumpPageTrendResponseSchema, gscdumpPermissionRecoverySchema, gscdumpQueryTrendParamsSchema, gscdumpQueryTrendResponseSchema, gscdumpSiteRegistrationSchema, gscdumpSiteReportResponseSchema, gscdumpSitemapChangesResponseSchema, gscdumpSitemapMembershipParamsSchema, gscdumpSitemapMembershipResponseSchema, gscdumpSitemapMembershipUrlSchema, gscdumpSitemapsResponseSchema, gscdumpSyncJobsResponseSchema, gscdumpSyncProgressResponseSchema, gscdumpTeamMemberRowSchema, gscdumpTeamRoleSchema, gscdumpTeamRowSchema, gscdumpTopAssociationParamsSchema, gscdumpTopAssociationResponseSchema, gscdumpTotalsSchema, gscdumpUserMeResponseSchema, gscdumpUserRegistrationSchema, gscdumpUserSettingsSchema, gscdumpUserSiteSchema, gscdumpUserStatusSchema, indexingDiagnosticsParamsSchema, indexingDiagnosticsSchema, indexingInspectAnyResponseSchema, indexingInspectRateLimitedSchema, indexingInspectRequestSchema, indexingInspectResponseSchema, indexingInspectResultSchema, indexingIssueSchema, indexingUrlRowSchema, indexingUrlsParamsSchema, indexingUrlsResponseSchema, inspectionHistoryRecordSchema, inspectionHistoryResponseSchema, inspectionIndexSchema, inspectionRecordRawSchema, lifecycleErrorSchema, lifecycleProgressSchema, partnerControlEndpointSchemas, partnerEndpointSchemas, partnerLifecycleAccountSchema, partnerLifecycleResponseSchema, partnerLifecycleSiteSchema, partnerRealtimeEventSchema, partnerSiteTeamBindingResponseSchema, partnerSitemapActionResponseSchema, partnerSitemapActionSchema, partnerTeamCreatedResponseSchema, partnerTeamDeletedResponseSchema, partnerTeamMemberAddedResponseSchema, partnerTeamMemberRemovedResponseSchema, partnerTeamMemberRoleResponseSchema, partnerTeamMembersResponseSchema, partnerTeamRenamedResponseSchema, partnerWebhookDataSchema, partnerWebhookEnvelopeSchema, queryDimSourceResponseSchema, registerPartnerSiteSchema, registerPartnerUserSchema, renamePartnerTeamSchema, rollupEnvelopeSchema, scheduleStateSchema, searchAppearanceResponseSchema, searchAppearanceRowSchema, searchTypeSchema, searchTypeSupportsDimensions, searchTypeSupportsQueries, siteIntIdCrosswalkResponseSchema, siteListItemSchema, sitemapChangesResponseSchema, sitemapHistoryRecordSchema, sitemapHistoryResponseSchema, sitemapIndexSchema, sourceInfoResponseSchema, teamCatalogRefSchema, updatePartnerUserTokensSchema, whoamiResponseSchema };
|
|
@@ -1,140 +1,6 @@
|
|
|
1
|
+
import { GSCDUMP_ONBOARDING_CONTRACT_VERSION, accountNextActions, accountStatuses, analyticsNextActions, analyticsStatuses, indexingNextActions, indexingStatuses, lifecycleErrorCodes, propertyNextActions, propertyStatuses, querySourceModes, sitemapNextActions, sitemapStatuses } from "./onboarding.mjs";
|
|
2
|
+
import { CANONICAL_WEBHOOK_EVENTS, WEBHOOK_CONTRACT_VERSION } from "./webhook-constants.mjs";
|
|
1
3
|
import { z } from "zod";
|
|
2
|
-
const GSCDUMP_ONBOARDING_CONTRACT_VERSION = "2026-05-11";
|
|
3
|
-
const GSCDUMP_REQUIRED_ANALYTICS_SCOPE = "https://www.googleapis.com/auth/webmasters.readonly";
|
|
4
|
-
const GSCDUMP_WRITE_ANALYTICS_SCOPE = "https://www.googleapis.com/auth/webmasters";
|
|
5
|
-
const GSCDUMP_OPTIONAL_INDEXING_SCOPE = "https://www.googleapis.com/auth/indexing";
|
|
6
|
-
const accountStatuses = [
|
|
7
|
-
"disconnected",
|
|
8
|
-
"oauth_received",
|
|
9
|
-
"scope_missing",
|
|
10
|
-
"refresh_missing",
|
|
11
|
-
"db_provisioning",
|
|
12
|
-
"ready",
|
|
13
|
-
"reauth_required"
|
|
14
|
-
];
|
|
15
|
-
const accountNextActions = [
|
|
16
|
-
"connect_google",
|
|
17
|
-
"reconnect_google",
|
|
18
|
-
"wait_for_provisioning",
|
|
19
|
-
"none"
|
|
20
|
-
];
|
|
21
|
-
const propertyStatuses = [
|
|
22
|
-
"no_local_site",
|
|
23
|
-
"no_gsc_property",
|
|
24
|
-
"unverified_property",
|
|
25
|
-
"verified_candidate",
|
|
26
|
-
"registered",
|
|
27
|
-
"linked"
|
|
28
|
-
];
|
|
29
|
-
const propertyNextActions = [
|
|
30
|
-
"create_site",
|
|
31
|
-
"verify_gsc_property",
|
|
32
|
-
"choose_property",
|
|
33
|
-
"register_site",
|
|
34
|
-
"none"
|
|
35
|
-
];
|
|
36
|
-
const analyticsStatuses = [
|
|
37
|
-
"not_registered",
|
|
38
|
-
"queued",
|
|
39
|
-
"preparing",
|
|
40
|
-
"syncing",
|
|
41
|
-
"queryable_live",
|
|
42
|
-
"queryable_partial",
|
|
43
|
-
"ready",
|
|
44
|
-
"failed"
|
|
45
|
-
];
|
|
46
|
-
const analyticsNextActions = [
|
|
47
|
-
"wait_for_sync",
|
|
48
|
-
"retry_sync",
|
|
49
|
-
"none"
|
|
50
|
-
];
|
|
51
|
-
const querySourceModes = [
|
|
52
|
-
"none",
|
|
53
|
-
"live",
|
|
54
|
-
"d1",
|
|
55
|
-
"r2",
|
|
56
|
-
"mixed"
|
|
57
|
-
];
|
|
58
|
-
const sitemapStatuses = [
|
|
59
|
-
"unknown",
|
|
60
|
-
"discovering",
|
|
61
|
-
"none_found",
|
|
62
|
-
"auto_submitted",
|
|
63
|
-
"syncing",
|
|
64
|
-
"ready",
|
|
65
|
-
"failed"
|
|
66
|
-
];
|
|
67
|
-
const sitemapNextActions = [
|
|
68
|
-
"submit_sitemap",
|
|
69
|
-
"wait_for_sitemaps",
|
|
70
|
-
"retry_sitemaps",
|
|
71
|
-
"none"
|
|
72
|
-
];
|
|
73
|
-
const indexingStatuses = [
|
|
74
|
-
"not_requested",
|
|
75
|
-
"missing_scope",
|
|
76
|
-
"insufficient_permission",
|
|
77
|
-
"waiting_for_sitemaps",
|
|
78
|
-
"discovering",
|
|
79
|
-
"checking",
|
|
80
|
-
"ready",
|
|
81
|
-
"budget_exhausted",
|
|
82
|
-
"no_urls",
|
|
83
|
-
"failed"
|
|
84
|
-
];
|
|
85
|
-
const indexingNextActions = [
|
|
86
|
-
"reconnect_google",
|
|
87
|
-
"fix_gsc_permission",
|
|
88
|
-
"wait_for_sitemaps",
|
|
89
|
-
"wait_for_indexing",
|
|
90
|
-
"retry_indexing",
|
|
91
|
-
"none"
|
|
92
|
-
];
|
|
93
|
-
const lifecycleErrorCodes = [
|
|
94
|
-
"missing_refresh_token",
|
|
95
|
-
"missing_analytics_scope",
|
|
96
|
-
"missing_indexing_scope",
|
|
97
|
-
"token_refresh_failed",
|
|
98
|
-
"permission_lost",
|
|
99
|
-
"insufficient_gsc_permission",
|
|
100
|
-
"gsc_property_not_found",
|
|
101
|
-
"gsc_property_unverified",
|
|
102
|
-
"user_database_not_provisioned",
|
|
103
|
-
"sync_failed",
|
|
104
|
-
"sitemap_sync_failed",
|
|
105
|
-
"indexing_failed"
|
|
106
|
-
];
|
|
107
|
-
function parseGrantedScopes(scopes) {
|
|
108
|
-
if (!scopes) return [];
|
|
109
|
-
if (typeof scopes === "string") return scopes.split(/\s+/).map((scope) => scope.trim()).filter(Boolean);
|
|
110
|
-
return scopes.map((scope) => scope.trim()).filter(Boolean);
|
|
111
|
-
}
|
|
112
|
-
function hasGoogleScope(scopes, scope) {
|
|
113
|
-
const granted = parseGrantedScopes(scopes);
|
|
114
|
-
const suffix = scope.replace("https://www.googleapis.com/auth/", "");
|
|
115
|
-
return granted.includes(scope) || granted.includes(suffix);
|
|
116
|
-
}
|
|
117
|
-
function hasRequiredAnalyticsScope(scopes) {
|
|
118
|
-
return hasGoogleScope(scopes, "https://www.googleapis.com/auth/webmasters.readonly") || hasGoogleScope(scopes, "https://www.googleapis.com/auth/webmasters");
|
|
119
|
-
}
|
|
120
|
-
function hasOptionalIndexingScope(scopes) {
|
|
121
|
-
return hasGoogleScope(scopes, GSCDUMP_OPTIONAL_INDEXING_SCOPE);
|
|
122
|
-
}
|
|
123
|
-
const WEBHOOK_CONTRACT_VERSION = "2026-05-11";
|
|
124
|
-
const WEBHOOK_SIGNATURE_HEADER = "X-GSCDump-Signature";
|
|
125
|
-
const WEBHOOK_EVENT_HEADER = "X-GSCDump-Event";
|
|
126
|
-
const WEBHOOK_DELIVERY_HEADER = "X-GSCDump-Delivery";
|
|
127
|
-
const WEBHOOK_CONTRACT_VERSION_HEADER = "X-GSCDump-Contract-Version";
|
|
128
|
-
const WEBHOOK_TIMESTAMP_HEADER = "X-GSCDump-Timestamp";
|
|
129
|
-
const CANONICAL_WEBHOOK_EVENTS = [
|
|
130
|
-
"user.lifecycle.changed",
|
|
131
|
-
"site.lifecycle.changed",
|
|
132
|
-
"site.analytics.ready",
|
|
133
|
-
"site.indexing.ready",
|
|
134
|
-
"site.auth.failed",
|
|
135
|
-
"job.failed"
|
|
136
|
-
];
|
|
137
|
-
const VALID_WEBHOOK_EVENTS = CANONICAL_WEBHOOK_EVENTS;
|
|
138
4
|
const unknownRecord = z.record(z.string(), z.unknown());
|
|
139
5
|
const searchTypeSchema = z.enum([
|
|
140
6
|
"web",
|
|
@@ -1766,4 +1632,4 @@ const partnerEndpointSchemas = {
|
|
|
1766
1632
|
...analyticsEndpointSchemas,
|
|
1767
1633
|
...partnerControlEndpointSchemas
|
|
1768
1634
|
};
|
|
1769
|
-
export {
|
|
1635
|
+
export { SEARCH_TYPE_CAPABILITIES, addPartnerTeamMemberSchema, analyticsEndpointSchemas, backfillRangeSchema, backfillResponseSchema, bindPartnerSiteTeamSchema, bindPartnerTeamCatalogResponseSchema, bindPartnerTeamCatalogSchema, builderStateSchema, bulkFileResolutionResponseSchema, bulkRegisterPartnerSitesResponseSchema, bulkRegisterPartnerSitesSchema, canonicalWebhookEventTypeSchema, countriesResponseSchema, countryRowSchema, createPartnerTeamSchema, dataDetailOptionsSchema, dataQueryOptionsSchema, gscAddAndVerifyResponseSchema, gscApiRangeSchema, gscComparisonFilterSchema, gscRowQueryMetaSchema, gscRowQueryResponseSchema, gscVerificationDnsRecordSchema, gscVerificationMethodSchema, gscVerificationRequestSchema, gscVerificationSiteSchema, gscVerificationTokenResponseSchema, gscdumpAnalysisBaseParamsSchema, gscdumpAnalysisBundleResponseSchema, gscdumpAnalysisMetaSchema, gscdumpAnalysisParamsSchema, gscdumpAnalysisPresetSchema, gscdumpAnalysisResponseSchema, gscdumpAnalysisSourcesResponseSchema, gscdumpAvailableSiteSchema, gscdumpCanonicalMismatchesResponseSchema, gscdumpDataDetailResponseSchema, gscdumpDataResponseSchema, gscdumpDataRowSchema, gscdumpDeletePartnerUserResponseSchema, gscdumpHealthResponseSchema, gscdumpIndexPercentParamsSchema, gscdumpIndexPercentResponseSchema, gscdumpIndexingDiagnosticsResponseSchema, gscdumpIndexingResponseSchema, gscdumpIndexingUrlsResponseSchema, gscdumpKeywordSparklinesParamsSchema, gscdumpKeywordSparklinesResponseSchema, gscdumpMetaSchema, gscdumpPageTrendParamsSchema, gscdumpPageTrendResponseSchema, gscdumpPermissionRecoverySchema, gscdumpQueryTrendParamsSchema, gscdumpQueryTrendResponseSchema, gscdumpSiteRegistrationSchema, gscdumpSiteReportResponseSchema, gscdumpSitemapChangesResponseSchema, gscdumpSitemapMembershipParamsSchema, gscdumpSitemapMembershipResponseSchema, gscdumpSitemapMembershipUrlSchema, gscdumpSitemapsResponseSchema, gscdumpSyncJobsResponseSchema, gscdumpSyncProgressResponseSchema, gscdumpTeamMemberRowSchema, gscdumpTeamRoleSchema, gscdumpTeamRowSchema, gscdumpTopAssociationParamsSchema, gscdumpTopAssociationResponseSchema, gscdumpTotalsSchema, gscdumpUserMeResponseSchema, gscdumpUserRegistrationSchema, gscdumpUserSettingsSchema, gscdumpUserSiteSchema, gscdumpUserStatusSchema, indexingDiagnosticsParamsSchema, indexingDiagnosticsSchema, indexingInspectAnyResponseSchema, indexingInspectRateLimitedSchema, indexingInspectRequestSchema, indexingInspectResponseSchema, indexingInspectResultSchema, indexingIssueSchema, indexingUrlRowSchema, indexingUrlsParamsSchema, indexingUrlsResponseSchema, inspectionHistoryRecordSchema, inspectionHistoryResponseSchema, inspectionIndexSchema, inspectionRecordRawSchema, lifecycleErrorSchema, lifecycleProgressSchema, partnerControlEndpointSchemas, partnerEndpointSchemas, partnerLifecycleAccountSchema, partnerLifecycleResponseSchema, partnerLifecycleSiteSchema, partnerRealtimeEventSchema, partnerSiteTeamBindingResponseSchema, partnerSitemapActionResponseSchema, partnerSitemapActionSchema, partnerTeamCreatedResponseSchema, partnerTeamDeletedResponseSchema, partnerTeamMemberAddedResponseSchema, partnerTeamMemberRemovedResponseSchema, partnerTeamMemberRoleResponseSchema, partnerTeamMembersResponseSchema, partnerTeamRenamedResponseSchema, partnerWebhookDataSchema, partnerWebhookEnvelopeSchema, queryDimSourceResponseSchema, registerPartnerSiteSchema, registerPartnerUserSchema, renamePartnerTeamSchema, rollupEnvelopeSchema, scheduleStateSchema, searchAppearanceResponseSchema, searchAppearanceRowSchema, searchTypeSchema, searchTypeSupportsDimensions, searchTypeSupportsQueries, siteIntIdCrosswalkResponseSchema, siteListItemSchema, sitemapChangesResponseSchema, sitemapHistoryRecordSchema, sitemapHistoryResponseSchema, sitemapIndexSchema, sourceInfoResponseSchema, teamCatalogRefSchema, updatePartnerUserTokensSchema, whoamiResponseSchema };
|
|
@@ -1,268 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/** Request query params for `GET /api/sites/[siteId]/analysis-sources`. */
|
|
4
|
-
interface FileResolutionRequest {
|
|
5
|
-
/** `YYYY-MM-DD` inclusive. Required — no date range = no resolution. */
|
|
6
|
-
start: string;
|
|
7
|
-
/** `YYYY-MM-DD` inclusive. */
|
|
8
|
-
end: string;
|
|
9
|
-
searchType?: GscSearchType;
|
|
10
|
-
/**
|
|
11
|
-
* Restrict resolution to these tables. Omitted = all 5. The archetype the
|
|
12
|
-
* caller intends determines which tables it needs.
|
|
13
|
-
*/
|
|
14
|
-
tables?: FileResolutionTable[];
|
|
15
|
-
/** Client-derived browser attachment byte ceiling. */
|
|
16
|
-
maxBytes?: number;
|
|
17
|
-
/** Client-derived browser attachment row ceiling. */
|
|
18
|
-
maxRows?: number;
|
|
19
|
-
/** Client-derived per-table parquet file-count ceiling. */
|
|
20
|
-
maxFiles?: number;
|
|
21
|
-
/**
|
|
22
|
-
* The archetype the caller will run. Lets the endpoint route the 2
|
|
23
|
-
* window-function archetypes straight to the server tail even when the
|
|
24
|
-
* data would be browser-eligible by size.
|
|
25
|
-
*/
|
|
26
|
-
archetype?: string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* One compacted Iceberg parquet data file the browser should fetch into OPFS.
|
|
30
|
-
*/
|
|
31
|
-
interface ResolvedParquetFile {
|
|
32
|
-
/**
|
|
33
|
-
* Same-origin URL (`/api/r2-data/<key>?...`) carrying a signed size hint
|
|
34
|
-
* and a short-lived exact-key access token. Stable for the file's lifetime
|
|
35
|
-
* (content-addressed).
|
|
36
|
-
*/
|
|
37
|
-
url: string;
|
|
38
|
-
/** Byte size — drives the browser-eligibility sum and OPFS quota planning. */
|
|
39
|
-
bytes: number;
|
|
40
|
-
/**
|
|
41
|
-
* Opaque content-stable identifier for this parquet file. Two requests for
|
|
42
|
-
* the same bytes MUST return the same `contentHash`; any change in bytes
|
|
43
|
-
* MUST yield a different one. The OPFS cache uses this as the file's
|
|
44
|
-
* address (encoded into the cache filename) — it is NOT required to be a
|
|
45
|
-
* SHA-256.
|
|
46
|
-
*
|
|
47
|
-
* In practice the server returns the Iceberg `data_file.file_path` object
|
|
48
|
-
* key, which is UUID-derived and content-addressed by convention.
|
|
49
|
-
*/
|
|
50
|
-
contentHash: string;
|
|
51
|
-
/** Row count, for eligibility accounting + diagnostics. */
|
|
52
|
-
rowCount: number;
|
|
53
|
-
}
|
|
54
|
-
/** Per-table resolution result. */
|
|
55
|
-
interface ResolvedTable {
|
|
56
|
-
table: FileResolutionTable;
|
|
57
|
-
/**
|
|
58
|
-
* `'browser'` — `files` is populated; the browser downloads + attaches.
|
|
59
|
-
* `'server'` — this `(site, table)` exceeds the eligibility ceiling;
|
|
60
|
-
* `files` is empty and queries route to the server tail.
|
|
61
|
-
*/
|
|
62
|
-
mode: 'browser' | 'server';
|
|
63
|
-
/** Compacted Iceberg data files. Empty when `mode === 'server'`. */
|
|
64
|
-
files: ResolvedParquetFile[];
|
|
65
|
-
/**
|
|
66
|
-
* Recent-window overlay parquet — the non-stable tail (the freshest days the
|
|
67
|
-
* ingest stability cutoff excludes from the lake), materialized out-of-band at
|
|
68
|
-
* `_recent_overlay/{site}/{searchType}/{table}.parquet`. When present, the
|
|
69
|
-
* browser unions it with an anti-join dedup (the lake wins on any shared day;
|
|
70
|
-
* the overlay supplies only days the lake lacks) so the freshest days serve
|
|
71
|
-
* from the overlay instead of returning 0. Absent (`undefined`) when no
|
|
72
|
-
* overlay exists for this `(site, searchType, table)` or for `mode: 'server'`.
|
|
73
|
-
*
|
|
74
|
-
* The overlay is OVERWRITTEN in place each sync, so its `contentHash` MUST
|
|
75
|
-
* change whenever the bytes change (the server derives it from the R2 object
|
|
76
|
-
* etag) — otherwise the OPFS cache would serve a stale overlay. The enclosing
|
|
77
|
-
* `FileResolutionResponse.snapshotVersion` folds the overlay hash in for the
|
|
78
|
-
* same reason (it gates browser re-attach).
|
|
79
|
-
*/
|
|
80
|
-
overlay?: ResolvedParquetFile;
|
|
81
|
-
/** Total bytes across `files` — compared against the ceiling. */
|
|
82
|
-
totalBytes: number;
|
|
83
|
-
/** Total rows across `files`. */
|
|
84
|
-
totalRows: number;
|
|
85
|
-
}
|
|
86
|
-
/** Server-tail directive — how an ineligible `(site, table)` is queried. */
|
|
87
|
-
interface ServerTailDirective {
|
|
88
|
-
/**
|
|
89
|
-
* `'r2-sql'` — server runs the query via R2 SQL over the Iceberg table.
|
|
90
|
-
* `'duckdb'` — server runs DuckDB-over-Iceberg-files (caller-supplied SQL,
|
|
91
|
-
* or a query R2 SQL still can't run — see `dispatcher.ts` for the current
|
|
92
|
-
* escalation rules, re-verified against real R2 SQL 2026-07-03; R2 SQL now
|
|
93
|
-
* supports window functions, `COUNT(DISTINCT)`, JOINs and CTEs, so the split
|
|
94
|
-
* is no longer a fixed "window functions → duckdb" rule).
|
|
95
|
-
*/
|
|
96
|
-
engine: 'r2-sql' | 'duckdb';
|
|
97
|
-
/** Endpoint the consumer POSTs the archetype query to. */
|
|
98
|
-
endpoint: string;
|
|
99
|
-
}
|
|
100
|
-
/** Response body of the file-resolution endpoint. */
|
|
101
|
-
interface FileResolutionResponse {
|
|
102
|
-
siteId: string;
|
|
103
|
-
searchType: GscSearchType;
|
|
104
|
-
range: {
|
|
105
|
-
start: string;
|
|
106
|
-
end: string;
|
|
107
|
-
};
|
|
108
|
-
/**
|
|
109
|
-
* Stable hash over the resolved file set. The browser re-attaches only when
|
|
110
|
-
* this changes (new compaction landed). Replaces the old `manifestVersion`.
|
|
111
|
-
*/
|
|
112
|
-
snapshotVersion: string;
|
|
113
|
-
generatedAt: string;
|
|
114
|
-
/** Per-table resolution. */
|
|
115
|
-
tables: ResolvedTable[];
|
|
116
|
-
/**
|
|
117
|
-
* Present iff at least one table resolved to `mode: 'server'`. Tells the
|
|
118
|
-
* consumer how to route the server-tail queries for those tables.
|
|
119
|
-
*/
|
|
120
|
-
serverTail?: ServerTailDirective;
|
|
121
|
-
/**
|
|
122
|
-
* The per-(site,table) browser-eligibility ceiling in effect, echoed so the
|
|
123
|
-
* consumer can show "X is too large for local analysis" UX without
|
|
124
|
-
* hard-coding the threshold.
|
|
125
|
-
*/
|
|
126
|
-
eligibilityCeiling: {
|
|
127
|
-
maxBytes: number;
|
|
128
|
-
maxRows: number;
|
|
129
|
-
maxFiles: number;
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
/** One canonical query-dimension sidecar object for browser attachment. */
|
|
133
|
-
interface QueryDimSourceFile {
|
|
134
|
-
url: string;
|
|
135
|
-
bytes: number;
|
|
136
|
-
contentHash: string;
|
|
137
|
-
}
|
|
138
|
-
/** Response from the versioned query-dimension sidecar resolver. */
|
|
139
|
-
interface QueryDimSourceResponse {
|
|
140
|
-
file: QueryDimSourceFile | null;
|
|
141
|
-
}
|
|
142
|
-
/** Multi-site file-resolution response. Inaccessible sites are omitted. */
|
|
143
|
-
interface BulkFileResolutionResponse {
|
|
144
|
-
generatedAt: string;
|
|
145
|
-
siteCount: number;
|
|
146
|
-
maxSites: number;
|
|
147
|
-
results: Record<string, FileResolutionResponse>;
|
|
148
|
-
}
|
|
149
|
-
/** Request query for the multi-site file resolver. */
|
|
150
|
-
interface BulkFileResolutionRequest extends FileResolutionRequest {
|
|
151
|
-
/** Public site ids to resolve. Partner callers must supply this list. */
|
|
152
|
-
siteIds?: string[];
|
|
153
|
-
}
|
|
154
|
-
declare const GSCDUMP_ONBOARDING_CONTRACT_VERSION: '2026-05-11';
|
|
155
|
-
declare const GSCDUMP_REQUIRED_ANALYTICS_SCOPE: 'https://www.googleapis.com/auth/webmasters.readonly';
|
|
156
|
-
declare const GSCDUMP_WRITE_ANALYTICS_SCOPE: 'https://www.googleapis.com/auth/webmasters';
|
|
157
|
-
declare const GSCDUMP_OPTIONAL_INDEXING_SCOPE: 'https://www.googleapis.com/auth/indexing';
|
|
158
|
-
type GoogleScopesInput = string | readonly string[] | null | undefined;
|
|
159
|
-
declare const accountStatuses: readonly ['disconnected', 'oauth_received', 'scope_missing', 'refresh_missing', 'db_provisioning', 'ready', 'reauth_required'];
|
|
160
|
-
declare const accountNextActions: readonly ['connect_google', 'reconnect_google', 'wait_for_provisioning', 'none'];
|
|
161
|
-
declare const propertyStatuses: readonly ['no_local_site', 'no_gsc_property', 'unverified_property', 'verified_candidate', 'registered', 'linked'];
|
|
162
|
-
declare const propertyNextActions: readonly ['create_site', 'verify_gsc_property', 'choose_property', 'register_site', 'none'];
|
|
163
|
-
declare const analyticsStatuses: readonly ['not_registered', 'queued', 'preparing', 'syncing', 'queryable_live', 'queryable_partial', 'ready', 'failed'];
|
|
164
|
-
declare const analyticsNextActions: readonly ['wait_for_sync', 'retry_sync', 'none'];
|
|
165
|
-
declare const querySourceModes: readonly ['none', 'live', 'd1', 'r2', 'mixed'];
|
|
166
|
-
declare const sitemapStatuses: readonly ['unknown', 'discovering', 'none_found', 'auto_submitted', 'syncing', 'ready', 'failed'];
|
|
167
|
-
declare const sitemapNextActions: readonly ['submit_sitemap', 'wait_for_sitemaps', 'retry_sitemaps', 'none'];
|
|
168
|
-
declare const indexingStatuses: readonly ['not_requested', 'missing_scope', 'insufficient_permission', 'waiting_for_sitemaps', 'discovering', 'checking', 'ready', 'budget_exhausted', 'no_urls', 'failed'];
|
|
169
|
-
declare const indexingNextActions: readonly ['reconnect_google', 'fix_gsc_permission', 'wait_for_sitemaps', 'wait_for_indexing', 'retry_indexing', 'none'];
|
|
170
|
-
declare const lifecycleErrorCodes: readonly ['missing_refresh_token', 'missing_analytics_scope', 'missing_indexing_scope', 'token_refresh_failed', 'permission_lost', 'insufficient_gsc_permission', 'gsc_property_not_found', 'gsc_property_unverified', 'user_database_not_provisioned', 'sync_failed', 'sitemap_sync_failed', 'indexing_failed'];
|
|
171
|
-
type AccountStatus = typeof accountStatuses[number];
|
|
172
|
-
type AccountNextAction = typeof accountNextActions[number];
|
|
173
|
-
type PropertyStatus = typeof propertyStatuses[number];
|
|
174
|
-
type PropertyNextAction = typeof propertyNextActions[number];
|
|
175
|
-
type AnalyticsStatus = typeof analyticsStatuses[number];
|
|
176
|
-
type AnalyticsNextAction = typeof analyticsNextActions[number];
|
|
177
|
-
type QuerySourceMode = typeof querySourceModes[number];
|
|
178
|
-
type SitemapStatus = typeof sitemapStatuses[number];
|
|
179
|
-
type SitemapNextAction = typeof sitemapNextActions[number];
|
|
180
|
-
type IndexingStatus = typeof indexingStatuses[number];
|
|
181
|
-
type IndexingNextAction = typeof indexingNextActions[number];
|
|
182
|
-
type LifecycleWebhookEvent = 'user.lifecycle.changed' | 'site.lifecycle.changed' | 'site.analytics.ready' | 'site.indexing.ready' | 'site.auth.failed' | 'job.failed';
|
|
183
|
-
type LifecycleErrorCode = typeof lifecycleErrorCodes[number];
|
|
184
|
-
interface LifecycleProgress {
|
|
185
|
-
completed: number;
|
|
186
|
-
failed: number;
|
|
187
|
-
total: number;
|
|
188
|
-
percent: number;
|
|
189
|
-
}
|
|
190
|
-
interface LifecycleError {
|
|
191
|
-
code: LifecycleErrorCode;
|
|
192
|
-
message: string;
|
|
193
|
-
retryable: boolean;
|
|
194
|
-
}
|
|
195
|
-
interface PartnerLifecycleAccount {
|
|
196
|
-
status: AccountStatus;
|
|
197
|
-
grantedScopes: string[];
|
|
198
|
-
missingScopes: string[];
|
|
199
|
-
nextAction: AccountNextAction;
|
|
200
|
-
}
|
|
201
|
-
interface PartnerLifecycleSite {
|
|
202
|
-
siteId: string;
|
|
203
|
-
/** Integer alias (`user_sites.int_id`) — the int JOIN key partners denormalize into their own catalog namespaces. Nullable only for pre-0029 unbackfilled rows. */
|
|
204
|
-
intId: number | null;
|
|
205
|
-
/** Team-scoped catalog identifier (`user_sites.catalog_site_id`). Defaults to `intId` for sites without a caller-supplied catalog ID. */
|
|
206
|
-
catalogSiteId: number | null;
|
|
207
|
-
externalSiteId: string | null;
|
|
208
|
-
requestedUrl: string;
|
|
209
|
-
gscPropertyUrl: string | null;
|
|
210
|
-
permissionLevel: string | null;
|
|
211
|
-
property: {
|
|
212
|
-
status: PropertyStatus;
|
|
213
|
-
nextAction: PropertyNextAction;
|
|
214
|
-
};
|
|
215
|
-
analytics: {
|
|
216
|
-
status: AnalyticsStatus;
|
|
217
|
-
progress: LifecycleProgress;
|
|
218
|
-
queryable: boolean;
|
|
219
|
-
sourceMode: QuerySourceMode;
|
|
220
|
-
syncedRange: {
|
|
221
|
-
oldest: string | null;
|
|
222
|
-
newest: string | null;
|
|
223
|
-
};
|
|
224
|
-
nextAction: AnalyticsNextAction;
|
|
225
|
-
};
|
|
226
|
-
sitemaps: {
|
|
227
|
-
status: SitemapStatus;
|
|
228
|
-
discoveredCount: number;
|
|
229
|
-
nextAction: SitemapNextAction;
|
|
230
|
-
};
|
|
231
|
-
indexing: {
|
|
232
|
-
status: IndexingStatus;
|
|
233
|
-
eligible: boolean;
|
|
234
|
-
reason: string | null;
|
|
235
|
-
progress: LifecycleProgress;
|
|
236
|
-
nextAction: IndexingNextAction;
|
|
237
|
-
};
|
|
238
|
-
latestError: LifecycleError | null;
|
|
239
|
-
lifecycleRevision: number;
|
|
240
|
-
updatedAt: string;
|
|
241
|
-
}
|
|
242
|
-
interface PartnerLifecycleResponse {
|
|
243
|
-
contractVersion: typeof GSCDUMP_ONBOARDING_CONTRACT_VERSION;
|
|
244
|
-
userId: string;
|
|
245
|
-
partnerId: string | null;
|
|
246
|
-
currentTeamId: string | null;
|
|
247
|
-
account: PartnerLifecycleAccount;
|
|
248
|
-
sites: PartnerLifecycleSite[];
|
|
249
|
-
}
|
|
250
|
-
interface LifecycleWebhookEnvelope<TData extends Record<string, unknown> = Record<string, unknown>> {
|
|
251
|
-
contractVersion: typeof GSCDUMP_ONBOARDING_CONTRACT_VERSION;
|
|
252
|
-
deliveryId: string;
|
|
253
|
-
event: LifecycleWebhookEvent;
|
|
254
|
-
partnerId: string;
|
|
255
|
-
userId: string;
|
|
256
|
-
siteId?: string;
|
|
257
|
-
externalUserId?: string | null;
|
|
258
|
-
externalSiteId?: string | null;
|
|
259
|
-
lifecycleRevision: number;
|
|
260
|
-
occurredAt: string;
|
|
261
|
-
data: TData;
|
|
262
|
-
}
|
|
263
|
-
declare function parseGrantedScopes(scopes: GoogleScopesInput): string[];
|
|
264
|
-
declare function hasRequiredAnalyticsScope(scopes: GoogleScopesInput): boolean;
|
|
265
|
-
declare function hasOptionalIndexingScope(scopes: GoogleScopesInput): boolean;
|
|
1
|
+
import { FileResolutionResponse } from "./file-resolution.mjs";
|
|
2
|
+
import { AccountNextAction, AccountStatus, PartnerLifecycleAccount, PartnerLifecycleResponse, PartnerLifecycleSite } from "./onboarding.mjs";
|
|
266
3
|
type TableName = 'pages' | 'queries' | 'countries' | 'page_queries' | 'dates' | 'search_appearance' | 'search_appearance_pages' | 'search_appearance_queries' | 'search_appearance_page_queries' | 'hourly_pages';
|
|
267
4
|
/**
|
|
268
5
|
* Temporal granularity axis. Daily callers (`'day'`, default) read/write rows
|
|
@@ -1627,4 +1364,4 @@ interface PartnerWebhookHeaders {
|
|
|
1627
1364
|
timestamp?: string | null;
|
|
1628
1365
|
signature?: string | null;
|
|
1629
1366
|
}
|
|
1630
|
-
export {
|
|
1367
|
+
export { AddPartnerTeamMemberParams, AnalysisSourcesOptions, AnalysisSourcesResponse, BackfillRange, BackfillResponse, BindPartnerSiteTeamParams, BindPartnerTeamCatalogParams, BindPartnerTeamCatalogResponse, BuilderStateWire, BulkRegisterPartnerSiteResult, BulkRegisterPartnerSitesParams, BulkRegisterPartnerSitesResponse, CanonicalWebhookEventType, ColumnDef, ColumnType, CountriesResponse, CountryRow, CreatePartnerTeamParams, CreateWebhookEnvelopeOptions, DataDetailOptions, DataQueryOptions, DeletePartnerUserResponse, Dimension, Filter, Grain, GscAddAndVerifyResponse, GscApiRange, GscComparisonFilter, GscRowQueryMeta, GscRowQueryResponse, GscSearchType, GscVerificationDnsRecord, GscVerificationMethod, GscVerificationRequest, GscVerificationSite, GscVerificationTokenResponse, GscdumpAnalysisBundleParams, GscdumpAnalysisBundleResponse, GscdumpAnalysisParams, GscdumpAnalysisPreset, GscdumpAnalysisResponse, GscdumpAnalysisSourcesResponse, GscdumpAvailableSite, GscdumpCanonicalMismatchRow, GscdumpCanonicalMismatchesResponse, GscdumpDataDetailResponse, GscdumpDataResponse, GscdumpDataRow, GscdumpHealthResponse, GscdumpIndexPercentResponse, GscdumpIndexPercentSitemap, GscdumpIndexPercentTrendPoint, GscdumpIndexingDiagnosticsResponse, GscdumpIndexingInspectRateLimited, GscdumpIndexingInspectRequest, GscdumpIndexingInspectResponse, GscdumpIndexingInspectResult, GscdumpIndexingIssueSeverity, GscdumpIndexingResponse, GscdumpIndexingTrendPoint, GscdumpIndexingUrl, GscdumpIndexingUrlStatus, GscdumpIndexingUrlsResponse, GscdumpInvisibleUrlRow, GscdumpKeywordSparklinesParams, GscdumpKeywordSparklinesResponse, GscdumpMeta, GscdumpOrphanPageRow, GscdumpPageTrendParams, GscdumpPageTrendResponse, GscdumpPerSitemapHistoryEntry, GscdumpPermissionRecovery, GscdumpQueryTrendParams, GscdumpQueryTrendResponse, GscdumpRichResultItem, GscdumpSiteIntIdCrosswalkEntry, GscdumpSiteIntIdCrosswalkResponse, GscdumpSiteRegistration, GscdumpSiteReportResponse, GscdumpSitemap, GscdumpSitemapChangesResponse, GscdumpSitemapHistory, GscdumpSitemapMembershipParams, GscdumpSitemapMembershipResponse, GscdumpSitemapMembershipUnavailableReason, GscdumpSitemapMembershipUrl, GscdumpSitemapsResponse, GscdumpSyncJobItem, GscdumpSyncJobStatus, GscdumpSyncJobsQueueCounts, GscdumpSyncJobsResponse, GscdumpSyncProgressDateStatus, GscdumpSyncProgressPhaseCounts, GscdumpSyncProgressResponse, GscdumpSyncProgressSite, GscdumpSyncStatusResponse, GscdumpTeamCatalogRef, GscdumpTeamMemberRow, GscdumpTeamRow, GscdumpTopAssociationParams, GscdumpTopAssociationResponse, GscdumpTotals, GscdumpUserMeResponse, GscdumpUserRegistration, GscdumpUserSettings, GscdumpUserSite, GscdumpUserStatus, GscdumpUserTokenUpdate, IndexingDiagnostics, IndexingDiagnosticsParams, IndexingInspectRateLimit, IndexingInspectRateLimited, IndexingInspectRequest, IndexingInspectResponse, IndexingInspectResult, IndexingIssue, IndexingIssueSeverity, IndexingUrlRow, IndexingUrlStatus, IndexingUrlsParams, IndexingUrlsResponse, InspectionHistoryRecord, InspectionHistoryResponse, InspectionIndex, InspectionRecordRaw, Metric, type PartnerLifecycleAccount, type PartnerLifecycleResponse, type PartnerLifecycleSite, PartnerSitemapAction, PartnerSitemapActionResponse, PartnerWebhookData, PartnerWebhookHeaders, RegisterPartnerSiteParams, RegisterPartnerUserParams, RollupEnvelope, Row, ScheduleState, SearchAppearanceResponse, SearchAppearanceRow, SearchTypeOptions, SiteListItem, SitemapAddedRow, SitemapChangesResponse, SitemapHistoryRecord, SitemapHistoryResponse, SitemapIndex, SitemapRemovedRow, SourceInfoOptions, SourceInfoResponse, TableName, TableSchema, TenantCtx, UpdatePartnerUserTokensParams, WebhookEnvelope, WebhookEventType, WhoamiResponse };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
type ContractDocument = Record<string, unknown>;
|
|
2
|
+
declare function serializeContractDocument(document: ContractDocument): string;
|
|
3
|
+
declare function createGscdumpV1Documents(): Record<'openapi.partner.v1.json' | 'openapi.analytics.v1.json' | 'openapi.realtime.v1.json' | 'asyncapi.realtime.v1.json', ContractDocument>;
|
|
4
|
+
export { ContractDocument, createGscdumpV1Documents, serializeContractDocument };
|