@gscdump/contracts 5.7.1 → 5.8.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.
@@ -10,7 +10,7 @@ import { bingDataQueryV1Schema, bingDataV1Schemas } from "./bing-data.mjs";
10
10
  import { bingAuthorizationRequestV1Schema, bingAuthorizationV1Schemas, bingLinkResultV1Schemas, bingSitemapSubmitRequestV1Schema, bingSitemapSubmitResultV1Schemas, bingSitesQueryV1Schema, bingSitesV1Schemas } from "./bing-sites.mjs";
11
11
  import { GSCDUMP_REALTIME_ACK_POLICY, GSCDUMP_REALTIME_CLOSE_CODES, GSCDUMP_REALTIME_CONNECTION_POLICY, GSCDUMP_REALTIME_LIMITS, GSCDUMP_REALTIME_PING, GSCDUMP_REALTIME_PONG, GSCDUMP_REALTIME_REPLAY_POLICY, GSCDUMP_REALTIME_SUBPROTOCOL, GSCDUMP_REALTIME_TICKET_AUDIENCE, GSCDUMP_REALTIME_TICKET_ISSUER, GSCDUMP_REALTIME_TICKET_POLICY, GSCDUMP_REALTIME_TICKET_PREFIX, REALTIME_V1_EVENT_SEMANTICS, createRealtimeV1Schemas } from "./realtime.mjs";
12
12
  import { GSCDUMP_V1_ANALYTICS_DIMENSIONS, createGscdumpV1BrowserSchemas } from "./browser.mjs";
13
- import { googleSubmissionReceiptV1Schemas, googleSubmitV1Schema, indexingApiGrantUpdateV1Schema, indexingApiGrantV1Schemas } from "./google-indexing.mjs";
13
+ import { googleSubmissionReceiptV1Schemas, googleSubmitV1Schema, indexingApiGrantUpdateV1Schema, indexingApiGrantV1Schemas, siteIndexingApiGrantV1Schemas } from "./google-indexing.mjs";
14
14
  import { indexNowConfigureV1Schema, indexNowConnectionV1Schemas, indexNowSubmissionReceiptV1Schemas, indexNowSubmitV1Schema } from "./indexnow.mjs";
15
15
  import { gscdumpV1OperationRoute, gscdumpV1Surface } from "./route-catalog.mjs";
16
16
  import { sitemapSubmissionV1Schemas, sitemapSubmitResultV1Schemas } from "./sitemap-submission.mjs";
@@ -281,6 +281,7 @@ function createGscdumpV1Protocol() {
281
281
  pagination: bingIndexingEvidencePagination.client
282
282
  }), partnerResponseMeta);
283
283
  const indexingApiGrantResponse = defineSuccessResponse(indexingApiGrantV1Schemas, partnerResponseMeta);
284
+ const siteIndexingApiGrantResponse = defineSuccessResponse(siteIndexingApiGrantV1Schemas, partnerResponseMeta);
284
285
  const googleSubmissionResponse = defineSuccessResponse(defineResponseObject({ submissionReceipt: googleSubmissionReceiptV1Schemas.producer }, { submissionReceipt: googleSubmissionReceiptV1Schemas.client }), partnerResponseMeta);
285
286
  const googleSubmissionReceiptsResponse = defineSuccessResponse(defineResponseObject({
286
287
  submissionReceipts: z.array(googleSubmissionReceiptV1Schemas.producer),
@@ -2161,6 +2162,61 @@ function createGscdumpV1Protocol() {
2161
2162
  }
2162
2163
  }
2163
2164
  }),
2165
+ getSiteIndexingApiGrant: defineHttpOperation({
2166
+ ...gscdumpV1OperationRoute("partner.sites.indexing.google.grant.get"),
2167
+ visibility: "public",
2168
+ semantics: {
2169
+ kind: "query",
2170
+ sideEffects: "none",
2171
+ idempotent: true,
2172
+ retry: "idempotent",
2173
+ readConsistency: "primary"
2174
+ },
2175
+ auth: {
2176
+ credentials: ["partner_key"],
2177
+ scopes: ["indexing:read"],
2178
+ ownership: [{
2179
+ credential: "partner_key",
2180
+ rule: "authorized_site"
2181
+ }]
2182
+ },
2183
+ request: {
2184
+ params: z.strictObject({ siteId: realtimeSchemas.publicSiteId }),
2185
+ query: null,
2186
+ headers: requestHeaders,
2187
+ body: null
2188
+ },
2189
+ responses: { 200: siteIndexingApiGrantResponse },
2190
+ errors: partnerSiteErrors,
2191
+ errorResponse: errorEnvelopeSchemas(partnerSiteErrors, realtimeSchemas.publicRequestId),
2192
+ resources: {
2193
+ reads: [{
2194
+ type: "site.indexing",
2195
+ idFrom: "params.siteId"
2196
+ }],
2197
+ changes: []
2198
+ },
2199
+ lifecycle: { introduced: "5.8.0" },
2200
+ docs: {
2201
+ summary: "Get Site Indexing API grant",
2202
+ description: "Returns the Indexing API grant a Google Submission for this Site uses, without naming its Google account.",
2203
+ tags: ["Indexing"],
2204
+ examples: {
2205
+ request: { params: { siteId: "s_01" } },
2206
+ response: {
2207
+ data: {
2208
+ _tag: "granted",
2209
+ grantedAt: "2026-10-01T00:00:00.000Z"
2210
+ },
2211
+ meta: {
2212
+ requestId: "req_01",
2213
+ surface: "partner",
2214
+ version: "1.0"
2215
+ }
2216
+ }
2217
+ }
2218
+ }
2219
+ }),
2164
2220
  createSiteGoogleSubmission: defineHttpOperation({
2165
2221
  ...gscdumpV1OperationRoute("partner.sites.indexing.google.submissions.create"),
2166
2222
  visibility: "public",
@@ -146,6 +146,11 @@ export declare const GSCDUMP_V1_ROUTE_CATALOG: {
146
146
  readonly method: "GET";
147
147
  readonly template: "/sites/{siteId}/indexing/google/submissions";
148
148
  };
149
+ readonly 'partner.sites.indexing.google.grant.get': {
150
+ readonly surface: "partner";
151
+ readonly method: "GET";
152
+ readonly template: "/sites/{siteId}/indexing/google/grant";
153
+ };
149
154
  readonly 'partner.users.indexing.google.grant.get': {
150
155
  readonly surface: "partner";
151
156
  readonly method: "GET";
@@ -133,6 +133,11 @@ const GSCDUMP_V1_ROUTE_CATALOG = {
133
133
  method: "GET",
134
134
  template: "/sites/{siteId}/indexing/google/submissions"
135
135
  },
136
+ "partner.sites.indexing.google.grant.get": {
137
+ surface: "partner",
138
+ method: "GET",
139
+ template: "/sites/{siteId}/indexing/google/grant"
140
+ },
136
141
  "partner.users.indexing.google.grant.get": {
137
142
  surface: "partner",
138
143
  method: "GET",
@@ -263,14 +263,14 @@ export declare const sitemapSubmitResultV1Schemas: {
263
263
  }, z.core.$strip>, z.ZodObject<{
264
264
  readonly _tag: z.ZodLiteral<"failed">;
265
265
  readonly reason: z.ZodEnum<{
266
- "permission-lost": "permission-lost";
267
- "grant-missing": "grant-missing";
268
- "no-sitemap-found": "no-sitemap-found";
269
- "provider-unavailable": "provider-unavailable";
270
- rejected: "rejected";
271
266
  "needs-write-access": "needs-write-access";
272
267
  "insufficient-permission": "insufficient-permission";
268
+ "no-sitemap-found": "no-sitemap-found";
269
+ "permission-lost": "permission-lost";
270
+ "grant-missing": "grant-missing";
273
271
  "already-listed": "already-listed";
272
+ rejected: "rejected";
273
+ "provider-unavailable": "provider-unavailable";
274
274
  }>;
275
275
  readonly retryable: z.ZodBoolean;
276
276
  readonly sitemapUrl: z.ZodNullable<z.ZodURL>;
@@ -282,14 +282,14 @@ export declare const sitemapSubmitResultV1Schemas: {
282
282
  }, z.core.$strip>, z.ZodObject<{
283
283
  readonly _tag: z.ZodLiteral<"failed">;
284
284
  readonly reason: z.ZodEnum<{
285
- "permission-lost": "permission-lost";
286
- "grant-missing": "grant-missing";
287
- "no-sitemap-found": "no-sitemap-found";
288
- "provider-unavailable": "provider-unavailable";
289
- rejected: "rejected";
290
285
  "needs-write-access": "needs-write-access";
291
286
  "insufficient-permission": "insufficient-permission";
287
+ "no-sitemap-found": "no-sitemap-found";
288
+ "permission-lost": "permission-lost";
289
+ "grant-missing": "grant-missing";
292
290
  "already-listed": "already-listed";
291
+ rejected: "rejected";
292
+ "provider-unavailable": "provider-unavailable";
293
293
  }>;
294
294
  readonly retryable: z.ZodBoolean;
295
295
  readonly sitemapUrl: z.ZodNullable<z.ZodURL>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gscdump/contracts",
3
3
  "type": "module",
4
- "version": "5.7.1",
4
+ "version": "5.8.1",
5
5
  "description": "Shared gscdump.com API, webhook, realtime, and lifecycle contracts.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",