@gscdump/contracts 4.3.0 → 4.5.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/v1/browser.d.mts +1 -1
- package/dist/v1/http.d.mts +2 -1
- package/dist/v1/http.mjs +2 -1
- package/dist/v1/index.d.mts +2 -1
- package/dist/v1/index.mjs +2 -1
- package/dist/v1/indexnow.d.mts +241 -0
- package/dist/v1/indexnow.mjs +126 -0
- package/dist/v1/operations.d.mts +1444 -138
- package/dist/v1/operations.mjs +346 -0
- package/dist/v1/route-catalog.d.mts +25 -0
- package/dist/v1/route-catalog.mjs +25 -0
- package/package.json +1 -1
package/dist/v1/browser.d.mts
CHANGED
|
@@ -17,12 +17,12 @@ export declare const GSCDUMP_V1_ANALYTICS_DIMENSIONS: readonly ["page", "query",
|
|
|
17
17
|
export declare function createGscdumpV1BrowserSchemas(realtimeSchemas?: RealtimeV1Schemas): {
|
|
18
18
|
analyticsRowsRequest: z.ZodObject<{
|
|
19
19
|
dimensions: z.ZodArray<z.ZodEnum<{
|
|
20
|
+
date: "date";
|
|
20
21
|
page: "page";
|
|
21
22
|
query: "query";
|
|
22
23
|
queryCanonical: "queryCanonical";
|
|
23
24
|
country: "country";
|
|
24
25
|
device: "device";
|
|
25
|
-
date: "date";
|
|
26
26
|
searchAppearance: "searchAppearance";
|
|
27
27
|
hour: "hour";
|
|
28
28
|
}>>;
|
package/dist/v1/http.d.mts
CHANGED
|
@@ -3,5 +3,6 @@ import { GSCDUMP_HTTP_V1_VERSION } from "./version.mjs";
|
|
|
3
3
|
import { CompatibleResponseSchema, HTTP_V1_CREDENTIALS, HTTP_V1_CREDENTIAL_SCOPES, HTTP_V1_ERROR_CODES, HTTP_V1_METHODS, HTTP_V1_SCOPES, HTTP_V1_SURFACES, HttpV1Credential, HttpV1ErrorCode, HttpV1Method, HttpV1OperationDefinition, HttpV1OperationEntry, HttpV1OperationRequest, HttpV1OwnershipRule, HttpV1ProtocolLike, HttpV1ProtocolOperation, HttpV1Registry, HttpV1RegistryOperationEntry, HttpV1RegistryOperationId, HttpV1RegistryPathOptions, HttpV1RegistryPathParams, HttpV1RequestSchemas, HttpV1ResourceReference, HttpV1ResourceType, HttpV1Scope, HttpV1Semantics, HttpV1Surface, HttpV1SurfaceName, HttpV1Visibility, ResolvedHttpV1Operation, buildHttpOperationPath, createHttpV1Registry, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, listHttpOperations, resolveHttpOperation } from "./http-core.mjs";
|
|
4
4
|
import { BingCnameVerificationV1, BingConnectionV1, bingCnameVerificationV1Schema, bingConnectionV1Schema } from "./bing.mjs";
|
|
5
5
|
import { BingDataQueryV1, BingDataV1, bingDataQueryV1Schema, bingDataV1Schemas } from "./bing-data.mjs";
|
|
6
|
+
import { IndexNowConnectionV1, IndexNowSubmissionReceiptV1, indexNowConfigureV1Schema, indexNowConnectionV1Schema, indexNowConnectionV1Schemas, indexNowKeyV1Schema, indexNowSubmissionReceiptV1Schema, indexNowSubmissionReceiptV1Schemas, indexNowSubmitV1Schema } from "./indexnow.mjs";
|
|
6
7
|
import { AnalyticsReportDetailV1Request, AnalyticsReportDetailV1Response, AnalyticsReportV1Request, AnalyticsReportV1Response, AnalyticsRowsV1Request, AnalyticsRowsV1Response, GscdumpV1ErrorEnvelope, GscdumpV1Operation, GscdumpV1OperationId, GscdumpV1Protocol, GscdumpV1RequestMetadata, PartnerAnalysisBundleV1Response, PartnerAnalysisV1Response, PartnerAvailableSitesV1Response, PartnerBingConnectionV1Response, PartnerBingIndexingEvidenceV1Response, PartnerIndexingDiagnosticsV1Response, PartnerIndexingTransitionsV1Response, PartnerIndexingUrlsV1Response, PartnerIndexingV1Response, PartnerSiteDeletionV1Response, PartnerSiteRegistrationV1Response, PartnerSitemapChangesV1Response, PartnerSitemapsV1Response, PartnerUserLifecycleV1Response, createGscdumpV1Protocol } from "./operations.mjs";
|
|
7
|
-
export { AnalyticsReportDetailV1Request, AnalyticsReportDetailV1Response, AnalyticsReportV1Request, AnalyticsReportV1Response, AnalyticsRowsV1Request, AnalyticsRowsV1Response, type BingCnameVerificationV1, type BingConnectionV1, type BingDataQueryV1, type BingDataV1, CompatibleResponseSchema, GSCDUMP_HTTP_V1_VERSION, GscdumpV1ErrorEnvelope, GscdumpV1Operation, GscdumpV1OperationId, GscdumpV1Protocol, GscdumpV1RequestMetadata, HTTP_V1_CREDENTIALS, HTTP_V1_CREDENTIAL_SCOPES, HTTP_V1_ERROR_CODES, HTTP_V1_METHODS, HTTP_V1_SCOPES, HTTP_V1_SURFACES, HttpV1Credential, HttpV1ErrorCode, HttpV1Method, HttpV1OperationDefinition, HttpV1OperationEntry, HttpV1OperationRequest, HttpV1OwnershipRule, HttpV1ProtocolLike, HttpV1ProtocolOperation, HttpV1Registry, HttpV1RegistryOperationEntry, HttpV1RegistryOperationId, HttpV1RegistryPathOptions, HttpV1RegistryPathParams, HttpV1RequestSchemas, HttpV1ResourceReference, HttpV1ResourceType, HttpV1Scope, HttpV1Semantics, HttpV1Surface, HttpV1SurfaceName, HttpV1Visibility, PartnerAnalysisBundleV1Response, PartnerAnalysisV1Response, PartnerAvailableSitesV1Response, PartnerBingConnectionV1Response, PartnerBingIndexingEvidenceV1Response, PartnerIndexingDiagnosticsV1Response, PartnerIndexingTransitionsV1Response, PartnerIndexingUrlsV1Response, PartnerIndexingV1Response, PartnerSiteDeletionV1Response, PartnerSiteRegistrationV1Response, PartnerSitemapChangesV1Response, PartnerSitemapsV1Response, PartnerUserLifecycleV1Response, ResolvedHttpV1Operation, type UnknownHttpV1OperationError, bingCnameVerificationV1Schema, bingConnectionV1Schema, bingDataQueryV1Schema, bingDataV1Schemas, buildHttpOperationPath, createGscdumpV1Protocol, createHttpV1Registry, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, isUnknownHttpV1OperationError, listHttpOperations, resolveHttpOperation };
|
|
8
|
+
export { AnalyticsReportDetailV1Request, AnalyticsReportDetailV1Response, AnalyticsReportV1Request, AnalyticsReportV1Response, AnalyticsRowsV1Request, AnalyticsRowsV1Response, type BingCnameVerificationV1, type BingConnectionV1, type BingDataQueryV1, type BingDataV1, CompatibleResponseSchema, GSCDUMP_HTTP_V1_VERSION, GscdumpV1ErrorEnvelope, GscdumpV1Operation, GscdumpV1OperationId, GscdumpV1Protocol, GscdumpV1RequestMetadata, HTTP_V1_CREDENTIALS, HTTP_V1_CREDENTIAL_SCOPES, HTTP_V1_ERROR_CODES, HTTP_V1_METHODS, HTTP_V1_SCOPES, HTTP_V1_SURFACES, HttpV1Credential, HttpV1ErrorCode, HttpV1Method, HttpV1OperationDefinition, HttpV1OperationEntry, HttpV1OperationRequest, HttpV1OwnershipRule, HttpV1ProtocolLike, HttpV1ProtocolOperation, HttpV1Registry, HttpV1RegistryOperationEntry, HttpV1RegistryOperationId, HttpV1RegistryPathOptions, HttpV1RegistryPathParams, HttpV1RequestSchemas, HttpV1ResourceReference, HttpV1ResourceType, HttpV1Scope, HttpV1Semantics, HttpV1Surface, HttpV1SurfaceName, HttpV1Visibility, IndexNowConnectionV1, IndexNowSubmissionReceiptV1, PartnerAnalysisBundleV1Response, PartnerAnalysisV1Response, PartnerAvailableSitesV1Response, PartnerBingConnectionV1Response, PartnerBingIndexingEvidenceV1Response, PartnerIndexingDiagnosticsV1Response, PartnerIndexingTransitionsV1Response, PartnerIndexingUrlsV1Response, PartnerIndexingV1Response, PartnerSiteDeletionV1Response, PartnerSiteRegistrationV1Response, PartnerSitemapChangesV1Response, PartnerSitemapsV1Response, PartnerUserLifecycleV1Response, ResolvedHttpV1Operation, type UnknownHttpV1OperationError, bingCnameVerificationV1Schema, bingConnectionV1Schema, bingDataQueryV1Schema, bingDataV1Schemas, buildHttpOperationPath, createGscdumpV1Protocol, createHttpV1Registry, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, indexNowConfigureV1Schema, indexNowConnectionV1Schema, indexNowConnectionV1Schemas, indexNowKeyV1Schema, indexNowSubmissionReceiptV1Schema, indexNowSubmissionReceiptV1Schemas, indexNowSubmitV1Schema, isUnknownHttpV1OperationError, listHttpOperations, resolveHttpOperation };
|
package/dist/v1/http.mjs
CHANGED
|
@@ -3,5 +3,6 @@ import { isUnknownHttpV1OperationError } from "./http-operation-error.mjs";
|
|
|
3
3
|
import { GSCDUMP_HTTP_V1_VERSION } from "./version.mjs";
|
|
4
4
|
import { HTTP_V1_CREDENTIALS, HTTP_V1_CREDENTIAL_SCOPES, HTTP_V1_ERROR_CODES, HTTP_V1_METHODS, HTTP_V1_SCOPES, HTTP_V1_SURFACES, buildHttpOperationPath, createHttpV1Registry, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, listHttpOperations, resolveHttpOperation } from "./http-core.mjs";
|
|
5
5
|
import { bingDataQueryV1Schema, bingDataV1Schemas } from "./bing-data.mjs";
|
|
6
|
+
import { indexNowConfigureV1Schema, indexNowConnectionV1Schema, indexNowConnectionV1Schemas, indexNowKeyV1Schema, indexNowSubmissionReceiptV1Schema, indexNowSubmissionReceiptV1Schemas, indexNowSubmitV1Schema } from "./indexnow.mjs";
|
|
6
7
|
import { createGscdumpV1Protocol } from "./operations.mjs";
|
|
7
|
-
export { GSCDUMP_HTTP_V1_VERSION, HTTP_V1_CREDENTIALS, HTTP_V1_CREDENTIAL_SCOPES, HTTP_V1_ERROR_CODES, HTTP_V1_METHODS, HTTP_V1_SCOPES, HTTP_V1_SURFACES, bingCnameVerificationV1Schema, bingConnectionV1Schema, bingDataQueryV1Schema, bingDataV1Schemas, buildHttpOperationPath, createGscdumpV1Protocol, createHttpV1Registry, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, isUnknownHttpV1OperationError, listHttpOperations, resolveHttpOperation };
|
|
8
|
+
export { GSCDUMP_HTTP_V1_VERSION, HTTP_V1_CREDENTIALS, HTTP_V1_CREDENTIAL_SCOPES, HTTP_V1_ERROR_CODES, HTTP_V1_METHODS, HTTP_V1_SCOPES, HTTP_V1_SURFACES, bingCnameVerificationV1Schema, bingConnectionV1Schema, bingDataQueryV1Schema, bingDataV1Schemas, buildHttpOperationPath, createGscdumpV1Protocol, createHttpV1Registry, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, indexNowConfigureV1Schema, indexNowConnectionV1Schema, indexNowConnectionV1Schemas, indexNowKeyV1Schema, indexNowSubmissionReceiptV1Schema, indexNowSubmissionReceiptV1Schemas, indexNowSubmitV1Schema, isUnknownHttpV1OperationError, listHttpOperations, resolveHttpOperation };
|
package/dist/v1/index.d.mts
CHANGED
|
@@ -4,7 +4,8 @@ import { CompatibleResponseSchema, HTTP_V1_CREDENTIALS, HTTP_V1_CREDENTIAL_SCOPE
|
|
|
4
4
|
import { GSCDUMP_REALTIME_ACK_POLICY, GSCDUMP_REALTIME_CLOSE_CODES, GSCDUMP_REALTIME_CONNECTION_POLICY, GSCDUMP_REALTIME_LIMITS, GSCDUMP_REALTIME_MAX_CONNECTION_SECONDS, GSCDUMP_REALTIME_PING, GSCDUMP_REALTIME_PONG, GSCDUMP_REALTIME_PROTOCOL_VERSION, GSCDUMP_REALTIME_REPLAY_POLICY, GSCDUMP_REALTIME_SUBPROTOCOL, GSCDUMP_REALTIME_TICKET_AUDIENCE, GSCDUMP_REALTIME_TICKET_ISSUER, GSCDUMP_REALTIME_TICKET_POLICY, GSCDUMP_REALTIME_TICKET_PREFIX, GSCDUMP_REALTIME_TICKET_TTL_SECONDS, REALTIME_V1_EVENT_NAMES, REALTIME_V1_EVENT_SEMANTICS, REALTIME_V1_RESOURCE_TYPES, RealtimeTicketV1Response, RealtimeV1ClientFrame, RealtimeV1Cursor, RealtimeV1Event, RealtimeV1ResourceChange, RealtimeV1Schemas, RealtimeV1ServerFrame, RealtimeV1StreamHead, RealtimeV1StreamId, RealtimeV1TicketClaims, RealtimeV1TicketRequest, createRealtimeV1Schemas } from "./realtime.mjs";
|
|
5
5
|
import { BingCnameVerificationV1, BingConnectionV1, bingCnameVerificationV1Schema, bingConnectionV1Schema } from "./bing.mjs";
|
|
6
6
|
import { BingDataQueryV1, BingDataV1, bingDataQueryV1Schema, bingDataV1Schemas } from "./bing-data.mjs";
|
|
7
|
+
import { IndexNowConnectionV1, IndexNowSubmissionReceiptV1, indexNowConfigureV1Schema, indexNowConnectionV1Schema, indexNowConnectionV1Schemas, indexNowKeyV1Schema, indexNowSubmissionReceiptV1Schema, indexNowSubmissionReceiptV1Schemas, indexNowSubmitV1Schema } from "./indexnow.mjs";
|
|
7
8
|
import { AnalyticsReportDetailV1Request, AnalyticsReportDetailV1Response, AnalyticsReportV1Request, AnalyticsReportV1Response, AnalyticsRowsV1Request, AnalyticsRowsV1Response, GscdumpV1ErrorEnvelope, GscdumpV1Operation, GscdumpV1OperationId, GscdumpV1Protocol, GscdumpV1RequestMetadata, PartnerAnalysisBundleV1Response, PartnerAnalysisV1Response, PartnerAvailableSitesV1Response, PartnerBingConnectionV1Response, PartnerBingIndexingEvidenceV1Response, PartnerIndexingDiagnosticsV1Response, PartnerIndexingTransitionsV1Response, PartnerIndexingUrlsV1Response, PartnerIndexingV1Response, PartnerSiteDeletionV1Response, PartnerSiteRegistrationV1Response, PartnerSitemapChangesV1Response, PartnerSitemapsV1Response, PartnerUserLifecycleV1Response, createGscdumpV1Protocol } from "./operations.mjs";
|
|
8
9
|
import "./http.mjs";
|
|
9
10
|
import { ContractDocument, createGscdumpV1Documents, serializeContractDocument } from "./documents.mjs";
|
|
10
|
-
export { AnalyticsReportDetailV1Request, AnalyticsReportDetailV1Response, AnalyticsReportV1Request, AnalyticsReportV1Response, AnalyticsRowsV1Request, AnalyticsRowsV1Response, type BingCnameVerificationV1, type BingConnectionV1, type BingDataQueryV1, type BingDataV1, CompatibleResponseSchema, ContractDocument, GSCDUMP_HTTP_V1_VERSION, GSCDUMP_REALTIME_ACK_POLICY, GSCDUMP_REALTIME_CLOSE_CODES, GSCDUMP_REALTIME_CONNECTION_POLICY, GSCDUMP_REALTIME_LIMITS, GSCDUMP_REALTIME_MAX_CONNECTION_SECONDS, GSCDUMP_REALTIME_PING, GSCDUMP_REALTIME_PONG, GSCDUMP_REALTIME_PROTOCOL_VERSION, GSCDUMP_REALTIME_REPLAY_POLICY, GSCDUMP_REALTIME_SUBPROTOCOL, GSCDUMP_REALTIME_TICKET_AUDIENCE, GSCDUMP_REALTIME_TICKET_ISSUER, GSCDUMP_REALTIME_TICKET_POLICY, GSCDUMP_REALTIME_TICKET_PREFIX, GSCDUMP_REALTIME_TICKET_TTL_SECONDS, GscdumpV1ErrorEnvelope, GscdumpV1Operation, GscdumpV1OperationId, GscdumpV1Protocol, GscdumpV1RequestMetadata, HTTP_V1_CREDENTIALS, HTTP_V1_CREDENTIAL_SCOPES, HTTP_V1_ERROR_CODES, HTTP_V1_METHODS, HTTP_V1_SCOPES, HTTP_V1_SURFACES, HttpV1Credential, HttpV1ErrorCode, HttpV1Method, HttpV1OperationDefinition, HttpV1OperationEntry, HttpV1OperationRequest, HttpV1OwnershipRule, HttpV1ProtocolLike, HttpV1ProtocolOperation, HttpV1Registry, HttpV1RegistryOperationEntry, HttpV1RegistryOperationId, HttpV1RegistryPathOptions, HttpV1RegistryPathParams, HttpV1RequestSchemas, HttpV1ResourceReference, HttpV1ResourceType, HttpV1Scope, HttpV1Semantics, HttpV1Surface, HttpV1SurfaceName, HttpV1Visibility, PartnerAnalysisBundleV1Response, PartnerAnalysisV1Response, PartnerAvailableSitesV1Response, PartnerBingConnectionV1Response, PartnerBingIndexingEvidenceV1Response, PartnerIndexingDiagnosticsV1Response, PartnerIndexingTransitionsV1Response, PartnerIndexingUrlsV1Response, PartnerIndexingV1Response, PartnerSiteDeletionV1Response, PartnerSiteRegistrationV1Response, PartnerSitemapChangesV1Response, PartnerSitemapsV1Response, PartnerUserLifecycleV1Response, REALTIME_V1_EVENT_NAMES, REALTIME_V1_EVENT_SEMANTICS, REALTIME_V1_RESOURCE_TYPES, RealtimeTicketV1Response, RealtimeV1ClientFrame, RealtimeV1Cursor, RealtimeV1Event, RealtimeV1ResourceChange, RealtimeV1Schemas, RealtimeV1ServerFrame, RealtimeV1StreamHead, RealtimeV1StreamId, RealtimeV1TicketClaims, RealtimeV1TicketRequest, ResolvedHttpV1Operation, type UnknownHttpV1OperationError, bingCnameVerificationV1Schema, bingConnectionV1Schema, bingDataQueryV1Schema, bingDataV1Schemas, buildHttpOperationPath, createGscdumpV1Documents, createGscdumpV1Protocol, createHttpV1Registry, createRealtimeV1Schemas, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, isUnknownHttpV1OperationError, listHttpOperations, resolveHttpOperation, serializeContractDocument };
|
|
11
|
+
export { AnalyticsReportDetailV1Request, AnalyticsReportDetailV1Response, AnalyticsReportV1Request, AnalyticsReportV1Response, AnalyticsRowsV1Request, AnalyticsRowsV1Response, type BingCnameVerificationV1, type BingConnectionV1, type BingDataQueryV1, type BingDataV1, CompatibleResponseSchema, ContractDocument, GSCDUMP_HTTP_V1_VERSION, GSCDUMP_REALTIME_ACK_POLICY, GSCDUMP_REALTIME_CLOSE_CODES, GSCDUMP_REALTIME_CONNECTION_POLICY, GSCDUMP_REALTIME_LIMITS, GSCDUMP_REALTIME_MAX_CONNECTION_SECONDS, GSCDUMP_REALTIME_PING, GSCDUMP_REALTIME_PONG, GSCDUMP_REALTIME_PROTOCOL_VERSION, GSCDUMP_REALTIME_REPLAY_POLICY, GSCDUMP_REALTIME_SUBPROTOCOL, GSCDUMP_REALTIME_TICKET_AUDIENCE, GSCDUMP_REALTIME_TICKET_ISSUER, GSCDUMP_REALTIME_TICKET_POLICY, GSCDUMP_REALTIME_TICKET_PREFIX, GSCDUMP_REALTIME_TICKET_TTL_SECONDS, GscdumpV1ErrorEnvelope, GscdumpV1Operation, GscdumpV1OperationId, GscdumpV1Protocol, GscdumpV1RequestMetadata, HTTP_V1_CREDENTIALS, HTTP_V1_CREDENTIAL_SCOPES, HTTP_V1_ERROR_CODES, HTTP_V1_METHODS, HTTP_V1_SCOPES, HTTP_V1_SURFACES, HttpV1Credential, HttpV1ErrorCode, HttpV1Method, HttpV1OperationDefinition, HttpV1OperationEntry, HttpV1OperationRequest, HttpV1OwnershipRule, HttpV1ProtocolLike, HttpV1ProtocolOperation, HttpV1Registry, HttpV1RegistryOperationEntry, HttpV1RegistryOperationId, HttpV1RegistryPathOptions, HttpV1RegistryPathParams, HttpV1RequestSchemas, HttpV1ResourceReference, HttpV1ResourceType, HttpV1Scope, HttpV1Semantics, HttpV1Surface, HttpV1SurfaceName, HttpV1Visibility, IndexNowConnectionV1, IndexNowSubmissionReceiptV1, PartnerAnalysisBundleV1Response, PartnerAnalysisV1Response, PartnerAvailableSitesV1Response, PartnerBingConnectionV1Response, PartnerBingIndexingEvidenceV1Response, PartnerIndexingDiagnosticsV1Response, PartnerIndexingTransitionsV1Response, PartnerIndexingUrlsV1Response, PartnerIndexingV1Response, PartnerSiteDeletionV1Response, PartnerSiteRegistrationV1Response, PartnerSitemapChangesV1Response, PartnerSitemapsV1Response, PartnerUserLifecycleV1Response, REALTIME_V1_EVENT_NAMES, REALTIME_V1_EVENT_SEMANTICS, REALTIME_V1_RESOURCE_TYPES, RealtimeTicketV1Response, RealtimeV1ClientFrame, RealtimeV1Cursor, RealtimeV1Event, RealtimeV1ResourceChange, RealtimeV1Schemas, RealtimeV1ServerFrame, RealtimeV1StreamHead, RealtimeV1StreamId, RealtimeV1TicketClaims, RealtimeV1TicketRequest, ResolvedHttpV1Operation, type UnknownHttpV1OperationError, bingCnameVerificationV1Schema, bingConnectionV1Schema, bingDataQueryV1Schema, bingDataV1Schemas, buildHttpOperationPath, createGscdumpV1Documents, createGscdumpV1Protocol, createHttpV1Registry, createRealtimeV1Schemas, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, indexNowConfigureV1Schema, indexNowConnectionV1Schema, indexNowConnectionV1Schemas, indexNowKeyV1Schema, indexNowSubmissionReceiptV1Schema, indexNowSubmissionReceiptV1Schemas, indexNowSubmitV1Schema, isUnknownHttpV1OperationError, listHttpOperations, resolveHttpOperation, serializeContractDocument };
|
package/dist/v1/index.mjs
CHANGED
|
@@ -4,7 +4,8 @@ import { GSCDUMP_HTTP_V1_VERSION } from "./version.mjs";
|
|
|
4
4
|
import { HTTP_V1_CREDENTIALS, HTTP_V1_CREDENTIAL_SCOPES, HTTP_V1_ERROR_CODES, HTTP_V1_METHODS, HTTP_V1_SCOPES, HTTP_V1_SURFACES, buildHttpOperationPath, createHttpV1Registry, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, listHttpOperations, resolveHttpOperation } from "./http-core.mjs";
|
|
5
5
|
import { bingDataQueryV1Schema, bingDataV1Schemas } from "./bing-data.mjs";
|
|
6
6
|
import { GSCDUMP_REALTIME_ACK_POLICY, GSCDUMP_REALTIME_CLOSE_CODES, GSCDUMP_REALTIME_CONNECTION_POLICY, GSCDUMP_REALTIME_LIMITS, GSCDUMP_REALTIME_MAX_CONNECTION_SECONDS, GSCDUMP_REALTIME_PING, GSCDUMP_REALTIME_PONG, GSCDUMP_REALTIME_PROTOCOL_VERSION, GSCDUMP_REALTIME_REPLAY_POLICY, GSCDUMP_REALTIME_SUBPROTOCOL, GSCDUMP_REALTIME_TICKET_AUDIENCE, GSCDUMP_REALTIME_TICKET_ISSUER, GSCDUMP_REALTIME_TICKET_POLICY, GSCDUMP_REALTIME_TICKET_PREFIX, GSCDUMP_REALTIME_TICKET_TTL_SECONDS, REALTIME_V1_EVENT_NAMES, REALTIME_V1_EVENT_SEMANTICS, REALTIME_V1_RESOURCE_TYPES, createRealtimeV1Schemas } from "./realtime.mjs";
|
|
7
|
+
import { indexNowConfigureV1Schema, indexNowConnectionV1Schema, indexNowConnectionV1Schemas, indexNowKeyV1Schema, indexNowSubmissionReceiptV1Schema, indexNowSubmissionReceiptV1Schemas, indexNowSubmitV1Schema } from "./indexnow.mjs";
|
|
7
8
|
import { createGscdumpV1Protocol } from "./operations.mjs";
|
|
8
9
|
import { createGscdumpV1Documents, serializeContractDocument } from "./documents.mjs";
|
|
9
10
|
import "./http.mjs";
|
|
10
|
-
export { GSCDUMP_HTTP_V1_VERSION, GSCDUMP_REALTIME_ACK_POLICY, GSCDUMP_REALTIME_CLOSE_CODES, GSCDUMP_REALTIME_CONNECTION_POLICY, GSCDUMP_REALTIME_LIMITS, GSCDUMP_REALTIME_MAX_CONNECTION_SECONDS, GSCDUMP_REALTIME_PING, GSCDUMP_REALTIME_PONG, GSCDUMP_REALTIME_PROTOCOL_VERSION, GSCDUMP_REALTIME_REPLAY_POLICY, GSCDUMP_REALTIME_SUBPROTOCOL, GSCDUMP_REALTIME_TICKET_AUDIENCE, GSCDUMP_REALTIME_TICKET_ISSUER, GSCDUMP_REALTIME_TICKET_POLICY, GSCDUMP_REALTIME_TICKET_PREFIX, GSCDUMP_REALTIME_TICKET_TTL_SECONDS, HTTP_V1_CREDENTIALS, HTTP_V1_CREDENTIAL_SCOPES, HTTP_V1_ERROR_CODES, HTTP_V1_METHODS, HTTP_V1_SCOPES, HTTP_V1_SURFACES, REALTIME_V1_EVENT_NAMES, REALTIME_V1_EVENT_SEMANTICS, REALTIME_V1_RESOURCE_TYPES, bingCnameVerificationV1Schema, bingConnectionV1Schema, bingDataQueryV1Schema, bingDataV1Schemas, buildHttpOperationPath, createGscdumpV1Documents, createGscdumpV1Protocol, createHttpV1Registry, createRealtimeV1Schemas, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, isUnknownHttpV1OperationError, listHttpOperations, resolveHttpOperation, serializeContractDocument };
|
|
11
|
+
export { GSCDUMP_HTTP_V1_VERSION, GSCDUMP_REALTIME_ACK_POLICY, GSCDUMP_REALTIME_CLOSE_CODES, GSCDUMP_REALTIME_CONNECTION_POLICY, GSCDUMP_REALTIME_LIMITS, GSCDUMP_REALTIME_MAX_CONNECTION_SECONDS, GSCDUMP_REALTIME_PING, GSCDUMP_REALTIME_PONG, GSCDUMP_REALTIME_PROTOCOL_VERSION, GSCDUMP_REALTIME_REPLAY_POLICY, GSCDUMP_REALTIME_SUBPROTOCOL, GSCDUMP_REALTIME_TICKET_AUDIENCE, GSCDUMP_REALTIME_TICKET_ISSUER, GSCDUMP_REALTIME_TICKET_POLICY, GSCDUMP_REALTIME_TICKET_PREFIX, GSCDUMP_REALTIME_TICKET_TTL_SECONDS, HTTP_V1_CREDENTIALS, HTTP_V1_CREDENTIAL_SCOPES, HTTP_V1_ERROR_CODES, HTTP_V1_METHODS, HTTP_V1_SCOPES, HTTP_V1_SURFACES, REALTIME_V1_EVENT_NAMES, REALTIME_V1_EVENT_SEMANTICS, REALTIME_V1_RESOURCE_TYPES, bingCnameVerificationV1Schema, bingConnectionV1Schema, bingDataQueryV1Schema, bingDataV1Schemas, buildHttpOperationPath, createGscdumpV1Documents, createGscdumpV1Protocol, createHttpV1Registry, createRealtimeV1Schemas, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, indexNowConfigureV1Schema, indexNowConnectionV1Schema, indexNowConnectionV1Schemas, indexNowKeyV1Schema, indexNowSubmissionReceiptV1Schema, indexNowSubmissionReceiptV1Schemas, indexNowSubmitV1Schema, isUnknownHttpV1OperationError, listHttpOperations, resolveHttpOperation, serializeContractDocument };
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const indexNowKeyV1Schema: z.ZodString;
|
|
3
|
+
export declare const indexNowConfigureV1Schema: z.ZodObject<{
|
|
4
|
+
key: z.ZodString;
|
|
5
|
+
keyLocation: z.ZodOptional<z.ZodURL>;
|
|
6
|
+
}, z.core.$strict>;
|
|
7
|
+
export declare const indexNowSubmitV1Schema: z.ZodObject<{
|
|
8
|
+
urls: z.ZodArray<z.ZodURL>;
|
|
9
|
+
idempotencyKey: z.ZodString;
|
|
10
|
+
}, z.core.$strict>;
|
|
11
|
+
export declare const indexNowConnectionV1Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
12
|
+
_tag: z.ZodLiteral<"disconnected">;
|
|
13
|
+
host: z.ZodString;
|
|
14
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
15
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
16
|
+
host: z.ZodString;
|
|
17
|
+
keyLocation: z.ZodURL;
|
|
18
|
+
_tag: z.ZodLiteral<"verification-required">;
|
|
19
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
20
|
+
verifiedAt: z.ZodISODateTime;
|
|
21
|
+
host: z.ZodString;
|
|
22
|
+
keyLocation: z.ZodURL;
|
|
23
|
+
_tag: z.ZodLiteral<"connected">;
|
|
24
|
+
}, z.core.$strict>], "_tag">;
|
|
25
|
+
export declare const indexNowConnectionV1Schemas: {
|
|
26
|
+
producer: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
27
|
+
_tag: z.ZodLiteral<"disconnected">;
|
|
28
|
+
host: z.ZodString;
|
|
29
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
30
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
31
|
+
host: z.ZodString;
|
|
32
|
+
keyLocation: z.ZodURL;
|
|
33
|
+
_tag: z.ZodLiteral<"verification-required">;
|
|
34
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
35
|
+
verifiedAt: z.ZodISODateTime;
|
|
36
|
+
host: z.ZodString;
|
|
37
|
+
keyLocation: z.ZodURL;
|
|
38
|
+
_tag: z.ZodLiteral<"connected">;
|
|
39
|
+
}, z.core.$strict>], "_tag">;
|
|
40
|
+
client: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
41
|
+
_tag: z.ZodLiteral<"disconnected">;
|
|
42
|
+
host: z.ZodString;
|
|
43
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
44
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
45
|
+
host: z.ZodString;
|
|
46
|
+
keyLocation: z.ZodURL;
|
|
47
|
+
_tag: z.ZodLiteral<"verification-required">;
|
|
48
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
49
|
+
verifiedAt: z.ZodISODateTime;
|
|
50
|
+
host: z.ZodString;
|
|
51
|
+
keyLocation: z.ZodURL;
|
|
52
|
+
_tag: z.ZodLiteral<"connected">;
|
|
53
|
+
}, z.core.$loose>], "_tag">;
|
|
54
|
+
};
|
|
55
|
+
export declare const indexNowSubmissionReceiptV1Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
56
|
+
httpStatus: z.ZodNull;
|
|
57
|
+
reason: z.ZodNull;
|
|
58
|
+
retryAt: z.ZodNull;
|
|
59
|
+
id: z.ZodString;
|
|
60
|
+
urls: z.ZodArray<z.ZodURL>;
|
|
61
|
+
createdAt: z.ZodISODateTime;
|
|
62
|
+
updatedAt: z.ZodISODateTime;
|
|
63
|
+
attempts: z.ZodNumber;
|
|
64
|
+
_tag: z.ZodLiteral<"queued">;
|
|
65
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
66
|
+
httpStatus: z.ZodLiteral<200>;
|
|
67
|
+
reason: z.ZodNull;
|
|
68
|
+
retryAt: z.ZodNull;
|
|
69
|
+
id: z.ZodString;
|
|
70
|
+
urls: z.ZodArray<z.ZodURL>;
|
|
71
|
+
createdAt: z.ZodISODateTime;
|
|
72
|
+
updatedAt: z.ZodISODateTime;
|
|
73
|
+
attempts: z.ZodNumber;
|
|
74
|
+
_tag: z.ZodLiteral<"accepted">;
|
|
75
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
76
|
+
httpStatus: z.ZodLiteral<202>;
|
|
77
|
+
reason: z.ZodLiteral<"key-validation-pending">;
|
|
78
|
+
retryAt: z.ZodNull;
|
|
79
|
+
id: z.ZodString;
|
|
80
|
+
urls: z.ZodArray<z.ZodURL>;
|
|
81
|
+
createdAt: z.ZodISODateTime;
|
|
82
|
+
updatedAt: z.ZodISODateTime;
|
|
83
|
+
attempts: z.ZodNumber;
|
|
84
|
+
_tag: z.ZodLiteral<"pending">;
|
|
85
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
86
|
+
httpStatus: z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<403>, z.ZodLiteral<422>]>;
|
|
87
|
+
reason: z.ZodString;
|
|
88
|
+
retryAt: z.ZodNull;
|
|
89
|
+
id: z.ZodString;
|
|
90
|
+
urls: z.ZodArray<z.ZodURL>;
|
|
91
|
+
createdAt: z.ZodISODateTime;
|
|
92
|
+
updatedAt: z.ZodISODateTime;
|
|
93
|
+
attempts: z.ZodNumber;
|
|
94
|
+
_tag: z.ZodLiteral<"rejected">;
|
|
95
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
96
|
+
httpStatus: z.ZodNullable<z.ZodNumber>;
|
|
97
|
+
reason: z.ZodString;
|
|
98
|
+
retryAt: z.ZodISODateTime;
|
|
99
|
+
id: z.ZodString;
|
|
100
|
+
urls: z.ZodArray<z.ZodURL>;
|
|
101
|
+
createdAt: z.ZodISODateTime;
|
|
102
|
+
updatedAt: z.ZodISODateTime;
|
|
103
|
+
attempts: z.ZodNumber;
|
|
104
|
+
_tag: z.ZodLiteral<"retrying">;
|
|
105
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
106
|
+
httpStatus: z.ZodNullable<z.ZodNumber>;
|
|
107
|
+
reason: z.ZodString;
|
|
108
|
+
retryAt: z.ZodNull;
|
|
109
|
+
id: z.ZodString;
|
|
110
|
+
urls: z.ZodArray<z.ZodURL>;
|
|
111
|
+
createdAt: z.ZodISODateTime;
|
|
112
|
+
updatedAt: z.ZodISODateTime;
|
|
113
|
+
attempts: z.ZodNumber;
|
|
114
|
+
_tag: z.ZodLiteral<"failed">;
|
|
115
|
+
}, z.core.$strict>], "_tag">;
|
|
116
|
+
export declare const indexNowSubmissionReceiptV1Schemas: {
|
|
117
|
+
producer: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
118
|
+
httpStatus: z.ZodNull;
|
|
119
|
+
reason: z.ZodNull;
|
|
120
|
+
retryAt: z.ZodNull;
|
|
121
|
+
id: z.ZodString;
|
|
122
|
+
urls: z.ZodArray<z.ZodURL>;
|
|
123
|
+
createdAt: z.ZodISODateTime;
|
|
124
|
+
updatedAt: z.ZodISODateTime;
|
|
125
|
+
attempts: z.ZodNumber;
|
|
126
|
+
_tag: z.ZodLiteral<"queued">;
|
|
127
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
128
|
+
httpStatus: z.ZodLiteral<200>;
|
|
129
|
+
reason: z.ZodNull;
|
|
130
|
+
retryAt: z.ZodNull;
|
|
131
|
+
id: z.ZodString;
|
|
132
|
+
urls: z.ZodArray<z.ZodURL>;
|
|
133
|
+
createdAt: z.ZodISODateTime;
|
|
134
|
+
updatedAt: z.ZodISODateTime;
|
|
135
|
+
attempts: z.ZodNumber;
|
|
136
|
+
_tag: z.ZodLiteral<"accepted">;
|
|
137
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
138
|
+
httpStatus: z.ZodLiteral<202>;
|
|
139
|
+
reason: z.ZodLiteral<"key-validation-pending">;
|
|
140
|
+
retryAt: z.ZodNull;
|
|
141
|
+
id: z.ZodString;
|
|
142
|
+
urls: z.ZodArray<z.ZodURL>;
|
|
143
|
+
createdAt: z.ZodISODateTime;
|
|
144
|
+
updatedAt: z.ZodISODateTime;
|
|
145
|
+
attempts: z.ZodNumber;
|
|
146
|
+
_tag: z.ZodLiteral<"pending">;
|
|
147
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
148
|
+
httpStatus: z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<403>, z.ZodLiteral<422>]>;
|
|
149
|
+
reason: z.ZodString;
|
|
150
|
+
retryAt: z.ZodNull;
|
|
151
|
+
id: z.ZodString;
|
|
152
|
+
urls: z.ZodArray<z.ZodURL>;
|
|
153
|
+
createdAt: z.ZodISODateTime;
|
|
154
|
+
updatedAt: z.ZodISODateTime;
|
|
155
|
+
attempts: z.ZodNumber;
|
|
156
|
+
_tag: z.ZodLiteral<"rejected">;
|
|
157
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
158
|
+
httpStatus: z.ZodNullable<z.ZodNumber>;
|
|
159
|
+
reason: z.ZodString;
|
|
160
|
+
retryAt: z.ZodISODateTime;
|
|
161
|
+
id: z.ZodString;
|
|
162
|
+
urls: z.ZodArray<z.ZodURL>;
|
|
163
|
+
createdAt: z.ZodISODateTime;
|
|
164
|
+
updatedAt: z.ZodISODateTime;
|
|
165
|
+
attempts: z.ZodNumber;
|
|
166
|
+
_tag: z.ZodLiteral<"retrying">;
|
|
167
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
168
|
+
httpStatus: z.ZodNullable<z.ZodNumber>;
|
|
169
|
+
reason: z.ZodString;
|
|
170
|
+
retryAt: z.ZodNull;
|
|
171
|
+
id: z.ZodString;
|
|
172
|
+
urls: z.ZodArray<z.ZodURL>;
|
|
173
|
+
createdAt: z.ZodISODateTime;
|
|
174
|
+
updatedAt: z.ZodISODateTime;
|
|
175
|
+
attempts: z.ZodNumber;
|
|
176
|
+
_tag: z.ZodLiteral<"failed">;
|
|
177
|
+
}, z.core.$strict>], "_tag">;
|
|
178
|
+
client: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
179
|
+
httpStatus: z.ZodNull;
|
|
180
|
+
reason: z.ZodNull;
|
|
181
|
+
retryAt: z.ZodNull;
|
|
182
|
+
id: z.ZodString;
|
|
183
|
+
urls: z.ZodArray<z.ZodURL>;
|
|
184
|
+
createdAt: z.ZodISODateTime;
|
|
185
|
+
updatedAt: z.ZodISODateTime;
|
|
186
|
+
attempts: z.ZodNumber;
|
|
187
|
+
_tag: z.ZodLiteral<"queued">;
|
|
188
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
189
|
+
httpStatus: z.ZodLiteral<200>;
|
|
190
|
+
reason: z.ZodNull;
|
|
191
|
+
retryAt: z.ZodNull;
|
|
192
|
+
id: z.ZodString;
|
|
193
|
+
urls: z.ZodArray<z.ZodURL>;
|
|
194
|
+
createdAt: z.ZodISODateTime;
|
|
195
|
+
updatedAt: z.ZodISODateTime;
|
|
196
|
+
attempts: z.ZodNumber;
|
|
197
|
+
_tag: z.ZodLiteral<"accepted">;
|
|
198
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
199
|
+
httpStatus: z.ZodLiteral<202>;
|
|
200
|
+
reason: z.ZodLiteral<"key-validation-pending">;
|
|
201
|
+
retryAt: z.ZodNull;
|
|
202
|
+
id: z.ZodString;
|
|
203
|
+
urls: z.ZodArray<z.ZodURL>;
|
|
204
|
+
createdAt: z.ZodISODateTime;
|
|
205
|
+
updatedAt: z.ZodISODateTime;
|
|
206
|
+
attempts: z.ZodNumber;
|
|
207
|
+
_tag: z.ZodLiteral<"pending">;
|
|
208
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
209
|
+
httpStatus: z.ZodUnion<readonly [z.ZodLiteral<400>, z.ZodLiteral<403>, z.ZodLiteral<422>]>;
|
|
210
|
+
reason: z.ZodString;
|
|
211
|
+
retryAt: z.ZodNull;
|
|
212
|
+
id: z.ZodString;
|
|
213
|
+
urls: z.ZodArray<z.ZodURL>;
|
|
214
|
+
createdAt: z.ZodISODateTime;
|
|
215
|
+
updatedAt: z.ZodISODateTime;
|
|
216
|
+
attempts: z.ZodNumber;
|
|
217
|
+
_tag: z.ZodLiteral<"rejected">;
|
|
218
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
219
|
+
httpStatus: z.ZodNullable<z.ZodNumber>;
|
|
220
|
+
reason: z.ZodString;
|
|
221
|
+
retryAt: z.ZodISODateTime;
|
|
222
|
+
id: z.ZodString;
|
|
223
|
+
urls: z.ZodArray<z.ZodURL>;
|
|
224
|
+
createdAt: z.ZodISODateTime;
|
|
225
|
+
updatedAt: z.ZodISODateTime;
|
|
226
|
+
attempts: z.ZodNumber;
|
|
227
|
+
_tag: z.ZodLiteral<"retrying">;
|
|
228
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
229
|
+
httpStatus: z.ZodNullable<z.ZodNumber>;
|
|
230
|
+
reason: z.ZodString;
|
|
231
|
+
retryAt: z.ZodNull;
|
|
232
|
+
id: z.ZodString;
|
|
233
|
+
urls: z.ZodArray<z.ZodURL>;
|
|
234
|
+
createdAt: z.ZodISODateTime;
|
|
235
|
+
updatedAt: z.ZodISODateTime;
|
|
236
|
+
attempts: z.ZodNumber;
|
|
237
|
+
_tag: z.ZodLiteral<"failed">;
|
|
238
|
+
}, z.core.$loose>], "_tag">;
|
|
239
|
+
};
|
|
240
|
+
export type IndexNowConnectionV1 = z.infer<typeof indexNowConnectionV1Schema>;
|
|
241
|
+
export type IndexNowSubmissionReceiptV1 = z.infer<typeof indexNowSubmissionReceiptV1Schema>;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const httpsUrl = z.url().refine((value) => {
|
|
3
|
+
const url = new URL(value);
|
|
4
|
+
return url.protocol === "https:" && !url.username && !url.password && !url.port && !url.hash && !url.search;
|
|
5
|
+
});
|
|
6
|
+
const indexNowKeyV1Schema = z.string().min(8).max(128).regex(/^[a-z0-9-]+$/i);
|
|
7
|
+
const indexNowConfigureV1Schema = z.strictObject({
|
|
8
|
+
key: indexNowKeyV1Schema,
|
|
9
|
+
keyLocation: httpsUrl.optional()
|
|
10
|
+
});
|
|
11
|
+
const indexNowSubmitV1Schema = z.strictObject({
|
|
12
|
+
urls: z.array(z.url()).min(1).max(1e3),
|
|
13
|
+
idempotencyKey: z.string().min(1).max(128)
|
|
14
|
+
});
|
|
15
|
+
const connectionShape = {
|
|
16
|
+
host: z.string().min(1),
|
|
17
|
+
keyLocation: httpsUrl
|
|
18
|
+
};
|
|
19
|
+
const indexNowConnectionV1Schema = z.discriminatedUnion("_tag", [
|
|
20
|
+
z.strictObject({
|
|
21
|
+
_tag: z.literal("disconnected"),
|
|
22
|
+
host: z.string().min(1)
|
|
23
|
+
}),
|
|
24
|
+
z.strictObject({
|
|
25
|
+
_tag: z.literal("verification-required"),
|
|
26
|
+
...connectionShape,
|
|
27
|
+
reason: z.string().nullable()
|
|
28
|
+
}),
|
|
29
|
+
z.strictObject({
|
|
30
|
+
_tag: z.literal("connected"),
|
|
31
|
+
...connectionShape,
|
|
32
|
+
verifiedAt: z.iso.datetime()
|
|
33
|
+
})
|
|
34
|
+
]);
|
|
35
|
+
const indexNowConnectionV1Schemas = {
|
|
36
|
+
producer: indexNowConnectionV1Schema,
|
|
37
|
+
client: z.discriminatedUnion("_tag", [
|
|
38
|
+
z.looseObject({
|
|
39
|
+
_tag: z.literal("disconnected"),
|
|
40
|
+
host: z.string().min(1)
|
|
41
|
+
}),
|
|
42
|
+
z.looseObject({
|
|
43
|
+
_tag: z.literal("verification-required"),
|
|
44
|
+
...connectionShape,
|
|
45
|
+
reason: z.string().nullable()
|
|
46
|
+
}),
|
|
47
|
+
z.looseObject({
|
|
48
|
+
_tag: z.literal("connected"),
|
|
49
|
+
...connectionShape,
|
|
50
|
+
verifiedAt: z.iso.datetime()
|
|
51
|
+
})
|
|
52
|
+
])
|
|
53
|
+
};
|
|
54
|
+
const receiptShape = {
|
|
55
|
+
id: z.string().min(1),
|
|
56
|
+
urls: z.array(z.url()).min(1).max(1e3),
|
|
57
|
+
createdAt: z.iso.datetime(),
|
|
58
|
+
updatedAt: z.iso.datetime(),
|
|
59
|
+
attempts: z.number().int().min(0)
|
|
60
|
+
};
|
|
61
|
+
const queuedShape = {
|
|
62
|
+
_tag: z.literal("queued"),
|
|
63
|
+
...receiptShape,
|
|
64
|
+
httpStatus: z.null(),
|
|
65
|
+
reason: z.null(),
|
|
66
|
+
retryAt: z.null()
|
|
67
|
+
};
|
|
68
|
+
const acceptedShape = {
|
|
69
|
+
_tag: z.literal("accepted"),
|
|
70
|
+
...receiptShape,
|
|
71
|
+
httpStatus: z.literal(200),
|
|
72
|
+
reason: z.null(),
|
|
73
|
+
retryAt: z.null()
|
|
74
|
+
};
|
|
75
|
+
const pendingShape = {
|
|
76
|
+
_tag: z.literal("pending"),
|
|
77
|
+
...receiptShape,
|
|
78
|
+
httpStatus: z.literal(202),
|
|
79
|
+
reason: z.literal("key-validation-pending"),
|
|
80
|
+
retryAt: z.null()
|
|
81
|
+
};
|
|
82
|
+
const rejectedShape = {
|
|
83
|
+
_tag: z.literal("rejected"),
|
|
84
|
+
...receiptShape,
|
|
85
|
+
httpStatus: z.union([
|
|
86
|
+
z.literal(400),
|
|
87
|
+
z.literal(403),
|
|
88
|
+
z.literal(422)
|
|
89
|
+
]),
|
|
90
|
+
reason: z.string().min(1),
|
|
91
|
+
retryAt: z.null()
|
|
92
|
+
};
|
|
93
|
+
const retryingShape = {
|
|
94
|
+
_tag: z.literal("retrying"),
|
|
95
|
+
...receiptShape,
|
|
96
|
+
httpStatus: z.number().int().min(100).max(599).nullable(),
|
|
97
|
+
reason: z.string().min(1),
|
|
98
|
+
retryAt: z.iso.datetime()
|
|
99
|
+
};
|
|
100
|
+
const failedShape = {
|
|
101
|
+
_tag: z.literal("failed"),
|
|
102
|
+
...receiptShape,
|
|
103
|
+
httpStatus: z.number().int().min(100).max(599).nullable(),
|
|
104
|
+
reason: z.string().min(1),
|
|
105
|
+
retryAt: z.null()
|
|
106
|
+
};
|
|
107
|
+
const indexNowSubmissionReceiptV1Schema = z.discriminatedUnion("_tag", [
|
|
108
|
+
z.strictObject(queuedShape),
|
|
109
|
+
z.strictObject(acceptedShape),
|
|
110
|
+
z.strictObject(pendingShape),
|
|
111
|
+
z.strictObject(rejectedShape),
|
|
112
|
+
z.strictObject(retryingShape),
|
|
113
|
+
z.strictObject(failedShape)
|
|
114
|
+
]);
|
|
115
|
+
const indexNowSubmissionReceiptV1Schemas = {
|
|
116
|
+
producer: indexNowSubmissionReceiptV1Schema,
|
|
117
|
+
client: z.discriminatedUnion("_tag", [
|
|
118
|
+
z.looseObject(queuedShape),
|
|
119
|
+
z.looseObject(acceptedShape),
|
|
120
|
+
z.looseObject(pendingShape),
|
|
121
|
+
z.looseObject(rejectedShape),
|
|
122
|
+
z.looseObject(retryingShape),
|
|
123
|
+
z.looseObject(failedShape)
|
|
124
|
+
])
|
|
125
|
+
};
|
|
126
|
+
export { indexNowConfigureV1Schema, indexNowConnectionV1Schema, indexNowConnectionV1Schemas, indexNowKeyV1Schema, indexNowSubmissionReceiptV1Schema, indexNowSubmissionReceiptV1Schemas, indexNowSubmitV1Schema };
|