UNPKG

googleapis

Version:
1,018 lines 775 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_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); } /** * 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 1 minute 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[]; } /** * 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, and so on to manage the conversation flows.. */ export interface Schema$GoogleCloudDialogflowCxV3beta1Agent { /** * 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; /** * 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; /** * Indicates if automatic spell correction is enabled in detect intent requests. */ enableSpellCorrection?: boolean | null; /** * Indicates if stackdriver logging is enabled for the agent. */ enableStackdriverLogging?: 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; /** * Name of the SecuritySettings reference for the agent. Format: `projects//locations//securitySettings/`. */ securitySettings?: string | null; /** * Speech recognition related settings. */ speechToTextSettings?: Schema$GoogleCloudDialogflowCxV3beta1SpeechToTextSettings; /** * Immutable. 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/`. */ startFlow?: string | null; /** * 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; } /** * 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; } /** * 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 1 minute 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; } /** * 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 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; } /** * 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 { /** * 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. */ 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; } /** * The request to detect user's intent. */ export interface Schema$GoogleCloudDialogflowCxV3beta1DetectIntentRequest { /** * Instructs the speech synthesizer how to generate the output audio. */ outputAudioConfig?: Schema$GoogleCloudDialogflowCxV3beta1OutputAudioConfig; /** * Required. The input specification. */ queryInput?: Schema$GoogleCloudDialogflowCxV3beta1QueryInput; /** * The parameters of this query. */ queryParams?: Schema$GoogleCloudDialogflowCxV3beta1QueryParameters; } /** * The message returned from the DetectIntent method. */ export interface Schema$GoogleCloudDialogflowCxV3beta1DetectIntentResponse { /** * The audio data bytes encoded as specified in the request. Note: The output audio is generated based on the values of default platform text responses found in the `query_result.response_messages` field. If multiple default text responses exist, they will be concatenated when generating audio. If no default platform text responses exist, the generated audio content will be empty. In some scenarios, multiple output audio fields may be present in the response structure. In these cases, only the top-most-level audio output has content. */ outputAudio?: string | null; /** * The config used by the speech synthesizer to generate the output audio. */ outputAudioConfig?: Schema$GoogleCloudDialogflowCxV3beta1OutputAudioConfig; /** * The result of the conversational query. */ queryResult?: Schema$GoogleCloudDialogflowCxV3beta1QueryResult; /** * Output only. The unique identifier of the response. It can be used to locate a response in the training example set or for reporting issues. */ responseId?: string | null; } /** * Represents the input for dtmf event. */ export interface Schema$GoogleCloudDialogflowCxV3beta1DtmfInput { /** * The dtmf digits. */ digits?: string | null; /** * The finish digit (if any). */ finishDigit?: string | null; } /** * Entities are extracted from user input and represent parameters that are meaningful to your application. For example, a date range, a proper name such as a geographic location or landmark, and so on. Entities represent actionable data for your application. When you define an entity, you can also include synonyms that all map to that entity. For example, "soft drink", "soda", "pop", and so on. There are three types of entities: * **System** - entities that are defined by the Dialogflow API for common data types such as date, time, currency, and so on. A system entity is represented by the `EntityType` type. * **Custom** - entities that are defined by you that represent actionable data that is meaningful to your application. For example, you could define a `pizza.sauce` entity for red or white pizza sauce, a `pizza.cheese` entity for the different types of cheese on a pizza, a `pizza.topping` entity for different toppings, and so on. A custom entity is represented by the `EntityType` type. * **User** - entities that are built for an individual user such as favorites, preferences, playlists, and so on. A user entity is represented by the SessionEntityType type. For more information about entity types, see the [Dialogflow documentation](https://cloud.google.com/dialogflow/docs/entities-overview). */ export interface Schema$GoogleCloudDialogflowCxV3beta1EntityType { /** * Indicates whether the entity type can be automatically expanded. */ autoExpansionMode?: string | null; /** * Required. The human-readable name of the entity type, unique within the agent. */ displayName?: string | null; /** * Enables fuzzy entity extraction during classification. */ enableFuzzyExtraction?: boolean | null; /** * The collection of entity entries associated with the entity type. */ entities?: Schema$GoogleCloudDialogflowCxV3beta1EntityTypeEntity[]; /** * Collection of exceptional words and phrases that shouldn't be matched. For example, if you have a size entity type with entry `giant`(an adjective), you might consider adding `giants`(a noun) as an exclusion. If the kind of entity type is `KIND_MAP`, then the phrases specified by entities and excluded phrases should be mutually exclusive. */ excludedPhrases?: Schema$GoogleCloudDialogflowCxV3beta1EntityTypeExcludedPhrase[]; /** * Required. Indicates the kind of entity type. */ kind?: string | null; /** * The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType. Format: `projects//locations//agents//entityTypes/`. */ name?: string | null; /** * Indicates whether parameters of the entity type should be redacted in log. If redaction is enabled, page parameters and intent parameters referring to the entity type will be replaced by parameter name during logging. */ redact?: boolean | null; } /** * An **entity entry** for an associated entity type. */ export interface Schema$GoogleCloudDialogflowCxV3beta1EntityTypeEntity { /** * Required. A collection of value synonyms. For example, if the entity type is *vegetable*, and `value` is *scallions*, a synonym could be *green onions*. For `KIND_LIST` entity types: * This collection must contain exactly one synonym equal to `value`. */ synonyms?: string[] | null; /** * Required. The primary value associated with this entity entry. For example, if the entity type is *vegetable*, the value could be *scallions*. For `KIND_MAP` entity types: * A canonical value to be used in place of synonyms. For `KIND_LIST` entity types: * A string that can contain references to other entity types (with or without aliases). */ value?: string | null; } /** * An excluded entity phrase that should not be matched. */ export interface Schema$GoogleCloudDialogflowCxV3beta1EntityTypeExcludedPhrase { /** * Required. The word or phrase to be excluded. */ value?: 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; /** * Output only. Update time of this environment. */ updateTime?: string | null; /** * Required. 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[]; } /** * Configuration for the version. */ export interface Schema$GoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig { /** * Required. Format: projects//locations//agents//flows//versions/. */ version?: string | null; } /** * 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; } /** * Represents an experiment in an environment. */ export interface Schema$GoogleCloudDialogflowCxV3beta1Experiment { /** * Creation time of this experiment. */ createTime?: string | null; /** * The definition of the experiment. */ definition?: Schema$GoogleCloudDialogflowCxV3beta1ExperimentDefinition; /** * The human-readable description of the experiment. */ description?: string | null; /** * Required. The human-readable name of the experiment (unique in an environment). Limit of 64 characters. */ displayName?: string | null; /** * End time of this experiment. */ endTime?: string | null; /** * Maximum number of days to run the experiment. If auto-rollout is not enabled, default value and maximum will be 30 days. If auto-rollout is enabled, default value and maximum will be 6 days. */ experimentLength?: string | null; /** * Last update time of this experiment. */ lastUpdateTime?: string | null; /** * The name of the experiment. Format: projects//locations//agents//environments//experiments/.. */ name?: string | null; /** * Inference result of the experiment. */ result?: Schema$GoogleCloudDialogflowCxV3beta1ExperimentResult; /** * Start time of this experiment. */ startTime?: string | null; /** * The current state of the experiment. Transition triggered by Expriments.StartExperiment: PENDING-\>RUNNING. Transition triggered by Expriments.CancelExperiment: PENDING-\>CANCELLED or RUNNING-\>CANCELLED. */ state?: string | null; /** * The history of updates to the experiment variants. */ variantsHistory?: Schema$GoogleCloudDialogflowCxV3beta1VariantsHistory[]; } /** * Definition of the experiment. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ExperimentDefinition { /** * The condition defines which subset of sessions are selected for this experiment. If not specified, all sessions are eligible. E.g. "query_input.language_code=en" See the [conditions reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). */ condition?: string | null; /** * The flow versions as the variants of this experiment. */ versionVariants?: Schema$GoogleCloudDialogflowCxV3beta1VersionVariants; } /** * The inference result which includes an objective metric to optimize and the confidence interval. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ExperimentResult { /** * The last time the experiment's stats data was updated. Will have default value if stats have never been computed for this experiment. */ lastUpdateTime?: string | null; /** * Version variants and metrics. */ versionMetrics?: Schema$GoogleCloudDialogflowCxV3beta1ExperimentResultVersionMetrics[]; } /** * A confidence interval is a range of possible values for the experiment objective you are trying to measure. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ExperimentResultConfidenceInterval { /** * The confidence level used to construct the interval, i.e. there is X% chance that the true value is within this interval. */ confidenceLevel?: number | null; /** * Lower bound of the interval. */ lowerBound?: number | null; /** * The percent change between an experiment metric's value and the value for its control. */ ratio?: number | null; /** * Upper bound of the interval. */ upperBound?: number | null; } /** * Metric and corresponding confidence intervals. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ExperimentResultMetric { /** * The probability that the treatment is better than all other treatments in the experiment */ confidenceInterval?: Schema$GoogleCloudDialogflowCxV3beta1ExperimentResultConfidenceInterval; /** * Count value of a metric. */ count?: number | null; /** * Count-based metric type. Only one of type or count_type is specified in each Metric. */ countType?: string | null; /** * Ratio value of a metric. */ ratio?: number | null; /** * Ratio-based metric type. Only one of type or count_type is specified in each Metric. */ type?: string | null; } /** * Version variant and associated metrics. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ExperimentResultVersionMetrics { /** * The metrics and corresponding confidence intervals in the inference result. */ metrics?: Schema$GoogleCloudDialogflowCxV3beta1ExperimentResultMetric[]; /** * Number of sessions that were allocated to this version. */ sessionCount?: number | null; /** * The name of the flow Version. Format: `projects//locations//agents//flows//versions/`. */ version?: string | null; } /** * The request message for Agents.ExportAgent. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ExportAgentRequest { /** * Optional. The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to export the agent to. The format of this URI must be `gs:///`. If left unspecified, the serialized agent is returned inline. */ agentUri?: string | null; } /** * The response message for Agents.ExportAgent. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ExportAgentResponse { /** * Uncompressed raw byte content for agent. */ agentContent?: string | null; /** * The URI to a file containing the exported agent. This field is populated only if `agent_uri` is specified in ExportAgentRequest. */ agentUri?: string | null; } /** * Metadata returned for the TestCases.ExportTestCases long running operation. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ExportTestCasesMetadata { } /** * The request message for TestCases.ExportTestCases. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ExportTestCasesRequest { /** * The data format of the exported test cases. If not specified, `BLOB` is assumed. */ dataFormat?: string | null; /** * The filter expression used to filter exported test cases, see [API Filtering](https://aip.dev/160). The expression is case insensitive and supports the following syntax: name = [OR name = ] ... For example: * "name = t1 OR name = t2" matches the test case with the exact resource name "t1" or "t2". */ filter?: string | null; /** * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to export the test cases to. The format of this URI must be `gs:///`. If unspecified, the serialized test cases is returned inline. */ gcsUri?: string | null; } /** * 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; } /** * Flows represents the conversation flows when you build your chatbot agent. A flow consists of many pages connected by the transition routes. Conversations always start with the built-in Start Flow (with an all-0 ID). Transition routes can direct the conversation session from the current flow (parent flow) to another flow (sub flow). When the sub flow is finished, Dialogflow will bring the session back to the parent flow, where the sub flow is started. Usually, when a transition route is followed by a matched intent, the intent will be "consumed". This means the intent won't activate more transition routes. However, when the followed transition route moves the conversation session into a different flow, the matched intent can be carried over and to be consumed in the target flow. */ export interface Schema$GoogleCloudDialogflowCxV3beta1Flow { /** * The description of the flow. The maximum length is 500 characters. If exceeded, the request is rejected. */ description?: string | null; /** * Required. The human-readable name of the flow. */ displayName?: string | null; /** * A flow's event handlers serve two purposes: * They are responsible for handling events (e.g. no match, webhook errors) in the flow. * They are inherited by every page's event handlers, which can be used to handle common events regardless of the current page. Event handlers defined in the page have higher priority than those defined in the flow. Unlike transition_routes, these handlers are evaluated on a first-match basis. The first one that matches the event get executed, with the rest being ignored. */ eventHandlers?: Schema$GoogleCloudDialogflowCxV3beta1EventHandler[]; /** * The unique identifier of the flow. Format: `projects//locations//agents//flows/`. */ name?: string | null; /** * NLU related settings of the flow. */ nluSettings?: Schema$GoogleCloudDialogflowCxV3beta1NluSettings; /** * A flow's transition routes serve two purposes: * They are responsible for matching the user's first utterances in the flow. * They are inherited by every page's transition routes and can support use cases such as the user saying "help" or "can I talk to a human?", which can be handled in a common way regardless of the current page. Transition routes defined in the page have higher priority than those defined in the flow. TransitionRoutes are evalauted in the following order: * TransitionRoutes with intent specified.. * TransitionRoutes with only condition specified. TransitionRoutes with intent specified are inherited by pages in the flow. */ transitionRoutes?: Schema$GoogleCloudDialogflowCxV3beta1TransitionRoute[]; } /** * The response message for Flows.GetFlowValidationResult. */ export interface Schema$GoogleCloudDialogflowCxV3beta1FlowValidationResult { /** * The unique identifier of the flow validation result. Format: `projects//locations//agents//flows//validationResult`. */ name?: string | null; /** * Last time the flow was validated. */ updateTime?: string | null; /** * Contains all validation messages. */ validationMessages?: Schema$GoogleCloudDialogflowCxV3beta1ValidationMessage[]; } /** * 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[]; } /** * Request of FulfillIntent */ export interface Schema$GoogleCloudDialogflowCxV3beta1FulfillIntentRequest { /** * The matched intent/event to fulfill. */ match?: Schema$GoogleCloudDialogflowCxV3beta1Match; /** * Must be same as the corresponding MatchIntent request, otherwise the behavior is undefined. */ matchIntentRequest?: Schema$GoogleCloudDialogflowCxV3beta1MatchIntentRequest; /** * Instructs the speech synthesizer how to generate output audio. */ outputAudioConfig?: Schema$GoogleCloudDialogflowCxV3beta1OutputAudioConfig; } /** * Response of FulfillIntent */ export interface Schema$GoogleCloudDialogflowCxV3beta1FulfillIntentResponse { /** * The audio data bytes encoded as specified in the request. Note: The output audio is generated based on the values of default platform text responses found in the `query_result.response_messages` field. If multiple default text responses exist, they will be concatenated when generating audio. If no default platform text responses exist, the generated audio content will be empty. In some scenarios, multiple output audio fields may be present in the response structure. In these cases, only the top-most-level audio output has content. */ outputAudio?: string | null; /** * The config used by the speech synthesizer to generate the output audio. */ outputAudioConfig?: Schema$GoogleCloudDialogflowCxV3beta1OutputAudioConfig; /** * The result of the conversational query. */ queryResult?: Schema$GoogleCloudDialogflowCxV3beta1QueryResult; /** * Output only. The unique identifier of the response. It can be used to locate a response in the training example set or for reporting issues. */ responseId?: string | null; } /** * 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[]; /** * Set parameter values before executing the webhook. */ setParameterActions?: Schema$GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction[]; /** * The tag used by the webhook to identify which fulfillment is being called. 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[]; } /** * Metadata returned for the TestCases.ImportTestCases long running operation. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ImportTestCasesMetadata { /** * Errors for failed test cases. */ errors?: Schema$GoogleCloudDialogflowCxV3beta1TestCaseError[]; } /** * The request message for TestCases.ImportTestCases. */ export interface Schema$GoogleCloudDialogflowCxV3beta1ImportTestCasesRequest { /** * Uncompressed raw byte content for test cases. */ content?: string | null; /** * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to import test cases from. The format of this URI must be `gs:///`. */ gcsUri?: string | null; } /** * 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. */ 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 t