mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
103 lines
4.5 KiB
TypeScript
103 lines
4.5 KiB
TypeScript
// Type definitions for non-npm package 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;
|
|
}
|
|
}
|
|
}
|