gscdump 1.4.0 → 1.4.2
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/api/batch.d.mts +12 -0
- package/dist/api/batch.mjs +29 -0
- package/dist/api/indexing.d.mts +37 -0
- package/dist/api/indexing.mjs +25 -0
- package/dist/api/inspection.d.mts +89 -0
- package/dist/api/inspection.mjs +128 -0
- package/dist/api/oauth.d.mts +48 -0
- package/dist/api/oauth.mjs +154 -0
- package/dist/api/sites.d.mts +45 -0
- package/dist/api/sites.mjs +34 -0
- package/dist/api/verification.d.mts +43 -0
- package/dist/api/verification.mjs +89 -0
- package/dist/contracts.d.mts +46 -1
- package/dist/core/cli-format.mjs +9 -0
- package/dist/core/client.d.mts +122 -0
- package/dist/core/client.mjs +246 -0
- package/dist/core/errors.d.mts +66 -0
- package/dist/core/errors.mjs +207 -0
- package/dist/core/indexing-issues.d.mts +60 -0
- package/dist/core/indexing-issues.mjs +139 -0
- package/dist/core/property.d.mts +41 -0
- package/dist/core/property.mjs +74 -0
- package/dist/core/quota.d.mts +2 -0
- package/dist/core/quota.mjs +2 -0
- package/dist/core/result.d.mts +19 -1
- package/dist/core/scope-values.d.mts +7 -0
- package/dist/core/scope-values.mjs +15 -0
- package/dist/core/scopes.d.mts +5 -0
- package/dist/core/scopes.mjs +11 -0
- package/dist/core/site-url.d.mts +25 -0
- package/dist/core/site-url.mjs +30 -0
- package/dist/core/types.d.mts +201 -0
- package/dist/core/types.mjs +1 -0
- package/dist/dates.d.mts +2 -2
- package/dist/dates.mjs +2 -2
- package/dist/index.d.mts +20 -814
- package/dist/index.mjs +19 -1243
- package/dist/onboarding.d.mts +2 -0
- package/dist/onboarding.mjs +2 -0
- package/dist/{_chunks → query}/builder.d.mts +2 -2
- package/dist/query/builder.mjs +86 -0
- package/dist/query/columns.d.mts +15 -0
- package/dist/query/columns.mjs +23 -0
- package/dist/query/constants.d.mts +19 -0
- package/dist/query/constants.mjs +16 -0
- package/dist/query/errors.d.mts +85 -0
- package/dist/query/errors.mjs +141 -0
- package/dist/query/index.d.mts +9 -75
- package/dist/query/index.mjs +7 -230
- package/dist/query/operator-meta.mjs +41 -0
- package/dist/query/operators.d.mts +24 -0
- package/dist/query/operators.mjs +124 -0
- package/dist/query/plan.d.mts +92 -2
- package/dist/query/plan.mjs +3 -1
- package/dist/query/resolver.d.mts +40 -0
- package/dist/query/resolver.mjs +243 -0
- package/dist/{_chunks → query}/types.d.mts +3 -25
- package/dist/query/utils/countries.d.mts +7 -0
- package/dist/{_chunks/resolver.mjs → query/utils/countries.mjs} +1 -434
- package/dist/{_chunks → query/utils}/dayjs.mjs +1 -1
- package/dist/sitemap.d.mts +26 -0
- package/dist/sitemap.mjs +70 -0
- package/dist/url.d.mts +9 -0
- package/dist/url.mjs +6 -0
- package/package.json +2 -2
- package/dist/_chunks/contracts.d.mts +0 -47
- package/dist/_chunks/plan.d.mts +0 -175
- package/dist/_chunks/result.d.mts +0 -20
- /package/dist/{_chunks → core}/gsc-dates.d.mts +0 -0
- /package/dist/{_chunks → core}/gsc-dates.mjs +0 -0
- /package/dist/{_chunks → query/utils}/dayjs.d.mts +0 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/** Search Console property returned by the Sites resource. */
|
|
2
|
+
interface ApiSite {
|
|
3
|
+
permissionLevel?: string | null;
|
|
4
|
+
siteUrl?: string | null;
|
|
5
|
+
}
|
|
6
|
+
/** Per-content-type counts returned with a sitemap. */
|
|
7
|
+
interface ApiSitemapContent {
|
|
8
|
+
/** Deprecated by Google, retained because it can still appear on the wire. */
|
|
9
|
+
indexed?: string | null;
|
|
10
|
+
submitted?: string | null;
|
|
11
|
+
type?: string | null;
|
|
12
|
+
}
|
|
13
|
+
/** Sitemap returned by the Search Console Sitemaps resource. */
|
|
14
|
+
interface ApiSitemap {
|
|
15
|
+
contents?: ApiSitemapContent[];
|
|
16
|
+
errors?: string | null;
|
|
17
|
+
isPending?: boolean | null;
|
|
18
|
+
isSitemapsIndex?: boolean | null;
|
|
19
|
+
lastDownloaded?: string | null;
|
|
20
|
+
lastSubmitted?: string | null;
|
|
21
|
+
path?: string | null;
|
|
22
|
+
type?: string | null;
|
|
23
|
+
warnings?: string | null;
|
|
24
|
+
}
|
|
25
|
+
/** A Search Analytics dimension filter. */
|
|
26
|
+
interface DimensionFilter {
|
|
27
|
+
dimension?: string | null;
|
|
28
|
+
expression?: string | null;
|
|
29
|
+
operator?: string | null;
|
|
30
|
+
}
|
|
31
|
+
/** A group of Search Analytics dimension filters. */
|
|
32
|
+
interface DimensionFilterGroup {
|
|
33
|
+
filters?: DimensionFilter[];
|
|
34
|
+
groupType?: string | null;
|
|
35
|
+
}
|
|
36
|
+
/** Raw Search Analytics request accepted by Google's REST endpoint. */
|
|
37
|
+
interface SearchAnalyticsQuery {
|
|
38
|
+
aggregationType?: string | null;
|
|
39
|
+
dataState?: string | null;
|
|
40
|
+
dimensionFilterGroups?: DimensionFilterGroup[];
|
|
41
|
+
dimensions?: string[] | null;
|
|
42
|
+
endDate?: string | null;
|
|
43
|
+
rowLimit?: number | null;
|
|
44
|
+
searchType?: string | null;
|
|
45
|
+
startDate?: string | null;
|
|
46
|
+
startRow?: number | null;
|
|
47
|
+
type?: string | null;
|
|
48
|
+
}
|
|
49
|
+
/** Raw Search Analytics result row. */
|
|
50
|
+
interface DataRow {
|
|
51
|
+
clicks?: number | null;
|
|
52
|
+
ctr?: number | null;
|
|
53
|
+
impressions?: number | null;
|
|
54
|
+
keys?: string[] | null;
|
|
55
|
+
position?: number | null;
|
|
56
|
+
}
|
|
57
|
+
/** Completeness metadata returned with recent Search Analytics data. */
|
|
58
|
+
interface SearchAnalyticsMetadata {
|
|
59
|
+
firstIncompleteDate?: string | null;
|
|
60
|
+
firstIncompleteHour?: string | null;
|
|
61
|
+
/** Field name returned by the direct REST endpoint. */
|
|
62
|
+
first_incomplete_date?: string | null;
|
|
63
|
+
/** Field name returned by the direct REST endpoint. */
|
|
64
|
+
first_incomplete_hour?: string | null;
|
|
65
|
+
}
|
|
66
|
+
/** Raw Search Analytics response returned by Google's REST endpoint. */
|
|
67
|
+
interface SearchAnalyticsResponse {
|
|
68
|
+
metadata?: SearchAnalyticsMetadata;
|
|
69
|
+
responseAggregationType?: string | null;
|
|
70
|
+
rows?: DataRow[];
|
|
71
|
+
}
|
|
72
|
+
interface AmpIssue {
|
|
73
|
+
issueMessage?: string | null;
|
|
74
|
+
severity?: string | null;
|
|
75
|
+
}
|
|
76
|
+
interface AmpInspectionResult {
|
|
77
|
+
ampIndexStatusVerdict?: string | null;
|
|
78
|
+
ampUrl?: string | null;
|
|
79
|
+
indexingState?: string | null;
|
|
80
|
+
issues?: AmpIssue[];
|
|
81
|
+
lastCrawlTime?: string | null;
|
|
82
|
+
pageFetchState?: string | null;
|
|
83
|
+
robotsTxtState?: string | null;
|
|
84
|
+
verdict?: string | null;
|
|
85
|
+
}
|
|
86
|
+
interface IndexStatusResult {
|
|
87
|
+
coverageState?: string | null;
|
|
88
|
+
crawledAs?: string | null;
|
|
89
|
+
googleCanonical?: string | null;
|
|
90
|
+
indexingState?: string | null;
|
|
91
|
+
lastCrawlTime?: string | null;
|
|
92
|
+
pageFetchState?: string | null;
|
|
93
|
+
referringUrls?: string[] | null;
|
|
94
|
+
robotsTxtState?: string | null;
|
|
95
|
+
sitemap?: string[] | null;
|
|
96
|
+
userCanonical?: string | null;
|
|
97
|
+
verdict?: string | null;
|
|
98
|
+
}
|
|
99
|
+
interface MobileUsabilityIssue {
|
|
100
|
+
issueType?: string | null;
|
|
101
|
+
message?: string | null;
|
|
102
|
+
severity?: string | null;
|
|
103
|
+
}
|
|
104
|
+
interface MobileUsabilityResult {
|
|
105
|
+
issues?: MobileUsabilityIssue[];
|
|
106
|
+
verdict?: string | null;
|
|
107
|
+
}
|
|
108
|
+
interface RichResultsIssue {
|
|
109
|
+
issueMessage?: string | null;
|
|
110
|
+
severity?: string | null;
|
|
111
|
+
}
|
|
112
|
+
interface RichResultsItem {
|
|
113
|
+
issues?: RichResultsIssue[];
|
|
114
|
+
name?: string | null;
|
|
115
|
+
}
|
|
116
|
+
interface RichResultsDetectedItem {
|
|
117
|
+
items?: RichResultsItem[];
|
|
118
|
+
richResultType?: string | null;
|
|
119
|
+
}
|
|
120
|
+
interface RichResultsResult {
|
|
121
|
+
detectedItems?: RichResultsDetectedItem[];
|
|
122
|
+
verdict?: string | null;
|
|
123
|
+
}
|
|
124
|
+
/** URL inspection payload returned by Search Console. */
|
|
125
|
+
interface UrlInspectionResult {
|
|
126
|
+
ampResult?: AmpInspectionResult;
|
|
127
|
+
indexStatusResult?: IndexStatusResult;
|
|
128
|
+
inspectionResultLink?: string | null;
|
|
129
|
+
mobileUsabilityResult?: MobileUsabilityResult;
|
|
130
|
+
richResultsResult?: RichResultsResult;
|
|
131
|
+
}
|
|
132
|
+
interface InspectUrlIndexResponse {
|
|
133
|
+
inspectionResult?: UrlInspectionResult;
|
|
134
|
+
}
|
|
135
|
+
/** A single Indexing API notification. */
|
|
136
|
+
interface UrlNotification {
|
|
137
|
+
notifyTime?: string | null;
|
|
138
|
+
type?: string | null;
|
|
139
|
+
url?: string | null;
|
|
140
|
+
}
|
|
141
|
+
/** Latest Indexing API notifications recorded for a URL. */
|
|
142
|
+
interface UrlNotificationMetadata {
|
|
143
|
+
latestRemove?: UrlNotification;
|
|
144
|
+
latestUpdate?: UrlNotification;
|
|
145
|
+
url?: string | null;
|
|
146
|
+
}
|
|
147
|
+
interface PublishUrlNotificationResponse {
|
|
148
|
+
urlNotificationMetadata?: UrlNotificationMetadata;
|
|
149
|
+
}
|
|
150
|
+
type RequiredNonNullable<T> = Required<Exclude<T, null | undefined>>;
|
|
151
|
+
interface Site extends Required<Omit<ApiSite, 'siteUrl'>> {
|
|
152
|
+
siteUrl: string;
|
|
153
|
+
}
|
|
154
|
+
interface Period {
|
|
155
|
+
start: Date | string;
|
|
156
|
+
end: Date | string;
|
|
157
|
+
}
|
|
158
|
+
interface ResolvedAnalyticsRange {
|
|
159
|
+
period: Period;
|
|
160
|
+
prevPeriod?: Period;
|
|
161
|
+
}
|
|
162
|
+
interface SiteAnalytics {
|
|
163
|
+
analytics: {
|
|
164
|
+
period: {
|
|
165
|
+
totalClicks: number;
|
|
166
|
+
totalImpressions: number;
|
|
167
|
+
};
|
|
168
|
+
prevPeriod: {
|
|
169
|
+
totalClicks: number;
|
|
170
|
+
totalImpressions: number;
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
sitemaps: ApiSitemap[];
|
|
174
|
+
indexedUrls: string[];
|
|
175
|
+
period: {
|
|
176
|
+
url: string;
|
|
177
|
+
clicks: number;
|
|
178
|
+
clicksPercent: number;
|
|
179
|
+
prevClicks: number;
|
|
180
|
+
impressions: number;
|
|
181
|
+
impressionsPercent: number;
|
|
182
|
+
prevImpressions: number;
|
|
183
|
+
}[];
|
|
184
|
+
keywords: {
|
|
185
|
+
keyword: string;
|
|
186
|
+
position: number;
|
|
187
|
+
prevPosition: number;
|
|
188
|
+
positionPercent: number;
|
|
189
|
+
ctr: number;
|
|
190
|
+
ctrPercent: number;
|
|
191
|
+
prevCtr: number;
|
|
192
|
+
clicks: number;
|
|
193
|
+
}[];
|
|
194
|
+
graph: {
|
|
195
|
+
keys?: undefined;
|
|
196
|
+
time: string;
|
|
197
|
+
clicks: number;
|
|
198
|
+
impressions: number;
|
|
199
|
+
}[];
|
|
200
|
+
}
|
|
201
|
+
export { AmpInspectionResult, AmpIssue, ApiSite, ApiSitemap, ApiSitemapContent, DataRow, DimensionFilter, DimensionFilterGroup, IndexStatusResult, InspectUrlIndexResponse, MobileUsabilityIssue, MobileUsabilityResult, Period, PublishUrlNotificationResponse, RequiredNonNullable, ResolvedAnalyticsRange, RichResultsDetectedItem, RichResultsIssue, RichResultsItem, RichResultsResult, SearchAnalyticsMetadata, SearchAnalyticsQuery, SearchAnalyticsResponse, Site, SiteAnalytics, UrlInspectionResult, UrlNotification, UrlNotificationMetadata };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/dates.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DAYS_PER_RANGE, GSC_FINALIZED_LAG_DAYS, GSC_FRESHEST_LAG_DAYS, GSC_RETENTION_MONTHS, MS_PER_DAY, addDays, countDays, daysAgo, generateGscDateRange, getBackfillProgress, getDateRange, getFreshestGscDate, getLatestGscDate, getNextDate, getOldestGscDate, getPendingDates, getPstDate, groupIntoRanges, toIsoDate } from "./
|
|
2
|
-
import { currentPstDate, daysAgoPst } from "./
|
|
1
|
+
import { DAYS_PER_RANGE, GSC_FINALIZED_LAG_DAYS, GSC_FRESHEST_LAG_DAYS, GSC_RETENTION_MONTHS, MS_PER_DAY, addDays, countDays, daysAgo, generateGscDateRange, getBackfillProgress, getDateRange, getFreshestGscDate, getLatestGscDate, getNextDate, getOldestGscDate, getPendingDates, getPstDate, groupIntoRanges, toIsoDate } from "./core/gsc-dates.mjs";
|
|
2
|
+
import { currentPstDate, daysAgoPst } from "./query/utils/dayjs.mjs";
|
|
3
3
|
export { DAYS_PER_RANGE, GSC_FINALIZED_LAG_DAYS, GSC_FRESHEST_LAG_DAYS, GSC_RETENTION_MONTHS, MS_PER_DAY, addDays, countDays, currentPstDate, daysAgoPst, daysAgo as daysAgoUtc, generateGscDateRange, getBackfillProgress, getDateRange, getFreshestGscDate, getLatestGscDate, getNextDate, getOldestGscDate, getPendingDates, getPstDate, groupIntoRanges, toIsoDate };
|
package/dist/dates.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DAYS_PER_RANGE, GSC_FINALIZED_LAG_DAYS, GSC_FRESHEST_LAG_DAYS, GSC_RETENTION_MONTHS, MS_PER_DAY, addDays, countDays, daysAgo, generateGscDateRange, getBackfillProgress, getDateRange, getFreshestGscDate, getLatestGscDate, getNextDate, getOldestGscDate, getPendingDates, getPstDate, groupIntoRanges, toIsoDate } from "./
|
|
2
|
-
import { currentPstDate, daysAgoPst } from "./
|
|
1
|
+
import { DAYS_PER_RANGE, GSC_FINALIZED_LAG_DAYS, GSC_FRESHEST_LAG_DAYS, GSC_RETENTION_MONTHS, MS_PER_DAY, addDays, countDays, daysAgo, generateGscDateRange, getBackfillProgress, getDateRange, getFreshestGscDate, getLatestGscDate, getNextDate, getOldestGscDate, getPendingDates, getPstDate, groupIntoRanges, toIsoDate } from "./core/gsc-dates.mjs";
|
|
2
|
+
import { currentPstDate, daysAgoPst } from "./query/utils/dayjs.mjs";
|
|
3
3
|
export { DAYS_PER_RANGE, GSC_FINALIZED_LAG_DAYS, GSC_FRESHEST_LAG_DAYS, GSC_RETENTION_MONTHS, MS_PER_DAY, addDays, countDays, currentPstDate, daysAgoPst, daysAgo as daysAgoUtc, generateGscDateRange, getBackfillProgress, getDateRange, getFreshestGscDate, getLatestGscDate, getNextDate, getOldestGscDate, getPendingDates, getPstDate, groupIntoRanges, toIsoDate };
|