@gscdump/sdk 0.20.3 → 0.21.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/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { AddPartnerTeamMemberParams, AnalyticsClient, AnalyticsClient as AnalyticsClient$1, BackfillRange, BackfillResponse, BindPartnerSiteTeamParams, BuilderState, BulkRegisterPartnerSiteResult, BulkRegisterPartnerSitesParams, BulkRegisterPartnerSitesResponse, CANONICAL_WEBHOOK_EVENTS, CanonicalWebhookEventType, CreatePartnerTeamParams, CreateWebhookEnvelopeOptions, DataDetailOptions, DataQueryOptions, DeletePartnerUserResponse, GscComparisonFilter, GscdumpAnalysisParams, GscdumpAnalysisPreset, GscdumpAnalysisResponse, GscdumpAnalysisSourcesResponse, GscdumpAvailableSite, GscdumpCanonicalMismatchesResponse, GscdumpDataDetailResponse, GscdumpDataResponse, GscdumpDataRow, GscdumpDateRangeParams, GscdumpIndexPercentResponse, GscdumpIndexingDiagnosticsResponse, GscdumpIndexingResponse, GscdumpIndexingUrlStatus, GscdumpIndexingUrlsResponse, GscdumpKeywordSparklinesParams, GscdumpKeywordSparklinesResponse, GscdumpMeta, GscdumpPermissionRecovery, GscdumpQueryTrendParams, GscdumpQueryTrendResponse, GscdumpSiteRegistration, GscdumpSitemap, GscdumpSitemapChangesResponse, GscdumpSitemapHistory, GscdumpSitemapsResponse, GscdumpSyncStatusResponse, GscdumpSyncStatusResponse as GscdumpSyncStatusResponse$1, GscdumpTeamMemberRow, GscdumpTeamRow, GscdumpTopAssociationParams, GscdumpTopAssociationResponse, GscdumpTotals, GscdumpUserRegistration, GscdumpUserSettings, GscdumpUserSite, GscdumpUserSite as GscdumpUserSite$1, GscdumpUserStatus, GscdumpUserTokenUpdate, IndexingUrlsParams, InspectionHistoryResponse, InspectionIndex, PartnerClient, PartnerClient as PartnerClient$1, PartnerLifecycleAccount, PartnerLifecycleResponse, PartnerLifecycleResponse as PartnerLifecycleResponse$1, PartnerLifecycleSite, PartnerLifecycleSite as PartnerLifecycleSite$1, PartnerRealtimeEvent, PartnerRealtimeEvent as PartnerRealtimeEvent$1, PartnerRealtimeEventType, PartnerRealtimeMessage, PartnerRealtimeMessage as PartnerRealtimeMessage$1, PartnerWebhookData, PartnerWebhookHeaders, PartnerWebhookHeaders as PartnerWebhookHeaders$1, RealtimeAuthFailedEvent, RealtimeAuthRequiredMessage, RealtimeConnectedMessage, RealtimeEnrichmentCompleteEvent, RealtimeErrorMessage, RealtimeJobFailedEvent, RealtimeNeedsReauthEvent, RealtimePongMessage, RealtimeSiteAddedEvent, RealtimeSiteRemovedEvent, RealtimeSubscribedMessage, RealtimeSyncCompleteEvent, RealtimeSyncFailedEvent, RealtimeSyncJobCompleteEvent, RealtimeSyncProgressEvent, RealtimeSyncSiteCompleteEvent, RegisterPartnerSiteParams, RegisterPartnerUserParams, RollupEnvelope, UpdatePartnerUserTokensParams, VALID_WEBHOOK_EVENTS, WEBHOOK_CONTRACT_VERSION, WEBHOOK_CONTRACT_VERSION_HEADER, WEBHOOK_DELIVERY_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, WebhookEnvelope, WebhookEnvelope as WebhookEnvelope$1, WebhookEventType, WhoamiResponse } from "@gscdump/contracts";
2
+ import { BuilderState as BuilderState$1, Dimension, Metric, SearchType } from "gscdump/query";
2
3
  export * from "@gscdump/contracts";
3
4
  type PartnerFetch = <T = unknown>(request: string, options?: PartnerFetchOptions) => Promise<T>;
4
5
  type PartnerHeaders = HeadersInit | (() => HeadersInit | Promise<HeadersInit>);
@@ -36,6 +37,197 @@ interface AnalyticsClientOptions {
36
37
  validate?: boolean | 'request' | 'response';
37
38
  }
38
39
  declare function createAnalyticsClient(options?: AnalyticsClientOptions): AnalyticsClient$1;
40
+ /** The 10 archetype identifiers. */
41
+ type QueryArchetype = 'site-daily-timeseries' | 'entity-daily-timeseries' | 'entity-daily-sparkline' | 'top-n-breakdown' | 'single-row-lookup' | 'multi-series-stacked-daily' | 'preset-analyzer' | 'two-dimension-detail' | 'arbitrary-sql' | 'aux-cloud-only';
42
+ /**
43
+ * Where an archetype can run.
44
+ * - `r2-sql` — expressible in R2 SQL directly (plain GROUP BY + aggregate).
45
+ * - `r2-sql-resolved` — R2-SQL-expressible only AFTER the resolver pre-resolves
46
+ * entity selections to a literal `IN` list (no `FROM`
47
+ * subquery in R2 SQL). Archetypes 2, 3, 4.
48
+ * - `duckdb` — needs window functions / `QUALIFY` / `COUNT(DISTINCT)` /
49
+ * `OFFSET`; server tail must use DuckDB-over-Iceberg-files.
50
+ * - `cloud-only` — not an Iceberg query (aux data: canonicals, sitemaps,
51
+ * indexing). Always served by the existing cloud endpoints.
52
+ */
53
+ type ArchetypeExecutionClass = 'r2-sql' | 'r2-sql-resolved' | 'duckdb' | 'cloud-only';
54
+ /** Static execution-class tag per archetype. The server-tail router reads this. */
55
+ declare const ARCHETYPE_EXECUTION_CLASS: Record<QueryArchetype, ArchetypeExecutionClass>;
56
+ /** Date window every archetype query is scoped to. */
57
+ interface DateRange {
58
+ /** `YYYY-MM-DD` inclusive. */
59
+ start: string;
60
+ /** `YYYY-MM-DD` inclusive. */
61
+ end: string;
62
+ }
63
+ /** Fields common to every archetype query input. */
64
+ interface ArchetypeQueryBase {
65
+ archetype: QueryArchetype;
66
+ siteId: string;
67
+ searchType: SearchType;
68
+ range: DateRange;
69
+ /**
70
+ * Optional prior window for YoY / period-over-period comparison. Widest
71
+ * supported total span is ~24 months (12-month period + YoY).
72
+ */
73
+ compareRange?: DateRange;
74
+ }
75
+ /**
76
+ * Whole-site metrics grouped by date. Reads `dates`, the authoritative daily
77
+ * total table (site totals + anonymized impressions + device pivot).
78
+ * R2 SQL: `GROUP BY date`.
79
+ */
80
+ interface SiteDailyTimeseriesQuery extends ArchetypeQueryBase {
81
+ archetype: 'site-daily-timeseries';
82
+ metrics: readonly Metric[];
83
+ }
84
+ /**
85
+ * Daily metrics for ONE resolved entity (a page or query). The resolver must
86
+ * resolve `entity.value` to a literal before hitting R2 SQL.
87
+ */
88
+ interface EntityDailyTimeseriesQuery extends ArchetypeQueryBase {
89
+ archetype: 'entity-daily-timeseries';
90
+ entity: {
91
+ dimension: Extract<Dimension, 'page' | 'query'>;
92
+ value: string;
93
+ };
94
+ metrics: readonly Metric[];
95
+ }
96
+ /**
97
+ * Compact daily series for the top-N entities at once (sparkline column in a
98
+ * table). Resolver pre-resolves the top-N entity list to a literal `IN`.
99
+ */
100
+ interface EntityDailySparklineQuery extends ArchetypeQueryBase {
101
+ archetype: 'entity-daily-sparkline';
102
+ dimension: Extract<Dimension, 'page' | 'query'>;
103
+ /** Entity values already resolved by the resolver layer. */
104
+ entities: readonly string[];
105
+ /** Single metric the sparkline plots. */
106
+ metric: Metric;
107
+ }
108
+ /**
109
+ * Ranked breakdown over one dimension. `GROUP BY` + `ORDER BY` + `LIMIT`.
110
+ * Device breakdowns read the wide `dates` table and unpivot its device columns
111
+ * (`clicks_desktop`, `impressions_mobile`, etc.) at query time.
112
+ * `offset` pagination is UNVERIFIED in R2 SQL (POC) — when set, the router
113
+ * may escalate to `duckdb`.
114
+ */
115
+ interface TopNBreakdownQuery extends ArchetypeQueryBase {
116
+ archetype: 'top-n-breakdown';
117
+ dimension: Dimension;
118
+ metrics: readonly Metric[];
119
+ /** Sort column + direction. */
120
+ orderBy: {
121
+ metric: Metric;
122
+ dir: 'asc' | 'desc';
123
+ };
124
+ limit: number;
125
+ /** Pagination offset. Non-zero may force `duckdb` execution. */
126
+ offset?: number;
127
+ }
128
+ /** One aggregated row for a fully-specified filter. `WHERE` + `GROUP BY`. */
129
+ interface SingleRowLookupQuery extends ArchetypeQueryBase {
130
+ archetype: 'single-row-lookup';
131
+ /** Exact dimension-value filters identifying the row. */
132
+ match: Partial<Record<Dimension, string>>;
133
+ metrics: readonly Metric[];
134
+ }
135
+ /**
136
+ * Daily metrics split by a secondary dimension. `GROUP BY date, <dim>`.
137
+ * Device split charts read `dates` and unpivot the wide device columns.
138
+ */
139
+ interface MultiSeriesStackedDailyQuery extends ArchetypeQueryBase {
140
+ archetype: 'multi-series-stacked-daily';
141
+ /** The series dimension, e.g. `device` or `country`. */
142
+ seriesDimension: Dimension;
143
+ metric: Metric;
144
+ }
145
+ /**
146
+ * A named analysis preset (striking-distance, opportunity, etc.). Most are
147
+ * `GROUP BY` + `HAVING`; the ones needing window functions are tagged
148
+ * `arbitrary-sql` (9) instead — `presetId`s here are R2-SQL-safe.
149
+ */
150
+ interface PresetAnalyzerQuery extends ArchetypeQueryBase {
151
+ archetype: 'preset-analyzer';
152
+ /** Analyzer id — matches `AnalysisTool` in `@gscdump/engine`. */
153
+ presetId: string;
154
+ /** Preset-specific parameters (thresholds, limits). */
155
+ params?: Record<string, unknown>;
156
+ }
157
+ /**
158
+ * The whale archetype — `page_queries` grouped by `(url, query)`. The query ×
159
+ * page cross no longer reads the retired `page_keywords` table name. This is
160
+ * the reason the server tail exists. R2-SQL-expressible
161
+ * (`GROUP BY url, query`).
162
+ */
163
+ interface TwoDimensionDetailQuery extends ArchetypeQueryBase {
164
+ archetype: 'two-dimension-detail';
165
+ metrics: readonly Metric[];
166
+ /** Optional page or query prefilter to narrow the cross. */
167
+ filter?: {
168
+ page?: string;
169
+ query?: string;
170
+ };
171
+ orderBy?: {
172
+ metric: Metric;
173
+ dir: 'asc' | 'desc';
174
+ };
175
+ limit?: number;
176
+ }
177
+ /**
178
+ * Escape hatch — caller-supplied SQL (moving averages, ranks, window
179
+ * functions). ALWAYS `duckdb` on the server tail; R2 SQL cannot express it.
180
+ * In the browser, runs against the attached DuckDB-WASM views directly.
181
+ */
182
+ interface ArbitrarySqlQuery extends ArchetypeQueryBase {
183
+ archetype: 'arbitrary-sql';
184
+ /** SQL referencing the attached table views by their `IcebergTableName`. */
185
+ sql: string;
186
+ params?: readonly unknown[];
187
+ }
188
+ /**
189
+ * Non-fact-table data: canonicals, sitemaps, indexing status. Not an Iceberg
190
+ * query — served by the existing cloud endpoints. Present in the union so the
191
+ * archetype router can recognise and route it without a special case.
192
+ */
193
+ interface AuxCloudOnlyQuery {
194
+ archetype: 'aux-cloud-only';
195
+ siteId: string;
196
+ /** Which aux dataset. */
197
+ dataset: 'canonicals' | 'sitemaps' | 'indexing';
198
+ params?: Record<string, unknown>;
199
+ }
200
+ /** Discriminated union of every archetype query input. */
201
+ type ArchetypeQuery = SiteDailyTimeseriesQuery | EntityDailyTimeseriesQuery | EntityDailySparklineQuery | TopNBreakdownQuery | SingleRowLookupQuery | MultiSeriesStackedDailyQuery | PresetAnalyzerQuery | TwoDimensionDetailQuery | ArbitrarySqlQuery | AuxCloudOnlyQuery;
202
+ /** A single result row — dimension values plus metric values, all flat. */
203
+ type ArchetypeResultRow = Record<string, string | number | null>;
204
+ /** Where the result was actually computed (for diagnostics + UX). */
205
+ type ArchetypeResultSource = 'browser' | 'server-r2-sql' | 'server-duckdb' | 'cloud';
206
+ /** Uniform result envelope returned for any archetype. */
207
+ interface ArchetypeResult<R extends ArchetypeResultRow = ArchetypeResultRow> {
208
+ archetype: QueryArchetype;
209
+ rows: R[];
210
+ source: ArchetypeResultSource;
211
+ meta?: {
212
+ rowCount: number;
213
+ queryMs: number; /** Set when `compareRange` was supplied — the comparison-period rows. */
214
+ compareRows?: R[];
215
+ truncated?: boolean;
216
+ };
217
+ }
218
+ /**
219
+ * Bridge: an archetype query also carries (or resolves to) a `BuilderState`,
220
+ * so the existing query-resolver / `buildLogicalPlan` path stays the executor.
221
+ * The resolver layer attaches this. Implementation agents: DO NOT bypass
222
+ * `BuilderState` — the archetype is the typed front door, `BuilderState` the
223
+ * shared backend.
224
+ */
225
+ interface ResolvedArchetypeQuery {
226
+ query: ArchetypeQuery;
227
+ /** Undefined only for `aux-cloud-only`, which has no `BuilderState`. */
228
+ builder?: BuilderState$1;
229
+ executionClass: ArchetypeExecutionClass;
230
+ }
39
231
  type PartnerErrorKind = 'auth' | 'rate-limit' | 'provisioning' | 'permission' | 'network' | 'validation' | 'not-found' | 'server' | 'unknown';
40
232
  interface PartnerErrorInfo {
41
233
  kind: PartnerErrorKind;
@@ -113,4 +305,4 @@ declare function parseWebhookPayload<TData extends Record<string, unknown> = Rec
113
305
  validateSignature?: boolean;
114
306
  }): Promise<WebhookEnvelope$1<TData>>;
115
307
  declare function readWebhookHeaders(headers: Headers | PartnerWebhookHeaders$1 | null | undefined): Required<PartnerWebhookHeaders$1>;
116
- export { type AddPartnerTeamMemberParams, type AnalyticsClient, type AnalyticsClientOptions, type AnalyticsFetch, type AnalyticsFetchOptions, type AnalyticsHeaders, type BackfillRange, type BackfillResponse, type BindPartnerSiteTeamParams, type BuilderState, type BulkRegisterPartnerSiteResult, type BulkRegisterPartnerSitesParams, type BulkRegisterPartnerSitesResponse, CANONICAL_WEBHOOK_EVENTS, type CanonicalWebhookEventType, type CreatePartnerTeamParams, type CreateWebhookEnvelopeOptions, type DataDetailOptions, type DataQueryOptions, type DeletePartnerUserResponse, type GscComparisonFilter, type GscdumpAnalysisParams, type GscdumpAnalysisPreset, type GscdumpAnalysisResponse, type GscdumpAnalysisSourcesResponse, type GscdumpAvailableSite, type GscdumpCanonicalMismatchesResponse, type GscdumpDataDetailResponse, type GscdumpDataResponse, type GscdumpDataRow, type GscdumpDateRangeParams, type GscdumpIndexPercentResponse, type GscdumpIndexingDiagnosticsResponse, type GscdumpIndexingResponse, type GscdumpIndexingUrlStatus, type GscdumpIndexingUrlsResponse, type GscdumpKeywordSparklinesParams, type GscdumpKeywordSparklinesResponse, type GscdumpMeta, type GscdumpPermissionRecovery, type GscdumpQueryTrendParams, type GscdumpQueryTrendResponse, type GscdumpSiteRegistration, type GscdumpSitemap, type GscdumpSitemapChangesResponse, type GscdumpSitemapHistory, type GscdumpSitemapsResponse, type GscdumpSyncStatusResponse, type GscdumpTeamMemberRow, type GscdumpTeamRow, type GscdumpTopAssociationParams, type GscdumpTopAssociationResponse, type GscdumpTotals, type GscdumpUserRegistration, type GscdumpUserSettings, type GscdumpUserSite, type GscdumpUserStatus, type GscdumpUserTokenUpdate, type IndexingUrlsParams, type InspectionHistoryResponse, type InspectionIndex, PartnerApiError, type PartnerClient, type PartnerClientOptions, type PartnerErrorInfo, type PartnerErrorKind, type PartnerFetch, type PartnerFetchOptions, type PartnerHeaders, type PartnerLifecycleAccount, type PartnerLifecycleResponse, type PartnerLifecycleSite, type PartnerRealtimeClient, type PartnerRealtimeEvent, type PartnerRealtimeEventType, type PartnerRealtimeHandler, type PartnerRealtimeMessage, type PartnerRealtimeOptions, type PartnerRealtimeScope, type PartnerRealtimeStatus, type PartnerWebSocketConstructor, type PartnerWebSocketLike, type PartnerWebhookData, type PartnerWebhookHeaders, type RealtimeAuthFailedEvent, type RealtimeAuthRequiredMessage, type RealtimeConnectedMessage, type RealtimeEnrichmentCompleteEvent, type RealtimeErrorMessage, type RealtimeJobFailedEvent, type RealtimeNeedsReauthEvent, type RealtimePongMessage, type RealtimeSiteAddedEvent, type RealtimeSiteRemovedEvent, type RealtimeSubscribedMessage, type RealtimeSyncCompleteEvent, type RealtimeSyncFailedEvent, type RealtimeSyncJobCompleteEvent, type RealtimeSyncProgressEvent, type RealtimeSyncSiteCompleteEvent, type RegisterPartnerSiteParams, type RegisterPartnerUserParams, type RollupEnvelope, 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, analyticsStatusToSyncStatus, createAnalyticsClient, createGscdumpClient, createGscdumpRealtimeClient, createPartnerClient, createPartnerRealtimeClient, findLifecycleSite, lifecycleSiteToSyncStatus, lifecycleSiteToUserSite, parseWebhookPayload, readWebhookHeaders, serializeWebhookPayload, toPartnerError, verifyWebhookSignature };
308
+ export { ARCHETYPE_EXECUTION_CLASS, type AddPartnerTeamMemberParams, type AnalyticsClient, type AnalyticsClientOptions, type AnalyticsFetch, type AnalyticsFetchOptions, type AnalyticsHeaders, type ArbitrarySqlQuery, type ArchetypeExecutionClass, type ArchetypeQuery, type ArchetypeQueryBase, type ArchetypeResult, type ArchetypeResultRow, type ArchetypeResultSource, type AuxCloudOnlyQuery, type BackfillRange, type BackfillResponse, type BindPartnerSiteTeamParams, type BuilderState, type BulkRegisterPartnerSiteResult, type BulkRegisterPartnerSitesParams, type BulkRegisterPartnerSitesResponse, CANONICAL_WEBHOOK_EVENTS, type CanonicalWebhookEventType, type CreatePartnerTeamParams, type CreateWebhookEnvelopeOptions, type DataDetailOptions, type DataQueryOptions, type DateRange, type DeletePartnerUserResponse, type EntityDailySparklineQuery, type EntityDailyTimeseriesQuery, type GscComparisonFilter, type GscdumpAnalysisParams, type GscdumpAnalysisPreset, type GscdumpAnalysisResponse, type GscdumpAnalysisSourcesResponse, type GscdumpAvailableSite, type GscdumpCanonicalMismatchesResponse, type GscdumpDataDetailResponse, type GscdumpDataResponse, type GscdumpDataRow, type GscdumpDateRangeParams, type GscdumpIndexPercentResponse, type GscdumpIndexingDiagnosticsResponse, type GscdumpIndexingResponse, type GscdumpIndexingUrlStatus, type GscdumpIndexingUrlsResponse, type GscdumpKeywordSparklinesParams, type GscdumpKeywordSparklinesResponse, type GscdumpMeta, type GscdumpPermissionRecovery, type GscdumpQueryTrendParams, type GscdumpQueryTrendResponse, type GscdumpSiteRegistration, type GscdumpSitemap, type GscdumpSitemapChangesResponse, type GscdumpSitemapHistory, type GscdumpSitemapsResponse, type GscdumpSyncStatusResponse, type GscdumpTeamMemberRow, type GscdumpTeamRow, type GscdumpTopAssociationParams, type GscdumpTopAssociationResponse, type GscdumpTotals, type GscdumpUserRegistration, type GscdumpUserSettings, type GscdumpUserSite, type GscdumpUserStatus, type GscdumpUserTokenUpdate, type IndexingUrlsParams, type InspectionHistoryResponse, type InspectionIndex, type MultiSeriesStackedDailyQuery, PartnerApiError, type PartnerClient, type PartnerClientOptions, type PartnerErrorInfo, type PartnerErrorKind, type PartnerFetch, type PartnerFetchOptions, type PartnerHeaders, type PartnerLifecycleAccount, type PartnerLifecycleResponse, type PartnerLifecycleSite, type PartnerRealtimeClient, type PartnerRealtimeEvent, type PartnerRealtimeEventType, type PartnerRealtimeHandler, type PartnerRealtimeMessage, type PartnerRealtimeOptions, type PartnerRealtimeScope, type PartnerRealtimeStatus, type PartnerWebSocketConstructor, type PartnerWebSocketLike, type PartnerWebhookData, type PartnerWebhookHeaders, type PresetAnalyzerQuery, type QueryArchetype, type RealtimeAuthFailedEvent, type RealtimeAuthRequiredMessage, type RealtimeConnectedMessage, type RealtimeEnrichmentCompleteEvent, type RealtimeErrorMessage, type RealtimeJobFailedEvent, type RealtimeNeedsReauthEvent, type RealtimePongMessage, type RealtimeSiteAddedEvent, type RealtimeSiteRemovedEvent, type RealtimeSubscribedMessage, type RealtimeSyncCompleteEvent, type RealtimeSyncFailedEvent, type RealtimeSyncJobCompleteEvent, type RealtimeSyncProgressEvent, type RealtimeSyncSiteCompleteEvent, type RegisterPartnerSiteParams, type RegisterPartnerUserParams, type ResolvedArchetypeQuery, type RollupEnvelope, type SingleRowLookupQuery, type SiteDailyTimeseriesQuery, type TopNBreakdownQuery, type 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, analyticsStatusToSyncStatus, createAnalyticsClient, createGscdumpClient, createGscdumpRealtimeClient, createPartnerClient, createPartnerRealtimeClient, findLifecycleSite, lifecycleSiteToSyncStatus, lifecycleSiteToUserSite, parseWebhookPayload, readWebhookHeaders, serializeWebhookPayload, toPartnerError, verifyWebhookSignature };
package/dist/index.mjs CHANGED
@@ -200,6 +200,18 @@ function createAnalyticsClient(options = {}) {
200
200
  }
201
201
  };
202
202
  }
203
+ const ARCHETYPE_EXECUTION_CLASS = {
204
+ "site-daily-timeseries": "r2-sql",
205
+ "entity-daily-timeseries": "r2-sql-resolved",
206
+ "entity-daily-sparkline": "r2-sql-resolved",
207
+ "top-n-breakdown": "r2-sql-resolved",
208
+ "single-row-lookup": "r2-sql",
209
+ "multi-series-stacked-daily": "r2-sql",
210
+ "preset-analyzer": "r2-sql",
211
+ "two-dimension-detail": "r2-sql",
212
+ "arbitrary-sql": "duckdb",
213
+ "aux-cloud-only": "cloud-only"
214
+ };
203
215
  function normalizeLifecycleUrl(url) {
204
216
  return (url || "").replace(/^sc-domain:/, "").replace(/^https?:\/\//, "").replace(/^www\./, "").replace(/\/$/, "").toLowerCase();
205
217
  }
@@ -884,4 +896,4 @@ function readWebhookHeaders(headers) {
884
896
  signature: headers.signature ?? null
885
897
  };
886
898
  }
887
- export { CANONICAL_WEBHOOK_EVENTS, PartnerApiError, VALID_WEBHOOK_EVENTS, WEBHOOK_CONTRACT_VERSION, WEBHOOK_CONTRACT_VERSION_HEADER, WEBHOOK_DELIVERY_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, analyticsStatusToSyncStatus, createAnalyticsClient, createGscdumpClient, createGscdumpRealtimeClient, createPartnerClient, createPartnerRealtimeClient, findLifecycleSite, lifecycleSiteToSyncStatus, lifecycleSiteToUserSite, parseWebhookPayload, readWebhookHeaders, serializeWebhookPayload, toPartnerError, verifyWebhookSignature };
899
+ export { ARCHETYPE_EXECUTION_CLASS, CANONICAL_WEBHOOK_EVENTS, PartnerApiError, VALID_WEBHOOK_EVENTS, WEBHOOK_CONTRACT_VERSION, WEBHOOK_CONTRACT_VERSION_HEADER, WEBHOOK_DELIVERY_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, analyticsStatusToSyncStatus, createAnalyticsClient, createGscdumpClient, createGscdumpRealtimeClient, createPartnerClient, createPartnerRealtimeClient, findLifecycleSite, lifecycleSiteToSyncStatus, lifecycleSiteToUserSite, parseWebhookPayload, readWebhookHeaders, serializeWebhookPayload, toPartnerError, verifyWebhookSignature };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gscdump/sdk",
3
3
  "type": "module",
4
- "version": "0.20.3",
4
+ "version": "0.21.1",
5
5
  "description": "Consumer SDK for hosted gscdump.com integrations.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",
@@ -41,7 +41,7 @@
41
41
  "node": ">=18"
42
42
  },
43
43
  "peerDependencies": {
44
- "gscdump": "0.20.3"
44
+ "gscdump": "0.21.1"
45
45
  },
46
46
  "peerDependenciesMeta": {
47
47
  "gscdump": {
@@ -51,7 +51,7 @@
51
51
  "dependencies": {
52
52
  "ofetch": "^1.5.1",
53
53
  "zod": "^4.4.3",
54
- "@gscdump/contracts": "0.20.3"
54
+ "@gscdump/contracts": "0.21.1"
55
55
  },
56
56
  "devDependencies": {
57
57
  "typescript": "^6.0.3",