@gscdump/contracts 1.4.2 → 1.4.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.
@@ -11,33 +11,33 @@ interface NormalizedFilterV1 {
11
11
  _nestedGroups?: NormalizedFilterV1[];
12
12
  _groupType?: 'and' | 'or';
13
13
  }
14
- declare const GSCDUMP_V1_ANALYTICS_DIMENSIONS: readonly ['page', 'query', 'queryCanonical', 'country', 'device', 'date', 'searchAppearance', 'hour'];
14
+ declare const GSCDUMP_V1_ANALYTICS_DIMENSIONS: readonly ["page", "query", "queryCanonical", "country", "device", "date", "searchAppearance", "hour"];
15
15
  declare function createGscdumpV1BrowserSchemas(realtimeSchemas?: RealtimeV1Schemas): {
16
16
  analyticsRowsRequest: z.ZodObject<{
17
17
  dimensions: z.ZodArray<z.ZodEnum<{
18
- country: "country";
19
- date: "date";
20
- device: "device";
21
- hour: "hour";
22
18
  page: "page";
23
19
  query: "query";
24
20
  queryCanonical: "queryCanonical";
21
+ country: "country";
22
+ device: "device";
23
+ date: "date";
25
24
  searchAppearance: "searchAppearance";
25
+ hour: "hour";
26
26
  }>>;
27
27
  metrics: z.ZodOptional<z.ZodArray<z.ZodEnum<{
28
28
  clicks: "clicks";
29
- ctr: "ctr";
30
29
  impressions: "impressions";
30
+ ctr: "ctr";
31
31
  position: "position";
32
32
  }>>>;
33
33
  filter: z.ZodOptional<z.ZodType<NormalizedFilterV1, unknown, z.core.$ZodTypeInternals<NormalizedFilterV1, unknown>>>;
34
34
  prefilter: z.ZodOptional<z.ZodType<NormalizedFilterV1, unknown, z.core.$ZodTypeInternals<NormalizedFilterV1, unknown>>>;
35
35
  orderBy: z.ZodOptional<z.ZodObject<{
36
36
  column: z.ZodEnum<{
37
- clicks: "clicks";
38
- ctr: "ctr";
39
37
  date: "date";
38
+ clicks: "clicks";
40
39
  impressions: "impressions";
40
+ ctr: "ctr";
41
41
  position: "position";
42
42
  }>;
43
43
  dir: z.ZodEnum<{
@@ -48,23 +48,23 @@ declare function createGscdumpV1BrowserSchemas(realtimeSchemas?: RealtimeV1Schem
48
48
  rowLimit: z.ZodOptional<z.ZodNumber>;
49
49
  startRow: z.ZodOptional<z.ZodNumber>;
50
50
  dataState: z.ZodOptional<z.ZodEnum<{
51
- all: "all";
52
51
  final: "final";
52
+ all: "all";
53
53
  hourly_all: "hourly_all";
54
54
  }>>;
55
55
  aggregationType: z.ZodOptional<z.ZodEnum<{
56
56
  auto: "auto";
57
- byNewsShowcasePanel: "byNewsShowcasePanel";
58
57
  byPage: "byPage";
59
58
  byProperty: "byProperty";
59
+ byNewsShowcasePanel: "byNewsShowcasePanel";
60
60
  }>>;
61
61
  searchType: z.ZodOptional<z.ZodEnum<{
62
- discover: "discover";
63
- googleNews: "googleNews";
62
+ web: "web";
64
63
  image: "image";
65
- news: "news";
66
64
  video: "video";
67
- web: "web";
65
+ news: "news";
66
+ discover: "discover";
67
+ googleNews: "googleNews";
68
68
  }>>;
69
69
  }, z.core.$strict>;
70
70
  analyticsRowsResponse: CompatibleResponseSchema<z.ZodObject<{
@@ -105,21 +105,21 @@ declare function createGscdumpV1BrowserSchemas(realtimeSchemas?: RealtimeV1Schem
105
105
  readonly currentTeamId: z.ZodNullable<z.ZodString>;
106
106
  readonly account: z.ZodObject<{
107
107
  readonly status: z.ZodEnum<{
108
- db_provisioning: "db_provisioning";
108
+ ready: "ready";
109
109
  disconnected: "disconnected";
110
110
  oauth_received: "oauth_received";
111
- ready: "ready";
112
- reauth_required: "reauth_required";
113
- refresh_missing: "refresh_missing";
114
111
  scope_missing: "scope_missing";
112
+ refresh_missing: "refresh_missing";
113
+ db_provisioning: "db_provisioning";
114
+ reauth_required: "reauth_required";
115
115
  }>;
116
116
  readonly grantedScopes: z.ZodArray<z.ZodString>;
117
117
  readonly missingScopes: z.ZodArray<z.ZodString>;
118
118
  readonly nextAction: z.ZodEnum<{
119
119
  connect_google: "connect_google";
120
- none: "none";
121
120
  reconnect_google: "reconnect_google";
122
121
  wait_for_provisioning: "wait_for_provisioning";
122
+ none: "none";
123
123
  }>;
124
124
  }, z.core.$strip>;
125
125
  readonly sites: z.ZodArray<z.ZodObject<{
@@ -130,31 +130,31 @@ declare function createGscdumpV1BrowserSchemas(realtimeSchemas?: RealtimeV1Schem
130
130
  readonly permissionLevel: z.ZodNullable<z.ZodString>;
131
131
  readonly property: z.ZodObject<{
132
132
  readonly status: z.ZodEnum<{
133
- linked: "linked";
134
- no_gsc_property: "no_gsc_property";
135
133
  no_local_site: "no_local_site";
136
- registered: "registered";
134
+ no_gsc_property: "no_gsc_property";
137
135
  unverified_property: "unverified_property";
138
136
  verified_candidate: "verified_candidate";
137
+ registered: "registered";
138
+ linked: "linked";
139
139
  }>;
140
140
  readonly nextAction: z.ZodEnum<{
141
- choose_property: "choose_property";
142
- create_site: "create_site";
143
141
  none: "none";
144
- register_site: "register_site";
142
+ create_site: "create_site";
145
143
  verify_gsc_property: "verify_gsc_property";
144
+ choose_property: "choose_property";
145
+ register_site: "register_site";
146
146
  }>;
147
147
  }, z.core.$strip>;
148
148
  readonly analytics: z.ZodObject<{
149
149
  readonly status: z.ZodEnum<{
150
- failed: "failed";
150
+ ready: "ready";
151
151
  not_registered: "not_registered";
152
+ queued: "queued";
152
153
  preparing: "preparing";
154
+ syncing: "syncing";
153
155
  queryable_live: "queryable_live";
154
156
  queryable_partial: "queryable_partial";
155
- queued: "queued";
156
- ready: "ready";
157
- syncing: "syncing";
157
+ failed: "failed";
158
158
  }>;
159
159
  readonly progress: z.ZodObject<{
160
160
  readonly completed: z.ZodNumber;
@@ -164,11 +164,11 @@ declare function createGscdumpV1BrowserSchemas(realtimeSchemas?: RealtimeV1Schem
164
164
  }, z.core.$strip>;
165
165
  readonly queryable: z.ZodBoolean;
166
166
  readonly sourceMode: z.ZodEnum<{
167
- d1: "d1";
168
- live: "live";
169
- mixed: "mixed";
170
167
  none: "none";
168
+ live: "live";
169
+ d1: "d1";
171
170
  r2: "r2";
171
+ mixed: "mixed";
172
172
  }>;
173
173
  readonly syncedRange: z.ZodObject<{
174
174
  readonly oldest: z.ZodNullable<z.ZodISODate>;
@@ -176,40 +176,40 @@ declare function createGscdumpV1BrowserSchemas(realtimeSchemas?: RealtimeV1Schem
176
176
  }, z.core.$strip>;
177
177
  readonly nextAction: z.ZodEnum<{
178
178
  none: "none";
179
- retry_sync: "retry_sync";
180
179
  wait_for_sync: "wait_for_sync";
180
+ retry_sync: "retry_sync";
181
181
  }>;
182
182
  }, z.core.$strip>;
183
183
  readonly sitemaps: z.ZodObject<{
184
184
  readonly status: z.ZodEnum<{
185
- auto_submitted: "auto_submitted";
186
- discovering: "discovering";
187
- failed: "failed";
188
- none_found: "none_found";
185
+ unknown: "unknown";
189
186
  ready: "ready";
190
187
  syncing: "syncing";
191
- unknown: "unknown";
188
+ failed: "failed";
189
+ discovering: "discovering";
190
+ none_found: "none_found";
191
+ auto_submitted: "auto_submitted";
192
192
  }>;
193
193
  readonly discoveredCount: z.ZodNumber;
194
194
  readonly nextAction: z.ZodEnum<{
195
195
  none: "none";
196
- retry_sitemaps: "retry_sitemaps";
197
196
  submit_sitemap: "submit_sitemap";
198
197
  wait_for_sitemaps: "wait_for_sitemaps";
198
+ retry_sitemaps: "retry_sitemaps";
199
199
  }>;
200
200
  }, z.core.$strip>;
201
201
  readonly indexing: z.ZodObject<{
202
202
  readonly status: z.ZodEnum<{
203
- budget_exhausted: "budget_exhausted";
204
- checking: "checking";
205
- discovering: "discovering";
203
+ ready: "ready";
206
204
  failed: "failed";
207
- insufficient_permission: "insufficient_permission";
208
- missing_scope: "missing_scope";
209
- no_urls: "no_urls";
205
+ discovering: "discovering";
210
206
  not_requested: "not_requested";
211
- ready: "ready";
207
+ missing_scope: "missing_scope";
208
+ insufficient_permission: "insufficient_permission";
212
209
  waiting_for_sitemaps: "waiting_for_sitemaps";
210
+ checking: "checking";
211
+ budget_exhausted: "budget_exhausted";
212
+ no_urls: "no_urls";
213
213
  }>;
214
214
  readonly eligible: z.ZodBoolean;
215
215
  readonly reason: z.ZodNullable<z.ZodString>;
@@ -220,28 +220,28 @@ declare function createGscdumpV1BrowserSchemas(realtimeSchemas?: RealtimeV1Schem
220
220
  readonly percent: z.ZodNumber;
221
221
  }, z.core.$strip>;
222
222
  readonly nextAction: z.ZodEnum<{
223
- fix_gsc_permission: "fix_gsc_permission";
224
- none: "none";
225
223
  reconnect_google: "reconnect_google";
226
- retry_indexing: "retry_indexing";
227
- wait_for_indexing: "wait_for_indexing";
224
+ none: "none";
228
225
  wait_for_sitemaps: "wait_for_sitemaps";
226
+ fix_gsc_permission: "fix_gsc_permission";
227
+ wait_for_indexing: "wait_for_indexing";
228
+ retry_indexing: "retry_indexing";
229
229
  }>;
230
230
  }, z.core.$strip>;
231
231
  readonly latestError: z.ZodNullable<z.ZodObject<{
232
232
  readonly code: z.ZodEnum<{
233
- gsc_property_not_found: "gsc_property_not_found";
234
- gsc_property_unverified: "gsc_property_unverified";
235
- indexing_failed: "indexing_failed";
236
- insufficient_gsc_permission: "insufficient_gsc_permission";
233
+ missing_refresh_token: "missing_refresh_token";
237
234
  missing_analytics_scope: "missing_analytics_scope";
238
235
  missing_indexing_scope: "missing_indexing_scope";
239
- missing_refresh_token: "missing_refresh_token";
240
- permission_lost: "permission_lost";
241
- sitemap_sync_failed: "sitemap_sync_failed";
242
- sync_failed: "sync_failed";
243
236
  token_refresh_failed: "token_refresh_failed";
237
+ permission_lost: "permission_lost";
238
+ insufficient_gsc_permission: "insufficient_gsc_permission";
239
+ gsc_property_not_found: "gsc_property_not_found";
240
+ gsc_property_unverified: "gsc_property_unverified";
244
241
  user_database_not_provisioned: "user_database_not_provisioned";
242
+ sync_failed: "sync_failed";
243
+ sitemap_sync_failed: "sitemap_sync_failed";
244
+ indexing_failed: "indexing_failed";
245
245
  }>;
246
246
  readonly message: z.ZodString;
247
247
  readonly retryable: z.ZodBoolean;
@@ -261,21 +261,21 @@ declare function createGscdumpV1BrowserSchemas(realtimeSchemas?: RealtimeV1Schem
261
261
  readonly currentTeamId: z.ZodNullable<z.ZodString>;
262
262
  readonly account: z.ZodObject<{
263
263
  readonly status: z.ZodEnum<{
264
- db_provisioning: "db_provisioning";
264
+ ready: "ready";
265
265
  disconnected: "disconnected";
266
266
  oauth_received: "oauth_received";
267
- ready: "ready";
268
- reauth_required: "reauth_required";
269
- refresh_missing: "refresh_missing";
270
267
  scope_missing: "scope_missing";
268
+ refresh_missing: "refresh_missing";
269
+ db_provisioning: "db_provisioning";
270
+ reauth_required: "reauth_required";
271
271
  }>;
272
272
  readonly grantedScopes: z.ZodArray<z.ZodString>;
273
273
  readonly missingScopes: z.ZodArray<z.ZodString>;
274
274
  readonly nextAction: z.ZodEnum<{
275
275
  connect_google: "connect_google";
276
- none: "none";
277
276
  reconnect_google: "reconnect_google";
278
277
  wait_for_provisioning: "wait_for_provisioning";
278
+ none: "none";
279
279
  }>;
280
280
  }, z.core.$strip>;
281
281
  readonly sites: z.ZodArray<z.ZodObject<{
@@ -286,31 +286,31 @@ declare function createGscdumpV1BrowserSchemas(realtimeSchemas?: RealtimeV1Schem
286
286
  readonly permissionLevel: z.ZodNullable<z.ZodString>;
287
287
  readonly property: z.ZodObject<{
288
288
  readonly status: z.ZodEnum<{
289
- linked: "linked";
290
- no_gsc_property: "no_gsc_property";
291
289
  no_local_site: "no_local_site";
292
- registered: "registered";
290
+ no_gsc_property: "no_gsc_property";
293
291
  unverified_property: "unverified_property";
294
292
  verified_candidate: "verified_candidate";
293
+ registered: "registered";
294
+ linked: "linked";
295
295
  }>;
296
296
  readonly nextAction: z.ZodEnum<{
297
- choose_property: "choose_property";
298
- create_site: "create_site";
299
297
  none: "none";
300
- register_site: "register_site";
298
+ create_site: "create_site";
301
299
  verify_gsc_property: "verify_gsc_property";
300
+ choose_property: "choose_property";
301
+ register_site: "register_site";
302
302
  }>;
303
303
  }, z.core.$strip>;
304
304
  readonly analytics: z.ZodObject<{
305
305
  readonly status: z.ZodEnum<{
306
- failed: "failed";
306
+ ready: "ready";
307
307
  not_registered: "not_registered";
308
+ queued: "queued";
308
309
  preparing: "preparing";
310
+ syncing: "syncing";
309
311
  queryable_live: "queryable_live";
310
312
  queryable_partial: "queryable_partial";
311
- queued: "queued";
312
- ready: "ready";
313
- syncing: "syncing";
313
+ failed: "failed";
314
314
  }>;
315
315
  readonly progress: z.ZodObject<{
316
316
  readonly completed: z.ZodNumber;
@@ -320,11 +320,11 @@ declare function createGscdumpV1BrowserSchemas(realtimeSchemas?: RealtimeV1Schem
320
320
  }, z.core.$strip>;
321
321
  readonly queryable: z.ZodBoolean;
322
322
  readonly sourceMode: z.ZodEnum<{
323
- d1: "d1";
324
- live: "live";
325
- mixed: "mixed";
326
323
  none: "none";
324
+ live: "live";
325
+ d1: "d1";
327
326
  r2: "r2";
327
+ mixed: "mixed";
328
328
  }>;
329
329
  readonly syncedRange: z.ZodObject<{
330
330
  readonly oldest: z.ZodNullable<z.ZodISODate>;
@@ -332,40 +332,40 @@ declare function createGscdumpV1BrowserSchemas(realtimeSchemas?: RealtimeV1Schem
332
332
  }, z.core.$strip>;
333
333
  readonly nextAction: z.ZodEnum<{
334
334
  none: "none";
335
- retry_sync: "retry_sync";
336
335
  wait_for_sync: "wait_for_sync";
336
+ retry_sync: "retry_sync";
337
337
  }>;
338
338
  }, z.core.$strip>;
339
339
  readonly sitemaps: z.ZodObject<{
340
340
  readonly status: z.ZodEnum<{
341
- auto_submitted: "auto_submitted";
342
- discovering: "discovering";
343
- failed: "failed";
344
- none_found: "none_found";
341
+ unknown: "unknown";
345
342
  ready: "ready";
346
343
  syncing: "syncing";
347
- unknown: "unknown";
344
+ failed: "failed";
345
+ discovering: "discovering";
346
+ none_found: "none_found";
347
+ auto_submitted: "auto_submitted";
348
348
  }>;
349
349
  readonly discoveredCount: z.ZodNumber;
350
350
  readonly nextAction: z.ZodEnum<{
351
351
  none: "none";
352
- retry_sitemaps: "retry_sitemaps";
353
352
  submit_sitemap: "submit_sitemap";
354
353
  wait_for_sitemaps: "wait_for_sitemaps";
354
+ retry_sitemaps: "retry_sitemaps";
355
355
  }>;
356
356
  }, z.core.$strip>;
357
357
  readonly indexing: z.ZodObject<{
358
358
  readonly status: z.ZodEnum<{
359
- budget_exhausted: "budget_exhausted";
360
- checking: "checking";
361
- discovering: "discovering";
359
+ ready: "ready";
362
360
  failed: "failed";
363
- insufficient_permission: "insufficient_permission";
364
- missing_scope: "missing_scope";
365
- no_urls: "no_urls";
361
+ discovering: "discovering";
366
362
  not_requested: "not_requested";
367
- ready: "ready";
363
+ missing_scope: "missing_scope";
364
+ insufficient_permission: "insufficient_permission";
368
365
  waiting_for_sitemaps: "waiting_for_sitemaps";
366
+ checking: "checking";
367
+ budget_exhausted: "budget_exhausted";
368
+ no_urls: "no_urls";
369
369
  }>;
370
370
  readonly eligible: z.ZodBoolean;
371
371
  readonly reason: z.ZodNullable<z.ZodString>;
@@ -376,28 +376,28 @@ declare function createGscdumpV1BrowserSchemas(realtimeSchemas?: RealtimeV1Schem
376
376
  readonly percent: z.ZodNumber;
377
377
  }, z.core.$strip>;
378
378
  readonly nextAction: z.ZodEnum<{
379
- fix_gsc_permission: "fix_gsc_permission";
380
- none: "none";
381
379
  reconnect_google: "reconnect_google";
382
- retry_indexing: "retry_indexing";
383
- wait_for_indexing: "wait_for_indexing";
380
+ none: "none";
384
381
  wait_for_sitemaps: "wait_for_sitemaps";
382
+ fix_gsc_permission: "fix_gsc_permission";
383
+ wait_for_indexing: "wait_for_indexing";
384
+ retry_indexing: "retry_indexing";
385
385
  }>;
386
386
  }, z.core.$strip>;
387
387
  readonly latestError: z.ZodNullable<z.ZodObject<{
388
388
  readonly code: z.ZodEnum<{
389
- gsc_property_not_found: "gsc_property_not_found";
390
- gsc_property_unverified: "gsc_property_unverified";
391
- indexing_failed: "indexing_failed";
392
- insufficient_gsc_permission: "insufficient_gsc_permission";
389
+ missing_refresh_token: "missing_refresh_token";
393
390
  missing_analytics_scope: "missing_analytics_scope";
394
391
  missing_indexing_scope: "missing_indexing_scope";
395
- missing_refresh_token: "missing_refresh_token";
396
- permission_lost: "permission_lost";
397
- sitemap_sync_failed: "sitemap_sync_failed";
398
- sync_failed: "sync_failed";
399
392
  token_refresh_failed: "token_refresh_failed";
393
+ permission_lost: "permission_lost";
394
+ insufficient_gsc_permission: "insufficient_gsc_permission";
395
+ gsc_property_not_found: "gsc_property_not_found";
396
+ gsc_property_unverified: "gsc_property_unverified";
400
397
  user_database_not_provisioned: "user_database_not_provisioned";
398
+ sync_failed: "sync_failed";
399
+ sitemap_sync_failed: "sitemap_sync_failed";
400
+ indexing_failed: "indexing_failed";
401
401
  }>;
402
402
  readonly message: z.ZodString;
403
403
  readonly retryable: z.ZodBoolean;
@@ -1,14 +1,14 @@
1
1
  import { GSCDUMP_HTTP_V1_VERSION } from "./version.mjs";
2
2
  import { ZodRawShape, ZodTypeAny, z } from "zod";
3
- declare const HTTP_V1_SURFACES: readonly ['partner', 'analytics', 'realtime'];
4
- declare const HTTP_V1_METHODS: readonly ['DELETE', 'GET', 'PATCH', 'POST'];
5
- declare const HTTP_V1_CREDENTIALS: readonly ['user_key', 'partner_key'];
3
+ declare const HTTP_V1_SURFACES: readonly ["partner", "analytics", "realtime"];
4
+ declare const HTTP_V1_METHODS: readonly ["DELETE", "GET", "PATCH", "POST"];
5
+ declare const HTTP_V1_CREDENTIALS: readonly ["user_key", "partner_key"];
6
6
  declare const HTTP_V1_SCOPES: readonly ["users:read", "users:write", "sites:read", "sites:write", "analytics:read", "analytics:execute", "indexing:read", "indexing:write", "sitemaps:read", "sitemaps:write", "settings:read", "settings:write", "realtime:connect", "teams:read", "teams:write"];
7
7
  declare const HTTP_V1_CREDENTIAL_SCOPES: {
8
8
  readonly user_key: readonly ["users:read", "users:write", "sites:read", "sites:write", "analytics:read", "analytics:execute", "indexing:read", "indexing:write", "sitemaps:read", "sitemaps:write", "settings:read", "settings:write", "realtime:connect"];
9
9
  readonly partner_key: readonly ["users:read", "users:write", "sites:read", "sites:write", "analytics:read", "analytics:execute", "indexing:read", "indexing:write", "sitemaps:read", "sitemaps:write", "settings:read", "settings:write", "realtime:connect", "teams:read", "teams:write"];
10
10
  };
11
- declare const HTTP_V1_ERROR_CODES: readonly ['invalid_request', 'unauthorized', 'forbidden', 'user_not_found', 'site_not_found', 'rate_limited', 'realtime_unavailable', 'internal_error', 'contract_violation'];
11
+ declare const HTTP_V1_ERROR_CODES: readonly ["invalid_request", "unauthorized", "forbidden", "user_not_found", "site_not_found", "rate_limited", "realtime_unavailable", "internal_error", "contract_violation"];
12
12
  type HttpV1SurfaceName = typeof HTTP_V1_SURFACES[number];
13
13
  type HttpV1Method = typeof HTTP_V1_METHODS[number];
14
14
  type HttpV1Credential = typeof HTTP_V1_CREDENTIALS[number];