@gscdump/contracts 0.21.3 → 0.22.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/index.d.mts +13 -5
- package/dist/index.mjs +4 -2
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -105,7 +105,7 @@ interface LifecycleWebhookEnvelope<TData extends Record<string, unknown> = Recor
|
|
|
105
105
|
declare function parseGrantedScopes(scopes: string | null | undefined): string[];
|
|
106
106
|
declare function hasRequiredAnalyticsScope(scopes: string | string[] | null | undefined): boolean;
|
|
107
107
|
declare function hasOptionalIndexingScope(scopes: string | string[] | null | undefined): boolean;
|
|
108
|
-
type TableName = 'pages' | 'queries' | 'countries' | 'page_queries' | 'dates' | 'search_appearance' | 'hourly_pages';
|
|
108
|
+
type TableName = 'pages' | 'queries' | 'countries' | 'page_queries' | 'dates' | 'search_appearance' | 'search_appearance_pages' | 'search_appearance_queries' | 'search_appearance_page_queries' | 'hourly_pages';
|
|
109
109
|
/**
|
|
110
110
|
* Temporal granularity axis. Daily callers (`'day'`, default) read/write rows
|
|
111
111
|
* keyed by `date`; hourly callers (`'hour'`) read/write rows that additionally
|
|
@@ -1525,8 +1525,8 @@ interface PartnerWebhookHeaders {
|
|
|
1525
1525
|
timestamp?: string | null;
|
|
1526
1526
|
signature?: string | null;
|
|
1527
1527
|
}
|
|
1528
|
-
/** The
|
|
1529
|
-
type FileResolutionTable = 'pages' | 'queries' | 'countries' | 'page_queries' | 'dates';
|
|
1528
|
+
/** The 6 Iceberg fact tables — string-typed here to avoid an engine dep. */
|
|
1529
|
+
type FileResolutionTable = 'pages' | 'queries' | 'countries' | 'page_queries' | 'dates' | 'search_appearance' | 'search_appearance_pages' | 'search_appearance_queries' | 'search_appearance_page_queries';
|
|
1530
1530
|
/** Request query params for `GET /api/sites/[siteId]/analysis-sources`. */
|
|
1531
1531
|
interface FileResolutionRequest {
|
|
1532
1532
|
/** `YYYY-MM-DD` inclusive. Required — no date range = no resolution. */
|
|
@@ -1559,8 +1559,14 @@ interface ResolvedParquetFile {
|
|
|
1559
1559
|
/** Byte size — drives the browser-eligibility sum and OPFS quota planning. */
|
|
1560
1560
|
bytes: number;
|
|
1561
1561
|
/**
|
|
1562
|
-
*
|
|
1563
|
-
*
|
|
1562
|
+
* Opaque content-stable identifier for this parquet file. Two requests for
|
|
1563
|
+
* the same bytes MUST return the same `contentHash`; any change in bytes
|
|
1564
|
+
* MUST yield a different one. The OPFS cache uses this as the file's
|
|
1565
|
+
* address (encoded into the cache filename) — it is NOT required to be a
|
|
1566
|
+
* SHA-256.
|
|
1567
|
+
*
|
|
1568
|
+
* In practice the server returns the Iceberg `data_file.file_path` object
|
|
1569
|
+
* key, which is UUID-derived and content-addressed by convention.
|
|
1564
1570
|
*/
|
|
1565
1571
|
contentHash: string;
|
|
1566
1572
|
/** Row count, for eligibility accounting + diagnostics. */
|
|
@@ -1707,7 +1713,9 @@ declare const analyticsRoutes: {
|
|
|
1707
1713
|
readonly indexingInspect: (siteId: string) => string;
|
|
1708
1714
|
readonly countries: (siteId: string) => string;
|
|
1709
1715
|
readonly searchAppearance: (siteId: string) => string;
|
|
1716
|
+
readonly topAssociation: (siteId: string) => string;
|
|
1710
1717
|
};
|
|
1718
|
+
readonly syncProgress: "/api/sync-progress";
|
|
1711
1719
|
};
|
|
1712
1720
|
/**
|
|
1713
1721
|
* GSC search-type slice validator. Mirrors the `GscSearchType` union from
|
package/dist/index.mjs
CHANGED
|
@@ -200,8 +200,10 @@ const analyticsRoutes = {
|
|
|
200
200
|
indexingDiagnostics: (siteId) => `/api/__gsc/sites/${encodeURIComponent(siteId)}/indexing/diagnostics`,
|
|
201
201
|
indexingInspect: (siteId) => `/api/__gsc/sites/${encodeURIComponent(siteId)}/indexing/inspect`,
|
|
202
202
|
countries: (siteId) => `/api/__gsc/sites/${encodeURIComponent(siteId)}/countries`,
|
|
203
|
-
searchAppearance: (siteId) => `/api/__gsc/sites/${encodeURIComponent(siteId)}/search-appearance
|
|
204
|
-
|
|
203
|
+
searchAppearance: (siteId) => `/api/__gsc/sites/${encodeURIComponent(siteId)}/search-appearance`,
|
|
204
|
+
topAssociation: (siteId) => `/api/__gsc/sites/${encodeURIComponent(siteId)}/data/top-association`
|
|
205
|
+
},
|
|
206
|
+
syncProgress: "/api/sync-progress"
|
|
205
207
|
};
|
|
206
208
|
const WEBHOOK_CONTRACT_VERSION = "2026-05-11";
|
|
207
209
|
const WEBHOOK_SIGNATURE_HEADER = "X-GSCDump-Signature";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gscdump/contracts",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.22.4",
|
|
5
5
|
"description": "Shared gscdump.com API, webhook, realtime, and lifecycle contracts.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"typescript": "^6.0.3",
|
|
43
|
-
"vitest": "^4.1.
|
|
43
|
+
"vitest": "^4.1.7"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "obuild",
|