@gscdump/contracts 4.6.0 → 4.8.0
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/README.md +1 -1
- package/dist/analytics.d.mts +2 -2
- package/dist/endpoints.d.mts +14 -0
- package/dist/entitlements.d.mts +90 -0
- package/dist/entitlements.mjs +55 -0
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +2 -1
- package/dist/onboarding.d.mts +3 -0
- package/dist/partner.d.mts +2 -2
- package/dist/schemas.d.mts +52 -0
- package/dist/schemas.mjs +11 -1
- package/dist/types.d.mts +14 -1
- package/dist/v1/bing-sites.d.mts +750 -0
- package/dist/v1/bing-sites.mjs +214 -0
- package/dist/v1/browser.d.mts +13 -1
- package/dist/v1/browser.mjs +3 -0
- package/dist/v1/http.d.mts +4 -2
- package/dist/v1/http.mjs +3 -1
- package/dist/v1/index.d.mts +4 -2
- package/dist/v1/index.mjs +3 -1
- package/dist/v1/operations.d.mts +2939 -667
- package/dist/v1/operations.mjs +537 -0
- package/dist/v1/route-catalog.d.mts +35 -0
- package/dist/v1/route-catalog.mjs +35 -0
- package/dist/v1/sitemap-submission.d.mts +301 -0
- package/dist/v1/sitemap-submission.mjs +123 -0
- package/dist/webhook-constants.d.mts +2 -2
- package/dist/webhook-constants.mjs +2 -1
- package/package.json +1 -1
package/dist/v1/operations.mjs
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
import { siteHoldReasonSchema } from "../entitlements.mjs";
|
|
1
2
|
import { watchedUrlsChangeRequestSchema, watchedUrlsChangeResponseSchema, watchedUrlsResponseSchema } from "../indexing-coverage.mjs";
|
|
2
3
|
import { addPartnerTeamMemberSchema, bindPartnerSiteTeamSchema, bindPartnerTeamCatalogResponseSchema, bindPartnerTeamCatalogSchema, builderStateSchema, createPartnerTeamSchema, gscComparisonFilterSchema, gscdumpAnalysisBundleResponseSchema, gscdumpAnalysisPresetSchema, gscdumpAnalysisResponseSchema, gscdumpAvailableSiteSchema, gscdumpCanonicalMismatchesResponseSchema, gscdumpDataDetailResponseSchema, gscdumpDataResponseSchema, gscdumpDeletePartnerUserResponseSchema, gscdumpIndexPercentResponseSchema, gscdumpIndexingDiagnosticsResponseSchema, gscdumpIndexingResponseSchema, gscdumpIndexingTransitionFieldSchema, gscdumpKeywordSparklinesResponseSchema, gscdumpPageTrendResponseSchema, gscdumpQueryTrendResponseSchema, gscdumpSiteRegistrationSchema, gscdumpSitemapChangesResponseSchema, gscdumpSitemapExportQuerySchema, gscdumpSitemapExportResponseSchema, gscdumpSitemapMembershipParamsSchema, gscdumpSitemapMembershipResponseSchema, gscdumpSitemapUrlsQuerySchema, gscdumpSitemapUrlsResponseSchema, gscdumpSitemapsResponseSchema, gscdumpTeamRoleSchema, gscdumpTopAssociationResponseSchema, gscdumpUserRegistrationSchema, indexingUrlsResponseSchema, partnerSiteTeamBindingResponseSchema, partnerSitemapActionResponseSchema, partnerSitemapActionSchema, partnerTeamCreatedResponseSchema, partnerTeamDeletedResponseSchema, partnerTeamMemberAddedResponseSchema, partnerTeamMemberRemovedResponseSchema, partnerTeamMemberRoleResponseSchema, partnerTeamMembersResponseSchema, partnerTeamRenamedResponseSchema, registerPartnerSiteSchema, registerPartnerUserSchema, renamePartnerTeamSchema, searchTypeSchema, siteIntIdCrosswalkResponseSchema, sitemapChangesTruncationReasonSchema, teamCatalogRefSchema, updatePartnerUserTokensSchema } from "../schemas.mjs";
|
|
3
4
|
import { bingConnectionV1Schemas } from "./bing.mjs";
|
|
4
5
|
import "./version.mjs";
|
|
5
6
|
import { HTTP_V1_ERROR_CODES, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse } from "./http-core.mjs";
|
|
6
7
|
import { bingDataQueryV1Schema, bingDataV1Schemas } from "./bing-data.mjs";
|
|
8
|
+
import { bingAuthorizationRequestV1Schema, bingAuthorizationV1Schemas, bingLinkResultV1Schemas, bingSitemapSubmitRequestV1Schema, bingSitemapSubmitResultV1Schemas, bingSitesQueryV1Schema, bingSitesV1Schemas } from "./bing-sites.mjs";
|
|
7
9
|
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";
|
|
8
10
|
import { GSCDUMP_V1_ANALYTICS_DIMENSIONS, createGscdumpV1BrowserSchemas } from "./browser.mjs";
|
|
9
11
|
import { indexNowConfigureV1Schema, indexNowConnectionV1Schemas, indexNowSubmissionReceiptV1Schemas, indexNowSubmitV1Schema } from "./indexnow.mjs";
|
|
10
12
|
import { gscdumpV1OperationRoute, gscdumpV1Surface } from "./route-catalog.mjs";
|
|
13
|
+
import { sitemapSubmissionV1Schemas, sitemapSubmitResultV1Schemas } from "./sitemap-submission.mjs";
|
|
11
14
|
import { z } from "zod";
|
|
12
15
|
function errorEnvelopeSchemas(codes, publicRequestId) {
|
|
13
16
|
const errorDetails = z.record(z.string(), z.json());
|
|
@@ -270,6 +273,12 @@ function createGscdumpV1Protocol() {
|
|
|
270
273
|
submissionReceipts: z.array(indexNowSubmissionReceiptV1Schemas.client),
|
|
271
274
|
pagination: bingIndexingEvidencePagination.client
|
|
272
275
|
}), partnerResponseMeta);
|
|
276
|
+
const bingSitesResponse = defineSuccessResponse(bingSitesV1Schemas, partnerResponseMeta);
|
|
277
|
+
const bingLinkResponse = defineSuccessResponse(bingLinkResultV1Schemas, partnerResponseMeta);
|
|
278
|
+
const bingAuthorizationResponse = defineSuccessResponse(bingAuthorizationV1Schemas, partnerResponseMeta);
|
|
279
|
+
const bingSitemapSubmitResponse = defineSuccessResponse(bingSitemapSubmitResultV1Schemas, partnerResponseMeta);
|
|
280
|
+
const sitemapSubmissionResponse = defineSuccessResponse(sitemapSubmissionV1Schemas, partnerResponseMeta);
|
|
281
|
+
const sitemapSubmitResponse = defineSuccessResponse(sitemapSubmitResultV1Schemas, partnerResponseMeta);
|
|
273
282
|
const indexingTransition = defineResponseObject({
|
|
274
283
|
url: z.string(),
|
|
275
284
|
field: gscdumpIndexingTransitionFieldSchema,
|
|
@@ -386,6 +395,52 @@ function createGscdumpV1Protocol() {
|
|
|
386
395
|
ok: z.literal(true),
|
|
387
396
|
keyId: partnerUserApiKeyId
|
|
388
397
|
}), partnerResponseMeta);
|
|
398
|
+
const entitlementCount = z.number().int().nonnegative();
|
|
399
|
+
const entitlementUsage = defineResponseObject({
|
|
400
|
+
used: entitlementCount,
|
|
401
|
+
allowance: entitlementCount
|
|
402
|
+
});
|
|
403
|
+
const preservedRowsUsage = defineResponseObject({
|
|
404
|
+
used: entitlementCount.nullable(),
|
|
405
|
+
allowance: entitlementCount
|
|
406
|
+
});
|
|
407
|
+
const urlInspectionsUsage = defineResponseObject({
|
|
408
|
+
used: entitlementCount,
|
|
409
|
+
allowance: entitlementCount.nullable(),
|
|
410
|
+
resetsAt: z.iso.date()
|
|
411
|
+
});
|
|
412
|
+
const entitlementMeters = defineResponseObject({
|
|
413
|
+
sites: entitlementUsage.producer,
|
|
414
|
+
preservedRows: preservedRowsUsage.producer,
|
|
415
|
+
urlInspections: urlInspectionsUsage.producer
|
|
416
|
+
}, {
|
|
417
|
+
sites: entitlementUsage.client,
|
|
418
|
+
preservedRows: preservedRowsUsage.client,
|
|
419
|
+
urlInspections: urlInspectionsUsage.client
|
|
420
|
+
});
|
|
421
|
+
const heldSite = defineResponseObject({
|
|
422
|
+
siteId: realtimeSchemas.publicSiteId,
|
|
423
|
+
hold: siteHoldReasonSchema
|
|
424
|
+
});
|
|
425
|
+
const exemptEntitlements = defineResponseObject({ mode: z.literal("exempt") });
|
|
426
|
+
const meteredEntitlementsShape = {
|
|
427
|
+
mode: z.literal("metered"),
|
|
428
|
+
phase: z.enum(["beta", "billing"]),
|
|
429
|
+
sizeLimitRowsPerDay: z.number().int().positive()
|
|
430
|
+
};
|
|
431
|
+
const meteredEntitlements = defineResponseObject({
|
|
432
|
+
...meteredEntitlementsShape,
|
|
433
|
+
meters: entitlementMeters.producer,
|
|
434
|
+
heldSites: z.array(heldSite.producer)
|
|
435
|
+
}, {
|
|
436
|
+
...meteredEntitlementsShape,
|
|
437
|
+
meters: entitlementMeters.client,
|
|
438
|
+
heldSites: z.array(heldSite.client)
|
|
439
|
+
});
|
|
440
|
+
const userEntitlementsResponse = defineSuccessResponse({
|
|
441
|
+
producer: z.discriminatedUnion("mode", [exemptEntitlements.producer, meteredEntitlements.producer]),
|
|
442
|
+
client: z.discriminatedUnion("mode", [exemptEntitlements.client, meteredEntitlements.client])
|
|
443
|
+
}, partnerResponseMeta);
|
|
389
444
|
const trendQuery = z.strictObject({
|
|
390
445
|
startDate: calendarDate,
|
|
391
446
|
endDate: calendarDate,
|
|
@@ -813,6 +868,87 @@ function createGscdumpV1Protocol() {
|
|
|
813
868
|
}
|
|
814
869
|
}
|
|
815
870
|
}),
|
|
871
|
+
getUserEntitlements: defineHttpOperation({
|
|
872
|
+
...gscdumpV1OperationRoute("partner.users.entitlements.get"),
|
|
873
|
+
visibility: "public",
|
|
874
|
+
semantics: {
|
|
875
|
+
kind: "query",
|
|
876
|
+
sideEffects: "none",
|
|
877
|
+
idempotent: true,
|
|
878
|
+
retry: "idempotent",
|
|
879
|
+
readConsistency: "primary"
|
|
880
|
+
},
|
|
881
|
+
auth: {
|
|
882
|
+
credentials: ["user_key", "partner_key"],
|
|
883
|
+
scopes: ["users:read"],
|
|
884
|
+
ownership: [{
|
|
885
|
+
credential: "user_key",
|
|
886
|
+
rule: "self"
|
|
887
|
+
}, {
|
|
888
|
+
credential: "partner_key",
|
|
889
|
+
rule: "linked_user"
|
|
890
|
+
}]
|
|
891
|
+
},
|
|
892
|
+
request: {
|
|
893
|
+
params: z.strictObject({ userId: realtimeSchemas.publicUserId }),
|
|
894
|
+
query: null,
|
|
895
|
+
headers: requestHeaders,
|
|
896
|
+
body: null
|
|
897
|
+
},
|
|
898
|
+
responses: { 200: userEntitlementsResponse },
|
|
899
|
+
errors: partnerUserErrors,
|
|
900
|
+
errorResponse: errorEnvelopeSchemas(partnerUserErrors, realtimeSchemas.publicRequestId),
|
|
901
|
+
resources: {
|
|
902
|
+
reads: [{
|
|
903
|
+
type: "partner.user",
|
|
904
|
+
idFrom: "params.userId"
|
|
905
|
+
}, {
|
|
906
|
+
type: "user.sites",
|
|
907
|
+
idFrom: "params.userId"
|
|
908
|
+
}],
|
|
909
|
+
changes: []
|
|
910
|
+
},
|
|
911
|
+
lifecycle: { introduced: "4.7.0" },
|
|
912
|
+
docs: {
|
|
913
|
+
summary: "Get user entitlements",
|
|
914
|
+
description: "Returns the Meters that apply to the user's partner Sites. If the partner is exempt, the response is `{ mode: \"exempt\" }` and no free allowance applies. If the partner is metered, the response gives the usage of the user's Billing owner against each free allowance, the size limit in query×page rows per day, and the held Sites the user can read. `urlInspections.allowance` is `null` when URL Inspections have no cap. `urlInspections.resetsAt` is the first UTC day of the next usage month.",
|
|
915
|
+
tags: ["Users"],
|
|
916
|
+
examples: {
|
|
917
|
+
request: { params: { userId: "u_01" } },
|
|
918
|
+
response: {
|
|
919
|
+
data: {
|
|
920
|
+
mode: "metered",
|
|
921
|
+
phase: "beta",
|
|
922
|
+
meters: {
|
|
923
|
+
sites: {
|
|
924
|
+
used: 2,
|
|
925
|
+
allowance: 3
|
|
926
|
+
},
|
|
927
|
+
preservedRows: {
|
|
928
|
+
used: 12e4,
|
|
929
|
+
allowance: 25e4
|
|
930
|
+
},
|
|
931
|
+
urlInspections: {
|
|
932
|
+
used: 310,
|
|
933
|
+
allowance: 5e3,
|
|
934
|
+
resetsAt: "2026-11-01"
|
|
935
|
+
}
|
|
936
|
+
},
|
|
937
|
+
sizeLimitRowsPerDay: 2500,
|
|
938
|
+
heldSites: [{
|
|
939
|
+
siteId: "s_02",
|
|
940
|
+
hold: "size_limit"
|
|
941
|
+
}]
|
|
942
|
+
},
|
|
943
|
+
meta: {
|
|
944
|
+
requestId: "req_01",
|
|
945
|
+
surface: "partner",
|
|
946
|
+
version: "1.0"
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
}),
|
|
816
952
|
listAvailableSites: defineHttpOperation({
|
|
817
953
|
...gscdumpV1OperationRoute("partner.users.sites.available.list"),
|
|
818
954
|
visibility: "public",
|
|
@@ -1709,6 +1845,274 @@ function createGscdumpV1Protocol() {
|
|
|
1709
1845
|
}
|
|
1710
1846
|
}
|
|
1711
1847
|
}),
|
|
1848
|
+
listUserBingSites: defineHttpOperation({
|
|
1849
|
+
...gscdumpV1OperationRoute("partner.users.indexing.bing.sites.list"),
|
|
1850
|
+
visibility: "public",
|
|
1851
|
+
semantics: {
|
|
1852
|
+
kind: "query",
|
|
1853
|
+
sideEffects: "none",
|
|
1854
|
+
idempotent: true,
|
|
1855
|
+
retry: "idempotent",
|
|
1856
|
+
readConsistency: "primary"
|
|
1857
|
+
},
|
|
1858
|
+
auth: {
|
|
1859
|
+
credentials: ["user_key", "partner_key"],
|
|
1860
|
+
scopes: ["indexing:read"],
|
|
1861
|
+
ownership: [{
|
|
1862
|
+
credential: "user_key",
|
|
1863
|
+
rule: "self"
|
|
1864
|
+
}, {
|
|
1865
|
+
credential: "partner_key",
|
|
1866
|
+
rule: "linked_user"
|
|
1867
|
+
}]
|
|
1868
|
+
},
|
|
1869
|
+
request: {
|
|
1870
|
+
params: z.strictObject({ userId: realtimeSchemas.publicUserId }),
|
|
1871
|
+
query: bingSitesQueryV1Schema,
|
|
1872
|
+
headers: requestHeaders,
|
|
1873
|
+
body: null
|
|
1874
|
+
},
|
|
1875
|
+
responses: { 200: bingSitesResponse },
|
|
1876
|
+
errors: partnerUserErrors,
|
|
1877
|
+
errorResponse: errorEnvelopeSchemas(partnerUserErrors, realtimeSchemas.publicRequestId),
|
|
1878
|
+
resources: {
|
|
1879
|
+
reads: [{
|
|
1880
|
+
type: "partner.user",
|
|
1881
|
+
idFrom: "params.userId"
|
|
1882
|
+
}, {
|
|
1883
|
+
type: "user.sites",
|
|
1884
|
+
idFrom: "params.userId"
|
|
1885
|
+
}],
|
|
1886
|
+
changes: []
|
|
1887
|
+
},
|
|
1888
|
+
lifecycle: { introduced: "4.8.0" },
|
|
1889
|
+
docs: {
|
|
1890
|
+
summary: "List Bing state for every Site",
|
|
1891
|
+
description: "Returns the user's Bing grant and one tagged Bing state for each Site the user can see. A partner credential sees only its own Sites. `callerCanAct` says whether the caller may run the Operation the state names. Filter by `teamId` to read one Team.",
|
|
1892
|
+
tags: ["Indexing"],
|
|
1893
|
+
examples: {
|
|
1894
|
+
request: {
|
|
1895
|
+
params: { userId: "u_01" },
|
|
1896
|
+
query: { teamId: "t_01" }
|
|
1897
|
+
},
|
|
1898
|
+
response: {
|
|
1899
|
+
data: {
|
|
1900
|
+
searchEngine: "bing",
|
|
1901
|
+
grant: {
|
|
1902
|
+
_tag: "authorized",
|
|
1903
|
+
scopes: ["webmaster.manage"]
|
|
1904
|
+
},
|
|
1905
|
+
sites: [{
|
|
1906
|
+
siteId: "s_01",
|
|
1907
|
+
siteUrl: "https://example.com/",
|
|
1908
|
+
teamId: "t_01",
|
|
1909
|
+
callerCanAct: true,
|
|
1910
|
+
state: {
|
|
1911
|
+
_tag: "linkable",
|
|
1912
|
+
reason: "not-linked"
|
|
1913
|
+
}
|
|
1914
|
+
}]
|
|
1915
|
+
},
|
|
1916
|
+
meta: {
|
|
1917
|
+
requestId: "req_01",
|
|
1918
|
+
surface: "partner",
|
|
1919
|
+
version: "1.0"
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
}),
|
|
1925
|
+
linkSiteBing: defineHttpOperation({
|
|
1926
|
+
...gscdumpV1OperationRoute("partner.sites.indexing.bing.link.create"),
|
|
1927
|
+
visibility: "public",
|
|
1928
|
+
semantics: {
|
|
1929
|
+
kind: "mutation",
|
|
1930
|
+
sideEffects: "state",
|
|
1931
|
+
idempotent: true,
|
|
1932
|
+
retry: "idempotent",
|
|
1933
|
+
readConsistency: null
|
|
1934
|
+
},
|
|
1935
|
+
auth: {
|
|
1936
|
+
credentials: ["user_key", "partner_key"],
|
|
1937
|
+
scopes: ["indexing:write"],
|
|
1938
|
+
ownership: [{
|
|
1939
|
+
credential: "user_key",
|
|
1940
|
+
rule: "authorized_site"
|
|
1941
|
+
}, {
|
|
1942
|
+
credential: "partner_key",
|
|
1943
|
+
rule: "authorized_site"
|
|
1944
|
+
}]
|
|
1945
|
+
},
|
|
1946
|
+
request: {
|
|
1947
|
+
params: z.strictObject({ siteId: realtimeSchemas.publicSiteId }),
|
|
1948
|
+
query: null,
|
|
1949
|
+
headers: requestHeaders,
|
|
1950
|
+
body: null
|
|
1951
|
+
},
|
|
1952
|
+
responses: { 200: bingLinkResponse },
|
|
1953
|
+
errors: partnerSiteErrors,
|
|
1954
|
+
errorResponse: errorEnvelopeSchemas(partnerSiteErrors, realtimeSchemas.publicRequestId),
|
|
1955
|
+
resources: {
|
|
1956
|
+
reads: [{
|
|
1957
|
+
type: "site.indexing",
|
|
1958
|
+
idFrom: "params.siteId"
|
|
1959
|
+
}],
|
|
1960
|
+
changes: [{
|
|
1961
|
+
type: "site.indexing",
|
|
1962
|
+
idFrom: "params.siteId"
|
|
1963
|
+
}]
|
|
1964
|
+
},
|
|
1965
|
+
lifecycle: { introduced: "4.8.0" },
|
|
1966
|
+
docs: {
|
|
1967
|
+
summary: "Link a Site to Bing",
|
|
1968
|
+
description: "Binds the Site with the Site owner's stored Bing grant, with no Microsoft redirect. Only the Site owner's user credential may link: any other caller gets `403 forbidden` with `details.reason` `site-owner-required`. Every expected outcome is a value: `linked` carries the new Site state, `grant-required` asks the owner to authorize Bing, and `failed` says whether a retry can help.",
|
|
1969
|
+
tags: ["Indexing"],
|
|
1970
|
+
examples: {
|
|
1971
|
+
request: { params: { siteId: "s_01" } },
|
|
1972
|
+
response: {
|
|
1973
|
+
data: {
|
|
1974
|
+
_tag: "grant-required",
|
|
1975
|
+
reason: "grant-missing"
|
|
1976
|
+
},
|
|
1977
|
+
meta: {
|
|
1978
|
+
requestId: "req_01",
|
|
1979
|
+
surface: "partner",
|
|
1980
|
+
version: "1.0"
|
|
1981
|
+
}
|
|
1982
|
+
}
|
|
1983
|
+
}
|
|
1984
|
+
}
|
|
1985
|
+
}),
|
|
1986
|
+
createSiteBingAuthorization: defineHttpOperation({
|
|
1987
|
+
...gscdumpV1OperationRoute("partner.sites.indexing.bing.authorization.create"),
|
|
1988
|
+
visibility: "public",
|
|
1989
|
+
semantics: {
|
|
1990
|
+
kind: "mutation",
|
|
1991
|
+
sideEffects: "state",
|
|
1992
|
+
idempotent: true,
|
|
1993
|
+
retry: "idempotent",
|
|
1994
|
+
readConsistency: null
|
|
1995
|
+
},
|
|
1996
|
+
auth: {
|
|
1997
|
+
credentials: ["user_key", "partner_key"],
|
|
1998
|
+
scopes: ["indexing:write"],
|
|
1999
|
+
ownership: [{
|
|
2000
|
+
credential: "user_key",
|
|
2001
|
+
rule: "authorized_site"
|
|
2002
|
+
}, {
|
|
2003
|
+
credential: "partner_key",
|
|
2004
|
+
rule: "authorized_site"
|
|
2005
|
+
}]
|
|
2006
|
+
},
|
|
2007
|
+
request: {
|
|
2008
|
+
params: z.strictObject({ siteId: realtimeSchemas.publicSiteId }),
|
|
2009
|
+
query: null,
|
|
2010
|
+
headers: requestHeaders,
|
|
2011
|
+
body: bingAuthorizationRequestV1Schema
|
|
2012
|
+
},
|
|
2013
|
+
responses: { 200: bingAuthorizationResponse },
|
|
2014
|
+
errors: partnerSiteErrors,
|
|
2015
|
+
errorResponse: errorEnvelopeSchemas(partnerSiteErrors, realtimeSchemas.publicRequestId),
|
|
2016
|
+
resources: {
|
|
2017
|
+
reads: [{
|
|
2018
|
+
type: "site.indexing",
|
|
2019
|
+
idFrom: "params.siteId"
|
|
2020
|
+
}],
|
|
2021
|
+
changes: []
|
|
2022
|
+
},
|
|
2023
|
+
lifecycle: { introduced: "4.8.0" },
|
|
2024
|
+
docs: {
|
|
2025
|
+
summary: "Authorize Bing for a Site",
|
|
2026
|
+
description: "Returns a Microsoft authorize URL that expires at `expiresAt`. After consent, gscdump stores the grant, links the Site, and returns the browser to `returnUrl` with `bing=connected`, `bing=verification-required`, or `bing=error&reason=<reason>`. `returnUrl` must be a gscdump.com path or an allowed origin, otherwise the request fails with `400 invalid_request` and `details.reason` `return-url-not-allowed`. Only the Site owner's user credential may authorize.",
|
|
2027
|
+
tags: ["Indexing"],
|
|
2028
|
+
examples: {
|
|
2029
|
+
request: {
|
|
2030
|
+
params: { siteId: "s_01" },
|
|
2031
|
+
body: { returnUrl: "https://nuxtseo.com/pro/dashboard/integrations" }
|
|
2032
|
+
},
|
|
2033
|
+
response: {
|
|
2034
|
+
data: {
|
|
2035
|
+
authorizeUrl: "https://www.bing.com/webmasters/oauth/authorize?client_id=gscdump&state=intent_01",
|
|
2036
|
+
expiresAt: "2026-09-30T00:10:00.000Z"
|
|
2037
|
+
},
|
|
2038
|
+
meta: {
|
|
2039
|
+
requestId: "req_01",
|
|
2040
|
+
surface: "partner",
|
|
2041
|
+
version: "1.0"
|
|
2042
|
+
}
|
|
2043
|
+
}
|
|
2044
|
+
}
|
|
2045
|
+
}
|
|
2046
|
+
}),
|
|
2047
|
+
submitSiteBingSitemap: defineHttpOperation({
|
|
2048
|
+
...gscdumpV1OperationRoute("partner.sites.indexing.bing.sitemaps.submit"),
|
|
2049
|
+
visibility: "public",
|
|
2050
|
+
semantics: {
|
|
2051
|
+
kind: "mutation",
|
|
2052
|
+
sideEffects: "state",
|
|
2053
|
+
idempotent: true,
|
|
2054
|
+
retry: "idempotent",
|
|
2055
|
+
readConsistency: null
|
|
2056
|
+
},
|
|
2057
|
+
auth: {
|
|
2058
|
+
credentials: ["user_key", "partner_key"],
|
|
2059
|
+
scopes: ["indexing:write"],
|
|
2060
|
+
ownership: [{
|
|
2061
|
+
credential: "user_key",
|
|
2062
|
+
rule: "authorized_site"
|
|
2063
|
+
}, {
|
|
2064
|
+
credential: "partner_key",
|
|
2065
|
+
rule: "authorized_site"
|
|
2066
|
+
}]
|
|
2067
|
+
},
|
|
2068
|
+
request: {
|
|
2069
|
+
params: z.strictObject({ siteId: realtimeSchemas.publicSiteId }),
|
|
2070
|
+
query: null,
|
|
2071
|
+
headers: requestHeaders,
|
|
2072
|
+
body: bingSitemapSubmitRequestV1Schema
|
|
2073
|
+
},
|
|
2074
|
+
responses: { 200: bingSitemapSubmitResponse },
|
|
2075
|
+
errors: partnerSiteErrors,
|
|
2076
|
+
errorResponse: errorEnvelopeSchemas(partnerSiteErrors, realtimeSchemas.publicRequestId),
|
|
2077
|
+
resources: {
|
|
2078
|
+
reads: [{
|
|
2079
|
+
type: "site.indexing",
|
|
2080
|
+
idFrom: "params.siteId"
|
|
2081
|
+
}],
|
|
2082
|
+
changes: [{
|
|
2083
|
+
type: "site.indexing",
|
|
2084
|
+
idFrom: "params.siteId"
|
|
2085
|
+
}]
|
|
2086
|
+
},
|
|
2087
|
+
lifecycle: { introduced: "4.8.0" },
|
|
2088
|
+
docs: {
|
|
2089
|
+
summary: "Submit a Sitemap to Bing",
|
|
2090
|
+
description: "Submits one Sitemap for a verified Site, then reads what Bing lists. Without `url`, gscdump submits the Sitemap it finds on the Site. Bing lags after a submit, so `sitemap` usually reads `awaiting-bing`. Every expected outcome is a value.",
|
|
2091
|
+
tags: ["Indexing"],
|
|
2092
|
+
examples: {
|
|
2093
|
+
request: {
|
|
2094
|
+
params: { siteId: "s_01" },
|
|
2095
|
+
body: {}
|
|
2096
|
+
},
|
|
2097
|
+
response: {
|
|
2098
|
+
data: {
|
|
2099
|
+
_tag: "submitted",
|
|
2100
|
+
sitemapUrl: "https://example.com/sitemap.xml",
|
|
2101
|
+
sitemap: {
|
|
2102
|
+
_tag: "awaiting-bing",
|
|
2103
|
+
checkedAt: "2026-09-30T00:00:00.000Z",
|
|
2104
|
+
lastSubmittedAt: "2026-09-30T00:00:00.000Z"
|
|
2105
|
+
}
|
|
2106
|
+
},
|
|
2107
|
+
meta: {
|
|
2108
|
+
requestId: "req_01",
|
|
2109
|
+
surface: "partner",
|
|
2110
|
+
version: "1.0"
|
|
2111
|
+
}
|
|
2112
|
+
}
|
|
2113
|
+
}
|
|
2114
|
+
}
|
|
2115
|
+
}),
|
|
1712
2116
|
getSiteBingConnection: defineHttpOperation({
|
|
1713
2117
|
...gscdumpV1OperationRoute("partner.sites.indexing.bing.connection.get"),
|
|
1714
2118
|
visibility: "public",
|
|
@@ -2055,6 +2459,132 @@ function createGscdumpV1Protocol() {
|
|
|
2055
2459
|
}
|
|
2056
2460
|
}
|
|
2057
2461
|
}),
|
|
2462
|
+
getSiteSitemapSubmission: defineHttpOperation({
|
|
2463
|
+
...gscdumpV1OperationRoute("partner.sites.sitemaps.submission.get"),
|
|
2464
|
+
visibility: "public",
|
|
2465
|
+
semantics: {
|
|
2466
|
+
kind: "query",
|
|
2467
|
+
sideEffects: "none",
|
|
2468
|
+
idempotent: true,
|
|
2469
|
+
retry: "idempotent",
|
|
2470
|
+
readConsistency: "primary"
|
|
2471
|
+
},
|
|
2472
|
+
auth: {
|
|
2473
|
+
credentials: ["user_key", "partner_key"],
|
|
2474
|
+
scopes: ["sitemaps:read"],
|
|
2475
|
+
ownership: [{
|
|
2476
|
+
credential: "user_key",
|
|
2477
|
+
rule: "authorized_site"
|
|
2478
|
+
}, {
|
|
2479
|
+
credential: "partner_key",
|
|
2480
|
+
rule: "authorized_site"
|
|
2481
|
+
}]
|
|
2482
|
+
},
|
|
2483
|
+
request: {
|
|
2484
|
+
params: z.strictObject({ siteId: realtimeSchemas.publicSiteId }),
|
|
2485
|
+
query: null,
|
|
2486
|
+
headers: requestHeaders,
|
|
2487
|
+
body: null
|
|
2488
|
+
},
|
|
2489
|
+
responses: { 200: sitemapSubmissionResponse },
|
|
2490
|
+
errors: partnerSiteErrors,
|
|
2491
|
+
errorResponse: errorEnvelopeSchemas(partnerSiteErrors, realtimeSchemas.publicRequestId),
|
|
2492
|
+
resources: {
|
|
2493
|
+
reads: [{
|
|
2494
|
+
type: "site.sitemaps",
|
|
2495
|
+
idFrom: "params.siteId"
|
|
2496
|
+
}],
|
|
2497
|
+
changes: []
|
|
2498
|
+
},
|
|
2499
|
+
lifecycle: { introduced: "4.8.0" },
|
|
2500
|
+
docs: {
|
|
2501
|
+
summary: "Get Sitemap submission",
|
|
2502
|
+
description: "Returns the Sitemap gscdump would submit to Google for the Site and whether the stored grant can submit it. gscdump picks a Sitemap it found on the Site's own host, under the linked property, and reads its own record of the granted scopes and the property permission. It makes no Google call.",
|
|
2503
|
+
tags: ["Sitemaps"],
|
|
2504
|
+
examples: {
|
|
2505
|
+
request: { params: { siteId: "s_01" } },
|
|
2506
|
+
response: {
|
|
2507
|
+
data: {
|
|
2508
|
+
searchEngine: "google",
|
|
2509
|
+
gscPropertyUrl: "sc-domain:example.com",
|
|
2510
|
+
callerCanAct: true,
|
|
2511
|
+
state: {
|
|
2512
|
+
_tag: "ready",
|
|
2513
|
+
sitemapUrl: "https://example.com/sitemap.xml",
|
|
2514
|
+
writeAccess: "granted"
|
|
2515
|
+
}
|
|
2516
|
+
},
|
|
2517
|
+
meta: {
|
|
2518
|
+
requestId: "req_01",
|
|
2519
|
+
surface: "partner",
|
|
2520
|
+
version: "1.0"
|
|
2521
|
+
}
|
|
2522
|
+
}
|
|
2523
|
+
}
|
|
2524
|
+
}
|
|
2525
|
+
}),
|
|
2526
|
+
submitSiteSitemap: defineHttpOperation({
|
|
2527
|
+
...gscdumpV1OperationRoute("partner.sites.sitemaps.submission.create"),
|
|
2528
|
+
visibility: "public",
|
|
2529
|
+
semantics: {
|
|
2530
|
+
kind: "mutation",
|
|
2531
|
+
sideEffects: "state",
|
|
2532
|
+
idempotent: true,
|
|
2533
|
+
retry: "idempotent",
|
|
2534
|
+
readConsistency: null
|
|
2535
|
+
},
|
|
2536
|
+
auth: {
|
|
2537
|
+
credentials: ["user_key", "partner_key"],
|
|
2538
|
+
scopes: ["sitemaps:write"],
|
|
2539
|
+
ownership: [{
|
|
2540
|
+
credential: "user_key",
|
|
2541
|
+
rule: "authorized_site"
|
|
2542
|
+
}, {
|
|
2543
|
+
credential: "partner_key",
|
|
2544
|
+
rule: "authorized_site"
|
|
2545
|
+
}]
|
|
2546
|
+
},
|
|
2547
|
+
request: {
|
|
2548
|
+
params: z.strictObject({ siteId: realtimeSchemas.publicSiteId }),
|
|
2549
|
+
query: null,
|
|
2550
|
+
headers: requestHeaders,
|
|
2551
|
+
body: null
|
|
2552
|
+
},
|
|
2553
|
+
responses: { 200: sitemapSubmitResponse },
|
|
2554
|
+
errors: partnerSiteErrors,
|
|
2555
|
+
errorResponse: errorEnvelopeSchemas(partnerSiteErrors, realtimeSchemas.publicRequestId),
|
|
2556
|
+
resources: {
|
|
2557
|
+
reads: [{
|
|
2558
|
+
type: "site.sitemaps",
|
|
2559
|
+
idFrom: "params.siteId"
|
|
2560
|
+
}],
|
|
2561
|
+
changes: [{
|
|
2562
|
+
type: "site.sitemaps",
|
|
2563
|
+
idFrom: "params.siteId"
|
|
2564
|
+
}]
|
|
2565
|
+
},
|
|
2566
|
+
lifecycle: { introduced: "4.8.0" },
|
|
2567
|
+
docs: {
|
|
2568
|
+
summary: "Submit a Sitemap to Google",
|
|
2569
|
+
description: "Submits the Sitemap `partner.sites.sitemaps.submission.get` names, with the Site owner's stored grant. It reads Google's Sitemap list first, so a Sitemap submitted elsewhere reads `already-listed`. When gscdump has found none yet, it looks on the Site. It does not ask Google to submit when its own record shows the grant or permission cannot. Every expected outcome is a value.",
|
|
2570
|
+
tags: ["Sitemaps"],
|
|
2571
|
+
examples: {
|
|
2572
|
+
request: { params: { siteId: "s_01" } },
|
|
2573
|
+
response: {
|
|
2574
|
+
data: {
|
|
2575
|
+
_tag: "submitted",
|
|
2576
|
+
sitemapUrl: "https://example.com/sitemap.xml",
|
|
2577
|
+
sitemapCount: 1
|
|
2578
|
+
},
|
|
2579
|
+
meta: {
|
|
2580
|
+
requestId: "req_01",
|
|
2581
|
+
surface: "partner",
|
|
2582
|
+
version: "1.0"
|
|
2583
|
+
}
|
|
2584
|
+
}
|
|
2585
|
+
}
|
|
2586
|
+
}
|
|
2587
|
+
}),
|
|
2058
2588
|
getSiteSitemapChanges: defineHttpOperation({
|
|
2059
2589
|
...gscdumpV1OperationRoute("partner.sites.sitemaps.changes.get"),
|
|
2060
2590
|
visibility: "public",
|
|
@@ -5280,7 +5810,14 @@ function createGscdumpV1Protocol() {
|
|
|
5280
5810
|
indexNowConnectionResponse,
|
|
5281
5811
|
indexNowSubmissionResponse,
|
|
5282
5812
|
indexNowSubmissionReceiptsResponse,
|
|
5813
|
+
bingSitesResponse,
|
|
5814
|
+
bingLinkResponse,
|
|
5815
|
+
bingAuthorizationResponse,
|
|
5816
|
+
bingSitemapSubmitResponse,
|
|
5817
|
+
sitemapSubmissionResponse,
|
|
5818
|
+
sitemapSubmitResponse,
|
|
5283
5819
|
lifecycleResponse,
|
|
5820
|
+
userEntitlementsResponse,
|
|
5284
5821
|
registerSiteRequest,
|
|
5285
5822
|
sitemapChangesQuery,
|
|
5286
5823
|
sitemapChangesResponse,
|
|
@@ -21,6 +21,11 @@ export declare const GSCDUMP_V1_ROUTE_CATALOG: {
|
|
|
21
21
|
readonly method: "GET";
|
|
22
22
|
readonly template: "/users/{userId}/lifecycle";
|
|
23
23
|
};
|
|
24
|
+
readonly 'partner.users.entitlements.get': {
|
|
25
|
+
readonly surface: "partner";
|
|
26
|
+
readonly method: "GET";
|
|
27
|
+
readonly template: "/users/{userId}/entitlements";
|
|
28
|
+
};
|
|
24
29
|
readonly 'partner.users.sites.available.list': {
|
|
25
30
|
readonly surface: "partner";
|
|
26
31
|
readonly method: "GET";
|
|
@@ -41,6 +46,11 @@ export declare const GSCDUMP_V1_ROUTE_CATALOG: {
|
|
|
41
46
|
readonly method: "PATCH";
|
|
42
47
|
readonly template: "/users/{userId}/tokens";
|
|
43
48
|
};
|
|
49
|
+
readonly 'partner.users.indexing.bing.sites.list': {
|
|
50
|
+
readonly surface: "partner";
|
|
51
|
+
readonly method: "GET";
|
|
52
|
+
readonly template: "/users/{userId}/indexing/bing/sites";
|
|
53
|
+
};
|
|
44
54
|
readonly 'partner.sites.indexing.get': {
|
|
45
55
|
readonly surface: "partner";
|
|
46
56
|
readonly method: "GET";
|
|
@@ -96,6 +106,21 @@ export declare const GSCDUMP_V1_ROUTE_CATALOG: {
|
|
|
96
106
|
readonly method: "POST";
|
|
97
107
|
readonly template: "/sites/{siteId}/indexing/bing/connection/verify";
|
|
98
108
|
};
|
|
109
|
+
readonly 'partner.sites.indexing.bing.link.create': {
|
|
110
|
+
readonly surface: "partner";
|
|
111
|
+
readonly method: "POST";
|
|
112
|
+
readonly template: "/sites/{siteId}/indexing/bing/link";
|
|
113
|
+
};
|
|
114
|
+
readonly 'partner.sites.indexing.bing.authorization.create': {
|
|
115
|
+
readonly surface: "partner";
|
|
116
|
+
readonly method: "POST";
|
|
117
|
+
readonly template: "/sites/{siteId}/indexing/bing/authorization";
|
|
118
|
+
};
|
|
119
|
+
readonly 'partner.sites.indexing.bing.sitemaps.submit': {
|
|
120
|
+
readonly surface: "partner";
|
|
121
|
+
readonly method: "POST";
|
|
122
|
+
readonly template: "/sites/{siteId}/indexing/bing/sitemaps";
|
|
123
|
+
};
|
|
99
124
|
readonly 'partner.sites.indexing.transitions.list': {
|
|
100
125
|
readonly surface: "partner";
|
|
101
126
|
readonly method: "GET";
|
|
@@ -116,6 +141,16 @@ export declare const GSCDUMP_V1_ROUTE_CATALOG: {
|
|
|
116
141
|
readonly method: "GET";
|
|
117
142
|
readonly template: "/sites/{siteId}/sitemaps/changes";
|
|
118
143
|
};
|
|
144
|
+
readonly 'partner.sites.sitemaps.submission.get': {
|
|
145
|
+
readonly surface: "partner";
|
|
146
|
+
readonly method: "GET";
|
|
147
|
+
readonly template: "/sites/{siteId}/sitemaps/submission";
|
|
148
|
+
};
|
|
149
|
+
readonly 'partner.sites.sitemaps.submission.create': {
|
|
150
|
+
readonly surface: "partner";
|
|
151
|
+
readonly method: "POST";
|
|
152
|
+
readonly template: "/sites/{siteId}/sitemaps/submission";
|
|
153
|
+
};
|
|
119
154
|
readonly 'partner.sites.analysis.get': {
|
|
120
155
|
readonly surface: "partner";
|
|
121
156
|
readonly method: "GET";
|