UNPKG

googleapis

Version:
943 lines 969 kB
/// <reference types="node" /> import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common'; import { Readable } from 'stream'; export declare namespace dialogflow_v2 { export interface Options extends GlobalOptions { version: 'v2'; } interface StandardParameters { /** * Auth client or API Key for the request */ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth; /** * V1 error format. */ '$.xgafv'?: string; /** * OAuth access token. */ access_token?: string; /** * Data format for response. */ alt?: 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; /** * 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; } /** * Dialogflow API * * Builds conversational interfaces (for example, chatbots, and voice-powered apps and devices). * * @example * ```js * const {google} = require('googleapis'); * const dialogflow = google.dialogflow('v2'); * ``` */ export class Dialogflow { context: APIRequestContext; projects: Resource$Projects; constructor(options: GlobalOptions, google?: GoogleConfigurable); } /** * Represents the natural speech audio to be processed. */ export interface Schema$GoogleCloudDialogflowCxV3AudioInput { /** * The natural language speech audio to be processed. A single request can contain up to 2 minutes of speech audio data. The transcribed text cannot contain more than 256 bytes. For non-streaming audio detect intent, both `config` and `audio` must be provided. For streaming audio detect intent, `config` must be provided in the first request and `audio` must be provided in all following requests. */ audio?: string | null; /** * Required. Instructs the speech recognizer how to process the speech audio. */ config?: Schema$GoogleCloudDialogflowCxV3InputAudioConfig; } /** * Metadata returned for the TestCases.BatchRunTestCases long running operation. */ export interface Schema$GoogleCloudDialogflowCxV3BatchRunTestCasesMetadata { /** * The test errors. */ errors?: Schema$GoogleCloudDialogflowCxV3TestError[]; } /** * The response message for TestCases.BatchRunTestCases. */ export interface Schema$GoogleCloudDialogflowCxV3BatchRunTestCasesResponse { /** * The test case results. The detailed conversation turns are empty in this response. */ results?: Schema$GoogleCloudDialogflowCxV3TestCaseResult[]; } /** * Represents the natural speech audio to be processed. */ export interface Schema$GoogleCloudDialogflowCxV3beta1AudioInput { /** * The natural language speech audio to be processed. A single request can contain up to 2 minutes of speech audio data. The transcribed text cannot contain more than 256 bytes. For non-streaming audio detect intent, both `config` and `audio` must be provided. For streaming audio detect intent, `config` must be provided in the first request and `audio` must be provided in all following requests. */ audio?: string | null; /** * Required. Instructs the speech recognizer how to process the speech audio. */ config?: Schema$GoogleCloudDialogflowCxV3beta1InputAudioConfig; } /** * Metadata returned for the TestCases.BatchRunTestCases long running operation. */ export interface Schema$GoogleCloudDialogflowCxV3beta1BatchRunTestCasesMetadata { /** * The test errors. */ errors?: Schema$GoogleCloudDialogflowCxV3beta1TestError[]; } /** * The response message for TestCases.BatchRunTestCases. */ export interface Schema$GoogleCloudDialogflowCxV3beta1BatchRunTestCasesResponse { /** * The test case results. The detailed conversation turns are empty in this response. */ results?: Schema$GoogleCloudDialogflowCxV3beta1TestCaseResult[]; } /** * Represents a result from running a test case in an agent environment. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ContinuousTestResult { /** * The resource name for the continuous test result. Format: `projects//locations//agents//environments//continuousTestResults/`. */ name?: string | null; /** * The result of this continuous test run, i.e. whether all the tests in this continuous test run pass or not. */ result?: string | null; /** * Time when the continuous testing run starts. */ runTime?: string | null; /** * A list of individual test case results names in this continuous test run. */ testCaseResults?: string[] | null; } /** * This message is used to hold all the Conversation Signals data, which will be converted to JSON and exported to BigQuery. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ConversationSignals { /** * Required. Turn signals for the current turn. */ turnSignals?: Schema$GoogleCloudDialogflowCxV3beta1TurnSignals; } /** * One interaction between a human and virtual agent. The human provides some input and the virtual agent provides a response. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ConversationTurn { /** * The user input. */ userInput?: Schema$GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput; /** * The virtual agent output. */ virtualAgentOutput?: Schema$GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput; } /** * The input from the human user. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput { /** * Whether sentiment analysis is enabled. */ enableSentimentAnalysis?: boolean | null; /** * Parameters that need to be injected into the conversation during intent detection. */ injectedParameters?: { [key: string]: any; } | null; /** * Supports text input, event input, dtmf input in the test case. */ input?: Schema$GoogleCloudDialogflowCxV3beta1QueryInput; /** * If webhooks should be allowed to trigger in response to the user utterance. Often if parameters are injected, webhooks should not be enabled. */ isWebhookEnabled?: boolean | null; } /** * The output from the virtual agent. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput { /** * The Page on which the utterance was spoken. Only name and displayName will be set. */ currentPage?: Schema$GoogleCloudDialogflowCxV3beta1Page; /** * Required. Input only. The diagnostic info output for the turn. Required to calculate the testing coverage. */ diagnosticInfo?: { [key: string]: any; } | null; /** * Output only. If this is part of a result conversation turn, the list of differences between the original run and the replay for this output, if any. */ differences?: Schema$GoogleCloudDialogflowCxV3beta1TestRunDifference[]; /** * The session parameters available to the bot at this point. */ sessionParameters?: { [key: string]: any; } | null; /** * Response error from the agent in the test result. If set, other output is empty. */ status?: Schema$GoogleRpcStatus; /** * The text responses from the agent for the turn. */ textResponses?: Schema$GoogleCloudDialogflowCxV3beta1ResponseMessageText[]; /** * The Intent that triggered the response. Only name and displayName will be set. */ triggeredIntent?: Schema$GoogleCloudDialogflowCxV3beta1Intent; } /** * Metadata for CreateDocument operation. */ export interface Schema$GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata { /** * The generic information of the operation. */ genericMetadata?: Schema$GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata; } /** * Metadata associated with the long running operation for Versions.CreateVersion. */ export interface Schema$GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata { /** * Name of the created version. Format: `projects//locations//agents//flows//versions/`. */ version?: string | null; } /** * Metadata for DeleteDocument operation. */ export interface Schema$GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata { /** * The generic information of the operation. */ genericMetadata?: Schema$GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata; } /** * Metadata returned for the Environments.DeployFlow long running operation. */ export interface Schema$GoogleCloudDialogflowCxV3beta1DeployFlowMetadata { /** * Errors of running deployment tests. */ testErrors?: Schema$GoogleCloudDialogflowCxV3beta1TestError[]; } /** * The response message for Environments.DeployFlow. */ export interface Schema$GoogleCloudDialogflowCxV3beta1DeployFlowResponse { /** * The name of the flow version deployment. Format: `projects//locations//agents// environments//deployments/`. */ deployment?: string | null; /** * The updated environment where the flow is deployed. */ environment?: Schema$GoogleCloudDialogflowCxV3beta1Environment; } /** * Represents the input for dtmf event. */ export interface Schema$GoogleCloudDialogflowCxV3beta1DtmfInput { /** * The dtmf digits. */ digits?: string | null; /** * The finish digit (if any). */ finishDigit?: string | null; } /** * Represents an environment for an agent. You can create multiple versions of your agent and publish them to separate environments. When you edit an agent, you are editing the draft agent. At any point, you can save the draft agent as an agent version, which is an immutable snapshot of your agent. When you save the draft agent, it is published to the default environment. When you create agent versions, you can publish them to custom environments. You can create a variety of custom environments for testing, development, production, etc. */ export interface Schema$GoogleCloudDialogflowCxV3beta1Environment { /** * The human-readable description of the environment. The maximum length is 500 characters. If exceeded, the request is rejected. */ description?: string | null; /** * Required. The human-readable name of the environment (unique in an agent). Limit of 64 characters. */ displayName?: string | null; /** * The name of the environment. Format: `projects//locations//agents//environments/`. */ name?: string | null; /** * The test cases config for continuous tests of this environment. */ testCasesConfig?: Schema$GoogleCloudDialogflowCxV3beta1EnvironmentTestCasesConfig; /** * Output only. Update time of this environment. */ updateTime?: string | null; /** * A list of configurations for flow versions. You should include version configs for all flows that are reachable from `Start Flow` in the agent. Otherwise, an error will be returned. */ versionConfigs?: Schema$GoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig[]; /** * The webhook configuration for this environment. */ webhookConfig?: Schema$GoogleCloudDialogflowCxV3beta1EnvironmentWebhookConfig; } /** * The configuration for continuous tests. */ export interface Schema$GoogleCloudDialogflowCxV3beta1EnvironmentTestCasesConfig { /** * Whether to run test cases in TestCasesConfig.test_cases periodically. Default false. If set to true, run once a day. */ enableContinuousRun?: boolean | null; /** * Whether to run test cases in TestCasesConfig.test_cases before deploying a flow version to the environment. Default false. */ enablePredeploymentRun?: boolean | null; /** * A list of test case names to run. They should be under the same agent. Format of each test case name: `projects//locations/ /agents//testCases/` */ testCases?: string[] | null; } /** * Configuration for the version. */ export interface Schema$GoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig { /** * Required. Format: projects//locations//agents//flows//versions/. */ version?: string | null; } /** * Configuration for webhooks. */ export interface Schema$GoogleCloudDialogflowCxV3beta1EnvironmentWebhookConfig { /** * The list of webhooks to override for the agent environment. The webhook must exist in the agent. You can override fields in `generic_web_service` and `service_directory`. */ webhookOverrides?: Schema$GoogleCloudDialogflowCxV3beta1Webhook[]; } /** * An event handler specifies an event that can be handled during a session. When the specified event happens, the following actions are taken in order: * If there is a `trigger_fulfillment` associated with the event, it will be called. * If there is a `target_page` associated with the event, the session will transition into the specified page. * If there is a `target_flow` associated with the event, the session will transition into the specified flow. */ export interface Schema$GoogleCloudDialogflowCxV3beta1EventHandler { /** * Required. The name of the event to handle. */ event?: string | null; /** * Output only. The unique identifier of this event handler. */ name?: string | null; /** * The target flow to transition to. Format: `projects//locations//agents//flows/`. */ targetFlow?: string | null; /** * The target page to transition to. Format: `projects//locations//agents//flows//pages/`. */ targetPage?: string | null; /** * The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks. */ triggerFulfillment?: Schema$GoogleCloudDialogflowCxV3beta1Fulfillment; } /** * Represents the event to trigger. */ export interface Schema$GoogleCloudDialogflowCxV3beta1EventInput { /** * Name of the event. */ event?: string | null; } /** * The response message for Agents.ExportAgent. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ExportAgentResponse { /** * Uncompressed raw byte content for agent. This field is populated if none of `agent_uri` and `git_destination` are specified in ExportAgentRequest. */ agentContent?: string | null; /** * The URI to a file containing the exported agent. This field is populated if `agent_uri` is specified in ExportAgentRequest. */ agentUri?: string | null; /** * Commit SHA of the git push. This field is populated if `git_destination` is specified in ExportAgentRequest. */ commitSha?: string | null; } /** * The response message for Flows.ExportFlow. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ExportFlowResponse { /** * Uncompressed raw byte content for flow. */ flowContent?: string | null; /** * The URI to a file containing the exported flow. This field is populated only if `flow_uri` is specified in ExportFlowRequest. */ flowUri?: string | null; } /** * Metadata returned for the TestCases.ExportTestCases long running operation. This message currently has no fields. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ExportTestCasesMetadata { } /** * The response message for TestCases.ExportTestCases. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ExportTestCasesResponse { /** * Uncompressed raw byte content for test cases. */ content?: string | null; /** * The URI to a file containing the exported test cases. This field is populated only if `gcs_uri` is specified in ExportTestCasesRequest. */ gcsUri?: string | null; } /** * A form is a data model that groups related parameters that can be collected from the user. The process in which the agent prompts the user and collects parameter values from the user is called form filling. A form can be added to a page. When form filling is done, the filled parameters will be written to the session. */ export interface Schema$GoogleCloudDialogflowCxV3beta1Form { /** * Parameters to collect from the user. */ parameters?: Schema$GoogleCloudDialogflowCxV3beta1FormParameter[]; } /** * Represents a form parameter. */ export interface Schema$GoogleCloudDialogflowCxV3beta1FormParameter { /** * The default value of an optional parameter. If the parameter is required, the default value will be ignored. */ defaultValue?: any | null; /** * Required. The human-readable name of the parameter, unique within the form. */ displayName?: string | null; /** * Required. The entity type of the parameter. Format: `projects/-/locations/-/agents/-/entityTypes/` for system entity types (for example, `projects/-/locations/-/agents/-/entityTypes/sys.date`), or `projects//locations//agents//entityTypes/` for developer entity types. */ entityType?: string | null; /** * Required. Defines fill behavior for the parameter. */ fillBehavior?: Schema$GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior; /** * Indicates whether the parameter represents a list of values. */ isList?: boolean | null; /** * Indicates whether the parameter content should be redacted in log. If redaction is enabled, the parameter content will be replaced by parameter name during logging. Note: the parameter content is subject to redaction if either parameter level redaction or entity type level redaction is enabled. */ redact?: boolean | null; /** * Indicates whether the parameter is required. Optional parameters will not trigger prompts; however, they are filled if the user specifies them. Required parameters must be filled before form filling concludes. */ required?: boolean | null; } /** * Configuration for how the filling of a parameter should be handled. */ export interface Schema$GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior { /** * Required. The fulfillment to provide the initial prompt that the agent can present to the user in order to fill the parameter. */ initialPromptFulfillment?: Schema$GoogleCloudDialogflowCxV3beta1Fulfillment; /** * The handlers for parameter-level events, used to provide reprompt for the parameter or transition to a different page/flow. The supported events are: * `sys.no-match-`, where N can be from 1 to 6 * `sys.no-match-default` * `sys.no-input-`, where N can be from 1 to 6 * `sys.no-input-default` * `sys.invalid-parameter` `initial_prompt_fulfillment` provides the first prompt for the parameter. If the user's response does not fill the parameter, a no-match/no-input event will be triggered, and the fulfillment associated with the `sys.no-match-1`/`sys.no-input-1` handler (if defined) will be called to provide a prompt. The `sys.no-match-2`/`sys.no-input-2` handler (if defined) will respond to the next no-match/no-input event, and so on. A `sys.no-match-default` or `sys.no-input-default` handler will be used to handle all following no-match/no-input events after all numbered no-match/no-input handlers for the parameter are consumed. A `sys.invalid-parameter` handler can be defined to handle the case where the parameter values have been `invalidated` by webhook. For example, if the user's response fill the parameter, however the parameter was invalidated by webhook, the fulfillment associated with the `sys.invalid-parameter` handler (if defined) will be called to provide a prompt. If the event handler for the corresponding event can't be found on the parameter, `initial_prompt_fulfillment` will be re-prompted. */ repromptEventHandlers?: Schema$GoogleCloudDialogflowCxV3beta1EventHandler[]; } /** * A fulfillment can do one or more of the following actions at the same time: * Generate rich message responses. * Set parameter values. * Call the webhook. Fulfillments can be called at various stages in the Page or Form lifecycle. For example, when a DetectIntentRequest drives a session to enter a new page, the page's entry fulfillment can add a static response to the QueryResult in the returning DetectIntentResponse, call the webhook (for example, to load user data from a database), or both. */ export interface Schema$GoogleCloudDialogflowCxV3beta1Fulfillment { /** * Conditional cases for this fulfillment. */ conditionalCases?: Schema$GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases[]; /** * The list of rich message responses to present to the user. */ messages?: Schema$GoogleCloudDialogflowCxV3beta1ResponseMessage[]; /** * Whether Dialogflow should return currently queued fulfillment response messages in streaming APIs. If a webhook is specified, it happens before Dialogflow invokes webhook. Warning: 1) This flag only affects streaming API. Responses are still queued and returned once in non-streaming API. 2) The flag can be enabled in any fulfillment but only the first 3 partial responses will be returned. You may only want to apply it to fulfillments that have slow webhooks. */ returnPartialResponses?: boolean | null; /** * Set parameter values before executing the webhook. */ setParameterActions?: Schema$GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction[]; /** * The value of this field will be populated in the WebhookRequest `fulfillmentInfo.tag` field by Dialogflow when the associated webhook is called. The tag is typically used by the webhook service to identify which fulfillment is being called, but it could be used for other purposes. This field is required if `webhook` is specified. */ tag?: string | null; /** * The webhook to call. Format: `projects//locations//agents//webhooks/`. */ webhook?: string | null; } /** * A list of cascading if-else conditions. Cases are mutually exclusive. The first one with a matching condition is selected, all the rest ignored. */ export interface Schema$GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases { /** * A list of cascading if-else conditions. */ cases?: Schema$GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase[]; } /** * Each case has a Boolean condition. When it is evaluated to be True, the corresponding messages will be selected and evaluated recursively. */ export interface Schema$GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase { /** * A list of case content. */ caseContent?: Schema$GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent[]; /** * The condition to activate and select this case. Empty means the condition is always true. The condition is evaluated against form parameters or session parameters. See the [conditions reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). */ condition?: string | null; } /** * The list of messages or conditional cases to activate for this case. */ export interface Schema$GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent { /** * Additional cases to be evaluated. */ additionalCases?: Schema$GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases; /** * Returned message. */ message?: Schema$GoogleCloudDialogflowCxV3beta1ResponseMessage; } /** * Setting a parameter value. */ export interface Schema$GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction { /** * Display name of the parameter. */ parameter?: string | null; /** * The new value of the parameter. A null value clears the parameter. */ value?: any | null; } /** * Metadata in google::longrunning::Operation for Knowledge operations. */ export interface Schema$GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata { /** * Required. Output only. The current state of this operation. */ state?: string | null; } /** * Metadata for ImportDocuments operation. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata { /** * The generic information of the operation. */ genericMetadata?: Schema$GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata; } /** * Response message for Documents.ImportDocuments. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse { /** * Includes details about skipped documents or any other warnings. */ warnings?: Schema$GoogleRpcStatus[]; } /** * The response message for Flows.ImportFlow. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ImportFlowResponse { /** * The unique identifier of the new flow. Format: `projects//locations//agents//flows/`. */ flow?: string | null; } /** * Metadata returned for the TestCases.ImportTestCases long running operation. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ImportTestCasesMetadata { /** * Errors for failed test cases. */ errors?: Schema$GoogleCloudDialogflowCxV3beta1TestCaseError[]; } /** * The response message for TestCases.ImportTestCases. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ImportTestCasesResponse { /** * The unique identifiers of the new test cases. Format: `projects//locations//agents//testCases/`. */ names?: string[] | null; } /** * Instructs the speech recognizer on how to process the audio content. */ export interface Schema$GoogleCloudDialogflowCxV3beta1InputAudioConfig { /** * Required. Audio encoding of the audio content to process. */ audioEncoding?: string | null; /** * Optional. If `true`, Dialogflow returns SpeechWordInfo in StreamingRecognitionResult with information about the recognized speech words, e.g. start and end time offsets. If false or unspecified, Speech doesn't return any word-level information. */ enableWordInfo?: boolean | null; /** * Optional. Which Speech model to select for the given request. Select the model best suited to your domain to get best results. If a model is not explicitly specified, then we auto-select a model based on the parameters in the InputAudioConfig. If enhanced speech model is enabled for the agent and an enhanced version of the specified model for the language does not exist, then the speech is recognized using the standard version of the specified model. Refer to [Cloud Speech API documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) for more details. If you specify a model, the following models typically have the best performance: - phone_call (best for Agent Assist and telephony) - latest_short (best for Dialogflow non-telephony) - command_and_search (best for very short utterances and commands) */ model?: string | null; /** * Optional. Which variant of the Speech model to use. */ modelVariant?: string | null; /** * Optional. A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. See [the Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) for more details. */ phraseHints?: string[] | null; /** * Sample rate (in Hertz) of the audio content sent in the query. Refer to [Cloud Speech API documentation](https://cloud.google.com/speech-to-text/docs/basics) for more details. */ sampleRateHertz?: number | null; /** * Optional. If `false` (default), recognition does not cease until the client closes the stream. If `true`, the recognizer will detect a single spoken utterance in input audio. Recognition ceases when it detects the audio's voice has stopped or paused. In this case, once a detected intent is received, the client should close the stream and start a new request with a new stream as needed. Note: This setting is relevant only for streaming methods. */ singleUtterance?: boolean | null; } /** * An intent represents a user's intent to interact with a conversational agent. You can provide information for the Dialogflow API to use to match user input to an intent by adding training phrases (i.e., examples of user input) to your intent. */ export interface Schema$GoogleCloudDialogflowCxV3beta1Intent { /** * Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters. */ description?: string | null; /** * Required. The human-readable name of the intent, unique within the agent. */ displayName?: string | null; /** * Indicates whether this is a fallback intent. Currently only default fallback intent is allowed in the agent, which is added upon agent creation. Adding training phrases to fallback intent is useful in the case of requests that are mistakenly matched, since training phrases assigned to fallback intents act as negative examples that triggers no-match event. */ isFallback?: boolean | null; /** * The key/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols '-' and '_'. International characters are allowed, including letters from unicase alphabets. Keys must start with a letter. Keys and values can be no longer than 63 characters and no more than 128 bytes. Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. "sys-head" means the intent is a head intent. "sys-contextual" means the intent is a contextual intent. */ labels?: { [key: string]: string; } | null; /** * The unique identifier of the intent. Required for the Intents.UpdateIntent method. Intents.CreateIntent populates the name automatically. Format: `projects//locations//agents//intents/`. */ name?: string | null; /** * The collection of parameters associated with the intent. */ parameters?: Schema$GoogleCloudDialogflowCxV3beta1IntentParameter[]; /** * The priority of this intent. Higher numbers represent higher priorities. - If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the `Normal` priority in the console. - If the supplied value is negative, the intent is ignored in runtime detect intent requests. */ priority?: number | null; /** * The collection of training phrases the agent is trained on to identify the intent. */ trainingPhrases?: Schema$GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase[]; } /** * Represents the intent to trigger programmatically rather than as a result of natural language processing. */ export interface Schema$GoogleCloudDialogflowCxV3beta1IntentInput { /** * Required. The unique identifier of the intent. Format: `projects//locations//agents//intents/`. */ intent?: string | null; } /** * Represents an intent parameter. */ export interface Schema$GoogleCloudDialogflowCxV3beta1IntentParameter { /** * Required. The entity type of the parameter. Format: `projects/-/locations/-/agents/-/entityTypes/` for system entity types (for example, `projects/-/locations/-/agents/-/entityTypes/sys.date`), or `projects//locations//agents//entityTypes/` for developer entity types. */ entityType?: string | null; /** * Required. The unique identifier of the parameter. This field is used by training phrases to annotate their parts. */ id?: string | null; /** * Indicates whether the parameter represents a list of values. */ isList?: boolean | null; /** * Indicates whether the parameter content should be redacted in log. If redaction is enabled, the parameter content will be replaced by parameter name during logging. Note: the parameter content is subject to redaction if either parameter level redaction or entity type level redaction is enabled. */ redact?: boolean | null; } /** * Represents an example that the agent is trained on to identify the intent. */ export interface Schema$GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase { /** * Output only. The unique identifier of the training phrase. */ id?: string | null; /** * Required. The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase. Note: The API does not automatically annotate training phrases like the Dialogflow Console does. Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated. If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set. If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways: - `Part.text` is set to a part of the phrase that has no parameters. - `Part.text` is set to a part of the phrase that you want to annotate, and the `parameter_id` field is set. */ parts?: Schema$GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart[]; /** * Indicates how many times this example was added to the intent. */ repeatCount?: number | null; } /** * Represents a part of a training phrase. */ export interface Schema$GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart { /** * The parameter used to annotate this part of the training phrase. This field is required for annotated parts of the training phrase. */ parameterId?: string | null; /** * Required. The text for this part. */ text?: string | null; } /** * A Dialogflow CX conversation (session) can be described and visualized as a state machine. The states of a CX session are represented by pages. For each flow, you define many pages, where your combined pages can handle a complete conversation on the topics the flow is designed for. At any given moment, exactly one page is the current page, the current page is considered active, and the flow associated with that page is considered active. Every flow has a special start page. When a flow initially becomes active, the start page page becomes the current page. For each conversational turn, the current page will either stay the same or transition to another page. You configure each page to collect information from the end-user that is relevant for the conversational state represented by the page. For more information, see the [Page guide](https://cloud.google.com/dialogflow/cx/docs/concept/page). */ export interface Schema$GoogleCloudDialogflowCxV3beta1Page { /** * Required. The human-readable name of the page, unique within the flow. */ displayName?: string | null; /** * The fulfillment to call when the session is entering the page. */ entryFulfillment?: Schema$GoogleCloudDialogflowCxV3beta1Fulfillment; /** * Handlers associated with the page to handle events such as webhook errors, no match or no input. */ eventHandlers?: Schema$GoogleCloudDialogflowCxV3beta1EventHandler[]; /** * The form associated with the page, used for collecting parameters relevant to the page. */ form?: Schema$GoogleCloudDialogflowCxV3beta1Form; /** * The unique identifier of the page. Required for the Pages.UpdatePage method. Pages.CreatePage populates the name automatically. Format: `projects//locations//agents//flows//pages/`. */ name?: string | null; /** * Ordered list of `TransitionRouteGroups` associated with the page. Transition route groups must be unique within a page. * If multiple transition routes within a page scope refer to the same intent, then the precedence order is: page's transition route -\> page's transition route group -\> flow's transition routes. * If multiple transition route groups within a page contain the same intent, then the first group in the ordered list takes precedence. Format:`projects//locations//agents//flows//transitionRouteGroups/`. */ transitionRouteGroups?: string[] | null; /** * A list of transitions for the transition rules of this page. They route the conversation to another page in the same flow, or another flow. When we are in a certain page, the TransitionRoutes are evalauted in the following order: * TransitionRoutes defined in the page with intent specified. * TransitionRoutes defined in the transition route groups with intent specified. * TransitionRoutes defined in flow with intent specified. * TransitionRoutes defined in the transition route groups with intent specified. * TransitionRoutes defined in the page with only condition specified. * TransitionRoutes defined in the transition route groups with only condition specified. */ transitionRoutes?: Schema$GoogleCloudDialogflowCxV3beta1TransitionRoute[]; } /** * Represents page information communicated to and from the webhook. */ export interface Schema$GoogleCloudDialogflowCxV3beta1PageInfo { /** * Always present for WebhookRequest. Ignored for WebhookResponse. The unique identifier of the current page. Format: `projects//locations//agents//flows//pages/`. */ currentPage?: string | null; /** * Always present for WebhookRequest. Ignored for WebhookResponse. The display name of the current page. */ displayName?: string | null; /** * Optional for both WebhookRequest and WebhookResponse. Information about the form. */ formInfo?: Schema$GoogleCloudDialogflowCxV3beta1PageInfoFormInfo; } /** * Represents form information. */ export interface Schema$GoogleCloudDialogflowCxV3beta1PageInfoFormInfo { /** * Optional for both WebhookRequest and WebhookResponse. The parameters contained in the form. Note that the webhook cannot add or remove any form parameter. */ parameterInfo?: Schema$GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo[]; } /** * Represents parameter information. */ export interface Schema$GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo { /** * Always present for WebhookRequest. Required for WebhookResponse. The human-readable name of the parameter, unique within the form. This field cannot be modified by the webhook. */ displayName?: string | null; /** * Optional for WebhookRequest. Ignored for WebhookResponse. Indicates if the parameter value was just collected on the last conversation turn. */ justCollected?: boolean | null; /** * Optional for both WebhookRequest and WebhookResponse. Indicates whether the parameter is required. Optional parameters will not trigger prompts; however, they are filled if the user specifies them. Required parameters must be filled before form filling concludes. */ required?: boolean | null; /** * Always present for WebhookRequest. Required for WebhookResponse. The state of the parameter. This field can be set to INVALID by the webhook to invalidate the parameter; other values set by the webhook will be ignored. */ state?: string | null; /** * Optional for both WebhookRequest and WebhookResponse. The value of the parameter. This field can be set by the webhook to change the parameter value. */ value?: any | null; } /** * Represents the query input. It can contain one of: 1. A conversational query in the form of text. 2. An intent query that specifies which intent to trigger. 3. Natural language speech audio to be processed. 4. An event to be triggered. 5. DTMF digits to invoke an intent and fill in parameter value. */ export interface Schema$GoogleCloudDialogflowCxV3beta1QueryInput { /** * The natural language speech audio to be processed. */ audio?: Schema$GoogleCloudDialogflowCxV3beta1AudioInput; /** * The DTMF event to be handled. */ dtmf?: Schema$GoogleCloudDialogflowCxV3beta1DtmfInput; /** * The event to be triggered. */ event?: Schema$GoogleCloudDialogflowCxV3beta1EventInput; /** * The intent to be triggered. */ intent?: Schema$GoogleCloudDialogflowCxV3beta1IntentInput; /** * Required. The language of the input. See [Language Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. */ languageCode?: string | null; /** * The natural language text to be processed. */ text?: Schema$GoogleCloudDialogflowCxV3beta1TextInput; } /** * Metadata for ReloadDocument operation. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata { /** * The generic information of the operation. */ genericMetadata?: Schema$GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata; } /** * Represents a response message that can be returned by a conversational agent. Response messages are also used for output audio synthesis. The approach is as follows: * If at least one OutputAudioText response is present, then all OutputAudioText responses are linearly concatenated, and the result is used for output audio synthesis. * If the OutputAudioText responses are a mixture of text and SSML, then the concatenated result is treated as SSML; otherwise, the result is treated as either text or SSML as appropriate. The agent designer should ideally use either text or SSML consistently throughout the bot design. * Otherwise, all Text responses are linearly concatenated, and the result is used for output audio synthesis. This approach allows for more sophisticated user experience scenarios, where the text displayed to the user may differ from what is heard. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ResponseMessage { /** * The channel which the response is associated with. Clients can specify the channel via QueryParameters.channel, and only associated channel response will be returned. */ channel?: string | null; /** * Indicates that the conversation succeeded. */ conversationSuccess?: Schema$GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess; /** * Output only. A signal that indicates the interaction with the Dialogflow agent has ended. This message is generated by Dialogflow only when the conversation reaches `END_SESSION` page. It is not supposed to be defined by the user. It's guaranteed that there is at most one such message in each response. */ endInteraction?: Schema$GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction; /** * Hands off conversation to a human agent. */ liveAgentHandoff?: Schema$GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff; /** * Output only. An audio response message composed of both the synthesized Dialogflow agent responses and responses defined via play_audio. This message is generated by Dialogflow only and not supposed to be defined by the user. */ mixedAudio?: Schema$GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio; /** * A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message. */ outputAudioText?: Schema$GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText; /** * Returns a response containing a custom, platform-specific payload. */ payload?: { [key: string]: any; } | null; /** * Signal that the client should play an audio clip hosted at a client-specific URI. Dialogflow uses this to construct mixed_audio. However, Dialogflow itself does not try to read or process the URI in any way. */ playAudio?: Schema$GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio; /** * A signal that the client should transfer the phone call connected to this agent to a third-party endpoint. */ telephonyTransferCall?: Schema$GoogleCloudDialogflowCxV3beta1ResponseMessageTelephonyTransferCall; /** * Returns a text response. */ text?: Schema$GoogleCloudDialogflowCxV3beta1ResponseMessageText; } /** * Indicates that the conversation succeeded, i.e., the bot handled the issue that the customer talked to it about. Dialogflow only uses this to determine which conversations should be counted as successful and doesn't process the metadata in this message in any way. Note that Dialogflow also considers conversations that get to the conversation end page as successful even if they don't return ConversationSuccess. You may set this, for example: * In the entry_fulfillment of a Page if entering the page indicates that the conversation succeeded. * In a webhook response when you determine that you handled the customer issue. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess { /** * Custom metadata. Dialogflow doesn