@gscdump/contracts 0.21.2 → 0.22.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.
Files changed (2) hide show
  1. package/dist/index.d.mts +11 -5
  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 5 Iceberg fact tables — string-typed here to avoid an engine dep. */
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
- * Content hash of the file (Iceberg data-file digest). The browser
1563
- * verifies the OPFS-cached copy against this before attaching.
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. */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gscdump/contracts",
3
3
  "type": "module",
4
- "version": "0.21.2",
4
+ "version": "0.22.1",
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.6"
43
+ "vitest": "^4.1.7"
44
44
  },
45
45
  "scripts": {
46
46
  "build": "obuild",