@gscdump/contracts 7.8.5 → 7.9.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.
@@ -1,4 +1,4 @@
1
- import { searchTypeSchema } from "./schemas.mjs";
1
+ import { GSC_SEARCH_TYPES } from "./search-types.mjs";
2
2
  import { z } from "zod";
3
3
  const registeredUrl = z.url().refine((value) => {
4
4
  const url = new URL(value);
@@ -38,7 +38,7 @@ const siteVersionSliceSchema = z.strictObject({
38
38
  "search_appearance_page_queries",
39
39
  "hourly_pages"
40
40
  ]),
41
- searchType: searchTypeSchema
41
+ searchType: z.enum(GSC_SEARCH_TYPES)
42
42
  });
43
43
  const siteVersionPreviewRequestSchema = z.strictObject({
44
44
  requestedUrl: registeredUrl,
@@ -266,6 +266,30 @@ export declare function createGscdumpV1BrowserSchemas(realtimeSchemas?: Realtime
266
266
  size_unknown: "size_unknown";
267
267
  size_pending: "size_pending";
268
268
  }>>;
269
+ readonly registration: z.ZodOptional<z.ZodObject<{
270
+ identity: z.ZodObject<{
271
+ siteId: z.ZodString;
272
+ userId: z.ZodString;
273
+ teamId: z.ZodUnion<readonly [z.ZodUUID, z.ZodString]>;
274
+ requestedUrl: z.ZodURL;
275
+ catalogSiteId: z.ZodNumber;
276
+ warehouse: z.ZodString;
277
+ namespace: z.ZodString;
278
+ version: z.ZodNumber;
279
+ revision: z.ZodNumber;
280
+ catalogRevision: z.ZodNumber;
281
+ dataVersion: z.ZodNumber;
282
+ }, z.core.$strict>;
283
+ coverage: z.ZodDiscriminatedUnion<[z.ZodObject<{
284
+ _tag: z.ZodLiteral<"legacy">;
285
+ }, z.core.$strict>, z.ZodObject<{
286
+ _tag: z.ZodLiteral<"verified">;
287
+ window: z.ZodObject<{
288
+ startDate: z.ZodISODate;
289
+ endDate: z.ZodISODate;
290
+ }, z.core.$strict>;
291
+ }, z.core.$strict>], "_tag">;
292
+ }, z.core.$strict>>;
269
293
  readonly latestError: z.ZodNullable<z.ZodObject<{
270
294
  readonly code: z.ZodEnum<{
271
295
  missing_refresh_token: "missing_refresh_token";
@@ -428,6 +452,30 @@ export declare function createGscdumpV1BrowserSchemas(realtimeSchemas?: Realtime
428
452
  size_unknown: "size_unknown";
429
453
  size_pending: "size_pending";
430
454
  }>>>;
455
+ readonly registration: z.ZodOptional<z.ZodObject<{
456
+ identity: z.ZodObject<{
457
+ siteId: z.ZodString;
458
+ userId: z.ZodString;
459
+ teamId: z.ZodUnion<readonly [z.ZodUUID, z.ZodString]>;
460
+ requestedUrl: z.ZodURL;
461
+ catalogSiteId: z.ZodNumber;
462
+ warehouse: z.ZodString;
463
+ namespace: z.ZodString;
464
+ version: z.ZodNumber;
465
+ revision: z.ZodNumber;
466
+ catalogRevision: z.ZodNumber;
467
+ dataVersion: z.ZodNumber;
468
+ }, z.core.$strict>;
469
+ coverage: z.ZodDiscriminatedUnion<[z.ZodObject<{
470
+ _tag: z.ZodLiteral<"legacy">;
471
+ }, z.core.$strict>, z.ZodObject<{
472
+ _tag: z.ZodLiteral<"verified">;
473
+ window: z.ZodObject<{
474
+ startDate: z.ZodISODate;
475
+ endDate: z.ZodISODate;
476
+ }, z.core.$strict>;
477
+ }, z.core.$strict>], "_tag">;
478
+ }, z.core.$strict>>;
431
479
  readonly latestError: z.ZodNullable<z.ZodObject<{
432
480
  readonly code: z.ZodEnum<{
433
481
  missing_refresh_token: "missing_refresh_token";
@@ -1,6 +1,7 @@
1
1
  import { siteHoldReasonSchema } from "../entitlements.mjs";
2
2
  import { accountNextActions, accountStatuses, analyticsNextActions, analyticsStatuses, indexingNextActions, indexingStatuses, lifecycleErrorCodes, propertyNextActions, propertyStatuses, querySourceModes, sitemapNextActions, sitemapStatuses } from "../onboarding.mjs";
3
3
  import { GSC_SEARCH_TYPES } from "../search-types.mjs";
4
+ import { siteVersionIdentityResponseSchema } from "../site-version.mjs";
4
5
  import "./version.mjs";
5
6
  import { defineResponseObject, defineSuccessResponse } from "./http-core.mjs";
6
7
  import { createRealtimeV1Schemas } from "./realtime.mjs";
@@ -85,6 +86,7 @@ function lifecycleResponseSchemas(ids) {
85
86
  sitemaps: sitemaps.producer,
86
87
  indexing: indexing.producer,
87
88
  hold: siteHoldReasonSchema.nullable(),
89
+ registration: siteVersionIdentityResponseSchema.optional(),
88
90
  latestError: latestError.producer.nullable(),
89
91
  updatedAt: z.iso.datetime()
90
92
  }, {
@@ -98,6 +100,7 @@ function lifecycleResponseSchemas(ids) {
98
100
  sitemaps: sitemaps.client,
99
101
  indexing: indexing.client,
100
102
  hold: siteHoldReasonSchema.nullable().default(null),
103
+ registration: siteVersionIdentityResponseSchema.optional(),
101
104
  latestError: latestError.client.nullable(),
102
105
  updatedAt: z.iso.datetime()
103
106
  });
@@ -3853,6 +3853,30 @@ export declare function createGscdumpV1Protocol(): {
3853
3853
  size_unknown: "size_unknown";
3854
3854
  size_pending: "size_pending";
3855
3855
  }>>;
3856
+ readonly registration: z.ZodOptional<z.ZodObject<{
3857
+ identity: z.ZodObject<{
3858
+ siteId: z.ZodString;
3859
+ userId: z.ZodString;
3860
+ teamId: z.ZodUnion<readonly [z.ZodUUID, z.ZodString]>;
3861
+ requestedUrl: z.ZodURL;
3862
+ catalogSiteId: z.ZodNumber;
3863
+ warehouse: z.ZodString;
3864
+ namespace: z.ZodString;
3865
+ version: z.ZodNumber;
3866
+ revision: z.ZodNumber;
3867
+ catalogRevision: z.ZodNumber;
3868
+ dataVersion: z.ZodNumber;
3869
+ }, z.core.$strict>;
3870
+ coverage: z.ZodDiscriminatedUnion<[z.ZodObject<{
3871
+ _tag: z.ZodLiteral<"legacy">;
3872
+ }, z.core.$strict>, z.ZodObject<{
3873
+ _tag: z.ZodLiteral<"verified">;
3874
+ window: z.ZodObject<{
3875
+ startDate: z.ZodISODate;
3876
+ endDate: z.ZodISODate;
3877
+ }, z.core.$strict>;
3878
+ }, z.core.$strict>], "_tag">;
3879
+ }, z.core.$strict>>;
3856
3880
  readonly latestError: z.ZodNullable<z.ZodObject<{
3857
3881
  readonly code: z.ZodEnum<{
3858
3882
  missing_refresh_token: "missing_refresh_token";
@@ -4015,6 +4039,30 @@ export declare function createGscdumpV1Protocol(): {
4015
4039
  size_unknown: "size_unknown";
4016
4040
  size_pending: "size_pending";
4017
4041
  }>>>;
4042
+ readonly registration: z.ZodOptional<z.ZodObject<{
4043
+ identity: z.ZodObject<{
4044
+ siteId: z.ZodString;
4045
+ userId: z.ZodString;
4046
+ teamId: z.ZodUnion<readonly [z.ZodUUID, z.ZodString]>;
4047
+ requestedUrl: z.ZodURL;
4048
+ catalogSiteId: z.ZodNumber;
4049
+ warehouse: z.ZodString;
4050
+ namespace: z.ZodString;
4051
+ version: z.ZodNumber;
4052
+ revision: z.ZodNumber;
4053
+ catalogRevision: z.ZodNumber;
4054
+ dataVersion: z.ZodNumber;
4055
+ }, z.core.$strict>;
4056
+ coverage: z.ZodDiscriminatedUnion<[z.ZodObject<{
4057
+ _tag: z.ZodLiteral<"legacy">;
4058
+ }, z.core.$strict>, z.ZodObject<{
4059
+ _tag: z.ZodLiteral<"verified">;
4060
+ window: z.ZodObject<{
4061
+ startDate: z.ZodISODate;
4062
+ endDate: z.ZodISODate;
4063
+ }, z.core.$strict>;
4064
+ }, z.core.$strict>], "_tag">;
4065
+ }, z.core.$strict>>;
4018
4066
  readonly latestError: z.ZodNullable<z.ZodObject<{
4019
4067
  readonly code: z.ZodEnum<{
4020
4068
  missing_refresh_token: "missing_refresh_token";
@@ -4124,11 +4172,11 @@ export declare function createGscdumpV1Protocol(): {
4124
4172
  }, z.core.$strip>;
4125
4173
  }, z.core.$strip>>;
4126
4174
  registerSiteRequest: z.ZodObject<{
4127
- externalSiteId: z.ZodOptional<z.ZodString>;
4128
4175
  requestedUrl: z.ZodOptional<z.ZodString>;
4176
+ catalogSiteId: z.ZodOptional<z.ZodNumber>;
4177
+ externalSiteId: z.ZodOptional<z.ZodString>;
4129
4178
  gscPropertyUrl: z.ZodOptional<z.ZodString>;
4130
4179
  siteUrl: z.ZodString;
4131
- catalogSiteId: z.ZodOptional<z.ZodNumber>;
4132
4180
  externalSiteUrl: z.ZodOptional<z.ZodString>;
4133
4181
  webhookUrl: z.ZodOptional<z.ZodURL>;
4134
4182
  webhookEvents: z.ZodOptional<z.ZodArray<z.ZodEnum<{
@@ -5115,6 +5163,30 @@ export declare function createGscdumpV1Protocol(): {
5115
5163
  size_unknown: "size_unknown";
5116
5164
  size_pending: "size_pending";
5117
5165
  }>>;
5166
+ readonly registration: z.ZodOptional<z.ZodObject<{
5167
+ identity: z.ZodObject<{
5168
+ siteId: z.ZodString;
5169
+ userId: z.ZodString;
5170
+ teamId: z.ZodUnion<readonly [z.ZodUUID, z.ZodString]>;
5171
+ requestedUrl: z.ZodURL;
5172
+ catalogSiteId: z.ZodNumber;
5173
+ warehouse: z.ZodString;
5174
+ namespace: z.ZodString;
5175
+ version: z.ZodNumber;
5176
+ revision: z.ZodNumber;
5177
+ catalogRevision: z.ZodNumber;
5178
+ dataVersion: z.ZodNumber;
5179
+ }, z.core.$strict>;
5180
+ coverage: z.ZodDiscriminatedUnion<[z.ZodObject<{
5181
+ _tag: z.ZodLiteral<"legacy">;
5182
+ }, z.core.$strict>, z.ZodObject<{
5183
+ _tag: z.ZodLiteral<"verified">;
5184
+ window: z.ZodObject<{
5185
+ startDate: z.ZodISODate;
5186
+ endDate: z.ZodISODate;
5187
+ }, z.core.$strict>;
5188
+ }, z.core.$strict>], "_tag">;
5189
+ }, z.core.$strict>>;
5118
5190
  readonly latestError: z.ZodNullable<z.ZodObject<{
5119
5191
  readonly code: z.ZodEnum<{
5120
5192
  missing_refresh_token: "missing_refresh_token";
@@ -5277,6 +5349,30 @@ export declare function createGscdumpV1Protocol(): {
5277
5349
  size_unknown: "size_unknown";
5278
5350
  size_pending: "size_pending";
5279
5351
  }>>>;
5352
+ readonly registration: z.ZodOptional<z.ZodObject<{
5353
+ identity: z.ZodObject<{
5354
+ siteId: z.ZodString;
5355
+ userId: z.ZodString;
5356
+ teamId: z.ZodUnion<readonly [z.ZodUUID, z.ZodString]>;
5357
+ requestedUrl: z.ZodURL;
5358
+ catalogSiteId: z.ZodNumber;
5359
+ warehouse: z.ZodString;
5360
+ namespace: z.ZodString;
5361
+ version: z.ZodNumber;
5362
+ revision: z.ZodNumber;
5363
+ catalogRevision: z.ZodNumber;
5364
+ dataVersion: z.ZodNumber;
5365
+ }, z.core.$strict>;
5366
+ coverage: z.ZodDiscriminatedUnion<[z.ZodObject<{
5367
+ _tag: z.ZodLiteral<"legacy">;
5368
+ }, z.core.$strict>, z.ZodObject<{
5369
+ _tag: z.ZodLiteral<"verified">;
5370
+ window: z.ZodObject<{
5371
+ startDate: z.ZodISODate;
5372
+ endDate: z.ZodISODate;
5373
+ }, z.core.$strict>;
5374
+ }, z.core.$strict>], "_tag">;
5375
+ }, z.core.$strict>>;
5280
5376
  readonly latestError: z.ZodNullable<z.ZodObject<{
5281
5377
  readonly code: z.ZodEnum<{
5282
5378
  missing_refresh_token: "missing_refresh_token";
@@ -5354,7 +5450,7 @@ export declare function createGscdumpV1Protocol(): {
5354
5450
  };
5355
5451
  readonly docs: {
5356
5452
  readonly summary: "Get user lifecycle";
5357
- readonly description: "Returns the authoritative lifecycle state for one visible user and their sites.";
5453
+ readonly description: "Returns the authoritative lifecycle state for one visible user and their sites. A partner key read also carries the registered-host registration of each Site that gscdump can serve.";
5358
5454
  readonly tags: readonly ["Users"];
5359
5455
  readonly examples: {
5360
5456
  readonly request: {
@@ -5796,11 +5892,11 @@ export declare function createGscdumpV1Protocol(): {
5796
5892
  'x-request-id': z.ZodOptional<z.ZodString>;
5797
5893
  }, z.core.$strict>;
5798
5894
  readonly body: z.ZodObject<{
5799
- externalSiteId: z.ZodOptional<z.ZodString>;
5800
5895
  requestedUrl: z.ZodOptional<z.ZodString>;
5896
+ catalogSiteId: z.ZodOptional<z.ZodNumber>;
5897
+ externalSiteId: z.ZodOptional<z.ZodString>;
5801
5898
  gscPropertyUrl: z.ZodOptional<z.ZodString>;
5802
5899
  siteUrl: z.ZodString;
5803
- catalogSiteId: z.ZodOptional<z.ZodNumber>;
5804
5900
  externalSiteUrl: z.ZodOptional<z.ZodString>;
5805
5901
  webhookUrl: z.ZodOptional<z.ZodURL>;
5806
5902
  webhookEvents: z.ZodOptional<z.ZodArray<z.ZodEnum<{
@@ -923,7 +923,7 @@ function createGscdumpV1Protocol() {
923
923
  lifecycle: { introduced: "1.0.0" },
924
924
  docs: {
925
925
  summary: "Get user lifecycle",
926
- description: "Returns the authoritative lifecycle state for one visible user and their sites.",
926
+ description: "Returns the authoritative lifecycle state for one visible user and their sites. A partner key read also carries the registered-host registration of each Site that gscdump can serve.",
927
927
  tags: ["Users"],
928
928
  examples: {
929
929
  request: { params: { userId: "u_01" } },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gscdump/contracts",
3
3
  "type": "module",
4
- "version": "7.8.5",
4
+ "version": "7.9.1",
5
5
  "description": "Shared gscdump.com API, webhook, realtime, and lifecycle contracts.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",