Skip to content

Commit

Permalink
chore: add more type information to generated files (#1039)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith committed Mar 5, 2018
1 parent 0fb58e2 commit 5e8e6f4
Show file tree
Hide file tree
Showing 199 changed files with 27,704 additions and 16,470 deletions.
20 changes: 15 additions & 5 deletions src/apis/abusiveexperiencereport/v1.ts
Expand Up @@ -14,8 +14,15 @@
* limitations under the License.
*/

import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api';
import {createAPIRequest} from '../../lib/apirequest';

// TODO: We will eventually get the `any` in here cleared out, but in the
// interim we want to turn on no-implicit-any.

// tslint:disable: no-any


/**
* Google Abusive Experience Report API
*
Expand All @@ -32,7 +39,7 @@ import {createAPIRequest} from '../../lib/apirequest';
* @variation v1
* @param {object=} options Options for Abusiveexperiencereport
*/
function Abusiveexperiencereport(options) {
function Abusiveexperiencereport(options: GlobalOptions) {
const self = this;
self._options = options || {};
self.sites = {
Expand All @@ -48,7 +55,8 @@ function Abusiveexperiencereport(options) {
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get(params, options, callback) {
get(params: any, options: MethodOptions|BodyResponseCallback<any>,
callback?: BodyResponseCallback<any>) {
if (typeof options === 'function') {
callback = options;
options = {};
Expand All @@ -68,7 +76,7 @@ function Abusiveexperiencereport(options) {
pathParams: ['name'],
context: self
};
return createAPIRequest(parameters, callback);
return createAPIRequest(parameters, callback!);
}

};
Expand All @@ -84,7 +92,9 @@ function Abusiveexperiencereport(options) {
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params, options, callback) {
list(
params: any, options: MethodOptions|BodyResponseCallback<any>,
callback?: BodyResponseCallback<any>) {
if (typeof options === 'function') {
callback = options;
options = {};
Expand All @@ -105,7 +115,7 @@ function Abusiveexperiencereport(options) {
pathParams: [],
context: self
};
return createAPIRequest(parameters, callback);
return createAPIRequest(parameters, callback!);
}

};
Expand Down
15 changes: 12 additions & 3 deletions src/apis/acceleratedmobilepageurl/v1.ts
Expand Up @@ -14,8 +14,15 @@
* limitations under the License.
*/

import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api';
import {createAPIRequest} from '../../lib/apirequest';

// TODO: We will eventually get the `any` in here cleared out, but in the
// interim we want to turn on no-implicit-any.

// tslint:disable: no-any


/**
* Accelerated Mobile Pages (AMP) URL API
*
Expand All @@ -32,7 +39,7 @@ import {createAPIRequest} from '../../lib/apirequest';
* @variation v1
* @param {object=} options Options for Acceleratedmobilepageurl
*/
function Acceleratedmobilepageurl(options) {
function Acceleratedmobilepageurl(options: GlobalOptions) {
const self = this;
self._options = options || {};
self.ampUrls = {
Expand All @@ -49,7 +56,9 @@ function Acceleratedmobilepageurl(options) {
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
batchGet(params, options, callback) {
batchGet(
params: any, options: MethodOptions|BodyResponseCallback<any>,
callback?: BodyResponseCallback<any>) {
if (typeof options === 'function') {
callback = options;
options = {};
Expand All @@ -70,7 +79,7 @@ function Acceleratedmobilepageurl(options) {
pathParams: [],
context: self
};
return createAPIRequest(parameters, callback);
return createAPIRequest(parameters, callback!);
}

};
Expand Down
49 changes: 34 additions & 15 deletions src/apis/adexchangebuyer/v1.2.ts
Expand Up @@ -14,8 +14,15 @@
* limitations under the License.
*/

import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api';
import {createAPIRequest} from '../../lib/apirequest';

// TODO: We will eventually get the `any` in here cleared out, but in the
// interim we want to turn on no-implicit-any.

// tslint:disable: no-any


/**
* Ad Exchange Buyer API
*
Expand All @@ -32,7 +39,7 @@ import {createAPIRequest} from '../../lib/apirequest';
* @variation v1.2
* @param {object=} options Options for Adexchangebuyer
*/
function Adexchangebuyer(options) {
function Adexchangebuyer(options: GlobalOptions) {
const self = this;
self._options = options || {};
self.accounts = {
Expand All @@ -48,7 +55,8 @@ function Adexchangebuyer(options) {
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get(params, options, callback) {
get(params: any, options: MethodOptions|BodyResponseCallback<any>,
callback?: BodyResponseCallback<any>) {
if (typeof options === 'function') {
callback = options;
options = {};
Expand All @@ -68,7 +76,7 @@ function Adexchangebuyer(options) {
pathParams: ['id'],
context: self
};
return createAPIRequest(parameters, callback);
return createAPIRequest(parameters, callback!);
}, /**
* adexchangebuyer.accounts.list
* @desc Retrieves the authenticated user's list of accounts.
Expand All @@ -80,7 +88,9 @@ function Adexchangebuyer(options) {
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params, options, callback) {
list(
params: any, options: MethodOptions|BodyResponseCallback<any>,
callback?: BodyResponseCallback<any>) {
if (typeof options === 'function') {
callback = options;
options = {};
Expand All @@ -100,7 +110,7 @@ function Adexchangebuyer(options) {
pathParams: [],
context: self
};
return createAPIRequest(parameters, callback);
return createAPIRequest(parameters, callback!);
}, /**
* adexchangebuyer.accounts.patch
* @desc Updates an existing account. This method supports patch
Expand All @@ -115,7 +125,9 @@ function Adexchangebuyer(options) {
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
patch(params, options, callback) {
patch(
params: any, options: MethodOptions|BodyResponseCallback<any>,
callback?: BodyResponseCallback<any>) {
if (typeof options === 'function') {
callback = options;
options = {};
Expand All @@ -135,7 +147,7 @@ function Adexchangebuyer(options) {
pathParams: ['id'],
context: self
};
return createAPIRequest(parameters, callback);
return createAPIRequest(parameters, callback!);
}, /**
* adexchangebuyer.accounts.update
* @desc Updates an existing account.
Expand All @@ -149,7 +161,9 @@ function Adexchangebuyer(options) {
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
update(params, options, callback) {
update(
params: any, options: MethodOptions|BodyResponseCallback<any>,
callback?: BodyResponseCallback<any>) {
if (typeof options === 'function') {
callback = options;
options = {};
Expand All @@ -169,7 +183,7 @@ function Adexchangebuyer(options) {
pathParams: ['id'],
context: self
};
return createAPIRequest(parameters, callback);
return createAPIRequest(parameters, callback!);
}

};
Expand All @@ -188,7 +202,8 @@ function Adexchangebuyer(options) {
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get(params, options, callback) {
get(params: any, options: MethodOptions|BodyResponseCallback<any>,
callback?: BodyResponseCallback<any>) {
if (typeof options === 'function') {
callback = options;
options = {};
Expand All @@ -210,7 +225,7 @@ function Adexchangebuyer(options) {
pathParams: ['accountId', 'buyerCreativeId'],
context: self
};
return createAPIRequest(parameters, callback);
return createAPIRequest(parameters, callback!);
}, /**
* adexchangebuyer.creatives.insert
* @desc Submit a new creative.
Expand All @@ -223,7 +238,9 @@ function Adexchangebuyer(options) {
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
insert(params, options, callback) {
insert(
params: any, options: MethodOptions|BodyResponseCallback<any>,
callback?: BodyResponseCallback<any>) {
if (typeof options === 'function') {
callback = options;
options = {};
Expand All @@ -243,7 +260,7 @@ function Adexchangebuyer(options) {
pathParams: [],
context: self
};
return createAPIRequest(parameters, callback);
return createAPIRequest(parameters, callback!);
}, /**
* adexchangebuyer.creatives.list
* @desc Retrieves a list of the authenticated user's active creatives. A
Expand All @@ -259,7 +276,9 @@ function Adexchangebuyer(options) {
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params, options, callback) {
list(
params: any, options: MethodOptions|BodyResponseCallback<any>,
callback?: BodyResponseCallback<any>) {
if (typeof options === 'function') {
callback = options;
options = {};
Expand All @@ -279,7 +298,7 @@ function Adexchangebuyer(options) {
pathParams: [],
context: self
};
return createAPIRequest(parameters, callback);
return createAPIRequest(parameters, callback!);
}

};
Expand Down

0 comments on commit 5e8e6f4

Please sign in to comment.