DefinitelyTyped/types/gapi.client.searchconsole/index.d.ts
Alexey Bolisov 4f8a3d571b Add Google APIs typings (#19083)
* Add Google APIs typings

* [gapi.cliebt.* ] Add version as part of typings name and fix gapi.client tslint errors

* versions should not get their own folders
fixing a few typos
using /** syntax so comments show up in editors
export only actual (last) version for now

* export only actual (last) version for now

* merge namespaces and remove unnecessary namespace qualifiers

* remove namespace qualifier for gapi.client.Request from nested namespaces and change Request base interface to Promise

* disable await-promise rule

* fix collision between gapi.client.Request and Request from nested namespace
disable no-irregular-whitespace rule

* sort properties and namespace resources

* remove empty comments
sort resources amd methods in tests and readme.md

* update 'this is autogenerated file' banner to remove this text from gapi.client namespace hint
use multiline comments when comment has several lines

* implement no-trailing-whitespace, no-padding, max-line-length, await-promise, no-irregular-whitespace rules

* add strictFunctionTypes to tsconfig

* fix "Whitespace within parentheses is not allowed" rule

* fix ts-lint rules

* fixes

* remove deprecated replicapool and replicapoolupdater api

* fix no-irregular-whitespace

* fix no-irregular-whitespace
2017-10-09 14:55:04 -07:00

103 lines
4.4 KiB
TypeScript

// Type definitions for Google Google Search Console URL Testing Tools API v1 1.0
// Project: https://developers.google.com/webmaster-tools/search-console-api/
// Definitions by: Bolisov Alexey <https://github.com/Bolisov>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
// IMPORTANT
// This file was generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually.
// In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator
// Generated from: https://searchconsole.googleapis.com/$discovery/rest?version=v1
/// <reference types="gapi.client" />
declare namespace gapi.client {
/** Load Google Search Console URL Testing Tools API v1 */
function load(name: "searchconsole", version: "v1"): PromiseLike<void>;
function load(name: "searchconsole", version: "v1", callback: () => any): void;
const urlTestingTools: searchconsole.UrlTestingToolsResource;
namespace searchconsole {
interface BlockedResource {
/** URL of the blocked resource. */
url?: string;
}
interface Image {
/**
* Image data in format determined by the mime type. Currently, the format
* will always be "image/png", but this might change in the future.
*/
data?: string;
/** The mime-type of the image data. */
mimeType?: string;
}
interface MobileFriendlyIssue {
/** Rule violated. */
rule?: string;
}
interface ResourceIssue {
/** Describes a blocked resource issue. */
blockedResource?: BlockedResource;
}
interface RunMobileFriendlyTestRequest {
/** Whether or not screenshot is requested. Default is false. */
requestScreenshot?: boolean;
/** URL for inspection. */
url?: string;
}
interface RunMobileFriendlyTestResponse {
/** Test verdict, whether the page is mobile friendly or not. */
mobileFriendliness?: string;
/** List of mobile-usability issues. */
mobileFriendlyIssues?: MobileFriendlyIssue[];
/** Information about embedded resources issues. */
resourceIssues?: ResourceIssue[];
/** Screenshot of the requested URL. */
screenshot?: Image;
/** Final state of the test, can be either complete or an error. */
testStatus?: TestStatus;
}
interface TestStatus {
/** Error details if applicable. */
details?: string;
/** Status of the test. */
status?: string;
}
interface MobileFriendlyTestResource {
/** Runs Mobile-Friendly Test for a given URL. */
run(request: {
/** V1 error format. */
"$.xgafv"?: string;
/** OAuth access token. */
access_token?: string;
/** Data format for response. */
alt?: string;
/** OAuth bearer token. */
bearer_token?: string;
/** JSONP */
callback?: string;
/** Selector specifying which fields to include in a partial response. */
fields?: string;
/** 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. */
key?: string;
/** OAuth 2.0 token for the current user. */
oauth_token?: string;
/** Pretty-print response. */
pp?: boolean;
/** Returns response with indentations and line breaks. */
prettyPrint?: boolean;
/** 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. */
quotaUser?: string;
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
uploadType?: string;
/** Upload protocol for media (e.g. "raw", "multipart"). */
upload_protocol?: string;
}): Request<RunMobileFriendlyTestResponse>;
}
interface UrlTestingToolsResource {
mobileFriendlyTest: MobileFriendlyTestResource;
}
}
}