@gscdump/contracts 3.0.0 → 3.2.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/schemas.mjs CHANGED
@@ -1,15 +1,9 @@
1
1
  import { GSCDUMP_ONBOARDING_CONTRACT_VERSION, accountNextActions, accountStatuses, analyticsNextActions, analyticsStatuses, indexingNextActions, indexingStatuses, lifecycleErrorCodes, propertyNextActions, propertyStatuses, querySourceModes, sitemapNextActions, sitemapStatuses } from "./onboarding.mjs";
2
+ import { GSC_SEARCH_TYPES } from "./search-types.mjs";
2
3
  import { CANONICAL_WEBHOOK_EVENTS, WEBHOOK_CONTRACT_VERSION } from "./webhook-constants.mjs";
3
4
  import { z } from "zod";
4
5
  const unknownRecord = z.record(z.string(), z.unknown());
5
- const searchTypeSchema = z.enum([
6
- "web",
7
- "image",
8
- "video",
9
- "news",
10
- "discover",
11
- "googleNews"
12
- ]);
6
+ const searchTypeSchema = z.enum(GSC_SEARCH_TYPES);
13
7
  const SEARCH_TYPE_CAPABILITIES = {
14
8
  web: {
15
9
  queries: true,
@@ -0,0 +1,10 @@
1
+ declare const GSC_SEARCH_TYPES: {
2
+ readonly WEB: "web";
3
+ readonly IMAGE: "image";
4
+ readonly VIDEO: "video";
5
+ readonly NEWS: "news";
6
+ readonly DISCOVER: "discover";
7
+ readonly GOOGLE_NEWS: "googleNews";
8
+ };
9
+ type GscSearchType = typeof GSC_SEARCH_TYPES[keyof typeof GSC_SEARCH_TYPES];
10
+ export { GSC_SEARCH_TYPES, GscSearchType };
@@ -0,0 +1,9 @@
1
+ const GSC_SEARCH_TYPES = {
2
+ WEB: "web",
3
+ IMAGE: "image",
4
+ VIDEO: "video",
5
+ NEWS: "news",
6
+ DISCOVER: "discover",
7
+ GOOGLE_NEWS: "googleNews"
8
+ };
9
+ export { GSC_SEARCH_TYPES };
package/dist/types.d.mts CHANGED
@@ -1,3 +1,4 @@
1
+ import { GscSearchType } from "./search-types.mjs";
1
2
  import { FileResolutionResponse } from "./file-resolution.mjs";
2
3
  import { AccountNextAction, AccountStatus, PartnerLifecycleAccount, PartnerLifecycleResponse, PartnerLifecycleSite } from "./onboarding.mjs";
3
4
  type TableName = 'pages' | 'queries' | 'countries' | 'page_queries' | 'dates' | 'search_appearance' | 'search_appearance_pages' | 'search_appearance_queries' | 'search_appearance_page_queries' | 'hourly_pages';
@@ -27,7 +28,6 @@ interface TenantCtx {
27
28
  }
28
29
  type Dimension = 'page' | 'query' | 'queryCanonical' | 'country' | 'device' | 'date' | 'searchAppearance' | 'hour';
29
30
  type Metric = 'clicks' | 'impressions' | 'ctr' | 'position';
30
- type GscSearchType = 'web' | 'image' | 'video' | 'news' | 'discover' | 'googleNews';
31
31
  type Filter = unknown;
32
32
  interface BuilderStateWire {
33
33
  dimensions: Dimension[];
@@ -1423,4 +1423,4 @@ interface PartnerWebhookHeaders {
1423
1423
  timestamp?: string | null;
1424
1424
  signature?: string | null;
1425
1425
  }
1426
- export { AddPartnerTeamMemberParams, AnalysisSourcesOptions, AnalysisSourcesResponse, BackfillRange, BackfillResponse, BindPartnerSiteTeamParams, BindPartnerTeamCatalogParams, BindPartnerTeamCatalogResponse, BuilderStateWire, BulkRegisterPartnerSiteResult, BulkRegisterPartnerSitesParams, BulkRegisterPartnerSitesResponse, CanonicalWebhookEventType, ColumnDef, ColumnType, CountriesResponse, CountryRow, CreatePartnerTeamParams, CreateWebhookEnvelopeOptions, DataDetailOptions, DataQueryOptions, DeletePartnerUserResponse, Dimension, Filter, Grain, GscAddAndVerifyResponse, GscApiRange, GscComparisonFilter, GscRowQueryMeta, GscRowQueryResponse, GscSearchType, GscVerificationDnsRecord, GscVerificationMethod, GscVerificationRequest, GscVerificationSite, GscVerificationTokenResponse, GscdumpAnalysisBundleParams, GscdumpAnalysisBundleResponse, GscdumpAnalysisParams, GscdumpAnalysisPreset, GscdumpAnalysisResponse, GscdumpAnalysisSourcesResponse, GscdumpAvailableSite, GscdumpCanonicalDifferenceKind, GscdumpCanonicalMismatchRow, GscdumpCanonicalMismatchesResponse, GscdumpDataDetailResponse, GscdumpDataResponse, GscdumpDataRow, GscdumpHealthResponse, GscdumpIndexPercentResponse, GscdumpIndexPercentSitemap, GscdumpIndexPercentTrendPoint, GscdumpIndexingDiagnosticsResponse, GscdumpIndexingInspectRateLimited, GscdumpIndexingInspectRequest, GscdumpIndexingInspectResponse, GscdumpIndexingInspectResult, GscdumpIndexingIssueSeverity, GscdumpIndexingResponse, GscdumpIndexingTrendPoint, GscdumpIndexingUrl, GscdumpIndexingUrlStatus, GscdumpIndexingUrlsResponse, GscdumpInvisibleUrlRow, GscdumpKeywordSparklinesParams, GscdumpKeywordSparklinesResponse, GscdumpMeta, GscdumpOrphanPageRow, GscdumpPageTrendParams, GscdumpPageTrendResponse, GscdumpPerSitemapHistoryEntry, GscdumpPermissionRecovery, GscdumpQueryTrendParams, GscdumpQueryTrendResponse, GscdumpRichResultItem, GscdumpSiteIntIdCrosswalkEntry, GscdumpSiteIntIdCrosswalkResponse, GscdumpSiteRegistration, GscdumpSiteReportResponse, GscdumpSitemap, GscdumpSitemapChangesResponse, GscdumpSitemapExportResponse, GscdumpSitemapGeneration, GscdumpSitemapHistory, GscdumpSitemapMembershipEvidence, GscdumpSitemapMembershipParams, GscdumpSitemapMembershipResponse, GscdumpSitemapUrlsResponse, GscdumpSitemapsResponse, GscdumpSyncJobItem, GscdumpSyncJobStatus, GscdumpSyncJobsQueueCounts, GscdumpSyncJobsResponse, GscdumpSyncProgressDateStatus, GscdumpSyncProgressPhaseCounts, GscdumpSyncProgressResponse, GscdumpSyncProgressSite, GscdumpSyncStatusResponse, GscdumpTeamCatalogRef, GscdumpTeamMemberRow, GscdumpTeamRow, GscdumpTopAssociationParams, GscdumpTopAssociationResponse, GscdumpTotals, GscdumpUserMeResponse, GscdumpUserRegistration, GscdumpUserSettings, GscdumpUserSite, GscdumpUserStatus, GscdumpUserTokenUpdate, IndexingDiagnostics, IndexingDiagnosticsParams, IndexingInspectRateLimit, IndexingInspectRateLimited, IndexingInspectRequest, IndexingInspectResponse, IndexingInspectResult, IndexingIssue, IndexingIssueSeverity, IndexingUrlRow, IndexingUrlStatus, IndexingUrlsParams, IndexingUrlsResponse, InspectionHistoryRecord, InspectionHistoryResponse, InspectionIndex, InspectionRecordRaw, Metric, type PartnerLifecycleAccount, type PartnerLifecycleResponse, type PartnerLifecycleSite, PartnerSitemapAction, PartnerSitemapActionResponse, PartnerWebhookData, PartnerWebhookHeaders, RegisterPartnerSiteParams, RegisterPartnerUserParams, RollupEnvelope, Row, ScheduleState, SearchAppearanceResponse, SearchAppearanceRow, SearchTypeOptions, SiteListItem, SitemapAddedRow, SitemapChangesCompleteness, SitemapChangesResponse, SitemapRemovedRow, SourceInfoOptions, SourceInfoResponse, TableName, TableSchema, TenantCtx, UpdatePartnerUserTokensParams, WebhookEnvelope, WebhookEventType, WhoamiResponse };
1426
+ export { AddPartnerTeamMemberParams, AnalysisSourcesOptions, AnalysisSourcesResponse, BackfillRange, BackfillResponse, BindPartnerSiteTeamParams, BindPartnerTeamCatalogParams, BindPartnerTeamCatalogResponse, BuilderStateWire, BulkRegisterPartnerSiteResult, BulkRegisterPartnerSitesParams, BulkRegisterPartnerSitesResponse, CanonicalWebhookEventType, ColumnDef, ColumnType, CountriesResponse, CountryRow, CreatePartnerTeamParams, CreateWebhookEnvelopeOptions, DataDetailOptions, DataQueryOptions, DeletePartnerUserResponse, Dimension, Filter, Grain, GscAddAndVerifyResponse, GscApiRange, GscComparisonFilter, GscRowQueryMeta, GscRowQueryResponse, GscVerificationDnsRecord, GscVerificationMethod, GscVerificationRequest, GscVerificationSite, GscVerificationTokenResponse, GscdumpAnalysisBundleParams, GscdumpAnalysisBundleResponse, GscdumpAnalysisParams, GscdumpAnalysisPreset, GscdumpAnalysisResponse, GscdumpAnalysisSourcesResponse, GscdumpAvailableSite, GscdumpCanonicalDifferenceKind, GscdumpCanonicalMismatchRow, GscdumpCanonicalMismatchesResponse, GscdumpDataDetailResponse, GscdumpDataResponse, GscdumpDataRow, GscdumpHealthResponse, GscdumpIndexPercentResponse, GscdumpIndexPercentSitemap, GscdumpIndexPercentTrendPoint, GscdumpIndexingDiagnosticsResponse, GscdumpIndexingInspectRateLimited, GscdumpIndexingInspectRequest, GscdumpIndexingInspectResponse, GscdumpIndexingInspectResult, GscdumpIndexingIssueSeverity, GscdumpIndexingResponse, GscdumpIndexingTrendPoint, GscdumpIndexingUrl, GscdumpIndexingUrlStatus, GscdumpIndexingUrlsResponse, GscdumpInvisibleUrlRow, GscdumpKeywordSparklinesParams, GscdumpKeywordSparklinesResponse, GscdumpMeta, GscdumpOrphanPageRow, GscdumpPageTrendParams, GscdumpPageTrendResponse, GscdumpPerSitemapHistoryEntry, GscdumpPermissionRecovery, GscdumpQueryTrendParams, GscdumpQueryTrendResponse, GscdumpRichResultItem, GscdumpSiteIntIdCrosswalkEntry, GscdumpSiteIntIdCrosswalkResponse, GscdumpSiteRegistration, GscdumpSiteReportResponse, GscdumpSitemap, GscdumpSitemapChangesResponse, GscdumpSitemapExportResponse, GscdumpSitemapGeneration, GscdumpSitemapHistory, GscdumpSitemapMembershipEvidence, GscdumpSitemapMembershipParams, GscdumpSitemapMembershipResponse, GscdumpSitemapUrlsResponse, GscdumpSitemapsResponse, GscdumpSyncJobItem, GscdumpSyncJobStatus, GscdumpSyncJobsQueueCounts, GscdumpSyncJobsResponse, GscdumpSyncProgressDateStatus, GscdumpSyncProgressPhaseCounts, GscdumpSyncProgressResponse, GscdumpSyncProgressSite, GscdumpSyncStatusResponse, GscdumpTeamCatalogRef, GscdumpTeamMemberRow, GscdumpTeamRow, GscdumpTopAssociationParams, GscdumpTopAssociationResponse, GscdumpTotals, GscdumpUserMeResponse, GscdumpUserRegistration, GscdumpUserSettings, GscdumpUserSite, GscdumpUserStatus, GscdumpUserTokenUpdate, IndexingDiagnostics, IndexingDiagnosticsParams, IndexingInspectRateLimit, IndexingInspectRateLimited, IndexingInspectRequest, IndexingInspectResponse, IndexingInspectResult, IndexingIssue, IndexingIssueSeverity, IndexingUrlRow, IndexingUrlStatus, IndexingUrlsParams, IndexingUrlsResponse, InspectionHistoryRecord, InspectionHistoryResponse, InspectionIndex, InspectionRecordRaw, Metric, type PartnerLifecycleAccount, type PartnerLifecycleResponse, type PartnerLifecycleSite, PartnerSitemapAction, PartnerSitemapActionResponse, PartnerWebhookData, PartnerWebhookHeaders, RegisterPartnerSiteParams, RegisterPartnerUserParams, RollupEnvelope, Row, ScheduleState, SearchAppearanceResponse, SearchAppearanceRow, SearchTypeOptions, SiteListItem, SitemapAddedRow, SitemapChangesCompleteness, SitemapChangesResponse, SitemapRemovedRow, SourceInfoOptions, SourceInfoResponse, TableName, TableSchema, TenantCtx, UpdatePartnerUserTokensParams, WebhookEnvelope, WebhookEventType, WhoamiResponse };
@@ -59,12 +59,12 @@ declare function createGscdumpV1BrowserSchemas(realtimeSchemas?: RealtimeV1Schem
59
59
  byNewsShowcasePanel: "byNewsShowcasePanel";
60
60
  }>>;
61
61
  searchType: z.ZodOptional<z.ZodEnum<{
62
- web: "web";
63
- image: "image";
64
- video: "video";
65
- news: "news";
66
- discover: "discover";
67
- googleNews: "googleNews";
62
+ readonly WEB: "web";
63
+ readonly IMAGE: "image";
64
+ readonly VIDEO: "video";
65
+ readonly NEWS: "news";
66
+ readonly DISCOVER: "discover";
67
+ readonly GOOGLE_NEWS: "googleNews";
68
68
  }>>;
69
69
  }, z.core.$strict>;
70
70
  analyticsRowsResponse: CompatibleResponseSchema<z.ZodObject<{
@@ -1,4 +1,5 @@
1
1
  import { accountNextActions, accountStatuses, analyticsNextActions, analyticsStatuses, indexingNextActions, indexingStatuses, lifecycleErrorCodes, propertyNextActions, propertyStatuses, querySourceModes, sitemapNextActions, sitemapStatuses } from "../onboarding.mjs";
2
+ import { GSC_SEARCH_TYPES } from "../search-types.mjs";
2
3
  import "./version.mjs";
3
4
  import { defineResponseObject, defineSuccessResponse } from "./http-core.mjs";
4
5
  import { createRealtimeV1Schemas } from "./realtime.mjs";
@@ -193,14 +194,7 @@ function createGscdumpV1BrowserSchemas(realtimeSchemas = createRealtimeV1Schemas
193
194
  "byProperty",
194
195
  "byNewsShowcasePanel"
195
196
  ]).optional(),
196
- searchType: z.enum([
197
- "web",
198
- "image",
199
- "video",
200
- "news",
201
- "discover",
202
- "googleNews"
203
- ]).optional()
197
+ searchType: z.enum(GSC_SEARCH_TYPES).optional()
204
198
  });
205
199
  const analyticsRowData = defineResponseObject({ rows: z.array(z.record(z.string(), z.union([
206
200
  z.string(),
@@ -1,3 +1,6 @@
1
+ import { UnknownHttpV1OperationError, isUnknownHttpV1OperationError } from "./http-operation-error.mjs";
2
+ import { HttpV1RouteSurfaceName } from "./route-surfaces.mjs";
3
+ import { HttpV1RouteMethod } from "./route-catalog.mjs";
1
4
  import { GSCDUMP_HTTP_V1_VERSION } from "./version.mjs";
2
5
  import { ZodRawShape, ZodTypeAny, z } from "zod";
3
6
  declare const HTTP_V1_SURFACES: readonly ["partner", "analytics", "realtime"];
@@ -9,8 +12,8 @@ declare const HTTP_V1_CREDENTIAL_SCOPES: {
9
12
  readonly partner_key: readonly ["users:read", "users:write", "sites:read", "sites:write", "analytics:read", "analytics:execute", "indexing:read", "indexing:write", "sitemaps:read", "sitemaps:write", "settings:read", "settings:write", "realtime:connect", "teams:read", "teams:write"];
10
13
  };
11
14
  declare const HTTP_V1_ERROR_CODES: readonly ["invalid_request", "unauthorized", "forbidden", "user_not_found", "site_not_found", "rate_limited", "realtime_unavailable", "internal_error", "contract_violation"];
12
- type HttpV1SurfaceName = typeof HTTP_V1_SURFACES[number];
13
- type HttpV1Method = typeof HTTP_V1_METHODS[number];
15
+ type HttpV1SurfaceName = HttpV1RouteSurfaceName;
16
+ type HttpV1Method = HttpV1RouteMethod;
14
17
  type HttpV1Credential = typeof HTTP_V1_CREDENTIALS[number];
15
18
  type HttpV1Scope = typeof HTTP_V1_SCOPES[number];
16
19
  type HttpV1ErrorCode = typeof HTTP_V1_ERROR_CODES[number];
@@ -102,6 +105,29 @@ type ResolvedHttpV1Operation<TEntry extends HttpV1OperationEntry = HttpV1Operati
102
105
  /** Canonical surface-relative path. */
103
106
  path: string;
104
107
  };
108
+ type HttpV1RegistryOperationId<TProtocol extends HttpV1ProtocolLike> = HttpV1ProtocolOperation<TProtocol>['id'] & string;
109
+ type HttpV1OperationEntryWithId<TEntry, TId extends string> = TEntry extends {
110
+ surface: infer TSurface extends HttpV1Surface;
111
+ operation: infer TOperation extends HttpV1OperationDefinition;
112
+ } ? TOperation extends {
113
+ id: TId;
114
+ } ? {
115
+ surface: TSurface;
116
+ operation: TOperation;
117
+ } : never : never;
118
+ type HttpV1RegistryOperationEntry<TProtocol extends HttpV1ProtocolLike, TId extends HttpV1RegistryOperationId<TProtocol>> = HttpV1OperationEntryWithId<HttpV1OperationEntry<TProtocol>, TId>;
119
+ type HttpV1RegistryPathParams<TProtocol extends HttpV1ProtocolLike, TId extends HttpV1RegistryOperationId<TProtocol>> = HttpV1RegistryOperationEntry<TProtocol, TId>['operation']['request']['params'] extends (infer TParams) ? TParams extends ZodTypeAny ? z.input<TParams> : undefined : never;
120
+ interface HttpV1RegistryPathOptions {
121
+ /** Root replacing the contract's `/api` segment. */
122
+ apiRoot?: string;
123
+ }
124
+ interface HttpV1Registry<TProtocol extends HttpV1ProtocolLike> {
125
+ operation: <const TId extends HttpV1RegistryOperationId<TProtocol>>(id: TId) => HttpV1RegistryOperationEntry<TProtocol, TId>;
126
+ resolve: <const TAllowed extends readonly HttpV1RegistryOperationId<TProtocol>[]>(request: HttpV1OperationRequest, options: {
127
+ allow: TAllowed;
128
+ }) => ResolvedHttpV1Operation<HttpV1RegistryOperationEntry<TProtocol, TAllowed[number]>> | null;
129
+ path: <const TId extends HttpV1RegistryOperationId<TProtocol>>(id: TId, params?: HttpV1RegistryPathParams<TProtocol, TId>, options?: HttpV1RegistryPathOptions) => string;
130
+ }
105
131
  declare function defineHttpOperation<const TOperation extends HttpV1OperationDefinition>(operation: TOperation): TOperation;
106
132
  declare function defineHttpSurface<const TOperations extends Readonly<Record<string, HttpV1OperationDefinition>>>(surface: HttpV1Surface<TOperations>): HttpV1Surface<TOperations>;
107
133
  declare function listHttpOperations<const TProtocol extends HttpV1ProtocolLike>(protocol: TProtocol): HttpV1OperationEntry<TProtocol>[];
@@ -115,4 +141,5 @@ declare function defineSuccessResponse<const TDataProducer extends ZodTypeAny, c
115
141
  }>>;
116
142
  declare function buildHttpOperationPath(surface: HttpV1Surface, operation: HttpV1OperationDefinition, params?: unknown): string;
117
143
  declare function resolveHttpOperation<const TEntries extends readonly HttpV1OperationEntry[]>(entries: TEntries, request: HttpV1OperationRequest): ResolvedHttpV1Operation<TEntries[number]> | null;
118
- export { CompatibleResponseSchema, GSCDUMP_HTTP_V1_VERSION, 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, HttpV1RequestSchemas, HttpV1ResourceReference, HttpV1ResourceType, HttpV1Scope, HttpV1Semantics, HttpV1Surface, HttpV1SurfaceName, HttpV1Visibility, ResolvedHttpV1Operation, buildHttpOperationPath, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, listHttpOperations, resolveHttpOperation };
144
+ declare function createHttpV1Registry<const TProtocol extends HttpV1ProtocolLike>(protocol: TProtocol): HttpV1Registry<TProtocol>;
145
+ export { CompatibleResponseSchema, GSCDUMP_HTTP_V1_VERSION, 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, type UnknownHttpV1OperationError, buildHttpOperationPath, createHttpV1Registry, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, isUnknownHttpV1OperationError, listHttpOperations, resolveHttpOperation };
@@ -1,10 +1,9 @@
1
+ import { isUnknownHttpV1OperationError, unknownHttpV1OperationError } from "./http-operation-error.mjs";
2
+ import { serializeHttpV1PathSegment } from "./path-segment.mjs";
1
3
  import { GSCDUMP_HTTP_V1_VERSION } from "./version.mjs";
4
+ import { HTTP_V1_ROUTE_SURFACE_NAMES } from "./route-surfaces.mjs";
2
5
  import { z } from "zod";
3
- const HTTP_V1_SURFACES = [
4
- "partner",
5
- "analytics",
6
- "realtime"
7
- ];
6
+ const HTTP_V1_SURFACES = HTTP_V1_ROUTE_SURFACE_NAMES;
8
7
  const HTTP_V1_METHODS = [
9
8
  "DELETE",
10
9
  "GET",
@@ -188,11 +187,7 @@ function buildHttpOperationPath(surface, operation, params) {
188
187
  if (operation.request.params === null) throw new TypeError(`${operation.id}: operation has an invalid path contract`);
189
188
  const parsed = operation.request.params.parse(params);
190
189
  const relativePath = operation.path.replace(/\{([^{}]+)\}/g, (_match, name) => {
191
- const value = parsed[name];
192
- if (typeof value !== "string" && typeof value !== "number") throw new TypeError(`${operation.id}: path parameter ${name} must serialize as a string or number`);
193
- const serialized = String(value);
194
- if (serialized.length === 0 || serialized === "." || serialized === "..") throw new TypeError(`${operation.id}: path parameter ${name} cannot serialize as an empty or dot segment`);
195
- return encodeURIComponent(serialized);
190
+ return serializeHttpV1PathSegment(operation.id, name, parsed[name]);
196
191
  });
197
192
  return `${surface.prefix}${relativePath}`;
198
193
  }
@@ -211,4 +206,29 @@ function resolveHttpOperation(entries, request) {
211
206
  }
212
207
  return null;
213
208
  }
214
- 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, buildHttpOperationPath, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, listHttpOperations, resolveHttpOperation };
209
+ function createHttpV1Registry(protocol) {
210
+ const entries = listHttpOperations(protocol);
211
+ const entriesById = /* @__PURE__ */ new Map();
212
+ for (const entry of entries) {
213
+ if (entriesById.has(entry.operation.id)) throw new TypeError(`Duplicate HTTP v1 operation ID: ${entry.operation.id}`);
214
+ entriesById.set(entry.operation.id, entry);
215
+ }
216
+ function operation(id) {
217
+ const entry = entriesById.get(id);
218
+ if (!entry) throw unknownHttpV1OperationError(id);
219
+ return entry;
220
+ }
221
+ return {
222
+ operation: (id) => operation(id),
223
+ resolve: (request, options) => {
224
+ return resolveHttpOperation(options.allow.map((id) => operation(id)), request);
225
+ },
226
+ path: (id, params, options) => {
227
+ const entry = operation(id);
228
+ const path = buildHttpOperationPath(entry.surface, entry.operation, params);
229
+ if (options?.apiRoot === void 0) return path;
230
+ return `${options.apiRoot.replace(/\/+$/, "")}${path.slice(4)}`;
231
+ }
232
+ };
233
+ }
234
+ 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, buildHttpOperationPath, createHttpV1Registry, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, isUnknownHttpV1OperationError, listHttpOperations, resolveHttpOperation };
@@ -0,0 +1,6 @@
1
+ interface UnknownHttpV1OperationError extends TypeError {
2
+ readonly tag: 'UnknownHttpV1OperationError';
3
+ readonly operationId: string;
4
+ }
5
+ declare function isUnknownHttpV1OperationError(error: unknown): error is UnknownHttpV1OperationError;
6
+ export { UnknownHttpV1OperationError, isUnknownHttpV1OperationError };
@@ -0,0 +1,11 @@
1
+ function isUnknownHttpV1OperationError(error) {
2
+ return error instanceof TypeError && "tag" in error && error.tag === "UnknownHttpV1OperationError" && "operationId" in error && typeof error.operationId === "string";
3
+ }
4
+ function unknownHttpV1OperationError(operationId) {
5
+ return Object.assign(/* @__PURE__ */ new TypeError(`Unknown HTTP v1 operation ID: ${operationId}`), {
6
+ name: "UnknownHttpV1OperationError",
7
+ operationId,
8
+ tag: "UnknownHttpV1OperationError"
9
+ });
10
+ }
11
+ export { isUnknownHttpV1OperationError, unknownHttpV1OperationError };
@@ -1,4 +1,5 @@
1
+ import { UnknownHttpV1OperationError, isUnknownHttpV1OperationError } from "./http-operation-error.mjs";
1
2
  import { GSCDUMP_HTTP_V1_VERSION } from "./version.mjs";
2
- 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, HttpV1RequestSchemas, HttpV1ResourceReference, HttpV1ResourceType, HttpV1Scope, HttpV1Semantics, HttpV1Surface, HttpV1SurfaceName, HttpV1Visibility, ResolvedHttpV1Operation, buildHttpOperationPath, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, listHttpOperations, resolveHttpOperation } from "./http-core.mjs";
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";
3
4
  import { AnalyticsReportDetailV1Request, AnalyticsReportDetailV1Response, AnalyticsReportV1Request, AnalyticsReportV1Response, AnalyticsRowsV1Request, AnalyticsRowsV1Response, GscdumpV1ErrorEnvelope, GscdumpV1Operation, GscdumpV1OperationId, GscdumpV1Protocol, GscdumpV1RequestMetadata, PartnerAnalysisBundleV1Response, PartnerAnalysisV1Response, PartnerAvailableSitesV1Response, PartnerBingIndexingEvidenceV1Response, PartnerIndexingDiagnosticsV1Response, PartnerIndexingTransitionsV1Response, PartnerIndexingUrlsV1Response, PartnerIndexingV1Response, PartnerSiteDeletionV1Response, PartnerSiteRegistrationV1Response, PartnerSitemapChangesV1Response, PartnerSitemapsV1Response, PartnerUserLifecycleV1Response, createGscdumpV1Protocol } from "./operations.mjs";
4
- export { AnalyticsReportDetailV1Request, AnalyticsReportDetailV1Response, AnalyticsReportV1Request, AnalyticsReportV1Response, AnalyticsRowsV1Request, AnalyticsRowsV1Response, 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, HttpV1RequestSchemas, HttpV1ResourceReference, HttpV1ResourceType, HttpV1Scope, HttpV1Semantics, HttpV1Surface, HttpV1SurfaceName, HttpV1Visibility, PartnerAnalysisBundleV1Response, PartnerAnalysisV1Response, PartnerAvailableSitesV1Response, PartnerBingIndexingEvidenceV1Response, PartnerIndexingDiagnosticsV1Response, PartnerIndexingTransitionsV1Response, PartnerIndexingUrlsV1Response, PartnerIndexingV1Response, PartnerSiteDeletionV1Response, PartnerSiteRegistrationV1Response, PartnerSitemapChangesV1Response, PartnerSitemapsV1Response, PartnerUserLifecycleV1Response, ResolvedHttpV1Operation, buildHttpOperationPath, createGscdumpV1Protocol, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, listHttpOperations, resolveHttpOperation };
5
+ export { AnalyticsReportDetailV1Request, AnalyticsReportDetailV1Response, AnalyticsReportV1Request, AnalyticsReportV1Response, AnalyticsRowsV1Request, AnalyticsRowsV1Response, 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, PartnerBingIndexingEvidenceV1Response, PartnerIndexingDiagnosticsV1Response, PartnerIndexingTransitionsV1Response, PartnerIndexingUrlsV1Response, PartnerIndexingV1Response, PartnerSiteDeletionV1Response, PartnerSiteRegistrationV1Response, PartnerSitemapChangesV1Response, PartnerSitemapsV1Response, PartnerUserLifecycleV1Response, ResolvedHttpV1Operation, type UnknownHttpV1OperationError, buildHttpOperationPath, createGscdumpV1Protocol, createHttpV1Registry, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, isUnknownHttpV1OperationError, listHttpOperations, resolveHttpOperation };
package/dist/v1/http.mjs CHANGED
@@ -1,4 +1,5 @@
1
+ import { isUnknownHttpV1OperationError } from "./http-operation-error.mjs";
1
2
  import { GSCDUMP_HTTP_V1_VERSION } from "./version.mjs";
2
- import { HTTP_V1_CREDENTIALS, HTTP_V1_CREDENTIAL_SCOPES, HTTP_V1_ERROR_CODES, HTTP_V1_METHODS, HTTP_V1_SCOPES, HTTP_V1_SURFACES, buildHttpOperationPath, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, listHttpOperations, resolveHttpOperation } from "./http-core.mjs";
3
+ 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";
3
4
  import { createGscdumpV1Protocol } from "./operations.mjs";
4
- 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, buildHttpOperationPath, createGscdumpV1Protocol, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, listHttpOperations, resolveHttpOperation };
5
+ 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, buildHttpOperationPath, createGscdumpV1Protocol, createHttpV1Registry, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, isUnknownHttpV1OperationError, listHttpOperations, resolveHttpOperation };
@@ -1,7 +1,8 @@
1
+ import { UnknownHttpV1OperationError, isUnknownHttpV1OperationError } from "./http-operation-error.mjs";
1
2
  import { GSCDUMP_HTTP_V1_VERSION } from "./version.mjs";
2
- 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, HttpV1RequestSchemas, HttpV1ResourceReference, HttpV1ResourceType, HttpV1Scope, HttpV1Semantics, HttpV1Surface, HttpV1SurfaceName, HttpV1Visibility, ResolvedHttpV1Operation, buildHttpOperationPath, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, listHttpOperations, resolveHttpOperation } from "./http-core.mjs";
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";
3
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";
4
5
  import { AnalyticsReportDetailV1Request, AnalyticsReportDetailV1Response, AnalyticsReportV1Request, AnalyticsReportV1Response, AnalyticsRowsV1Request, AnalyticsRowsV1Response, GscdumpV1ErrorEnvelope, GscdumpV1Operation, GscdumpV1OperationId, GscdumpV1Protocol, GscdumpV1RequestMetadata, PartnerAnalysisBundleV1Response, PartnerAnalysisV1Response, PartnerAvailableSitesV1Response, PartnerBingIndexingEvidenceV1Response, PartnerIndexingDiagnosticsV1Response, PartnerIndexingTransitionsV1Response, PartnerIndexingUrlsV1Response, PartnerIndexingV1Response, PartnerSiteDeletionV1Response, PartnerSiteRegistrationV1Response, PartnerSitemapChangesV1Response, PartnerSitemapsV1Response, PartnerUserLifecycleV1Response, createGscdumpV1Protocol } from "./operations.mjs";
5
6
  import "./http.mjs";
6
7
  import { ContractDocument, createGscdumpV1Documents, serializeContractDocument } from "./documents.mjs";
7
- export { AnalyticsReportDetailV1Request, AnalyticsReportDetailV1Response, AnalyticsReportV1Request, AnalyticsReportV1Response, AnalyticsRowsV1Request, AnalyticsRowsV1Response, 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, HttpV1RequestSchemas, HttpV1ResourceReference, HttpV1ResourceType, HttpV1Scope, HttpV1Semantics, HttpV1Surface, HttpV1SurfaceName, HttpV1Visibility, PartnerAnalysisBundleV1Response, PartnerAnalysisV1Response, PartnerAvailableSitesV1Response, 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, buildHttpOperationPath, createGscdumpV1Documents, createGscdumpV1Protocol, createRealtimeV1Schemas, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, listHttpOperations, resolveHttpOperation, serializeContractDocument };
8
+ export { AnalyticsReportDetailV1Request, AnalyticsReportDetailV1Response, AnalyticsReportV1Request, AnalyticsReportV1Response, AnalyticsRowsV1Request, AnalyticsRowsV1Response, 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, 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, buildHttpOperationPath, createGscdumpV1Documents, createGscdumpV1Protocol, createHttpV1Registry, createRealtimeV1Schemas, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, isUnknownHttpV1OperationError, listHttpOperations, resolveHttpOperation, serializeContractDocument };
package/dist/v1/index.mjs CHANGED
@@ -1,7 +1,8 @@
1
+ import { isUnknownHttpV1OperationError } from "./http-operation-error.mjs";
1
2
  import { GSCDUMP_HTTP_V1_VERSION } from "./version.mjs";
2
- import { HTTP_V1_CREDENTIALS, HTTP_V1_CREDENTIAL_SCOPES, HTTP_V1_ERROR_CODES, HTTP_V1_METHODS, HTTP_V1_SCOPES, HTTP_V1_SURFACES, buildHttpOperationPath, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, listHttpOperations, resolveHttpOperation } from "./http-core.mjs";
3
+ 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";
3
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, createRealtimeV1Schemas } from "./realtime.mjs";
4
5
  import { createGscdumpV1Protocol } from "./operations.mjs";
5
6
  import { createGscdumpV1Documents, serializeContractDocument } from "./documents.mjs";
6
7
  import "./http.mjs";
7
- 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, buildHttpOperationPath, createGscdumpV1Documents, createGscdumpV1Protocol, createRealtimeV1Schemas, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, listHttpOperations, resolveHttpOperation, serializeContractDocument };
8
+ 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, buildHttpOperationPath, createGscdumpV1Documents, createGscdumpV1Protocol, createHttpV1Registry, createRealtimeV1Schemas, defineHttpOperation, defineHttpSurface, defineResponseObject, defineSuccessResponse, isUnknownHttpV1OperationError, listHttpOperations, resolveHttpOperation, serializeContractDocument };