@gscdump/contracts 0.23.4 → 0.24.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/index.d.mts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
  declare const GSCDUMP_ONBOARDING_CONTRACT_VERSION: "2026-05-11";
3
3
  declare const GSCDUMP_REQUIRED_ANALYTICS_SCOPE: "https://www.googleapis.com/auth/webmasters.readonly";
4
+ declare const GSCDUMP_WRITE_ANALYTICS_SCOPE: "https://www.googleapis.com/auth/webmasters";
4
5
  declare const GSCDUMP_OPTIONAL_INDEXING_SCOPE: "https://www.googleapis.com/auth/indexing";
5
6
  declare const accountStatuses: readonly ["disconnected", "oauth_received", "scope_missing", "refresh_missing", "db_provisioning", "ready", "reauth_required"];
6
7
  declare const accountNextActions: readonly ["connect_google", "reconnect_google", "wait_for_provisioning", "none"];
@@ -997,6 +998,7 @@ interface GscdumpKeywordSparklinesParams {
997
998
  keywords: string[];
998
999
  startDate: string;
999
1000
  endDate: string;
1001
+ searchType?: GscSearchType;
1000
1002
  }
1001
1003
  interface GscdumpKeywordSparklinesResponse {
1002
1004
  sparklines: Record<string, number[]>;
@@ -1006,6 +1008,7 @@ interface GscdumpQueryTrendParams {
1006
1008
  endDate: string;
1007
1009
  prevStartDate?: string;
1008
1010
  prevEndDate?: string;
1011
+ searchType?: GscSearchType;
1009
1012
  }
1010
1013
  interface GscdumpQueryTrendResponse {
1011
1014
  daily: Array<{
@@ -3292,6 +3295,14 @@ declare const gscdumpKeywordSparklinesParamsSchema: z.ZodObject<{
3292
3295
  keywords: z.ZodArray<z.ZodString>;
3293
3296
  startDate: z.ZodString;
3294
3297
  endDate: z.ZodString;
3298
+ searchType: z.ZodOptional<z.ZodEnum<{
3299
+ web: "web";
3300
+ image: "image";
3301
+ video: "video";
3302
+ news: "news";
3303
+ discover: "discover";
3304
+ googleNews: "googleNews";
3305
+ }>>;
3295
3306
  }, z.core.$strip>;
3296
3307
  declare const gscdumpKeywordSparklinesResponseSchema: z.ZodObject<{
3297
3308
  sparklines: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodNumber>>;
@@ -3301,6 +3312,14 @@ declare const gscdumpQueryTrendParamsSchema: z.ZodObject<{
3301
3312
  endDate: z.ZodString;
3302
3313
  prevStartDate: z.ZodOptional<z.ZodString>;
3303
3314
  prevEndDate: z.ZodOptional<z.ZodString>;
3315
+ searchType: z.ZodOptional<z.ZodEnum<{
3316
+ web: "web";
3317
+ image: "image";
3318
+ video: "video";
3319
+ news: "news";
3320
+ discover: "discover";
3321
+ googleNews: "googleNews";
3322
+ }>>;
3304
3323
  }, z.core.$strip>;
3305
3324
  declare const gscdumpQueryTrendResponseSchema: z.ZodObject<{
3306
3325
  daily: z.ZodArray<z.ZodObject<{
@@ -4899,6 +4918,14 @@ declare const partnerEndpointSchemas: {
4899
4918
  keywords: z.ZodArray<z.ZodString>;
4900
4919
  startDate: z.ZodString;
4901
4920
  endDate: z.ZodString;
4921
+ searchType: z.ZodOptional<z.ZodEnum<{
4922
+ web: "web";
4923
+ image: "image";
4924
+ video: "video";
4925
+ news: "news";
4926
+ discover: "discover";
4927
+ googleNews: "googleNews";
4928
+ }>>;
4902
4929
  }, z.core.$strip>;
4903
4930
  readonly response: z.ZodObject<{
4904
4931
  sparklines: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodNumber>>;
@@ -4910,6 +4937,14 @@ declare const partnerEndpointSchemas: {
4910
4937
  endDate: z.ZodString;
4911
4938
  prevStartDate: z.ZodOptional<z.ZodString>;
4912
4939
  prevEndDate: z.ZodOptional<z.ZodString>;
4940
+ searchType: z.ZodOptional<z.ZodEnum<{
4941
+ web: "web";
4942
+ image: "image";
4943
+ video: "video";
4944
+ news: "news";
4945
+ discover: "discover";
4946
+ googleNews: "googleNews";
4947
+ }>>;
4913
4948
  }, z.core.$strip>;
4914
4949
  readonly response: z.ZodObject<{
4915
4950
  daily: z.ZodArray<z.ZodObject<{
@@ -5182,4 +5217,4 @@ declare const WEBHOOK_CONTRACT_VERSION_HEADER = "X-GSCDump-Contract-Version";
5182
5217
  declare const WEBHOOK_TIMESTAMP_HEADER = "X-GSCDump-Timestamp";
5183
5218
  declare const CANONICAL_WEBHOOK_EVENTS: readonly ["user.lifecycle.changed", "site.lifecycle.changed", "site.analytics.ready", "site.indexing.ready", "site.auth.failed", "job.failed"];
5184
5219
  declare const VALID_WEBHOOK_EVENTS: readonly ["user.lifecycle.changed", "site.lifecycle.changed", "site.analytics.ready", "site.indexing.ready", "site.auth.failed", "job.failed"];
5185
- export { AccountNextAction, AccountStatus, type AddPartnerTeamMemberParams, type AnalysisSourcesOptions, type AnalysisSourcesResponse, type AnalyticsClient, AnalyticsNextAction, AnalyticsStatus, type BackfillRange, type BackfillResponse, type BindPartnerSiteTeamParams, type BuilderState, type BulkRegisterPartnerSiteResult, type BulkRegisterPartnerSitesParams, type BulkRegisterPartnerSitesResponse, CANONICAL_WEBHOOK_EVENTS, type CanonicalWebhookEventType, type ColumnDef, type ColumnType, type CountriesResponse, type CountryRow, type CreatePartnerTeamParams, type CreateWebhookEnvelopeOptions, type DataDetailOptions, type DataQueryOptions, type DeletePartnerUserResponse, type Dimension, type FileResolutionRequest, type FileResolutionResponse, type FileResolutionTable, type Filter, GSCDUMP_ONBOARDING_CONTRACT_VERSION, GSCDUMP_OPTIONAL_INDEXING_SCOPE, GSCDUMP_REQUIRED_ANALYTICS_SCOPE, type Grain, type GscApiRange, type GscComparisonFilter, type GscRowQueryMeta, type GscRowQueryResponse, type GscSearchType, type GscdumpAnalysisParams, type GscdumpAnalysisPreset, type GscdumpAnalysisResponse, type GscdumpAnalysisSourcesResponse, type GscdumpAvailableSite, type GscdumpCanonicalMismatchRow, type GscdumpCanonicalMismatchesResponse, type GscdumpDataDetailResponse, type GscdumpDataResponse, type GscdumpDataRow, type GscdumpDateRangeParams, type GscdumpHealthResponse, type GscdumpIndexPercentResponse, type GscdumpIndexPercentSitemap, type GscdumpIndexPercentTrendPoint, type GscdumpIndexingDiagnosticsResponse, type GscdumpIndexingInspectRateLimited, type GscdumpIndexingInspectRequest, type GscdumpIndexingInspectResponse, type GscdumpIndexingInspectResult, type GscdumpIndexingResponse, type GscdumpIndexingTrendPoint, type GscdumpIndexingUrl, type GscdumpIndexingUrlStatus, type GscdumpIndexingUrlsResponse, type GscdumpInvisibleUrlRow, type GscdumpKeywordSparklinesParams, type GscdumpKeywordSparklinesResponse, type GscdumpMeta, type GscdumpOrphanPageRow, type GscdumpPerSitemapHistoryEntry, type GscdumpPermissionRecovery, type GscdumpQueryTrendParams, type GscdumpQueryTrendResponse, type GscdumpSiteRegistration, type GscdumpSiteReportResponse, type GscdumpSitemap, type GscdumpSitemapChangesResponse, type GscdumpSitemapHistory, type GscdumpSitemapsResponse, type GscdumpSyncJobItem, type GscdumpSyncJobStatus, type GscdumpSyncJobsQueueCounts, type GscdumpSyncJobsResponse, type GscdumpSyncProgressDateStatus, type GscdumpSyncProgressPhaseCounts, type GscdumpSyncProgressResponse, type GscdumpSyncProgressSite, type GscdumpSyncStatusResponse, type GscdumpTeamMemberRow, type GscdumpTeamRow, type GscdumpTopAssociationParams, type GscdumpTopAssociationResponse, type GscdumpTotals, type GscdumpUserMeResponse, type GscdumpUserRegistration, type GscdumpUserSettings, type GscdumpUserSite, type GscdumpUserStatus, type GscdumpUserTokenUpdate, type IndexingDiagnostics, type IndexingInspectRateLimit, type IndexingInspectRateLimited, type IndexingInspectRequest, type IndexingInspectResponse, type IndexingInspectResult, type IndexingIssue, type IndexingIssueSeverity, IndexingNextAction, IndexingStatus, type IndexingUrlRow, type IndexingUrlStatus, type IndexingUrlsParams, type IndexingUrlsResponse, type InspectionHistoryRecord, type InspectionHistoryResponse, type InspectionIndex, type InspectionRecordRaw, LifecycleError, LifecycleErrorCode, LifecycleProgress, LifecycleWebhookEnvelope, LifecycleWebhookEvent, type Metric, type PartnerClient, PartnerLifecycleAccount, PartnerLifecycleResponse, PartnerLifecycleSite, type PartnerRealtimeEvent, type PartnerRealtimeEventType, type PartnerRealtimeMessage, type PartnerWebhookData, type PartnerWebhookHeaders, PropertyNextAction, PropertyStatus, QuerySourceMode, type RealtimeAuthFailedEvent, type RealtimeAuthRequiredMessage, type RealtimeConnectedMessage, type RealtimeEnrichmentCompleteEvent, type RealtimeErrorMessage, type RealtimeJobFailedEvent, type RealtimeNeedsReauthEvent, type RealtimePongMessage, type RealtimeSiteAddedEvent, type RealtimeSiteRemovedEvent, type RealtimeSubscribedMessage, type RealtimeSyncCompleteEvent, type RealtimeSyncFailedEvent, type RealtimeSyncJobCompleteEvent, type RealtimeSyncProgressEvent, type RealtimeSyncSiteCompleteEvent, type RegisterPartnerSiteParams, type RegisterPartnerUserParams, type ResolvedParquetFile, type ResolvedTable, type RollupEnvelope, type Row, type ScheduleState, type SearchAppearanceResponse, type SearchAppearanceRow, type SearchTypeOptions, type ServerTailDirective, type SiteListItem, type SitemapAddedRow, type SitemapChangesResponse, type SitemapHistoryRecord, type SitemapHistoryResponse, type SitemapIndex, SitemapNextAction, type SitemapRemovedRow, SitemapStatus, type SourceInfoOptions, type SourceInfoResponse, type TableName, type TableSchema, type TenantCtx, type UpdatePartnerUserTokensParams, VALID_WEBHOOK_EVENTS, WEBHOOK_CONTRACT_VERSION, WEBHOOK_CONTRACT_VERSION_HEADER, WEBHOOK_DELIVERY_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, type WebhookEnvelope, type WebhookEventType, type WhoamiResponse, accountNextActions, accountStatuses, addPartnerTeamMemberSchema, analyticsNextActions, analyticsRoutes, analyticsStatuses, backfillRangeSchema, backfillResponseSchema, bindPartnerSiteTeamSchema, builderStateSchema, bulkRegisterPartnerSitesResponseSchema, bulkRegisterPartnerSitesSchema, canonicalWebhookEventTypeSchema, countriesResponseSchema, countryRowSchema, createPartnerTeamSchema, dataDetailOptionsSchema, dataQueryOptionsSchema, gscApiRangeSchema, gscComparisonFilterSchema, gscRowQueryMetaSchema, gscRowQueryResponseSchema, gscdumpAnalysisParamsSchema, gscdumpAnalysisPresetSchema, gscdumpAnalysisResponseSchema, gscdumpAnalysisSourcesResponseSchema, gscdumpAvailableSiteSchema, gscdumpCanonicalMismatchesResponseSchema, gscdumpDataDetailResponseSchema, gscdumpDataResponseSchema, gscdumpDataRowSchema, gscdumpDateRangeParamsSchema, gscdumpDeletePartnerUserResponseSchema, gscdumpHealthResponseSchema, gscdumpIndexPercentParamsSchema, gscdumpIndexPercentResponseSchema, gscdumpIndexingDiagnosticsResponseSchema, gscdumpIndexingResponseSchema, gscdumpIndexingUrlsResponseSchema, gscdumpKeywordSparklinesParamsSchema, gscdumpKeywordSparklinesResponseSchema, gscdumpMetaSchema, gscdumpPermissionRecoverySchema, gscdumpQueryTrendParamsSchema, gscdumpQueryTrendResponseSchema, gscdumpSiteRegistrationSchema, gscdumpSiteReportResponseSchema, gscdumpSitemapChangesResponseSchema, gscdumpSitemapsResponseSchema, gscdumpSyncJobsResponseSchema, gscdumpSyncProgressResponseSchema, gscdumpTeamMemberRowSchema, gscdumpTeamRoleSchema, gscdumpTeamRowSchema, gscdumpTopAssociationParamsSchema, gscdumpTopAssociationResponseSchema, gscdumpTotalsSchema, gscdumpUserMeResponseSchema, gscdumpUserRegistrationSchema, gscdumpUserSettingsSchema, gscdumpUserSiteSchema, gscdumpUserStatusSchema, hasOptionalIndexingScope, hasRequiredAnalyticsScope, indexingDiagnosticsSchema, indexingInspectAnyResponseSchema, indexingInspectRateLimitedSchema, indexingInspectRequestSchema, indexingInspectResponseSchema, indexingInspectResultSchema, indexingIssueSchema, indexingNextActions, indexingStatuses, indexingUrlRowSchema, indexingUrlStatusSchema, indexingUrlsParamsSchema, indexingUrlsResponseSchema, inspectionHistoryRecordSchema, inspectionHistoryResponseSchema, inspectionIndexSchema, inspectionRecordRawSchema, jobFailedWebhookPayloadSchema, lifecycleErrorCodes, lifecycleErrorSchema, lifecycleProgressSchema, lifecycleWebhookEvents, parseGrantedScopes, partnerEndpointSchemas, partnerLifecycleAccountSchema, partnerLifecycleResponseSchema, partnerLifecycleSiteSchema, partnerRealtimeEventSchema, partnerRoutes, partnerWebhookDataSchema, partnerWebhookEnvelopeSchema, propertyNextActions, propertyStatuses, querySourceModes, registerPartnerSiteSchema, registerPartnerUserSchema, rollupEnvelopeSchema, scheduleStateSchema, searchAppearanceResponseSchema, searchAppearanceRowSchema, searchTypeSchema, siteListItemSchema, sitemapChangesResponseSchema, sitemapHistoryRecordSchema, sitemapHistoryResponseSchema, sitemapIndexSchema, sitemapNextActions, sitemapStatuses, sourceInfoResponseSchema, updatePartnerUserTokensSchema, webhookEventTypeSchema, whoamiResponseSchema };
5220
+ export { AccountNextAction, AccountStatus, type AddPartnerTeamMemberParams, type AnalysisSourcesOptions, type AnalysisSourcesResponse, type AnalyticsClient, AnalyticsNextAction, AnalyticsStatus, type BackfillRange, type BackfillResponse, type BindPartnerSiteTeamParams, type BuilderState, type BulkRegisterPartnerSiteResult, type BulkRegisterPartnerSitesParams, type BulkRegisterPartnerSitesResponse, CANONICAL_WEBHOOK_EVENTS, type CanonicalWebhookEventType, type ColumnDef, type ColumnType, type CountriesResponse, type CountryRow, type CreatePartnerTeamParams, type CreateWebhookEnvelopeOptions, type DataDetailOptions, type DataQueryOptions, type DeletePartnerUserResponse, type Dimension, type FileResolutionRequest, type FileResolutionResponse, type FileResolutionTable, type Filter, GSCDUMP_ONBOARDING_CONTRACT_VERSION, GSCDUMP_OPTIONAL_INDEXING_SCOPE, GSCDUMP_REQUIRED_ANALYTICS_SCOPE, GSCDUMP_WRITE_ANALYTICS_SCOPE, type Grain, type GscApiRange, type GscComparisonFilter, type GscRowQueryMeta, type GscRowQueryResponse, type GscSearchType, type GscdumpAnalysisParams, type GscdumpAnalysisPreset, type GscdumpAnalysisResponse, type GscdumpAnalysisSourcesResponse, type GscdumpAvailableSite, type GscdumpCanonicalMismatchRow, type GscdumpCanonicalMismatchesResponse, type GscdumpDataDetailResponse, type GscdumpDataResponse, type GscdumpDataRow, type GscdumpDateRangeParams, type GscdumpHealthResponse, type GscdumpIndexPercentResponse, type GscdumpIndexPercentSitemap, type GscdumpIndexPercentTrendPoint, type GscdumpIndexingDiagnosticsResponse, type GscdumpIndexingInspectRateLimited, type GscdumpIndexingInspectRequest, type GscdumpIndexingInspectResponse, type GscdumpIndexingInspectResult, type GscdumpIndexingResponse, type GscdumpIndexingTrendPoint, type GscdumpIndexingUrl, type GscdumpIndexingUrlStatus, type GscdumpIndexingUrlsResponse, type GscdumpInvisibleUrlRow, type GscdumpKeywordSparklinesParams, type GscdumpKeywordSparklinesResponse, type GscdumpMeta, type GscdumpOrphanPageRow, type GscdumpPerSitemapHistoryEntry, type GscdumpPermissionRecovery, type GscdumpQueryTrendParams, type GscdumpQueryTrendResponse, type GscdumpSiteRegistration, type GscdumpSiteReportResponse, type GscdumpSitemap, type GscdumpSitemapChangesResponse, type GscdumpSitemapHistory, type GscdumpSitemapsResponse, type GscdumpSyncJobItem, type GscdumpSyncJobStatus, type GscdumpSyncJobsQueueCounts, type GscdumpSyncJobsResponse, type GscdumpSyncProgressDateStatus, type GscdumpSyncProgressPhaseCounts, type GscdumpSyncProgressResponse, type GscdumpSyncProgressSite, type GscdumpSyncStatusResponse, type GscdumpTeamMemberRow, type GscdumpTeamRow, type GscdumpTopAssociationParams, type GscdumpTopAssociationResponse, type GscdumpTotals, type GscdumpUserMeResponse, type GscdumpUserRegistration, type GscdumpUserSettings, type GscdumpUserSite, type GscdumpUserStatus, type GscdumpUserTokenUpdate, type IndexingDiagnostics, type IndexingInspectRateLimit, type IndexingInspectRateLimited, type IndexingInspectRequest, type IndexingInspectResponse, type IndexingInspectResult, type IndexingIssue, type IndexingIssueSeverity, IndexingNextAction, IndexingStatus, type IndexingUrlRow, type IndexingUrlStatus, type IndexingUrlsParams, type IndexingUrlsResponse, type InspectionHistoryRecord, type InspectionHistoryResponse, type InspectionIndex, type InspectionRecordRaw, LifecycleError, LifecycleErrorCode, LifecycleProgress, LifecycleWebhookEnvelope, LifecycleWebhookEvent, type Metric, type PartnerClient, PartnerLifecycleAccount, PartnerLifecycleResponse, PartnerLifecycleSite, type PartnerRealtimeEvent, type PartnerRealtimeEventType, type PartnerRealtimeMessage, type PartnerWebhookData, type PartnerWebhookHeaders, PropertyNextAction, PropertyStatus, QuerySourceMode, type RealtimeAuthFailedEvent, type RealtimeAuthRequiredMessage, type RealtimeConnectedMessage, type RealtimeEnrichmentCompleteEvent, type RealtimeErrorMessage, type RealtimeJobFailedEvent, type RealtimeNeedsReauthEvent, type RealtimePongMessage, type RealtimeSiteAddedEvent, type RealtimeSiteRemovedEvent, type RealtimeSubscribedMessage, type RealtimeSyncCompleteEvent, type RealtimeSyncFailedEvent, type RealtimeSyncJobCompleteEvent, type RealtimeSyncProgressEvent, type RealtimeSyncSiteCompleteEvent, type RegisterPartnerSiteParams, type RegisterPartnerUserParams, type ResolvedParquetFile, type ResolvedTable, type RollupEnvelope, type Row, type ScheduleState, type SearchAppearanceResponse, type SearchAppearanceRow, type SearchTypeOptions, type ServerTailDirective, type SiteListItem, type SitemapAddedRow, type SitemapChangesResponse, type SitemapHistoryRecord, type SitemapHistoryResponse, type SitemapIndex, SitemapNextAction, type SitemapRemovedRow, SitemapStatus, type SourceInfoOptions, type SourceInfoResponse, type TableName, type TableSchema, type TenantCtx, type UpdatePartnerUserTokensParams, VALID_WEBHOOK_EVENTS, WEBHOOK_CONTRACT_VERSION, WEBHOOK_CONTRACT_VERSION_HEADER, WEBHOOK_DELIVERY_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, type WebhookEnvelope, type WebhookEventType, type WhoamiResponse, accountNextActions, accountStatuses, addPartnerTeamMemberSchema, analyticsNextActions, analyticsRoutes, analyticsStatuses, backfillRangeSchema, backfillResponseSchema, bindPartnerSiteTeamSchema, builderStateSchema, bulkRegisterPartnerSitesResponseSchema, bulkRegisterPartnerSitesSchema, canonicalWebhookEventTypeSchema, countriesResponseSchema, countryRowSchema, createPartnerTeamSchema, dataDetailOptionsSchema, dataQueryOptionsSchema, gscApiRangeSchema, gscComparisonFilterSchema, gscRowQueryMetaSchema, gscRowQueryResponseSchema, gscdumpAnalysisParamsSchema, gscdumpAnalysisPresetSchema, gscdumpAnalysisResponseSchema, gscdumpAnalysisSourcesResponseSchema, gscdumpAvailableSiteSchema, gscdumpCanonicalMismatchesResponseSchema, gscdumpDataDetailResponseSchema, gscdumpDataResponseSchema, gscdumpDataRowSchema, gscdumpDateRangeParamsSchema, gscdumpDeletePartnerUserResponseSchema, gscdumpHealthResponseSchema, gscdumpIndexPercentParamsSchema, gscdumpIndexPercentResponseSchema, gscdumpIndexingDiagnosticsResponseSchema, gscdumpIndexingResponseSchema, gscdumpIndexingUrlsResponseSchema, gscdumpKeywordSparklinesParamsSchema, gscdumpKeywordSparklinesResponseSchema, gscdumpMetaSchema, gscdumpPermissionRecoverySchema, gscdumpQueryTrendParamsSchema, gscdumpQueryTrendResponseSchema, gscdumpSiteRegistrationSchema, gscdumpSiteReportResponseSchema, gscdumpSitemapChangesResponseSchema, gscdumpSitemapsResponseSchema, gscdumpSyncJobsResponseSchema, gscdumpSyncProgressResponseSchema, gscdumpTeamMemberRowSchema, gscdumpTeamRoleSchema, gscdumpTeamRowSchema, gscdumpTopAssociationParamsSchema, gscdumpTopAssociationResponseSchema, gscdumpTotalsSchema, gscdumpUserMeResponseSchema, gscdumpUserRegistrationSchema, gscdumpUserSettingsSchema, gscdumpUserSiteSchema, gscdumpUserStatusSchema, hasOptionalIndexingScope, hasRequiredAnalyticsScope, indexingDiagnosticsSchema, indexingInspectAnyResponseSchema, indexingInspectRateLimitedSchema, indexingInspectRequestSchema, indexingInspectResponseSchema, indexingInspectResultSchema, indexingIssueSchema, indexingNextActions, indexingStatuses, indexingUrlRowSchema, indexingUrlStatusSchema, indexingUrlsParamsSchema, indexingUrlsResponseSchema, inspectionHistoryRecordSchema, inspectionHistoryResponseSchema, inspectionIndexSchema, inspectionRecordRawSchema, jobFailedWebhookPayloadSchema, lifecycleErrorCodes, lifecycleErrorSchema, lifecycleProgressSchema, lifecycleWebhookEvents, parseGrantedScopes, partnerEndpointSchemas, partnerLifecycleAccountSchema, partnerLifecycleResponseSchema, partnerLifecycleSiteSchema, partnerRealtimeEventSchema, partnerRoutes, partnerWebhookDataSchema, partnerWebhookEnvelopeSchema, propertyNextActions, propertyStatuses, querySourceModes, registerPartnerSiteSchema, registerPartnerUserSchema, rollupEnvelopeSchema, scheduleStateSchema, searchAppearanceResponseSchema, searchAppearanceRowSchema, searchTypeSchema, siteListItemSchema, sitemapChangesResponseSchema, sitemapHistoryRecordSchema, sitemapHistoryResponseSchema, sitemapIndexSchema, sitemapNextActions, sitemapStatuses, sourceInfoResponseSchema, updatePartnerUserTokensSchema, webhookEventTypeSchema, whoamiResponseSchema };
package/dist/index.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
  const GSCDUMP_ONBOARDING_CONTRACT_VERSION = "2026-05-11";
3
3
  const GSCDUMP_REQUIRED_ANALYTICS_SCOPE = "https://www.googleapis.com/auth/webmasters.readonly";
4
+ const GSCDUMP_WRITE_ANALYTICS_SCOPE = "https://www.googleapis.com/auth/webmasters";
4
5
  const GSCDUMP_OPTIONAL_INDEXING_SCOPE = "https://www.googleapis.com/auth/indexing";
5
6
  const accountStatuses = [
6
7
  "disconnected",
@@ -115,7 +116,8 @@ function parseGrantedScopes(scopes) {
115
116
  return (scopes ?? "").split(/\s+/).map((s) => s.trim()).filter(Boolean);
116
117
  }
117
118
  function hasRequiredAnalyticsScope(scopes) {
118
- return (Array.isArray(scopes) ? scopes : parseGrantedScopes(scopes)).includes(GSCDUMP_REQUIRED_ANALYTICS_SCOPE);
119
+ const granted = Array.isArray(scopes) ? scopes : parseGrantedScopes(scopes);
120
+ return granted.includes("https://www.googleapis.com/auth/webmasters.readonly") || granted.includes("https://www.googleapis.com/auth/webmasters");
119
121
  }
120
122
  function hasOptionalIndexingScope(scopes) {
121
123
  return (Array.isArray(scopes) ? scopes : parseGrantedScopes(scopes)).includes(GSCDUMP_OPTIONAL_INDEXING_SCOPE);
@@ -1078,14 +1080,16 @@ const gscdumpAnalysisSourcesResponseSchema = z.object({
1078
1080
  const gscdumpKeywordSparklinesParamsSchema = z.object({
1079
1081
  keywords: z.array(z.string()).min(1).max(20),
1080
1082
  startDate: z.string(),
1081
- endDate: z.string()
1083
+ endDate: z.string(),
1084
+ searchType: searchTypeSchema.optional()
1082
1085
  });
1083
1086
  const gscdumpKeywordSparklinesResponseSchema = z.object({ sparklines: z.record(z.string(), z.array(z.number())) }).loose();
1084
1087
  const gscdumpQueryTrendParamsSchema = z.object({
1085
1088
  startDate: z.string(),
1086
1089
  endDate: z.string(),
1087
1090
  prevStartDate: z.string().optional(),
1088
- prevEndDate: z.string().optional()
1091
+ prevEndDate: z.string().optional(),
1092
+ searchType: searchTypeSchema.optional()
1089
1093
  });
1090
1094
  const gscdumpQueryTrendResponseSchema = z.object({
1091
1095
  daily: z.array(z.object({
@@ -1454,4 +1458,4 @@ const partnerEndpointSchemas = {
1454
1458
  realtimeEvent: { message: partnerRealtimeEventSchema },
1455
1459
  webhook: { message: partnerWebhookEnvelopeSchema }
1456
1460
  };
1457
- export { CANONICAL_WEBHOOK_EVENTS, GSCDUMP_ONBOARDING_CONTRACT_VERSION, GSCDUMP_OPTIONAL_INDEXING_SCOPE, GSCDUMP_REQUIRED_ANALYTICS_SCOPE, VALID_WEBHOOK_EVENTS, WEBHOOK_CONTRACT_VERSION, WEBHOOK_CONTRACT_VERSION_HEADER, WEBHOOK_DELIVERY_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, accountNextActions, accountStatuses, addPartnerTeamMemberSchema, analyticsNextActions, analyticsRoutes, analyticsStatuses, backfillRangeSchema, backfillResponseSchema, bindPartnerSiteTeamSchema, builderStateSchema, bulkRegisterPartnerSitesResponseSchema, bulkRegisterPartnerSitesSchema, canonicalWebhookEventTypeSchema, countriesResponseSchema, countryRowSchema, createPartnerTeamSchema, dataDetailOptionsSchema, dataQueryOptionsSchema, gscApiRangeSchema, gscComparisonFilterSchema, gscRowQueryMetaSchema, gscRowQueryResponseSchema, gscdumpAnalysisParamsSchema, gscdumpAnalysisPresetSchema, gscdumpAnalysisResponseSchema, gscdumpAnalysisSourcesResponseSchema, gscdumpAvailableSiteSchema, gscdumpCanonicalMismatchesResponseSchema, gscdumpDataDetailResponseSchema, gscdumpDataResponseSchema, gscdumpDataRowSchema, gscdumpDateRangeParamsSchema, gscdumpDeletePartnerUserResponseSchema, gscdumpHealthResponseSchema, gscdumpIndexPercentParamsSchema, gscdumpIndexPercentResponseSchema, gscdumpIndexingDiagnosticsResponseSchema, gscdumpIndexingResponseSchema, gscdumpIndexingUrlsResponseSchema, gscdumpKeywordSparklinesParamsSchema, gscdumpKeywordSparklinesResponseSchema, gscdumpMetaSchema, gscdumpPermissionRecoverySchema, gscdumpQueryTrendParamsSchema, gscdumpQueryTrendResponseSchema, gscdumpSiteRegistrationSchema, gscdumpSiteReportResponseSchema, gscdumpSitemapChangesResponseSchema, gscdumpSitemapsResponseSchema, gscdumpSyncJobsResponseSchema, gscdumpSyncProgressResponseSchema, gscdumpTeamMemberRowSchema, gscdumpTeamRoleSchema, gscdumpTeamRowSchema, gscdumpTopAssociationParamsSchema, gscdumpTopAssociationResponseSchema, gscdumpTotalsSchema, gscdumpUserMeResponseSchema, gscdumpUserRegistrationSchema, gscdumpUserSettingsSchema, gscdumpUserSiteSchema, gscdumpUserStatusSchema, hasOptionalIndexingScope, hasRequiredAnalyticsScope, indexingDiagnosticsSchema, indexingInspectAnyResponseSchema, indexingInspectRateLimitedSchema, indexingInspectRequestSchema, indexingInspectResponseSchema, indexingInspectResultSchema, indexingIssueSchema, indexingNextActions, indexingStatuses, indexingUrlRowSchema, indexingUrlStatusSchema, indexingUrlsParamsSchema, indexingUrlsResponseSchema, inspectionHistoryRecordSchema, inspectionHistoryResponseSchema, inspectionIndexSchema, inspectionRecordRawSchema, jobFailedWebhookPayloadSchema, lifecycleErrorCodes, lifecycleErrorSchema, lifecycleProgressSchema, lifecycleWebhookEvents, parseGrantedScopes, partnerEndpointSchemas, partnerLifecycleAccountSchema, partnerLifecycleResponseSchema, partnerLifecycleSiteSchema, partnerRealtimeEventSchema, partnerRoutes, partnerWebhookDataSchema, partnerWebhookEnvelopeSchema, propertyNextActions, propertyStatuses, querySourceModes, registerPartnerSiteSchema, registerPartnerUserSchema, rollupEnvelopeSchema, scheduleStateSchema, searchAppearanceResponseSchema, searchAppearanceRowSchema, searchTypeSchema, siteListItemSchema, sitemapChangesResponseSchema, sitemapHistoryRecordSchema, sitemapHistoryResponseSchema, sitemapIndexSchema, sitemapNextActions, sitemapStatuses, sourceInfoResponseSchema, updatePartnerUserTokensSchema, webhookEventTypeSchema, whoamiResponseSchema };
1461
+ export { CANONICAL_WEBHOOK_EVENTS, GSCDUMP_ONBOARDING_CONTRACT_VERSION, GSCDUMP_OPTIONAL_INDEXING_SCOPE, GSCDUMP_REQUIRED_ANALYTICS_SCOPE, GSCDUMP_WRITE_ANALYTICS_SCOPE, VALID_WEBHOOK_EVENTS, WEBHOOK_CONTRACT_VERSION, WEBHOOK_CONTRACT_VERSION_HEADER, WEBHOOK_DELIVERY_HEADER, WEBHOOK_EVENT_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, accountNextActions, accountStatuses, addPartnerTeamMemberSchema, analyticsNextActions, analyticsRoutes, analyticsStatuses, backfillRangeSchema, backfillResponseSchema, bindPartnerSiteTeamSchema, builderStateSchema, bulkRegisterPartnerSitesResponseSchema, bulkRegisterPartnerSitesSchema, canonicalWebhookEventTypeSchema, countriesResponseSchema, countryRowSchema, createPartnerTeamSchema, dataDetailOptionsSchema, dataQueryOptionsSchema, gscApiRangeSchema, gscComparisonFilterSchema, gscRowQueryMetaSchema, gscRowQueryResponseSchema, gscdumpAnalysisParamsSchema, gscdumpAnalysisPresetSchema, gscdumpAnalysisResponseSchema, gscdumpAnalysisSourcesResponseSchema, gscdumpAvailableSiteSchema, gscdumpCanonicalMismatchesResponseSchema, gscdumpDataDetailResponseSchema, gscdumpDataResponseSchema, gscdumpDataRowSchema, gscdumpDateRangeParamsSchema, gscdumpDeletePartnerUserResponseSchema, gscdumpHealthResponseSchema, gscdumpIndexPercentParamsSchema, gscdumpIndexPercentResponseSchema, gscdumpIndexingDiagnosticsResponseSchema, gscdumpIndexingResponseSchema, gscdumpIndexingUrlsResponseSchema, gscdumpKeywordSparklinesParamsSchema, gscdumpKeywordSparklinesResponseSchema, gscdumpMetaSchema, gscdumpPermissionRecoverySchema, gscdumpQueryTrendParamsSchema, gscdumpQueryTrendResponseSchema, gscdumpSiteRegistrationSchema, gscdumpSiteReportResponseSchema, gscdumpSitemapChangesResponseSchema, gscdumpSitemapsResponseSchema, gscdumpSyncJobsResponseSchema, gscdumpSyncProgressResponseSchema, gscdumpTeamMemberRowSchema, gscdumpTeamRoleSchema, gscdumpTeamRowSchema, gscdumpTopAssociationParamsSchema, gscdumpTopAssociationResponseSchema, gscdumpTotalsSchema, gscdumpUserMeResponseSchema, gscdumpUserRegistrationSchema, gscdumpUserSettingsSchema, gscdumpUserSiteSchema, gscdumpUserStatusSchema, hasOptionalIndexingScope, hasRequiredAnalyticsScope, indexingDiagnosticsSchema, indexingInspectAnyResponseSchema, indexingInspectRateLimitedSchema, indexingInspectRequestSchema, indexingInspectResponseSchema, indexingInspectResultSchema, indexingIssueSchema, indexingNextActions, indexingStatuses, indexingUrlRowSchema, indexingUrlStatusSchema, indexingUrlsParamsSchema, indexingUrlsResponseSchema, inspectionHistoryRecordSchema, inspectionHistoryResponseSchema, inspectionIndexSchema, inspectionRecordRawSchema, jobFailedWebhookPayloadSchema, lifecycleErrorCodes, lifecycleErrorSchema, lifecycleProgressSchema, lifecycleWebhookEvents, parseGrantedScopes, partnerEndpointSchemas, partnerLifecycleAccountSchema, partnerLifecycleResponseSchema, partnerLifecycleSiteSchema, partnerRealtimeEventSchema, partnerRoutes, partnerWebhookDataSchema, partnerWebhookEnvelopeSchema, propertyNextActions, propertyStatuses, querySourceModes, registerPartnerSiteSchema, registerPartnerUserSchema, rollupEnvelopeSchema, scheduleStateSchema, searchAppearanceResponseSchema, searchAppearanceRowSchema, searchTypeSchema, siteListItemSchema, sitemapChangesResponseSchema, sitemapHistoryRecordSchema, sitemapHistoryResponseSchema, sitemapIndexSchema, sitemapNextActions, sitemapStatuses, sourceInfoResponseSchema, updatePartnerUserTokensSchema, webhookEventTypeSchema, whoamiResponseSchema };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gscdump/contracts",
3
3
  "type": "module",
4
- "version": "0.23.4",
4
+ "version": "0.24.0",
5
5
  "description": "Shared gscdump.com API, webhook, realtime, and lifecycle contracts.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",