@maxim_mazurok/gapi.client.searchconsole-v1 0.0.20220806
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/index.d.ts +971 -0
- package/package.json +20 -0
- package/readme.md +118 -0
- package/tests.ts +115 -0
- package/tsconfig.json +18 -0
- package/tslint.json +6 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,971 @@
|
|
|
1
|
+
/* Type definitions for non-npm package Google Search Console API v1 0.0 */
|
|
2
|
+
// Project: https://developers.google.com/webmaster-tools/search-console-api/
|
|
3
|
+
// Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
|
|
4
|
+
// Nick Amoscato <https://github.com/namoscato>
|
|
5
|
+
// Declan Vong <https://github.com/declanvong>
|
|
6
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
7
|
+
// TypeScript Version: 2.8
|
|
8
|
+
|
|
9
|
+
// IMPORTANT
|
|
10
|
+
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
11
|
+
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
12
|
+
// Generated from: https://searchconsole.googleapis.com/$discovery/rest?version=v1
|
|
13
|
+
// Revision: 20220806
|
|
14
|
+
|
|
15
|
+
/// <reference types="gapi.client" />
|
|
16
|
+
|
|
17
|
+
declare namespace gapi.client {
|
|
18
|
+
/** Load Google Search Console API v1 */
|
|
19
|
+
function load(urlOrObject: "https://searchconsole.googleapis.com/$discovery/rest?version=v1"): Promise<void>;
|
|
20
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
21
|
+
function load(name: "searchconsole", version: "v1"): Promise<void>;
|
|
22
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
23
|
+
function load(name: "searchconsole", version: "v1", callback: () => any): void;
|
|
24
|
+
|
|
25
|
+
namespace searchconsole {
|
|
26
|
+
interface AmpInspectionResult {
|
|
27
|
+
/** Index status of the AMP URL. */
|
|
28
|
+
ampIndexStatusVerdict?: string;
|
|
29
|
+
/** URL of the AMP that was inspected. If the submitted URL is a desktop page that refers to an AMP version, the AMP version will be inspected. */
|
|
30
|
+
ampUrl?: string;
|
|
31
|
+
/** Whether or not the page blocks indexing through a noindex rule. */
|
|
32
|
+
indexingState?: string;
|
|
33
|
+
/** A list of zero or more AMP issues found for the inspected URL. */
|
|
34
|
+
issues?: AmpIssue[];
|
|
35
|
+
/** Last time this AMP version was crawled by Google. Absent if the URL was never crawled successfully. */
|
|
36
|
+
lastCrawlTime?: string;
|
|
37
|
+
/** Whether or not Google could fetch the AMP. */
|
|
38
|
+
pageFetchState?: string;
|
|
39
|
+
/** Whether or not the page is blocked to Google by a robots.txt rule. */
|
|
40
|
+
robotsTxtState?: string;
|
|
41
|
+
/** The status of the most severe error on the page. If a page has both warnings and errors, the page status is error. Error status means the page cannot be shown in Search results. */
|
|
42
|
+
verdict?: string;
|
|
43
|
+
}
|
|
44
|
+
interface AmpIssue {
|
|
45
|
+
/** Brief description of this issue. */
|
|
46
|
+
issueMessage?: string;
|
|
47
|
+
/** Severity of this issue: WARNING or ERROR. */
|
|
48
|
+
severity?: string;
|
|
49
|
+
}
|
|
50
|
+
interface ApiDataRow {
|
|
51
|
+
clicks?: number;
|
|
52
|
+
ctr?: number;
|
|
53
|
+
impressions?: number;
|
|
54
|
+
keys?: string[];
|
|
55
|
+
position?: number;
|
|
56
|
+
}
|
|
57
|
+
interface ApiDimensionFilter {
|
|
58
|
+
dimension?: string;
|
|
59
|
+
expression?: string;
|
|
60
|
+
operator?: string;
|
|
61
|
+
}
|
|
62
|
+
interface ApiDimensionFilterGroup {
|
|
63
|
+
filters?: ApiDimensionFilter[];
|
|
64
|
+
groupType?: string;
|
|
65
|
+
}
|
|
66
|
+
interface BlockedResource {
|
|
67
|
+
/** URL of the blocked resource. */
|
|
68
|
+
url?: string;
|
|
69
|
+
}
|
|
70
|
+
interface DetectedItems {
|
|
71
|
+
/** List of Rich Results items. */
|
|
72
|
+
items?: Item[];
|
|
73
|
+
/** Rich Results type */
|
|
74
|
+
richResultType?: string;
|
|
75
|
+
}
|
|
76
|
+
interface Image {
|
|
77
|
+
/** Image data in format determined by the mime type. Currently, the format will always be "image/png", but this might change in the future. */
|
|
78
|
+
data?: string;
|
|
79
|
+
/** The mime-type of the image data. */
|
|
80
|
+
mimeType?: string;
|
|
81
|
+
}
|
|
82
|
+
interface IndexStatusInspectionResult {
|
|
83
|
+
/** Could Google find and index the page. More details about page indexing appear in 'indexing_state'. */
|
|
84
|
+
coverageState?: string;
|
|
85
|
+
/** Primary crawler that was used by Google to crawl your site. */
|
|
86
|
+
crawledAs?: string;
|
|
87
|
+
/** The URL of the page that Google selected as canonical. If the page was not indexed, this field is absent. */
|
|
88
|
+
googleCanonical?: string;
|
|
89
|
+
/** Whether or not the page blocks indexing through a noindex rule. */
|
|
90
|
+
indexingState?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Last time this URL was crawled by Google using the [primary crawler](https://support.google.com/webmasters/answer/7440203#primary_crawler). Absent if the URL was never crawled
|
|
93
|
+
* successfully.
|
|
94
|
+
*/
|
|
95
|
+
lastCrawlTime?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Whether or not Google could retrieve the page from your server. Equivalent to ["page fetch"](https://support.google.com/webmasters/answer/9012289#index_coverage) in the URL
|
|
98
|
+
* inspection report.
|
|
99
|
+
*/
|
|
100
|
+
pageFetchState?: string;
|
|
101
|
+
/** URLs that link to the inspected URL, directly and indirectly. */
|
|
102
|
+
referringUrls?: string[];
|
|
103
|
+
/** Whether or not the page is blocked to Google by a robots.txt rule. */
|
|
104
|
+
robotsTxtState?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Any sitemaps that this URL was listed in, as known by Google. Not guaranteed to be an exhaustive list, especially if Google did not discover this URL through a sitemap. Absent if no
|
|
107
|
+
* sitemaps were found.
|
|
108
|
+
*/
|
|
109
|
+
sitemap?: string[];
|
|
110
|
+
/**
|
|
111
|
+
* The URL that your page or site [declares as canonical](https://developers.google.com/search/docs/advanced/crawling/consolidate-duplicate-urls?#define-canonical). If you did not
|
|
112
|
+
* declare a canonical URL, this field is absent.
|
|
113
|
+
*/
|
|
114
|
+
userCanonical?: string;
|
|
115
|
+
/** High level verdict about whether the URL *is* indexed (indexed status), or *can be* indexed (live inspection). */
|
|
116
|
+
verdict?: string;
|
|
117
|
+
}
|
|
118
|
+
interface InspectUrlIndexRequest {
|
|
119
|
+
/** Required. URL to inspect. Must be under the property specified in "site_url". */
|
|
120
|
+
inspectionUrl?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Optional. An [IETF BCP-47](https://en.wikipedia.org/wiki/IETF_language_tag) language code representing the requested language for translated issue messages, e.g. "en-US", "or
|
|
123
|
+
* "de-CH". Default value is "en-US".
|
|
124
|
+
*/
|
|
125
|
+
languageCode?: string;
|
|
126
|
+
/** Required. The URL of the property as defined in Search Console. **Examples:** `http://www.example.com/` for a URL-prefix property, or `sc-domain:example.com` for a Domain property. */
|
|
127
|
+
siteUrl?: string;
|
|
128
|
+
}
|
|
129
|
+
interface InspectUrlIndexResponse {
|
|
130
|
+
/** URL inspection results. */
|
|
131
|
+
inspectionResult?: UrlInspectionResult;
|
|
132
|
+
}
|
|
133
|
+
interface Item {
|
|
134
|
+
/** A list of zero or more rich result issues found for this instance. */
|
|
135
|
+
issues?: RichResultsIssue[];
|
|
136
|
+
/** The user-provided name of this item. */
|
|
137
|
+
name?: string;
|
|
138
|
+
}
|
|
139
|
+
interface MobileFriendlyIssue {
|
|
140
|
+
/** Rule violated. */
|
|
141
|
+
rule?: string;
|
|
142
|
+
}
|
|
143
|
+
interface MobileUsabilityInspectionResult {
|
|
144
|
+
/** A list of zero or more mobile-usability issues detected for this URL. */
|
|
145
|
+
issues?: MobileUsabilityIssue[];
|
|
146
|
+
/** High-level mobile-usability inspection result for this URL. */
|
|
147
|
+
verdict?: string;
|
|
148
|
+
}
|
|
149
|
+
interface MobileUsabilityIssue {
|
|
150
|
+
/** Mobile-usability issue type. */
|
|
151
|
+
issueType?: string;
|
|
152
|
+
/** Additional information regarding the issue. */
|
|
153
|
+
message?: string;
|
|
154
|
+
/** Not returned; reserved for future use. */
|
|
155
|
+
severity?: string;
|
|
156
|
+
}
|
|
157
|
+
interface ResourceIssue {
|
|
158
|
+
/** Describes a blocked resource issue. */
|
|
159
|
+
blockedResource?: BlockedResource;
|
|
160
|
+
}
|
|
161
|
+
interface RichResultsInspectionResult {
|
|
162
|
+
/** A list of zero or more rich results detected on this page. Rich results that cannot even be parsed due to syntactic issues will not be listed here. */
|
|
163
|
+
detectedItems?: DetectedItems[];
|
|
164
|
+
/** High-level rich results inspection result for this URL. */
|
|
165
|
+
verdict?: string;
|
|
166
|
+
}
|
|
167
|
+
interface RichResultsIssue {
|
|
168
|
+
/** Rich Results issue type. */
|
|
169
|
+
issueMessage?: string;
|
|
170
|
+
/** Severity of this issue: WARNING, or ERROR. Items with an issue of status ERROR cannot appear with rich result features in Google Search results. */
|
|
171
|
+
severity?: string;
|
|
172
|
+
}
|
|
173
|
+
interface RunMobileFriendlyTestRequest {
|
|
174
|
+
/** Whether or not screenshot is requested. Default is false. */
|
|
175
|
+
requestScreenshot?: boolean;
|
|
176
|
+
/** URL for inspection. */
|
|
177
|
+
url?: string;
|
|
178
|
+
}
|
|
179
|
+
interface RunMobileFriendlyTestResponse {
|
|
180
|
+
/** Test verdict, whether the page is mobile friendly or not. */
|
|
181
|
+
mobileFriendliness?: string;
|
|
182
|
+
/** List of mobile-usability issues. */
|
|
183
|
+
mobileFriendlyIssues?: MobileFriendlyIssue[];
|
|
184
|
+
/** Information about embedded resources issues. */
|
|
185
|
+
resourceIssues?: ResourceIssue[];
|
|
186
|
+
/** Screenshot of the requested URL. */
|
|
187
|
+
screenshot?: Image;
|
|
188
|
+
/** Final state of the test, can be either complete or an error. */
|
|
189
|
+
testStatus?: TestStatus;
|
|
190
|
+
}
|
|
191
|
+
interface SearchAnalyticsQueryRequest {
|
|
192
|
+
/**
|
|
193
|
+
* [Optional; Default is \"auto\"] How data is aggregated. If aggregated by property, all data for the same property is aggregated; if aggregated by page, all data is aggregated by
|
|
194
|
+
* canonical URI. If you filter or group by page, choose AUTO; otherwise you can aggregate either by property or by page, depending on how you want your data calculated; see the help
|
|
195
|
+
* documentation to learn how data is calculated differently by site versus by page. **Note:** If you group or filter by page, you cannot aggregate by property. If you specify any
|
|
196
|
+
* value other than AUTO, the aggregation type in the result will match the requested type, or if you request an invalid type, you will get an error. The API will never change your
|
|
197
|
+
* aggregation type if the requested type is invalid.
|
|
198
|
+
*/
|
|
199
|
+
aggregationType?: string;
|
|
200
|
+
/** The data state to be fetched, can be full or all, the latter including full and partial data. */
|
|
201
|
+
dataState?: string;
|
|
202
|
+
/**
|
|
203
|
+
* [Optional] Zero or more filters to apply to the dimension grouping values; for example, 'query contains \"buy\"' to see only data where the query string contains the substring
|
|
204
|
+
* \"buy\" (not case-sensitive). You can filter by a dimension without grouping by it.
|
|
205
|
+
*/
|
|
206
|
+
dimensionFilterGroups?: ApiDimensionFilterGroup[];
|
|
207
|
+
/**
|
|
208
|
+
* [Optional] Zero or more dimensions to group results by. Dimensions are the group-by values in the Search Analytics page. Dimensions are combined to create a unique row key for each
|
|
209
|
+
* row. Results are grouped in the order that you supply these dimensions.
|
|
210
|
+
*/
|
|
211
|
+
dimensions?: string[];
|
|
212
|
+
/** [Required] End date of the requested date range, in YYYY-MM-DD format, in PST (UTC - 8:00). Must be greater than or equal to the start date. This value is included in the range. */
|
|
213
|
+
endDate?: string;
|
|
214
|
+
/** [Optional; Default is 1000] The maximum number of rows to return. Must be a number from 1 to 25,000 (inclusive). */
|
|
215
|
+
rowLimit?: number;
|
|
216
|
+
/** [Optional; Default is \"web\"] The search type to filter for. */
|
|
217
|
+
searchType?: string;
|
|
218
|
+
/** [Required] Start date of the requested date range, in YYYY-MM-DD format, in PST time (UTC - 8:00). Must be less than or equal to the end date. This value is included in the range. */
|
|
219
|
+
startDate?: string;
|
|
220
|
+
/** [Optional; Default is 0] Zero-based index of the first row in the response. Must be a non-negative number. */
|
|
221
|
+
startRow?: number;
|
|
222
|
+
/** Optional. [Optional; Default is \"web\"] Type of report: search type, or either Discover or Gnews. */
|
|
223
|
+
type?: string;
|
|
224
|
+
}
|
|
225
|
+
interface SearchAnalyticsQueryResponse {
|
|
226
|
+
/** How the results were aggregated. */
|
|
227
|
+
responseAggregationType?: string;
|
|
228
|
+
/** A list of rows grouped by the key values in the order given in the query. */
|
|
229
|
+
rows?: ApiDataRow[];
|
|
230
|
+
}
|
|
231
|
+
interface SitemapsListResponse {
|
|
232
|
+
/** Contains detailed information about a specific URL submitted as a [sitemap](https://support.google.com/webmasters/answer/156184). */
|
|
233
|
+
sitemap?: WmxSitemap[];
|
|
234
|
+
}
|
|
235
|
+
interface SitesListResponse {
|
|
236
|
+
/** Contains permission level information about a Search Console site. For more information, see [Permissions in Search Console](https://support.google.com/webmasters/answer/2451999). */
|
|
237
|
+
siteEntry?: WmxSite[];
|
|
238
|
+
}
|
|
239
|
+
interface TestStatus {
|
|
240
|
+
/** Error details if applicable. */
|
|
241
|
+
details?: string;
|
|
242
|
+
/** Status of the test. */
|
|
243
|
+
status?: string;
|
|
244
|
+
}
|
|
245
|
+
interface UrlInspectionResult {
|
|
246
|
+
/** Result of the AMP analysis. Absent if the page is not an AMP page. */
|
|
247
|
+
ampResult?: AmpInspectionResult;
|
|
248
|
+
/** Result of the index status analysis. */
|
|
249
|
+
indexStatusResult?: IndexStatusInspectionResult;
|
|
250
|
+
/** Link to Search Console URL inspection. */
|
|
251
|
+
inspectionResultLink?: string;
|
|
252
|
+
/** Result of the Mobile usability analysis. */
|
|
253
|
+
mobileUsabilityResult?: MobileUsabilityInspectionResult;
|
|
254
|
+
/** Result of the Rich Results analysis. Absent if there are no rich results found. */
|
|
255
|
+
richResultsResult?: RichResultsInspectionResult;
|
|
256
|
+
}
|
|
257
|
+
interface WmxSite {
|
|
258
|
+
/** The user's permission level for the site. */
|
|
259
|
+
permissionLevel?: string;
|
|
260
|
+
/** The URL of the site. */
|
|
261
|
+
siteUrl?: string;
|
|
262
|
+
}
|
|
263
|
+
interface WmxSitemap {
|
|
264
|
+
/** The various content types in the sitemap. */
|
|
265
|
+
contents?: WmxSitemapContent[];
|
|
266
|
+
/** Number of errors in the sitemap. These are issues with the sitemap itself that need to be fixed before it can be processed correctly. */
|
|
267
|
+
errors?: string;
|
|
268
|
+
/** If true, the sitemap has not been processed. */
|
|
269
|
+
isPending?: boolean;
|
|
270
|
+
/** If true, the sitemap is a collection of sitemaps. */
|
|
271
|
+
isSitemapsIndex?: boolean;
|
|
272
|
+
/** Date & time in which this sitemap was last downloaded. Date format is in RFC 3339 format (yyyy-mm-dd). */
|
|
273
|
+
lastDownloaded?: string;
|
|
274
|
+
/** Date & time in which this sitemap was submitted. Date format is in RFC 3339 format (yyyy-mm-dd). */
|
|
275
|
+
lastSubmitted?: string;
|
|
276
|
+
/** The url of the sitemap. */
|
|
277
|
+
path?: string;
|
|
278
|
+
/** The type of the sitemap. For example: `rssFeed`. */
|
|
279
|
+
type?: string;
|
|
280
|
+
/** Number of warnings for the sitemap. These are generally non-critical issues with URLs in the sitemaps. */
|
|
281
|
+
warnings?: string;
|
|
282
|
+
}
|
|
283
|
+
interface WmxSitemapContent {
|
|
284
|
+
/** *Deprecated; do not use.* */
|
|
285
|
+
indexed?: string;
|
|
286
|
+
/** The number of URLs in the sitemap (of the content type). */
|
|
287
|
+
submitted?: string;
|
|
288
|
+
/** The specific type of content in this sitemap. For example: `web`. */
|
|
289
|
+
type?: string;
|
|
290
|
+
}
|
|
291
|
+
interface IndexResource {
|
|
292
|
+
/** Index inspection. */
|
|
293
|
+
inspect(request: {
|
|
294
|
+
/** V1 error format. */
|
|
295
|
+
"$.xgafv"?: string;
|
|
296
|
+
/** OAuth access token. */
|
|
297
|
+
access_token?: string;
|
|
298
|
+
/** Data format for response. */
|
|
299
|
+
alt?: string;
|
|
300
|
+
/** JSONP */
|
|
301
|
+
callback?: string;
|
|
302
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
303
|
+
fields?: string;
|
|
304
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
305
|
+
key?: string;
|
|
306
|
+
/** OAuth 2.0 token for the current user. */
|
|
307
|
+
oauth_token?: string;
|
|
308
|
+
/** Returns response with indentations and line breaks. */
|
|
309
|
+
prettyPrint?: boolean;
|
|
310
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
311
|
+
quotaUser?: string;
|
|
312
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
313
|
+
upload_protocol?: string;
|
|
314
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
315
|
+
uploadType?: string;
|
|
316
|
+
/** Request body */
|
|
317
|
+
resource: InspectUrlIndexRequest;
|
|
318
|
+
}): Request<InspectUrlIndexResponse>;
|
|
319
|
+
inspect(request: {
|
|
320
|
+
/** V1 error format. */
|
|
321
|
+
"$.xgafv"?: string;
|
|
322
|
+
/** OAuth access token. */
|
|
323
|
+
access_token?: string;
|
|
324
|
+
/** Data format for response. */
|
|
325
|
+
alt?: string;
|
|
326
|
+
/** JSONP */
|
|
327
|
+
callback?: string;
|
|
328
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
329
|
+
fields?: string;
|
|
330
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
331
|
+
key?: string;
|
|
332
|
+
/** OAuth 2.0 token for the current user. */
|
|
333
|
+
oauth_token?: string;
|
|
334
|
+
/** Returns response with indentations and line breaks. */
|
|
335
|
+
prettyPrint?: boolean;
|
|
336
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
337
|
+
quotaUser?: string;
|
|
338
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
339
|
+
upload_protocol?: string;
|
|
340
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
341
|
+
uploadType?: string;
|
|
342
|
+
},
|
|
343
|
+
body: InspectUrlIndexRequest): Request<InspectUrlIndexResponse>;
|
|
344
|
+
}
|
|
345
|
+
interface UrlInspectionResource {
|
|
346
|
+
index: IndexResource;
|
|
347
|
+
}
|
|
348
|
+
interface MobileFriendlyTestResource {
|
|
349
|
+
/** Runs Mobile-Friendly Test for a given URL. */
|
|
350
|
+
run(request: {
|
|
351
|
+
/** V1 error format. */
|
|
352
|
+
"$.xgafv"?: string;
|
|
353
|
+
/** OAuth access token. */
|
|
354
|
+
access_token?: string;
|
|
355
|
+
/** Data format for response. */
|
|
356
|
+
alt?: string;
|
|
357
|
+
/** JSONP */
|
|
358
|
+
callback?: string;
|
|
359
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
360
|
+
fields?: string;
|
|
361
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
362
|
+
key?: string;
|
|
363
|
+
/** OAuth 2.0 token for the current user. */
|
|
364
|
+
oauth_token?: string;
|
|
365
|
+
/** Returns response with indentations and line breaks. */
|
|
366
|
+
prettyPrint?: boolean;
|
|
367
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
368
|
+
quotaUser?: string;
|
|
369
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
370
|
+
upload_protocol?: string;
|
|
371
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
372
|
+
uploadType?: string;
|
|
373
|
+
/** Request body */
|
|
374
|
+
resource: RunMobileFriendlyTestRequest;
|
|
375
|
+
}): Request<RunMobileFriendlyTestResponse>;
|
|
376
|
+
run(request: {
|
|
377
|
+
/** V1 error format. */
|
|
378
|
+
"$.xgafv"?: string;
|
|
379
|
+
/** OAuth access token. */
|
|
380
|
+
access_token?: string;
|
|
381
|
+
/** Data format for response. */
|
|
382
|
+
alt?: string;
|
|
383
|
+
/** JSONP */
|
|
384
|
+
callback?: string;
|
|
385
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
386
|
+
fields?: string;
|
|
387
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
388
|
+
key?: string;
|
|
389
|
+
/** OAuth 2.0 token for the current user. */
|
|
390
|
+
oauth_token?: string;
|
|
391
|
+
/** Returns response with indentations and line breaks. */
|
|
392
|
+
prettyPrint?: boolean;
|
|
393
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
394
|
+
quotaUser?: string;
|
|
395
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
396
|
+
upload_protocol?: string;
|
|
397
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
398
|
+
uploadType?: string;
|
|
399
|
+
},
|
|
400
|
+
body: RunMobileFriendlyTestRequest): Request<RunMobileFriendlyTestResponse>;
|
|
401
|
+
}
|
|
402
|
+
interface UrlTestingToolsResource {
|
|
403
|
+
mobileFriendlyTest: MobileFriendlyTestResource;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
const urlInspection: UrlInspectionResource;
|
|
407
|
+
|
|
408
|
+
const urlTestingTools: UrlTestingToolsResource;
|
|
409
|
+
}
|
|
410
|
+
namespace webmasters {
|
|
411
|
+
interface AmpInspectionResult {
|
|
412
|
+
/** Index status of the AMP URL. */
|
|
413
|
+
ampIndexStatusVerdict?: string;
|
|
414
|
+
/** URL of the AMP that was inspected. If the submitted URL is a desktop page that refers to an AMP version, the AMP version will be inspected. */
|
|
415
|
+
ampUrl?: string;
|
|
416
|
+
/** Whether or not the page blocks indexing through a noindex rule. */
|
|
417
|
+
indexingState?: string;
|
|
418
|
+
/** A list of zero or more AMP issues found for the inspected URL. */
|
|
419
|
+
issues?: AmpIssue[];
|
|
420
|
+
/** Last time this AMP version was crawled by Google. Absent if the URL was never crawled successfully. */
|
|
421
|
+
lastCrawlTime?: string;
|
|
422
|
+
/** Whether or not Google could fetch the AMP. */
|
|
423
|
+
pageFetchState?: string;
|
|
424
|
+
/** Whether or not the page is blocked to Google by a robots.txt rule. */
|
|
425
|
+
robotsTxtState?: string;
|
|
426
|
+
/** The status of the most severe error on the page. If a page has both warnings and errors, the page status is error. Error status means the page cannot be shown in Search results. */
|
|
427
|
+
verdict?: string;
|
|
428
|
+
}
|
|
429
|
+
interface AmpIssue {
|
|
430
|
+
/** Brief description of this issue. */
|
|
431
|
+
issueMessage?: string;
|
|
432
|
+
/** Severity of this issue: WARNING or ERROR. */
|
|
433
|
+
severity?: string;
|
|
434
|
+
}
|
|
435
|
+
interface ApiDataRow {
|
|
436
|
+
clicks?: number;
|
|
437
|
+
ctr?: number;
|
|
438
|
+
impressions?: number;
|
|
439
|
+
keys?: string[];
|
|
440
|
+
position?: number;
|
|
441
|
+
}
|
|
442
|
+
interface ApiDimensionFilter {
|
|
443
|
+
dimension?: string;
|
|
444
|
+
expression?: string;
|
|
445
|
+
operator?: string;
|
|
446
|
+
}
|
|
447
|
+
interface ApiDimensionFilterGroup {
|
|
448
|
+
filters?: ApiDimensionFilter[];
|
|
449
|
+
groupType?: string;
|
|
450
|
+
}
|
|
451
|
+
interface BlockedResource {
|
|
452
|
+
/** URL of the blocked resource. */
|
|
453
|
+
url?: string;
|
|
454
|
+
}
|
|
455
|
+
interface DetectedItems {
|
|
456
|
+
/** List of Rich Results items. */
|
|
457
|
+
items?: Item[];
|
|
458
|
+
/** Rich Results type */
|
|
459
|
+
richResultType?: string;
|
|
460
|
+
}
|
|
461
|
+
interface Image {
|
|
462
|
+
/** Image data in format determined by the mime type. Currently, the format will always be "image/png", but this might change in the future. */
|
|
463
|
+
data?: string;
|
|
464
|
+
/** The mime-type of the image data. */
|
|
465
|
+
mimeType?: string;
|
|
466
|
+
}
|
|
467
|
+
interface IndexStatusInspectionResult {
|
|
468
|
+
/** Could Google find and index the page. More details about page indexing appear in 'indexing_state'. */
|
|
469
|
+
coverageState?: string;
|
|
470
|
+
/** Primary crawler that was used by Google to crawl your site. */
|
|
471
|
+
crawledAs?: string;
|
|
472
|
+
/** The URL of the page that Google selected as canonical. If the page was not indexed, this field is absent. */
|
|
473
|
+
googleCanonical?: string;
|
|
474
|
+
/** Whether or not the page blocks indexing through a noindex rule. */
|
|
475
|
+
indexingState?: string;
|
|
476
|
+
/**
|
|
477
|
+
* Last time this URL was crawled by Google using the [primary crawler](https://support.google.com/webmasters/answer/7440203#primary_crawler). Absent if the URL was never crawled
|
|
478
|
+
* successfully.
|
|
479
|
+
*/
|
|
480
|
+
lastCrawlTime?: string;
|
|
481
|
+
/**
|
|
482
|
+
* Whether or not Google could retrieve the page from your server. Equivalent to ["page fetch"](https://support.google.com/webmasters/answer/9012289#index_coverage) in the URL
|
|
483
|
+
* inspection report.
|
|
484
|
+
*/
|
|
485
|
+
pageFetchState?: string;
|
|
486
|
+
/** URLs that link to the inspected URL, directly and indirectly. */
|
|
487
|
+
referringUrls?: string[];
|
|
488
|
+
/** Whether or not the page is blocked to Google by a robots.txt rule. */
|
|
489
|
+
robotsTxtState?: string;
|
|
490
|
+
/**
|
|
491
|
+
* Any sitemaps that this URL was listed in, as known by Google. Not guaranteed to be an exhaustive list, especially if Google did not discover this URL through a sitemap. Absent if no
|
|
492
|
+
* sitemaps were found.
|
|
493
|
+
*/
|
|
494
|
+
sitemap?: string[];
|
|
495
|
+
/**
|
|
496
|
+
* The URL that your page or site [declares as canonical](https://developers.google.com/search/docs/advanced/crawling/consolidate-duplicate-urls?#define-canonical). If you did not
|
|
497
|
+
* declare a canonical URL, this field is absent.
|
|
498
|
+
*/
|
|
499
|
+
userCanonical?: string;
|
|
500
|
+
/** High level verdict about whether the URL *is* indexed (indexed status), or *can be* indexed (live inspection). */
|
|
501
|
+
verdict?: string;
|
|
502
|
+
}
|
|
503
|
+
interface InspectUrlIndexRequest {
|
|
504
|
+
/** Required. URL to inspect. Must be under the property specified in "site_url". */
|
|
505
|
+
inspectionUrl?: string;
|
|
506
|
+
/**
|
|
507
|
+
* Optional. An [IETF BCP-47](https://en.wikipedia.org/wiki/IETF_language_tag) language code representing the requested language for translated issue messages, e.g. "en-US", "or
|
|
508
|
+
* "de-CH". Default value is "en-US".
|
|
509
|
+
*/
|
|
510
|
+
languageCode?: string;
|
|
511
|
+
/** Required. The URL of the property as defined in Search Console. **Examples:** `http://www.example.com/` for a URL-prefix property, or `sc-domain:example.com` for a Domain property. */
|
|
512
|
+
siteUrl?: string;
|
|
513
|
+
}
|
|
514
|
+
interface InspectUrlIndexResponse {
|
|
515
|
+
/** URL inspection results. */
|
|
516
|
+
inspectionResult?: UrlInspectionResult;
|
|
517
|
+
}
|
|
518
|
+
interface Item {
|
|
519
|
+
/** A list of zero or more rich result issues found for this instance. */
|
|
520
|
+
issues?: RichResultsIssue[];
|
|
521
|
+
/** The user-provided name of this item. */
|
|
522
|
+
name?: string;
|
|
523
|
+
}
|
|
524
|
+
interface MobileFriendlyIssue {
|
|
525
|
+
/** Rule violated. */
|
|
526
|
+
rule?: string;
|
|
527
|
+
}
|
|
528
|
+
interface MobileUsabilityInspectionResult {
|
|
529
|
+
/** A list of zero or more mobile-usability issues detected for this URL. */
|
|
530
|
+
issues?: MobileUsabilityIssue[];
|
|
531
|
+
/** High-level mobile-usability inspection result for this URL. */
|
|
532
|
+
verdict?: string;
|
|
533
|
+
}
|
|
534
|
+
interface MobileUsabilityIssue {
|
|
535
|
+
/** Mobile-usability issue type. */
|
|
536
|
+
issueType?: string;
|
|
537
|
+
/** Additional information regarding the issue. */
|
|
538
|
+
message?: string;
|
|
539
|
+
/** Not returned; reserved for future use. */
|
|
540
|
+
severity?: string;
|
|
541
|
+
}
|
|
542
|
+
interface ResourceIssue {
|
|
543
|
+
/** Describes a blocked resource issue. */
|
|
544
|
+
blockedResource?: BlockedResource;
|
|
545
|
+
}
|
|
546
|
+
interface RichResultsInspectionResult {
|
|
547
|
+
/** A list of zero or more rich results detected on this page. Rich results that cannot even be parsed due to syntactic issues will not be listed here. */
|
|
548
|
+
detectedItems?: DetectedItems[];
|
|
549
|
+
/** High-level rich results inspection result for this URL. */
|
|
550
|
+
verdict?: string;
|
|
551
|
+
}
|
|
552
|
+
interface RichResultsIssue {
|
|
553
|
+
/** Rich Results issue type. */
|
|
554
|
+
issueMessage?: string;
|
|
555
|
+
/** Severity of this issue: WARNING, or ERROR. Items with an issue of status ERROR cannot appear with rich result features in Google Search results. */
|
|
556
|
+
severity?: string;
|
|
557
|
+
}
|
|
558
|
+
interface RunMobileFriendlyTestRequest {
|
|
559
|
+
/** Whether or not screenshot is requested. Default is false. */
|
|
560
|
+
requestScreenshot?: boolean;
|
|
561
|
+
/** URL for inspection. */
|
|
562
|
+
url?: string;
|
|
563
|
+
}
|
|
564
|
+
interface RunMobileFriendlyTestResponse {
|
|
565
|
+
/** Test verdict, whether the page is mobile friendly or not. */
|
|
566
|
+
mobileFriendliness?: string;
|
|
567
|
+
/** List of mobile-usability issues. */
|
|
568
|
+
mobileFriendlyIssues?: MobileFriendlyIssue[];
|
|
569
|
+
/** Information about embedded resources issues. */
|
|
570
|
+
resourceIssues?: ResourceIssue[];
|
|
571
|
+
/** Screenshot of the requested URL. */
|
|
572
|
+
screenshot?: Image;
|
|
573
|
+
/** Final state of the test, can be either complete or an error. */
|
|
574
|
+
testStatus?: TestStatus;
|
|
575
|
+
}
|
|
576
|
+
interface SearchAnalyticsQueryRequest {
|
|
577
|
+
/**
|
|
578
|
+
* [Optional; Default is \"auto\"] How data is aggregated. If aggregated by property, all data for the same property is aggregated; if aggregated by page, all data is aggregated by
|
|
579
|
+
* canonical URI. If you filter or group by page, choose AUTO; otherwise you can aggregate either by property or by page, depending on how you want your data calculated; see the help
|
|
580
|
+
* documentation to learn how data is calculated differently by site versus by page. **Note:** If you group or filter by page, you cannot aggregate by property. If you specify any
|
|
581
|
+
* value other than AUTO, the aggregation type in the result will match the requested type, or if you request an invalid type, you will get an error. The API will never change your
|
|
582
|
+
* aggregation type if the requested type is invalid.
|
|
583
|
+
*/
|
|
584
|
+
aggregationType?: string;
|
|
585
|
+
/** The data state to be fetched, can be full or all, the latter including full and partial data. */
|
|
586
|
+
dataState?: string;
|
|
587
|
+
/**
|
|
588
|
+
* [Optional] Zero or more filters to apply to the dimension grouping values; for example, 'query contains \"buy\"' to see only data where the query string contains the substring
|
|
589
|
+
* \"buy\" (not case-sensitive). You can filter by a dimension without grouping by it.
|
|
590
|
+
*/
|
|
591
|
+
dimensionFilterGroups?: ApiDimensionFilterGroup[];
|
|
592
|
+
/**
|
|
593
|
+
* [Optional] Zero or more dimensions to group results by. Dimensions are the group-by values in the Search Analytics page. Dimensions are combined to create a unique row key for each
|
|
594
|
+
* row. Results are grouped in the order that you supply these dimensions.
|
|
595
|
+
*/
|
|
596
|
+
dimensions?: string[];
|
|
597
|
+
/** [Required] End date of the requested date range, in YYYY-MM-DD format, in PST (UTC - 8:00). Must be greater than or equal to the start date. This value is included in the range. */
|
|
598
|
+
endDate?: string;
|
|
599
|
+
/** [Optional; Default is 1000] The maximum number of rows to return. Must be a number from 1 to 25,000 (inclusive). */
|
|
600
|
+
rowLimit?: number;
|
|
601
|
+
/** [Optional; Default is \"web\"] The search type to filter for. */
|
|
602
|
+
searchType?: string;
|
|
603
|
+
/** [Required] Start date of the requested date range, in YYYY-MM-DD format, in PST time (UTC - 8:00). Must be less than or equal to the end date. This value is included in the range. */
|
|
604
|
+
startDate?: string;
|
|
605
|
+
/** [Optional; Default is 0] Zero-based index of the first row in the response. Must be a non-negative number. */
|
|
606
|
+
startRow?: number;
|
|
607
|
+
/** Optional. [Optional; Default is \"web\"] Type of report: search type, or either Discover or Gnews. */
|
|
608
|
+
type?: string;
|
|
609
|
+
}
|
|
610
|
+
interface SearchAnalyticsQueryResponse {
|
|
611
|
+
/** How the results were aggregated. */
|
|
612
|
+
responseAggregationType?: string;
|
|
613
|
+
/** A list of rows grouped by the key values in the order given in the query. */
|
|
614
|
+
rows?: ApiDataRow[];
|
|
615
|
+
}
|
|
616
|
+
interface SitemapsListResponse {
|
|
617
|
+
/** Contains detailed information about a specific URL submitted as a [sitemap](https://support.google.com/webmasters/answer/156184). */
|
|
618
|
+
sitemap?: WmxSitemap[];
|
|
619
|
+
}
|
|
620
|
+
interface SitesListResponse {
|
|
621
|
+
/** Contains permission level information about a Search Console site. For more information, see [Permissions in Search Console](https://support.google.com/webmasters/answer/2451999). */
|
|
622
|
+
siteEntry?: WmxSite[];
|
|
623
|
+
}
|
|
624
|
+
interface TestStatus {
|
|
625
|
+
/** Error details if applicable. */
|
|
626
|
+
details?: string;
|
|
627
|
+
/** Status of the test. */
|
|
628
|
+
status?: string;
|
|
629
|
+
}
|
|
630
|
+
interface UrlInspectionResult {
|
|
631
|
+
/** Result of the AMP analysis. Absent if the page is not an AMP page. */
|
|
632
|
+
ampResult?: AmpInspectionResult;
|
|
633
|
+
/** Result of the index status analysis. */
|
|
634
|
+
indexStatusResult?: IndexStatusInspectionResult;
|
|
635
|
+
/** Link to Search Console URL inspection. */
|
|
636
|
+
inspectionResultLink?: string;
|
|
637
|
+
/** Result of the Mobile usability analysis. */
|
|
638
|
+
mobileUsabilityResult?: MobileUsabilityInspectionResult;
|
|
639
|
+
/** Result of the Rich Results analysis. Absent if there are no rich results found. */
|
|
640
|
+
richResultsResult?: RichResultsInspectionResult;
|
|
641
|
+
}
|
|
642
|
+
interface WmxSite {
|
|
643
|
+
/** The user's permission level for the site. */
|
|
644
|
+
permissionLevel?: string;
|
|
645
|
+
/** The URL of the site. */
|
|
646
|
+
siteUrl?: string;
|
|
647
|
+
}
|
|
648
|
+
interface WmxSitemap {
|
|
649
|
+
/** The various content types in the sitemap. */
|
|
650
|
+
contents?: WmxSitemapContent[];
|
|
651
|
+
/** Number of errors in the sitemap. These are issues with the sitemap itself that need to be fixed before it can be processed correctly. */
|
|
652
|
+
errors?: string;
|
|
653
|
+
/** If true, the sitemap has not been processed. */
|
|
654
|
+
isPending?: boolean;
|
|
655
|
+
/** If true, the sitemap is a collection of sitemaps. */
|
|
656
|
+
isSitemapsIndex?: boolean;
|
|
657
|
+
/** Date & time in which this sitemap was last downloaded. Date format is in RFC 3339 format (yyyy-mm-dd). */
|
|
658
|
+
lastDownloaded?: string;
|
|
659
|
+
/** Date & time in which this sitemap was submitted. Date format is in RFC 3339 format (yyyy-mm-dd). */
|
|
660
|
+
lastSubmitted?: string;
|
|
661
|
+
/** The url of the sitemap. */
|
|
662
|
+
path?: string;
|
|
663
|
+
/** The type of the sitemap. For example: `rssFeed`. */
|
|
664
|
+
type?: string;
|
|
665
|
+
/** Number of warnings for the sitemap. These are generally non-critical issues with URLs in the sitemaps. */
|
|
666
|
+
warnings?: string;
|
|
667
|
+
}
|
|
668
|
+
interface WmxSitemapContent {
|
|
669
|
+
/** *Deprecated; do not use.* */
|
|
670
|
+
indexed?: string;
|
|
671
|
+
/** The number of URLs in the sitemap (of the content type). */
|
|
672
|
+
submitted?: string;
|
|
673
|
+
/** The specific type of content in this sitemap. For example: `web`. */
|
|
674
|
+
type?: string;
|
|
675
|
+
}
|
|
676
|
+
interface SearchanalyticsResource {
|
|
677
|
+
/**
|
|
678
|
+
* Query your data with filters and parameters that you define. Returns zero or more rows grouped by the row keys that you define. You must define a date range of one or more days.
|
|
679
|
+
* When date is one of the group by values, any days without data are omitted from the result list. If you need to know which days have data, issue a broad date range query grouped by
|
|
680
|
+
* date for any metric, and see which day rows are returned.
|
|
681
|
+
*/
|
|
682
|
+
query(request: {
|
|
683
|
+
/** V1 error format. */
|
|
684
|
+
"$.xgafv"?: string;
|
|
685
|
+
/** OAuth access token. */
|
|
686
|
+
access_token?: string;
|
|
687
|
+
/** Data format for response. */
|
|
688
|
+
alt?: string;
|
|
689
|
+
/** JSONP */
|
|
690
|
+
callback?: string;
|
|
691
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
692
|
+
fields?: string;
|
|
693
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
694
|
+
key?: string;
|
|
695
|
+
/** OAuth 2.0 token for the current user. */
|
|
696
|
+
oauth_token?: string;
|
|
697
|
+
/** Returns response with indentations and line breaks. */
|
|
698
|
+
prettyPrint?: boolean;
|
|
699
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
700
|
+
quotaUser?: string;
|
|
701
|
+
/** The site's URL, including protocol. For example: `http://www.example.com/`. */
|
|
702
|
+
siteUrl: string;
|
|
703
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
704
|
+
upload_protocol?: string;
|
|
705
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
706
|
+
uploadType?: string;
|
|
707
|
+
/** Request body */
|
|
708
|
+
resource: SearchAnalyticsQueryRequest;
|
|
709
|
+
}): Request<SearchAnalyticsQueryResponse>;
|
|
710
|
+
query(request: {
|
|
711
|
+
/** V1 error format. */
|
|
712
|
+
"$.xgafv"?: string;
|
|
713
|
+
/** OAuth access token. */
|
|
714
|
+
access_token?: string;
|
|
715
|
+
/** Data format for response. */
|
|
716
|
+
alt?: string;
|
|
717
|
+
/** JSONP */
|
|
718
|
+
callback?: string;
|
|
719
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
720
|
+
fields?: string;
|
|
721
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
722
|
+
key?: string;
|
|
723
|
+
/** OAuth 2.0 token for the current user. */
|
|
724
|
+
oauth_token?: string;
|
|
725
|
+
/** Returns response with indentations and line breaks. */
|
|
726
|
+
prettyPrint?: boolean;
|
|
727
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
728
|
+
quotaUser?: string;
|
|
729
|
+
/** The site's URL, including protocol. For example: `http://www.example.com/`. */
|
|
730
|
+
siteUrl: string;
|
|
731
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
732
|
+
upload_protocol?: string;
|
|
733
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
734
|
+
uploadType?: string;
|
|
735
|
+
},
|
|
736
|
+
body: SearchAnalyticsQueryRequest): Request<SearchAnalyticsQueryResponse>;
|
|
737
|
+
}
|
|
738
|
+
interface SitemapsResource {
|
|
739
|
+
/** Deletes a sitemap from the Sitemaps report. Does not stop Google from crawling this sitemap or the URLs that were previously crawled in the deleted sitemap. */
|
|
740
|
+
delete(request?: {
|
|
741
|
+
/** V1 error format. */
|
|
742
|
+
"$.xgafv"?: string;
|
|
743
|
+
/** OAuth access token. */
|
|
744
|
+
access_token?: string;
|
|
745
|
+
/** Data format for response. */
|
|
746
|
+
alt?: string;
|
|
747
|
+
/** JSONP */
|
|
748
|
+
callback?: string;
|
|
749
|
+
/** The URL of the actual sitemap. For example: `http://www.example.com/sitemap.xml`. */
|
|
750
|
+
feedpath: string;
|
|
751
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
752
|
+
fields?: string;
|
|
753
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
754
|
+
key?: string;
|
|
755
|
+
/** OAuth 2.0 token for the current user. */
|
|
756
|
+
oauth_token?: string;
|
|
757
|
+
/** Returns response with indentations and line breaks. */
|
|
758
|
+
prettyPrint?: boolean;
|
|
759
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
760
|
+
quotaUser?: string;
|
|
761
|
+
/** The site's URL, including protocol. For example: `http://www.example.com/`. */
|
|
762
|
+
siteUrl: string;
|
|
763
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
764
|
+
upload_protocol?: string;
|
|
765
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
766
|
+
uploadType?: string;
|
|
767
|
+
}): Request<void>;
|
|
768
|
+
/** Retrieves information about a specific sitemap. */
|
|
769
|
+
get(request?: {
|
|
770
|
+
/** V1 error format. */
|
|
771
|
+
"$.xgafv"?: string;
|
|
772
|
+
/** OAuth access token. */
|
|
773
|
+
access_token?: string;
|
|
774
|
+
/** Data format for response. */
|
|
775
|
+
alt?: string;
|
|
776
|
+
/** JSONP */
|
|
777
|
+
callback?: string;
|
|
778
|
+
/** The URL of the actual sitemap. For example: `http://www.example.com/sitemap.xml`. */
|
|
779
|
+
feedpath: string;
|
|
780
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
781
|
+
fields?: string;
|
|
782
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
783
|
+
key?: string;
|
|
784
|
+
/** OAuth 2.0 token for the current user. */
|
|
785
|
+
oauth_token?: string;
|
|
786
|
+
/** Returns response with indentations and line breaks. */
|
|
787
|
+
prettyPrint?: boolean;
|
|
788
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
789
|
+
quotaUser?: string;
|
|
790
|
+
/** The site's URL, including protocol. For example: `http://www.example.com/`. */
|
|
791
|
+
siteUrl: string;
|
|
792
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
793
|
+
upload_protocol?: string;
|
|
794
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
795
|
+
uploadType?: string;
|
|
796
|
+
}): Request<WmxSitemap>;
|
|
797
|
+
/** Lists the [sitemaps-entries](/webmaster-tools/v3/sitemaps) submitted for this site, or included in the sitemap index file (if `sitemapIndex` is specified in the request). */
|
|
798
|
+
list(request?: {
|
|
799
|
+
/** V1 error format. */
|
|
800
|
+
"$.xgafv"?: string;
|
|
801
|
+
/** OAuth access token. */
|
|
802
|
+
access_token?: string;
|
|
803
|
+
/** Data format for response. */
|
|
804
|
+
alt?: string;
|
|
805
|
+
/** JSONP */
|
|
806
|
+
callback?: string;
|
|
807
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
808
|
+
fields?: string;
|
|
809
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
810
|
+
key?: string;
|
|
811
|
+
/** OAuth 2.0 token for the current user. */
|
|
812
|
+
oauth_token?: string;
|
|
813
|
+
/** Returns response with indentations and line breaks. */
|
|
814
|
+
prettyPrint?: boolean;
|
|
815
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
816
|
+
quotaUser?: string;
|
|
817
|
+
/** A URL of a site's sitemap index. For example: `http://www.example.com/sitemapindex.xml`. */
|
|
818
|
+
sitemapIndex?: string;
|
|
819
|
+
/** The site's URL, including protocol. For example: `http://www.example.com/`. */
|
|
820
|
+
siteUrl: string;
|
|
821
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
822
|
+
upload_protocol?: string;
|
|
823
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
824
|
+
uploadType?: string;
|
|
825
|
+
}): Request<SitemapsListResponse>;
|
|
826
|
+
/** Submits a sitemap for a site. */
|
|
827
|
+
submit(request?: {
|
|
828
|
+
/** V1 error format. */
|
|
829
|
+
"$.xgafv"?: string;
|
|
830
|
+
/** OAuth access token. */
|
|
831
|
+
access_token?: string;
|
|
832
|
+
/** Data format for response. */
|
|
833
|
+
alt?: string;
|
|
834
|
+
/** JSONP */
|
|
835
|
+
callback?: string;
|
|
836
|
+
/** The URL of the actual sitemap. For example: `http://www.example.com/sitemap.xml`. */
|
|
837
|
+
feedpath: string;
|
|
838
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
839
|
+
fields?: string;
|
|
840
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
841
|
+
key?: string;
|
|
842
|
+
/** OAuth 2.0 token for the current user. */
|
|
843
|
+
oauth_token?: string;
|
|
844
|
+
/** Returns response with indentations and line breaks. */
|
|
845
|
+
prettyPrint?: boolean;
|
|
846
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
847
|
+
quotaUser?: string;
|
|
848
|
+
/** The site's URL, including protocol. For example: `http://www.example.com/`. */
|
|
849
|
+
siteUrl: string;
|
|
850
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
851
|
+
upload_protocol?: string;
|
|
852
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
853
|
+
uploadType?: string;
|
|
854
|
+
}): Request<void>;
|
|
855
|
+
}
|
|
856
|
+
interface SitesResource {
|
|
857
|
+
/** Adds a site to the set of the user's sites in Search Console. */
|
|
858
|
+
add(request?: {
|
|
859
|
+
/** V1 error format. */
|
|
860
|
+
"$.xgafv"?: string;
|
|
861
|
+
/** OAuth access token. */
|
|
862
|
+
access_token?: string;
|
|
863
|
+
/** Data format for response. */
|
|
864
|
+
alt?: string;
|
|
865
|
+
/** JSONP */
|
|
866
|
+
callback?: string;
|
|
867
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
868
|
+
fields?: string;
|
|
869
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
870
|
+
key?: string;
|
|
871
|
+
/** OAuth 2.0 token for the current user. */
|
|
872
|
+
oauth_token?: string;
|
|
873
|
+
/** Returns response with indentations and line breaks. */
|
|
874
|
+
prettyPrint?: boolean;
|
|
875
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
876
|
+
quotaUser?: string;
|
|
877
|
+
/** The URL of the site to add. */
|
|
878
|
+
siteUrl: string;
|
|
879
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
880
|
+
upload_protocol?: string;
|
|
881
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
882
|
+
uploadType?: string;
|
|
883
|
+
}): Request<void>;
|
|
884
|
+
/** Removes a site from the set of the user's Search Console sites. */
|
|
885
|
+
delete(request?: {
|
|
886
|
+
/** V1 error format. */
|
|
887
|
+
"$.xgafv"?: string;
|
|
888
|
+
/** OAuth access token. */
|
|
889
|
+
access_token?: string;
|
|
890
|
+
/** Data format for response. */
|
|
891
|
+
alt?: string;
|
|
892
|
+
/** JSONP */
|
|
893
|
+
callback?: string;
|
|
894
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
895
|
+
fields?: string;
|
|
896
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
897
|
+
key?: string;
|
|
898
|
+
/** OAuth 2.0 token for the current user. */
|
|
899
|
+
oauth_token?: string;
|
|
900
|
+
/** Returns response with indentations and line breaks. */
|
|
901
|
+
prettyPrint?: boolean;
|
|
902
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
903
|
+
quotaUser?: string;
|
|
904
|
+
/** The URI of the property as defined in Search Console. **Examples:** `http://www.example.com/` or `sc-domain:example.com`. */
|
|
905
|
+
siteUrl: string;
|
|
906
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
907
|
+
upload_protocol?: string;
|
|
908
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
909
|
+
uploadType?: string;
|
|
910
|
+
}): Request<void>;
|
|
911
|
+
/** Retrieves information about specific site. */
|
|
912
|
+
get(request?: {
|
|
913
|
+
/** V1 error format. */
|
|
914
|
+
"$.xgafv"?: string;
|
|
915
|
+
/** OAuth access token. */
|
|
916
|
+
access_token?: string;
|
|
917
|
+
/** Data format for response. */
|
|
918
|
+
alt?: string;
|
|
919
|
+
/** JSONP */
|
|
920
|
+
callback?: string;
|
|
921
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
922
|
+
fields?: string;
|
|
923
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
924
|
+
key?: string;
|
|
925
|
+
/** OAuth 2.0 token for the current user. */
|
|
926
|
+
oauth_token?: string;
|
|
927
|
+
/** Returns response with indentations and line breaks. */
|
|
928
|
+
prettyPrint?: boolean;
|
|
929
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
930
|
+
quotaUser?: string;
|
|
931
|
+
/** The URI of the property as defined in Search Console. **Examples:** `http://www.example.com/` or `sc-domain:example.com`. */
|
|
932
|
+
siteUrl: string;
|
|
933
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
934
|
+
upload_protocol?: string;
|
|
935
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
936
|
+
uploadType?: string;
|
|
937
|
+
}): Request<WmxSite>;
|
|
938
|
+
/** Lists the user's Search Console sites. */
|
|
939
|
+
list(request?: {
|
|
940
|
+
/** V1 error format. */
|
|
941
|
+
"$.xgafv"?: string;
|
|
942
|
+
/** OAuth access token. */
|
|
943
|
+
access_token?: string;
|
|
944
|
+
/** Data format for response. */
|
|
945
|
+
alt?: string;
|
|
946
|
+
/** JSONP */
|
|
947
|
+
callback?: string;
|
|
948
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
949
|
+
fields?: string;
|
|
950
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
951
|
+
key?: string;
|
|
952
|
+
/** OAuth 2.0 token for the current user. */
|
|
953
|
+
oauth_token?: string;
|
|
954
|
+
/** Returns response with indentations and line breaks. */
|
|
955
|
+
prettyPrint?: boolean;
|
|
956
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
957
|
+
quotaUser?: string;
|
|
958
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
959
|
+
upload_protocol?: string;
|
|
960
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
961
|
+
uploadType?: string;
|
|
962
|
+
}): Request<SitesListResponse>;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
const searchanalytics: SearchanalyticsResource;
|
|
966
|
+
|
|
967
|
+
const sitemaps: SitemapsResource;
|
|
968
|
+
|
|
969
|
+
const sites: SitesResource;
|
|
970
|
+
}
|
|
971
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@maxim_mazurok/gapi.client.searchconsole-v1",
|
|
3
|
+
"version": "0.0.20220806",
|
|
4
|
+
"description": "TypeScript typings for Google Search Console API v1",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": {
|
|
7
|
+
"email": "maxim@mazurok.com",
|
|
8
|
+
"name": "Maxim Mazurok",
|
|
9
|
+
"url": "https://maxim.mazurok.com"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
|
|
14
|
+
},
|
|
15
|
+
"types": "index.d.ts",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@types/gapi.client": "*",
|
|
18
|
+
"@types/gapi.client.discovery": "*"
|
|
19
|
+
}
|
|
20
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# TypeScript typings for Google Search Console API v1
|
|
2
|
+
|
|
3
|
+
The Search Console API provides access to both Search Console data (verified users only) and to public information on an URL basis (anyone)
|
|
4
|
+
For detailed description please check [documentation](https://developers.google.com/webmaster-tools/search-console-api/).
|
|
5
|
+
|
|
6
|
+
## Installing
|
|
7
|
+
|
|
8
|
+
Install typings for Google Search Console API:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
npm install @types/gapi.client.searchconsole-v1 --save-dev
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
You need to initialize Google API client in your code:
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
gapi.load('client', () => {
|
|
20
|
+
// now we can use gapi.client
|
|
21
|
+
// ...
|
|
22
|
+
});
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Then load api client wrapper:
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
gapi.client.load('https://searchconsole.googleapis.com/$discovery/rest?version=v1', () => {
|
|
29
|
+
// now we can use:
|
|
30
|
+
// gapi.client.searchconsole
|
|
31
|
+
// gapi.client.webmasters
|
|
32
|
+
});
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
// Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
|
|
37
|
+
gapi.client.load('searchconsole', 'v1', () => {
|
|
38
|
+
// now we can use:
|
|
39
|
+
// gapi.client.searchconsole
|
|
40
|
+
// gapi.client.webmasters
|
|
41
|
+
});
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Don't forget to authenticate your client before sending any request to resources:
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
// declare client_id registered in Google Developers Console
|
|
48
|
+
var client_id = '',
|
|
49
|
+
scope = [
|
|
50
|
+
// View and manage Search Console data for your verified sites
|
|
51
|
+
'https://www.googleapis.com/auth/webmasters',
|
|
52
|
+
|
|
53
|
+
// View Search Console data for your verified sites
|
|
54
|
+
'https://www.googleapis.com/auth/webmasters.readonly',
|
|
55
|
+
],
|
|
56
|
+
immediate = true;
|
|
57
|
+
// ...
|
|
58
|
+
|
|
59
|
+
gapi.auth.authorize(
|
|
60
|
+
{ client_id: client_id, scope: scope, immediate: immediate },
|
|
61
|
+
authResult => {
|
|
62
|
+
if (authResult && !authResult.error) {
|
|
63
|
+
/* handle successful authorization */
|
|
64
|
+
} else {
|
|
65
|
+
/* handle authorization error */
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
After that you can use Google Search Console API resources: <!-- TODO: make this work for multiple namespaces -->
|
|
71
|
+
|
|
72
|
+
```typescript
|
|
73
|
+
|
|
74
|
+
/*
|
|
75
|
+
Query your data with filters and parameters that you define. Returns zero or more rows grouped by the row keys that you define. You must define a date range of one or more days. When date is one of the group by values, any days without data are omitted from the result list. If you need to know which days have data, issue a broad date range query grouped by date for any metric, and see which day rows are returned.
|
|
76
|
+
*/
|
|
77
|
+
await gapi.client.webmasters.searchanalytics.query({ siteUrl: "siteUrl", });
|
|
78
|
+
|
|
79
|
+
/*
|
|
80
|
+
Deletes a sitemap from the Sitemaps report. Does not stop Google from crawling this sitemap or the URLs that were previously crawled in the deleted sitemap.
|
|
81
|
+
*/
|
|
82
|
+
await gapi.client.webmasters.sitemaps.delete({ feedpath: "feedpath", siteUrl: "siteUrl", });
|
|
83
|
+
|
|
84
|
+
/*
|
|
85
|
+
Retrieves information about a specific sitemap.
|
|
86
|
+
*/
|
|
87
|
+
await gapi.client.webmasters.sitemaps.get({ feedpath: "feedpath", siteUrl: "siteUrl", });
|
|
88
|
+
|
|
89
|
+
/*
|
|
90
|
+
Lists the [sitemaps-entries](/webmaster-tools/v3/sitemaps) submitted for this site, or included in the sitemap index file (if `sitemapIndex` is specified in the request).
|
|
91
|
+
*/
|
|
92
|
+
await gapi.client.webmasters.sitemaps.list({ siteUrl: "siteUrl", });
|
|
93
|
+
|
|
94
|
+
/*
|
|
95
|
+
Submits a sitemap for a site.
|
|
96
|
+
*/
|
|
97
|
+
await gapi.client.webmasters.sitemaps.submit({ feedpath: "feedpath", siteUrl: "siteUrl", });
|
|
98
|
+
|
|
99
|
+
/*
|
|
100
|
+
Adds a site to the set of the user's sites in Search Console.
|
|
101
|
+
*/
|
|
102
|
+
await gapi.client.webmasters.sites.add({ siteUrl: "siteUrl", });
|
|
103
|
+
|
|
104
|
+
/*
|
|
105
|
+
Removes a site from the set of the user's Search Console sites.
|
|
106
|
+
*/
|
|
107
|
+
await gapi.client.webmasters.sites.delete({ siteUrl: "siteUrl", });
|
|
108
|
+
|
|
109
|
+
/*
|
|
110
|
+
Retrieves information about specific site.
|
|
111
|
+
*/
|
|
112
|
+
await gapi.client.webmasters.sites.get({ siteUrl: "siteUrl", });
|
|
113
|
+
|
|
114
|
+
/*
|
|
115
|
+
Lists the user's Search Console sites.
|
|
116
|
+
*/
|
|
117
|
+
await gapi.client.webmasters.sites.list({ });
|
|
118
|
+
```
|
package/tests.ts
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/* This is stub file for gapi.client.searchconsole-v1 definition tests */
|
|
2
|
+
// IMPORTANT
|
|
3
|
+
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
4
|
+
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
5
|
+
|
|
6
|
+
// Revision: 20220806
|
|
7
|
+
|
|
8
|
+
gapi.load('client', async () => {
|
|
9
|
+
/** now we can use gapi.client */
|
|
10
|
+
|
|
11
|
+
await gapi.client.load('https://searchconsole.googleapis.com/$discovery/rest?version=v1');
|
|
12
|
+
/** now we can use gapi.client.searchconsole, gapi.client.webmasters */
|
|
13
|
+
|
|
14
|
+
/** don't forget to authenticate your client before sending any request to resources: */
|
|
15
|
+
/** declare client_id registered in Google Developers Console */
|
|
16
|
+
const client_id = '<<PUT YOUR CLIENT ID HERE>>';
|
|
17
|
+
const scope = [
|
|
18
|
+
/** View and manage Search Console data for your verified sites */
|
|
19
|
+
'https://www.googleapis.com/auth/webmasters',
|
|
20
|
+
/** View Search Console data for your verified sites */
|
|
21
|
+
'https://www.googleapis.com/auth/webmasters.readonly',
|
|
22
|
+
];
|
|
23
|
+
const immediate = false;
|
|
24
|
+
gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
|
|
25
|
+
if (authResult && !authResult.error) {
|
|
26
|
+
/** handle successful authorization */
|
|
27
|
+
run();
|
|
28
|
+
} else {
|
|
29
|
+
/** handle authorization error */
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
async function run() {
|
|
34
|
+
/** Index inspection. */
|
|
35
|
+
await gapi.client.searchconsole.urlInspection.index.inspect({
|
|
36
|
+
}, {
|
|
37
|
+
inspectionUrl: "Test string",
|
|
38
|
+
languageCode: "Test string",
|
|
39
|
+
siteUrl: "Test string",
|
|
40
|
+
});
|
|
41
|
+
/** Runs Mobile-Friendly Test for a given URL. */
|
|
42
|
+
await gapi.client.searchconsole.urlTestingTools.mobileFriendlyTest.run({
|
|
43
|
+
}, {
|
|
44
|
+
requestScreenshot: true,
|
|
45
|
+
url: "Test string",
|
|
46
|
+
});
|
|
47
|
+
/**
|
|
48
|
+
* Query your data with filters and parameters that you define. Returns zero or more rows grouped by the row keys that you define. You must define a date range of one or more days. When
|
|
49
|
+
* date is one of the group by values, any days without data are omitted from the result list. If you need to know which days have data, issue a broad date range query grouped by date for
|
|
50
|
+
* any metric, and see which day rows are returned.
|
|
51
|
+
*/
|
|
52
|
+
await gapi.client.webmasters.searchanalytics.query({
|
|
53
|
+
siteUrl: "Test string",
|
|
54
|
+
}, {
|
|
55
|
+
aggregationType: "Test string",
|
|
56
|
+
dataState: "Test string",
|
|
57
|
+
dimensionFilterGroups: [
|
|
58
|
+
{
|
|
59
|
+
filters: [
|
|
60
|
+
{
|
|
61
|
+
dimension: "Test string",
|
|
62
|
+
expression: "Test string",
|
|
63
|
+
operator: "Test string",
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
groupType: "Test string",
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
dimensions: [
|
|
70
|
+
"Test string"
|
|
71
|
+
],
|
|
72
|
+
endDate: "Test string",
|
|
73
|
+
rowLimit: 42,
|
|
74
|
+
searchType: "Test string",
|
|
75
|
+
startDate: "Test string",
|
|
76
|
+
startRow: 42,
|
|
77
|
+
type: "Test string",
|
|
78
|
+
});
|
|
79
|
+
/** Deletes a sitemap from the Sitemaps report. Does not stop Google from crawling this sitemap or the URLs that were previously crawled in the deleted sitemap. */
|
|
80
|
+
await gapi.client.webmasters.sitemaps.delete({
|
|
81
|
+
feedpath: "Test string",
|
|
82
|
+
siteUrl: "Test string",
|
|
83
|
+
});
|
|
84
|
+
/** Retrieves information about a specific sitemap. */
|
|
85
|
+
await gapi.client.webmasters.sitemaps.get({
|
|
86
|
+
feedpath: "Test string",
|
|
87
|
+
siteUrl: "Test string",
|
|
88
|
+
});
|
|
89
|
+
/** Lists the [sitemaps-entries](/webmaster-tools/v3/sitemaps) submitted for this site, or included in the sitemap index file (if `sitemapIndex` is specified in the request). */
|
|
90
|
+
await gapi.client.webmasters.sitemaps.list({
|
|
91
|
+
sitemapIndex: "Test string",
|
|
92
|
+
siteUrl: "Test string",
|
|
93
|
+
});
|
|
94
|
+
/** Submits a sitemap for a site. */
|
|
95
|
+
await gapi.client.webmasters.sitemaps.submit({
|
|
96
|
+
feedpath: "Test string",
|
|
97
|
+
siteUrl: "Test string",
|
|
98
|
+
});
|
|
99
|
+
/** Adds a site to the set of the user's sites in Search Console. */
|
|
100
|
+
await gapi.client.webmasters.sites.add({
|
|
101
|
+
siteUrl: "Test string",
|
|
102
|
+
});
|
|
103
|
+
/** Removes a site from the set of the user's Search Console sites. */
|
|
104
|
+
await gapi.client.webmasters.sites.delete({
|
|
105
|
+
siteUrl: "Test string",
|
|
106
|
+
});
|
|
107
|
+
/** Retrieves information about specific site. */
|
|
108
|
+
await gapi.client.webmasters.sites.get({
|
|
109
|
+
siteUrl: "Test string",
|
|
110
|
+
});
|
|
111
|
+
/** Lists the user's Search Console sites. */
|
|
112
|
+
await gapi.client.webmasters.sites.list({
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
});
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "commonjs",
|
|
4
|
+
"lib": ["es6", "dom"],
|
|
5
|
+
"noImplicitAny": true,
|
|
6
|
+
"noImplicitThis": true,
|
|
7
|
+
"strictNullChecks": true,
|
|
8
|
+
"baseUrl": "../",
|
|
9
|
+
"typeRoots": [
|
|
10
|
+
"../"
|
|
11
|
+
],
|
|
12
|
+
"types": [],
|
|
13
|
+
"noEmit": true,
|
|
14
|
+
"forceConsistentCasingInFileNames": true,
|
|
15
|
+
"strictFunctionTypes": true
|
|
16
|
+
},
|
|
17
|
+
"files": ["index.d.ts", "tests.ts"]
|
|
18
|
+
}
|