googleapis
Version:
Google APIs Client Library for Node.js
274 lines (273 loc) • 10.1 kB
TypeScript
/**
* 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.
*/
import { AxiosPromise } from 'axios';
import { GoogleApis } from '../..';
import { BodyResponseCallback, GlobalOptions, MethodOptions } from '../../lib/api';
/**
* 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
*/
export declare class Admin {
_options: GlobalOptions;
google: GoogleApis;
root: this;
applications: Resource$Applications;
transfers: Resource$Transfers;
constructor(options: GlobalOptions, google: GoogleApis);
getRoot(): this;
}
/**
* The JSON template for an Application resource.
*/
export interface Schema$Application {
/**
* Etag of the resource.
*/
etag: string;
/**
* The application's ID.
*/
id: string;
/**
* Identifies the resource as a DataTransfer Application Resource.
*/
kind: string;
/**
* The application's name.
*/
name: string;
/**
* 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.
*/
transferParams: Schema$ApplicationTransferParam[];
}
/**
* Template to map fields of ApplicationDataTransfer resource.
*/
export interface Schema$ApplicationDataTransfer {
/**
* The application's ID.
*/
applicationId: string;
/**
* The transfer parameters for the application. These parameters are used to
* select the data which will get transfered in context of this application.
*/
applicationTransferParams: Schema$ApplicationTransferParam[];
/**
* Current status of transfer for this application. (Read-only)
*/
applicationTransferStatus: string;
}
/**
* Template for a collection of Applications.
*/
export interface Schema$ApplicationsListResponse {
/**
* List of applications that support data transfer and are also installed for
* the customer.
*/
applications: Schema$Application[];
/**
* ETag of the resource.
*/
etag: string;
/**
* Identifies the resource as a collection of Applications.
*/
kind: string;
/**
* Continuation token which will be used to specify next page in list API.
*/
nextPageToken: string;
}
/**
* Template for application transfer parameters.
*/
export interface Schema$ApplicationTransferParam {
/**
* The type of the transfer parameter. eg: 'PRIVACY_LEVEL'
*/
key: string;
/**
* The value of the coressponding transfer parameter. eg: 'PRIVATE' or
* 'SHARED'
*/
value: string[];
}
/**
* The JSON template for a DataTransfer resource.
*/
export interface Schema$DataTransfer {
/**
* 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.
*/
applicationDataTransfers: Schema$ApplicationDataTransfer[];
/**
* ETag of the resource.
*/
etag: string;
/**
* The transfer's ID (Read-only).
*/
id: string;
/**
* Identifies the resource as a DataTransfer request.
*/
kind: string;
/**
* ID of the user to whom the data is being transfered.
*/
newOwnerUserId: string;
/**
* ID of the user whose data is being transfered.
*/
oldOwnerUserId: string;
/**
* Overall transfer status (Read-only).
*/
overallTransferStatusCode: string;
/**
* The time at which the data transfer was requested (Read-only).
*/
requestTime: string;
}
/**
* Template for a collection of DataTransfer resources.
*/
export interface Schema$DataTransfersListResponse {
/**
* List of data transfer requests.
*/
dataTransfers: Schema$DataTransfer[];
/**
* ETag of the resource.
*/
etag: string;
/**
* Identifies the resource as a collection of data transfer requests.
*/
kind: string;
/**
* Continuation token which will be used to specify next page in list API.
*/
nextPageToken: string;
}
export declare class Resource$Applications {
root: Admin;
constructor(root: Admin);
getRoot(): Admin;
/**
* datatransfer.applications.get
* @desc Retrieves information about an application for the given application
* ID.
* @alias datatransfer.applications.get
* @memberOf! ()
*
* @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(params?: any, options?: MethodOptions): AxiosPromise<Schema$Application>;
get(params?: any, options?: MethodOptions | BodyResponseCallback<Schema$Application>, callback?: BodyResponseCallback<Schema$Application>): void;
/**
* datatransfer.applications.list
* @desc Lists the applications available for data transfer for a customer.
* @alias datatransfer.applications.list
* @memberOf! ()
*
* @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(params?: any, options?: MethodOptions): AxiosPromise<Schema$ApplicationsListResponse>;
list(params?: any, options?: MethodOptions | BodyResponseCallback<Schema$ApplicationsListResponse>, callback?: BodyResponseCallback<Schema$ApplicationsListResponse>): void;
}
export declare class Resource$Transfers {
root: Admin;
constructor(root: Admin);
getRoot(): Admin;
/**
* datatransfer.transfers.get
* @desc Retrieves a data transfer request by its resource ID.
* @alias datatransfer.transfers.get
* @memberOf! ()
*
* @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(params?: any, options?: MethodOptions): AxiosPromise<Schema$DataTransfer>;
get(params?: any, options?: MethodOptions | BodyResponseCallback<Schema$DataTransfer>, callback?: BodyResponseCallback<Schema$DataTransfer>): void;
/**
* datatransfer.transfers.insert
* @desc Inserts a data transfer request.
* @alias datatransfer.transfers.insert
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {().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(params?: any, options?: MethodOptions): AxiosPromise<Schema$DataTransfer>;
insert(params?: any, options?: MethodOptions | BodyResponseCallback<Schema$DataTransfer>, callback?: BodyResponseCallback<Schema$DataTransfer>): void;
/**
* datatransfer.transfers.list
* @desc Lists the transfers for a customer by source user, destination user,
* or status.
* @alias datatransfer.transfers.list
* @memberOf! ()
*
* @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(params?: any, options?: MethodOptions): AxiosPromise<Schema$DataTransfersListResponse>;
list(params?: any, options?: MethodOptions | BodyResponseCallback<Schema$DataTransfersListResponse>, callback?: BodyResponseCallback<Schema$DataTransfersListResponse>): void;
}