@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
package/dist/analytics.d.mts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { analyticsEndpoints } from "./
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { analyticsEndpoints } from "./endpoints.mjs";
|
|
2
|
+
import { analyticsRoutes } from "./routes.mjs";
|
|
3
|
+
import { PartnerLifecycleAccount, PartnerLifecycleResponse, PartnerLifecycleSite } from "./onboarding.mjs";
|
|
4
|
+
import { 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, 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 } from "./types.mjs";
|
|
5
|
+
import { analyticsEndpointSchemas } from "./schemas.mjs";
|
|
4
6
|
export { type AddPartnerTeamMemberParams, type AnalysisSourcesOptions, type AnalysisSourcesResponse, type BackfillRange, type BackfillResponse, type BindPartnerSiteTeamParams, type BindPartnerTeamCatalogParams, type BindPartnerTeamCatalogResponse, type BuilderStateWire, type BulkRegisterPartnerSiteResult, type BulkRegisterPartnerSitesParams, type BulkRegisterPartnerSitesResponse, type CanonicalWebhookEventType, type ColumnDef, type ColumnType, type CountriesResponse, type CountryRow, type CreatePartnerTeamParams, type CreateWebhookEnvelopeOptions, type DataDetailOptions, type DataQueryOptions, type DeletePartnerUserResponse, type Dimension, type Filter, type Grain, type GscAddAndVerifyResponse, type GscApiRange, type GscComparisonFilter, type GscRowQueryMeta, type GscRowQueryResponse, type GscSearchType, type GscVerificationDnsRecord, type GscVerificationMethod, type GscVerificationRequest, type GscVerificationSite, type GscVerificationTokenResponse, type GscdumpAnalysisBundleParams, type GscdumpAnalysisBundleResponse, type GscdumpAnalysisParams, type GscdumpAnalysisPreset, type GscdumpAnalysisResponse, type GscdumpAnalysisSourcesResponse, type GscdumpAvailableSite, type GscdumpCanonicalMismatchRow, type GscdumpCanonicalMismatchesResponse, type GscdumpDataDetailResponse, type GscdumpDataResponse, type GscdumpDataRow, type GscdumpHealthResponse, type GscdumpIndexPercentResponse, type GscdumpIndexPercentSitemap, type GscdumpIndexPercentTrendPoint, type GscdumpIndexingDiagnosticsResponse, type GscdumpIndexingInspectRateLimited, type GscdumpIndexingInspectRequest, type GscdumpIndexingInspectResponse, type GscdumpIndexingInspectResult, type GscdumpIndexingIssueSeverity, type GscdumpIndexingResponse, type GscdumpIndexingTrendPoint, type GscdumpIndexingUrl, type GscdumpIndexingUrlStatus, type GscdumpIndexingUrlsResponse, type GscdumpInvisibleUrlRow, type GscdumpKeywordSparklinesParams, type GscdumpKeywordSparklinesResponse, type GscdumpMeta, type GscdumpOrphanPageRow, type GscdumpPageTrendParams, type GscdumpPageTrendResponse, type GscdumpPerSitemapHistoryEntry, type GscdumpPermissionRecovery, type GscdumpQueryTrendParams, type GscdumpQueryTrendResponse, type GscdumpRichResultItem, type GscdumpSiteIntIdCrosswalkEntry, type GscdumpSiteIntIdCrosswalkResponse, type GscdumpSiteRegistration, type GscdumpSiteReportResponse, type GscdumpSitemap, type GscdumpSitemapChangesResponse, type GscdumpSitemapHistory, type GscdumpSitemapMembershipParams, type GscdumpSitemapMembershipResponse, type GscdumpSitemapMembershipUnavailableReason, type GscdumpSitemapMembershipUrl, type GscdumpSitemapsResponse, type GscdumpSyncJobItem, type GscdumpSyncJobStatus, type GscdumpSyncJobsQueueCounts, type GscdumpSyncJobsResponse, type GscdumpSyncProgressDateStatus, type GscdumpSyncProgressPhaseCounts, type GscdumpSyncProgressResponse, type GscdumpSyncProgressSite, type GscdumpSyncStatusResponse, type GscdumpTeamCatalogRef, type GscdumpTeamMemberRow, type GscdumpTeamRow, type GscdumpTopAssociationParams, type GscdumpTopAssociationResponse, type GscdumpTotals, type GscdumpUserMeResponse, type GscdumpUserRegistration, type GscdumpUserSettings, type GscdumpUserSite, type GscdumpUserStatus, type GscdumpUserTokenUpdate, type IndexingDiagnostics, type IndexingDiagnosticsParams, type IndexingInspectRateLimit, type IndexingInspectRateLimited, type IndexingInspectRequest, type IndexingInspectResponse, type IndexingInspectResult, type IndexingIssue, type IndexingIssueSeverity, type IndexingUrlRow, type IndexingUrlStatus, type IndexingUrlsParams, type IndexingUrlsResponse, type InspectionHistoryRecord, type InspectionHistoryResponse, type InspectionIndex, type InspectionRecordRaw, type Metric, type PartnerLifecycleAccount, type PartnerLifecycleResponse, type PartnerLifecycleSite, type PartnerSitemapAction, type PartnerSitemapActionResponse, type PartnerWebhookData, type PartnerWebhookHeaders, type RegisterPartnerSiteParams, type RegisterPartnerUserParams, type RollupEnvelope, type Row, type ScheduleState, type SearchAppearanceResponse, type SearchAppearanceRow, type SearchTypeOptions, type SiteListItem, type SitemapAddedRow, type SitemapChangesResponse, type SitemapHistoryRecord, type SitemapHistoryResponse, type SitemapIndex, type SitemapRemovedRow, type SourceInfoOptions, type SourceInfoResponse, type TableName, type TableSchema, type TenantCtx, type UpdatePartnerUserTokensParams, type WebhookEnvelope, type WebhookEventType, type WhoamiResponse, analyticsEndpointSchemas, analyticsEndpoints, analyticsRoutes };
|
package/dist/analytics.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { analyticsEndpoints } from "./
|
|
1
|
+
import { analyticsRoutes } from "./routes.mjs";
|
|
2
|
+
import { analyticsEndpointSchemas } from "./schemas.mjs";
|
|
3
|
+
import { analyticsEndpoints } from "./endpoints.mjs";
|
|
4
4
|
export { analyticsEndpointSchemas, analyticsEndpoints, analyticsRoutes };
|
package/dist/archetypes.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuilderStateWire, Dimension, GscSearchType, Metric } from "./
|
|
1
|
+
import { BuilderStateWire, Dimension, GscSearchType, Metric } from "./types.mjs";
|
|
2
2
|
type QueryArchetype = 'site-daily-timeseries' | 'entity-daily-timeseries' | 'entity-daily-sparkline' | 'top-n-breakdown' | 'single-row-lookup' | 'multi-series-stacked-daily' | 'two-dimension-detail' | 'arbitrary-sql' | 'aux-cloud-only';
|
|
3
3
|
type ArchetypeExecutionClass = 'r2-sql' | 'r2-sql-resolved' | 'duckdb' | 'cloud-only';
|
|
4
4
|
declare const ARCHETYPE_EXECUTION_CLASS: Record<QueryArchetype, ArchetypeExecutionClass>;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { GscSearchType } from "./types.mjs";
|
|
2
|
+
/** The 6 Iceberg fact tables — string-typed here to avoid an engine dep. */
|
|
3
|
+
type FileResolutionTable = 'pages' | 'queries' | 'countries' | 'page_queries' | 'dates' | 'search_appearance' | 'search_appearance_pages' | 'search_appearance_queries' | 'search_appearance_page_queries';
|
|
4
|
+
/** Request query params for `GET /api/sites/[siteId]/analysis-sources`. */
|
|
5
|
+
interface FileResolutionRequest {
|
|
6
|
+
/** `YYYY-MM-DD` inclusive. Required — no date range = no resolution. */
|
|
7
|
+
start: string;
|
|
8
|
+
/** `YYYY-MM-DD` inclusive. */
|
|
9
|
+
end: string;
|
|
10
|
+
searchType?: GscSearchType;
|
|
11
|
+
/**
|
|
12
|
+
* Restrict resolution to these tables. Omitted = all 5. The archetype the
|
|
13
|
+
* caller intends determines which tables it needs.
|
|
14
|
+
*/
|
|
15
|
+
tables?: FileResolutionTable[];
|
|
16
|
+
/** Client-derived browser attachment byte ceiling. */
|
|
17
|
+
maxBytes?: number;
|
|
18
|
+
/** Client-derived browser attachment row ceiling. */
|
|
19
|
+
maxRows?: number;
|
|
20
|
+
/** Client-derived per-table parquet file-count ceiling. */
|
|
21
|
+
maxFiles?: number;
|
|
22
|
+
/**
|
|
23
|
+
* The archetype the caller will run. Lets the endpoint route the 2
|
|
24
|
+
* window-function archetypes straight to the server tail even when the
|
|
25
|
+
* data would be browser-eligible by size.
|
|
26
|
+
*/
|
|
27
|
+
archetype?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* One compacted Iceberg parquet data file the browser should fetch into OPFS.
|
|
31
|
+
*/
|
|
32
|
+
interface ResolvedParquetFile {
|
|
33
|
+
/**
|
|
34
|
+
* Same-origin URL (`/api/r2-data/<key>?...`) carrying a signed size hint
|
|
35
|
+
* and a short-lived exact-key access token. Stable for the file's lifetime
|
|
36
|
+
* (content-addressed).
|
|
37
|
+
*/
|
|
38
|
+
url: string;
|
|
39
|
+
/** Byte size — drives the browser-eligibility sum and OPFS quota planning. */
|
|
40
|
+
bytes: number;
|
|
41
|
+
/**
|
|
42
|
+
* Opaque content-stable identifier for this parquet file. Two requests for
|
|
43
|
+
* the same bytes MUST return the same `contentHash`; any change in bytes
|
|
44
|
+
* MUST yield a different one. The OPFS cache uses this as the file's
|
|
45
|
+
* address (encoded into the cache filename) — it is NOT required to be a
|
|
46
|
+
* SHA-256.
|
|
47
|
+
*
|
|
48
|
+
* In practice the server returns the Iceberg `data_file.file_path` object
|
|
49
|
+
* key, which is UUID-derived and content-addressed by convention.
|
|
50
|
+
*/
|
|
51
|
+
contentHash: string;
|
|
52
|
+
/** Row count, for eligibility accounting + diagnostics. */
|
|
53
|
+
rowCount: number;
|
|
54
|
+
}
|
|
55
|
+
/** Per-table resolution result. */
|
|
56
|
+
interface ResolvedTable {
|
|
57
|
+
table: FileResolutionTable;
|
|
58
|
+
/**
|
|
59
|
+
* `'browser'` — `files` is populated; the browser downloads + attaches.
|
|
60
|
+
* `'server'` — this `(site, table)` exceeds the eligibility ceiling;
|
|
61
|
+
* `files` is empty and queries route to the server tail.
|
|
62
|
+
*/
|
|
63
|
+
mode: 'browser' | 'server';
|
|
64
|
+
/** Compacted Iceberg data files. Empty when `mode === 'server'`. */
|
|
65
|
+
files: ResolvedParquetFile[];
|
|
66
|
+
/**
|
|
67
|
+
* Recent-window overlay parquet — the non-stable tail (the freshest days the
|
|
68
|
+
* ingest stability cutoff excludes from the lake), materialized out-of-band at
|
|
69
|
+
* `_recent_overlay/{site}/{searchType}/{table}.parquet`. When present, the
|
|
70
|
+
* browser unions it with an anti-join dedup (the lake wins on any shared day;
|
|
71
|
+
* the overlay supplies only days the lake lacks) so the freshest days serve
|
|
72
|
+
* from the overlay instead of returning 0. Absent (`undefined`) when no
|
|
73
|
+
* overlay exists for this `(site, searchType, table)` or for `mode: 'server'`.
|
|
74
|
+
*
|
|
75
|
+
* The overlay is OVERWRITTEN in place each sync, so its `contentHash` MUST
|
|
76
|
+
* change whenever the bytes change (the server derives it from the R2 object
|
|
77
|
+
* etag) — otherwise the OPFS cache would serve a stale overlay. The enclosing
|
|
78
|
+
* `FileResolutionResponse.snapshotVersion` folds the overlay hash in for the
|
|
79
|
+
* same reason (it gates browser re-attach).
|
|
80
|
+
*/
|
|
81
|
+
overlay?: ResolvedParquetFile;
|
|
82
|
+
/** Total bytes across `files` — compared against the ceiling. */
|
|
83
|
+
totalBytes: number;
|
|
84
|
+
/** Total rows across `files`. */
|
|
85
|
+
totalRows: number;
|
|
86
|
+
}
|
|
87
|
+
/** Server-tail directive — how an ineligible `(site, table)` is queried. */
|
|
88
|
+
interface ServerTailDirective {
|
|
89
|
+
/**
|
|
90
|
+
* `'r2-sql'` — server runs the query via R2 SQL over the Iceberg table.
|
|
91
|
+
* `'duckdb'` — server runs DuckDB-over-Iceberg-files (caller-supplied SQL,
|
|
92
|
+
* or a query R2 SQL still can't run — see `dispatcher.ts` for the current
|
|
93
|
+
* escalation rules, re-verified against real R2 SQL 2026-07-03; R2 SQL now
|
|
94
|
+
* supports window functions, `COUNT(DISTINCT)`, JOINs and CTEs, so the split
|
|
95
|
+
* is no longer a fixed "window functions → duckdb" rule).
|
|
96
|
+
*/
|
|
97
|
+
engine: 'r2-sql' | 'duckdb';
|
|
98
|
+
/** Endpoint the consumer POSTs the archetype query to. */
|
|
99
|
+
endpoint: string;
|
|
100
|
+
}
|
|
101
|
+
/** Response body of the file-resolution endpoint. */
|
|
102
|
+
interface FileResolutionResponse {
|
|
103
|
+
siteId: string;
|
|
104
|
+
searchType: GscSearchType;
|
|
105
|
+
range: {
|
|
106
|
+
start: string;
|
|
107
|
+
end: string;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Stable hash over the resolved file set. The browser re-attaches only when
|
|
111
|
+
* this changes (new compaction landed). Replaces the old `manifestVersion`.
|
|
112
|
+
*/
|
|
113
|
+
snapshotVersion: string;
|
|
114
|
+
generatedAt: string;
|
|
115
|
+
/** Per-table resolution. */
|
|
116
|
+
tables: ResolvedTable[];
|
|
117
|
+
/**
|
|
118
|
+
* Present iff at least one table resolved to `mode: 'server'`. Tells the
|
|
119
|
+
* consumer how to route the server-tail queries for those tables.
|
|
120
|
+
*/
|
|
121
|
+
serverTail?: ServerTailDirective;
|
|
122
|
+
/**
|
|
123
|
+
* The per-(site,table) browser-eligibility ceiling in effect, echoed so the
|
|
124
|
+
* consumer can show "X is too large for local analysis" UX without
|
|
125
|
+
* hard-coding the threshold.
|
|
126
|
+
*/
|
|
127
|
+
eligibilityCeiling: {
|
|
128
|
+
maxBytes: number;
|
|
129
|
+
maxRows: number;
|
|
130
|
+
maxFiles: number;
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
/** One canonical query-dimension sidecar object for browser attachment. */
|
|
134
|
+
interface QueryDimSourceFile {
|
|
135
|
+
url: string;
|
|
136
|
+
bytes: number;
|
|
137
|
+
contentHash: string;
|
|
138
|
+
}
|
|
139
|
+
/** Response from the versioned query-dimension sidecar resolver. */
|
|
140
|
+
interface QueryDimSourceResponse {
|
|
141
|
+
file: QueryDimSourceFile | null;
|
|
142
|
+
}
|
|
143
|
+
/** Multi-site file-resolution response. Inaccessible sites are omitted. */
|
|
144
|
+
interface BulkFileResolutionResponse {
|
|
145
|
+
generatedAt: string;
|
|
146
|
+
siteCount: number;
|
|
147
|
+
maxSites: number;
|
|
148
|
+
results: Record<string, FileResolutionResponse>;
|
|
149
|
+
}
|
|
150
|
+
/** Request query for the multi-site file resolver. */
|
|
151
|
+
interface BulkFileResolutionRequest extends FileResolutionRequest {
|
|
152
|
+
/** Public site ids to resolve. Partner callers must supply this list. */
|
|
153
|
+
siteIds?: string[];
|
|
154
|
+
}
|
|
155
|
+
export { BulkFileResolutionRequest, BulkFileResolutionResponse, FileResolutionRequest, FileResolutionResponse, FileResolutionTable, QueryDimSourceFile, QueryDimSourceResponse, ResolvedParquetFile, ResolvedTable, ServerTailDirective };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { analyticsRoutes, partnerRoutes } from "./routes.mjs";
|
|
2
|
+
import { BulkFileResolutionRequest, BulkFileResolutionResponse, FileResolutionRequest, FileResolutionResponse, FileResolutionTable, QueryDimSourceFile, QueryDimSourceResponse, ResolvedParquetFile, ResolvedTable, ServerTailDirective } from "./file-resolution.mjs";
|
|
3
|
+
import { AccountNextAction, AccountStatus, AnalyticsNextAction, AnalyticsStatus, GSCDUMP_ONBOARDING_CONTRACT_VERSION, GSCDUMP_OPTIONAL_INDEXING_SCOPE, GSCDUMP_REQUIRED_ANALYTICS_SCOPE, GSCDUMP_WRITE_ANALYTICS_SCOPE, IndexingNextAction, IndexingStatus, LifecycleError, LifecycleErrorCode, LifecycleProgress, LifecycleWebhookEnvelope, LifecycleWebhookEvent, PartnerLifecycleAccount, PartnerLifecycleResponse, PartnerLifecycleSite, PropertyNextAction, PropertyStatus, QuerySourceMode, SitemapNextAction, SitemapStatus, accountNextActions, accountStatuses, analyticsNextActions, analyticsStatuses, hasOptionalIndexingScope, hasRequiredAnalyticsScope, indexingNextActions, indexingStatuses, lifecycleErrorCodes, parseGrantedScopes, propertyNextActions, propertyStatuses, querySourceModes, sitemapNextActions, sitemapStatuses } from "./onboarding.mjs";
|
|
4
|
+
import { 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, 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 } from "./types.mjs";
|
|
5
|
+
import { 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 } from "./schemas.mjs";
|
|
3
6
|
import { ARCHETYPE_EXECUTION_CLASS, ArbitrarySqlQuery, ArchetypeExecutionClass, ArchetypeFacet, ArchetypeQuery, ArchetypeQueryBase, ArchetypeResult, ArchetypeResultRow, ArchetypeResultSource, AuxCloudOnlyQuery, DateRange, EntityDailySparklineQuery, EntityDailyTimeseriesQuery, MultiSeriesStackedDailyQuery, QueryArchetype, ResolvedArchetypeQuery, SingleRowLookupQuery, SiteDailyTimeseriesQuery, TopNBreakdownOptions, TopNBreakdownQuery, TwoDimensionDetailOptions, TwoDimensionDetailQuery, WireDateRange, arbitrarySql, entityDailySparkline, entityDailyTimeseries, multiSeriesStackedDaily, singleRowLookup, siteDailyTimeseries, topNBreakdown, twoDimensionDetail } from "./archetypes.mjs";
|
|
4
|
-
import { CANONICAL_WEBHOOK_EVENTS, VALID_WEBHOOK_EVENTS, WEBHOOK_CONTRACT_VERSION, WEBHOOK_CONTRACT_VERSION_HEADER, WEBHOOK_DELIVERY_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER } from "./
|
|
7
|
+
import { CANONICAL_WEBHOOK_EVENTS, VALID_WEBHOOK_EVENTS, WEBHOOK_CONTRACT_VERSION, WEBHOOK_CONTRACT_VERSION_HEADER, WEBHOOK_DELIVERY_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER } from "./webhook-constants.mjs";
|
|
5
8
|
export { ARCHETYPE_EXECUTION_CLASS, AccountNextAction, AccountStatus, type AddPartnerTeamMemberParams, type AnalysisSourcesOptions, type AnalysisSourcesResponse, AnalyticsNextAction, AnalyticsStatus, ArbitrarySqlQuery, ArchetypeExecutionClass, ArchetypeFacet, ArchetypeQuery, ArchetypeQueryBase, ArchetypeResult, ArchetypeResultRow, ArchetypeResultSource, AuxCloudOnlyQuery, type BackfillRange, type BackfillResponse, type BindPartnerSiteTeamParams, type BindPartnerTeamCatalogParams, type BindPartnerTeamCatalogResponse, type BuilderStateWire, type BulkFileResolutionRequest, type BulkFileResolutionResponse, type BulkRegisterPartnerSiteResult, type BulkRegisterPartnerSitesParams, type BulkRegisterPartnerSitesResponse, CANONICAL_WEBHOOK_EVENTS, type CanonicalWebhookEventType, type ColumnDef, type ColumnType, type CountriesResponse, type CountryRow, type CreatePartnerTeamParams, type CreateWebhookEnvelopeOptions, type DataDetailOptions, type DataQueryOptions, DateRange, type DeletePartnerUserResponse, type Dimension, EntityDailySparklineQuery, EntityDailyTimeseriesQuery, type FileResolutionRequest, type FileResolutionResponse, type FileResolutionTable, type Filter, GSCDUMP_ONBOARDING_CONTRACT_VERSION, GSCDUMP_OPTIONAL_INDEXING_SCOPE, GSCDUMP_REQUIRED_ANALYTICS_SCOPE, GSCDUMP_WRITE_ANALYTICS_SCOPE, type Grain, type GscAddAndVerifyResponse, type GscApiRange, type GscComparisonFilter, type GscRowQueryMeta, type GscRowQueryResponse, type GscSearchType, type GscVerificationDnsRecord, type GscVerificationMethod, type GscVerificationRequest, type GscVerificationSite, type GscVerificationTokenResponse, type GscdumpAnalysisBundleParams, type GscdumpAnalysisBundleResponse, type GscdumpAnalysisParams, type GscdumpAnalysisPreset, type GscdumpAnalysisResponse, type GscdumpAnalysisSourcesResponse, type GscdumpAvailableSite, type GscdumpCanonicalMismatchRow, type GscdumpCanonicalMismatchesResponse, type GscdumpDataDetailResponse, type GscdumpDataResponse, type GscdumpDataRow, type GscdumpHealthResponse, type GscdumpIndexPercentResponse, type GscdumpIndexPercentSitemap, type GscdumpIndexPercentTrendPoint, type GscdumpIndexingDiagnosticsResponse, type GscdumpIndexingInspectRateLimited, type GscdumpIndexingInspectRequest, type GscdumpIndexingInspectResponse, type GscdumpIndexingInspectResult, type GscdumpIndexingIssueSeverity, type GscdumpIndexingResponse, type GscdumpIndexingTrendPoint, type GscdumpIndexingUrl, type GscdumpIndexingUrlStatus, type GscdumpIndexingUrlsResponse, type GscdumpInvisibleUrlRow, type GscdumpKeywordSparklinesParams, type GscdumpKeywordSparklinesResponse, type GscdumpMeta, type GscdumpOrphanPageRow, type GscdumpPageTrendParams, type GscdumpPageTrendResponse, type GscdumpPerSitemapHistoryEntry, type GscdumpPermissionRecovery, type GscdumpQueryTrendParams, type GscdumpQueryTrendResponse, type GscdumpRichResultItem, type GscdumpSiteIntIdCrosswalkEntry, type GscdumpSiteIntIdCrosswalkResponse, type GscdumpSiteRegistration, type GscdumpSiteReportResponse, type GscdumpSitemap, type GscdumpSitemapChangesResponse, type GscdumpSitemapHistory, type GscdumpSitemapMembershipParams, type GscdumpSitemapMembershipResponse, type GscdumpSitemapMembershipUnavailableReason, type GscdumpSitemapMembershipUrl, type GscdumpSitemapsResponse, type GscdumpSyncJobItem, type GscdumpSyncJobStatus, type GscdumpSyncJobsQueueCounts, type GscdumpSyncJobsResponse, type GscdumpSyncProgressDateStatus, type GscdumpSyncProgressPhaseCounts, type GscdumpSyncProgressResponse, type GscdumpSyncProgressSite, type GscdumpSyncStatusResponse, type GscdumpTeamCatalogRef, type GscdumpTeamMemberRow, type GscdumpTeamRow, type GscdumpTopAssociationParams, type GscdumpTopAssociationResponse, type GscdumpTotals, type GscdumpUserMeResponse, type GscdumpUserRegistration, type GscdumpUserSettings, type GscdumpUserSite, type GscdumpUserStatus, type GscdumpUserTokenUpdate, type IndexingDiagnostics, type IndexingDiagnosticsParams, type IndexingInspectRateLimit, type IndexingInspectRateLimited, type IndexingInspectRequest, type IndexingInspectResponse, type IndexingInspectResult, type IndexingIssue, type IndexingIssueSeverity, IndexingNextAction, IndexingStatus, type IndexingUrlRow, type IndexingUrlStatus, type IndexingUrlsParams, type IndexingUrlsResponse, type InspectionHistoryRecord, type InspectionHistoryResponse, type InspectionIndex, type InspectionRecordRaw, LifecycleError, LifecycleErrorCode, LifecycleProgress, LifecycleWebhookEnvelope, LifecycleWebhookEvent, type Metric, MultiSeriesStackedDailyQuery, PartnerLifecycleAccount, PartnerLifecycleResponse, PartnerLifecycleSite, type PartnerSitemapAction, type PartnerSitemapActionResponse, type PartnerWebhookData, type PartnerWebhookHeaders, PropertyNextAction, PropertyStatus, QueryArchetype, type QueryDimSourceFile, type QueryDimSourceResponse, QuerySourceMode, type RegisterPartnerSiteParams, type RegisterPartnerUserParams, ResolvedArchetypeQuery, type ResolvedParquetFile, type ResolvedTable, type RollupEnvelope, type Row, SEARCH_TYPE_CAPABILITIES, type ScheduleState, type SearchAppearanceResponse, type SearchAppearanceRow, type SearchTypeOptions, type ServerTailDirective, SingleRowLookupQuery, SiteDailyTimeseriesQuery, type SiteListItem, type SitemapAddedRow, type SitemapChangesResponse, type SitemapHistoryRecord, type SitemapHistoryResponse, type SitemapIndex, SitemapNextAction, type SitemapRemovedRow, SitemapStatus, type SourceInfoOptions, type SourceInfoResponse, type TableName, type TableSchema, type TenantCtx, TopNBreakdownOptions, TopNBreakdownQuery, TwoDimensionDetailOptions, TwoDimensionDetailQuery, type UpdatePartnerUserTokensParams, VALID_WEBHOOK_EVENTS, WEBHOOK_CONTRACT_VERSION, WEBHOOK_CONTRACT_VERSION_HEADER, WEBHOOK_DELIVERY_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, type WebhookEnvelope, type WebhookEventType, type WhoamiResponse, WireDateRange, accountNextActions, accountStatuses, addPartnerTeamMemberSchema, analyticsEndpointSchemas, analyticsNextActions, analyticsRoutes, analyticsStatuses, arbitrarySql, backfillRangeSchema, backfillResponseSchema, bindPartnerSiteTeamSchema, bindPartnerTeamCatalogResponseSchema, bindPartnerTeamCatalogSchema, builderStateSchema, bulkFileResolutionResponseSchema, bulkRegisterPartnerSitesResponseSchema, bulkRegisterPartnerSitesSchema, canonicalWebhookEventTypeSchema, countriesResponseSchema, countryRowSchema, createPartnerTeamSchema, dataDetailOptionsSchema, dataQueryOptionsSchema, entityDailySparkline, entityDailyTimeseries, 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, hasOptionalIndexingScope, hasRequiredAnalyticsScope, indexingDiagnosticsParamsSchema, indexingDiagnosticsSchema, indexingInspectAnyResponseSchema, indexingInspectRateLimitedSchema, indexingInspectRequestSchema, indexingInspectResponseSchema, indexingInspectResultSchema, indexingIssueSchema, indexingNextActions, indexingStatuses, indexingUrlRowSchema, indexingUrlsParamsSchema, indexingUrlsResponseSchema, inspectionHistoryRecordSchema, inspectionHistoryResponseSchema, inspectionIndexSchema, inspectionRecordRawSchema, lifecycleErrorCodes, lifecycleErrorSchema, lifecycleProgressSchema, multiSeriesStackedDaily, parseGrantedScopes, partnerControlEndpointSchemas, partnerEndpointSchemas, partnerLifecycleAccountSchema, partnerLifecycleResponseSchema, partnerLifecycleSiteSchema, partnerRealtimeEventSchema, partnerRoutes, partnerSiteTeamBindingResponseSchema, partnerSitemapActionResponseSchema, partnerSitemapActionSchema, partnerTeamCreatedResponseSchema, partnerTeamDeletedResponseSchema, partnerTeamMemberAddedResponseSchema, partnerTeamMemberRemovedResponseSchema, partnerTeamMemberRoleResponseSchema, partnerTeamMembersResponseSchema, partnerTeamRenamedResponseSchema, partnerWebhookDataSchema, partnerWebhookEnvelopeSchema, propertyNextActions, propertyStatuses, queryDimSourceResponseSchema, querySourceModes, registerPartnerSiteSchema, registerPartnerUserSchema, renamePartnerTeamSchema, rollupEnvelopeSchema, scheduleStateSchema, searchAppearanceResponseSchema, searchAppearanceRowSchema, searchTypeSchema, searchTypeSupportsDimensions, searchTypeSupportsQueries, singleRowLookup, siteDailyTimeseries, siteIntIdCrosswalkResponseSchema, siteListItemSchema, sitemapChangesResponseSchema, sitemapHistoryRecordSchema, sitemapHistoryResponseSchema, sitemapIndexSchema, sitemapNextActions, sitemapStatuses, sourceInfoResponseSchema, teamCatalogRefSchema, topNBreakdown, twoDimensionDetail, updatePartnerUserTokensSchema, whoamiResponseSchema };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ARCHETYPE_EXECUTION_CLASS, arbitrarySql, entityDailySparkline, entityDailyTimeseries, multiSeriesStackedDaily, singleRowLookup, siteDailyTimeseries, topNBreakdown, twoDimensionDetail } from "./archetypes.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { analyticsRoutes, partnerRoutes } from "./
|
|
2
|
+
import { GSCDUMP_ONBOARDING_CONTRACT_VERSION, GSCDUMP_OPTIONAL_INDEXING_SCOPE, GSCDUMP_REQUIRED_ANALYTICS_SCOPE, GSCDUMP_WRITE_ANALYTICS_SCOPE, accountNextActions, accountStatuses, analyticsNextActions, analyticsStatuses, hasOptionalIndexingScope, hasRequiredAnalyticsScope, indexingNextActions, indexingStatuses, lifecycleErrorCodes, parseGrantedScopes, propertyNextActions, propertyStatuses, querySourceModes, sitemapNextActions, sitemapStatuses } from "./onboarding.mjs";
|
|
3
|
+
import { analyticsRoutes, partnerRoutes } from "./routes.mjs";
|
|
4
|
+
import { CANONICAL_WEBHOOK_EVENTS, VALID_WEBHOOK_EVENTS, WEBHOOK_CONTRACT_VERSION, WEBHOOK_CONTRACT_VERSION_HEADER, WEBHOOK_DELIVERY_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER } from "./webhook-constants.mjs";
|
|
5
|
+
import { 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 } from "./schemas.mjs";
|
|
4
6
|
export { ARCHETYPE_EXECUTION_CLASS, CANONICAL_WEBHOOK_EVENTS, GSCDUMP_ONBOARDING_CONTRACT_VERSION, GSCDUMP_OPTIONAL_INDEXING_SCOPE, GSCDUMP_REQUIRED_ANALYTICS_SCOPE, GSCDUMP_WRITE_ANALYTICS_SCOPE, SEARCH_TYPE_CAPABILITIES, VALID_WEBHOOK_EVENTS, WEBHOOK_CONTRACT_VERSION, WEBHOOK_CONTRACT_VERSION_HEADER, WEBHOOK_DELIVERY_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, accountNextActions, accountStatuses, addPartnerTeamMemberSchema, analyticsEndpointSchemas, analyticsNextActions, analyticsRoutes, analyticsStatuses, arbitrarySql, backfillRangeSchema, backfillResponseSchema, bindPartnerSiteTeamSchema, bindPartnerTeamCatalogResponseSchema, bindPartnerTeamCatalogSchema, builderStateSchema, bulkFileResolutionResponseSchema, bulkRegisterPartnerSitesResponseSchema, bulkRegisterPartnerSitesSchema, canonicalWebhookEventTypeSchema, countriesResponseSchema, countryRowSchema, createPartnerTeamSchema, dataDetailOptionsSchema, dataQueryOptionsSchema, entityDailySparkline, entityDailyTimeseries, 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, hasOptionalIndexingScope, hasRequiredAnalyticsScope, indexingDiagnosticsParamsSchema, indexingDiagnosticsSchema, indexingInspectAnyResponseSchema, indexingInspectRateLimitedSchema, indexingInspectRequestSchema, indexingInspectResponseSchema, indexingInspectResultSchema, indexingIssueSchema, indexingNextActions, indexingStatuses, indexingUrlRowSchema, indexingUrlsParamsSchema, indexingUrlsResponseSchema, inspectionHistoryRecordSchema, inspectionHistoryResponseSchema, inspectionIndexSchema, inspectionRecordRawSchema, lifecycleErrorCodes, lifecycleErrorSchema, lifecycleProgressSchema, multiSeriesStackedDaily, parseGrantedScopes, partnerControlEndpointSchemas, partnerEndpointSchemas, partnerLifecycleAccountSchema, partnerLifecycleResponseSchema, partnerLifecycleSiteSchema, partnerRealtimeEventSchema, partnerRoutes, partnerSiteTeamBindingResponseSchema, partnerSitemapActionResponseSchema, partnerSitemapActionSchema, partnerTeamCreatedResponseSchema, partnerTeamDeletedResponseSchema, partnerTeamMemberAddedResponseSchema, partnerTeamMemberRemovedResponseSchema, partnerTeamMemberRoleResponseSchema, partnerTeamMembersResponseSchema, partnerTeamRenamedResponseSchema, partnerWebhookDataSchema, partnerWebhookEnvelopeSchema, propertyNextActions, propertyStatuses, queryDimSourceResponseSchema, querySourceModes, registerPartnerSiteSchema, registerPartnerUserSchema, renamePartnerTeamSchema, rollupEnvelopeSchema, scheduleStateSchema, searchAppearanceResponseSchema, searchAppearanceRowSchema, searchTypeSchema, searchTypeSupportsDimensions, searchTypeSupportsQueries, singleRowLookup, siteDailyTimeseries, siteIntIdCrosswalkResponseSchema, siteListItemSchema, sitemapChangesResponseSchema, sitemapHistoryRecordSchema, sitemapHistoryResponseSchema, sitemapIndexSchema, sitemapNextActions, sitemapStatuses, sourceInfoResponseSchema, teamCatalogRefSchema, topNBreakdown, twoDimensionDetail, updatePartnerUserTokensSchema, whoamiResponseSchema };
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
declare const GSCDUMP_ONBOARDING_CONTRACT_VERSION: '2026-05-11';
|
|
2
|
+
declare const GSCDUMP_REQUIRED_ANALYTICS_SCOPE: 'https://www.googleapis.com/auth/webmasters.readonly';
|
|
3
|
+
declare const GSCDUMP_WRITE_ANALYTICS_SCOPE: 'https://www.googleapis.com/auth/webmasters';
|
|
4
|
+
declare const GSCDUMP_OPTIONAL_INDEXING_SCOPE: 'https://www.googleapis.com/auth/indexing';
|
|
5
|
+
type GoogleScopesInput = string | readonly string[] | null | undefined;
|
|
6
|
+
declare const accountStatuses: readonly ['disconnected', 'oauth_received', 'scope_missing', 'refresh_missing', 'db_provisioning', 'ready', 'reauth_required'];
|
|
7
|
+
declare const accountNextActions: readonly ['connect_google', 'reconnect_google', 'wait_for_provisioning', 'none'];
|
|
8
|
+
declare const propertyStatuses: readonly ['no_local_site', 'no_gsc_property', 'unverified_property', 'verified_candidate', 'registered', 'linked'];
|
|
9
|
+
declare const propertyNextActions: readonly ['create_site', 'verify_gsc_property', 'choose_property', 'register_site', 'none'];
|
|
10
|
+
declare const analyticsStatuses: readonly ['not_registered', 'queued', 'preparing', 'syncing', 'queryable_live', 'queryable_partial', 'ready', 'failed'];
|
|
11
|
+
declare const analyticsNextActions: readonly ['wait_for_sync', 'retry_sync', 'none'];
|
|
12
|
+
declare const querySourceModes: readonly ['none', 'live', 'd1', 'r2', 'mixed'];
|
|
13
|
+
declare const sitemapStatuses: readonly ['unknown', 'discovering', 'none_found', 'auto_submitted', 'syncing', 'ready', 'failed'];
|
|
14
|
+
declare const sitemapNextActions: readonly ['submit_sitemap', 'wait_for_sitemaps', 'retry_sitemaps', 'none'];
|
|
15
|
+
declare const indexingStatuses: readonly ['not_requested', 'missing_scope', 'insufficient_permission', 'waiting_for_sitemaps', 'discovering', 'checking', 'ready', 'budget_exhausted', 'no_urls', 'failed'];
|
|
16
|
+
declare const indexingNextActions: readonly ['reconnect_google', 'fix_gsc_permission', 'wait_for_sitemaps', 'wait_for_indexing', 'retry_indexing', 'none'];
|
|
17
|
+
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'];
|
|
18
|
+
type AccountStatus = typeof accountStatuses[number];
|
|
19
|
+
type AccountNextAction = typeof accountNextActions[number];
|
|
20
|
+
type PropertyStatus = typeof propertyStatuses[number];
|
|
21
|
+
type PropertyNextAction = typeof propertyNextActions[number];
|
|
22
|
+
type AnalyticsStatus = typeof analyticsStatuses[number];
|
|
23
|
+
type AnalyticsNextAction = typeof analyticsNextActions[number];
|
|
24
|
+
type QuerySourceMode = typeof querySourceModes[number];
|
|
25
|
+
type SitemapStatus = typeof sitemapStatuses[number];
|
|
26
|
+
type SitemapNextAction = typeof sitemapNextActions[number];
|
|
27
|
+
type IndexingStatus = typeof indexingStatuses[number];
|
|
28
|
+
type IndexingNextAction = typeof indexingNextActions[number];
|
|
29
|
+
type LifecycleWebhookEvent = 'user.lifecycle.changed' | 'site.lifecycle.changed' | 'site.analytics.ready' | 'site.indexing.ready' | 'site.auth.failed' | 'job.failed';
|
|
30
|
+
type LifecycleErrorCode = typeof lifecycleErrorCodes[number];
|
|
31
|
+
interface LifecycleProgress {
|
|
32
|
+
completed: number;
|
|
33
|
+
failed: number;
|
|
34
|
+
total: number;
|
|
35
|
+
percent: number;
|
|
36
|
+
}
|
|
37
|
+
interface LifecycleError {
|
|
38
|
+
code: LifecycleErrorCode;
|
|
39
|
+
message: string;
|
|
40
|
+
retryable: boolean;
|
|
41
|
+
}
|
|
42
|
+
interface PartnerLifecycleAccount {
|
|
43
|
+
status: AccountStatus;
|
|
44
|
+
grantedScopes: string[];
|
|
45
|
+
missingScopes: string[];
|
|
46
|
+
nextAction: AccountNextAction;
|
|
47
|
+
}
|
|
48
|
+
interface PartnerLifecycleSite {
|
|
49
|
+
siteId: string;
|
|
50
|
+
/** Integer alias (`user_sites.int_id`) — the int JOIN key partners denormalize into their own catalog namespaces. Nullable only for pre-0029 unbackfilled rows. */
|
|
51
|
+
intId: number | null;
|
|
52
|
+
/** Team-scoped catalog identifier (`user_sites.catalog_site_id`). Defaults to `intId` for sites without a caller-supplied catalog ID. */
|
|
53
|
+
catalogSiteId: number | null;
|
|
54
|
+
externalSiteId: string | null;
|
|
55
|
+
requestedUrl: string;
|
|
56
|
+
gscPropertyUrl: string | null;
|
|
57
|
+
permissionLevel: string | null;
|
|
58
|
+
property: {
|
|
59
|
+
status: PropertyStatus;
|
|
60
|
+
nextAction: PropertyNextAction;
|
|
61
|
+
};
|
|
62
|
+
analytics: {
|
|
63
|
+
status: AnalyticsStatus;
|
|
64
|
+
progress: LifecycleProgress;
|
|
65
|
+
queryable: boolean;
|
|
66
|
+
sourceMode: QuerySourceMode;
|
|
67
|
+
syncedRange: {
|
|
68
|
+
oldest: string | null;
|
|
69
|
+
newest: string | null;
|
|
70
|
+
};
|
|
71
|
+
nextAction: AnalyticsNextAction;
|
|
72
|
+
};
|
|
73
|
+
sitemaps: {
|
|
74
|
+
status: SitemapStatus;
|
|
75
|
+
discoveredCount: number;
|
|
76
|
+
nextAction: SitemapNextAction;
|
|
77
|
+
};
|
|
78
|
+
indexing: {
|
|
79
|
+
status: IndexingStatus;
|
|
80
|
+
eligible: boolean;
|
|
81
|
+
reason: string | null;
|
|
82
|
+
progress: LifecycleProgress;
|
|
83
|
+
nextAction: IndexingNextAction;
|
|
84
|
+
};
|
|
85
|
+
latestError: LifecycleError | null;
|
|
86
|
+
lifecycleRevision: number;
|
|
87
|
+
updatedAt: string;
|
|
88
|
+
}
|
|
89
|
+
interface PartnerLifecycleResponse {
|
|
90
|
+
contractVersion: typeof GSCDUMP_ONBOARDING_CONTRACT_VERSION;
|
|
91
|
+
userId: string;
|
|
92
|
+
partnerId: string | null;
|
|
93
|
+
currentTeamId: string | null;
|
|
94
|
+
account: PartnerLifecycleAccount;
|
|
95
|
+
sites: PartnerLifecycleSite[];
|
|
96
|
+
}
|
|
97
|
+
interface LifecycleWebhookEnvelope<TData extends Record<string, unknown> = Record<string, unknown>> {
|
|
98
|
+
contractVersion: typeof GSCDUMP_ONBOARDING_CONTRACT_VERSION;
|
|
99
|
+
deliveryId: string;
|
|
100
|
+
event: LifecycleWebhookEvent;
|
|
101
|
+
partnerId: string;
|
|
102
|
+
userId: string;
|
|
103
|
+
siteId?: string;
|
|
104
|
+
externalUserId?: string | null;
|
|
105
|
+
externalSiteId?: string | null;
|
|
106
|
+
lifecycleRevision: number;
|
|
107
|
+
occurredAt: string;
|
|
108
|
+
data: TData;
|
|
109
|
+
}
|
|
110
|
+
declare function parseGrantedScopes(scopes: GoogleScopesInput): string[];
|
|
111
|
+
declare function hasRequiredAnalyticsScope(scopes: GoogleScopesInput): boolean;
|
|
112
|
+
declare function hasOptionalIndexingScope(scopes: GoogleScopesInput): boolean;
|
|
113
|
+
export { AccountNextAction, AccountStatus, AnalyticsNextAction, AnalyticsStatus, GSCDUMP_ONBOARDING_CONTRACT_VERSION, GSCDUMP_OPTIONAL_INDEXING_SCOPE, GSCDUMP_REQUIRED_ANALYTICS_SCOPE, GSCDUMP_WRITE_ANALYTICS_SCOPE, IndexingNextAction, IndexingStatus, LifecycleError, LifecycleErrorCode, LifecycleProgress, LifecycleWebhookEnvelope, LifecycleWebhookEvent, PartnerLifecycleAccount, PartnerLifecycleResponse, PartnerLifecycleSite, PropertyNextAction, PropertyStatus, QuerySourceMode, SitemapNextAction, SitemapStatus, accountNextActions, accountStatuses, analyticsNextActions, analyticsStatuses, hasOptionalIndexingScope, hasRequiredAnalyticsScope, indexingNextActions, indexingStatuses, lifecycleErrorCodes, parseGrantedScopes, propertyNextActions, propertyStatuses, querySourceModes, sitemapNextActions, sitemapStatuses };
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
const GSCDUMP_ONBOARDING_CONTRACT_VERSION = "2026-05-11";
|
|
2
|
+
const GSCDUMP_REQUIRED_ANALYTICS_SCOPE = "https://www.googleapis.com/auth/webmasters.readonly";
|
|
3
|
+
const GSCDUMP_WRITE_ANALYTICS_SCOPE = "https://www.googleapis.com/auth/webmasters";
|
|
4
|
+
const GSCDUMP_OPTIONAL_INDEXING_SCOPE = "https://www.googleapis.com/auth/indexing";
|
|
5
|
+
const accountStatuses = [
|
|
6
|
+
"disconnected",
|
|
7
|
+
"oauth_received",
|
|
8
|
+
"scope_missing",
|
|
9
|
+
"refresh_missing",
|
|
10
|
+
"db_provisioning",
|
|
11
|
+
"ready",
|
|
12
|
+
"reauth_required"
|
|
13
|
+
];
|
|
14
|
+
const accountNextActions = [
|
|
15
|
+
"connect_google",
|
|
16
|
+
"reconnect_google",
|
|
17
|
+
"wait_for_provisioning",
|
|
18
|
+
"none"
|
|
19
|
+
];
|
|
20
|
+
const propertyStatuses = [
|
|
21
|
+
"no_local_site",
|
|
22
|
+
"no_gsc_property",
|
|
23
|
+
"unverified_property",
|
|
24
|
+
"verified_candidate",
|
|
25
|
+
"registered",
|
|
26
|
+
"linked"
|
|
27
|
+
];
|
|
28
|
+
const propertyNextActions = [
|
|
29
|
+
"create_site",
|
|
30
|
+
"verify_gsc_property",
|
|
31
|
+
"choose_property",
|
|
32
|
+
"register_site",
|
|
33
|
+
"none"
|
|
34
|
+
];
|
|
35
|
+
const analyticsStatuses = [
|
|
36
|
+
"not_registered",
|
|
37
|
+
"queued",
|
|
38
|
+
"preparing",
|
|
39
|
+
"syncing",
|
|
40
|
+
"queryable_live",
|
|
41
|
+
"queryable_partial",
|
|
42
|
+
"ready",
|
|
43
|
+
"failed"
|
|
44
|
+
];
|
|
45
|
+
const analyticsNextActions = [
|
|
46
|
+
"wait_for_sync",
|
|
47
|
+
"retry_sync",
|
|
48
|
+
"none"
|
|
49
|
+
];
|
|
50
|
+
const querySourceModes = [
|
|
51
|
+
"none",
|
|
52
|
+
"live",
|
|
53
|
+
"d1",
|
|
54
|
+
"r2",
|
|
55
|
+
"mixed"
|
|
56
|
+
];
|
|
57
|
+
const sitemapStatuses = [
|
|
58
|
+
"unknown",
|
|
59
|
+
"discovering",
|
|
60
|
+
"none_found",
|
|
61
|
+
"auto_submitted",
|
|
62
|
+
"syncing",
|
|
63
|
+
"ready",
|
|
64
|
+
"failed"
|
|
65
|
+
];
|
|
66
|
+
const sitemapNextActions = [
|
|
67
|
+
"submit_sitemap",
|
|
68
|
+
"wait_for_sitemaps",
|
|
69
|
+
"retry_sitemaps",
|
|
70
|
+
"none"
|
|
71
|
+
];
|
|
72
|
+
const indexingStatuses = [
|
|
73
|
+
"not_requested",
|
|
74
|
+
"missing_scope",
|
|
75
|
+
"insufficient_permission",
|
|
76
|
+
"waiting_for_sitemaps",
|
|
77
|
+
"discovering",
|
|
78
|
+
"checking",
|
|
79
|
+
"ready",
|
|
80
|
+
"budget_exhausted",
|
|
81
|
+
"no_urls",
|
|
82
|
+
"failed"
|
|
83
|
+
];
|
|
84
|
+
const indexingNextActions = [
|
|
85
|
+
"reconnect_google",
|
|
86
|
+
"fix_gsc_permission",
|
|
87
|
+
"wait_for_sitemaps",
|
|
88
|
+
"wait_for_indexing",
|
|
89
|
+
"retry_indexing",
|
|
90
|
+
"none"
|
|
91
|
+
];
|
|
92
|
+
const lifecycleErrorCodes = [
|
|
93
|
+
"missing_refresh_token",
|
|
94
|
+
"missing_analytics_scope",
|
|
95
|
+
"missing_indexing_scope",
|
|
96
|
+
"token_refresh_failed",
|
|
97
|
+
"permission_lost",
|
|
98
|
+
"insufficient_gsc_permission",
|
|
99
|
+
"gsc_property_not_found",
|
|
100
|
+
"gsc_property_unverified",
|
|
101
|
+
"user_database_not_provisioned",
|
|
102
|
+
"sync_failed",
|
|
103
|
+
"sitemap_sync_failed",
|
|
104
|
+
"indexing_failed"
|
|
105
|
+
];
|
|
106
|
+
function parseGrantedScopes(scopes) {
|
|
107
|
+
if (!scopes) return [];
|
|
108
|
+
if (typeof scopes === "string") return scopes.split(/\s+/).map((scope) => scope.trim()).filter(Boolean);
|
|
109
|
+
return scopes.map((scope) => scope.trim()).filter(Boolean);
|
|
110
|
+
}
|
|
111
|
+
function hasGoogleScope(scopes, scope) {
|
|
112
|
+
const granted = parseGrantedScopes(scopes);
|
|
113
|
+
const suffix = scope.replace("https://www.googleapis.com/auth/", "");
|
|
114
|
+
return granted.includes(scope) || granted.includes(suffix);
|
|
115
|
+
}
|
|
116
|
+
function hasRequiredAnalyticsScope(scopes) {
|
|
117
|
+
return hasGoogleScope(scopes, "https://www.googleapis.com/auth/webmasters.readonly") || hasGoogleScope(scopes, "https://www.googleapis.com/auth/webmasters");
|
|
118
|
+
}
|
|
119
|
+
function hasOptionalIndexingScope(scopes) {
|
|
120
|
+
return hasGoogleScope(scopes, GSCDUMP_OPTIONAL_INDEXING_SCOPE);
|
|
121
|
+
}
|
|
122
|
+
export { GSCDUMP_ONBOARDING_CONTRACT_VERSION, GSCDUMP_OPTIONAL_INDEXING_SCOPE, GSCDUMP_REQUIRED_ANALYTICS_SCOPE, GSCDUMP_WRITE_ANALYTICS_SCOPE, accountNextActions, accountStatuses, analyticsNextActions, analyticsStatuses, hasOptionalIndexingScope, hasRequiredAnalyticsScope, indexingNextActions, indexingStatuses, lifecycleErrorCodes, parseGrantedScopes, propertyNextActions, propertyStatuses, querySourceModes, sitemapNextActions, sitemapStatuses };
|
package/dist/partner.d.mts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { partnerEndpoints } from "./
|
|
2
|
-
import {
|
|
3
|
-
import { AccountNextAction, AccountStatus,
|
|
4
|
-
import {
|
|
1
|
+
import { partnerEndpoints } from "./endpoints.mjs";
|
|
2
|
+
import { partnerRoutes } from "./routes.mjs";
|
|
3
|
+
import { AccountNextAction, AccountStatus, AnalyticsNextAction, AnalyticsStatus, GSCDUMP_ONBOARDING_CONTRACT_VERSION, GSCDUMP_OPTIONAL_INDEXING_SCOPE, GSCDUMP_REQUIRED_ANALYTICS_SCOPE, GSCDUMP_WRITE_ANALYTICS_SCOPE, IndexingNextAction, IndexingStatus, LifecycleError, LifecycleErrorCode, LifecycleProgress, LifecycleWebhookEnvelope, LifecycleWebhookEvent, PartnerLifecycleAccount, PartnerLifecycleResponse, PartnerLifecycleSite, PropertyNextAction, PropertyStatus, QuerySourceMode, SitemapNextAction, SitemapStatus, accountNextActions, accountStatuses, analyticsNextActions, analyticsStatuses, hasOptionalIndexingScope, hasRequiredAnalyticsScope, indexingNextActions, indexingStatuses, lifecycleErrorCodes, parseGrantedScopes, propertyNextActions, propertyStatuses, querySourceModes, sitemapNextActions, sitemapStatuses } from "./onboarding.mjs";
|
|
4
|
+
import { 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, 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 } from "./types.mjs";
|
|
5
|
+
import { partnerControlEndpointSchemas } from "./schemas.mjs";
|
|
6
|
+
import { CANONICAL_WEBHOOK_EVENTS, VALID_WEBHOOK_EVENTS, WEBHOOK_CONTRACT_VERSION, WEBHOOK_CONTRACT_VERSION_HEADER, WEBHOOK_DELIVERY_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER } from "./webhook-constants.mjs";
|
|
5
7
|
export { AccountNextAction, AccountStatus, type AddPartnerTeamMemberParams, type AnalysisSourcesOptions, type AnalysisSourcesResponse, AnalyticsNextAction, AnalyticsStatus, type BackfillRange, type BackfillResponse, type BindPartnerSiteTeamParams, type BindPartnerTeamCatalogParams, type BindPartnerTeamCatalogResponse, type BuilderStateWire, type BulkRegisterPartnerSiteResult, type BulkRegisterPartnerSitesParams, type BulkRegisterPartnerSitesResponse, CANONICAL_WEBHOOK_EVENTS, type CanonicalWebhookEventType, type ColumnDef, type ColumnType, type CountriesResponse, type CountryRow, type CreatePartnerTeamParams, type CreateWebhookEnvelopeOptions, type DataDetailOptions, type DataQueryOptions, type DeletePartnerUserResponse, type Dimension, type Filter, GSCDUMP_ONBOARDING_CONTRACT_VERSION, GSCDUMP_OPTIONAL_INDEXING_SCOPE, GSCDUMP_REQUIRED_ANALYTICS_SCOPE, GSCDUMP_WRITE_ANALYTICS_SCOPE, type Grain, type GscAddAndVerifyResponse, type GscApiRange, type GscComparisonFilter, type GscRowQueryMeta, type GscRowQueryResponse, type GscSearchType, type GscVerificationDnsRecord, type GscVerificationMethod, type GscVerificationRequest, type GscVerificationSite, type GscVerificationTokenResponse, type GscdumpAnalysisBundleParams, type GscdumpAnalysisBundleResponse, type GscdumpAnalysisParams, type GscdumpAnalysisPreset, type GscdumpAnalysisResponse, type GscdumpAnalysisSourcesResponse, type GscdumpAvailableSite, type GscdumpCanonicalMismatchRow, type GscdumpCanonicalMismatchesResponse, type GscdumpDataDetailResponse, type GscdumpDataResponse, type GscdumpDataRow, type GscdumpHealthResponse, type GscdumpIndexPercentResponse, type GscdumpIndexPercentSitemap, type GscdumpIndexPercentTrendPoint, type GscdumpIndexingDiagnosticsResponse, type GscdumpIndexingInspectRateLimited, type GscdumpIndexingInspectRequest, type GscdumpIndexingInspectResponse, type GscdumpIndexingInspectResult, type GscdumpIndexingIssueSeverity, type GscdumpIndexingResponse, type GscdumpIndexingTrendPoint, type GscdumpIndexingUrl, type GscdumpIndexingUrlStatus, type GscdumpIndexingUrlsResponse, type GscdumpInvisibleUrlRow, type GscdumpKeywordSparklinesParams, type GscdumpKeywordSparklinesResponse, type GscdumpMeta, type GscdumpOrphanPageRow, type GscdumpPageTrendParams, type GscdumpPageTrendResponse, type GscdumpPerSitemapHistoryEntry, type GscdumpPermissionRecovery, type GscdumpQueryTrendParams, type GscdumpQueryTrendResponse, type GscdumpRichResultItem, type GscdumpSiteIntIdCrosswalkEntry, type GscdumpSiteIntIdCrosswalkResponse, type GscdumpSiteRegistration, type GscdumpSiteReportResponse, type GscdumpSitemap, type GscdumpSitemapChangesResponse, type GscdumpSitemapHistory, type GscdumpSitemapMembershipParams, type GscdumpSitemapMembershipResponse, type GscdumpSitemapMembershipUnavailableReason, type GscdumpSitemapMembershipUrl, type GscdumpSitemapsResponse, type GscdumpSyncJobItem, type GscdumpSyncJobStatus, type GscdumpSyncJobsQueueCounts, type GscdumpSyncJobsResponse, type GscdumpSyncProgressDateStatus, type GscdumpSyncProgressPhaseCounts, type GscdumpSyncProgressResponse, type GscdumpSyncProgressSite, type GscdumpSyncStatusResponse, type GscdumpTeamCatalogRef, type GscdumpTeamMemberRow, type GscdumpTeamRow, type GscdumpTopAssociationParams, type GscdumpTopAssociationResponse, type GscdumpTotals, type GscdumpUserMeResponse, type GscdumpUserRegistration, type GscdumpUserSettings, type GscdumpUserSite, type GscdumpUserStatus, type GscdumpUserTokenUpdate, type IndexingDiagnostics, type IndexingDiagnosticsParams, type IndexingInspectRateLimit, type IndexingInspectRateLimited, type IndexingInspectRequest, type IndexingInspectResponse, type IndexingInspectResult, type IndexingIssue, type IndexingIssueSeverity, IndexingNextAction, IndexingStatus, type IndexingUrlRow, type IndexingUrlStatus, type IndexingUrlsParams, type IndexingUrlsResponse, type InspectionHistoryRecord, type InspectionHistoryResponse, type InspectionIndex, type InspectionRecordRaw, LifecycleError, LifecycleErrorCode, LifecycleProgress, LifecycleWebhookEnvelope, LifecycleWebhookEvent, type Metric, PartnerLifecycleAccount, PartnerLifecycleResponse, PartnerLifecycleSite, type PartnerSitemapAction, type PartnerSitemapActionResponse, type PartnerWebhookData, type PartnerWebhookHeaders, PropertyNextAction, PropertyStatus, QuerySourceMode, type RegisterPartnerSiteParams, type RegisterPartnerUserParams, type RollupEnvelope, type Row, type ScheduleState, type SearchAppearanceResponse, type SearchAppearanceRow, type SearchTypeOptions, type SiteListItem, type SitemapAddedRow, type SitemapChangesResponse, type SitemapHistoryRecord, type SitemapHistoryResponse, type SitemapIndex, SitemapNextAction, type SitemapRemovedRow, SitemapStatus, type SourceInfoOptions, type SourceInfoResponse, type TableName, type TableSchema, type TenantCtx, type UpdatePartnerUserTokensParams, VALID_WEBHOOK_EVENTS, WEBHOOK_CONTRACT_VERSION, WEBHOOK_CONTRACT_VERSION_HEADER, WEBHOOK_DELIVERY_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, type WebhookEnvelope, type WebhookEventType, type WhoamiResponse, accountNextActions, accountStatuses, analyticsNextActions, analyticsStatuses, hasOptionalIndexingScope, hasRequiredAnalyticsScope, indexingNextActions, indexingStatuses, lifecycleErrorCodes, parseGrantedScopes, partnerControlEndpointSchemas, partnerControlEndpointSchemas as partnerEndpointSchemas, partnerEndpoints, partnerRoutes, propertyNextActions, propertyStatuses, querySourceModes, sitemapNextActions, sitemapStatuses };
|
package/dist/partner.mjs
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { partnerRoutes } from "./
|
|
3
|
-
import {
|
|
1
|
+
import { GSCDUMP_ONBOARDING_CONTRACT_VERSION, GSCDUMP_OPTIONAL_INDEXING_SCOPE, GSCDUMP_REQUIRED_ANALYTICS_SCOPE, GSCDUMP_WRITE_ANALYTICS_SCOPE, accountNextActions, accountStatuses, analyticsNextActions, analyticsStatuses, hasOptionalIndexingScope, hasRequiredAnalyticsScope, indexingNextActions, indexingStatuses, lifecycleErrorCodes, parseGrantedScopes, propertyNextActions, propertyStatuses, querySourceModes, sitemapNextActions, sitemapStatuses } from "./onboarding.mjs";
|
|
2
|
+
import { partnerRoutes } from "./routes.mjs";
|
|
3
|
+
import { CANONICAL_WEBHOOK_EVENTS, VALID_WEBHOOK_EVENTS, WEBHOOK_CONTRACT_VERSION, WEBHOOK_CONTRACT_VERSION_HEADER, WEBHOOK_DELIVERY_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER } from "./webhook-constants.mjs";
|
|
4
|
+
import { partnerControlEndpointSchemas } from "./schemas.mjs";
|
|
5
|
+
import { partnerEndpoints } from "./endpoints.mjs";
|
|
4
6
|
export { CANONICAL_WEBHOOK_EVENTS, GSCDUMP_ONBOARDING_CONTRACT_VERSION, GSCDUMP_OPTIONAL_INDEXING_SCOPE, GSCDUMP_REQUIRED_ANALYTICS_SCOPE, GSCDUMP_WRITE_ANALYTICS_SCOPE, VALID_WEBHOOK_EVENTS, WEBHOOK_CONTRACT_VERSION, WEBHOOK_CONTRACT_VERSION_HEADER, WEBHOOK_DELIVERY_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, accountNextActions, accountStatuses, analyticsNextActions, analyticsStatuses, hasOptionalIndexingScope, hasRequiredAnalyticsScope, indexingNextActions, indexingStatuses, lifecycleErrorCodes, parseGrantedScopes, partnerControlEndpointSchemas, partnerControlEndpointSchemas as partnerEndpointSchemas, partnerEndpoints, partnerRoutes, propertyNextActions, propertyStatuses, querySourceModes, sitemapNextActions, sitemapStatuses };
|