diff --git a/protos/google/cloud/dialogflow/cx/v3/flow.proto b/protos/google/cloud/dialogflow/cx/v3/flow.proto index 7560e77a..7b253538 100644 --- a/protos/google/cloud/dialogflow/cx/v3/flow.proto +++ b/protos/google/cloud/dialogflow/cx/v3/flow.proto @@ -225,6 +225,20 @@ message Flow { // get executed, with the rest being ignored. repeated EventHandler event_handlers = 10; + // A flow's transition route group serve two purposes: + // + // * They are responsible for matching the user's first utterances in the + // flow. + // * They are inherited by every page's [transition + // route groups][Page.transition_route_groups]. Transition route groups + // defined in the page have higher priority than those defined in the flow. + // + // Format:`projects//locations//agents//flows//transitionRouteGroups/`. + repeated string transition_route_groups = 15 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/TransitionRouteGroup" + }]; + // NLU related settings of the flow. NluSettings nlu_settings = 11; } diff --git a/protos/google/cloud/dialogflow/cx/v3/intent.proto b/protos/google/cloud/dialogflow/cx/v3/intent.proto index 1e2924ff..f4f4c618 100644 --- a/protos/google/cloud/dialogflow/cx/v3/intent.proto +++ b/protos/google/cloud/dialogflow/cx/v3/intent.proto @@ -199,7 +199,7 @@ message Intent { // fallback intents act as negative examples that triggers no-match event. bool is_fallback = 6; - // Optional. The key/value metadata to label an intent. Labels can contain + // The key/value metadata to label an intent. Labels can contain // lowercase letters, digits and the symbols '-' and '_'. International // characters are allowed, including letters from unicase alphabets. Keys must // start with a letter. Keys and values can be no longer than 63 characters @@ -211,11 +211,11 @@ message Intent { // * sys.contextual // The above labels do not require value. "sys.head" means the intent is a // head intent. "sys.contextual" means the intent is a contextual intent. - map labels = 7 [(google.api.field_behavior) = OPTIONAL]; + map labels = 7; - // Optional. Human readable description for better understanding an intent like its + // Human readable description for better understanding an intent like its // scope, content, result etc. Maximum character limit: 140 characters. - string description = 8 [(google.api.field_behavior) = OPTIONAL]; + string description = 8; } // The request message for [Intents.ListIntents][google.cloud.dialogflow.cx.v3.Intents.ListIntents]. diff --git a/protos/google/cloud/dialogflow/cx/v3/session.proto b/protos/google/cloud/dialogflow/cx/v3/session.proto index b2d6c049..8d576373 100644 --- a/protos/google/cloud/dialogflow/cx/v3/session.proto +++ b/protos/google/cloud/dialogflow/cx/v3/session.proto @@ -388,6 +388,21 @@ message QueryParameters { // - Else: parameter value google.protobuf.Struct parameters = 5; + // The unique identifier of the [page][google.cloud.dialogflow.cx.v3.Page] to override the [current + // page][QueryResult.current_page] in the session. Format: `projects//locations//agents//pages/`. + // + // If `current_page` is specified, the previous state of the session will be + // ignored by Dialogflow, including the [previous + // page][QueryResult.current_page] and the [previous session + // parameters][QueryResult.parameters]. + // In most cases, [current_page][google.cloud.dialogflow.cx.v3.QueryParameters.current_page] and + // [parameters][google.cloud.dialogflow.cx.v3.QueryParameters.parameters] should be configured together to + // direct a session to a specific state. + string current_page = 6 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Page" + }]; + // Whether to disable webhook calls for this request. bool disable_webhook = 7; diff --git a/protos/google/cloud/dialogflow/cx/v3/webhook.proto b/protos/google/cloud/dialogflow/cx/v3/webhook.proto index 6d367b3e..3424d9c2 100644 --- a/protos/google/cloud/dialogflow/cx/v3/webhook.proto +++ b/protos/google/cloud/dialogflow/cx/v3/webhook.proto @@ -314,6 +314,10 @@ message WebhookRequest { string trigger_event = 14; } + // The language code specified in the [original + // request][QueryInput.language_code]. + string language_code = 15; + // Always present. Information about the fulfillment that triggered this // webhook call. FulfillmentInfo fulfillment_info = 6; diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 3dd05adc..dd8a85c0 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -1985,6 +1985,9 @@ export namespace google { /** Flow eventHandlers */ eventHandlers?: (google.cloud.dialogflow.cx.v3.IEventHandler[]|null); + /** Flow transitionRouteGroups */ + transitionRouteGroups?: (string[]|null); + /** Flow nluSettings */ nluSettings?: (google.cloud.dialogflow.cx.v3.INluSettings|null); } @@ -2013,6 +2016,9 @@ export namespace google { /** Flow eventHandlers. */ public eventHandlers: google.cloud.dialogflow.cx.v3.IEventHandler[]; + /** Flow transitionRouteGroups. */ + public transitionRouteGroups: string[]; + /** Flow nluSettings. */ public nluSettings?: (google.cloud.dialogflow.cx.v3.INluSettings|null); @@ -15081,6 +15087,9 @@ export namespace google { /** QueryParameters parameters */ parameters?: (google.protobuf.IStruct|null); + /** QueryParameters currentPage */ + currentPage?: (string|null); + /** QueryParameters disableWebhook */ disableWebhook?: (boolean|null); @@ -15115,6 +15124,9 @@ export namespace google { /** QueryParameters parameters. */ public parameters?: (google.protobuf.IStruct|null); + /** QueryParameters currentPage. */ + public currentPage: string; + /** QueryParameters disableWebhook. */ public disableWebhook: boolean; @@ -23026,6 +23038,9 @@ export namespace google { /** WebhookRequest triggerEvent */ triggerEvent?: (string|null); + /** WebhookRequest languageCode */ + languageCode?: (string|null); + /** WebhookRequest fulfillmentInfo */ fulfillmentInfo?: (google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo|null); @@ -23072,6 +23087,9 @@ export namespace google { /** WebhookRequest triggerEvent. */ public triggerEvent: string; + /** WebhookRequest languageCode. */ + public languageCode: string; + /** WebhookRequest fulfillmentInfo. */ public fulfillmentInfo?: (google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo|null); diff --git a/protos/protos.js b/protos/protos.js index fc907e5a..fb6e2b6e 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -4302,6 +4302,7 @@ * @property {string|null} [description] Flow description * @property {Array.|null} [transitionRoutes] Flow transitionRoutes * @property {Array.|null} [eventHandlers] Flow eventHandlers + * @property {Array.|null} [transitionRouteGroups] Flow transitionRouteGroups * @property {google.cloud.dialogflow.cx.v3.INluSettings|null} [nluSettings] Flow nluSettings */ @@ -4316,6 +4317,7 @@ function Flow(properties) { this.transitionRoutes = []; this.eventHandlers = []; + this.transitionRouteGroups = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4362,6 +4364,14 @@ */ Flow.prototype.eventHandlers = $util.emptyArray; + /** + * Flow transitionRouteGroups. + * @member {Array.} transitionRouteGroups + * @memberof google.cloud.dialogflow.cx.v3.Flow + * @instance + */ + Flow.prototype.transitionRouteGroups = $util.emptyArray; + /** * Flow nluSettings. * @member {google.cloud.dialogflow.cx.v3.INluSettings|null|undefined} nluSettings @@ -4408,6 +4418,9 @@ $root.google.cloud.dialogflow.cx.v3.EventHandler.encode(message.eventHandlers[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); if (message.nluSettings != null && Object.hasOwnProperty.call(message, "nluSettings")) $root.google.cloud.dialogflow.cx.v3.NluSettings.encode(message.nluSettings, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.transitionRouteGroups != null && message.transitionRouteGroups.length) + for (var i = 0; i < message.transitionRouteGroups.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.transitionRouteGroups[i]); return writer; }; @@ -4461,6 +4474,11 @@ message.eventHandlers = []; message.eventHandlers.push($root.google.cloud.dialogflow.cx.v3.EventHandler.decode(reader, reader.uint32())); break; + case 15: + if (!(message.transitionRouteGroups && message.transitionRouteGroups.length)) + message.transitionRouteGroups = []; + message.transitionRouteGroups.push(reader.string()); + break; case 11: message.nluSettings = $root.google.cloud.dialogflow.cx.v3.NluSettings.decode(reader, reader.uint32()); break; @@ -4526,6 +4544,13 @@ return "eventHandlers." + error; } } + if (message.transitionRouteGroups != null && message.hasOwnProperty("transitionRouteGroups")) { + if (!Array.isArray(message.transitionRouteGroups)) + return "transitionRouteGroups: array expected"; + for (var i = 0; i < message.transitionRouteGroups.length; ++i) + if (!$util.isString(message.transitionRouteGroups[i])) + return "transitionRouteGroups: string[] expected"; + } if (message.nluSettings != null && message.hasOwnProperty("nluSettings")) { var error = $root.google.cloud.dialogflow.cx.v3.NluSettings.verify(message.nluSettings); if (error) @@ -4572,6 +4597,13 @@ message.eventHandlers[i] = $root.google.cloud.dialogflow.cx.v3.EventHandler.fromObject(object.eventHandlers[i]); } } + if (object.transitionRouteGroups) { + if (!Array.isArray(object.transitionRouteGroups)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Flow.transitionRouteGroups: array expected"); + message.transitionRouteGroups = []; + for (var i = 0; i < object.transitionRouteGroups.length; ++i) + message.transitionRouteGroups[i] = String(object.transitionRouteGroups[i]); + } if (object.nluSettings != null) { if (typeof object.nluSettings !== "object") throw TypeError(".google.cloud.dialogflow.cx.v3.Flow.nluSettings: object expected"); @@ -4596,6 +4628,7 @@ if (options.arrays || options.defaults) { object.transitionRoutes = []; object.eventHandlers = []; + object.transitionRouteGroups = []; } if (options.defaults) { object.name = ""; @@ -4621,6 +4654,11 @@ } if (message.nluSettings != null && message.hasOwnProperty("nluSettings")) object.nluSettings = $root.google.cloud.dialogflow.cx.v3.NluSettings.toObject(message.nluSettings, options); + if (message.transitionRouteGroups && message.transitionRouteGroups.length) { + object.transitionRouteGroups = []; + for (var j = 0; j < message.transitionRouteGroups.length; ++j) + object.transitionRouteGroups[j] = message.transitionRouteGroups[j]; + } return object; }; @@ -35292,6 +35330,7 @@ * @property {Array.|null} [sessionEntityTypes] QueryParameters sessionEntityTypes * @property {google.protobuf.IStruct|null} [payload] QueryParameters payload * @property {google.protobuf.IStruct|null} [parameters] QueryParameters parameters + * @property {string|null} [currentPage] QueryParameters currentPage * @property {boolean|null} [disableWebhook] QueryParameters disableWebhook * @property {boolean|null} [analyzeQueryTextSentiment] QueryParameters analyzeQueryTextSentiment * @property {Object.|null} [webhookHeaders] QueryParameters webhookHeaders @@ -35354,6 +35393,14 @@ */ QueryParameters.prototype.parameters = null; + /** + * QueryParameters currentPage. + * @member {string} currentPage + * @memberof google.cloud.dialogflow.cx.v3.QueryParameters + * @instance + */ + QueryParameters.prototype.currentPage = ""; + /** * QueryParameters disableWebhook. * @member {boolean} disableWebhook @@ -35413,6 +35460,8 @@ $root.google.protobuf.Struct.encode(message.payload, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) $root.google.protobuf.Struct.encode(message.parameters, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.currentPage != null && Object.hasOwnProperty.call(message, "currentPage")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.currentPage); if (message.disableWebhook != null && Object.hasOwnProperty.call(message, "disableWebhook")) writer.uint32(/* id 7, wireType 0 =*/56).bool(message.disableWebhook); if (message.analyzeQueryTextSentiment != null && Object.hasOwnProperty.call(message, "analyzeQueryTextSentiment")) @@ -35471,6 +35520,9 @@ case 5: message.parameters = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; + case 6: + message.currentPage = reader.string(); + break; case 7: message.disableWebhook = reader.bool(); break; @@ -35561,6 +35613,9 @@ if (error) return "parameters." + error; } + if (message.currentPage != null && message.hasOwnProperty("currentPage")) + if (!$util.isString(message.currentPage)) + return "currentPage: string expected"; if (message.disableWebhook != null && message.hasOwnProperty("disableWebhook")) if (typeof message.disableWebhook !== "boolean") return "disableWebhook: boolean expected"; @@ -35617,6 +35672,8 @@ throw TypeError(".google.cloud.dialogflow.cx.v3.QueryParameters.parameters: object expected"); message.parameters = $root.google.protobuf.Struct.fromObject(object.parameters); } + if (object.currentPage != null) + message.currentPage = String(object.currentPage); if (object.disableWebhook != null) message.disableWebhook = Boolean(object.disableWebhook); if (object.analyzeQueryTextSentiment != null) @@ -35653,6 +35710,7 @@ object.geoLocation = null; object.payload = null; object.parameters = null; + object.currentPage = ""; object.disableWebhook = false; object.analyzeQueryTextSentiment = false; } @@ -35669,6 +35727,8 @@ object.payload = $root.google.protobuf.Struct.toObject(message.payload, options); if (message.parameters != null && message.hasOwnProperty("parameters")) object.parameters = $root.google.protobuf.Struct.toObject(message.parameters, options); + if (message.currentPage != null && message.hasOwnProperty("currentPage")) + object.currentPage = message.currentPage; if (message.disableWebhook != null && message.hasOwnProperty("disableWebhook")) object.disableWebhook = message.disableWebhook; if (message.analyzeQueryTextSentiment != null && message.hasOwnProperty("analyzeQueryTextSentiment")) @@ -53761,6 +53821,7 @@ * @property {string|null} [triggerIntent] WebhookRequest triggerIntent * @property {string|null} [transcript] WebhookRequest transcript * @property {string|null} [triggerEvent] WebhookRequest triggerEvent + * @property {string|null} [languageCode] WebhookRequest languageCode * @property {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo|null} [fulfillmentInfo] WebhookRequest fulfillmentInfo * @property {google.cloud.dialogflow.cx.v3.WebhookRequest.IIntentInfo|null} [intentInfo] WebhookRequest intentInfo * @property {google.cloud.dialogflow.cx.v3.IPageInfo|null} [pageInfo] WebhookRequest pageInfo @@ -53826,6 +53887,14 @@ */ WebhookRequest.prototype.triggerEvent = ""; + /** + * WebhookRequest languageCode. + * @member {string} languageCode + * @memberof google.cloud.dialogflow.cx.v3.WebhookRequest + * @instance + */ + WebhookRequest.prototype.languageCode = ""; + /** * WebhookRequest fulfillmentInfo. * @member {google.cloud.dialogflow.cx.v3.WebhookRequest.IFulfillmentInfo|null|undefined} fulfillmentInfo @@ -53945,6 +54014,8 @@ writer.uint32(/* id 12, wireType 2 =*/98).string(message.transcript); if (message.triggerEvent != null && Object.hasOwnProperty.call(message, "triggerEvent")) writer.uint32(/* id 14, wireType 2 =*/114).string(message.triggerEvent); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.languageCode); return writer; }; @@ -53994,6 +54065,9 @@ case 14: message.triggerEvent = reader.string(); break; + case 15: + message.languageCode = reader.string(); + break; case 6: message.fulfillmentInfo = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.decode(reader, reader.uint32()); break; @@ -54082,6 +54156,9 @@ if (!$util.isString(message.triggerEvent)) return "triggerEvent: string expected"; } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; if (message.fulfillmentInfo != null && message.hasOwnProperty("fulfillmentInfo")) { var error = $root.google.cloud.dialogflow.cx.v3.WebhookRequest.FulfillmentInfo.verify(message.fulfillmentInfo); if (error) @@ -54146,6 +54223,8 @@ message.transcript = String(object.transcript); if (object.triggerEvent != null) message.triggerEvent = String(object.triggerEvent); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); if (object.fulfillmentInfo != null) { if (typeof object.fulfillmentInfo !== "object") throw TypeError(".google.cloud.dialogflow.cx.v3.WebhookRequest.fulfillmentInfo: object expected"); @@ -54212,6 +54291,7 @@ object.fulfillmentInfo = null; object.payload = null; object.sentimentAnalysisResult = null; + object.languageCode = ""; } if (message.detectIntentResponseId != null && message.hasOwnProperty("detectIntentResponseId")) object.detectIntentResponseId = message.detectIntentResponseId; @@ -54252,6 +54332,8 @@ if (options.oneofs) object.query = "triggerEvent"; } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; return object; }; diff --git a/protos/protos.json b/protos/protos.json index 93871f29..b0b26ca5 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -728,6 +728,14 @@ "type": "EventHandler", "id": 10 }, + "transitionRouteGroups": { + "rule": "repeated", + "type": "string", + "id": 15, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/TransitionRouteGroup" + } + }, "nluSettings": { "type": "NluSettings", "id": 11 @@ -3624,17 +3632,11 @@ "labels": { "keyType": "string", "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "id": 7 }, "description": { "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "id": 8 } }, "nested": { @@ -4060,6 +4062,13 @@ "type": "google.protobuf.Struct", "id": 5 }, + "currentPage": { + "type": "string", + "id": 6, + "options": { + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Page" + } + }, "disableWebhook": { "type": "bool", "id": 7 @@ -6289,6 +6298,10 @@ "type": "string", "id": 14 }, + "languageCode": { + "type": "string", + "id": 15 + }, "fulfillmentInfo": { "type": "FulfillmentInfo", "id": 6