@gscdump/contracts 1.5.4 → 2.0.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/dist/analytics.d.mts +2 -2
- package/dist/endpoints.d.mts +0 -216
- package/dist/endpoints.mjs +0 -7
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/partner.d.mts +2 -2
- package/dist/routes.d.mts +0 -6
- package/dist/routes.mjs +0 -6
- package/dist/schemas.d.mts +214 -438
- package/dist/schemas.mjs +103 -53
- package/dist/types.d.mts +77 -44
- package/dist/v1/operations.d.mts +669 -42
- package/dist/v1/operations.mjs +169 -12
- package/package.json +1 -1
package/dist/v1/operations.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
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, gscdumpSitemapMembershipParamsSchema, gscdumpSitemapMembershipResponseSchema, 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";
|
|
1
|
+
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";
|
|
2
2
|
import "./version.mjs";
|
|
3
3
|
import { HTTP_V1_ERROR_CODES, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse } from "./http-core.mjs";
|
|
4
4
|
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";
|
|
@@ -495,6 +495,16 @@ function createGscdumpV1Protocol() {
|
|
|
495
495
|
}, partnerResponseMeta);
|
|
496
496
|
const sitemapMembershipRequest = gscdumpSitemapMembershipParamsSchema.strict();
|
|
497
497
|
const sitemapMembershipResponse = defineSuccessResponse(defineResponseObject(gscdumpSitemapMembershipResponseSchema.shape), partnerResponseMeta);
|
|
498
|
+
const sitemapUrlsQuery = gscdumpSitemapUrlsQuerySchema;
|
|
499
|
+
const sitemapUrlsResponse = defineSuccessResponse({
|
|
500
|
+
producer: gscdumpSitemapUrlsResponseSchema,
|
|
501
|
+
client: gscdumpSitemapUrlsResponseSchema
|
|
502
|
+
}, partnerResponseMeta);
|
|
503
|
+
const sitemapExportQuery = gscdumpSitemapExportQuerySchema;
|
|
504
|
+
const sitemapExportResponse = defineSuccessResponse({
|
|
505
|
+
producer: gscdumpSitemapExportResponseSchema,
|
|
506
|
+
client: gscdumpSitemapExportResponseSchema
|
|
507
|
+
}, partnerResponseMeta);
|
|
498
508
|
const createTeamRequest = createPartnerTeamSchema.strict();
|
|
499
509
|
const teamCreatedResponse = defineSuccessResponse(defineResponseObject(partnerTeamCreatedResponseSchema.shape), partnerResponseMeta);
|
|
500
510
|
const renameTeamRequest = renamePartnerTeamSchema.strict();
|
|
@@ -1335,6 +1345,7 @@ function createGscdumpV1Protocol() {
|
|
|
1335
1345
|
sitemaps: [],
|
|
1336
1346
|
history: [],
|
|
1337
1347
|
perSitemapHistory: {},
|
|
1348
|
+
generation: null,
|
|
1338
1349
|
meta: {
|
|
1339
1350
|
siteUrl: "sc-domain:example.com",
|
|
1340
1351
|
gscPropertyUrl: "sc-domain:example.com",
|
|
@@ -1407,9 +1418,12 @@ function createGscdumpV1Protocol() {
|
|
|
1407
1418
|
data: {
|
|
1408
1419
|
added: [],
|
|
1409
1420
|
removed: [],
|
|
1421
|
+
updated: [],
|
|
1422
|
+
generation: null,
|
|
1410
1423
|
summary: {
|
|
1411
1424
|
totalAdded: 0,
|
|
1412
1425
|
totalRemoved: 0,
|
|
1426
|
+
totalUpdated: 0,
|
|
1413
1427
|
period: { days: 28 }
|
|
1414
1428
|
},
|
|
1415
1429
|
completeness: {
|
|
@@ -2749,26 +2763,169 @@ function createGscdumpV1Protocol() {
|
|
|
2749
2763
|
lifecycle: { introduced: "1.3.0" },
|
|
2750
2764
|
docs: {
|
|
2751
2765
|
summary: "Query sitemap membership",
|
|
2752
|
-
description: "
|
|
2766
|
+
description: "Returns generation-pinned present, absent, or unknown evidence for each exact requested URL.",
|
|
2753
2767
|
tags: ["Sitemaps"],
|
|
2754
2768
|
examples: {
|
|
2755
2769
|
request: {
|
|
2756
2770
|
params: { siteId: "s_01" },
|
|
2757
|
-
body: {
|
|
2758
|
-
urls: ["https://example.com/"],
|
|
2759
|
-
maxAgeDays: 30
|
|
2760
|
-
}
|
|
2771
|
+
body: { urls: ["https://example.com/"] }
|
|
2761
2772
|
},
|
|
2762
2773
|
response: {
|
|
2763
2774
|
data: {
|
|
2764
|
-
|
|
2775
|
+
generation: null,
|
|
2776
|
+
evidence: [{
|
|
2777
|
+
_tag: "unknown",
|
|
2778
|
+
url: "https://example.com/",
|
|
2779
|
+
reason: "no_generation"
|
|
2780
|
+
}],
|
|
2765
2781
|
meta: {
|
|
2766
|
-
available: true,
|
|
2767
|
-
reason: null,
|
|
2768
2782
|
requested: 1,
|
|
2769
|
-
checked:
|
|
2770
|
-
matched: 0
|
|
2771
|
-
|
|
2783
|
+
checked: 0,
|
|
2784
|
+
matched: 0
|
|
2785
|
+
}
|
|
2786
|
+
},
|
|
2787
|
+
meta: {
|
|
2788
|
+
requestId: "req_01",
|
|
2789
|
+
surface: "partner",
|
|
2790
|
+
version: "1.0"
|
|
2791
|
+
}
|
|
2792
|
+
}
|
|
2793
|
+
}
|
|
2794
|
+
}
|
|
2795
|
+
}),
|
|
2796
|
+
listSitemapUrls: defineHttpOperation({
|
|
2797
|
+
id: "partner.sites.sitemaps.urls.get",
|
|
2798
|
+
method: "GET",
|
|
2799
|
+
path: "/sites/{siteId}/sitemaps/urls",
|
|
2800
|
+
visibility: "public",
|
|
2801
|
+
semantics: {
|
|
2802
|
+
kind: "query",
|
|
2803
|
+
sideEffects: "none",
|
|
2804
|
+
idempotent: true,
|
|
2805
|
+
retry: "idempotent",
|
|
2806
|
+
readConsistency: "primary"
|
|
2807
|
+
},
|
|
2808
|
+
auth: {
|
|
2809
|
+
credentials: ["user_key", "partner_key"],
|
|
2810
|
+
scopes: ["sitemaps:read"],
|
|
2811
|
+
ownership: [{
|
|
2812
|
+
credential: "user_key",
|
|
2813
|
+
rule: "authorized_site"
|
|
2814
|
+
}, {
|
|
2815
|
+
credential: "partner_key",
|
|
2816
|
+
rule: "authorized_site"
|
|
2817
|
+
}]
|
|
2818
|
+
},
|
|
2819
|
+
request: {
|
|
2820
|
+
params: z.strictObject({ siteId: realtimeSchemas.publicSiteId }),
|
|
2821
|
+
query: sitemapUrlsQuery,
|
|
2822
|
+
headers: requestHeaders,
|
|
2823
|
+
body: null
|
|
2824
|
+
},
|
|
2825
|
+
responses: { 200: sitemapUrlsResponse },
|
|
2826
|
+
errors: partnerSiteErrors,
|
|
2827
|
+
errorResponse: errorEnvelopeSchemas(partnerSiteErrors, realtimeSchemas.publicRequestId),
|
|
2828
|
+
resources: {
|
|
2829
|
+
reads: [{
|
|
2830
|
+
type: "site.sitemaps",
|
|
2831
|
+
idFrom: "params.siteId"
|
|
2832
|
+
}],
|
|
2833
|
+
changes: []
|
|
2834
|
+
},
|
|
2835
|
+
lifecycle: { introduced: "2.0.0" },
|
|
2836
|
+
docs: {
|
|
2837
|
+
summary: "List sitemap URLs",
|
|
2838
|
+
description: "Returns an exact generation-pinned cursor page of sitemap membership and lastmod evidence.",
|
|
2839
|
+
tags: ["Sitemaps"],
|
|
2840
|
+
examples: {
|
|
2841
|
+
request: {
|
|
2842
|
+
params: { siteId: "s_01" },
|
|
2843
|
+
query: { limit: 500 }
|
|
2844
|
+
},
|
|
2845
|
+
response: {
|
|
2846
|
+
data: {
|
|
2847
|
+
generation: {
|
|
2848
|
+
id: "site-01JZ",
|
|
2849
|
+
observedAt: 1753746e6,
|
|
2850
|
+
publishedAt: 1753746000100,
|
|
2851
|
+
completeness: { _tag: "complete" },
|
|
2852
|
+
membershipHistoryAvailableFrom: 1753746e6,
|
|
2853
|
+
legacyImport: { _tag: "none" }
|
|
2854
|
+
},
|
|
2855
|
+
items: [],
|
|
2856
|
+
page: {
|
|
2857
|
+
nextCursor: null,
|
|
2858
|
+
limit: 500
|
|
2859
|
+
}
|
|
2860
|
+
},
|
|
2861
|
+
meta: {
|
|
2862
|
+
requestId: "req_01",
|
|
2863
|
+
surface: "partner",
|
|
2864
|
+
version: "1.0"
|
|
2865
|
+
}
|
|
2866
|
+
}
|
|
2867
|
+
}
|
|
2868
|
+
}
|
|
2869
|
+
}),
|
|
2870
|
+
getSitemapExport: defineHttpOperation({
|
|
2871
|
+
id: "partner.sites.sitemaps.export.get",
|
|
2872
|
+
method: "GET",
|
|
2873
|
+
path: "/sites/{siteId}/sitemaps/export",
|
|
2874
|
+
visibility: "public",
|
|
2875
|
+
semantics: {
|
|
2876
|
+
kind: "query",
|
|
2877
|
+
sideEffects: "none",
|
|
2878
|
+
idempotent: true,
|
|
2879
|
+
retry: "idempotent",
|
|
2880
|
+
readConsistency: "primary"
|
|
2881
|
+
},
|
|
2882
|
+
auth: {
|
|
2883
|
+
credentials: ["user_key", "partner_key"],
|
|
2884
|
+
scopes: ["sitemaps:read"],
|
|
2885
|
+
ownership: [{
|
|
2886
|
+
credential: "user_key",
|
|
2887
|
+
rule: "authorized_site"
|
|
2888
|
+
}, {
|
|
2889
|
+
credential: "partner_key",
|
|
2890
|
+
rule: "authorized_site"
|
|
2891
|
+
}]
|
|
2892
|
+
},
|
|
2893
|
+
request: {
|
|
2894
|
+
params: z.strictObject({ siteId: realtimeSchemas.publicSiteId }),
|
|
2895
|
+
query: sitemapExportQuery,
|
|
2896
|
+
headers: requestHeaders,
|
|
2897
|
+
body: null
|
|
2898
|
+
},
|
|
2899
|
+
responses: { 200: sitemapExportResponse },
|
|
2900
|
+
errors: partnerSiteErrors,
|
|
2901
|
+
errorResponse: errorEnvelopeSchemas(partnerSiteErrors, realtimeSchemas.publicRequestId),
|
|
2902
|
+
resources: {
|
|
2903
|
+
reads: [{
|
|
2904
|
+
type: "site.sitemaps",
|
|
2905
|
+
idFrom: "params.siteId"
|
|
2906
|
+
}],
|
|
2907
|
+
changes: []
|
|
2908
|
+
},
|
|
2909
|
+
lifecycle: { introduced: "2.0.0" },
|
|
2910
|
+
docs: {
|
|
2911
|
+
summary: "Get sitemap bulk export",
|
|
2912
|
+
description: "Returns a generation-pinned expiring URL for the full NDJSON sitemap projection.",
|
|
2913
|
+
tags: ["Sitemaps"],
|
|
2914
|
+
examples: {
|
|
2915
|
+
request: { params: { siteId: "s_01" } },
|
|
2916
|
+
response: {
|
|
2917
|
+
data: {
|
|
2918
|
+
generation: {
|
|
2919
|
+
id: "site-01JZ",
|
|
2920
|
+
observedAt: 1753746e6,
|
|
2921
|
+
publishedAt: 1753746000100,
|
|
2922
|
+
completeness: { _tag: "complete" },
|
|
2923
|
+
membershipHistoryAvailableFrom: 1753746e6,
|
|
2924
|
+
legacyImport: { _tag: "none" }
|
|
2925
|
+
},
|
|
2926
|
+
export: {
|
|
2927
|
+
_tag: "unavailable",
|
|
2928
|
+
reason: "export_unavailable"
|
|
2772
2929
|
}
|
|
2773
2930
|
},
|
|
2774
2931
|
meta: {
|