This commit is contained in:
GotPPay
2017-10-16 20:21:19 +02:00
parent 8a7f8794cf
commit a75ea978f9
2554 changed files with 804218 additions and 109 deletions

View File

@@ -0,0 +1,215 @@
"use strict";
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* jshint maxlen: false */
const apirequest_1 = require("../../lib/apirequest");
/**
* Admin Data Transfer API
*
* Transfers user data from one user to another.
*
* @example
* const google = require('googleapis');
* const admin = google.admin('datatransfer_v1');
*
* @namespace admin
* @type {Function}
* @version datatransfer_v1
* @variation datatransfer_v1
* @param {object=} options Options for Admin
*/
function Admin(options) {
const self = this;
self._options = options || {};
self.applications = {
/**
* datatransfer.applications.get
*
* @desc Retrieves information about an application for the given application ID.
*
* @alias datatransfer.applications.get
* @memberOf! admin(datatransfer_v1)
*
* @param {object} params Parameters for request
* @param {string} params.applicationId ID of the application resource to be retrieved.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/datatransfer/v1/applications/{applicationId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params: params,
requiredParams: ['applicationId'],
pathParams: ['applicationId'],
context: self
};
return apirequest_1.default(parameters, callback);
},
/**
* datatransfer.applications.list
*
* @desc Lists the applications available for data transfer for a customer.
*
* @alias datatransfer.applications.list
* @memberOf! admin(datatransfer_v1)
*
* @param {object=} params Parameters for request
* @param {string=} params.customerId Immutable ID of the Google Apps account.
* @param {integer=} params.maxResults Maximum number of results to return. Default is 100.
* @param {string=} params.pageToken Token to specify next page in the list.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/datatransfer/v1/applications').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params: params,
requiredParams: [],
pathParams: [],
context: self
};
return apirequest_1.default(parameters, callback);
}
};
self.transfers = {
/**
* datatransfer.transfers.get
*
* @desc Retrieves a data transfer request by its resource ID.
*
* @alias datatransfer.transfers.get
* @memberOf! admin(datatransfer_v1)
*
* @param {object} params Parameters for request
* @param {string} params.dataTransferId ID of the resource to be retrieved. This is returned in the response from the insert method.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/datatransfer/v1/transfers/{dataTransferId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params: params,
requiredParams: ['dataTransferId'],
pathParams: ['dataTransferId'],
context: self
};
return apirequest_1.default(parameters, callback);
},
/**
* datatransfer.transfers.insert
*
* @desc Inserts a data transfer request.
*
* @alias datatransfer.transfers.insert
* @memberOf! admin(datatransfer_v1)
*
* @param {object} params Parameters for request
* @param {admin(datatransfer_v1).DataTransfer} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
insert: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/datatransfer/v1/transfers').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params: params,
requiredParams: [],
pathParams: [],
context: self
};
return apirequest_1.default(parameters, callback);
},
/**
* datatransfer.transfers.list
*
* @desc Lists the transfers for a customer by source user, destination user, or status.
*
* @alias datatransfer.transfers.list
* @memberOf! admin(datatransfer_v1)
*
* @param {object=} params Parameters for request
* @param {string=} params.customerId Immutable ID of the Google Apps account.
* @param {integer=} params.maxResults Maximum number of results to return. Default is 100.
* @param {string=} params.newOwnerUserId Destination user's profile ID.
* @param {string=} params.oldOwnerUserId Source user's profile ID.
* @param {string=} params.pageToken Token to specify the next page in the list.
* @param {string=} params.status Status of the transfer.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/datatransfer/v1/transfers').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params: params,
requiredParams: [],
pathParams: [],
context: self
};
return apirequest_1.default(parameters, callback);
}
};
}
module.exports = Admin;
//# sourceMappingURL=datatransfer_v1.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"datatransfer_v1.js","sourceRoot":"","sources":["datatransfer_v1.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,0BAA0B;AAE1B,qDAAoD;AAEpD;;;;;;;;;;;;;;GAcG;AACH,eAAe,OAAO;IACpB,MAAM,IAAI,GAAG,IAAI,CAAC;IAClB,IAAI,CAAC,QAAQ,GAAG,OAAO,IAAI,EAAE,CAAC;IAE9B,IAAI,CAAC,YAAY,GAAG;QAElB;;;;;;;;;;;;;WAaG;QACH,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AAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAChD,CAAC;KAEF,CAAC;AACJ,CAAC;AA+DD,iBAAS,KAAK,CAAC"}

View File

@@ -0,0 +1,302 @@
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* jshint maxlen: false */
import createAPIRequest from '../../lib/apirequest';
/**
* Admin Data Transfer API
*
* Transfers user data from one user to another.
*
* @example
* const google = require('googleapis');
* const admin = google.admin('datatransfer_v1');
*
* @namespace admin
* @type {Function}
* @version datatransfer_v1
* @variation datatransfer_v1
* @param {object=} options Options for Admin
*/
function Admin(options) { // eslint-disable-line
const self = this;
self._options = options || {};
self.applications = {
/**
* datatransfer.applications.get
*
* @desc Retrieves information about an application for the given application ID.
*
* @alias datatransfer.applications.get
* @memberOf! admin(datatransfer_v1)
*
* @param {object} params Parameters for request
* @param {string} params.applicationId ID of the application resource to be retrieved.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/datatransfer/v1/applications/{applicationId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params: params,
requiredParams: ['applicationId'],
pathParams: ['applicationId'],
context: self
};
return createAPIRequest(parameters, callback);
},
/**
* datatransfer.applications.list
*
* @desc Lists the applications available for data transfer for a customer.
*
* @alias datatransfer.applications.list
* @memberOf! admin(datatransfer_v1)
*
* @param {object=} params Parameters for request
* @param {string=} params.customerId Immutable ID of the Google Apps account.
* @param {integer=} params.maxResults Maximum number of results to return. Default is 100.
* @param {string=} params.pageToken Token to specify next page in the list.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/datatransfer/v1/applications').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params: params,
requiredParams: [],
pathParams: [],
context: self
};
return createAPIRequest(parameters, callback);
}
};
self.transfers = {
/**
* datatransfer.transfers.get
*
* @desc Retrieves a data transfer request by its resource ID.
*
* @alias datatransfer.transfers.get
* @memberOf! admin(datatransfer_v1)
*
* @param {object} params Parameters for request
* @param {string} params.dataTransferId ID of the resource to be retrieved. This is returned in the response from the insert method.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/datatransfer/v1/transfers/{dataTransferId}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params: params,
requiredParams: ['dataTransferId'],
pathParams: ['dataTransferId'],
context: self
};
return createAPIRequest(parameters, callback);
},
/**
* datatransfer.transfers.insert
*
* @desc Inserts a data transfer request.
*
* @alias datatransfer.transfers.insert
* @memberOf! admin(datatransfer_v1)
*
* @param {object} params Parameters for request
* @param {admin(datatransfer_v1).DataTransfer} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
insert: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/datatransfer/v1/transfers').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params: params,
requiredParams: [],
pathParams: [],
context: self
};
return createAPIRequest(parameters, callback);
},
/**
* datatransfer.transfers.list
*
* @desc Lists the transfers for a customer by source user, destination user, or status.
*
* @alias datatransfer.transfers.list
* @memberOf! admin(datatransfer_v1)
*
* @param {object=} params Parameters for request
* @param {string=} params.customerId Immutable ID of the Google Apps account.
* @param {integer=} params.maxResults Maximum number of results to return. Default is 100.
* @param {string=} params.newOwnerUserId Destination user's profile ID.
* @param {string=} params.oldOwnerUserId Source user's profile ID.
* @param {string=} params.pageToken Token to specify the next page in the list.
* @param {string=} params.status Status of the transfer.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/datatransfer/v1/transfers').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params: params,
requiredParams: [],
pathParams: [],
context: self
};
return createAPIRequest(parameters, callback);
}
};
}
/**
* @typedef Application
* @memberOf! admin(datatransfer_v1)
* @type object
* @property {string} etag Etag of the resource.
* @property {string} id The application's ID.
* @property {string} kind Identifies the resource as a DataTransfer Application Resource.
* @property {string} name The application's name.
* @property {admin(datatransfer_v1).ApplicationTransferParam[]} transferParams The list of all possible transfer parameters for this application. These parameters can be used to select the data of the user in this application to be transfered.
*/
/**
* @typedef ApplicationDataTransfer
* @memberOf! admin(datatransfer_v1)
* @type object
* @property {string} applicationId The application's ID.
* @property {admin(datatransfer_v1).ApplicationTransferParam[]} applicationTransferParams The transfer parameters for the application. These parameters are used to select the data which will get transfered in context of this application.
* @property {string} applicationTransferStatus Current status of transfer for this application. (Read-only)
*/
/**
* @typedef ApplicationTransferParam
* @memberOf! admin(datatransfer_v1)
* @type object
* @property {string} key The type of the transfer parameter. eg: 'PRIVACY_LEVEL'
* @property {string[]} value The value of the coressponding transfer parameter. eg: 'PRIVATE' or 'SHARED'
*/
/**
* @typedef ApplicationsListResponse
* @memberOf! admin(datatransfer_v1)
* @type object
* @property {admin(datatransfer_v1).Application[]} applications List of applications that support data transfer and are also installed for the customer.
* @property {string} etag ETag of the resource.
* @property {string} kind Identifies the resource as a collection of Applications.
* @property {string} nextPageToken Continuation token which will be used to specify next page in list API.
*/
/**
* @typedef DataTransfer
* @memberOf! admin(datatransfer_v1)
* @type object
* @property {admin(datatransfer_v1).ApplicationDataTransfer[]} applicationDataTransfers List of per application data transfer resources. It contains data transfer details of the applications associated with this transfer resource. Note that this list is also used to specify the applications for which data transfer has to be done at the time of the transfer resource creation.
* @property {string} etag ETag of the resource.
* @property {string} id The transfer's ID (Read-only).
* @property {string} kind Identifies the resource as a DataTransfer request.
* @property {string} newOwnerUserId ID of the user to whom the data is being transfered.
* @property {string} oldOwnerUserId ID of the user whose data is being transfered.
* @property {string} overallTransferStatusCode Overall transfer status (Read-only).
* @property {string} requestTime The time at which the data transfer was requested (Read-only).
*/
/**
* @typedef DataTransfersListResponse
* @memberOf! admin(datatransfer_v1)
* @type object
* @property {admin(datatransfer_v1).DataTransfer[]} dataTransfers List of data transfer requests.
* @property {string} etag ETag of the resource.
* @property {string} kind Identifies the resource as a collection of data transfer requests.
* @property {string} nextPageToken Continuation token which will be used to specify next page in list API.
*/
export = Admin;

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,240 @@
"use strict";
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* jshint maxlen: false */
const apirequest_1 = require("../../lib/apirequest");
/**
* Admin Reports API
*
* Fetches reports for the administrators of G Suite customers about the usage, collaboration, security, and risk for their users.
*
* @example
* const google = require('googleapis');
* const admin = google.admin('reports_v1');
*
* @namespace admin
* @type {Function}
* @version reports_v1
* @variation reports_v1
* @param {object=} options Options for Admin
*/
function Admin(options) {
const self = this;
self._options = options || {};
self.activities = {
/**
* reports.activities.list
*
* @desc Retrieves a list of activities for a specific customer and application.
*
* @alias reports.activities.list
* @memberOf! admin(reports_v1)
*
* @param {object} params Parameters for request
* @param {string=} params.actorIpAddress IP Address of host where the event was performed. Supports both IPv4 and IPv6 addresses.
* @param {string} params.applicationName Application name for which the events are to be retrieved.
* @param {string=} params.customerId Represents the customer for which the data is to be fetched.
* @param {string=} params.endTime Return events which occurred at or before this time.
* @param {string=} params.eventName Name of the event being queried.
* @param {string=} params.filters Event parameters in the form [parameter1 name][operator][parameter1 value],[parameter2 name][operator][parameter2 value],...
* @param {integer=} params.maxResults Number of activity records to be shown in each page.
* @param {string=} params.pageToken Token to specify next page.
* @param {string=} params.startTime Return events which occurred at or after this time.
* @param {string} params.userKey Represents the profile id or the user email for which the data should be filtered. When 'all' is specified as the userKey, it returns usageReports for all users.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/reports/v1/activity/users/{userKey}/applications/{applicationName}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params: params,
requiredParams: ['userKey', 'applicationName'],
pathParams: ['applicationName', 'userKey'],
context: self
};
return apirequest_1.default(parameters, callback);
},
/**
* reports.activities.watch
*
* @desc Push changes to activities
*
* @alias reports.activities.watch
* @memberOf! admin(reports_v1)
*
* @param {object} params Parameters for request
* @param {string=} params.actorIpAddress IP Address of host where the event was performed. Supports both IPv4 and IPv6 addresses.
* @param {string} params.applicationName Application name for which the events are to be retrieved.
* @param {string=} params.customerId Represents the customer for which the data is to be fetched.
* @param {string=} params.endTime Return events which occurred at or before this time.
* @param {string=} params.eventName Name of the event being queried.
* @param {string=} params.filters Event parameters in the form [parameter1 name][operator][parameter1 value],[parameter2 name][operator][parameter2 value],...
* @param {integer=} params.maxResults Number of activity records to be shown in each page.
* @param {string=} params.pageToken Token to specify next page.
* @param {string=} params.startTime Return events which occurred at or after this time.
* @param {string} params.userKey Represents the profile id or the user email for which the data should be filtered. When 'all' is specified as the userKey, it returns usageReports for all users.
* @param {admin(reports_v1).Channel} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
watch: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/reports/v1/activity/users/{userKey}/applications/{applicationName}/watch').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params: params,
requiredParams: ['userKey', 'applicationName'],
pathParams: ['applicationName', 'userKey'],
context: self
};
return apirequest_1.default(parameters, callback);
}
};
self.channels = {
/**
* admin.channels.stop
*
* @desc Stop watching resources through this channel
*
* @alias admin.channels.stop
* @memberOf! admin(reports_v1)
*
* @param {object} params Parameters for request
* @param {admin(reports_v1).Channel} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
stop: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/reports/v1/admin/reports_v1/channels/stop').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params: params,
requiredParams: [],
pathParams: [],
context: self
};
return apirequest_1.default(parameters, callback);
}
};
self.customerUsageReports = {
/**
* reports.customerUsageReports.get
*
* @desc Retrieves a report which is a collection of properties / statistics for a specific customer.
*
* @alias reports.customerUsageReports.get
* @memberOf! admin(reports_v1)
*
* @param {object} params Parameters for request
* @param {string=} params.customerId Represents the customer for which the data is to be fetched.
* @param {string} params.date Represents the date in yyyy-mm-dd format for which the data is to be fetched.
* @param {string=} params.pageToken Token to specify next page.
* @param {string=} params.parameters Represents the application name, parameter name pairs to fetch in csv as app_name1:param_name1, app_name2:param_name2.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/reports/v1/usage/dates/{date}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params: params,
requiredParams: ['date'],
pathParams: ['date'],
context: self
};
return apirequest_1.default(parameters, callback);
}
};
self.userUsageReport = {
/**
* reports.userUsageReport.get
*
* @desc Retrieves a report which is a collection of properties / statistics for a set of users.
*
* @alias reports.userUsageReport.get
* @memberOf! admin(reports_v1)
*
* @param {object} params Parameters for request
* @param {string=} params.customerId Represents the customer for which the data is to be fetched.
* @param {string} params.date Represents the date in yyyy-mm-dd format for which the data is to be fetched.
* @param {string=} params.filters Represents the set of filters including parameter operator value.
* @param {integer=} params.maxResults Maximum number of results to return. Maximum allowed is 1000
* @param {string=} params.pageToken Token to specify next page.
* @param {string=} params.parameters Represents the application name, parameter name pairs to fetch in csv as app_name1:param_name1, app_name2:param_name2.
* @param {string} params.userKey Represents the profile id or the user email for which the data should be filtered.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/reports/v1/usage/users/{userKey}/dates/{date}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params: params,
requiredParams: ['userKey', 'date'],
pathParams: ['date', 'userKey'],
context: self
};
return apirequest_1.default(parameters, callback);
}
};
}
module.exports = Admin;
//# sourceMappingURL=reports_v1.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"reports_v1.js","sourceRoot":"","sources":["reports_v1.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,0BAA0B;AAE1B,qDAAoD;AAEpD;;;;;;;;;;;;;;GAcG;AACH,eAAe,OAAO;IACpB,MAAM,IAAI,GAAG,IAAI,CAAC;IAClB,IAAI,CAAC,QAAQ,GAAG,OAAO,IAAI,EAAE,CAAC;IAE9B,IAAI,CAAC,UAAU,GAAG;QAEhB;;;;;;;;;;;;;;;;;;;;;;WAsBG;QACH,IAAI,EAAE,UAAU,MAAM,EAAE,OAAO,EAAE,QAAQ;YACvC,EAAE,CAAC,CAAC,OAAO,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC;gBAClC,QAAQ,GAAG,OAAO,CAAC;gBACnB,OAAO,GAAG,EAAE,CAAC;YACf,CAAC;YACD,OAAO,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;YAE1B,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,6BAA6B,CAAC;YAEjE,MAAM,UAAU,GAAG;gBACjB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;oBACrB,GAAG,EAAE,CAAC,OAAO,GAAG,2EAA2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2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* jshint maxlen: false */
import createAPIRequest from '../../lib/apirequest';
/**
* Admin Reports API
*
* Fetches reports for the administrators of G Suite customers about the usage, collaboration, security, and risk for their users.
*
* @example
* const google = require('googleapis');
* const admin = google.admin('reports_v1');
*
* @namespace admin
* @type {Function}
* @version reports_v1
* @variation reports_v1
* @param {object=} options Options for Admin
*/
function Admin(options) { // eslint-disable-line
const self = this;
self._options = options || {};
self.activities = {
/**
* reports.activities.list
*
* @desc Retrieves a list of activities for a specific customer and application.
*
* @alias reports.activities.list
* @memberOf! admin(reports_v1)
*
* @param {object} params Parameters for request
* @param {string=} params.actorIpAddress IP Address of host where the event was performed. Supports both IPv4 and IPv6 addresses.
* @param {string} params.applicationName Application name for which the events are to be retrieved.
* @param {string=} params.customerId Represents the customer for which the data is to be fetched.
* @param {string=} params.endTime Return events which occurred at or before this time.
* @param {string=} params.eventName Name of the event being queried.
* @param {string=} params.filters Event parameters in the form [parameter1 name][operator][parameter1 value],[parameter2 name][operator][parameter2 value],...
* @param {integer=} params.maxResults Number of activity records to be shown in each page.
* @param {string=} params.pageToken Token to specify next page.
* @param {string=} params.startTime Return events which occurred at or after this time.
* @param {string} params.userKey Represents the profile id or the user email for which the data should be filtered. When 'all' is specified as the userKey, it returns usageReports for all users.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/reports/v1/activity/users/{userKey}/applications/{applicationName}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params: params,
requiredParams: ['userKey', 'applicationName'],
pathParams: ['applicationName', 'userKey'],
context: self
};
return createAPIRequest(parameters, callback);
},
/**
* reports.activities.watch
*
* @desc Push changes to activities
*
* @alias reports.activities.watch
* @memberOf! admin(reports_v1)
*
* @param {object} params Parameters for request
* @param {string=} params.actorIpAddress IP Address of host where the event was performed. Supports both IPv4 and IPv6 addresses.
* @param {string} params.applicationName Application name for which the events are to be retrieved.
* @param {string=} params.customerId Represents the customer for which the data is to be fetched.
* @param {string=} params.endTime Return events which occurred at or before this time.
* @param {string=} params.eventName Name of the event being queried.
* @param {string=} params.filters Event parameters in the form [parameter1 name][operator][parameter1 value],[parameter2 name][operator][parameter2 value],...
* @param {integer=} params.maxResults Number of activity records to be shown in each page.
* @param {string=} params.pageToken Token to specify next page.
* @param {string=} params.startTime Return events which occurred at or after this time.
* @param {string} params.userKey Represents the profile id or the user email for which the data should be filtered. When 'all' is specified as the userKey, it returns usageReports for all users.
* @param {admin(reports_v1).Channel} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
watch: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/reports/v1/activity/users/{userKey}/applications/{applicationName}/watch').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params: params,
requiredParams: ['userKey', 'applicationName'],
pathParams: ['applicationName', 'userKey'],
context: self
};
return createAPIRequest(parameters, callback);
}
};
self.channels = {
/**
* admin.channels.stop
*
* @desc Stop watching resources through this channel
*
* @alias admin.channels.stop
* @memberOf! admin(reports_v1)
*
* @param {object} params Parameters for request
* @param {admin(reports_v1).Channel} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
stop: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/reports/v1/admin/reports_v1/channels/stop').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params: params,
requiredParams: [],
pathParams: [],
context: self
};
return createAPIRequest(parameters, callback);
}
};
self.customerUsageReports = {
/**
* reports.customerUsageReports.get
*
* @desc Retrieves a report which is a collection of properties / statistics for a specific customer.
*
* @alias reports.customerUsageReports.get
* @memberOf! admin(reports_v1)
*
* @param {object} params Parameters for request
* @param {string=} params.customerId Represents the customer for which the data is to be fetched.
* @param {string} params.date Represents the date in yyyy-mm-dd format for which the data is to be fetched.
* @param {string=} params.pageToken Token to specify next page.
* @param {string=} params.parameters Represents the application name, parameter name pairs to fetch in csv as app_name1:param_name1, app_name2:param_name2.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/reports/v1/usage/dates/{date}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params: params,
requiredParams: ['date'],
pathParams: ['date'],
context: self
};
return createAPIRequest(parameters, callback);
}
};
self.userUsageReport = {
/**
* reports.userUsageReport.get
*
* @desc Retrieves a report which is a collection of properties / statistics for a set of users.
*
* @alias reports.userUsageReport.get
* @memberOf! admin(reports_v1)
*
* @param {object} params Parameters for request
* @param {string=} params.customerId Represents the customer for which the data is to be fetched.
* @param {string} params.date Represents the date in yyyy-mm-dd format for which the data is to be fetched.
* @param {string=} params.filters Represents the set of filters including parameter operator value.
* @param {integer=} params.maxResults Maximum number of results to return. Maximum allowed is 1000
* @param {string=} params.pageToken Token to specify next page.
* @param {string=} params.parameters Represents the application name, parameter name pairs to fetch in csv as app_name1:param_name1, app_name2:param_name2.
* @param {string} params.userKey Represents the profile id or the user email for which the data should be filtered.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get: function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options || (options = {});
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/admin/reports/v1/usage/users/{userKey}/dates/{date}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params: params,
requiredParams: ['userKey', 'date'],
pathParams: ['date', 'userKey'],
context: self
};
return createAPIRequest(parameters, callback);
}
};
}
/**
* @typedef Activities
* @memberOf! admin(reports_v1)
* @type object
* @property {string} etag ETag of the resource.
* @property {admin(reports_v1).Activity[]} items Each record in read response.
* @property {string} kind Kind of list response this is.
* @property {string} nextPageToken Token for retrieving the next page
*/
/**
* @typedef Activity
* @memberOf! admin(reports_v1)
* @type object
* @property {object} actor User doing the action.
* @property {string} etag ETag of the entry.
* @property {object[]} events Activity events.
* @property {object} id Unique identifier for each activity record.
* @property {string} ipAddress IP Address of the user doing the action.
* @property {string} kind Kind of resource this is.
* @property {string} ownerDomain Domain of source customer.
*/
/**
* @typedef Channel
* @memberOf! admin(reports_v1)
* @type object
* @property {string} address The address where notifications are delivered for this channel.
* @property {string} expiration Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
* @property {string} id A UUID or similar unique string that identifies this channel.
* @property {string} kind Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel".
* @property {object} params Additional parameters controlling delivery channel behavior. Optional.
* @property {boolean} payload A Boolean value to indicate whether payload is wanted. Optional.
* @property {string} resourceId An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
* @property {string} resourceUri A version-specific identifier for the watched resource.
* @property {string} token An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
* @property {string} type The type of delivery mechanism used for this channel.
*/
/**
* @typedef UsageReport
* @memberOf! admin(reports_v1)
* @type object
* @property {string} date The date to which the record belongs.
* @property {object} entity Information about the type of the item.
* @property {string} etag ETag of the resource.
* @property {string} kind The kind of object.
* @property {object[]} parameters Parameter value pairs for various applications.
*/
/**
* @typedef UsageReports
* @memberOf! admin(reports_v1)
* @type object
* @property {string} etag ETag of the resource.
* @property {string} kind The kind of object.
* @property {string} nextPageToken Token for retrieving the next page
* @property {admin(reports_v1).UsageReport[]} usageReports Various application parameter records.
* @property {object[]} warnings Warnings if any.
*/
export = Admin;