UNPKG

googleapis

Version:
1,061 lines 289 kB
/** * Copyright 2019 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. */ import { OAuth2Client, JWT, Compute, UserRefreshClient } from 'google-auth-library'; import { GoogleConfigurable, MethodOptions, GlobalOptions, BodyResponseCallback, APIRequestContext } from 'googleapis-common'; import { GaxiosPromise } from 'gaxios'; export declare namespace dialogflow_v2beta1 { interface Options extends GlobalOptions { version: 'v2beta1'; } interface StandardParameters { /** * 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 * const {google} = require('googleapis'); * const dialogflow = google.dialogflow('v2beta1'); * * @namespace dialogflow * @type {Function} * @version v2beta1 * @variation v2beta1 * @param {object=} options Options for Dialogflow */ class Dialogflow { context: APIRequestContext; projects: Resource$Projects; constructor(options: GlobalOptions, google?: GoogleConfigurable); } /** * The response message for EntityTypes.BatchUpdateEntityTypes. */ interface Schema$GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse { /** * The collection of updated or created entity types. */ entityTypes?: Schema$GoogleCloudDialogflowV2EntityType[]; } /** * The response message for Intents.BatchUpdateIntents. */ interface Schema$GoogleCloudDialogflowV2BatchUpdateIntentsResponse { /** * The collection of updated or created intents. */ intents?: Schema$GoogleCloudDialogflowV2Intent[]; } /** * Represents a conversational agent. */ interface Schema$GoogleCloudDialogflowV2beta1Agent { /** * Optional. 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-enterprise/docs/integrations/web-demo) integration. */ avatarUri?: string; /** * Optional. To filter out false positive results and still get variety in matched natural language inputs for your agent, you can tune the machine learning classification threshold. If the returned score value is less than the threshold value, then a fallback intent will be triggered or, if there are no fallback intents defined, no intent will be triggered. The score values range from 0.0 (completely uncertain) to 1.0 (completely certain). If set to 0.0, the default of 0.3 is used. */ classificationThreshold?: number; /** * Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) for a list of the currently supported language codes. This field cannot be set by the `Update` method. */ defaultLanguageCode?: string; /** * Optional. The description of this agent. The maximum length is 500 characters. If exceeded, the request is rejected. */ description?: string; /** * Required. The name of this agent. */ displayName?: string; /** * Optional. Determines whether this agent should log conversation queries. */ enableLogging?: boolean; /** * Optional. Determines how intents are detected from user queries. */ matchMode?: string; /** * Required. The project of this agent. Format: `projects/<Project ID>`. */ parent?: string; /** * Optional. The list of all languages supported by this agent (except for the `default_language_code`). */ supportedLanguageCodes?: string[]; /** * Required. The time zone of this agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris. */ timeZone?: string; } /** * The request message for EntityTypes.BatchCreateEntities. */ interface Schema$GoogleCloudDialogflowV2beta1BatchCreateEntitiesRequest { /** * Required. The entities to create. */ entities?: Schema$GoogleCloudDialogflowV2beta1EntityTypeEntity[]; /** * Optional. The language of entity synonyms defined in `entities`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. */ languageCode?: string; } /** * The request message for EntityTypes.BatchDeleteEntities. */ interface Schema$GoogleCloudDialogflowV2beta1BatchDeleteEntitiesRequest { /** * Required. The canonical `values` of the entities to delete. Note that these are not fully-qualified names, i.e. they don't start with `projects/<Project ID>`. */ entityValues?: string[]; /** * Optional. The language of entity synonyms defined in `entities`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. */ languageCode?: string; } /** * The request message for EntityTypes.BatchDeleteEntityTypes. */ interface Schema$GoogleCloudDialogflowV2beta1BatchDeleteEntityTypesRequest { /** * Required. The names entity types to delete. All names must point to the same agent as `parent`. */ entityTypeNames?: string[]; } /** * The request message for Intents.BatchDeleteIntents. */ interface Schema$GoogleCloudDialogflowV2beta1BatchDeleteIntentsRequest { /** * Required. The collection of intents to delete. Only intent `name` must be filled in. */ intents?: Schema$GoogleCloudDialogflowV2beta1Intent[]; } /** * The request message for EntityTypes.BatchUpdateEntities. */ interface Schema$GoogleCloudDialogflowV2beta1BatchUpdateEntitiesRequest { /** * Required. The entities to update or create. */ entities?: Schema$GoogleCloudDialogflowV2beta1EntityTypeEntity[]; /** * Optional. The language of entity synonyms defined in `entities`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. */ languageCode?: string; /** * Optional. The mask to control which fields get updated. */ updateMask?: string; } /** * The request message for EntityTypes.BatchUpdateEntityTypes. */ interface Schema$GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesRequest { /** * The collection of entity types to update or create. */ entityTypeBatchInline?: Schema$GoogleCloudDialogflowV2beta1EntityTypeBatch; /** * The URI to a Google Cloud Storage file containing entity types to update or create. The file format can either be a serialized proto (of EntityBatch type) or a JSON object. Note: The URI must start with "gs://". */ entityTypeBatchUri?: string; /** * Optional. The language of entity synonyms defined in `entity_types`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. */ languageCode?: string; /** * Optional. The mask to control which fields get updated. */ updateMask?: string; } /** * The response message for EntityTypes.BatchUpdateEntityTypes. */ interface Schema$GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse { /** * The collection of updated or created entity types. */ entityTypes?: Schema$GoogleCloudDialogflowV2beta1EntityType[]; } /** * The request message for Intents.BatchUpdateIntents. */ interface Schema$GoogleCloudDialogflowV2beta1BatchUpdateIntentsRequest { /** * The collection of intents to update or create. */ intentBatchInline?: Schema$GoogleCloudDialogflowV2beta1IntentBatch; /** * The URI to a Google Cloud Storage file containing intents to update or create. The file format can either be a serialized proto (of IntentBatch type) or JSON object. Note: The URI must start with "gs://". */ intentBatchUri?: string; /** * Optional. The resource view to apply to the returned intent. */ intentView?: string; /** * Optional. The language of training phrases, parameters and rich messages defined in `intents`. If not specified, the agent's default language is used. [Many languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) are supported. Note: languages must be enabled in the agent before they can be used. */ languageCode?: string; /** * Optional. The mask to control which fields get updated. */ updateMask?: string; } /** * The response message for Intents.BatchUpdateIntents. */ interface Schema$GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse { /** * The collection of updated or created intents. */ intents?: Schema$GoogleCloudDialogflowV2beta1Intent[]; } /** * Represents a context. */ interface Schema$GoogleCloudDialogflowV2beta1Context { /** * Optional. The number of conversational query requests after which the context expires. If set to `0` (the default) the context expires immediately. Contexts expire automatically after 20 minutes if there are no matching queries. */ lifespanCount?: number; /** * Required. The unique identifier of the context. Format: `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`, or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>/contexts/<Context ID>`. The `Context ID` is always converted to lowercase, may only contain characters in a-zA-Z0-9_-% and may be at most 250 bytes long. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. */ name?: string; /** * Optional. The collection of parameters associated with this context. Refer to [this doc](https://cloud.google.com/dialogflow-enterprise/docs/intents-actions-parameters) for syntax. */ parameters?: { [key: string]: any; }; } /** * The request to detect user's intent. */ interface Schema$GoogleCloudDialogflowV2beta1DetectIntentRequest { /** * Optional. The natural language speech audio to be processed. This field should be populated iff `query_input` is set to an input audio config. A single request can contain up to 1 minute of speech audio data. */ inputAudio?: string; /** * Optional. Instructs the speech synthesizer how to generate the output audio. If this field is not set and agent-level speech synthesizer is not configured, no output audio is generated. */ outputAudioConfig?: Schema$GoogleCloudDialogflowV2beta1OutputAudioConfig; /** * Required. The input specification. It can be set to: 1. an audio config which instructs the speech recognizer how to process the speech audio, 2. a conversational query in the form of text, or 3. an event that specifies which intent to trigger. */ queryInput?: Schema$GoogleCloudDialogflowV2beta1QueryInput; /** * Optional. The parameters of this query. */ queryParams?: Schema$GoogleCloudDialogflowV2beta1QueryParameters; } /** * The message returned from the DetectIntent method. */ interface Schema$GoogleCloudDialogflowV2beta1DetectIntentResponse { /** * If Knowledge Connectors are enabled, there could be more than one result returned for a given query or event, and this field will contain all results except for the top one, which is captured in query_result. The alternative results are ordered by decreasing `QueryResult.intent_detection_confidence`. If Knowledge Connectors are disabled, this field will be empty until multiple responses for regular intents are supported, at which point those additional results will be surfaced here. */ alternativeQueryResults?: Schema$GoogleCloudDialogflowV2beta1QueryResult[]; /** * 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.fulfillment_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. */ outputAudio?: string; /** * Instructs the speech synthesizer how to generate the output audio. This field is populated from the agent-level speech synthesizer configuration, if enabled. */ outputAudioConfig?: Schema$GoogleCloudDialogflowV2beta1OutputAudioConfig; /** * The selected results of the conversational query or event processing. See `alternative_query_results` for additional potential results. */ queryResult?: Schema$GoogleCloudDialogflowV2beta1QueryResult; /** * 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; /** * Specifies the status of the webhook request. */ webhookStatus?: Schema$GoogleRpcStatus; } /** * A document resource. Note: resource `projects.agent.knowledgeBases.documents` is deprecated, please use `projects.knowledgeBases.documents` instead. */ interface Schema$GoogleCloudDialogflowV2beta1Document { /** * The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. Note: This field is in the process of being deprecated, please use raw_content instead. */ content?: string; /** * The URI where the file content is located. For documents stored in Google Cloud Storage, these URIs must have the form `gs://<bucket-name>/<object-name>`. NOTE: External URLs must correspond to public webpages, i.e., they must be indexed by Google Search. In particular, URLs for showing documents in Google Cloud Storage (i.e. the URL in your browser) are not supported. Instead use the `gs://` format URI described above. */ contentUri?: string; /** * Required. The display name of the document. The name must be 1024 bytes or less; otherwise, the creation request fails. */ displayName?: string; /** * Required. The knowledge type of document content. */ knowledgeTypes?: string[]; /** * Required. The MIME type of this document. */ mimeType?: string; /** * The document resource name. The name must be empty when creating a document. Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`. */ name?: string; /** * The raw content of the document. This field is only permitted for EXTRACTIVE_QA and FAQ knowledge types. */ rawContent?: string; } /** * Represents an entity type. Entity types serve as a tool for extracting parameter values from natural language queries. */ interface Schema$GoogleCloudDialogflowV2beta1EntityType { /** * Optional. Indicates whether the entity type can be automatically expanded. */ autoExpansionMode?: string; /** * Required. The name of the entity type. */ displayName?: string; /** * Optional. The collection of entity entries associated with the entity type. */ entities?: Schema$GoogleCloudDialogflowV2beta1EntityTypeEntity[]; /** * Required. Indicates the kind of entity type. */ kind?: string; /** * The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. */ name?: string; } /** * This message is a wrapper around a collection of entity types. */ interface Schema$GoogleCloudDialogflowV2beta1EntityTypeBatch { /** * A collection of entity types. */ entityTypes?: Schema$GoogleCloudDialogflowV2beta1EntityType[]; } /** * An **entity entry** for an associated entity type. */ interface Schema$GoogleCloudDialogflowV2beta1EntityTypeEntity { /** * 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[]; /** * 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; } /** * Events allow for matching intents by event name instead of the natural language input. For instance, input `<event: { name: "welcome_event", parameters: { name: "Sam" } }>` can trigger a personalized welcome response. The parameter `name` may be used by the agent in the response: `"Hello #welcome_event.name! What can I do for you today?"`. */ interface Schema$GoogleCloudDialogflowV2beta1EventInput { /** * Required. The language of this query. See [Language Support](https://cloud.google.com/dialogflow-enterprise/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; /** * Required. The unique identifier of the event. */ name?: string; /** * Optional. The collection of parameters associated with the event. */ parameters?: { [key: string]: any; }; } /** * The request message for Agents.ExportAgent. */ interface Schema$GoogleCloudDialogflowV2beta1ExportAgentRequest { /** * 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://<bucket-name>/<object-name>`. If left unspecified, the serialized agent is returned inline. */ agentUri?: string; } /** * The response message for Agents.ExportAgent. */ interface Schema$GoogleCloudDialogflowV2beta1ExportAgentResponse { /** * The exported agent. Example for how to export an agent to a zip file via a command line: <pre>curl \ 'https://dialogflow.googleapis.com/v2beta1/projects/<project_name>/agent:export'\ -X POST \ -H 'Authorization: Bearer '$(gcloud auth application-default print-access-token) \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ --compressed \ --data-binary '{}' \ | grep agentContent | sed -e 's/.*"agentContent": "\([^"]*\)".x/\1/' \ | base64 --decode > <agent zip file></pre> */ agentContent?: string; /** * The URI to a file containing the exported agent. This field is populated only if `agent_uri` is specified in `ExportAgentRequest`. */ agentUri?: string; } /** * The request message for Agents.ImportAgent. */ interface Schema$GoogleCloudDialogflowV2beta1ImportAgentRequest { /** * The agent to import. Example for how to import an agent via the command line: <pre>curl \ 'https://dialogflow.googleapis.com/v2beta1/projects/<project_name>/agent:import\ -X POST \ -H 'Authorization: Bearer '$(gcloud auth application-default print-access-token) \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ --compressed \ --data-binary "{ 'agentContent': '$(cat <agent zip file> | base64 -w 0)' }"</pre> */ agentContent?: string; /** * The URI to a Google Cloud Storage file containing the agent to import. Note: The URI must start with "gs://". */ agentUri?: string; } /** * Instructs the speech recognizer on how to process the audio content. */ interface Schema$GoogleCloudDialogflowV2beta1InputAudioConfig { /** * Required. Audio encoding of the audio content to process. */ audioEncoding?: string; /** * Required. The language of the supplied audio. Dialogflow does not do translations. See [Language Support](https://cloud.google.com/dialogflow-enterprise/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; /** * 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; /** * Optional. Which variant of the Speech model to use. */ modelVariant?: string; /** * Optional. The collection of phrase hints which are used to boost accuracy of speech recognition. Refer to [Cloud Speech API documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) for more details. */ phraseHints?: string[]; /** * Required. 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; } /** * Represents an intent. Intents convert a number of user expressions or patterns into an action. An action is an extraction of a user command or sentence semantics. */ interface Schema$GoogleCloudDialogflowV2beta1Intent { /** * Optional. The name of the action associated with the intent. Note: The action name must not contain whitespaces. */ action?: string; /** * Optional. The list of platforms for which the first response will be taken from among the messages assigned to the DEFAULT_PLATFORM. */ defaultResponsePlatforms?: string[]; /** * Required. The name of this intent. */ displayName?: string; /** * Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false. */ endInteraction?: boolean; /** * Optional. The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of the contexts must be present in the active user session for an event to trigger this intent. */ events?: string[]; /** * Read-only. Information about all followup intents that have this intent as a direct or indirect parent. We populate this field only in the output. */ followupIntentInfo?: Schema$GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo[]; /** * Optional. The list of context names required for this intent to be triggered. Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`. */ inputContextNames?: string[]; /** * Optional. Indicates whether this is a fallback intent. */ isFallback?: boolean; /** * Optional. The collection of rich messages corresponding to the `Response` field in the Dialogflow console. */ messages?: Schema$GoogleCloudDialogflowV2beta1IntentMessage[]; /** * Optional. Indicates whether Machine Learning is disabled for the intent. Note: If `ml_disabled` setting is set to true, then this intent is not taken into account during inference in `ML ONLY` match mode. Also, auto-markup in the UI is turned off. */ mlDisabled?: boolean; /** * Optional. Indicates whether Machine Learning is enabled for the intent. Note: If `ml_enabled` setting is set to false, then this intent is not taken into account during inference in `ML ONLY` match mode. Also, auto-markup in the UI is turned off. DEPRECATED! Please use `ml_disabled` field instead. NOTE: If both `ml_enabled` and `ml_disabled` are either not set or false, then the default value is determined as follows: - Before April 15th, 2018 the default is: ml_enabled = false / ml_disabled = true. - After April 15th, 2018 the default is: ml_enabled = true / ml_disabled = false. */ mlEnabled?: boolean; /** * The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Format: `projects/<Project ID>/agent/intents/<Intent ID>`. */ name?: string; /** * Optional. The collection of contexts that are activated when the intent is matched. Context messages in this collection should not set the parameters field. Setting the `lifespan_count` to 0 will reset the context when the intent is matched. Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`. */ outputContexts?: Schema$GoogleCloudDialogflowV2beta1Context[]; /** * Optional. The collection of parameters associated with the intent. */ parameters?: Schema$GoogleCloudDialogflowV2beta1IntentParameter[]; /** * Read-only after creation. The unique identifier of the parent intent in the chain of followup intents. You can set this field when creating an intent, for example with CreateIntent or BatchUpdateIntents, in order to make this intent a followup intent. It identifies the parent followup intent. Format: `projects/<Project ID>/agent/intents/<Intent ID>`. */ parentFollowupIntentName?: string; /** * Optional. The priority of this intent. Higher numbers represent higher priorities. If this is zero or unspecified, we use the default priority 500000. Negative numbers mean that the intent is disabled. */ priority?: number; /** * Optional. Indicates whether to delete all contexts in the current session when this intent is matched. */ resetContexts?: boolean; /** * Read-only. The unique identifier of the root intent in the chain of followup intents. It identifies the correct followup intents chain for this intent. We populate this field only in the output. Format: `projects/<Project ID>/agent/intents/<Intent ID>`. */ rootFollowupIntentName?: string; /** * Optional. The collection of examples that the agent is trained on. */ trainingPhrases?: Schema$GoogleCloudDialogflowV2beta1IntentTrainingPhrase[]; /** * Optional. Indicates whether webhooks are enabled for the intent. */ webhookState?: string; } /** * This message is a wrapper around a collection of intents. */ interface Schema$GoogleCloudDialogflowV2beta1IntentBatch { /** * A collection of intents. */ intents?: Schema$GoogleCloudDialogflowV2beta1Intent[]; } /** * Represents a single followup intent in the chain. */ interface Schema$GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo { /** * The unique identifier of the followup intent. Format: `projects/<Project ID>/agent/intents/<Intent ID>`. */ followupIntentName?: string; /** * The unique identifier of the followup intent's parent. Format: `projects/<Project ID>/agent/intents/<Intent ID>`. */ parentFollowupIntentName?: string; } /** * Corresponds to the `Response` field in the Dialogflow console. */ interface Schema$GoogleCloudDialogflowV2beta1IntentMessage { /** * Displays a basic card for Actions on Google. */ basicCard?: Schema$GoogleCloudDialogflowV2beta1IntentMessageBasicCard; /** * Displays a card. */ card?: Schema$GoogleCloudDialogflowV2beta1IntentMessageCard; /** * Displays a carousel card for Actions on Google. */ carouselSelect?: Schema$GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect; /** * Displays an image. */ image?: Schema$GoogleCloudDialogflowV2beta1IntentMessageImage; /** * Displays a link out suggestion chip for Actions on Google. */ linkOutSuggestion?: Schema$GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion; /** * Displays a list card for Actions on Google. */ listSelect?: Schema$GoogleCloudDialogflowV2beta1IntentMessageListSelect; /** * Returns a response containing a custom, platform-specific payload. See the Intent.Message.Platform type for a description of the structure that may be required for your platform. */ payload?: { [key: string]: any; }; /** * Optional. The platform that this message is intended for. */ platform?: string; /** * Displays quick replies. */ quickReplies?: Schema$GoogleCloudDialogflowV2beta1IntentMessageQuickReplies; /** * Returns a voice or text-only response for Actions on Google. */ simpleResponses?: Schema$GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses; /** * Displays suggestion chips for Actions on Google. */ suggestions?: Schema$GoogleCloudDialogflowV2beta1IntentMessageSuggestions; /** * Plays audio from a file in Telephony Gateway. */ telephonyPlayAudio?: Schema$GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio; /** * Synthesizes speech in Telephony Gateway. */ telephonySynthesizeSpeech?: Schema$GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech; /** * Transfers the call in Telephony Gateway. */ telephonyTransferCall?: Schema$GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall; /** * Returns a text response. */ text?: Schema$GoogleCloudDialogflowV2beta1IntentMessageText; } /** * The basic card message. Useful for displaying information. */ interface Schema$GoogleCloudDialogflowV2beta1IntentMessageBasicCard { /** * Optional. The collection of card buttons. */ buttons?: Schema$GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton[]; /** * Required, unless image is present. The body text of the card. */ formattedText?: string; /** * Optional. The image for the card. */ image?: Schema$GoogleCloudDialogflowV2beta1IntentMessageImage; /** * Optional. The subtitle of the card. */ subtitle?: string; /** * Optional. The title of the card. */ title?: string; } /** * The button object that appears at the bottom of a card. */ interface Schema$GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton { /** * Required. Action to take when a user taps on the button. */ openUriAction?: Schema$GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction; /** * Required. The title of the button. */ title?: string; } /** * Opens the given URI. */ interface Schema$GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction { /** * Required. The HTTP or HTTPS scheme URI. */ uri?: string; } /** * The card response message. */ interface Schema$GoogleCloudDialogflowV2beta1IntentMessageCard { /** * Optional. The collection of card buttons. */ buttons?: Schema$GoogleCloudDialogflowV2beta1IntentMessageCardButton[]; /** * Optional. The public URI to an image file for the card. */ imageUri?: string; /** * Optional. The subtitle of the card. */ subtitle?: string; /** * Optional. The title of the card. */ title?: string; } /** * Optional. Contains information about a button. */ interface Schema$GoogleCloudDialogflowV2beta1IntentMessageCardButton { /** * Optional. The text to send back to the Dialogflow API or a URI to open. */ postback?: string; /** * Optional. The text to show on the button. */ text?: string; } /** * The card for presenting a carousel of options to select from. */ interface Schema$GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect { /** * Required. Carousel items. */ items?: Schema$GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem[]; } /** * An item in the carousel. */ interface Schema$GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem { /** * Optional. The body text of the card. */ description?: string; /** * Optional. The image to display. */ image?: Schema$GoogleCloudDialogflowV2beta1IntentMessageImage; /** * Required. Additional info about the option item. */ info?: Schema$GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo; /** * Required. Title of the carousel item. */ title?: string; } /** * The image response message. */ interface Schema$GoogleCloudDialogflowV2beta1IntentMessageImage { /** * A text description of the image to be used for accessibility, e.g., screen readers. Required if image_uri is set for CarouselSelect. */ accessibilityText?: string; /** * Optional. The public URI to an image file. */ imageUri?: string; } /** * The suggestion chip message that allows the user to jump out to the app or website associated with this agent. */ interface Schema$GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion { /** * Required. The name of the app or site this chip is linking to. */ destinationName?: string; /** * Required. The URI of the app or site to open when the user taps the suggestion chip. */ uri?: string; } /** * The card for presenting a list of options to select from. */ interface Schema$GoogleCloudDialogflowV2beta1IntentMessageListSelect { /** * Required. List items. */ items?: Schema$GoogleCloudDialogflowV2beta1IntentMessageListSelectItem[]; /** * Optional. The overall title of the list. */ title?: string; } /** * An item in the list. */ interface Schema$GoogleCloudDialogflowV2beta1IntentMessageListSelectItem { /** * Optional. The main text describing the item. */ description?: string; /** * Optional. The image to display. */ image?: Schema$GoogleCloudDialogflowV2beta1IntentMessageImage; /** * Required. Additional information about this option. */ info?: Schema$GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo; /** * Required. The title of the list item. */ title?: string; } /** * The quick replies response message. */ interface Schema$GoogleCloudDialogflowV2beta1IntentMessageQuickReplies { /** * Optional. The collection of quick replies. */ quickReplies?: string[]; /** * Optional. The title of the collection of quick replies. */ title?: string; } /** * Additional info about the select item for when it is triggered in a dialog. */ interface Schema$GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo { /** * Required. A unique key that will be sent back to the agent if this response is given. */ key?: string; /** * Optional. A list of synonyms that can also be used to trigger this item in dialog. */ synonyms?: string[]; } /** * The simple response message containing speech or text. */ interface Schema$GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse { /** * Optional. The text to display. */ displayText?: string; /** * One of text_to_speech or ssml must be provided. Structured spoken response to the user in the SSML format. Mutually exclusive with text_to_speech. */ ssml?: string; /** * One of text_to_speech or ssml must be provided. The plain text of the speech output. Mutually exclusive with ssml. */ textToSpeech?: string; } /** * The collection of simple response candidates. This message in `QueryResult.fulfillment_messages` and `WebhookResponse.fulfillment_messages` should contain only one `SimpleResponse`. */ interface Schema$GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses { /** * Required. The list of simple responses. */ simpleResponses?: Schema$GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse[]; } /** * The suggestion chip message that the user can tap to quickly post a reply to the conversation. */ interface Schema$GoogleCloudDialogflowV2beta1IntentMessageSuggestion { /** * Required. The text shown the in the suggestion chip. */ title?: string; } /** * The collection of suggestions. */ interface Schema$GoogleCloudDialogflowV2beta1IntentMessageSuggestions { /** * Required. The list of suggested replies. */ suggestions?: Schema$GoogleCloudDialogflowV2beta1IntentMessageSuggestion[]; } /** * Plays audio from a file in Telephony Gateway. */ interface Schema$GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio { /** * Required. URI to a Google Cloud Storage object containing the audio to play, e.g., "gs://bucket/object". The object must contain a single channel (mono) of linear PCM audio (2 bytes / sample) at 8kHz. This object must be readable by the `service-<Project Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` service account where <Project Number> is the number of the Telephony Gateway project (usually the same as the Dialogflow agent project). If the Google Cloud Storage bucket is in the Telephony Gateway project, this permission is added by default when enabling the Dialogflow V2 API. For audio from other sources, consider using the `TelephonySynthesizeSpeech` message with SSML. */ audioUri?: string; } /** * Synthesizes speech and plays back the synthesized audio to the caller in Telephony Gateway. Telephony Gateway takes the synthesizer settings from `DetectIntentResponse.output_audio_config` which can either be set at request-level or can come from the agent-level synthesizer config. */ interface Schema$GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech { /** * The SSML to be synthesized. For more information, see [SSML](https://developers.google.com/actions/reference/ssml). */ ssml?: string; /** * The raw text to be synthesized. */ text?: string; } /** * Transfers the call in Telephony Gateway. */ interface Schema$GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall { /** * Required. The phone number to transfer the call to in [E.164 format](https://en.wikipedia.org/wiki/E.164). We currently only allow transferring to US numbers (+1xxxyyyzzzz). */ phoneNumber?: string; } /** * The text response message. */ interface Schema$GoogleCloudDialogflowV2beta1IntentMessageText { /** * Optional. The collection of the agent's responses. */ text?: string[]; } /** * Represents intent parameters. */ interface Schema$GoogleCloudDialogflowV2beta1IntentParameter { /** * Optional. The default value to use when the `value` yields an empty result. Default values can be extracted from contexts by using the following syntax: `#context_name.parameter_name`. */ defaultValue?: string; /** * Required. The name of the parameter. */ displayName?: string; /** * Optional. The name of the entity type, prefixed with `@`, that describes values of the parameter. If the parameter is required, this must be provided. */ entityTypeDisplayName?: string; /** * Optional. Indicates whether the parameter represents a list of values. */ isList?: boolean; /** * Optional. Indicates whether the parameter is required. That is, whether the intent cannot be completed without collecting the parameter value. */ mandatory?: boolean; /** * The unique identifier of this parameter. */ name?: string; /** * Optional. The collection of prompts that the agent can present to the user in order to collect value for the parameter. */ prompts?: string[]; /** * Optional. The definition of the parameter value. It can be: - a constant string, - a parameter value defined as `$parameter_name`, - an original parameter value defined as `$parameter_name.original`, - a parameter value from some context defined as `#context_name.parameter_name`. */ value?: string; } /** * Represents an example that the agent is trained on. */ interface Schema$GoogleCloudDialogflowV2beta1IntentTrainingPhrase { /** * Output only. The unique identifier of this training phrase. */ name?: string; /** * 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 `entity_type`, `alias`, and `user_defined` fields are all set. */ parts?: Schema$GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart[]; /** * Optional. Indicates how many times this example was added to the intent. Each time a developer adds an existing sample by editing an intent or training, this counter is increased. */ timesAddedCount?: number; /** * Required. The type of the training phrase. */ type?: string; } /** * Represents a part of a training phrase. */ interface Schema$GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart { /** * Optional. The parameter name for the value extracted from the annotated part of the example. This field is required for annotated parts of the training phrase. */ alias?: string; /** * Optional. The entity type name prefixed with `@`. This field is required for annotated parts of the training phrase. */ entityType?: string; /** * Required. The text for this part. */ text?: string; /** * Optional. Indicates whether the text was manually annotated. This field is set to true when the Dialogflow Console is used to manually annotate the part. When creating an annotated part with the API, you must set this to true. */ userDefined?: boolean; } /** * Represents the result of querying a Knowledge base. */ interface Schema$GoogleCloudDialogflowV2beta1KnowledgeAnswers { /** * A list of answers from Knowledge Connector. */ answers?: Schema$GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer[]; } /** * An answer from Knowledge Connector. */ interface Schema$GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer { /** * The piece of text from the `source` knowledge base document that answers this conversational query. */ answer?: string; /** * The corresponding FAQ question if the answer was extracted from a FAQ Document, empty otherw