UNPKG

@googleapis/dialogflow

Version:
1,161 lines (1,151 loc) 1.19 MB
// Copyright 2020 Google LLC // 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. /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-empty-interface */ /* eslint-disable @typescript-eslint/no-namespace */ /* eslint-disable no-irregular-whitespace */ import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, createAPIRequest, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext, } from 'googleapis-common'; import {Readable} from 'stream'; export namespace dialogflow_v3beta1 { export interface Options extends GlobalOptions { version: 'v3beta1'; } 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('v3beta1'); * ``` */ export class Dialogflow { context: APIRequestContext; projects: Resource$Projects; constructor(options: GlobalOptions, google?: GoogleConfigurable) { this.context = { _options: options || {}, google, }; this.projects = new Resource$Projects(this.context); } } /** * Hierarchical advanced settings for agent/flow/page/fulfillment/parameter. Settings exposed at lower level overrides the settings exposed at higher level. Overriding occurs at the sub-setting level. For example, the playback_interruption_settings at fulfillment level only overrides the playback_interruption_settings at the agent level, leaving other settings at the agent level unchanged. DTMF settings does not override each other. DTMF settings set at different levels define DTMF detections running in parallel. Hierarchy: Agent-\>Flow-\>Page-\>Fulfillment/Parameter. */ export interface Schema$GoogleCloudDialogflowCxV3AdvancedSettings { /** * If present, incoming audio is exported by Dialogflow to the configured Google Cloud Storage destination. Exposed at the following levels: - Agent level - Flow level */ audioExportGcsDestination?: Schema$GoogleCloudDialogflowCxV3GcsDestination; /** * Settings for DTMF. Exposed at the following levels: - Agent level - Flow level - Page level - Parameter level. */ dtmfSettings?: Schema$GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings; /** * Settings for logging. Settings for Dialogflow History, Contact Center messages, StackDriver logs, and speech logging. Exposed at the following levels: - Agent level. */ loggingSettings?: Schema$GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings; /** * Settings for speech to text detection. Exposed at the following levels: - Agent level - Flow level - Page level - Parameter level */ speechSettings?: Schema$GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings; } /** * Define behaviors for DTMF (dual tone multi frequency). */ export interface Schema$GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings { /** * If true, incoming audio is processed for DTMF (dual tone multi frequency) events. For example, if the caller presses a button on their telephone keypad and DTMF processing is enabled, Dialogflow will detect the event (e.g. a "3" was pressed) in the incoming audio and pass the event to the bot to drive business logic (e.g. when 3 is pressed, return the account balance). */ enabled?: boolean | null; /** * Endpoint timeout setting for matching dtmf input to regex. */ endpointingTimeoutDuration?: string | null; /** * The digit that terminates a DTMF digit sequence. */ finishDigit?: string | null; /** * Interdigit timeout setting for matching dtmf input to regex. */ interdigitTimeoutDuration?: string | null; /** * Max length of DTMF digits. */ maxDigits?: number | null; } /** * Define behaviors on logging. */ export interface Schema$GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings { /** * Enables consent-based end-user input redaction, if true, a pre-defined session parameter `$session.params.conversation-redaction` will be used to determine if the utterance should be redacted. */ enableConsentBasedRedaction?: boolean | null; /** * Enables DF Interaction logging. */ enableInteractionLogging?: boolean | null; /** * Enables Google Cloud Logging. */ enableStackdriverLogging?: boolean | null; } /** * Define behaviors of speech to text detection. */ export interface Schema$GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings { /** * Sensitivity of the speech model that detects the end of speech. Scale from 0 to 100. */ endpointerSensitivity?: number | null; /** * Mapping from language to Speech-to-Text model. The mapped Speech-to-Text model will be selected for requests from its corresponding language. For more information, see [Speech models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models). */ models?: {[key: string]: string} | null; /** * Timeout before detecting no speech. */ noSpeechTimeout?: string | null; /** * Use timeout based endpointing, interpreting endpointer sensitivity as seconds of timeout value. */ useTimeoutBasedEndpointing?: boolean | null; } /** * 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; } /** * Configuration of the barge-in behavior. Barge-in instructs the API to return a detected utterance at a proper time while the client is playing back the response audio from a previous request. When the client sees the utterance, it should stop the playback and immediately get ready for receiving the responses for the current request. The barge-in handling requires the client to start streaming audio input as soon as it starts playing back the audio from the previous response. The playback is modeled into two phases: * No barge-in phase: which goes first and during which speech detection should not be carried out. * Barge-in phase: which follows the no barge-in phase and during which the API starts speech detection and may inform the client that an utterance has been detected. Note that no-speech event is not expected in this phase. The client provides this configuration in terms of the durations of those two phases. The durations are measured in terms of the audio length from the start of the input audio. No-speech event is a response with END_OF_UTTERANCE without any transcript following up. */ export interface Schema$GoogleCloudDialogflowCxV3BargeInConfig { /** * Duration that is not eligible for barge-in at the beginning of the input audio. */ noBargeInDuration?: string | null; /** * Total duration for the playback at the beginning of the input audio. */ totalDuration?: string | null; } /** * 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[]; } /** * Action performed by end user or Dialogflow agent in the conversation. */ export interface Schema$GoogleCloudDialogflowCxV3beta1Action { /** * Optional. Action performed by the agent as a message. */ agentUtterance?: Schema$GoogleCloudDialogflowCxV3beta1AgentUtterance; /** * Optional. The agent received an event from the customer or a system event is emitted. */ event?: Schema$GoogleCloudDialogflowCxV3beta1Event; /** * Optional. Action performed on behalf of the agent by invoking a CX flow. */ flowInvocation?: Schema$GoogleCloudDialogflowCxV3beta1FlowInvocation; /** * Optional. Action performed on behalf of the agent by transitioning to a target CX flow. */ flowTransition?: Schema$GoogleCloudDialogflowCxV3beta1FlowTransition; /** * Optional. Action performed on behalf of the agent by invoking a child playbook. */ playbookInvocation?: Schema$GoogleCloudDialogflowCxV3beta1PlaybookInvocation; /** * Optional. Action performed on behalf of the agent by transitioning to a target playbook. */ playbookTransition?: Schema$GoogleCloudDialogflowCxV3beta1PlaybookTransition; /** * Optional. Action performed on behalf of the agent by calling a plugin tool. */ toolUse?: Schema$GoogleCloudDialogflowCxV3beta1ToolUse; /** * Optional. Agent obtained a message from the customer. */ userUtterance?: Schema$GoogleCloudDialogflowCxV3beta1UserUtterance; } /** * Hierarchical advanced settings for agent/flow/page/fulfillment/parameter. Settings exposed at lower level overrides the settings exposed at higher level. Overriding occurs at the sub-setting level. For example, the playback_interruption_settings at fulfillment level only overrides the playback_interruption_settings at the agent level, leaving other settings at the agent level unchanged. DTMF settings does not override each other. DTMF settings set at different levels define DTMF detections running in parallel. Hierarchy: Agent-\>Flow-\>Page-\>Fulfillment/Parameter. */ export interface Schema$GoogleCloudDialogflowCxV3beta1AdvancedSettings { /** * If present, incoming audio is exported by Dialogflow to the configured Google Cloud Storage destination. Exposed at the following levels: - Agent level - Flow level */ audioExportGcsDestination?: Schema$GoogleCloudDialogflowCxV3beta1GcsDestination; /** * Settings for DTMF. Exposed at the following levels: - Agent level - Flow level - Page level - Parameter level. */ dtmfSettings?: Schema$GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings; /** * Settings for logging. Settings for Dialogflow History, Contact Center messages, StackDriver logs, and speech logging. Exposed at the following levels: - Agent level. */ loggingSettings?: Schema$GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings; /** * Settings for speech to text detection. Exposed at the following levels: - Agent level - Flow level - Page level - Parameter level */ speechSettings?: Schema$GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings; } /** * Define behaviors for DTMF (dual tone multi frequency). */ export interface Schema$GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings { /** * If true, incoming audio is processed for DTMF (dual tone multi frequency) events. For example, if the caller presses a button on their telephone keypad and DTMF processing is enabled, Dialogflow will detect the event (e.g. a "3" was pressed) in the incoming audio and pass the event to the bot to drive business logic (e.g. when 3 is pressed, return the account balance). */ enabled?: boolean | null; /** * Endpoint timeout setting for matching dtmf input to regex. */ endpointingTimeoutDuration?: string | null; /** * The digit that terminates a DTMF digit sequence. */ finishDigit?: string | null; /** * Interdigit timeout setting for matching dtmf input to regex. */ interdigitTimeoutDuration?: string | null; /** * Max length of DTMF digits. */ maxDigits?: number | null; } /** * Define behaviors on logging. */ export interface Schema$GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings { /** * Enables consent-based end-user input redaction, if true, a pre-defined session parameter `$session.params.conversation-redaction` will be used to determine if the utterance should be redacted. */ enableConsentBasedRedaction?: boolean | null; /** * Enables DF Interaction logging. */ enableInteractionLogging?: boolean | null; /** * Enables Google Cloud Logging. */ enableStackdriverLogging?: boolean | null; } /** * Define behaviors of speech to text detection. */ export interface Schema$GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings { /** * Sensitivity of the speech model that detects the end of speech. Scale from 0 to 100. */ endpointerSensitivity?: number | null; /** * Mapping from language to Speech-to-Text model. The mapped Speech-to-Text model will be selected for requests from its corresponding language. For more information, see [Speech models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models). */ models?: {[key: string]: string} | null; /** * Timeout before detecting no speech. */ noSpeechTimeout?: string | null; /** * Use timeout based endpointing, interpreting endpointer sensitivity as seconds of timeout value. */ useTimeoutBasedEndpointing?: boolean | null; } /** * Agents are best described as Natural Language Understanding (NLU) modules that transform user requests into actionable data. You can include agents in your app, product, or service to determine user intent and respond to the user in a natural way. After you create an agent, you can add Intents, Entity Types, Flows, Fulfillments, Webhooks, TransitionRouteGroups and so on to manage the conversation flows. */ export interface Schema$GoogleCloudDialogflowCxV3beta1Agent { /** * Hierarchical advanced settings for this agent. The settings exposed at the lower level overrides the settings exposed at the higher level. */ advancedSettings?: Schema$GoogleCloudDialogflowCxV3beta1AdvancedSettings; /** * Optional. Answer feedback collection settings. */ answerFeedbackSettings?: Schema$GoogleCloudDialogflowCxV3beta1AgentAnswerFeedbackSettings; /** * The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted [Web Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) integration. */ avatarUri?: string | null; /** * Optional. The BigQuery export settings for this agent. The conversation data will be exported to BigQuery tables if it is enabled. By default, BigQuery export settings will not be exported with agent. You need to set include_bigquery_export_settings to include it in the exported agent. */ bigqueryExportSettings?: Schema$GoogleCloudDialogflowCxV3beta1BigQueryExportSettings; /** * Optional. Settings for custom client certificates. */ clientCertificateSettings?: Schema$GoogleCloudDialogflowCxV3beta1AgentClientCertificateSettings; /** * Required. Immutable. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) for a list of the currently supported language codes. This field cannot be set by the Agents.UpdateAgent method. */ defaultLanguageCode?: string | null; /** * The description of the agent. The maximum length is 500 characters. If exceeded, the request is rejected. */ description?: string | null; /** * Required. The human-readable name of the agent, unique within the location. */ displayName?: string | null; /** * Optional. Enable training multi-lingual models for this agent. These models will be trained on all the languages supported by the agent. */ enableMultiLanguageTraining?: boolean | null; /** * Indicates if automatic spell correction is enabled in detect intent requests. */ enableSpellCorrection?: boolean | null; /** * Indicates if stackdriver logging is enabled for the agent. Please use agent.advanced_settings instead. */ enableStackdriverLogging?: boolean | null; /** * Gen App Builder-related agent-level settings. */ genAppBuilderSettings?: Schema$GoogleCloudDialogflowCxV3beta1AgentGenAppBuilderSettings; /** * Git integration settings for this agent. */ gitIntegrationSettings?: Schema$GoogleCloudDialogflowCxV3beta1AgentGitIntegrationSettings; /** * Indicates whether the agent is locked for changes. If the agent is locked, modifications to the agent will be rejected except for RestoreAgent. */ locked?: boolean | null; /** * The unique identifier of the agent. Required for the Agents.UpdateAgent method. Agents.CreateAgent populates the name automatically. Format: `projects//locations//agents/`. */ name?: string | null; /** * Optional. Settings for end user personalization. */ personalizationSettings?: Schema$GoogleCloudDialogflowCxV3beta1AgentPersonalizationSettings; /** * Optional. Output only. A read only boolean field reflecting Zone Isolation status of the agent. */ satisfiesPzi?: boolean | null; /** * Optional. Output only. A read only boolean field reflecting Zone Separation status of the agent. */ satisfiesPzs?: boolean | null; /** * Name of the SecuritySettings reference for the agent. Format: `projects//locations//securitySettings/`. */ securitySettings?: string | null; /** * Speech recognition related settings. */ speechToTextSettings?: Schema$GoogleCloudDialogflowCxV3beta1SpeechToTextSettings; /** * Name of the start flow in this agent. A start flow will be automatically created when the agent is created, and can only be deleted by deleting the agent. Format: `projects//locations//agents//flows/`. Currently only the default start flow with id "00000000-0000-0000-0000-000000000000" is allowed. */ startFlow?: string | null; /** * Name of the start playbook in this agent. A start playbook will be automatically created when the agent is created, and can only be deleted by deleting the agent. Format: `projects//locations//agents//playbooks/`. Currently only the default playbook with id "00000000-0000-0000-0000-000000000000" is allowed. */ startPlaybook?: string | null; /** * The list of all languages supported by the agent (except for the `default_language_code`). */ supportedLanguageCodes?: string[] | null; /** * Settings on instructing the speech synthesizer on how to generate the output audio content. */ textToSpeechSettings?: Schema$GoogleCloudDialogflowCxV3beta1TextToSpeechSettings; /** * Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris. */ timeZone?: string | null; } /** * Settings for answer feedback collection. */ export interface Schema$GoogleCloudDialogflowCxV3beta1AgentAnswerFeedbackSettings { /** * Optional. If enabled, end users will be able to provide answer feedback to Dialogflow responses. Feature works only if interaction logging is enabled in the Dialogflow agent. */ enableAnswerFeedback?: boolean | null; } /** * Settings for custom client certificates. */ export interface Schema$GoogleCloudDialogflowCxV3beta1AgentClientCertificateSettings { /** * Optional. The name of the SecretManager secret version resource storing the passphrase. 'passphrase' should be left unset if the private key is not encrypted. Format: `projects/{project\}/secrets/{secret\}/versions/{version\}` */ passphrase?: string | null; /** * Required. The name of the SecretManager secret version resource storing the private key encoded in PEM format. Format: `projects/{project\}/secrets/{secret\}/versions/{version\}` */ privateKey?: string | null; /** * Required. The ssl certificate encoded in PEM format. This string must include the begin header and end footer lines. */ sslCertificate?: string | null; } /** * Settings for Gen App Builder. */ export interface Schema$GoogleCloudDialogflowCxV3beta1AgentGenAppBuilderSettings { /** * Required. The full name of the Gen App Builder engine related to this agent if there is one. Format: `projects/{Project ID\}/locations/{Location ID\}/collections/{Collection ID\}/engines/{Engine ID\}` */ engine?: string | null; } /** * Settings for connecting to Git repository for an agent. */ export interface Schema$GoogleCloudDialogflowCxV3beta1AgentGitIntegrationSettings { /** * Git connection settings. */ gitConnectionSettings?: Schema$GoogleCloudDialogflowCxV3beta1AgentGitIntegrationSettingsGitConnectionSettings; /** * GitHub settings. */ githubSettings?: Schema$GoogleCloudDialogflowCxV3beta1AgentGitIntegrationSettingsGithubSettings; } /** * Integration settings for a Git service hosted on Cloud Run. */ export interface Schema$GoogleCloudDialogflowCxV3beta1AgentGitIntegrationSettingsGitConnectionSettings { /** * The name of the SecretManager secret version resource storing the git access token. Format: `projects/{project\}/secrets/{secret\}/versions/{version\}` */ accessTokenSecret?: string | null; /** * Optional. List of branches configured for the repository. */ branches?: string[] | null; /** * Required. Display name for the repository */ displayName?: string | null; /** * Required. Git server reporitory URI. */ repositoryUri?: string | null; /** * Required. Default branch of the repository. */ trackingBranch?: string | null; } /** * Settings of integration with GitHub. */ export interface Schema$GoogleCloudDialogflowCxV3beta1AgentGitIntegrationSettingsGithubSettings { /** * The access token used to authenticate the access to the GitHub repository. */ accessToken?: string | null; /** * A list of branches configured to be used from Dialogflow. */ branches?: string[] | null; /** * The unique repository display name for the GitHub repository. */ displayName?: string | null; /** * The GitHub repository URI related to the agent. */ repositoryUri?: string | null; /** * The branch of the GitHub repository tracked for this agent. */ trackingBranch?: string | null; } /** * Settings for end user personalization. */ export interface Schema$GoogleCloudDialogflowCxV3beta1AgentPersonalizationSettings { /** * Optional. Default end user metadata, used when processing DetectIntent requests. Recommended to be filled as a template instead of hard-coded value, for example { "age": "$session.params.age" \}. The data will be merged with the QueryParameters.end_user_metadata in DetectIntentRequest.query_params during query processing. */ defaultEndUserMetadata?: {[key: string]: any} | null; } /** * AgentUtterance represents one message sent by the agent. */ export interface Schema$GoogleCloudDialogflowCxV3beta1AgentUtterance { /** * Required. Message content in text. */ text?: string | null; } /** * The response message for Agents.GetAgentValidationResult. */ export interface Schema$GoogleCloudDialogflowCxV3beta1AgentValidationResult { /** * Contains all flow validation results. */ flowValidationResults?: Schema$GoogleCloudDialogflowCxV3beta1FlowValidationResult[]; /** * The unique identifier of the agent validation result. Format: `projects//locations//agents//validationResult`. */ name?: string | null; } /** * Stores information about feedback provided by users about a response. */ export interface Schema$GoogleCloudDialogflowCxV3beta1AnswerFeedback { /** * Optional. Custom rating from the user about the provided answer, with maximum length of 1024 characters. For example, client could use a customized JSON object to indicate the rating. */ customRating?: string | null; /** * Optional. Rating from user for the specific Dialogflow response. */ rating?: string | null; /** * Optional. In case of thumbs down rating provided, users can optionally provide context about the rating. */ ratingReason?: Schema$GoogleCloudDialogflowCxV3beta1AnswerFeedbackRatingReason; } /** * Stores extra information about why users provided thumbs down rating. */ export interface Schema$GoogleCloudDialogflowCxV3beta1AnswerFeedbackRatingReason { /** * Optional. Additional feedback about the rating. This field can be populated without choosing a predefined `reason`. */ feedback?: string | null; /** * Optional. Custom reason labels for thumbs down rating provided by the user. The maximum number of labels allowed is 10 and the maximum length of a single label is 128 characters. */ reasonLabels?: string[] | null; } /** * 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; } /** * Configuration of the barge-in behavior. Barge-in instructs the API to return a detected utterance at a proper time while the client is playing back the response audio from a previous request. When the client sees the utterance, it should stop the playback and immediately get ready for receiving the responses for the current request. The barge-in handling requires the client to start streaming audio input as soon as it starts playing back the audio from the previous response. The playback is modeled into two phases: * No barge-in phase: which goes first and during which speech detection should not be carried out. * Barge-in phase: which follows the no barge-in phase and during which the API starts speech detection and may inform the client that an utterance has been detected. Note that no-speech event is not expected in this phase. The client provides this configuration in terms of the durations of those two phases. The durations are measured in terms of the audio length from the start of the input audio. No-speech event is a response with END_OF_UTTERANCE without any transcript following up. */ export interface Schema$GoogleCloudDialogflowCxV3beta1BargeInConfig { /** * Duration that is not eligible for barge-in at the beginning of the input audio. */ noBargeInDuration?: string | null; /** * Total duration for the playback at the beginning of the input audio. */ totalDuration?: string | null; } /** * The request message for TestCases.BatchDeleteTestCases. */ export interface Schema$GoogleCloudDialogflowCxV3beta1BatchDeleteTestCasesRequest { /** * Required. Format of test case names: `projects//locations//agents//testCases/`. */ names?: string[] | null; } /** * Metadata returned for the TestCases.BatchRunTestCases long running operation. */ export interface Schema$GoogleCloudDialogflowCxV3beta1BatchRunTestCasesMetadata { /** * The test errors. */ errors?: Schema$GoogleCloudDialogflowCxV3beta1TestError[]; } /** * The request message for TestCases.BatchRunTestCases. */ export interface Schema$GoogleCloudDialogflowCxV3beta1BatchRunTestCasesRequest { /** * Optional. If not set, draft environment is assumed. Format: `projects//locations//agents//environments/`. */ environment?: string | null; /** * Required. Format: `projects//locations//agents//testCases/`. */ testCases?: string[] | null; } /** * 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[]; } /** * The settings of BigQuery export. */ export interface Schema$GoogleCloudDialogflowCxV3beta1BigQueryExportSettings { /** * The BigQuery table to export. Format: `projects//datasets//tables/`. */ bigqueryTable?: string | null; /** * The field to indicate whether the BigQuery export is enabled. */ enabled?: boolean | null; } /** * Boost specification to boost certain documents. A copy of google.cloud.discoveryengine.v1main.BoostSpec, field documentation is available at https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1alpha/BoostSpec */ export interface Schema$GoogleCloudDialogflowCxV3beta1BoostSpec { /** * Optional. Condition boost specifications. If a document matches multiple conditions in the specifications, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20. */ conditionBoostSpecs?: Schema$GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpec[]; } /** * Boost applies to documents which match a condition. */ export interface Schema$GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpec { /** * Optional. Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. */ boost?: number | null; /** * Optional. Complex specification for custom ranking based on customer defined attribute value. */ boostControlSpec?: Schema$GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpecBoostControlSpec; /** * Optional. An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. Examples: * To boost documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) */ condition?: string | null; } /** * Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above. */ export interface Schema$GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpecBoostControlSpec { /** * Optional. The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value). */ attributeType?: string | null; /** * Optional. The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here. */ controlPoints?: Schema$GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpecBoostControlSpecControlPoint[]; /** * Optional. The name of the field whose value will be used to determine the boost amount. */ fieldName?: string | null; /** * Optional. The interpolation type to be applied to connect the control points listed below. */ interpolationType?: string | null; } /** * The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable). */ export interface Schema$GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpecBoostControlSpecControlPoint { /** * Optional. Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. */ attributeValue?: string | null; /** * Optional. The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above. */ boostAmount?: number | null; } /** * Boost specifications for data stores. */ export interface Schema$GoogleCloudDialogflowCxV3beta1BoostSpecs { /** * Optional. Data Stores where the boosting configuration is applied. The full names of the referenced data stores. Formats: `projects/{project\}/locations/{location\}/collections/{collection\}/dataStores/{data_store\}` `projects/{project\}/locations/{location\}/dataStores/{data_store\} */ dataStores?: string[] | null; /** * Optional. A list of boosting specifications. */ spec?: Schema$GoogleCloudDialogflowCxV3beta1BoostSpec[]; } /** * The response message for TestCases.CalculateCoverage. */ export interface Schema$GoogleCloudDialogflowCxV3beta1CalculateCoverageResponse { /** * The agent to calculate coverage for. Format: `projects//locations//agents/`. */ agent?: string | null; /** * Intent coverage. */ intentCoverage?: Schema$GoogleCloudDialogflowCxV3beta1IntentCoverage; /** * Transition route group coverage. */ routeGroupCoverage?: Schema$GoogleCloudDialogflowCxV3beta1TransitionRouteGroupCoverage; /** * Transition (excluding transition route groups) coverage. */ transitionCoverage?: Schema$GoogleCloudDialogflowCxV3beta1TransitionCoverage; } /** * Changelogs represents a change made to a given agent. */ export interface Schema$GoogleCloudDialogflowCxV3beta1Changelog { /** * The action of the change. */ action?: string | null; /** * The timestamp of the change. */ createTime?: string | null; /** * The affected resource display name of the change. */ displayName?: string | null; /** * The affected language code of the change. */ languageCode?: string | null; /** * The unique identifier of the changelog. Format: `projects//locations//agents//changelogs/`. */ name?: string | null; /** * The affected resource name of the change. */ resource?: string | null; /** * The affected resource type. */ type?: string | null; /** * Email address of the authenticated user. */ userEmail?: string | null; } /** * The request message for Versions.CompareVersions. */ export interface Schema$GoogleCloudDialogflowCxV3beta1CompareVersionsRequest { /** * The language to compare the flow versions for. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. */ languageCode?: string | null; /** * Required. Name of the target flow version to compare with the base version. Use version ID `0` to indicate the draft version of the specified flow. Format: `projects//locations//agents//flows//versions/`. */ targetVersion?: string | null; } /** * The response message for Versions.CompareVersions. */ export interface Schema$GoogleCloudDialogflowCxV3beta1CompareVersionsResponse { /** * JSON representation of the base version content. */ baseVersionContentJson?: string | null; /** * The timestamp when the two version compares. */ compareTime?: string | null; /** * JSON representation of the target version content. */ targetVersionContentJson?: string | null; } /** * 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; } /** * Represents a conversation. */ export interface Schema$GoogleCloudDialogflowCxV3beta1Conversation { /** * Duration of the conversation. */ duration?: string | null; /** * Environment of the conversation. Only `name` and `display_name` are filled in this message. */ environment?: Schema$GoogleCloudDialogflowCxV3beta1Environment; /** * All the Flow the conversation has went through. Only `name` and `display_name` are filled in this message. */ flows?: Schema$GoogleCloudDialogflowCxV3beta1Flow[]; /** * Flow versions used in the conversation. */ flowVersions?: {[key: string]: string} | null; /** * All the matched Intent in the conversation. Only `name` and `display_name` are filled in this message. */ intents?: Schema$GoogleCloudDialogflowCxV3beta1Intent[]; /** * Interactions of the conversation. Only populated for `GetConversation` and empty for `ListConversations`. */ interactions?: Schema$GoogleCloudDialogflowCxV3beta1ConversationInteraction[]; /** * The language of the conversation, which is the language of the first request in the conversation. */ languageCode?: string | null; /** * Conversation metrics. */ metrics?: Schema$GoogleCloudDialogflowCxV3beta1ConversationMetrics; /** * Identifier. The identifier of the conversation. If conversation ID is reused, interactions happened later than 48 hours of the conversation's create time will be ignored. Format: `projects//locations//agents//conversations/` */ name?: string | null; /** * All the Page the conversation has went through. Only `name` and `display_name` are filled in this message. */ pages?: Schema$GoogleCloudDialogflowCxV3beta1Page[]; /** * Start time of the conversation, which is the time of the first request of the conversation. */ startTime?: string | null; /** * The type of the conversation. */ type?: string | null; } /** * Represents an interaction between an end user and a Dialogflow CX agent using V3 (Streaming)DetectIntent API, or an interaction between an end user and a Dialogflow CX agent using V2 (Streaming)AnalyzeContent API. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ConversationInteraction { /** * Answer feedback for the final response. */ answerFeedback?: Schema$GoogleCloudDialogflowCxV3beta1AnswerFeedback; /** * The time that the interaction was created. */ createTime?: string | null; /** * Missing transition predicted for the interaction. This field is set only if the interaction match type was no-match. */ missingTransition?: Schema$GoogleCloudDialogflowCxV3beta1ConversationInteractionMissingTransition; /** * The partial responses of the interaction. Empty if there is no partial response in the interaction. See the partial response documentation. */ partialResponses?: Schema$GoogleCloudDialogflowCxV3beta1DetectIntentResponse[]; /** * The request of the interaction. */ request?: Schema$GoogleCloudDialogflowCxV3beta1DetectIntentRequest; /** * The input text or the transcript of the input audio in the request. */ requestUtterances?: string | null; /** * The final response of the interaction. */ response?: Schema$GoogleCloudDialogflowCxV3beta1DetectIntentResponse; /** * The output text or the transcript of the output audio in the responses. If multiple output messages are returned, they will be concatenated into one. */ responseUtterances?: string | null; /** * Metrics associated with different processing steps. Names and number of steps depend on the request and can change without a notice. */ stepMetrics?: Schema$GoogleCloudDialogflowCxV3beta1ConversationInteractionStepMetrics[]; } /** * Information collected for DF CX agents in case NLU predicted an intent that was filtered out as being inactive which may indicate a missing transition and/or absent functionality. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ConversationInteractionMissingTransition { /** * Name of the intent that could have triggered. */ intentDisplayName?: string | null; /** * Score of the above intent. The higher it is the more likely a transition was missed on a given page. */ score?: number | null; } /** * Metrics of each processing step. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ConversationInteractionStepMetrics { /** * Processing latency of the step. */ latency?: string | null; /** * Name of the request processing step. */ name?: string | null; } /** * Represents metrics for the conversation. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ConversationMetrics { /** * The average confidence all of the Match in the conversation. Values range from 0.0 (completely uncertain) to 1.0 (completely certain). */ averageMatchConfidence?: number | null; /** * A signal that indicates the interaction with the Dialogflow agent has ended. If any response has the ResponseMessage.end_interaction signal, this is set to true. */ hasEndInteraction?: boolean | null; /** * Hands off conversation to a human agent. If any response has the ResponseMessage.live_agent_handoffsignal, this is set to true. */ hasLiveAgentHandoff?: boolean | null; /** * Duration of all the input's audio in the conversation. */ inputAudioDuration?: string | null; /** * The number of interactions in the conversation. */ interactionCount?: number | null; /** * Match type counts. */ matchTypeCount?: Schema$GoogleCloudDialogflowCxV3beta1ConversationMetricsMatchTypeCount; /** * Maximum latency of the Webhook calls in the conversation. */ maxWebhookLatency?: string | null; /** * Duration of all the output's audio in the conversation. */ outputAudioDuration?: string | null; /** * Query input counts. */ queryInputCount?: Schema$GoogleCloudDialogflowCxV3beta1ConversationMetricsQueryInputCount; } /** * Count by Match.MatchType of the matches in the conversation. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ConversationMetricsMatchTypeCount { /** * The number of matches with type Match.MatchType.DIRECT_INTENT. */ directIntentCount?: number | null; /** * The number of matches with type Match.MatchType.EVENT. */ eventCount?: number | null; /** * The number of matches with type Match.MatchType.INTENT. */ intentCount?: number | null; /** * The number of matches with type Match.MatchType.NO_INPUT. */ noInputCount?: number | null; /** * The number of matches with type Match.MatchType.NO_MATCH. */ noMatchCount?: number | null; /** * The number of matches with type Match.MatchType.PARAMETER_FILLING. */ parameterFillingCount?: number | null; /** * The number of matches with type Match.MatchType.MATCH_TYPE_UNSPECIFIED. */ unspecifiedCount?: number | null; } /** * Count by types of QueryInput of the requests in the conversation. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ConversationMetricsQueryInputCount { /** * The number of AudioInput in the conversation. */ audioCount?: number | null; /** * The number of DtmfInput in the conversation. */ dtmfCount?: number | null; /** * The number of EventInput in the conversation. */ eventCount?: number | null; /** * The number of IntentInput in the conversation. */ intentCount?: number | null; /** * The number of TextInput in the conversation. */ textCount?: number | 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. */