@assistant/actions
Version:
Actions API client for Node.js
231 lines (230 loc) • 10.9 kB
TypeScript
import * as gax from 'google-gax';
import { Callback, CallOptions, Descriptors, ClientOptions } from 'google-gax';
import * as protos from '../../protos/protos';
/**
* Actions Testing API which allows developers to run automated tests.
* @class
* @memberof v2
*/
export declare class ActionsTestingClient {
private _terminated;
private _opts;
private _gaxModule;
private _gaxGrpc;
private _protos;
private _defaults;
auth: gax.GoogleAuth;
descriptors: Descriptors;
innerApiCalls: {
[name: string]: Function;
};
pathTemplates: {
[name: string]: gax.PathTemplate;
};
actionsTestingStub?: Promise<{
[name: string]: Function;
}>;
/**
* Construct an instance of ActionsTestingClient.
*
* @param {object} [options] - The configuration object.
* The options accepted by the constructor are described in detail
* in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance).
* The common options are:
* @param {object} [options.credentials] - Credentials object.
* @param {string} [options.credentials.client_email]
* @param {string} [options.credentials.private_key]
* @param {string} [options.email] - Account email address. Required when
* using a .pem or .p12 keyFilename.
* @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
* .p12 key downloaded from the Google Developers Console. If you provide
* a path to a JSON file, the projectId option below is not necessary.
* NOTE: .pem and .p12 require you to specify options.email as well.
* @param {number} [options.port] - The port on which to connect to
* the remote host.
* @param {string} [options.projectId] - The project ID from the Google
* Developer's Console, e.g. 'grape-spaceship-123'. We will also check
* the environment variable GCLOUD_PROJECT for your project ID. If your
* app is running in an environment which supports
* {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
* your project ID will be detected automatically.
* @param {string} [options.apiEndpoint] - The domain name of the
* API remote host.
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
* Follows the structure of {@link gapicConfig}.
* @param {boolean} [options.fallback] - Use HTTP fallback mode.
* In fallback mode, a special browser-compatible transport implementation is used
* instead of gRPC transport. In browser context (if the `window` object is defined)
* the fallback mode is enabled automatically; set `options.fallback` to `false`
* if you need to override this behavior.
*/
constructor(opts?: ClientOptions);
/**
* Initialize the client.
* Performs asynchronous operations (such as authentication) and prepares the client.
* This function will be called automatically when any class method is called for the
* first time, but if you need to initialize it before calling an actual method,
* feel free to call initialize() directly.
*
* You can await on this method if you want to make sure the client is initialized.
*
* @returns {Promise} A promise that resolves to an authenticated service stub.
*/
initialize(): Promise<{
[name: string]: Function;
}>;
/**
* The DNS address for this API service.
* @returns {string} The DNS address for this service.
*/
static get servicePath(): string;
/**
* The DNS address for this API service - same as servicePath(),
* exists for compatibility reasons.
* @returns {string} The DNS address for this service.
*/
static get apiEndpoint(): string;
/**
* The port for this API service.
* @returns {number} The default port for this service.
*/
static get port(): number;
/**
* The scopes needed to make gRPC calls for every method defined
* in this service.
* @returns {string[]} List of default scopes.
*/
static get scopes(): never[];
getProjectId(): Promise<string>;
getProjectId(callback: Callback<string, undefined, undefined>): void;
sendInteraction(request: protos.google.actions.sdk.v2.ISendInteractionRequest, options?: CallOptions): Promise<[
protos.google.actions.sdk.v2.ISendInteractionResponse,
protos.google.actions.sdk.v2.ISendInteractionRequest | undefined,
{} | undefined
]>;
sendInteraction(request: protos.google.actions.sdk.v2.ISendInteractionRequest, options: CallOptions, callback: Callback<protos.google.actions.sdk.v2.ISendInteractionResponse, protos.google.actions.sdk.v2.ISendInteractionRequest | null | undefined, {} | null | undefined>): void;
sendInteraction(request: protos.google.actions.sdk.v2.ISendInteractionRequest, callback: Callback<protos.google.actions.sdk.v2.ISendInteractionResponse, protos.google.actions.sdk.v2.ISendInteractionRequest | null | undefined, {} | null | undefined>): void;
matchIntents(request: protos.google.actions.sdk.v2.IMatchIntentsRequest, options?: CallOptions): Promise<[
protos.google.actions.sdk.v2.IMatchIntentsResponse,
protos.google.actions.sdk.v2.IMatchIntentsRequest | undefined,
{} | undefined
]>;
matchIntents(request: protos.google.actions.sdk.v2.IMatchIntentsRequest, options: CallOptions, callback: Callback<protos.google.actions.sdk.v2.IMatchIntentsResponse, protos.google.actions.sdk.v2.IMatchIntentsRequest | null | undefined, {} | null | undefined>): void;
matchIntents(request: protos.google.actions.sdk.v2.IMatchIntentsRequest, callback: Callback<protos.google.actions.sdk.v2.IMatchIntentsResponse, protos.google.actions.sdk.v2.IMatchIntentsRequest | null | undefined, {} | null | undefined>): void;
setWebAndAppActivityControl(request: protos.google.actions.sdk.v2.ISetWebAndAppActivityControlRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
protos.google.actions.sdk.v2.ISetWebAndAppActivityControlRequest | undefined,
{} | undefined
]>;
setWebAndAppActivityControl(request: protos.google.actions.sdk.v2.ISetWebAndAppActivityControlRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.actions.sdk.v2.ISetWebAndAppActivityControlRequest | null | undefined, {} | null | undefined>): void;
setWebAndAppActivityControl(request: protos.google.actions.sdk.v2.ISetWebAndAppActivityControlRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.actions.sdk.v2.ISetWebAndAppActivityControlRequest | null | undefined, {} | null | undefined>): void;
/**
* Return a fully-qualified draft resource name string.
*
* @param {string} project
* @returns {string} Resource name string.
*/
draftPath(project: string): string;
/**
* Parse the project from Draft resource.
*
* @param {string} draftName
* A fully-qualified path representing Draft resource.
* @returns {string} A string representing the project.
*/
matchProjectFromDraftName(draftName: string): string | number;
/**
* Return a fully-qualified preview resource name string.
*
* @param {string} project
* @param {string} preview
* @returns {string} Resource name string.
*/
previewPath(project: string, preview: string): string;
/**
* Parse the project from Preview resource.
*
* @param {string} previewName
* A fully-qualified path representing Preview resource.
* @returns {string} A string representing the project.
*/
matchProjectFromPreviewName(previewName: string): string | number;
/**
* Parse the preview from Preview resource.
*
* @param {string} previewName
* A fully-qualified path representing Preview resource.
* @returns {string} A string representing the preview.
*/
matchPreviewFromPreviewName(previewName: string): string | number;
/**
* Return a fully-qualified releaseChannel resource name string.
*
* @param {string} project
* @param {string} release_channel
* @returns {string} Resource name string.
*/
releaseChannelPath(project: string, releaseChannel: string): string;
/**
* Parse the project from ReleaseChannel resource.
*
* @param {string} releaseChannelName
* A fully-qualified path representing ReleaseChannel resource.
* @returns {string} A string representing the project.
*/
matchProjectFromReleaseChannelName(releaseChannelName: string): string | number;
/**
* Parse the release_channel from ReleaseChannel resource.
*
* @param {string} releaseChannelName
* A fully-qualified path representing ReleaseChannel resource.
* @returns {string} A string representing the release_channel.
*/
matchReleaseChannelFromReleaseChannelName(releaseChannelName: string): string | number;
/**
* Return a fully-qualified sampleProject resource name string.
*
* @param {string} sample_project
* @returns {string} Resource name string.
*/
sampleProjectPath(sampleProject: string): string;
/**
* Parse the sample_project from SampleProject resource.
*
* @param {string} sampleProjectName
* A fully-qualified path representing SampleProject resource.
* @returns {string} A string representing the sample_project.
*/
matchSampleProjectFromSampleProjectName(sampleProjectName: string): string | number;
/**
* Return a fully-qualified version resource name string.
*
* @param {string} project
* @param {string} version
* @returns {string} Resource name string.
*/
versionPath(project: string, version: string): string;
/**
* Parse the project from Version resource.
*
* @param {string} versionName
* A fully-qualified path representing Version resource.
* @returns {string} A string representing the project.
*/
matchProjectFromVersionName(versionName: string): string | number;
/**
* Parse the version from Version resource.
*
* @param {string} versionName
* A fully-qualified path representing Version resource.
* @returns {string} A string representing the version.
*/
matchVersionFromVersionName(versionName: string): string | number;
/**
* Terminate the gRPC channel and close the client.
*
* The client will no longer be usable and all future behavior is undefined.
* @returns {Promise} A promise that resolves when the client is closed.
*/
close(): Promise<void>;
}