@gscdump/contracts 0.33.0 → 0.33.4
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/_chunks/schemas.d.mts +382 -88
- package/dist/_chunks/schemas.mjs +45 -3
- package/dist/_chunks/types.d.mts +125 -13
- package/dist/index.d.mts +1 -122
- package/package.json +1 -1
package/dist/_chunks/schemas.mjs
CHANGED
|
@@ -709,7 +709,8 @@ const bulkRegisterPartnerSitesSchema = z.object({
|
|
|
709
709
|
externalSiteId: z.string().optional(),
|
|
710
710
|
externalSiteUrl: z.string().optional(),
|
|
711
711
|
webhookUrl: z.url().optional(),
|
|
712
|
-
webhookEvents: z.array(z.enum(CANONICAL_WEBHOOK_EVENTS)).optional()
|
|
712
|
+
webhookEvents: z.array(z.enum(CANONICAL_WEBHOOK_EVENTS)).optional(),
|
|
713
|
+
enabledSearchTypes: z.array(searchTypeSchema).optional()
|
|
713
714
|
}).loose()).optional()
|
|
714
715
|
}).refine((value) => (value.siteUrls?.length ?? 0) > 0 || (value.sites?.length ?? 0) > 0, { message: "siteUrls or sites is required" });
|
|
715
716
|
const bulkRegisterPartnerSitesResponseSchema = z.object({
|
|
@@ -1109,9 +1110,50 @@ const gscdumpTopAssociationParamsSchema = z.object({
|
|
|
1109
1110
|
});
|
|
1110
1111
|
const gscdumpTopAssociationResponseSchema = z.object({ value: z.string().nullable() }).loose();
|
|
1111
1112
|
const gscdumpAnalysisSourcesResponseSchema = z.object({
|
|
1112
|
-
|
|
1113
|
+
siteId: z.string(),
|
|
1114
|
+
searchType: searchTypeSchema,
|
|
1115
|
+
range: z.object({
|
|
1116
|
+
start: z.string(),
|
|
1117
|
+
end: z.string()
|
|
1118
|
+
}),
|
|
1119
|
+
snapshotVersion: z.string(),
|
|
1113
1120
|
generatedAt: z.string(),
|
|
1114
|
-
|
|
1121
|
+
tables: z.array(z.object({
|
|
1122
|
+
table: z.enum([
|
|
1123
|
+
"pages",
|
|
1124
|
+
"queries",
|
|
1125
|
+
"countries",
|
|
1126
|
+
"page_queries",
|
|
1127
|
+
"dates",
|
|
1128
|
+
"search_appearance",
|
|
1129
|
+
"search_appearance_pages",
|
|
1130
|
+
"search_appearance_queries",
|
|
1131
|
+
"search_appearance_page_queries"
|
|
1132
|
+
]),
|
|
1133
|
+
mode: z.enum(["browser", "server"]),
|
|
1134
|
+
files: z.array(z.object({
|
|
1135
|
+
url: z.string(),
|
|
1136
|
+
bytes: z.number(),
|
|
1137
|
+
contentHash: z.string(),
|
|
1138
|
+
rowCount: z.number()
|
|
1139
|
+
}).loose()),
|
|
1140
|
+
overlay: z.object({
|
|
1141
|
+
url: z.string(),
|
|
1142
|
+
bytes: z.number(),
|
|
1143
|
+
contentHash: z.string(),
|
|
1144
|
+
rowCount: z.number()
|
|
1145
|
+
}).loose().optional(),
|
|
1146
|
+
totalBytes: z.number(),
|
|
1147
|
+
totalRows: z.number()
|
|
1148
|
+
}).loose()),
|
|
1149
|
+
serverTail: z.object({
|
|
1150
|
+
engine: z.enum(["r2-sql", "duckdb"]),
|
|
1151
|
+
endpoint: z.string()
|
|
1152
|
+
}).optional(),
|
|
1153
|
+
eligibilityCeiling: z.object({
|
|
1154
|
+
maxBytes: z.number(),
|
|
1155
|
+
maxRows: z.number()
|
|
1156
|
+
})
|
|
1115
1157
|
}).loose();
|
|
1116
1158
|
const gscdumpKeywordSparklinesParamsSchema = z.object({
|
|
1117
1159
|
keywords: z.array(z.string()).min(1).max(20),
|
package/dist/_chunks/types.d.mts
CHANGED
|
@@ -1,3 +1,124 @@
|
|
|
1
|
+
/** The 6 Iceberg fact tables — string-typed here to avoid an engine dep. */
|
|
2
|
+
type FileResolutionTable = 'pages' | 'queries' | 'countries' | 'page_queries' | 'dates' | 'search_appearance' | 'search_appearance_pages' | 'search_appearance_queries' | 'search_appearance_page_queries';
|
|
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
|
+
/**
|
|
16
|
+
* The archetype the caller will run. Lets the endpoint route the 2
|
|
17
|
+
* window-function archetypes straight to the server tail even when the
|
|
18
|
+
* data would be browser-eligible by size.
|
|
19
|
+
*/
|
|
20
|
+
archetype?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* One compacted Iceberg parquet data file the browser should fetch into OPFS.
|
|
24
|
+
*/
|
|
25
|
+
interface ResolvedParquetFile {
|
|
26
|
+
/**
|
|
27
|
+
* Same-origin URL (`/api/r2-data/<key>?...`) carrying a signed size hint
|
|
28
|
+
* and a short-lived exact-key access token. Stable for the file's lifetime
|
|
29
|
+
* (content-addressed).
|
|
30
|
+
*/
|
|
31
|
+
url: string;
|
|
32
|
+
/** Byte size — drives the browser-eligibility sum and OPFS quota planning. */
|
|
33
|
+
bytes: number;
|
|
34
|
+
/**
|
|
35
|
+
* Opaque content-stable identifier for this parquet file. Two requests for
|
|
36
|
+
* the same bytes MUST return the same `contentHash`; any change in bytes
|
|
37
|
+
* MUST yield a different one. The OPFS cache uses this as the file's
|
|
38
|
+
* address (encoded into the cache filename) — it is NOT required to be a
|
|
39
|
+
* SHA-256.
|
|
40
|
+
*
|
|
41
|
+
* In practice the server returns the Iceberg `data_file.file_path` object
|
|
42
|
+
* key, which is UUID-derived and content-addressed by convention.
|
|
43
|
+
*/
|
|
44
|
+
contentHash: string;
|
|
45
|
+
/** Row count, for eligibility accounting + diagnostics. */
|
|
46
|
+
rowCount: number;
|
|
47
|
+
}
|
|
48
|
+
/** Per-table resolution result. */
|
|
49
|
+
interface ResolvedTable {
|
|
50
|
+
table: FileResolutionTable;
|
|
51
|
+
/**
|
|
52
|
+
* `'browser'` — `files` is populated; the browser downloads + attaches.
|
|
53
|
+
* `'server'` — this `(site, table)` exceeds the eligibility ceiling;
|
|
54
|
+
* `files` is empty and queries route to the server tail.
|
|
55
|
+
*/
|
|
56
|
+
mode: 'browser' | 'server';
|
|
57
|
+
/** Compacted Iceberg data files. Empty when `mode === 'server'`. */
|
|
58
|
+
files: ResolvedParquetFile[];
|
|
59
|
+
/**
|
|
60
|
+
* Recent-window overlay parquet — the non-stable tail (the freshest days the
|
|
61
|
+
* ingest stability cutoff excludes from the lake), materialized out-of-band at
|
|
62
|
+
* `_recent_overlay/{site}/{searchType}/{table}.parquet`. When present, the
|
|
63
|
+
* browser unions it with an anti-join dedup (the lake wins on any shared day;
|
|
64
|
+
* the overlay supplies only days the lake lacks) so the freshest days serve
|
|
65
|
+
* from the overlay instead of returning 0. Absent (`undefined`) when no
|
|
66
|
+
* overlay exists for this `(site, searchType, table)` or for `mode: 'server'`.
|
|
67
|
+
*
|
|
68
|
+
* The overlay is OVERWRITTEN in place each sync, so its `contentHash` MUST
|
|
69
|
+
* change whenever the bytes change (the server derives it from the R2 object
|
|
70
|
+
* etag) — otherwise the OPFS cache would serve a stale overlay. The enclosing
|
|
71
|
+
* `FileResolutionResponse.snapshotVersion` folds the overlay hash in for the
|
|
72
|
+
* same reason (it gates browser re-attach).
|
|
73
|
+
*/
|
|
74
|
+
overlay?: ResolvedParquetFile;
|
|
75
|
+
/** Total bytes across `files` — compared against the ceiling. */
|
|
76
|
+
totalBytes: number;
|
|
77
|
+
/** Total rows across `files`. */
|
|
78
|
+
totalRows: number;
|
|
79
|
+
}
|
|
80
|
+
/** Server-tail directive — how an ineligible `(site, table)` is queried. */
|
|
81
|
+
interface ServerTailDirective {
|
|
82
|
+
/**
|
|
83
|
+
* `'r2-sql'` — server runs the query via R2 SQL over the Iceberg table.
|
|
84
|
+
* `'duckdb'` — server runs DuckDB-over-Iceberg-files (window functions).
|
|
85
|
+
* The hybrid split (POC Spike 4): 8/10 archetypes `r2-sql`, 2 `duckdb`.
|
|
86
|
+
*/
|
|
87
|
+
engine: 'r2-sql' | 'duckdb';
|
|
88
|
+
/** Endpoint the consumer POSTs the archetype query to. */
|
|
89
|
+
endpoint: string;
|
|
90
|
+
}
|
|
91
|
+
/** Response body of the file-resolution endpoint. */
|
|
92
|
+
interface FileResolutionResponse {
|
|
93
|
+
siteId: string;
|
|
94
|
+
searchType: GscSearchType;
|
|
95
|
+
range: {
|
|
96
|
+
start: string;
|
|
97
|
+
end: string;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Stable hash over the resolved file set. The browser re-attaches only when
|
|
101
|
+
* this changes (new compaction landed). Replaces the old `manifestVersion`.
|
|
102
|
+
*/
|
|
103
|
+
snapshotVersion: string;
|
|
104
|
+
generatedAt: string;
|
|
105
|
+
/** Per-table resolution. */
|
|
106
|
+
tables: ResolvedTable[];
|
|
107
|
+
/**
|
|
108
|
+
* Present iff at least one table resolved to `mode: 'server'`. Tells the
|
|
109
|
+
* consumer how to route the server-tail queries for those tables.
|
|
110
|
+
*/
|
|
111
|
+
serverTail?: ServerTailDirective;
|
|
112
|
+
/**
|
|
113
|
+
* The per-(site,table) browser-eligibility ceiling in effect, echoed so the
|
|
114
|
+
* consumer can show "X is too large for local analysis" UX without
|
|
115
|
+
* hard-coding the threshold.
|
|
116
|
+
*/
|
|
117
|
+
eligibilityCeiling: {
|
|
118
|
+
maxBytes: number;
|
|
119
|
+
maxRows: number;
|
|
120
|
+
};
|
|
121
|
+
}
|
|
1
122
|
declare const GSCDUMP_ONBOARDING_CONTRACT_VERSION: "2026-05-11";
|
|
2
123
|
declare const GSCDUMP_REQUIRED_ANALYTICS_SCOPE: "https://www.googleapis.com/auth/webmasters.readonly";
|
|
3
124
|
declare const GSCDUMP_WRITE_ANALYTICS_SCOPE: "https://www.googleapis.com/auth/webmasters";
|
|
@@ -916,6 +1037,7 @@ interface RegisterPartnerSiteParams {
|
|
|
916
1037
|
webhookUrl?: string;
|
|
917
1038
|
webhookEvents?: WebhookEventType[];
|
|
918
1039
|
teamId?: string;
|
|
1040
|
+
enabledSearchTypes?: GscSearchType[];
|
|
919
1041
|
}
|
|
920
1042
|
interface BulkRegisterPartnerSitesParams {
|
|
921
1043
|
userId?: string;
|
|
@@ -928,6 +1050,7 @@ interface BulkRegisterPartnerSitesParams {
|
|
|
928
1050
|
externalSiteUrl?: string;
|
|
929
1051
|
webhookUrl?: string;
|
|
930
1052
|
webhookEvents?: WebhookEventType[];
|
|
1053
|
+
enabledSearchTypes?: GscSearchType[];
|
|
931
1054
|
}>;
|
|
932
1055
|
}
|
|
933
1056
|
interface BulkRegisterPartnerSiteResult {
|
|
@@ -956,18 +1079,7 @@ interface DeletePartnerUserResponse {
|
|
|
956
1079
|
userId: number;
|
|
957
1080
|
publicId: string;
|
|
958
1081
|
}
|
|
959
|
-
|
|
960
|
-
tables: Record<string, string[]>;
|
|
961
|
-
generatedAt: string;
|
|
962
|
-
manifestVersion: string;
|
|
963
|
-
searchType?: GscSearchType;
|
|
964
|
-
canUseBrowser?: boolean;
|
|
965
|
-
fallback?: string;
|
|
966
|
-
reason?: string;
|
|
967
|
-
estimatedBytes?: number;
|
|
968
|
-
estimatedFiles?: number;
|
|
969
|
-
coveragePlan?: unknown;
|
|
970
|
-
}
|
|
1082
|
+
type GscdumpAnalysisSourcesResponse = FileResolutionResponse;
|
|
971
1083
|
interface SearchTypeOptions {
|
|
972
1084
|
searchType?: GscSearchType;
|
|
973
1085
|
}
|
|
@@ -1607,4 +1719,4 @@ interface PartnerWebhookHeaders {
|
|
|
1607
1719
|
timestamp?: string | null;
|
|
1608
1720
|
signature?: string | null;
|
|
1609
1721
|
}
|
|
1610
|
-
export { AccountNextAction, AccountStatus, AddPartnerTeamMemberParams, AnalysisSourcesOptions, AnalysisSourcesResponse, AnalyticsClient, AnalyticsNextAction, AnalyticsStatus, BackfillRange, BackfillResponse, BindPartnerSiteTeamParams, BuilderState, BulkRegisterPartnerSiteResult, BulkRegisterPartnerSitesParams, BulkRegisterPartnerSitesResponse, CanonicalWebhookEventType, ColumnDef, ColumnType, CountriesResponse, CountryRow, CreatePartnerTeamParams, CreateWebhookEnvelopeOptions, DataDetailOptions, DataQueryOptions, DeletePartnerUserResponse, Dimension, Filter, GSCDUMP_ONBOARDING_CONTRACT_VERSION, GSCDUMP_OPTIONAL_INDEXING_SCOPE, GSCDUMP_REQUIRED_ANALYTICS_SCOPE, GSCDUMP_WRITE_ANALYTICS_SCOPE, Grain, GscApiRange, GscComparisonFilter, GscRowQueryMeta, GscRowQueryResponse, GscSearchType, GscdumpAnalysisParams, GscdumpAnalysisPreset, GscdumpAnalysisResponse, GscdumpAnalysisSourcesResponse, GscdumpAvailableSite, GscdumpCanonicalMismatchRow, GscdumpCanonicalMismatchesResponse, GscdumpDataDetailResponse, GscdumpDataResponse, GscdumpDataRow, GscdumpDateRangeParams, 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, GscdumpSiteRegistration, GscdumpSiteReportResponse, GscdumpSitemap, GscdumpSitemapChangesResponse, GscdumpSitemapHistory, GscdumpSitemapsResponse, GscdumpSyncJobItem, GscdumpSyncJobStatus, GscdumpSyncJobsQueueCounts, GscdumpSyncJobsResponse, GscdumpSyncProgressDateStatus, GscdumpSyncProgressPhaseCounts, GscdumpSyncProgressResponse, GscdumpSyncProgressSite, GscdumpSyncStatusResponse, GscdumpTeamMemberRow, GscdumpTeamRow, GscdumpTopAssociationParams, GscdumpTopAssociationResponse, GscdumpTotals, GscdumpUserMeResponse, GscdumpUserRegistration, GscdumpUserSettings, GscdumpUserSite, GscdumpUserStatus, GscdumpUserTokenUpdate, IndexingDiagnostics, IndexingDiagnosticsParams, IndexingInspectRateLimit, IndexingInspectRateLimited, IndexingInspectRequest, IndexingInspectResponse, IndexingInspectResult, IndexingIssue, IndexingIssueSeverity, IndexingNextAction, IndexingStatus, IndexingUrlRow, IndexingUrlStatus, IndexingUrlsParams, IndexingUrlsResponse, InspectionHistoryRecord, InspectionHistoryResponse, InspectionIndex, InspectionRecordRaw, LifecycleError, LifecycleErrorCode, LifecycleProgress, LifecycleWebhookEnvelope, LifecycleWebhookEvent, Metric, PartnerClient, PartnerLifecycleAccount, PartnerLifecycleResponse, PartnerLifecycleSite, PartnerRealtimeEvent, PartnerRealtimeEventType, PartnerRealtimeMessage, PartnerWebhookData, PartnerWebhookHeaders, PropertyNextAction, PropertyStatus, QuerySourceMode, RealtimeAuthFailedEvent, RealtimeAuthRequiredMessage, RealtimeConnectedMessage, RealtimeEnrichmentCompleteEvent, RealtimeErrorMessage, RealtimeIndexingCompleteEvent, RealtimeIndexingProgressEvent, RealtimeJobFailedEvent, RealtimeNeedsReauthEvent, RealtimePongMessage, RealtimeSiteAddedEvent, RealtimeSiteRemovedEvent, RealtimeSitemapCompleteEvent, RealtimeSitemapProgressEvent, RealtimeSubscribedMessage, RealtimeSyncCompleteEvent, RealtimeSyncFailedEvent, RealtimeSyncJobCompleteEvent, RealtimeSyncProgressEvent, RealtimeSyncSiteCompleteEvent, RegisterPartnerSiteParams, RegisterPartnerUserParams, RollupEnvelope, Row, ScheduleState, SearchAppearanceResponse, SearchAppearanceRow, SearchTypeOptions, SiteListItem, SitemapAddedRow, SitemapChangesResponse, SitemapHistoryRecord, SitemapHistoryResponse, SitemapIndex, SitemapNextAction, SitemapRemovedRow, SitemapStatus, SourceInfoOptions, SourceInfoResponse, TableName, TableSchema, TenantCtx, UpdatePartnerUserTokensParams, WebhookEnvelope, WebhookEventType, WhoamiResponse, accountNextActions, accountStatuses, analyticsNextActions, analyticsStatuses, hasOptionalIndexingScope, hasRequiredAnalyticsScope, indexingNextActions, indexingStatuses, lifecycleErrorCodes, lifecycleWebhookEvents, parseGrantedScopes, propertyNextActions, propertyStatuses, querySourceModes, sitemapNextActions, sitemapStatuses };
|
|
1722
|
+
export { AccountNextAction, AccountStatus, AddPartnerTeamMemberParams, AnalysisSourcesOptions, AnalysisSourcesResponse, AnalyticsClient, AnalyticsNextAction, AnalyticsStatus, BackfillRange, BackfillResponse, BindPartnerSiteTeamParams, BuilderState, BulkRegisterPartnerSiteResult, BulkRegisterPartnerSitesParams, BulkRegisterPartnerSitesResponse, CanonicalWebhookEventType, ColumnDef, ColumnType, CountriesResponse, CountryRow, CreatePartnerTeamParams, CreateWebhookEnvelopeOptions, DataDetailOptions, DataQueryOptions, DeletePartnerUserResponse, Dimension, FileResolutionRequest, FileResolutionResponse, FileResolutionTable, Filter, GSCDUMP_ONBOARDING_CONTRACT_VERSION, GSCDUMP_OPTIONAL_INDEXING_SCOPE, GSCDUMP_REQUIRED_ANALYTICS_SCOPE, GSCDUMP_WRITE_ANALYTICS_SCOPE, Grain, GscApiRange, GscComparisonFilter, GscRowQueryMeta, GscRowQueryResponse, GscSearchType, GscdumpAnalysisParams, GscdumpAnalysisPreset, GscdumpAnalysisResponse, GscdumpAnalysisSourcesResponse, GscdumpAvailableSite, GscdumpCanonicalMismatchRow, GscdumpCanonicalMismatchesResponse, GscdumpDataDetailResponse, GscdumpDataResponse, GscdumpDataRow, GscdumpDateRangeParams, 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, GscdumpSiteRegistration, GscdumpSiteReportResponse, GscdumpSitemap, GscdumpSitemapChangesResponse, GscdumpSitemapHistory, GscdumpSitemapsResponse, GscdumpSyncJobItem, GscdumpSyncJobStatus, GscdumpSyncJobsQueueCounts, GscdumpSyncJobsResponse, GscdumpSyncProgressDateStatus, GscdumpSyncProgressPhaseCounts, GscdumpSyncProgressResponse, GscdumpSyncProgressSite, GscdumpSyncStatusResponse, GscdumpTeamMemberRow, GscdumpTeamRow, GscdumpTopAssociationParams, GscdumpTopAssociationResponse, GscdumpTotals, GscdumpUserMeResponse, GscdumpUserRegistration, GscdumpUserSettings, GscdumpUserSite, GscdumpUserStatus, GscdumpUserTokenUpdate, IndexingDiagnostics, IndexingDiagnosticsParams, IndexingInspectRateLimit, IndexingInspectRateLimited, IndexingInspectRequest, IndexingInspectResponse, IndexingInspectResult, IndexingIssue, IndexingIssueSeverity, IndexingNextAction, IndexingStatus, IndexingUrlRow, IndexingUrlStatus, IndexingUrlsParams, IndexingUrlsResponse, InspectionHistoryRecord, InspectionHistoryResponse, InspectionIndex, InspectionRecordRaw, LifecycleError, LifecycleErrorCode, LifecycleProgress, LifecycleWebhookEnvelope, LifecycleWebhookEvent, Metric, PartnerClient, PartnerLifecycleAccount, PartnerLifecycleResponse, PartnerLifecycleSite, PartnerRealtimeEvent, PartnerRealtimeEventType, PartnerRealtimeMessage, PartnerWebhookData, PartnerWebhookHeaders, PropertyNextAction, PropertyStatus, QuerySourceMode, RealtimeAuthFailedEvent, RealtimeAuthRequiredMessage, RealtimeConnectedMessage, RealtimeEnrichmentCompleteEvent, RealtimeErrorMessage, RealtimeIndexingCompleteEvent, RealtimeIndexingProgressEvent, RealtimeJobFailedEvent, RealtimeNeedsReauthEvent, RealtimePongMessage, RealtimeSiteAddedEvent, RealtimeSiteRemovedEvent, RealtimeSitemapCompleteEvent, RealtimeSitemapProgressEvent, RealtimeSubscribedMessage, RealtimeSyncCompleteEvent, RealtimeSyncFailedEvent, RealtimeSyncJobCompleteEvent, RealtimeSyncProgressEvent, RealtimeSyncSiteCompleteEvent, RegisterPartnerSiteParams, RegisterPartnerUserParams, ResolvedParquetFile, ResolvedTable, RollupEnvelope, Row, ScheduleState, SearchAppearanceResponse, SearchAppearanceRow, SearchTypeOptions, ServerTailDirective, SiteListItem, SitemapAddedRow, SitemapChangesResponse, SitemapHistoryRecord, SitemapHistoryResponse, SitemapIndex, SitemapNextAction, SitemapRemovedRow, SitemapStatus, SourceInfoOptions, SourceInfoResponse, TableName, TableSchema, TenantCtx, UpdatePartnerUserTokensParams, WebhookEnvelope, WebhookEventType, WhoamiResponse, accountNextActions, accountStatuses, analyticsNextActions, analyticsStatuses, hasOptionalIndexingScope, hasRequiredAnalyticsScope, indexingNextActions, indexingStatuses, lifecycleErrorCodes, lifecycleWebhookEvents, parseGrantedScopes, propertyNextActions, propertyStatuses, querySourceModes, sitemapNextActions, sitemapStatuses };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,126 +1,5 @@
|
|
|
1
1
|
import { addPartnerTeamMemberSchema, analyticsEndpointSchemas, analyticsRoutes, backfillRangeSchema, backfillResponseSchema, bindPartnerSiteTeamSchema, builderStateSchema, bulkRegisterPartnerSitesResponseSchema, bulkRegisterPartnerSitesSchema, canonicalWebhookEventTypeSchema, countriesResponseSchema, countryRowSchema, createPartnerTeamSchema, dataDetailOptionsSchema, dataQueryOptionsSchema, gscApiRangeSchema, gscComparisonFilterSchema, gscRowQueryMetaSchema, gscRowQueryResponseSchema, gscdumpAnalysisParamsSchema, gscdumpAnalysisPresetSchema, gscdumpAnalysisResponseSchema, gscdumpAnalysisSourcesResponseSchema, gscdumpAvailableSiteSchema, gscdumpCanonicalMismatchesResponseSchema, gscdumpDataDetailResponseSchema, gscdumpDataResponseSchema, gscdumpDataRowSchema, gscdumpDateRangeParamsSchema, gscdumpDeletePartnerUserResponseSchema, gscdumpHealthResponseSchema, gscdumpIndexPercentParamsSchema, gscdumpIndexPercentResponseSchema, gscdumpIndexingDiagnosticsResponseSchema, gscdumpIndexingResponseSchema, gscdumpIndexingUrlsResponseSchema, gscdumpKeywordSparklinesParamsSchema, gscdumpKeywordSparklinesResponseSchema, gscdumpMetaSchema, gscdumpPageTrendParamsSchema, gscdumpPageTrendResponseSchema, gscdumpPermissionRecoverySchema, gscdumpQueryTrendParamsSchema, gscdumpQueryTrendResponseSchema, gscdumpSiteRegistrationSchema, gscdumpSiteReportResponseSchema, gscdumpSitemapChangesResponseSchema, gscdumpSitemapsResponseSchema, gscdumpSyncJobsResponseSchema, gscdumpSyncProgressResponseSchema, gscdumpTeamMemberRowSchema, gscdumpTeamRoleSchema, gscdumpTeamRowSchema, gscdumpTopAssociationParamsSchema, gscdumpTopAssociationResponseSchema, gscdumpTotalsSchema, gscdumpUserMeResponseSchema, gscdumpUserRegistrationSchema, gscdumpUserSettingsSchema, gscdumpUserSiteSchema, gscdumpUserStatusSchema, indexingDiagnosticsParamsSchema, indexingDiagnosticsSchema, indexingInspectAnyResponseSchema, indexingInspectRateLimitedSchema, indexingInspectRequestSchema, indexingInspectResponseSchema, indexingInspectResultSchema, indexingIssueSchema, indexingUrlRowSchema, indexingUrlStatusSchema, indexingUrlsParamsSchema, indexingUrlsResponseSchema, inspectionHistoryRecordSchema, inspectionHistoryResponseSchema, inspectionIndexSchema, inspectionRecordRawSchema, jobFailedWebhookPayloadSchema, lifecycleErrorSchema, lifecycleProgressSchema, partnerControlEndpointSchemas, partnerEndpointSchemas, partnerLifecycleAccountSchema, partnerLifecycleResponseSchema, partnerLifecycleSiteSchema, partnerRealtimeEventSchema, partnerRoutes, partnerWebhookDataSchema, partnerWebhookEnvelopeSchema, registerPartnerSiteSchema, registerPartnerUserSchema, rollupEnvelopeSchema, scheduleStateSchema, searchAppearanceResponseSchema, searchAppearanceRowSchema, searchTypeSchema, siteListItemSchema, sitemapChangesResponseSchema, sitemapHistoryRecordSchema, sitemapHistoryResponseSchema, sitemapIndexSchema, sourceInfoResponseSchema, updatePartnerUserTokensSchema, webhookEventTypeSchema, whoamiResponseSchema } from "./_chunks/schemas.mjs";
|
|
2
|
-
import { AccountNextAction, AccountStatus, AddPartnerTeamMemberParams, AnalysisSourcesOptions, AnalysisSourcesResponse, AnalyticsClient, AnalyticsNextAction, AnalyticsStatus, BackfillRange, BackfillResponse, BindPartnerSiteTeamParams, BuilderState, BulkRegisterPartnerSiteResult, BulkRegisterPartnerSitesParams, BulkRegisterPartnerSitesResponse, CanonicalWebhookEventType, ColumnDef, ColumnType, CountriesResponse, CountryRow, CreatePartnerTeamParams, CreateWebhookEnvelopeOptions, DataDetailOptions, DataQueryOptions, DeletePartnerUserResponse, Dimension, Filter, GSCDUMP_ONBOARDING_CONTRACT_VERSION, GSCDUMP_OPTIONAL_INDEXING_SCOPE, GSCDUMP_REQUIRED_ANALYTICS_SCOPE, GSCDUMP_WRITE_ANALYTICS_SCOPE, Grain, GscApiRange, GscComparisonFilter, GscRowQueryMeta, GscRowQueryResponse, GscSearchType, GscdumpAnalysisParams, GscdumpAnalysisPreset, GscdumpAnalysisResponse, GscdumpAnalysisSourcesResponse, GscdumpAvailableSite, GscdumpCanonicalMismatchRow, GscdumpCanonicalMismatchesResponse, GscdumpDataDetailResponse, GscdumpDataResponse, GscdumpDataRow, GscdumpDateRangeParams, 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, GscdumpSiteRegistration, GscdumpSiteReportResponse, GscdumpSitemap, GscdumpSitemapChangesResponse, GscdumpSitemapHistory, GscdumpSitemapsResponse, GscdumpSyncJobItem, GscdumpSyncJobStatus, GscdumpSyncJobsQueueCounts, GscdumpSyncJobsResponse, GscdumpSyncProgressDateStatus, GscdumpSyncProgressPhaseCounts, GscdumpSyncProgressResponse, GscdumpSyncProgressSite, GscdumpSyncStatusResponse, GscdumpTeamMemberRow, GscdumpTeamRow, GscdumpTopAssociationParams, GscdumpTopAssociationResponse, GscdumpTotals, GscdumpUserMeResponse, GscdumpUserRegistration, GscdumpUserSettings, GscdumpUserSite, GscdumpUserStatus, GscdumpUserTokenUpdate, IndexingDiagnostics, IndexingDiagnosticsParams, IndexingInspectRateLimit, IndexingInspectRateLimited, IndexingInspectRequest, IndexingInspectResponse, IndexingInspectResult, IndexingIssue, IndexingIssueSeverity, IndexingNextAction, IndexingStatus, IndexingUrlRow, IndexingUrlStatus, IndexingUrlsParams, IndexingUrlsResponse, InspectionHistoryRecord, InspectionHistoryResponse, InspectionIndex, InspectionRecordRaw, LifecycleError, LifecycleErrorCode, LifecycleProgress, LifecycleWebhookEnvelope, LifecycleWebhookEvent, Metric, PartnerClient, PartnerLifecycleAccount, PartnerLifecycleResponse, PartnerLifecycleSite, PartnerRealtimeEvent, PartnerRealtimeEventType, PartnerRealtimeMessage, PartnerWebhookData, PartnerWebhookHeaders, PropertyNextAction, PropertyStatus, QuerySourceMode, RealtimeAuthFailedEvent, RealtimeAuthRequiredMessage, RealtimeConnectedMessage, RealtimeEnrichmentCompleteEvent, RealtimeErrorMessage, RealtimeIndexingCompleteEvent, RealtimeIndexingProgressEvent, RealtimeJobFailedEvent, RealtimeNeedsReauthEvent, RealtimePongMessage, RealtimeSiteAddedEvent, RealtimeSiteRemovedEvent, RealtimeSitemapCompleteEvent, RealtimeSitemapProgressEvent, RealtimeSubscribedMessage, RealtimeSyncCompleteEvent, RealtimeSyncFailedEvent, RealtimeSyncJobCompleteEvent, RealtimeSyncProgressEvent, RealtimeSyncSiteCompleteEvent, RegisterPartnerSiteParams, RegisterPartnerUserParams, RollupEnvelope, Row, ScheduleState, SearchAppearanceResponse, SearchAppearanceRow, SearchTypeOptions, SiteListItem, SitemapAddedRow, SitemapChangesResponse, SitemapHistoryRecord, SitemapHistoryResponse, SitemapIndex, SitemapNextAction, SitemapRemovedRow, SitemapStatus, SourceInfoOptions, SourceInfoResponse, TableName, TableSchema, TenantCtx, UpdatePartnerUserTokensParams, WebhookEnvelope, WebhookEventType, WhoamiResponse, accountNextActions, accountStatuses, analyticsNextActions, analyticsStatuses, hasOptionalIndexingScope, hasRequiredAnalyticsScope, indexingNextActions, indexingStatuses, lifecycleErrorCodes, lifecycleWebhookEvents, parseGrantedScopes, propertyNextActions, propertyStatuses, querySourceModes, sitemapNextActions, sitemapStatuses } from "./_chunks/types.mjs";
|
|
2
|
+
import { AccountNextAction, AccountStatus, AddPartnerTeamMemberParams, AnalysisSourcesOptions, AnalysisSourcesResponse, AnalyticsClient, AnalyticsNextAction, AnalyticsStatus, BackfillRange, BackfillResponse, BindPartnerSiteTeamParams, BuilderState, BulkRegisterPartnerSiteResult, BulkRegisterPartnerSitesParams, BulkRegisterPartnerSitesResponse, CanonicalWebhookEventType, ColumnDef, ColumnType, CountriesResponse, CountryRow, CreatePartnerTeamParams, CreateWebhookEnvelopeOptions, DataDetailOptions, DataQueryOptions, DeletePartnerUserResponse, Dimension, FileResolutionRequest, FileResolutionResponse, FileResolutionTable, Filter, GSCDUMP_ONBOARDING_CONTRACT_VERSION, GSCDUMP_OPTIONAL_INDEXING_SCOPE, GSCDUMP_REQUIRED_ANALYTICS_SCOPE, GSCDUMP_WRITE_ANALYTICS_SCOPE, Grain, GscApiRange, GscComparisonFilter, GscRowQueryMeta, GscRowQueryResponse, GscSearchType, GscdumpAnalysisParams, GscdumpAnalysisPreset, GscdumpAnalysisResponse, GscdumpAnalysisSourcesResponse, GscdumpAvailableSite, GscdumpCanonicalMismatchRow, GscdumpCanonicalMismatchesResponse, GscdumpDataDetailResponse, GscdumpDataResponse, GscdumpDataRow, GscdumpDateRangeParams, 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, GscdumpSiteRegistration, GscdumpSiteReportResponse, GscdumpSitemap, GscdumpSitemapChangesResponse, GscdumpSitemapHistory, GscdumpSitemapsResponse, GscdumpSyncJobItem, GscdumpSyncJobStatus, GscdumpSyncJobsQueueCounts, GscdumpSyncJobsResponse, GscdumpSyncProgressDateStatus, GscdumpSyncProgressPhaseCounts, GscdumpSyncProgressResponse, GscdumpSyncProgressSite, GscdumpSyncStatusResponse, GscdumpTeamMemberRow, GscdumpTeamRow, GscdumpTopAssociationParams, GscdumpTopAssociationResponse, GscdumpTotals, GscdumpUserMeResponse, GscdumpUserRegistration, GscdumpUserSettings, GscdumpUserSite, GscdumpUserStatus, GscdumpUserTokenUpdate, IndexingDiagnostics, IndexingDiagnosticsParams, IndexingInspectRateLimit, IndexingInspectRateLimited, IndexingInspectRequest, IndexingInspectResponse, IndexingInspectResult, IndexingIssue, IndexingIssueSeverity, IndexingNextAction, IndexingStatus, IndexingUrlRow, IndexingUrlStatus, IndexingUrlsParams, IndexingUrlsResponse, InspectionHistoryRecord, InspectionHistoryResponse, InspectionIndex, InspectionRecordRaw, LifecycleError, LifecycleErrorCode, LifecycleProgress, LifecycleWebhookEnvelope, LifecycleWebhookEvent, Metric, PartnerClient, PartnerLifecycleAccount, PartnerLifecycleResponse, PartnerLifecycleSite, PartnerRealtimeEvent, PartnerRealtimeEventType, PartnerRealtimeMessage, PartnerWebhookData, PartnerWebhookHeaders, PropertyNextAction, PropertyStatus, QuerySourceMode, RealtimeAuthFailedEvent, RealtimeAuthRequiredMessage, RealtimeConnectedMessage, RealtimeEnrichmentCompleteEvent, RealtimeErrorMessage, RealtimeIndexingCompleteEvent, RealtimeIndexingProgressEvent, RealtimeJobFailedEvent, RealtimeNeedsReauthEvent, RealtimePongMessage, RealtimeSiteAddedEvent, RealtimeSiteRemovedEvent, RealtimeSitemapCompleteEvent, RealtimeSitemapProgressEvent, RealtimeSubscribedMessage, RealtimeSyncCompleteEvent, RealtimeSyncFailedEvent, RealtimeSyncJobCompleteEvent, RealtimeSyncProgressEvent, RealtimeSyncSiteCompleteEvent, RegisterPartnerSiteParams, RegisterPartnerUserParams, ResolvedParquetFile, ResolvedTable, RollupEnvelope, Row, ScheduleState, SearchAppearanceResponse, SearchAppearanceRow, SearchTypeOptions, ServerTailDirective, SiteListItem, SitemapAddedRow, SitemapChangesResponse, SitemapHistoryRecord, SitemapHistoryResponse, SitemapIndex, SitemapNextAction, SitemapRemovedRow, SitemapStatus, SourceInfoOptions, SourceInfoResponse, TableName, TableSchema, TenantCtx, UpdatePartnerUserTokensParams, WebhookEnvelope, WebhookEventType, WhoamiResponse, accountNextActions, accountStatuses, analyticsNextActions, analyticsStatuses, hasOptionalIndexingScope, hasRequiredAnalyticsScope, indexingNextActions, indexingStatuses, lifecycleErrorCodes, lifecycleWebhookEvents, parseGrantedScopes, propertyNextActions, propertyStatuses, querySourceModes, sitemapNextActions, sitemapStatuses } from "./_chunks/types.mjs";
|
|
3
3
|
import { ARCHETYPE_EXECUTION_CLASS, ArbitrarySqlQuery, ArchetypeExecutionClass, ArchetypeFacet, ArchetypeQuery, ArchetypeQueryBase, ArchetypeResult, ArchetypeResultRow, ArchetypeResultSource, AuxCloudOnlyQuery, DateRange, EntityDailySparklineQuery, EntityDailyTimeseriesQuery, MultiSeriesStackedDailyQuery, QueryArchetype, ResolvedArchetypeQuery, SingleRowLookupQuery, SiteDailyTimeseriesQuery, TopNBreakdownQuery, TwoDimensionDetailQuery } from "./archetypes.mjs";
|
|
4
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 "./_chunks/webhook-constants.mjs";
|
|
5
|
-
/** The 6 Iceberg fact tables — string-typed here to avoid an engine dep. */
|
|
6
|
-
type FileResolutionTable = 'pages' | 'queries' | 'countries' | 'page_queries' | 'dates' | 'search_appearance' | 'search_appearance_pages' | 'search_appearance_queries' | 'search_appearance_page_queries';
|
|
7
|
-
/** Request query params for `GET /api/sites/[siteId]/analysis-sources`. */
|
|
8
|
-
interface FileResolutionRequest {
|
|
9
|
-
/** `YYYY-MM-DD` inclusive. Required — no date range = no resolution. */
|
|
10
|
-
start: string;
|
|
11
|
-
/** `YYYY-MM-DD` inclusive. */
|
|
12
|
-
end: string;
|
|
13
|
-
searchType?: GscSearchType;
|
|
14
|
-
/**
|
|
15
|
-
* Restrict resolution to these tables. Omitted = all 5. The archetype the
|
|
16
|
-
* caller intends determines which tables it needs.
|
|
17
|
-
*/
|
|
18
|
-
tables?: FileResolutionTable[];
|
|
19
|
-
/**
|
|
20
|
-
* The archetype the caller will run. Lets the endpoint route the 2
|
|
21
|
-
* window-function archetypes straight to the server tail even when the
|
|
22
|
-
* data would be browser-eligible by size.
|
|
23
|
-
*/
|
|
24
|
-
archetype?: string;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* One compacted Iceberg parquet data file the browser should fetch into OPFS.
|
|
28
|
-
*/
|
|
29
|
-
interface ResolvedParquetFile {
|
|
30
|
-
/**
|
|
31
|
-
* Same-origin URL (`/api/r2-data/<key>?...`) carrying a signed size hint
|
|
32
|
-
* and a short-lived exact-key access token. Stable for the file's lifetime
|
|
33
|
-
* (content-addressed).
|
|
34
|
-
*/
|
|
35
|
-
url: string;
|
|
36
|
-
/** Byte size — drives the browser-eligibility sum and OPFS quota planning. */
|
|
37
|
-
bytes: number;
|
|
38
|
-
/**
|
|
39
|
-
* Opaque content-stable identifier for this parquet file. Two requests for
|
|
40
|
-
* the same bytes MUST return the same `contentHash`; any change in bytes
|
|
41
|
-
* MUST yield a different one. The OPFS cache uses this as the file's
|
|
42
|
-
* address (encoded into the cache filename) — it is NOT required to be a
|
|
43
|
-
* SHA-256.
|
|
44
|
-
*
|
|
45
|
-
* In practice the server returns the Iceberg `data_file.file_path` object
|
|
46
|
-
* key, which is UUID-derived and content-addressed by convention.
|
|
47
|
-
*/
|
|
48
|
-
contentHash: string;
|
|
49
|
-
/** Row count, for eligibility accounting + diagnostics. */
|
|
50
|
-
rowCount: number;
|
|
51
|
-
}
|
|
52
|
-
/** Per-table resolution result. */
|
|
53
|
-
interface ResolvedTable {
|
|
54
|
-
table: FileResolutionTable;
|
|
55
|
-
/**
|
|
56
|
-
* `'browser'` — `files` is populated; the browser downloads + attaches.
|
|
57
|
-
* `'server'` — this `(site, table)` exceeds the eligibility ceiling;
|
|
58
|
-
* `files` is empty and queries route to the server tail.
|
|
59
|
-
*/
|
|
60
|
-
mode: 'browser' | 'server';
|
|
61
|
-
/** Compacted Iceberg data files. Empty when `mode === 'server'`. */
|
|
62
|
-
files: ResolvedParquetFile[];
|
|
63
|
-
/**
|
|
64
|
-
* Recent-window overlay parquet — the non-stable tail (the freshest days the
|
|
65
|
-
* ingest stability cutoff excludes from the lake), materialized out-of-band at
|
|
66
|
-
* `_recent_overlay/{site}/{searchType}/{table}.parquet`. When present, the
|
|
67
|
-
* browser unions it with an anti-join dedup (the lake wins on any shared day;
|
|
68
|
-
* the overlay supplies only days the lake lacks) so the freshest days serve
|
|
69
|
-
* from the overlay instead of returning 0. Absent (`undefined`) when no
|
|
70
|
-
* overlay exists for this `(site, searchType, table)` or for `mode: 'server'`.
|
|
71
|
-
*
|
|
72
|
-
* The overlay is OVERWRITTEN in place each sync, so its `contentHash` MUST
|
|
73
|
-
* change whenever the bytes change (the server derives it from the R2 object
|
|
74
|
-
* etag) — otherwise the OPFS cache would serve a stale overlay. The enclosing
|
|
75
|
-
* `FileResolutionResponse.snapshotVersion` folds the overlay hash in for the
|
|
76
|
-
* same reason (it gates browser re-attach).
|
|
77
|
-
*/
|
|
78
|
-
overlay?: ResolvedParquetFile;
|
|
79
|
-
/** Total bytes across `files` — compared against the ceiling. */
|
|
80
|
-
totalBytes: number;
|
|
81
|
-
/** Total rows across `files`. */
|
|
82
|
-
totalRows: number;
|
|
83
|
-
}
|
|
84
|
-
/** Server-tail directive — how an ineligible `(site, table)` is queried. */
|
|
85
|
-
interface ServerTailDirective {
|
|
86
|
-
/**
|
|
87
|
-
* `'r2-sql'` — server runs the query via R2 SQL over the Iceberg table.
|
|
88
|
-
* `'duckdb'` — server runs DuckDB-over-Iceberg-files (window functions).
|
|
89
|
-
* The hybrid split (POC Spike 4): 8/10 archetypes `r2-sql`, 2 `duckdb`.
|
|
90
|
-
*/
|
|
91
|
-
engine: 'r2-sql' | 'duckdb';
|
|
92
|
-
/** Endpoint the consumer POSTs the archetype query to. */
|
|
93
|
-
endpoint: string;
|
|
94
|
-
}
|
|
95
|
-
/** Response body of the file-resolution endpoint. */
|
|
96
|
-
interface FileResolutionResponse {
|
|
97
|
-
siteId: string;
|
|
98
|
-
searchType: GscSearchType;
|
|
99
|
-
range: {
|
|
100
|
-
start: string;
|
|
101
|
-
end: string;
|
|
102
|
-
};
|
|
103
|
-
/**
|
|
104
|
-
* Stable hash over the resolved file set. The browser re-attaches only when
|
|
105
|
-
* this changes (new compaction landed). Replaces the old `manifestVersion`.
|
|
106
|
-
*/
|
|
107
|
-
snapshotVersion: string;
|
|
108
|
-
generatedAt: string;
|
|
109
|
-
/** Per-table resolution. */
|
|
110
|
-
tables: ResolvedTable[];
|
|
111
|
-
/**
|
|
112
|
-
* Present iff at least one table resolved to `mode: 'server'`. Tells the
|
|
113
|
-
* consumer how to route the server-tail queries for those tables.
|
|
114
|
-
*/
|
|
115
|
-
serverTail?: ServerTailDirective;
|
|
116
|
-
/**
|
|
117
|
-
* The per-(site,table) browser-eligibility ceiling in effect, echoed so the
|
|
118
|
-
* consumer can show "X is too large for local analysis" UX without
|
|
119
|
-
* hard-coding the threshold.
|
|
120
|
-
*/
|
|
121
|
-
eligibilityCeiling: {
|
|
122
|
-
maxBytes: number;
|
|
123
|
-
maxRows: number;
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
5
|
export { ARCHETYPE_EXECUTION_CLASS, AccountNextAction, AccountStatus, type AddPartnerTeamMemberParams, type AnalysisSourcesOptions, type AnalysisSourcesResponse, type AnalyticsClient, AnalyticsNextAction, AnalyticsStatus, ArbitrarySqlQuery, ArchetypeExecutionClass, ArchetypeFacet, ArchetypeQuery, ArchetypeQueryBase, ArchetypeResult, ArchetypeResultRow, ArchetypeResultSource, AuxCloudOnlyQuery, type BackfillRange, type BackfillResponse, type BindPartnerSiteTeamParams, type BuilderState, 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 GscApiRange, type GscComparisonFilter, type GscRowQueryMeta, type GscRowQueryResponse, type GscSearchType, type GscdumpAnalysisParams, type GscdumpAnalysisPreset, type GscdumpAnalysisResponse, type GscdumpAnalysisSourcesResponse, type GscdumpAvailableSite, type GscdumpCanonicalMismatchRow, type GscdumpCanonicalMismatchesResponse, type GscdumpDataDetailResponse, type GscdumpDataResponse, type GscdumpDataRow, type GscdumpDateRangeParams, 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 GscdumpSiteRegistration, type GscdumpSiteReportResponse, type GscdumpSitemap, type GscdumpSitemapChangesResponse, type GscdumpSitemapHistory, type GscdumpSitemapsResponse, type GscdumpSyncJobItem, type GscdumpSyncJobStatus, type GscdumpSyncJobsQueueCounts, type GscdumpSyncJobsResponse, type GscdumpSyncProgressDateStatus, type GscdumpSyncProgressPhaseCounts, type GscdumpSyncProgressResponse, type GscdumpSyncProgressSite, type GscdumpSyncStatusResponse, 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, type PartnerClient, PartnerLifecycleAccount, PartnerLifecycleResponse, PartnerLifecycleSite, type PartnerRealtimeEvent, type PartnerRealtimeEventType, type PartnerRealtimeMessage, type PartnerWebhookData, type PartnerWebhookHeaders, PropertyNextAction, PropertyStatus, QueryArchetype, QuerySourceMode, type RealtimeAuthFailedEvent, type RealtimeAuthRequiredMessage, type RealtimeConnectedMessage, type RealtimeEnrichmentCompleteEvent, type RealtimeErrorMessage, type RealtimeIndexingCompleteEvent, type RealtimeIndexingProgressEvent, type RealtimeJobFailedEvent, type RealtimeNeedsReauthEvent, type RealtimePongMessage, type RealtimeSiteAddedEvent, type RealtimeSiteRemovedEvent, type RealtimeSitemapCompleteEvent, type RealtimeSitemapProgressEvent, type RealtimeSubscribedMessage, type RealtimeSyncCompleteEvent, type RealtimeSyncFailedEvent, type RealtimeSyncJobCompleteEvent, type RealtimeSyncProgressEvent, type RealtimeSyncSiteCompleteEvent, type RegisterPartnerSiteParams, type RegisterPartnerUserParams, ResolvedArchetypeQuery, type ResolvedParquetFile, type ResolvedTable, type RollupEnvelope, type Row, 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, TopNBreakdownQuery, 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, accountNextActions, accountStatuses, addPartnerTeamMemberSchema, analyticsEndpointSchemas, analyticsNextActions, analyticsRoutes, analyticsStatuses, backfillRangeSchema, backfillResponseSchema, bindPartnerSiteTeamSchema, builderStateSchema, bulkRegisterPartnerSitesResponseSchema, bulkRegisterPartnerSitesSchema, canonicalWebhookEventTypeSchema, countriesResponseSchema, countryRowSchema, createPartnerTeamSchema, dataDetailOptionsSchema, dataQueryOptionsSchema, gscApiRangeSchema, gscComparisonFilterSchema, gscRowQueryMetaSchema, gscRowQueryResponseSchema, gscdumpAnalysisParamsSchema, gscdumpAnalysisPresetSchema, gscdumpAnalysisResponseSchema, gscdumpAnalysisSourcesResponseSchema, gscdumpAvailableSiteSchema, gscdumpCanonicalMismatchesResponseSchema, gscdumpDataDetailResponseSchema, gscdumpDataResponseSchema, gscdumpDataRowSchema, gscdumpDateRangeParamsSchema, gscdumpDeletePartnerUserResponseSchema, gscdumpHealthResponseSchema, gscdumpIndexPercentParamsSchema, gscdumpIndexPercentResponseSchema, gscdumpIndexingDiagnosticsResponseSchema, gscdumpIndexingResponseSchema, gscdumpIndexingUrlsResponseSchema, gscdumpKeywordSparklinesParamsSchema, gscdumpKeywordSparklinesResponseSchema, gscdumpMetaSchema, gscdumpPageTrendParamsSchema, gscdumpPageTrendResponseSchema, gscdumpPermissionRecoverySchema, gscdumpQueryTrendParamsSchema, gscdumpQueryTrendResponseSchema, gscdumpSiteRegistrationSchema, gscdumpSiteReportResponseSchema, gscdumpSitemapChangesResponseSchema, 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, indexingUrlStatusSchema, indexingUrlsParamsSchema, indexingUrlsResponseSchema, inspectionHistoryRecordSchema, inspectionHistoryResponseSchema, inspectionIndexSchema, inspectionRecordRawSchema, jobFailedWebhookPayloadSchema, lifecycleErrorCodes, lifecycleErrorSchema, lifecycleProgressSchema, lifecycleWebhookEvents, parseGrantedScopes, partnerControlEndpointSchemas, partnerEndpointSchemas, partnerLifecycleAccountSchema, partnerLifecycleResponseSchema, partnerLifecycleSiteSchema, partnerRealtimeEventSchema, partnerRoutes, partnerWebhookDataSchema, partnerWebhookEnvelopeSchema, propertyNextActions, propertyStatuses, querySourceModes, registerPartnerSiteSchema, registerPartnerUserSchema, rollupEnvelopeSchema, scheduleStateSchema, searchAppearanceResponseSchema, searchAppearanceRowSchema, searchTypeSchema, siteListItemSchema, sitemapChangesResponseSchema, sitemapHistoryRecordSchema, sitemapHistoryResponseSchema, sitemapIndexSchema, sitemapNextActions, sitemapStatuses, sourceInfoResponseSchema, updatePartnerUserTokensSchema, webhookEventTypeSchema, whoamiResponseSchema };
|