diff --git a/.release-please-manifest.json b/.release-please-manifest.json index aa4edc624b2..d138b88c152 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -20,6 +20,7 @@ "packages/google-cloud-dataplex": "2.2.2", "packages/google-cloud-dataproc": "4.1.1", "packages/google-cloud-deploy": "2.2.2", + "packages/google-cloud-dialogflow-cx": "3.1.2", "packages/google-cloud-dialogflow": "5.3.0", "packages/google-cloud-discoveryengine": "0.2.0", "packages/google-cloud-documentai": "6.1.0", diff --git a/packages/google-cloud-dialogflow-cx/.OwlBot.yaml b/packages/google-cloud-dialogflow-cx/.OwlBot.yaml new file mode 100644 index 00000000000..6b0429b1883 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/.OwlBot.yaml @@ -0,0 +1,21 @@ +# Copyright 2021 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. + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/cloud/dialogflow/cx/(.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-dialogflow-cx/$1 + diff --git a/packages/google-cloud-dialogflow-cx/.eslintignore b/packages/google-cloud-dialogflow-cx/.eslintignore new file mode 100644 index 00000000000..ea5b04aebe6 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ +samples/generated/ diff --git a/packages/google-cloud-dialogflow-cx/.eslintrc.json b/packages/google-cloud-dialogflow-cx/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-dialogflow-cx/.gitattributes b/packages/google-cloud-dialogflow-cx/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/packages/google-cloud-dialogflow-cx/.gitignore b/packages/google-cloud-dialogflow-cx/.gitignore new file mode 100644 index 00000000000..5d32b23782f --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +.coverage +coverage +.nyc_output +docs/ +out/ +build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/packages/google-cloud-dialogflow-cx/.jsdoc.js b/packages/google-cloud-dialogflow-cx/.jsdoc.js new file mode 100644 index 00000000000..85a2ecc09b6 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2022 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2022 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/dialogflow-cx', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-dialogflow-cx/.mocharc.js b/packages/google-cloud-dialogflow-cx/.mocharc.js new file mode 100644 index 00000000000..cdb7b752160 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2022 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. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000, + "recursive": true +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-cloud-dialogflow-cx/.nycrc b/packages/google-cloud-dialogflow-cx/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} diff --git a/packages/google-cloud-dialogflow-cx/.prettierignore b/packages/google-cloud-dialogflow-cx/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-dialogflow-cx/.prettierrc.js b/packages/google-cloud-dialogflow-cx/.prettierrc.js new file mode 100644 index 00000000000..d546a4ad546 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2022 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 +// +// https://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. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-cloud-dialogflow-cx/.repo-metadata.json b/packages/google-cloud-dialogflow-cx/.repo-metadata.json new file mode 100644 index 00000000000..98227cec72d --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "default_version": "v3", + "release_level": "stable", + "requires_billing": true, + "client_documentation": "https://googleapis.dev/nodejs/dialogflow-cx/latest", + "codeowner_team": "@googleapis/ml-apis", + "language": "nodejs", + "issue_tracker": "https://issuetracker.google.com/savedsearches/5300385", + "product_documentation": "https://cloud.google.com/dialogflow-enterprise/", + "name": "dialogflow-cx", + "distribution_name": "@google-cloud/dialogflow-cx", + "name_pretty": "Dialogflow CX API", + "api_id": "dialogflow.googleapis.com", + "repo": "googleapis/google-cloud-node", + "api_shortname": "dialogflow", + "library_type": "GAPIC_AUTO" +} diff --git a/packages/google-cloud-dialogflow-cx/CHANGELOG.md b/packages/google-cloud-dialogflow-cx/CHANGELOG.md new file mode 100644 index 00000000000..7cf8263b0aa --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/CHANGELOG.md @@ -0,0 +1,283 @@ +# Changelog + +## [3.1.2](https://github.com/googleapis/nodejs-dialogflow-cx/compare/v3.1.1...v3.1.2) (2022-11-11) + + +### Bug Fixes + +* **deps:** Use google-gax v3.5.2 ([#320](https://github.com/googleapis/nodejs-dialogflow-cx/issues/320)) ([516e59d](https://github.com/googleapis/nodejs-dialogflow-cx/commit/516e59d6f6a4a9e16ed635900bd89d6c3a73ee10)) +* Regenerated protos JS and TS definitions ([#324](https://github.com/googleapis/nodejs-dialogflow-cx/issues/324)) ([c82e46a](https://github.com/googleapis/nodejs-dialogflow-cx/commit/c82e46a74aa30862e999ae37f16508f241792493)) + +## [3.1.1](https://github.com/googleapis/nodejs-dialogflow-cx/compare/v3.1.0...v3.1.1) (2022-09-14) + + +### Bug Fixes + +* Allow passing gax instance to client constructor ([#310](https://github.com/googleapis/nodejs-dialogflow-cx/issues/310)) ([5eb33cd](https://github.com/googleapis/nodejs-dialogflow-cx/commit/5eb33cd1e3ace81e70a844b870d9fc102ec73a3e)) +* Better support for fallback mode ([#305](https://github.com/googleapis/nodejs-dialogflow-cx/issues/305)) ([f63bcf2](https://github.com/googleapis/nodejs-dialogflow-cx/commit/f63bcf25e3354b00d4a428cad0a082134642b661)) +* Change import long to require ([#306](https://github.com/googleapis/nodejs-dialogflow-cx/issues/306)) ([343bc0e](https://github.com/googleapis/nodejs-dialogflow-cx/commit/343bc0efe2ee44888c706f3f377399df3fef13af)) +* **deps:** Update dependency uuid to v9 ([#311](https://github.com/googleapis/nodejs-dialogflow-cx/issues/311)) ([f7ba638](https://github.com/googleapis/nodejs-dialogflow-cx/commit/f7ba63867b32a4435f089584c08c5721eec428a7)) +* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-dialogflow-cx/issues/1553)) ([#309](https://github.com/googleapis/nodejs-dialogflow-cx/issues/309)) ([844c8f7](https://github.com/googleapis/nodejs-dialogflow-cx/commit/844c8f71bf36ed7829542c3f5ff552baee17811a)) +* Preserve default values in x-goog-request-params header ([#312](https://github.com/googleapis/nodejs-dialogflow-cx/issues/312)) ([239d018](https://github.com/googleapis/nodejs-dialogflow-cx/commit/239d0185f5897109914543c96116cc35574fd2af)) +* Remove pip install statements ([#1546](https://github.com/googleapis/nodejs-dialogflow-cx/issues/1546)) ([#308](https://github.com/googleapis/nodejs-dialogflow-cx/issues/308)) ([7363dfe](https://github.com/googleapis/nodejs-dialogflow-cx/commit/7363dfe3bf9ba7431871a7a9ecbff68024a37191)) +* use google-gax v3.3.0 ([844c8f7](https://github.com/googleapis/nodejs-dialogflow-cx/commit/844c8f71bf36ed7829542c3f5ff552baee17811a)) + +## [3.1.0](https://github.com/googleapis/nodejs-dialogflow-cx/compare/v3.0.0...v3.1.0) (2022-07-08) + + +### Features + +* added webhook_config ([03c33b8](https://github.com/googleapis/nodejs-dialogflow-cx/commit/03c33b89205ee8e9e9fbdd76cda7461ef87886d4)) +* support regapic LRO ([03c33b8](https://github.com/googleapis/nodejs-dialogflow-cx/commit/03c33b89205ee8e9e9fbdd76cda7461ef87886d4)) + + +### Bug Fixes + +* fixes for dynamic routing and streaming descriptors ([03c33b8](https://github.com/googleapis/nodejs-dialogflow-cx/commit/03c33b89205ee8e9e9fbdd76cda7461ef87886d4)) + +## [3.0.0](https://github.com/googleapis/nodejs-dialogflow-cx/compare/v2.15.0...v3.0.0) (2022-06-23) + + +### ⚠ BREAKING CHANGES + +* update library to use Node 12 (#288) + +### Features + +* add Webhook samples ([#259](https://github.com/googleapis/nodejs-dialogflow-cx/issues/259)) ([709dc6d](https://github.com/googleapis/nodejs-dialogflow-cx/commit/709dc6d88d768a9b553187787e9fb3808be8d991)) +* added audio_export_settings ([#257](https://github.com/googleapis/nodejs-dialogflow-cx/issues/257)) ([39f1d1c](https://github.com/googleapis/nodejs-dialogflow-cx/commit/39f1d1ced3401e7cfa72f1448745d424837d42f2)) +* added data format specification for export agent ([361e7d9](https://github.com/googleapis/nodejs-dialogflow-cx/commit/361e7d9d1f596a6280f07a1ce20456195a943d7a)) +* added data format specification for export agent ([361e7d9](https://github.com/googleapis/nodejs-dialogflow-cx/commit/361e7d9d1f596a6280f07a1ce20456195a943d7a)) +* added page in TestConfig ([7adaf67](https://github.com/googleapis/nodejs-dialogflow-cx/commit/7adaf6735cbef19d38e1288fd40ea27cf595b20f)) +* added page in TestConfig ([#239](https://github.com/googleapis/nodejs-dialogflow-cx/issues/239)) ([283c389](https://github.com/googleapis/nodejs-dialogflow-cx/commit/283c389cc220b9f192f15822ef2d1e38f35d6103)) +* added support for locking an agent for changes ([361e7d9](https://github.com/googleapis/nodejs-dialogflow-cx/commit/361e7d9d1f596a6280f07a1ce20456195a943d7a)) +* added support for locking an agent for changes ([361e7d9](https://github.com/googleapis/nodejs-dialogflow-cx/commit/361e7d9d1f596a6280f07a1ce20456195a943d7a)) + + +### Build System + +* update library to use Node 12 ([#288](https://github.com/googleapis/nodejs-dialogflow-cx/issues/288)) ([9a72b32](https://github.com/googleapis/nodejs-dialogflow-cx/commit/9a72b3214b65c59ef6a34471dc93050bd61e846c)) + +## [2.15.0](https://github.com/googleapis/nodejs-dialogflow-cx/compare/v2.14.0...v2.15.0) (2022-01-19) + + +### Features + +* added `TelephonyTransferCall` in response message ([#207](https://github.com/googleapis/nodejs-dialogflow-cx/issues/207)) ([8859e3f](https://github.com/googleapis/nodejs-dialogflow-cx/commit/8859e3ff90a7d46be6a7d09bb8de2ad5db421a8f)) +* added API for changelogs docs: clarified semantic of the streaming APIs ([#197](https://github.com/googleapis/nodejs-dialogflow-cx/issues/197)) ([4f88255](https://github.com/googleapis/nodejs-dialogflow-cx/commit/4f882555cdd0243e775589e49f700defe1fa6902)) +* added API for changelogs docs: clarified semantic of the streaming APIs ([#198](https://github.com/googleapis/nodejs-dialogflow-cx/issues/198)) ([9882149](https://github.com/googleapis/nodejs-dialogflow-cx/commit/988214975c0b7e16fd6ca99a57697ffb0a1ff490)) +* added deployment API feat: exposed DTMF input info in the query result docs: added notes on long running operation ([#191](https://github.com/googleapis/nodejs-dialogflow-cx/issues/191)) ([5460ad4](https://github.com/googleapis/nodejs-dialogflow-cx/commit/5460ad46ffb774f590c8ff24816aa7f116dab112)) +* added support for `TelephonyTransferCall` ([#206](https://github.com/googleapis/nodejs-dialogflow-cx/issues/206)) ([17089de](https://github.com/googleapis/nodejs-dialogflow-cx/commit/17089defcd29ff87ecf4e6fcd9616233e4e26f7e)) +* added support for comparing between versions docs: clarified security settings API reference ([#201](https://github.com/googleapis/nodejs-dialogflow-cx/issues/201)) ([f4ca7e2](https://github.com/googleapis/nodejs-dialogflow-cx/commit/f4ca7e2cb06a149ab50278f692ba7a4ed1e62cc4)) +* added support for DeployFlow api under Environments ([5460ad4](https://github.com/googleapis/nodejs-dialogflow-cx/commit/5460ad46ffb774f590c8ff24816aa7f116dab112)) +* added support for Deployments with ListDeployments and GetDeployment apis ([5460ad4](https://github.com/googleapis/nodejs-dialogflow-cx/commit/5460ad46ffb774f590c8ff24816aa7f116dab112)) +* added support for TestCasesConfig under Environment ([5460ad4](https://github.com/googleapis/nodejs-dialogflow-cx/commit/5460ad46ffb774f590c8ff24816aa7f116dab112)) +* added the display name of the current page in webhook requests ([#211](https://github.com/googleapis/nodejs-dialogflow-cx/issues/211)) ([ae9b5ee](https://github.com/googleapis/nodejs-dialogflow-cx/commit/ae9b5ee6e6f79e81401d934702b0950b29f79ca3)) +* added the display name of the current page in webhook requests ([#212](https://github.com/googleapis/nodejs-dialogflow-cx/issues/212)) ([349bc41](https://github.com/googleapis/nodejs-dialogflow-cx/commit/349bc4108b10263cd2f0354a3ad9e33697fa72a6)) +* allow setting custom CA for generic webhooks ([#203](https://github.com/googleapis/nodejs-dialogflow-cx/issues/203)) ([f5d8155](https://github.com/googleapis/nodejs-dialogflow-cx/commit/f5d8155d7070f4d1b60ba32bc2f168c4169d9546)) +* expose dtmf input info in the query result ([5460ad4](https://github.com/googleapis/nodejs-dialogflow-cx/commit/5460ad46ffb774f590c8ff24816aa7f116dab112)) + + +### Bug Fixes + +* marked resource name of security setting as not-required ([5460ad4](https://github.com/googleapis/nodejs-dialogflow-cx/commit/5460ad46ffb774f590c8ff24816aa7f116dab112)) + +## [2.14.0](https://www.github.com/googleapis/nodejs-dialogflow-cx/compare/v2.13.0...v2.14.0) (2021-09-21) + + +### Features + +* turns on self-signed JWT feature flag ([#167](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/167)) ([a474169](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/a47416973c53bb62a701204fcacb7e5013d25658)) + +## [2.13.0](https://www.github.com/googleapis/nodejs-dialogflow-cx/compare/v2.12.1...v2.13.0) (2021-08-17) + + +### Features + +* add advanced settings for agent level feat: add rollout config, state and failure reason for experiment feat: add insights export settings for security setting feat: add language code for streaming recognition result and flow versions for query p... ([#156](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/156)) ([80d2f94](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/80d2f94bcfaa65ea442ee4f8133d850035be04ed)) +* added support for DLP templates; expose `Locations` service to get/list avaliable locations of Dialogflow products ([#162](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/162)) ([b77bde9](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/b77bde9893cde0c9e766b8e844fa4cca61efb5aa)) + + +### Bug Fixes + +* **build:** migrate to using main branch ([#164](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/164)) ([092d69d](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/092d69d76716297aff6a671200088d5740b1fd47)) +* **deps:** google-gax v2.24.1 ([#165](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/165)) ([6261c37](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/6261c37019b3ce94a9876bfa4634837132691888)) + +### [2.12.1](https://www.github.com/googleapis/nodejs-dialogflow-cx/compare/v2.12.0...v2.12.1) (2021-07-21) + + +### Bug Fixes + +* **deps:** google-gax v2.17.1 ([#148](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/148)) ([5e1ec0a](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/5e1ec0a77db21c219531800d2c54c5edd4f54fba)) +* Updating WORKSPACE files to use the newest version of the Typescript generator. ([#150](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/150)) ([8974183](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/8974183edd156e9adb9e9d11557931bda03c1d3c)) + +## [2.12.0](https://www.github.com/googleapis/nodejs-dialogflow-cx/compare/v2.11.0...v2.12.0) (2021-06-30) + + +### Features + +* mark agent.default_language_code as required feat: add return_partial response to Fulfillment docs: add notes to train agent before sending queries ([#140](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/140)) ([eae8f44](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/eae8f4409cf5832c5fd28e2e676847a4722997b9)) + + +### Bug Fixes + +* **deps:** google-gax v2.17.0 with mTLS ([#145](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/145)) ([d5f2918](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/d5f291886d1418ad43684d3db7b0a2d12cd8c219)) +* make request optional in all cases ([#139](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/139)) ([ad950f0](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/ad950f057f413b9c094b6d23a21ada0d64887206)) + +## [2.11.0](https://www.github.com/googleapis/nodejs-dialogflow-cx/compare/v2.10.0...v2.11.0) (2021-06-21) + + +### Features + +* **v3beta1:** Support partial response feature ([ee8a24a](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/ee8a24a1e47cb352198880490f047e2ff3d47152)) +* **v3beta1:** support sentiment analysis in bot testing ([#127](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/127)) ([2c45b2c](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/2c45b2c4e9662aaef7352f3b3edf58c0bf29779e)) + + +### Bug Fixes + +* **v3beta1:** set agent default language code as required ([#134](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/134)) ([ee8a24a](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/ee8a24a1e47cb352198880490f047e2ff3d47152)) + +## [2.10.0](https://www.github.com/googleapis/nodejs-dialogflow-cx/compare/v2.9.0...v2.10.0) (2021-06-17) + + +### Features + +* **v3:** support sentiment analysis in bot testing ([#125](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/125)) ([d6d7684](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/d6d7684692ec3790ec5a4284cb206a4c26f4a1ab)) + +## [2.9.0](https://www.github.com/googleapis/nodejs-dialogflow-cx/compare/v2.8.1...v2.9.0) (2021-06-14) + + +### Features + +* added API for running continuous test ([#123](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/123)) ([248ae74](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/248ae742e786dd24f8a0e8161a1a30f684c3b7ff)) + +### [2.8.1](https://www.github.com/googleapis/nodejs-dialogflow-cx/compare/v2.8.0...v2.8.1) (2021-06-10) + + +### Bug Fixes + +* GoogleAdsError missing using generator version after 1.3.0 ([#122](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/122)) ([af8ca45](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/af8ca45c8d70264899bb458f68d6b5c0060229fa)) + +## [2.8.0](https://www.github.com/googleapis/nodejs-dialogflow-cx/compare/v2.7.0...v2.8.0) (2021-05-25) + + +### Features + +* added API for continuous test ([#119](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/119)) ([d36009b](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/d36009b8079314fbd7f9c30d2013ed53dc811342)) + +## [2.7.0](https://www.github.com/googleapis/nodejs-dialogflow-cx/compare/v2.6.0...v2.7.0) (2021-05-10) + + +### Features + +* add support for service directory webhooks ([#110](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/110)) ([d4b87a5](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/d4b87a5ba49dfa723079be71f9a7c6e69b4240b2)) +* add support for service directory webhooks ([#113](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/113)) ([2ce89d5](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/2ce89d5a885f73bb66630f2ba1e5ad79b7c40730)) + + +### Bug Fixes + +* **deps:** require google-gax v2.12.0 ([#106](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/106)) ([2c333d7](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/2c333d73df45ff13b0a2a85332bbcb23be2e7d41)) +* use require() to load JSON protos ([#112](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/112)) ([d0cf055](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/d0cf055738496681fa351a9228f2a788b4132910)) + +## [2.6.0](https://www.github.com/googleapis/nodejs-dialogflow-cx/compare/v2.5.0...v2.6.0) (2021-05-05) + + +### Features + +* Expose supported languages of the agent; feat: add export / import flow API docs: Update docs on Pages, Session, Version, etc. ([#104](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/104)) ([c7ac26e](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/c7ac26ed6118cb8f2ea6ed9d7d6e0ca3421d84ea)) + +## [2.5.0](https://www.github.com/googleapis/nodejs-dialogflow-cx/compare/v2.4.0...v2.5.0) (2021-04-28) + + +### Features + +* Expose supported languages of the agent; feat: add export / import flow API docs: Update docs on Pages, Session, Version, etc. ([#103](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/103)) ([daa06ab](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/daa06abca3ef1e601672d9a18363603dcb359c6f)) +* include original user query in WebhookRequest; add GetTextCaseresult API. ([528192e](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/528192eb11453502332a35ff5838130e19c5e869)) +* include original user query in WebhookRequest; add GetTextCaseresult API. doc: clarify resource format for session response. ([#82](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/82)) ([ff13a97](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/ff13a9708fccc0bf85f7972328dc289b50fdac20)) +* support setting current_page to resume sessions; expose transition_route_groups in flows and language_code in webhook ([#90](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/90)) ([53f1e21](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/53f1e21deaf3adee3493b398529fc75baae70f99)) +* support setting current_page to resume sessions; expose transition_route_groups in flows and language_code in webhook ([#91](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/91)) ([cd125d3](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/cd125d35c75ad740d3aa46d5af4a2142aaa051f1)) + +## [2.4.0](https://www.github.com/googleapis/nodejs-dialogflow-cx/compare/v2.3.0...v2.4.0) (2021-03-15) + + +### Features + +* added fallback option when restoring an agent docs: clarified experiment length ([f90bb9c](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/f90bb9cd369659160a16fcfc67bc08c248bd1552)) +* added fallback option when restoring an agent docs: clarified experiment length ([f90bb9c](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/f90bb9cd369659160a16fcfc67bc08c248bd1552)) +* allow to disable webhook invocation per request ([f90bb9c](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/f90bb9cd369659160a16fcfc67bc08c248bd1552)) +* allow to disable webhook invocation per request ([3b1b674](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/3b1b674bbddbcb26fa607f9dc16db6c43752c371)) +* supports SentimentAnalysisResult in webhook request, add http rules for long running operations docs: minor ([3b1b674](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/3b1b674bbddbcb26fa607f9dc16db6c43752c371)) + + +### Bug Fixes + +* RunTestCase http template. PHP REST client lib can be generated. feat: Support transition route group coverage for Test Cases. feat: Support SentimentAnalysisResult input in the WebhookRequest. ([3b1b674](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/3b1b674bbddbcb26fa607f9dc16db6c43752c371)) + +## [2.3.0](https://www.github.com/googleapis/nodejs-dialogflow-cx/compare/v2.2.0...v2.3.0) (2021-03-01) + + +### Features + +* Add new Experiment service docs: minor doc update on redact field in intent.proto and page.proto ([63933cd](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/63933cdbb447795d879de3826e651ebf85baf973)) +* Add new Experiment service docs: minor doc update on redact field in intent.proto and page.proto ([63933cd](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/63933cdbb447795d879de3826e651ebf85baf973)) +* added support for test cases and agent validation ([#53](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/53)) ([63933cd](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/63933cdbb447795d879de3826e651ebf85baf973)) +* **docs:** promote to ga ([#63](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/63)) ([38acf82](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/38acf8247319392efebe865b1d1aafa2939e726e)) +* supports SentimentAnalysisResult in webhook request docs: minor updates in wording ([#62](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/62)) ([1e167ab](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/1e167ab90b17b33ba5cd6e01787f764c01310f48)) + +## [2.2.0](https://www.github.com/googleapis/nodejs-dialogflow-cx/compare/v2.1.0...v2.2.0) (2021-01-09) + + +### Features + +* adds style enumeration ([#49](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/49)) ([6d65571](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/6d655718327044ea6e77bc8501c805b5cd3fc4e2)) +* allowed custom to specify webhook headers through query parameters docs: suggested to always use version for production traffic when calling DetectIntent ([#44](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/44)) ([0ffd0b7](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/0ffd0b7a8a2f34c06062c9baf4f33b719b15ad9f)) +* expose Security Settings API. ([#46](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/46)) ([f6460ce](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/f6460cea16473d1f208eae4bfa3def7cf5583579)) + +## [2.1.0](https://www.github.com/googleapis/nodejs-dialogflow-cx/compare/v2.0.0...v2.1.0) (2020-11-25) + + +### Features + +* add back v3beta1 API surface ([#39](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/39)) ([36ba8fa](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/36ba8fa857ae34a21ce0710986689667f909349f)) + +## [2.0.0](https://www.github.com/googleapis/nodejs-dialogflow-cx/compare/v1.2.0...v2.0.0) (2020-11-19) + + +### ⚠ BREAKING CHANGES + +* move to v3 API surface (#35) + +### Features + +* move to v3 API surface ([#35](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/35)) ([3653ac4](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/3653ac4feb0fa19f66a2c9b60ed49c953208ba93)) + +## [1.2.0](https://www.github.com/googleapis/nodejs-dialogflow-cx/compare/v1.1.0...v1.2.0) (2020-11-17) + + +### Features + +* adds event to MessageType ([999d156](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/999d15616da58c1c909f99ac093833a5eb8665bb)) + + +### Bug Fixes + +* do not modify options object, use defaultScopes ([#27](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/27)) ([a0124c7](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/a0124c774e59d0a2873445f6fa7697a192739ebf)) + +## [1.1.0](https://www.github.com/googleapis/nodejs-dialogflow-cx/compare/v1.0.0...v1.1.0) (2020-10-14) + + +### Features + +* **samples:** examples of dialogflow-cx in action ([8b7b018](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/8b7b018b332d254351ce13e9b3b02a0b3e534b12)) + +## 1.0.0 (2020-08-25) + + +### ⚠ BREAKING CHANGES + +* initial full generation of library (#1) + +### Features + +* initial full generation of library ([#1](https://www.github.com/googleapis/nodejs-dialogflow-cx/issues/1)) ([f7dbf85](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/f7dbf859aff8577ae14fb5ae001e5f7709da0ecf)) +* initial library generation ([37c6b13](https://www.github.com/googleapis/nodejs-dialogflow-cx/commit/37c6b13460f8e94e45b3ef9fed2b9f88de0f8e47)) diff --git a/packages/google-cloud-dialogflow-cx/CODE_OF_CONDUCT.md b/packages/google-cloud-dialogflow-cx/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/packages/google-cloud-dialogflow-cx/CONTRIBUTING.md b/packages/google-cloud-dialogflow-cx/CONTRIBUTING.md new file mode 100644 index 00000000000..6041041f28a --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# How to become a contributor and submit your own code + +**Table of contents** + +* [Contributor License Agreements](#contributor-license-agreements) +* [Contributing a patch](#contributing-a-patch) +* [Running the tests](#running-the-tests) +* [Releasing the library](#releasing-the-library) + +## Contributor License Agreements + +We'd love to accept your sample apps and patches! Before we can take them, we +have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement +(CLA). + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). + +Follow either of the two links above to access the appropriate CLA and +instructions for how to sign and return it. Once we receive it, we'll be able to +accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a + Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Ensure that your code adheres to the existing style in the code to which + you are contributing. +1. Ensure that your code has an appropriate set of tests which all pass. +1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. +1. Submit a pull request. + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Dialogflow CX API API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + # Run unit tests. + npm test + + # Run sample integration tests. + npm run samples-test + + # Run all system tests. + npm run system-test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=dialogflow.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-dialogflow-cx/LICENSE b/packages/google-cloud-dialogflow-cx/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/packages/google-cloud-dialogflow-cx/README.md b/packages/google-cloud-dialogflow-cx/README.md new file mode 100644 index 00000000000..6fd9b9de487 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/README.md @@ -0,0 +1,406 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Dialogflow CX API: Node.js Client](https://github.com/googleapis/google-cloud-node) + +[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![npm version](https://img.shields.io/npm/v/@google-cloud/dialogflow-cx.svg)](https://www.npmjs.org/package/@google-cloud/dialogflow-cx) + + + + +Cx client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dialogflow-cx/CHANGELOG.md). + +* [Dialogflow CX API Node.js Client API Reference][client-docs] +* [Dialogflow CX API Documentation][product-docs] +* [github.com/googleapis/google-cloud-node/packages/google-cloud-dialogflow-cx](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dialogflow-cx) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + * [Using the client library](#using-the-client-library) +* [Samples](#samples) +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Dialogflow CX API API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + +### Installing the client library + +```bash +npm install @google-cloud/dialogflow-cx +``` + + +### Using the client library + +```javascript +/** + * TODO(developer): Uncomment these variables before running the sample. + */ +// const projectId = 'my-project'; +// const location = 'global'; +// const agentId = 'my-agent'; +// const audioFileName = '/path/to/audio.raw'; +// const encoding = 'AUDIO_ENCODING_LINEAR_16'; +// const sampleRateHertz = 16000; +// const languageCode = 'en' + +// Imports the Google Cloud Some API library +const {SessionsClient} = require('@google-cloud/dialogflow-cx'); +/** + * Example for regional endpoint: + * const location = 'us-central1' + * const client = new SessionsClient({apiEndpoint: 'us-central1-dialogflow.googleapis.com'}) + */ +const client = new SessionsClient(); + +const fs = require('fs'); +const util = require('util'); +// Assumes uuid module has been installed from npm, +// npm i uuid: +const {v4} = require('uuid'); + +async function detectIntentAudio() { + const sessionId = v4(); + const sessionPath = client.projectLocationAgentSessionPath( + projectId, + location, + agentId, + sessionId + ); + + // Read the content of the audio file and send it as part of the request. + const readFile = util.promisify(fs.readFile); + const inputAudio = await readFile(audioFileName); + + const request = { + session: sessionPath, + queryInput: { + audio: { + config: { + audioEncoding: encoding, + sampleRateHertz: sampleRateHertz, + }, + audio: inputAudio, + }, + languageCode, + }, + }; + const [response] = await client.detectIntent(request); + console.log(`User Query: ${response.queryResult.transcript}`); + for (const message of response.queryResult.responseMessages) { + if (message.text) { + console.log(`Agent Response: ${message.text.text}`); + } + } + if (response.queryResult.match.intent) { + console.log( + `Matched Intent: ${response.queryResult.match.intent.displayName}` + ); + } + console.log( + `Current Page: ${response.queryResult.currentPage.displayName}` + ); +} + +detectIntentAudio(); + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Agents.create_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.create_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.create_agent.js,samples/README.md) | +| Agents.delete_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.delete_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.delete_agent.js,samples/README.md) | +| Agents.export_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.export_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.export_agent.js,samples/README.md) | +| Agents.get_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.get_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.get_agent.js,samples/README.md) | +| Agents.get_agent_validation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.get_agent_validation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.get_agent_validation_result.js,samples/README.md) | +| Agents.list_agents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.list_agents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.list_agents.js,samples/README.md) | +| Agents.restore_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.restore_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.restore_agent.js,samples/README.md) | +| Agents.update_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.update_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.update_agent.js,samples/README.md) | +| Agents.validate_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.validate_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/agents.validate_agent.js,samples/README.md) | +| Changelogs.get_changelog | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/changelogs.get_changelog.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/changelogs.get_changelog.js,samples/README.md) | +| Changelogs.list_changelogs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/changelogs.list_changelogs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/changelogs.list_changelogs.js,samples/README.md) | +| Deployments.get_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/deployments.get_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/deployments.get_deployment.js,samples/README.md) | +| Deployments.list_deployments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/deployments.list_deployments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/deployments.list_deployments.js,samples/README.md) | +| Entity_types.create_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.create_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.create_entity_type.js,samples/README.md) | +| Entity_types.delete_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.delete_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.delete_entity_type.js,samples/README.md) | +| Entity_types.get_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.get_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.get_entity_type.js,samples/README.md) | +| Entity_types.list_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.list_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.list_entity_types.js,samples/README.md) | +| Entity_types.update_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.update_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/entity_types.update_entity_type.js,samples/README.md) | +| Environments.create_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.create_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.create_environment.js,samples/README.md) | +| Environments.delete_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.delete_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.delete_environment.js,samples/README.md) | +| Environments.deploy_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.deploy_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.deploy_flow.js,samples/README.md) | +| Environments.get_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.get_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.get_environment.js,samples/README.md) | +| Environments.list_continuous_test_results | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.list_continuous_test_results.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.list_continuous_test_results.js,samples/README.md) | +| Environments.list_environments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.list_environments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.list_environments.js,samples/README.md) | +| Environments.lookup_environment_history | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.lookup_environment_history.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.lookup_environment_history.js,samples/README.md) | +| Environments.run_continuous_test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.run_continuous_test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.run_continuous_test.js,samples/README.md) | +| Environments.update_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.update_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/environments.update_environment.js,samples/README.md) | +| Experiments.create_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.create_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.create_experiment.js,samples/README.md) | +| Experiments.delete_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.delete_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.delete_experiment.js,samples/README.md) | +| Experiments.get_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.get_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.get_experiment.js,samples/README.md) | +| Experiments.list_experiments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.list_experiments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.list_experiments.js,samples/README.md) | +| Experiments.start_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.start_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.start_experiment.js,samples/README.md) | +| Experiments.stop_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.stop_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.stop_experiment.js,samples/README.md) | +| Experiments.update_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.update_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/experiments.update_experiment.js,samples/README.md) | +| Flows.create_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.create_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.create_flow.js,samples/README.md) | +| Flows.delete_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.delete_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.delete_flow.js,samples/README.md) | +| Flows.export_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.export_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.export_flow.js,samples/README.md) | +| Flows.get_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.get_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.get_flow.js,samples/README.md) | +| Flows.get_flow_validation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.get_flow_validation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.get_flow_validation_result.js,samples/README.md) | +| Flows.import_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.import_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.import_flow.js,samples/README.md) | +| Flows.list_flows | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.list_flows.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.list_flows.js,samples/README.md) | +| Flows.train_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.train_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.train_flow.js,samples/README.md) | +| Flows.update_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.update_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.update_flow.js,samples/README.md) | +| Flows.validate_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.validate_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/flows.validate_flow.js,samples/README.md) | +| Intents.create_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.create_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.create_intent.js,samples/README.md) | +| Intents.delete_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.delete_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.delete_intent.js,samples/README.md) | +| Intents.get_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.get_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.get_intent.js,samples/README.md) | +| Intents.list_intents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.list_intents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.list_intents.js,samples/README.md) | +| Intents.update_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.update_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/intents.update_intent.js,samples/README.md) | +| Pages.create_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.create_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.create_page.js,samples/README.md) | +| Pages.delete_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.delete_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.delete_page.js,samples/README.md) | +| Pages.get_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.get_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.get_page.js,samples/README.md) | +| Pages.list_pages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.list_pages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.list_pages.js,samples/README.md) | +| Pages.update_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.update_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/pages.update_page.js,samples/README.md) | +| Security_settings_service.create_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.create_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.create_security_settings.js,samples/README.md) | +| Security_settings_service.delete_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.delete_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.delete_security_settings.js,samples/README.md) | +| Security_settings_service.get_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.get_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.get_security_settings.js,samples/README.md) | +| Security_settings_service.list_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.list_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.list_security_settings.js,samples/README.md) | +| Security_settings_service.update_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.update_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/security_settings_service.update_security_settings.js,samples/README.md) | +| Session_entity_types.create_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.create_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.create_session_entity_type.js,samples/README.md) | +| Session_entity_types.delete_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.delete_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.delete_session_entity_type.js,samples/README.md) | +| Session_entity_types.get_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.get_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.get_session_entity_type.js,samples/README.md) | +| Session_entity_types.list_session_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.list_session_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.list_session_entity_types.js,samples/README.md) | +| Session_entity_types.update_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.update_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/session_entity_types.update_session_entity_type.js,samples/README.md) | +| Sessions.detect_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.detect_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.detect_intent.js,samples/README.md) | +| Sessions.fulfill_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.fulfill_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.fulfill_intent.js,samples/README.md) | +| Sessions.match_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.match_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.match_intent.js,samples/README.md) | +| Sessions.streaming_detect_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.streaming_detect_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/sessions.streaming_detect_intent.js,samples/README.md) | +| Test_cases.batch_delete_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.batch_delete_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.batch_delete_test_cases.js,samples/README.md) | +| Test_cases.batch_run_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.batch_run_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.batch_run_test_cases.js,samples/README.md) | +| Test_cases.calculate_coverage | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.calculate_coverage.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.calculate_coverage.js,samples/README.md) | +| Test_cases.create_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.create_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.create_test_case.js,samples/README.md) | +| Test_cases.export_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.export_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.export_test_cases.js,samples/README.md) | +| Test_cases.get_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.get_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.get_test_case.js,samples/README.md) | +| Test_cases.get_test_case_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.get_test_case_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.get_test_case_result.js,samples/README.md) | +| Test_cases.import_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.import_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.import_test_cases.js,samples/README.md) | +| Test_cases.list_test_case_results | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.list_test_case_results.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.list_test_case_results.js,samples/README.md) | +| Test_cases.list_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.list_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.list_test_cases.js,samples/README.md) | +| Test_cases.run_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.run_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.run_test_case.js,samples/README.md) | +| Test_cases.update_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.update_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/test_cases.update_test_case.js,samples/README.md) | +| Transition_route_groups.create_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.create_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.create_transition_route_group.js,samples/README.md) | +| Transition_route_groups.delete_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.delete_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.delete_transition_route_group.js,samples/README.md) | +| Transition_route_groups.get_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.get_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.get_transition_route_group.js,samples/README.md) | +| Transition_route_groups.list_transition_route_groups | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.list_transition_route_groups.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.list_transition_route_groups.js,samples/README.md) | +| Transition_route_groups.update_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.update_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/transition_route_groups.update_transition_route_group.js,samples/README.md) | +| Versions.compare_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.compare_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.compare_versions.js,samples/README.md) | +| Versions.create_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.create_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.create_version.js,samples/README.md) | +| Versions.delete_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.delete_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.delete_version.js,samples/README.md) | +| Versions.get_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.get_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.get_version.js,samples/README.md) | +| Versions.list_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.list_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.list_versions.js,samples/README.md) | +| Versions.load_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.load_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.load_version.js,samples/README.md) | +| Versions.update_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.update_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/versions.update_version.js,samples/README.md) | +| Webhooks.create_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.create_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.create_webhook.js,samples/README.md) | +| Webhooks.delete_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.delete_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.delete_webhook.js,samples/README.md) | +| Webhooks.get_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.get_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.get_webhook.js,samples/README.md) | +| Webhooks.list_webhooks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.list_webhooks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.list_webhooks.js,samples/README.md) | +| Webhooks.update_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.update_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3/webhooks.update_webhook.js,samples/README.md) | +| Agents.create_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.create_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.create_agent.js,samples/README.md) | +| Agents.delete_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.delete_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.delete_agent.js,samples/README.md) | +| Agents.export_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.export_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.export_agent.js,samples/README.md) | +| Agents.get_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.get_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.get_agent.js,samples/README.md) | +| Agents.get_agent_validation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.get_agent_validation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.get_agent_validation_result.js,samples/README.md) | +| Agents.list_agents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.list_agents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.list_agents.js,samples/README.md) | +| Agents.restore_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.restore_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.restore_agent.js,samples/README.md) | +| Agents.update_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.update_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.update_agent.js,samples/README.md) | +| Agents.validate_agent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.validate_agent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/agents.validate_agent.js,samples/README.md) | +| Changelogs.get_changelog | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/changelogs.get_changelog.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/changelogs.get_changelog.js,samples/README.md) | +| Changelogs.list_changelogs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/changelogs.list_changelogs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/changelogs.list_changelogs.js,samples/README.md) | +| Deployments.get_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/deployments.get_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/deployments.get_deployment.js,samples/README.md) | +| Deployments.list_deployments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/deployments.list_deployments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/deployments.list_deployments.js,samples/README.md) | +| Entity_types.create_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.create_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.create_entity_type.js,samples/README.md) | +| Entity_types.delete_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.delete_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.delete_entity_type.js,samples/README.md) | +| Entity_types.get_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.get_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.get_entity_type.js,samples/README.md) | +| Entity_types.list_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.list_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.list_entity_types.js,samples/README.md) | +| Entity_types.update_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.update_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/entity_types.update_entity_type.js,samples/README.md) | +| Environments.create_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.create_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.create_environment.js,samples/README.md) | +| Environments.delete_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.delete_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.delete_environment.js,samples/README.md) | +| Environments.deploy_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.deploy_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.deploy_flow.js,samples/README.md) | +| Environments.get_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.get_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.get_environment.js,samples/README.md) | +| Environments.list_continuous_test_results | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.list_continuous_test_results.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.list_continuous_test_results.js,samples/README.md) | +| Environments.list_environments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.list_environments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.list_environments.js,samples/README.md) | +| Environments.lookup_environment_history | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.lookup_environment_history.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.lookup_environment_history.js,samples/README.md) | +| Environments.run_continuous_test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.run_continuous_test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.run_continuous_test.js,samples/README.md) | +| Environments.update_environment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.update_environment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/environments.update_environment.js,samples/README.md) | +| Experiments.create_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.create_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.create_experiment.js,samples/README.md) | +| Experiments.delete_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.delete_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.delete_experiment.js,samples/README.md) | +| Experiments.get_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.get_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.get_experiment.js,samples/README.md) | +| Experiments.list_experiments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.list_experiments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.list_experiments.js,samples/README.md) | +| Experiments.start_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.start_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.start_experiment.js,samples/README.md) | +| Experiments.stop_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.stop_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.stop_experiment.js,samples/README.md) | +| Experiments.update_experiment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.update_experiment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/experiments.update_experiment.js,samples/README.md) | +| Flows.create_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.create_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.create_flow.js,samples/README.md) | +| Flows.delete_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.delete_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.delete_flow.js,samples/README.md) | +| Flows.export_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.export_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.export_flow.js,samples/README.md) | +| Flows.get_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.get_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.get_flow.js,samples/README.md) | +| Flows.get_flow_validation_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.get_flow_validation_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.get_flow_validation_result.js,samples/README.md) | +| Flows.import_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.import_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.import_flow.js,samples/README.md) | +| Flows.list_flows | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.list_flows.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.list_flows.js,samples/README.md) | +| Flows.train_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.train_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.train_flow.js,samples/README.md) | +| Flows.update_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.update_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.update_flow.js,samples/README.md) | +| Flows.validate_flow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.validate_flow.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/flows.validate_flow.js,samples/README.md) | +| Intents.create_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.create_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.create_intent.js,samples/README.md) | +| Intents.delete_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.delete_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.delete_intent.js,samples/README.md) | +| Intents.get_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.get_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.get_intent.js,samples/README.md) | +| Intents.list_intents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.list_intents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.list_intents.js,samples/README.md) | +| Intents.update_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.update_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/intents.update_intent.js,samples/README.md) | +| Pages.create_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.create_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.create_page.js,samples/README.md) | +| Pages.delete_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.delete_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.delete_page.js,samples/README.md) | +| Pages.get_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.get_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.get_page.js,samples/README.md) | +| Pages.list_pages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.list_pages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.list_pages.js,samples/README.md) | +| Pages.update_page | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.update_page.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/pages.update_page.js,samples/README.md) | +| Security_settings_service.create_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.create_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.create_security_settings.js,samples/README.md) | +| Security_settings_service.delete_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.delete_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.delete_security_settings.js,samples/README.md) | +| Security_settings_service.get_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.get_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.get_security_settings.js,samples/README.md) | +| Security_settings_service.list_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.list_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.list_security_settings.js,samples/README.md) | +| Security_settings_service.update_security_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.update_security_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/security_settings_service.update_security_settings.js,samples/README.md) | +| Session_entity_types.create_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.create_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.create_session_entity_type.js,samples/README.md) | +| Session_entity_types.delete_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.delete_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.delete_session_entity_type.js,samples/README.md) | +| Session_entity_types.get_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.get_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.get_session_entity_type.js,samples/README.md) | +| Session_entity_types.list_session_entity_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.list_session_entity_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.list_session_entity_types.js,samples/README.md) | +| Session_entity_types.update_session_entity_type | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.update_session_entity_type.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/session_entity_types.update_session_entity_type.js,samples/README.md) | +| Sessions.detect_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.detect_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.detect_intent.js,samples/README.md) | +| Sessions.fulfill_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.fulfill_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.fulfill_intent.js,samples/README.md) | +| Sessions.match_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.match_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.match_intent.js,samples/README.md) | +| Sessions.streaming_detect_intent | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.streaming_detect_intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/sessions.streaming_detect_intent.js,samples/README.md) | +| Test_cases.batch_delete_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.batch_delete_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.batch_delete_test_cases.js,samples/README.md) | +| Test_cases.batch_run_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.batch_run_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.batch_run_test_cases.js,samples/README.md) | +| Test_cases.calculate_coverage | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.calculate_coverage.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.calculate_coverage.js,samples/README.md) | +| Test_cases.create_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.create_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.create_test_case.js,samples/README.md) | +| Test_cases.export_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.export_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.export_test_cases.js,samples/README.md) | +| Test_cases.get_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.get_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.get_test_case.js,samples/README.md) | +| Test_cases.get_test_case_result | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.get_test_case_result.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.get_test_case_result.js,samples/README.md) | +| Test_cases.import_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.import_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.import_test_cases.js,samples/README.md) | +| Test_cases.list_test_case_results | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.list_test_case_results.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.list_test_case_results.js,samples/README.md) | +| Test_cases.list_test_cases | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.list_test_cases.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.list_test_cases.js,samples/README.md) | +| Test_cases.run_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.run_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.run_test_case.js,samples/README.md) | +| Test_cases.update_test_case | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.update_test_case.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/test_cases.update_test_case.js,samples/README.md) | +| Transition_route_groups.create_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.create_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.create_transition_route_group.js,samples/README.md) | +| Transition_route_groups.delete_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.delete_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.delete_transition_route_group.js,samples/README.md) | +| Transition_route_groups.get_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.get_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.get_transition_route_group.js,samples/README.md) | +| Transition_route_groups.list_transition_route_groups | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.list_transition_route_groups.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.list_transition_route_groups.js,samples/README.md) | +| Transition_route_groups.update_transition_route_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.update_transition_route_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/transition_route_groups.update_transition_route_group.js,samples/README.md) | +| Versions.compare_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.compare_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.compare_versions.js,samples/README.md) | +| Versions.create_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.create_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.create_version.js,samples/README.md) | +| Versions.delete_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.delete_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.delete_version.js,samples/README.md) | +| Versions.get_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.get_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.get_version.js,samples/README.md) | +| Versions.list_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.list_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.list_versions.js,samples/README.md) | +| Versions.load_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.load_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.load_version.js,samples/README.md) | +| Versions.update_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.update_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/versions.update_version.js,samples/README.md) | +| Webhooks.create_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.create_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.create_webhook.js,samples/README.md) | +| Webhooks.delete_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.delete_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.delete_webhook.js,samples/README.md) | +| Webhooks.get_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.get_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.get_webhook.js,samples/README.md) | +| Webhooks.list_webhooks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.list_webhooks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.list_webhooks.js,samples/README.md) | +| Webhooks.update_webhook | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.update_webhook.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/webhooks.update_webhook.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-dialogflow-cx/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-dialogflow-cx/samples/test/quickstart.js,samples/README.md) | + + + +The [Dialogflow CX API Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/dialogflow-cx@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + + +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways +unless absolutely necessary (e.g. because of critical security issues) or with +an extensive deprecation period. Issues and requests against **stable** libraries +are addressed with the highest priority. + + + + + + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). + +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its templates in +[directory](https://github.com/googleapis/synthtool). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) + +[client-docs]: https://googleapis.dev/nodejs/dialogflow-cx/latest +[product-docs]: https://cloud.google.com/dialogflow-enterprise/ +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=dialogflow.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-cloud-dialogflow-cx/linkinator.config.json b/packages/google-cloud-dialogflow-cx/linkinator.config.json new file mode 100644 index 00000000000..befd23c8633 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/linkinator.config.json @@ -0,0 +1,16 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" + ], + "silent": true, + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 +} diff --git a/packages/google-cloud-dialogflow-cx/package.json b/packages/google-cloud-dialogflow-cx/package.json new file mode 100644 index 00000000000..100587b66ad --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/package.json @@ -0,0 +1,82 @@ +{ + "name": "@google-cloud/dialogflow-cx", + "version": "3.1.2", + "description": "Cx client for Node.js", + "repository": { + "type": "git", + "directory": "packages/google-cloud-dialogflow-cx", + "url": "https://github.com/googleapis/google-cloud-node.git" + }, + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google dialogflow-cx", + "dialogflow-cx", + "dialogflow", + "agents", + "entity types", + "environments", + "flows", + "intents", + "pages", + "session entity types", + "sessions", + "transition route groups", + "versions", + "webhooks" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prelint": "cd samples; npm link ../; npm i", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "npm run compile && c8 mocha build/system-test", + "test": "c8 node build/test/run.js", + "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test" + }, + "dependencies": { + "google-gax": "^3.5.2" + }, + "devDependencies": { + "@types/mocha": "^9.0.0", + "@types/node": "^18.0.0", + "@types/sinon": "^10.0.0", + "c8": "^7.3.0", + "gts": "^3.1.0", + "jsdoc": "^4.0.0", + "jsdoc-fresh": "^2.0.0", + "jsdoc-region-tag": "^2.0.0", + "linkinator": "^4.0.0", + "mocha": "^9.2.2", + "null-loader": "^4.0.0", + "pack-n-play": "^1.0.0-2", + "sinon": "^14.0.0", + "ts-loader": "^9.0.0", + "typescript": "^4.6.4", + "webpack": "^5.0.0", + "webpack-cli": "^4.0.0" + }, + "engines": { + "node": ">=12.0.0" + }, + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-dialogflow-cx" +} diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/advanced_settings.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/advanced_settings.proto new file mode 100644 index 00000000000..d2de5b1fc2e --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/advanced_settings.proto @@ -0,0 +1,57 @@ +// Copyright 2022 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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/field_behavior.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx"; +option java_multiple_files = true; +option java_outer_classname = "AdvancedSettingsProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; + +// Hierarchical advanced settings for agent/flow/page/fulfillment/parameter. +// Settings exposed at lower level overrides the settings exposed at higher +// level. Overriding occurs at the sub-setting level. For example, the +// playback_interruption_settings at fulfillment level only overrides the +// playback_interruption_settings at the agent level, leaving other settings +// at the agent level unchanged. +// +// DTMF settings does not override each other. DTMF settings set at different +// levels define DTMF detections running in parallel. +// +// Hierarchy: Agent->Flow->Page->Fulfillment/Parameter. +message AdvancedSettings { + // Define behaviors on logging. + message LoggingSettings { + // If true, StackDriver logging is currently enabled. + bool enable_stackdriver_logging = 2; + + // If true, DF Interaction logging is currently enabled. + bool enable_interaction_logging = 3; + } + + // Settings for logging. + // Settings for Dialogflow History, Contact Center messages, StackDriver logs, + // and speech logging. + // Exposed at the following levels: + // - Agent level. + LoggingSettings logging_settings = 6; +} diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/agent.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/agent.proto new file mode 100644 index 00000000000..0c4fb140b62 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/agent.proto @@ -0,0 +1,491 @@ +// Copyright 2022 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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3/advanced_settings.proto"; +import "google/cloud/dialogflow/cx/v3/flow.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx"; +option java_multiple_files = true; +option java_outer_classname = "AgentProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; + +// Service for managing [Agents][google.cloud.dialogflow.cx.v3.Agent]. +service Agents { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all agents in the specified location. + rpc ListAgents(ListAgentsRequest) returns (ListAgentsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*}/agents" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified agent. + rpc GetAgent(GetAgentRequest) returns (Agent) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates an agent in the specified location. + // + // Note: You should always train flows prior to sending them queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + rpc CreateAgent(CreateAgentRequest) returns (Agent) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*}/agents" + body: "agent" + }; + option (google.api.method_signature) = "parent,agent"; + } + + // Updates the specified agent. + // + // Note: You should always train flows prior to sending them queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + rpc UpdateAgent(UpdateAgentRequest) returns (Agent) { + option (google.api.http) = { + patch: "/v3/{agent.name=projects/*/locations/*/agents/*}" + body: "agent" + }; + option (google.api.method_signature) = "agent,update_mask"; + } + + // Deletes the specified agent. + rpc DeleteAgent(DeleteAgentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/locations/*/agents/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Exports the specified agent to a binary file. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: [ExportAgentResponse][google.cloud.dialogflow.cx.v3.ExportAgentResponse] + rpc ExportAgent(ExportAgentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{name=projects/*/locations/*/agents/*}:export" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ExportAgentResponse" + metadata_type: "google.protobuf.Struct" + }; + } + + // Restores the specified agent from a binary file. + // + // Replaces the current agent with a new one. Note that all existing resources + // in agent (e.g. intents, entity types, flows) will be removed. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: An [Empty + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + // + // Note: You should always train flows prior to sending them queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + rpc RestoreAgent(RestoreAgentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{name=projects/*/locations/*/agents/*}:restore" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; + } + + // Validates the specified agent and creates or updates validation results. + // The agent in draft version is validated. Please call this API after the + // training is completed to get the complete validation results. + rpc ValidateAgent(ValidateAgentRequest) returns (AgentValidationResult) { + option (google.api.http) = { + post: "/v3/{name=projects/*/locations/*/agents/*}:validate" + body: "*" + }; + } + + // Gets the latest agent validation result. Agent validation is performed + // when ValidateAgent is called. + rpc GetAgentValidationResult(GetAgentValidationResultRequest) returns (AgentValidationResult) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/validationResult}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Settings related to speech recognition. +message SpeechToTextSettings { + // Whether to use speech adaptation for speech recognition. + bool enable_speech_adaptation = 1; +} + +// 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][google.cloud.dialogflow.cx.v3.Intent], +// [Entity Types][google.cloud.dialogflow.cx.v3.EntityType], [Flows][google.cloud.dialogflow.cx.v3.Flow], [Fulfillments][google.cloud.dialogflow.cx.v3.Fulfillment], +// [Webhooks][google.cloud.dialogflow.cx.v3.Webhook], and so on to manage the conversation flows.. +message Agent { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Agent" + pattern: "projects/{project}/locations/{location}/agents/{agent}" + }; + + // The unique identifier of the agent. + // Required for the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] method. [Agents.CreateAgent][google.cloud.dialogflow.cx.v3.Agents.CreateAgent] + // populates the name automatically. + // Format: `projects//locations//agents/`. + string name = 1; + + // Required. The human-readable name of the agent, unique within the location. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Immutable. The default language of the agent as a language tag. + // See [Language + // Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // for a list of the currently supported language codes. + // This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] method. + string default_language_code = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // The list of all languages supported by the agent (except for the + // `default_language_code`). + repeated string supported_language_codes = 4; + + // 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. + string time_zone = 5 [(google.api.field_behavior) = REQUIRED]; + + // The description of the agent. The maximum length is 500 characters. If + // exceeded, the request is rejected. + string description = 6; + + // 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. + string avatar_uri = 7; + + // Speech recognition related settings. + SpeechToTextSettings speech_to_text_settings = 13; + + // 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/`. + string start_flow = 16 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Flow" + } + ]; + + // Name of the [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] reference for the agent. + // Format: `projects//locations//securitySettings/`. + string security_settings = 17 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/SecuritySettings" + }]; + + // Indicates if stackdriver logging is enabled for the agent. + // Please use [agent.advanced_settings][google.cloud.dialogflow.cx.v3.AdvancedSettings.LoggingSettings] + // instead. + bool enable_stackdriver_logging = 18 [deprecated = true]; + + // Indicates if automatic spell correction is enabled in detect intent + // requests. + bool enable_spell_correction = 20; + + // Indicates whether the agent is locked for changes. If the agent is locked, + // modifications to the agent will be rejected except for [RestoreAgent][]. + bool locked = 27; + + // Hierarchical advanced settings for this agent. The settings exposed at the + // lower level overrides the settings exposed at the higher level. + AdvancedSettings advanced_settings = 22; +} + +// The request message for [Agents.ListAgents][google.cloud.dialogflow.cx.v3.Agents.ListAgents]. +message ListAgentsRequest { + // Required. The location to list all agents for. + // Format: `projects//locations/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; + + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// The response message for [Agents.ListAgents][google.cloud.dialogflow.cx.v3.Agents.ListAgents]. +message ListAgentsResponse { + // The list of agents. There will be a maximum number of items returned based + // on the page_size field in the request. + repeated Agent agents = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for [Agents.GetAgent][google.cloud.dialogflow.cx.v3.Agents.GetAgent]. +message GetAgentRequest { + // Required. The name of the agent. + // Format: `projects//locations//agents/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Agent" + } + ]; +} + +// The request message for [Agents.CreateAgent][google.cloud.dialogflow.cx.v3.Agents.CreateAgent]. +message CreateAgentRequest { + // Required. The location to create a agent for. + // Format: `projects//locations/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Agent" + } + ]; + + // Required. The agent to create. + Agent agent = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent]. +message UpdateAgentRequest { + // Required. The agent to update. + Agent agent = 1 [(google.api.field_behavior) = REQUIRED]; + + // The mask to control which fields get updated. If the mask is not present, + // all fields will be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// The request message for [Agents.DeleteAgent][google.cloud.dialogflow.cx.v3.Agents.DeleteAgent]. +message DeleteAgentRequest { + // Required. The name of the agent to delete. + // Format: `projects//locations//agents/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Agent" + } + ]; +} + +// The request message for [Agents.ExportAgent][google.cloud.dialogflow.cx.v3.Agents.ExportAgent]. +message ExportAgentRequest { + // Data format of the exported agent. + enum DataFormat { + // Unspecified format. + DATA_FORMAT_UNSPECIFIED = 0; + + // Agent content will be exported as raw bytes. + BLOB = 1; + } + + // Required. The name of the agent to export. + // Format: `projects//locations//agents/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Agent" + } + ]; + + // 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. + // + // Dialogflow performs a write operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have write permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + string agent_uri = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The data format of the exported agent. If not specified, `BLOB` is assumed. + DataFormat data_format = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Environment name. If not set, draft environment is assumed. + // Format: `projects//locations//agents//environments/`. + string environment = 5 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Environment" + } + ]; +} + +// The response message for [Agents.ExportAgent][google.cloud.dialogflow.cx.v3.Agents.ExportAgent]. +message ExportAgentResponse { + // The exported agent. + oneof agent { + // The URI to a file containing the exported agent. This field is populated + // only if `agent_uri` is specified in [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest]. + string agent_uri = 1; + + // Uncompressed raw byte content for agent. + bytes agent_content = 2; + } +} + +// The request message for [Agents.RestoreAgent][google.cloud.dialogflow.cx.v3.Agents.RestoreAgent]. +message RestoreAgentRequest { + // Restore option. + enum RestoreOption { + // Unspecified. Treated as KEEP. + RESTORE_OPTION_UNSPECIFIED = 0; + + // Always respect the settings from the exported agent file. It may cause + // a restoration failure if some settings (e.g. model type) are not + // supported in the target agent. + KEEP = 1; + + // Fallback to default settings if some settings are not supported in the + // target agent. + FALLBACK = 2; + } + + // Required. The name of the agent to restore into. + // Format: `projects//locations//agents/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Agent" + } + ]; + + // Required. The agent to restore. + oneof agent { + // The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + // to restore agent from. The format of this URI must be + // `gs:///`. + // + // Dialogflow performs a read operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have read permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + string agent_uri = 2; + + // Uncompressed raw byte content for agent. + bytes agent_content = 3; + } + + // Agent restore mode. If not specified, `KEEP` is assumed. + RestoreOption restore_option = 5; +} + +// The request message for [Agents.ValidateAgent][google.cloud.dialogflow.cx.v3.Agents.ValidateAgent]. +message ValidateAgentRequest { + // Required. The agent to validate. + // Format: `projects//locations//agents/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Agent" + } + ]; + + // If not specified, the agent's default language is used. + string language_code = 2; +} + +// The request message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3.Agents.GetAgentValidationResult]. +message GetAgentValidationResultRequest { + // Required. The agent name. + // Format: `projects//locations//agents//validationResult`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/AgentValidationResult" + } + ]; + + // If not specified, the agent's default language is used. + string language_code = 2; +} + +// The response message for [Agents.GetAgentValidationResult][google.cloud.dialogflow.cx.v3.Agents.GetAgentValidationResult]. +message AgentValidationResult { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/AgentValidationResult" + pattern: "projects/{project}/locations/{location}/agents/{agent}/validationResult" + }; + + // The unique identifier of the agent validation result. + // Format: `projects//locations//agents//validationResult`. + string name = 1; + + // Contains all flow validation results. + repeated FlowValidationResult flow_validation_results = 2; +} diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/audio_config.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/audio_config.proto new file mode 100644 index 00000000000..3c1d371657b --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/audio_config.proto @@ -0,0 +1,313 @@ +// Copyright 2022 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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx"; +option java_multiple_files = true; +option java_outer_classname = "AudioConfigProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; +option (google.api.resource_definition) = { + type: "automl.googleapis.com/Model" + pattern: "projects/{project}/locations/{location}/models/{model}" +}; + +// Audio encoding of the audio content sent in the conversational query request. +// Refer to the +// [Cloud Speech API +// documentation](https://cloud.google.com/speech-to-text/docs/basics) for more +// details. +enum AudioEncoding { + // Not specified. + AUDIO_ENCODING_UNSPECIFIED = 0; + + // Uncompressed 16-bit signed little-endian samples (Linear PCM). + AUDIO_ENCODING_LINEAR_16 = 1; + + // [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio + // Codec) is the recommended encoding because it is lossless (therefore + // recognition is not compromised) and requires only about half the + // bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit and + // 24-bit samples, however, not all fields in `STREAMINFO` are supported. + AUDIO_ENCODING_FLAC = 2; + + // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. + AUDIO_ENCODING_MULAW = 3; + + // Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. + AUDIO_ENCODING_AMR = 4; + + // Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. + AUDIO_ENCODING_AMR_WB = 5; + + // Opus encoded audio frames in Ogg container + // ([OggOpus](https://wiki.xiph.org/OggOpus)). + // `sample_rate_hertz` must be 16000. + AUDIO_ENCODING_OGG_OPUS = 6; + + // Although the use of lossy encodings is not recommended, if a very low + // bitrate encoding is required, `OGG_OPUS` is highly preferred over + // Speex encoding. The [Speex](https://speex.org/) encoding supported by + // Dialogflow API has a header byte in each block, as in MIME type + // `audio/x-speex-with-header-byte`. + // It is a variant of the RTP Speex encoding defined in + // [RFC 5574](https://tools.ietf.org/html/rfc5574). + // The stream is a sequence of blocks, one block per RTP packet. Each block + // starts with a byte containing the length of the block, in bytes, followed + // by one or more frames of Speex data, padded to an integral number of + // bytes (octets) as specified in RFC 5574. In other words, each RTP header + // is replaced with a single byte containing the block length. Only Speex + // wideband is supported. `sample_rate_hertz` must be 16000. + AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7; +} + +// Variant of the specified [Speech model][google.cloud.dialogflow.cx.v3.InputAudioConfig.model] to use. +// +// See the [Cloud Speech +// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) +// for which models have different variants. For example, the "phone_call" model +// has both a standard and an enhanced variant. When you use an enhanced model, +// you will generally receive higher quality results than for a standard model. +enum SpeechModelVariant { + // No model variant specified. In this case Dialogflow defaults to + // USE_BEST_AVAILABLE. + SPEECH_MODEL_VARIANT_UNSPECIFIED = 0; + + // Use the best available variant of the [Speech + // model][InputAudioConfig.model] that the caller is eligible for. + // + // Please see the [Dialogflow + // docs](https://cloud.google.com/dialogflow/docs/data-logging) for + // how to make your project eligible for enhanced models. + USE_BEST_AVAILABLE = 1; + + // Use standard model variant even if an enhanced model is available. See the + // [Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) + // for details about enhanced models. + USE_STANDARD = 2; + + // Use an enhanced model variant: + // + // * If an enhanced variant does not exist for the given + // [model][google.cloud.dialogflow.cx.v3.InputAudioConfig.model] and request language, Dialogflow falls + // back to the standard variant. + // + // The [Cloud Speech + // documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) + // describes which models have enhanced variants. + // + // * If the API caller isn't eligible for enhanced models, Dialogflow returns + // an error. Please see the [Dialogflow + // docs](https://cloud.google.com/dialogflow/docs/data-logging) + // for how to make your project eligible. + USE_ENHANCED = 3; +} + +// Information for a word recognized by the speech recognizer. +message SpeechWordInfo { + // The word this info is for. + string word = 3; + + // Time offset relative to the beginning of the audio that corresponds to the + // start of the spoken word. This is an experimental feature and the accuracy + // of the time offset can vary. + google.protobuf.Duration start_offset = 1; + + // Time offset relative to the beginning of the audio that corresponds to the + // end of the spoken word. This is an experimental feature and the accuracy of + // the time offset can vary. + google.protobuf.Duration end_offset = 2; + + // The Speech confidence between 0.0 and 1.0 for this word. A higher number + // indicates an estimated greater likelihood that the recognized word is + // correct. The default of 0.0 is a sentinel value indicating that confidence + // was not set. + // + // This field is not guaranteed to be fully stable over time for the same + // audio input. Users should also not rely on it to always be provided. + float confidence = 4; +} + +// Instructs the speech recognizer on how to process the audio content. +message InputAudioConfig { + // Required. Audio encoding of the audio content to process. + AudioEncoding audio_encoding = 1 [(google.api.field_behavior) = 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. + int32 sample_rate_hertz = 2; + + // Optional. If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.cx.v3.SpeechWordInfo] in + // [StreamingRecognitionResult][google.cloud.dialogflow.cx.v3.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. + bool enable_word_info = 13; + + // 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. + repeated string phrase_hints = 4; + + // 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. + string model = 7; + + // Optional. Which variant of the [Speech model][google.cloud.dialogflow.cx.v3.InputAudioConfig.model] to use. + SpeechModelVariant model_variant = 10; + + // 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. + bool single_utterance = 8; +} + +// Gender of the voice as described in +// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice). +enum SsmlVoiceGender { + // An unspecified gender, which means that the client doesn't care which + // gender the selected voice will have. + SSML_VOICE_GENDER_UNSPECIFIED = 0; + + // A male voice. + SSML_VOICE_GENDER_MALE = 1; + + // A female voice. + SSML_VOICE_GENDER_FEMALE = 2; + + // A gender-neutral voice. + SSML_VOICE_GENDER_NEUTRAL = 3; +} + +// Description of which voice to use for speech synthesis. +message VoiceSelectionParams { + // Optional. The name of the voice. If not set, the service will choose a + // voice based on the other parameters such as language_code and + // [ssml_gender][google.cloud.dialogflow.cx.v3.VoiceSelectionParams.ssml_gender]. + // + // For the list of available voices, please refer to [Supported voices and + // languages](https://cloud.google.com/text-to-speech/docs/voices). + string name = 1; + + // Optional. The preferred gender of the voice. If not set, the service will + // choose a voice based on the other parameters such as language_code and + // [name][google.cloud.dialogflow.cx.v3.VoiceSelectionParams.name]. Note that this is only a preference, not requirement. If a + // voice of the appropriate gender is not available, the synthesizer + // substitutes a voice with a different gender rather than failing the + // request. + SsmlVoiceGender ssml_gender = 2; +} + +// Configuration of how speech should be synthesized. +message SynthesizeSpeechConfig { + // Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal + // native speed supported by the specific voice. 2.0 is twice as fast, and + // 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any + // other values < 0.25 or > 4.0 will return an error. + double speaking_rate = 1; + + // Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 + // semitones from the original pitch. -20 means decrease 20 semitones from the + // original pitch. + double pitch = 2; + + // Optional. Volume gain (in dB) of the normal native volume supported by the + // specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of + // 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) + // will play at approximately half the amplitude of the normal native signal + // amplitude. A value of +6.0 (dB) will play at approximately twice the + // amplitude of the normal native signal amplitude. We strongly recommend not + // to exceed +10 (dB) as there's usually no effective increase in loudness for + // any value greater than that. + double volume_gain_db = 3; + + // Optional. An identifier which selects 'audio effects' profiles that are + // applied on (post synthesized) text to speech. Effects are applied on top of + // each other in the order they are given. + repeated string effects_profile_id = 5; + + // Optional. The desired voice of the synthesized audio. + VoiceSelectionParams voice = 4; +} + +// Audio encoding of the output audio format in Text-To-Speech. +enum OutputAudioEncoding { + // Not specified. + OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0; + + // Uncompressed 16-bit signed little-endian samples (Linear PCM). + // Audio content returned as LINEAR16 also contains a WAV header. + OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1; + + // MP3 audio at 32kbps. + OUTPUT_AUDIO_ENCODING_MP3 = 2; + + // MP3 audio at 64kbps. + OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4; + + // Opus encoded audio wrapped in an ogg container. The result will be a + // file which can be played natively on Android, and in browsers (at least + // Chrome and Firefox). The quality of the encoding is considerably higher + // than MP3 while using approximately the same bitrate. + OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3; + + // 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. + OUTPUT_AUDIO_ENCODING_MULAW = 5; +} + +// Instructs the speech synthesizer how to generate the output audio content. +message OutputAudioConfig { + // Required. Audio encoding of the synthesized audio content. + OutputAudioEncoding audio_encoding = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The synthesis sample rate (in hertz) for this audio. If not + // provided, then the synthesizer will use the default sample rate based on + // the audio encoding. If this is different from the voice's natural sample + // rate, then the synthesizer will honor this request by converting to the + // desired sample rate (which might result in worse audio quality). + int32 sample_rate_hertz = 2; + + // Optional. Configuration of how speech should be synthesized. + SynthesizeSpeechConfig synthesize_speech_config = 3; +} diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/changelog.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/changelog.proto new file mode 100644 index 00000000000..583055fdcf4 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/changelog.proto @@ -0,0 +1,153 @@ +// Copyright 2022 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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx"; +option java_multiple_files = true; +option java_outer_classname = "ChangelogProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; + +// Service for managing [Changelogs][google.cloud.dialogflow.cx.v3.Changelog]. +service Changelogs { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of Changelogs. + rpc ListChangelogs(ListChangelogsRequest) returns (ListChangelogsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*}/changelogs" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified Changelog. + rpc GetChangelog(GetChangelogRequest) returns (Changelog) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/changelogs/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// The request message for [Changelogs.ListChangelogs][google.cloud.dialogflow.cx.v3.Changelogs.ListChangelogs]. +message ListChangelogsRequest { + // Required. The agent containing the changelogs. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Changelog" + } + ]; + + // The filter string. Supports filter by user_email, resource, type and + // create_time. Some examples: + // 1. By user email: + // user_email = "someone@google.com" + // 2. By resource name: + // resource = "projects/123/locations/global/agents/456/flows/789" + // 3. By resource display name: + // display_name = "my agent" + // 4. By action: + // action = "Create" + // 5. By type: + // type = "flows" + // 6. By create time. Currently predicates on `create_time` and + // `create_time_epoch_seconds` are supported: + // create_time_epoch_seconds > 1551790877 AND create_time <= + // 2017-01-15T01:30:15.01Z + // 7. Combination of above filters: + // resource = "projects/123/locations/global/agents/456/flows/789" + // AND user_email = "someone@google.com" + // AND create_time <= 2017-01-15T01:30:15.01Z + string filter = 2; + + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 3; + + // The next_page_token value returned from a previous list request. + string page_token = 4; +} + +// The response message for [Changelogs.ListChangelogs][google.cloud.dialogflow.cx.v3.Changelogs.ListChangelogs]. +message ListChangelogsResponse { + // The list of changelogs. There will be a maximum number of items returned + // based on the page_size field in the request. The changelogs will be ordered + // by timestamp. + repeated Changelog changelogs = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for [Changelogs.GetChangelog][google.cloud.dialogflow.cx.v3.Changelogs.GetChangelog]. +message GetChangelogRequest { + // Required. The name of the changelog to get. + // Format: `projects//locations//agents//changelogs/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Changelog" + } + ]; +} + +// Changelogs represents a change made to a given agent. +message Changelog { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Changelog" + pattern: "projects/{project}/locations/{location}/agents/{agent}/changelogs/{changelog}" + }; + + // The unique identifier of the changelog. + // Format: `projects//locations//agents//changelogs/`. + string name = 1; + + // Email address of the authenticated user. + string user_email = 2; + + // The affected resource display name of the change. + string display_name = 7; + + // The action of the change. + string action = 11; + + // The affected resource type. + string type = 8; + + // The affected resource name of the change. + string resource = 3; + + // The timestamp of the change. + google.protobuf.Timestamp create_time = 4; +} diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/deployment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/deployment.proto new file mode 100644 index 00000000000..f5831cc6490 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/deployment.proto @@ -0,0 +1,169 @@ +// Copyright 2022 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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx"; +option java_multiple_files = true; +option java_outer_classname = "DeploymentProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; + +// Service for managing [Deployments][google.cloud.dialogflow.cx.v3.Deployment]. +service Deployments { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all deployments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. + rpc ListDeployments(ListDeploymentsRequest) returns (ListDeploymentsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/deployments" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. + rpc GetDeployment(GetDeploymentRequest) returns (Deployment) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/environments/*/deployments/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Represents an deployment in an environment. A deployment happens when a flow +// version configured to be active in the environment. You can configure running +// pre-deployment steps, e.g. running validation test cases, experiment +// auto-rollout, etc. +message Deployment { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Deployment" + pattern: "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/deployments/{deployment}" + }; + + // The state of the deployment. + enum State { + // State unspecified. + STATE_UNSPECIFIED = 0; + + // The deployment is running. + RUNNING = 1; + + // The deployment succeeded. + SUCCEEDED = 2; + + // The deployment failed. + FAILED = 3; + } + + // Result of the deployment. + message Result { + // Results of test cases running before the deployment. + // Format: `projects//locations//agents//testCases//results/`. + repeated string deployment_test_results = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/TestCaseResult" + }]; + + // The name of the experiment triggered by this deployment. + // Format: projects//locations//agents//environments//experiments/. + string experiment = 2 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Experiment" + }]; + } + + // The name of the deployment. + // Format: projects//locations//agents//environments//deployments/. + string name = 1; + + // The name of the flow version for this deployment. + // Format: projects//locations//agents//flows//versions/. + string flow_version = 2 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Version" + }]; + + // The current state of the deployment. + State state = 3; + + // Result of the deployment. + Result result = 4; + + // Start time of this deployment. + google.protobuf.Timestamp start_time = 5; + + // End time of this deployment. + google.protobuf.Timestamp end_time = 6; +} + +// The request message for [Deployments.ListDeployments][google.cloud.dialogflow.cx.v3.Deployments.ListDeployments]. +message ListDeploymentsRequest { + // Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for. + // Format: `projects//locations//agents//environments/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Deployment" + } + ]; + + // The maximum number of items to return in a single page. By default 20 and + // at most 100. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// The response message for [Deployments.ListDeployments][google.cloud.dialogflow.cx.v3.Deployments.ListDeployments]. +message ListDeploymentsResponse { + // The list of deployments. There will be a maximum number of items + // returned based on the page_size field in the request. The list may in some + // cases be empty or contain fewer entries than page_size even if this isn't + // the last page. + repeated Deployment deployments = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for [Deployments.GetDeployment][google.cloud.dialogflow.cx.v3.Deployments.GetDeployment]. +message GetDeploymentRequest { + // Required. The name of the [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. + // Format: `projects//locations//agents//environments//deployments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Deployment" + } + ]; +} diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/entity_type.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/entity_type.proto new file mode 100644 index 00000000000..92c689e3952 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/entity_type.proto @@ -0,0 +1,371 @@ +// Copyright 2022 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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx"; +option java_multiple_files = true; +option java_outer_classname = "EntityTypeProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; + +// Service for managing [EntityTypes][google.cloud.dialogflow.cx.v3.EntityType]. +service EntityTypes { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all entity types in the specified agent. + rpc ListEntityTypes(ListEntityTypesRequest) returns (ListEntityTypesResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*}/entityTypes" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified entity type. + rpc GetEntityType(GetEntityTypeRequest) returns (EntityType) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/entityTypes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates an entity type in the specified agent. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + rpc CreateEntityType(CreateEntityTypeRequest) returns (EntityType) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*}/entityTypes" + body: "entity_type" + }; + option (google.api.method_signature) = "parent,entity_type"; + } + + // Updates the specified entity type. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + rpc UpdateEntityType(UpdateEntityTypeRequest) returns (EntityType) { + option (google.api.http) = { + patch: "/v3/{entity_type.name=projects/*/locations/*/agents/*/entityTypes/*}" + body: "entity_type" + }; + option (google.api.method_signature) = "entity_type,update_mask"; + } + + // Deletes the specified entity type. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + rpc DeleteEntityType(DeleteEntityTypeRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/locations/*/agents/*/entityTypes/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// 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][google.cloud.dialogflow.cx.v3.SessionEntityType] type. +// +// For more information about entity types, see the [Dialogflow +// documentation](https://cloud.google.com/dialogflow/docs/entities-overview). +message EntityType { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/EntityType" + pattern: "projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type}" + }; + + // Represents kinds of entities. + enum Kind { + // Not specified. This value should be never used. + KIND_UNSPECIFIED = 0; + + // Map entity types allow mapping of a group of synonyms to a canonical + // value. + KIND_MAP = 1; + + // List entity types contain a set of entries that do not map to canonical + // values. However, list entity types can contain references to other entity + // types (with or without aliases). + KIND_LIST = 2; + + // Regexp entity types allow to specify regular expressions in entries + // values. + KIND_REGEXP = 3; + } + + // Represents different entity type expansion modes. Automated expansion + // allows an agent to recognize values that have not been explicitly listed in + // the entity (for example, new kinds of shopping list items). + enum AutoExpansionMode { + // Auto expansion disabled for the entity. + AUTO_EXPANSION_MODE_UNSPECIFIED = 0; + + // Allows an agent to recognize values that have not been explicitly + // listed in the entity. + AUTO_EXPANSION_MODE_DEFAULT = 1; + } + + // An **entity entry** for an associated entity type. + message Entity { + // 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). + string value = 1 [(google.api.field_behavior) = REQUIRED]; + + // 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`. + repeated string synonyms = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // An excluded entity phrase that should not be matched. + message ExcludedPhrase { + // Required. The word or phrase to be excluded. + string value = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // The unique identifier of the entity type. + // Required for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.cx.v3.EntityTypes.UpdateEntityType]. + // Format: `projects//locations//agents//entityTypes/`. + string name = 1; + + // Required. The human-readable name of the entity type, unique within the agent. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Indicates the kind of entity type. + Kind kind = 3 [(google.api.field_behavior) = REQUIRED]; + + // Indicates whether the entity type can be automatically expanded. + AutoExpansionMode auto_expansion_mode = 4; + + // The collection of entity entries associated with the entity type. + repeated Entity entities = 5; + + // 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. + repeated ExcludedPhrase excluded_phrases = 6; + + // Enables fuzzy entity extraction during classification. + bool enable_fuzzy_extraction = 7; + + // 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 when logging. + bool redact = 9; +} + +// The request message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.cx.v3.EntityTypes.ListEntityTypes]. +message ListEntityTypesRequest { + // Required. The agent to list all entity types for. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // The language to list entity types for. The following fields are language + // dependent: + // + // * `EntityType.entities.value` + // * `EntityType.entities.synonyms` + // * `EntityType.excluded_phrases.value` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + string language_code = 2; + + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 3; + + // The next_page_token value returned from a previous list request. + string page_token = 4; +} + +// The response message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.cx.v3.EntityTypes.ListEntityTypes]. +message ListEntityTypesResponse { + // The list of entity types. There will be a maximum number of items returned + // based on the page_size field in the request. + repeated EntityType entity_types = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} + +// The request message for [EntityTypes.GetEntityType][google.cloud.dialogflow.cx.v3.EntityTypes.GetEntityType]. +message GetEntityTypeRequest { + // Required. The name of the entity type. + // Format: `projects//locations//agents//entityTypes/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // The language to retrieve the entity type for. The following fields are + // language dependent: + // + // * `EntityType.entities.value` + // * `EntityType.entities.synonyms` + // * `EntityType.excluded_phrases.value` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + string language_code = 2; +} + +// The request message for [EntityTypes.CreateEntityType][google.cloud.dialogflow.cx.v3.EntityTypes.CreateEntityType]. +message CreateEntityTypeRequest { + // Required. The agent to create a entity type for. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Required. The entity type to create. + EntityType entity_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // The language of the following fields in `entity_type`: + // + // * `EntityType.entities.value` + // * `EntityType.entities.synonyms` + // * `EntityType.excluded_phrases.value` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + string language_code = 3; +} + +// The request message for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.cx.v3.EntityTypes.UpdateEntityType]. +message UpdateEntityTypeRequest { + // Required. The entity type to update. + EntityType entity_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // The language of the following fields in `entity_type`: + // + // * `EntityType.entities.value` + // * `EntityType.entities.synonyms` + // * `EntityType.excluded_phrases.value` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + string language_code = 2; + + // The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 3; +} + +// The request message for [EntityTypes.DeleteEntityType][google.cloud.dialogflow.cx.v3.EntityTypes.DeleteEntityType]. +message DeleteEntityTypeRequest { + // Required. The name of the entity type to delete. + // Format: `projects//locations//agents//entityTypes/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // This field has no effect for entity type not being used. + // For entity types that are used by intents or pages: + // + // * If `force` is set to false, an error will be returned with message + // indicating the referencing resources. + // * If `force` is set to true, Dialogflow will remove the entity type, as + // well as any references to the entity type (i.e. Page + // [parameter][google.cloud.dialogflow.cx.v3.Form.Parameter] of the entity type will be changed to + // '@sys.any' and intent [parameter][google.cloud.dialogflow.cx.v3.Intent.Parameter] of the entity type + // will be removed). + bool force = 2; +} diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/environment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/environment.proto new file mode 100644 index 00000000000..38cb107f275 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/environment.proto @@ -0,0 +1,494 @@ +// Copyright 2022 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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3/test_case.proto"; +import "google/cloud/dialogflow/cx/v3/webhook.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx"; +option java_multiple_files = true; +option java_outer_classname = "EnvironmentProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; + +// Service for managing [Environments][google.cloud.dialogflow.cx.v3.Environment]. +service Environments { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all environments in the specified [Agent][google.cloud.dialogflow.cx.v3.Agent]. + rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*}/environments" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. + rpc GetEnvironment(GetEnvironmentRequest) returns (Environment) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/environments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates an [Environment][google.cloud.dialogflow.cx.v3.Environment] in the specified [Agent][google.cloud.dialogflow.cx.v3.Agent]. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: [Environment][google.cloud.dialogflow.cx.v3.Environment] + rpc CreateEnvironment(CreateEnvironmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*}/environments" + body: "environment" + }; + option (google.api.method_signature) = "parent,environment"; + option (google.longrunning.operation_info) = { + response_type: "Environment" + metadata_type: "google.protobuf.Struct" + }; + } + + // Updates the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: [Environment][google.cloud.dialogflow.cx.v3.Environment] + rpc UpdateEnvironment(UpdateEnvironmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v3/{environment.name=projects/*/locations/*/agents/*/environments/*}" + body: "environment" + }; + option (google.api.method_signature) = "environment,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Environment" + metadata_type: "google.protobuf.Struct" + }; + } + + // Deletes the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. + rpc DeleteEnvironment(DeleteEnvironmentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/locations/*/agents/*/environments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Looks up the history of the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. + rpc LookupEnvironmentHistory(LookupEnvironmentHistoryRequest) returns (LookupEnvironmentHistoryResponse) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/environments/*}:lookupEnvironmentHistory" + }; + option (google.api.method_signature) = "name"; + } + + // Kicks off a continuous test under the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: [RunContinuousTestMetadata][google.cloud.dialogflow.cx.v3.RunContinuousTestMetadata] + // - `response`: [RunContinuousTestResponse][google.cloud.dialogflow.cx.v3.RunContinuousTestResponse] + rpc RunContinuousTest(RunContinuousTestRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{environment=projects/*/locations/*/agents/*/environments/*}:runContinuousTest" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "RunContinuousTestResponse" + metadata_type: "RunContinuousTestMetadata" + }; + } + + // Fetches a list of continuous test results for a given environment. + rpc ListContinuousTestResults(ListContinuousTestResultsRequest) returns (ListContinuousTestResultsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/continuousTestResults" + }; + option (google.api.method_signature) = "parent"; + } + + // Deploys a flow to the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: [DeployFlowMetadata][google.cloud.dialogflow.cx.v3.DeployFlowMetadata] + // - `response`: [DeployFlowResponse][google.cloud.dialogflow.cx.v3.DeployFlowResponse] + rpc DeployFlow(DeployFlowRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{environment=projects/*/locations/*/agents/*/environments/*}:deployFlow" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "DeployFlowResponse" + metadata_type: "DeployFlowMetadata" + }; + } +} + +// 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. +message Environment { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Environment" + pattern: "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}" + }; + + // Configuration for the version. + message VersionConfig { + // Required. Format: projects//locations//agents//flows//versions/. + string version = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Version" + } + ]; + } + + // The configuration for continuous tests. + message TestCasesConfig { + // A list of test case names to run. They should be under the same agent. + // Format of each test case name: `projects//locations/ + // /agents//testCases/` + repeated string test_cases = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/TestCase" + }]; + + // Whether to run test cases in [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.test_cases] periodically. + // Default false. If set to true, run once a day. + bool enable_continuous_run = 2; + + // Whether to run test cases in [TestCasesConfig.test_cases][google.cloud.dialogflow.cx.v3.Environment.TestCasesConfig.test_cases] before + // deploying a flow version to the environment. Default false. + bool enable_predeployment_run = 3; + } + + // Configuration for webhooks. + message WebhookConfig { + // The list of webhooks to override for the agent environment. The webhook + // must exist in the agent. You can override fields in + // [`generic_web_service`][google.cloud.dialogflow.cx.v3.Webhook.generic_web_service] and + // [`service_directory`][google.cloud.dialogflow.cx.v3.Webhook.service_directory]. + repeated Webhook webhook_overrides = 1; + } + + // The name of the environment. + // Format: `projects//locations//agents//environments/`. + string name = 1; + + // Required. The human-readable name of the environment (unique in an agent). Limit of + // 64 characters. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // The human-readable description of the environment. The maximum length is + // 500 characters. If exceeded, the request is rejected. + string description = 3; + + // Required. A list of configurations for flow versions. You should include version + // configs for all flows that are reachable from [`Start + // Flow`][Agent.start_flow] in the agent. Otherwise, an error will be + // returned. + repeated VersionConfig version_configs = 6 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Update time of this environment. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The test cases config for continuous tests of this environment. + TestCasesConfig test_cases_config = 7; + + // The webhook configuration for this environment. + WebhookConfig webhook_config = 10; +} + +// The request message for [Environments.ListEnvironments][google.cloud.dialogflow.cx.v3.Environments.ListEnvironments]. +message ListEnvironmentsRequest { + // Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to list all environments for. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Environment" + } + ]; + + // The maximum number of items to return in a single page. By default 20 and + // at most 100. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// The response message for [Environments.ListEnvironments][google.cloud.dialogflow.cx.v3.Environments.ListEnvironments]. +message ListEnvironmentsResponse { + // The list of environments. There will be a maximum number of items + // returned based on the page_size field in the request. The list may in some + // cases be empty or contain fewer entries than page_size even if this isn't + // the last page. + repeated Environment environments = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for [Environments.GetEnvironment][google.cloud.dialogflow.cx.v3.Environments.GetEnvironment]. +message GetEnvironmentRequest { + // Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment]. + // Format: `projects//locations//agents//environments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Environment" + } + ]; +} + +// The request message for [Environments.CreateEnvironment][google.cloud.dialogflow.cx.v3.Environments.CreateEnvironment]. +message CreateEnvironmentRequest { + // Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Environment" + } + ]; + + // Required. The environment to create. + Environment environment = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [Environments.UpdateEnvironment][google.cloud.dialogflow.cx.v3.Environments.UpdateEnvironment]. +message UpdateEnvironmentRequest { + // Required. The environment to update. + Environment environment = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [Environments.DeleteEnvironment][google.cloud.dialogflow.cx.v3.Environments.DeleteEnvironment]. +message DeleteEnvironmentRequest { + // Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. + // Format: `projects//locations//agents//environments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Environment" + } + ]; +} + +// The request message for [Environments.LookupEnvironmentHistory][google.cloud.dialogflow.cx.v3.Environments.LookupEnvironmentHistory]. +message LookupEnvironmentHistoryRequest { + // Required. Resource name of the environment to look up the history for. + // Format: `projects//locations//agents//environments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Environment" + } + ]; + + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// The response message for [Environments.LookupEnvironmentHistory][google.cloud.dialogflow.cx.v3.Environments.LookupEnvironmentHistory]. +message LookupEnvironmentHistoryResponse { + // Represents a list of snapshots for an environment. Time of the snapshots is + // stored in [`update_time`][google.cloud.dialogflow.cx.v3.Environment.update_time]. + repeated Environment environments = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// Represents a result from running a test case in an agent environment. +message ContinuousTestResult { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/ContinuousTestResult" + pattern: "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/continuousTestResults/{continuous_test_result}" + }; + + // The overall result for a continuous test run in an agent environment. + enum AggregatedTestResult { + // Not specified. Should never be used. + AGGREGATED_TEST_RESULT_UNSPECIFIED = 0; + + // All the tests passed. + PASSED = 1; + + // At least one test did not pass. + FAILED = 2; + } + + // The resource name for the continuous test result. Format: + // `projects//locations//agents//environments//continuousTestResults/`. + string name = 1; + + // The result of this continuous test run, i.e. whether all the tests in this + // continuous test run pass or not. + AggregatedTestResult result = 2; + + // A list of individual test case results names in this continuous test run. + repeated string test_case_results = 3 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/TestCaseResult" + }]; + + // Time when the continuous testing run starts. + google.protobuf.Timestamp run_time = 4; +} + +// The request message for [Environments.RunContinuousTest][google.cloud.dialogflow.cx.v3.Environments.RunContinuousTest]. +message RunContinuousTestRequest { + // Required. Format: `projects//locations//agents//environments/`. + string environment = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Environment" + } + ]; +} + +// The response message for [Environments.RunContinuousTest][google.cloud.dialogflow.cx.v3.Environments.RunContinuousTest]. +message RunContinuousTestResponse { + // The result for a continuous test run. + ContinuousTestResult continuous_test_result = 1; +} + +// Metadata returned for the [Environments.RunContinuousTest][google.cloud.dialogflow.cx.v3.Environments.RunContinuousTest] long running +// operation. +message RunContinuousTestMetadata { + // The test errors. + repeated TestError errors = 1; +} + +// The request message for [Environments.ListContinuousTestResults][google.cloud.dialogflow.cx.v3.Environments.ListContinuousTestResults]. +message ListContinuousTestResultsRequest { + // Required. The environment to list results for. + // Format: `projects//locations//agents// + // environments/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/ContinuousTestResult" + } + ]; + + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// The response message for [Environments.ListTestCaseResults][]. +message ListContinuousTestResultsResponse { + // The list of continuous test results. + repeated ContinuousTestResult continuous_test_results = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for [Environments.DeployFlow][google.cloud.dialogflow.cx.v3.Environments.DeployFlow]. +message DeployFlowRequest { + // Required. The environment to deploy the flow to. + // Format: `projects//locations//agents// + // environments/`. + string environment = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Environment" + } + ]; + + // Required. The flow version to deploy. + // Format: `projects//locations//agents// + // flows//versions/`. + string flow_version = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Version" + } + ]; +} + +// The response message for [Environments.DeployFlow][google.cloud.dialogflow.cx.v3.Environments.DeployFlow]. +message DeployFlowResponse { + // The updated environment where the flow is deployed. + Environment environment = 1; + + // The name of the flow version [Deployment][google.cloud.dialogflow.cx.v3.Deployment]. + // Format: `projects//locations//agents// + // environments//deployments/`. + string deployment = 2; +} + +// Metadata returned for the [Environments.DeployFlow][google.cloud.dialogflow.cx.v3.Environments.DeployFlow] long running +// operation. +message DeployFlowMetadata { + // Errors of running deployment tests. + repeated TestError test_errors = 1; +} diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/experiment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/experiment.proto new file mode 100644 index 00000000000..6b5216dd5c0 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/experiment.proto @@ -0,0 +1,503 @@ +// Copyright 2022 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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx"; +option java_multiple_files = true; +option java_outer_classname = "ExperimentProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; + +// Service for managing [Experiments][google.cloud.dialogflow.cx.v3.Experiment]. +service Experiments { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. + rpc ListExperiments(ListExperimentsRequest) returns (ListExperimentsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + rpc GetExperiment(GetExperimentRequest) returns (Experiment) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates an [Experiment][google.cloud.dialogflow.cx.v3.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3.Environment]. + rpc CreateExperiment(CreateExperimentRequest) returns (Experiment) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/experiments" + body: "experiment" + }; + option (google.api.method_signature) = "parent,experiment"; + } + + // Updates the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + rpc UpdateExperiment(UpdateExperimentRequest) returns (Experiment) { + option (google.api.http) = { + patch: "/v3/{experiment.name=projects/*/locations/*/agents/*/environments/*/experiments/*}" + body: "experiment" + }; + option (google.api.method_signature) = "experiment,update_mask"; + } + + // Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. + rpc DeleteExperiment(DeleteExperimentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Starts the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of + // experiment from PENDING to RUNNING. + rpc StartExperiment(StartExperimentRequest) returns (Experiment) { + option (google.api.http) = { + post: "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:start" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Stops the specified [Experiment][google.cloud.dialogflow.cx.v3.Experiment]. This rpc only changes the state of + // experiment from RUNNING to DONE. + rpc StopExperiment(StopExperimentRequest) returns (Experiment) { + option (google.api.http) = { + post: "/v3/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:stop" + body: "*" + }; + option (google.api.method_signature) = "name"; + } +} + +// Represents an experiment in an environment. +message Experiment { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Experiment" + pattern: "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/experiments/{experiment}" + }; + + // The state of the experiment. + enum State { + // State unspecified. + STATE_UNSPECIFIED = 0; + + // The experiment is created but not started yet. + DRAFT = 1; + + // The experiment is running. + RUNNING = 2; + + // The experiment is done. + DONE = 3; + + // The experiment with auto-rollout enabled has failed. + ROLLOUT_FAILED = 4; + } + + // Definition of the experiment. + message Definition { + // 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). + string condition = 1; + + // The variants of the experiment. We currently only support single variant + // experiment. + oneof variants { + // The flow versions as the variants of this experiment. + VersionVariants version_variants = 2; + } + } + + // The inference result which includes an objective metric to optimize and the + // confidence interval. + message Result { + // Types of ratio-based metric for Dialogflow experiment. + enum MetricType { + // Metric unspecified. + METRIC_UNSPECIFIED = 0; + + // Percentage of contained sessions without user calling back in 24 hours. + CONTAINED_SESSION_NO_CALLBACK_RATE = 1; + + // Percentage of sessions that were handed to a human agent. + LIVE_AGENT_HANDOFF_RATE = 2; + + // Percentage of sessions with the same user calling back. + CALLBACK_SESSION_RATE = 3; + + // Percentage of sessions where user hung up. + ABANDONED_SESSION_RATE = 4; + + // Percentage of sessions reached Dialogflow 'END_PAGE' or + // 'END_SESSION'. + SESSION_END_RATE = 5; + } + + // Types of count-based metric for Dialogflow experiment. + enum CountType { + // Count type unspecified. + COUNT_TYPE_UNSPECIFIED = 0; + + // Total number of occurrences of a 'NO_MATCH'. + TOTAL_NO_MATCH_COUNT = 1; + + // Total number of turn counts. + TOTAL_TURN_COUNT = 2; + + // Average turn count in a session. + AVERAGE_TURN_COUNT = 3; + } + + // A confidence interval is a range of possible values for the experiment + // objective you are trying to measure. + message ConfidenceInterval { + // The confidence level used to construct the interval, i.e. there is X% + // chance that the true value is within this interval. + double confidence_level = 1; + + // The percent change between an experiment metric's value and the value + // for its control. + double ratio = 2; + + // Lower bound of the interval. + double lower_bound = 3; + + // Upper bound of the interval. + double upper_bound = 4; + } + + // Metric and corresponding confidence intervals. + message Metric { + // Ratio-based metric type. Only one of type or count_type is specified in + // each Metric. + MetricType type = 1; + + // Count-based metric type. Only one of type or count_type is specified in + // each Metric. + CountType count_type = 5; + + // The actual value of the metric. + oneof value { + // Ratio value of a metric. + double ratio = 2; + + // Count value of a metric. + double count = 4; + } + + // The probability that the treatment is better than all other treatments + // in the experiment + ConfidenceInterval confidence_interval = 3; + } + + // Version variant and associated metrics. + message VersionMetrics { + // The name of the flow [Version][google.cloud.dialogflow.cx.v3.Version]. + // Format: `projects//locations//agents//flows//versions/`. + string version = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Version" + }]; + + // The metrics and corresponding confidence intervals in the inference + // result. + repeated Metric metrics = 2; + + // Number of sessions that were allocated to this version. + int32 session_count = 3; + } + + // Version variants and metrics. + repeated VersionMetrics version_metrics = 1; + + // The last time the experiment's stats data was updated. Will have default + // value if stats have never been computed for this experiment. + google.protobuf.Timestamp last_update_time = 2; + } + + // The name of the experiment. + // Format: projects//locations//agents//environments//experiments/.. + string name = 1; + + // Required. The human-readable name of the experiment (unique in an environment). Limit + // of 64 characters. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // The human-readable description of the experiment. + string description = 3; + + // The current state of the experiment. + // Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING. + // Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or + // RUNNING->DONE. + State state = 4; + + // The definition of the experiment. + Definition definition = 5; + + // The configuration for auto rollout. If set, there should be exactly two + // variants in the experiment (control variant being the default version of + // the flow), the traffic allocation for the non-control variant will + // gradually increase to 100% when conditions are met, and eventually + // replace the control variant to become the default version of the flow. + RolloutConfig rollout_config = 14; + + // State of the auto rollout process. + RolloutState rollout_state = 15; + + // The reason why rollout has failed. Should only be set when state is + // ROLLOUT_FAILED. + string rollout_failure_reason = 16; + + // Inference result of the experiment. + Result result = 6; + + // Creation time of this experiment. + google.protobuf.Timestamp create_time = 7; + + // Start time of this experiment. + google.protobuf.Timestamp start_time = 8; + + // End time of this experiment. + google.protobuf.Timestamp end_time = 9; + + // Last update time of this experiment. + google.protobuf.Timestamp last_update_time = 10; + + // Maximum number of days to run the experiment/rollout. 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. + google.protobuf.Duration experiment_length = 11; + + // The history of updates to the experiment variants. + repeated VariantsHistory variants_history = 12; +} + +// A list of flow version variants. +message VersionVariants { + // A single flow version with specified traffic allocation. + message Variant { + // The name of the flow version. + // Format: `projects//locations//agents//flows//versions/`. + string version = 1; + + // Percentage of the traffic which should be routed to this + // version of flow. Traffic allocation for a single flow must sum up to 1.0. + float traffic_allocation = 2; + + // Whether the variant is for the control group. + bool is_control_group = 3; + } + + // A list of flow version variants. + repeated Variant variants = 1; +} + +// The history of variants update. +message VariantsHistory { + // The variants updated. We currently only support single variant + // experiment. + oneof variants { + // The flow versions as the variants. + VersionVariants version_variants = 1; + } + + // Update time of the variants. + google.protobuf.Timestamp update_time = 2; +} + +// The configuration for auto rollout. +message RolloutConfig { + // A single rollout step with specified traffic allocation. + message RolloutStep { + // The name of the rollout step; + string display_name = 1; + + // The percentage of traffic allocated to the flow version of this rollout + // step. (0%, 100%]. + int32 traffic_percent = 2; + + // The minimum time that this step should last. Should be longer than 1 + // hour. If not set, the default minimum duration for each step will be 1 + // hour. + google.protobuf.Duration min_duration = 3; + } + + // Steps to roll out a flow version. Steps should be sorted by percentage in + // ascending order. + repeated RolloutStep rollout_steps = 1; + + // The conditions that are used to evaluate the success of a rollout + // step. If not specified, all rollout steps will proceed to the next one + // unless failure conditions are met. E.g. "containment_rate > 60% AND + // callback_rate < 20%". See the [conditions + // reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + string rollout_condition = 2; + + // The conditions that are used to evaluate the failure of a rollout + // step. If not specified, no rollout steps will fail. E.g. "containment_rate + // < 10% OR average_turn_count < 3". See the [conditions + // reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + string failure_condition = 3; +} + +// State of the auto-rollout process. +message RolloutState { + // Display name of the current auto rollout step. + string step = 1; + + // Index of the current step in the auto rollout steps list. + int32 step_index = 3; + + // Start time of the current step. + google.protobuf.Timestamp start_time = 2; +} + +// The request message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3.Experiments.ListExperiments]. +message ListExperimentsRequest { + // Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for. + // Format: `projects//locations//agents//environments/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Experiment" + } + ]; + + // The maximum number of items to return in a single page. By default 20 and + // at most 100. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// The response message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3.Experiments.ListExperiments]. +message ListExperimentsResponse { + // The list of experiments. There will be a maximum number of items + // returned based on the page_size field in the request. The list may in some + // cases be empty or contain fewer entries than page_size even if this isn't + // the last page. + repeated Experiment experiments = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3.Experiments.GetExperiment]. +message GetExperimentRequest { + // Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment]. + // Format: `projects//locations//agents//environments//experiments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Experiment" + } + ]; +} + +// The request message for [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3.Experiments.CreateExperiment]. +message CreateExperimentRequest { + // Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for. + // Format: `projects//locations//agents//environments/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Experiment" + } + ]; + + // Required. The experiment to create. + Experiment experiment = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3.Experiments.UpdateExperiment]. +message UpdateExperimentRequest { + // Required. The experiment to update. + Experiment experiment = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3.Experiments.DeleteExperiment]. +message DeleteExperimentRequest { + // Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete. + // Format: `projects//locations//agents//environments//experiments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Experiment" + } + ]; +} + +// The request message for [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3.Experiments.StartExperiment]. +message StartExperimentRequest { + // Required. Resource name of the experiment to start. + // Format: `projects//locations//agents//environments//experiments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Experiment" + } + ]; +} + +// The request message for [Experiments.StopExperiment][google.cloud.dialogflow.cx.v3.Experiments.StopExperiment]. +message StopExperimentRequest { + // Required. Resource name of the experiment to stop. + // Format: `projects//locations//agents//environments//experiments/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Experiment" + } + ]; +} diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/flow.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/flow.proto new file mode 100644 index 00000000000..b95320bc832 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/flow.proto @@ -0,0 +1,627 @@ +// Copyright 2022 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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3/page.proto"; +import "google/cloud/dialogflow/cx/v3/validation_message.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx"; +option java_multiple_files = true; +option java_outer_classname = "FlowProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; + +// Service for managing [Flows][google.cloud.dialogflow.cx.v3.Flow]. +service Flows { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Creates a flow in the specified agent. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + rpc CreateFlow(CreateFlowRequest) returns (Flow) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*}/flows" + body: "flow" + }; + option (google.api.method_signature) = "parent,flow"; + } + + // Deletes a specified flow. + rpc DeleteFlow(DeleteFlowRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/locations/*/agents/*/flows/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns the list of all flows in the specified agent. + rpc ListFlows(ListFlowsRequest) returns (ListFlowsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*}/flows" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified flow. + rpc GetFlow(GetFlowRequest) returns (Flow) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/flows/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the specified flow. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + rpc UpdateFlow(UpdateFlowRequest) returns (Flow) { + option (google.api.http) = { + patch: "/v3/{flow.name=projects/*/locations/*/agents/*/flows/*}" + body: "flow" + }; + option (google.api.method_signature) = "flow,update_mask"; + } + + // Trains the specified flow. Note that only the flow in 'draft' environment + // is trained. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: An [Empty + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty) + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + rpc TrainFlow(TrainFlowRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{name=projects/*/locations/*/agents/*/flows/*}:train" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.protobuf.Struct" + }; + } + + // Validates the specified flow and creates or updates validation results. + // Please call this API after the training is completed to get the complete + // validation results. + rpc ValidateFlow(ValidateFlowRequest) returns (FlowValidationResult) { + option (google.api.http) = { + post: "/v3/{name=projects/*/locations/*/agents/*/flows/*}:validate" + body: "*" + }; + } + + // Gets the latest flow validation result. Flow validation is performed + // when ValidateFlow is called. + rpc GetFlowValidationResult(GetFlowValidationResultRequest) returns (FlowValidationResult) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/flows/*/validationResult}" + }; + option (google.api.method_signature) = "name"; + } + + // Imports the specified flow to the specified agent from a binary file. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: [ImportFlowResponse][google.cloud.dialogflow.cx.v3.ImportFlowResponse] + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + rpc ImportFlow(ImportFlowRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*}/flows:import" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ImportFlowResponse" + metadata_type: "google.protobuf.Struct" + }; + } + + // Exports the specified flow to a binary file. + // + // This method is a [long-running + // operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). + // The returned `Operation` type has the following method-specific fields: + // + // - `metadata`: An empty [Struct + // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct) + // - `response`: [ExportFlowResponse][google.cloud.dialogflow.cx.v3.ExportFlowResponse] + // + // Note that resources (e.g. intents, entities, webhooks) that the flow + // references will also be exported. + rpc ExportFlow(ExportFlowRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{name=projects/*/locations/*/agents/*/flows/*}:export" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ExportFlowResponse" + metadata_type: "google.protobuf.Struct" + }; + } +} + +// Settings related to NLU. +message NluSettings { + // NLU model type. + enum ModelType { + // Not specified. `MODEL_TYPE_STANDARD` will be used. + MODEL_TYPE_UNSPECIFIED = 0; + + // Use standard NLU model. + MODEL_TYPE_STANDARD = 1; + + // Use advanced NLU model. + MODEL_TYPE_ADVANCED = 3; + } + + // NLU model training mode. + enum ModelTrainingMode { + // Not specified. `MODEL_TRAINING_MODE_AUTOMATIC` will be used. + MODEL_TRAINING_MODE_UNSPECIFIED = 0; + + // NLU model training is automatically triggered when a flow gets modified. + // User can also manually trigger model training in this mode. + MODEL_TRAINING_MODE_AUTOMATIC = 1; + + // User needs to manually trigger NLU model training. Best for large flows + // whose models take long time to train. + MODEL_TRAINING_MODE_MANUAL = 2; + } + + // Indicates the type of NLU model. + ModelType model_type = 1; + + // 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 no-match event 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. + float classification_threshold = 3; + + // Indicates NLU model training mode. + ModelTrainingMode model_training_mode = 4; +} + +// 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. +message Flow { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Flow" + pattern: "projects/{project}/locations/{location}/agents/{agent}/flows/{flow}" + }; + + // The unique identifier of the flow. + // Format: `projects//locations//agents//flows/`. + string name = 1; + + // Required. The human-readable name of the flow. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // The description of the flow. The maximum length is 500 characters. If + // exceeded, the request is rejected. + string description = 3; + + // 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][Page.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. + repeated TransitionRoute transition_routes = 4; + + // 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][Page.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][google.cloud.dialogflow.cx.v3.Flow.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. + 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; +} + +// The request message for [Flows.CreateFlow][google.cloud.dialogflow.cx.v3.Flows.CreateFlow]. +message CreateFlowRequest { + // Required. The agent to create a flow for. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Flow" + } + ]; + + // Required. The flow to create. + Flow flow = 2 [(google.api.field_behavior) = REQUIRED]; + + // The language of the following fields in `flow`: + // + // * `Flow.event_handlers.trigger_fulfillment.messages` + // * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + // * `Flow.transition_routes.trigger_fulfillment.messages` + // * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + string language_code = 3; +} + +// The request message for [Flows.DeleteFlow][google.cloud.dialogflow.cx.v3.Flows.DeleteFlow]. +message DeleteFlowRequest { + // Required. The name of the flow to delete. + // Format: `projects//locations//agents//flows/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Flow" + } + ]; + + // This field has no effect for flows with no incoming transitions. + // For flows with incoming transitions: + // + // * If `force` is set to false, an error will be returned with message + // indicating the incoming transitions. + // * If `force` is set to true, Dialogflow will remove the flow, as well as + // any transitions to the flow (i.e. [Target + // flow][EventHandler.target_flow] in event handlers or [Target + // flow][TransitionRoute.target_flow] in transition routes that point to + // this flow will be cleared). + bool force = 2; +} + +// The request message for [Flows.ListFlows][google.cloud.dialogflow.cx.v3.Flows.ListFlows]. +message ListFlowsRequest { + // Required. The agent containing the flows. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Flow" + } + ]; + + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; + + // The language to list flows for. The following fields are language + // dependent: + // + // * `Flow.event_handlers.trigger_fulfillment.messages` + // * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + // * `Flow.transition_routes.trigger_fulfillment.messages` + // * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + string language_code = 4; +} + +// The response message for [Flows.ListFlows][google.cloud.dialogflow.cx.v3.Flows.ListFlows]. +message ListFlowsResponse { + // The list of flows. There will be a maximum number of items returned based + // on the page_size field in the request. + repeated Flow flows = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The response message for [Flows.GetFlow][google.cloud.dialogflow.cx.v3.Flows.GetFlow]. +message GetFlowRequest { + // Required. The name of the flow to get. + // Format: `projects//locations//agents//flows/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Flow" + } + ]; + + // The language to retrieve the flow for. The following fields are language + // dependent: + // + // * `Flow.event_handlers.trigger_fulfillment.messages` + // * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + // * `Flow.transition_routes.trigger_fulfillment.messages` + // * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + string language_code = 2; +} + +// The request message for [Flows.UpdateFlow][google.cloud.dialogflow.cx.v3.Flows.UpdateFlow]. +message UpdateFlowRequest { + // Required. The flow to update. + Flow flow = 1 [(google.api.field_behavior) = REQUIRED]; + + // The mask to control which fields get updated. If the mask is not present, + // all fields will be updated. + google.protobuf.FieldMask update_mask = 2; + + // The language of the following fields in `flow`: + // + // * `Flow.event_handlers.trigger_fulfillment.messages` + // * `Flow.event_handlers.trigger_fulfillment.conditional_cases` + // * `Flow.transition_routes.trigger_fulfillment.messages` + // * `Flow.transition_routes.trigger_fulfillment.conditional_cases` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + string language_code = 3; +} + +// The request message for [Flows.TrainFlow][google.cloud.dialogflow.cx.v3.Flows.TrainFlow]. +message TrainFlowRequest { + // Required. The flow to train. + // Format: `projects//locations//agents//flows/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Flow" + } + ]; +} + +// The request message for [Flows.ValidateFlow][google.cloud.dialogflow.cx.v3.Flows.ValidateFlow]. +message ValidateFlowRequest { + // Required. The flow to validate. + // Format: `projects//locations//agents//flows/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Flow" + } + ]; + + // If not specified, the agent's default language is used. + string language_code = 2; +} + +// The request message for [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3.Flows.GetFlowValidationResult]. +message GetFlowValidationResultRequest { + // Required. The flow name. + // Format: `projects//locations//agents//flows//validationResult`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/FlowValidationResult" + } + ]; + + // If not specified, the agent's default language is used. + string language_code = 2; +} + +// The response message for [Flows.GetFlowValidationResult][google.cloud.dialogflow.cx.v3.Flows.GetFlowValidationResult]. +message FlowValidationResult { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/FlowValidationResult" + pattern: "projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/validationResult" + }; + + // The unique identifier of the flow validation result. + // Format: `projects//locations//agents//flows//validationResult`. + string name = 1; + + // Contains all validation messages. + repeated ValidationMessage validation_messages = 2; + + // Last time the flow was validated. + google.protobuf.Timestamp update_time = 3; +} + +// The request message for [Flows.ImportFlow][google.cloud.dialogflow.cx.v3.Flows.ImportFlow]. +message ImportFlowRequest { + // Import option. + enum ImportOption { + // Unspecified. Treated as `KEEP`. + IMPORT_OPTION_UNSPECIFIED = 0; + + // Always respect settings in exported flow content. It may cause a + // import failure if some settings (e.g. custom NLU) are not supported in + // the agent to import into. + KEEP = 1; + + // Fallback to default settings if some settings are not supported in the + // agent to import into. E.g. Standard NLU will be used if custom NLU is + // not available. + FALLBACK = 2; + } + + // Required. The agent to import the flow into. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Flow" + } + ]; + + // Required. The flow to import. + oneof flow { + // The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + // to import flow from. The format of this URI must be + // `gs:///`. + // + // Dialogflow performs a read operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have read permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + string flow_uri = 2; + + // Uncompressed raw byte content for flow. + bytes flow_content = 3; + } + + // Flow import mode. If not specified, `KEEP` is assumed. + ImportOption import_option = 4; +} + +// The response message for [Flows.ImportFlow][google.cloud.dialogflow.cx.v3.Flows.ImportFlow]. +message ImportFlowResponse { + // The unique identifier of the new flow. + // Format: `projects//locations//agents//flows/`. + string flow = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Flow" + }]; +} + +// The request message for [Flows.ExportFlow][google.cloud.dialogflow.cx.v3.Flows.ExportFlow]. +message ExportFlowRequest { + // Required. The name of the flow to export. + // Format: `projects//locations//agents//flows/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Flow" + } + ]; + + // Optional. The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to + // export the flow to. The format of this URI must be + // `gs:///`. + // If left unspecified, the serialized flow is returned inline. + // + // Dialogflow performs a write operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have write permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + string flow_uri = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to export flows referenced by the specified flow. + bool include_referenced_flows = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [Flows.ExportFlow][google.cloud.dialogflow.cx.v3.Flows.ExportFlow]. +message ExportFlowResponse { + // The exported flow. + oneof flow { + // The URI to a file containing the exported flow. This field is populated + // only if `flow_uri` is specified in [ExportFlowRequest][google.cloud.dialogflow.cx.v3.ExportFlowRequest]. + string flow_uri = 1; + + // Uncompressed raw byte content for flow. + bytes flow_content = 2; + } +} diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/fulfillment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/fulfillment.proto new file mode 100644 index 00000000000..e21ede58d99 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/fulfillment.proto @@ -0,0 +1,122 @@ +// Copyright 2022 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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3/response_message.proto"; +import "google/protobuf/struct.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx"; +option java_multiple_files = true; +option java_outer_classname = "FulfillmentProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; + +// 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][google.cloud.dialogflow.cx.v3.Page] or +// [Form][google.cloud.dialogflow.cx.v3.Form] lifecycle. For example, when a [DetectIntentRequest][google.cloud.dialogflow.cx.v3.DetectIntentRequest] drives a +// session to enter a new page, the page's entry fulfillment can add a static +// response to the [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] in the returning [DetectIntentResponse][google.cloud.dialogflow.cx.v3.DetectIntentResponse], +// call the webhook (for example, to load user data from a database), or both. +message Fulfillment { + // Setting a parameter value. + message SetParameterAction { + // Display name of the parameter. + string parameter = 1; + + // The new value of the parameter. A null value clears the parameter. + google.protobuf.Value value = 2; + } + + // A list of cascading if-else conditions. Cases are mutually exclusive. + // The first one with a matching condition is selected, all the rest ignored. + message ConditionalCases { + // Each case has a Boolean condition. When it is evaluated to be True, the + // corresponding messages will be selected and evaluated recursively. + message Case { + // The list of messages or conditional cases to activate for this case. + message CaseContent { + // Either a message is returned or additional cases to be evaluated. + oneof cases_or_message { + // Returned message. + ResponseMessage message = 1; + + // Additional cases to be evaluated. + ConditionalCases additional_cases = 2; + } + } + + // The condition to activate and select this case. Empty means the + // condition is always true. The condition is evaluated against [form + // parameters][Form.parameters] or [session + // parameters][SessionInfo.parameters]. + // + // See the [conditions + // reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + string condition = 1; + + // A list of case content. + repeated CaseContent case_content = 2; + } + + // A list of cascading if-else conditions. + repeated Case cases = 1; + } + + // The list of rich message responses to present to the user. + repeated ResponseMessage messages = 1; + + // The webhook to call. + // Format: `projects//locations//agents//webhooks/`. + string webhook = 2 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Webhook" + }]; + + // Whether Dialogflow should return currently queued fulfillment response + // messages in streaming APIs. If a webhook is specified, it happens before + // Dialogflow invokes webhook. + // Warning: + // 1) This flag only affects streaming API. Responses are still queued + // and returned once in non-streaming API. + // 2) The flag can be enabled in any fulfillment but only the first 3 partial + // responses will be returned. You may only want to apply it to fulfillments + // that have slow webhooks. + bool return_partial_responses = 8; + + // The value of this field will be populated in the [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] + // `fulfillmentInfo.tag` field by Dialogflow when the associated webhook is + // called. + // The tag is typically used by the webhook service to identify which + // fulfillment is being called, but it could be used for other purposes. + // This field is required if `webhook` is specified. + string tag = 3; + + // Set parameter values before executing the webhook. + repeated SetParameterAction set_parameter_actions = 4; + + // Conditional cases for this fulfillment. + repeated ConditionalCases conditional_cases = 5; +} diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/intent.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/intent.proto new file mode 100644 index 00000000000..05160288496 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/intent.proto @@ -0,0 +1,376 @@ +// Copyright 2022 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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx"; +option java_multiple_files = true; +option java_outer_classname = "IntentProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; + +// Service for managing [Intents][google.cloud.dialogflow.cx.v3.Intent]. +service Intents { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all intents in the specified agent. + rpc ListIntents(ListIntentsRequest) returns (ListIntentsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*}/intents" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified intent. + rpc GetIntent(GetIntentRequest) returns (Intent) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/intents/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates an intent in the specified agent. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + rpc CreateIntent(CreateIntentRequest) returns (Intent) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*}/intents" + body: "intent" + }; + option (google.api.method_signature) = "parent,intent"; + } + + // Updates the specified intent. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + rpc UpdateIntent(UpdateIntentRequest) returns (Intent) { + option (google.api.http) = { + patch: "/v3/{intent.name=projects/*/locations/*/agents/*/intents/*}" + body: "intent" + }; + option (google.api.method_signature) = "intent,update_mask"; + } + + // Deletes the specified intent. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + rpc DeleteIntent(DeleteIntentRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/locations/*/agents/*/intents/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// An intent represents a user's intent to interact with a conversational agent. +// +// You can provide information for the Dialogflow API to use to match user input +// to an intent by adding training phrases (i.e., examples of user input) to +// your intent. +message Intent { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Intent" + pattern: "projects/{project}/locations/{location}/agents/{agent}/intents/{intent}" + }; + + // Represents an example that the agent is trained on to identify the intent. + message TrainingPhrase { + // Represents a part of a training phrase. + message Part { + // Required. The text for this part. + string text = 1 [(google.api.field_behavior) = REQUIRED]; + + // The [parameter][google.cloud.dialogflow.cx.v3.Intent.Parameter] used to annotate this part of the + // training phrase. This field is required for annotated parts of the + // training phrase. + string parameter_id = 2; + } + + // Output only. The unique identifier of the training phrase. + string id = 1; + + // 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][google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.text] field set. + // + // If you want to annotate the training phrase, you must create multiple + // parts, where the fields of each part are populated in one of two ways: + // + // - `Part.text` is set to a part of the phrase that has no parameters. + // - `Part.text` is set to a part of the phrase that you want to annotate, + // and the `parameter_id` field is set. + repeated Part parts = 2 [(google.api.field_behavior) = REQUIRED]; + + // Indicates how many times this example was added to the intent. + int32 repeat_count = 3; + } + + // Represents an intent parameter. + message Parameter { + // Required. The unique identifier of the parameter. This field + // is used by [training phrases][google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase] to annotate their + // [parts][google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part]. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // 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. + string entity_type = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Indicates whether the parameter represents a list of values. + bool is_list = 3; + + // 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][google.cloud.dialogflow.cx.v3.EntityType.redact] is + // enabled. + bool redact = 4; + } + + // The unique identifier of the intent. + // Required for the [Intents.UpdateIntent][google.cloud.dialogflow.cx.v3.Intents.UpdateIntent] method. [Intents.CreateIntent][google.cloud.dialogflow.cx.v3.Intents.CreateIntent] + // populates the name automatically. + // Format: `projects//locations//agents//intents/`. + string name = 1; + + // Required. The human-readable name of the intent, unique within the agent. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // The collection of training phrases the agent is trained on to identify the + // intent. + repeated TrainingPhrase training_phrases = 3; + + // The collection of parameters associated with the intent. + repeated Parameter parameters = 4; + + // The priority of this intent. Higher numbers represent higher + // priorities. + // + // - If the supplied value is unspecified or 0, the service + // translates the value to 500,000, which corresponds to the + // `Normal` priority in the console. + // - If the supplied value is negative, the intent is ignored + // in runtime detect intent requests. + int32 priority = 5; + + // Indicates whether this is a fallback intent. Currently only default + // fallback intent is allowed in the agent, which is added upon agent + // creation. + // Adding training phrases to fallback intent is useful in the case of + // requests that are mistakenly matched, since training phrases assigned to + // fallback intents act as negative examples that triggers no-match event. + bool is_fallback = 6; + + // The key/value metadata to label an intent. Labels can contain + // lowercase letters, digits and the symbols '-' and '_'. International + // characters are allowed, including letters from unicase alphabets. Keys must + // start with a letter. Keys and values can be no longer than 63 characters + // and no more than 128 bytes. + // + // Prefix "sys-" is reserved for Dialogflow defined labels. Currently allowed + // Dialogflow defined labels include: + // * sys-head + // * sys-contextual + // The above labels do not require value. "sys-head" means the intent is a + // head intent. "sys.contextual" means the intent is a contextual intent. + map labels = 7; + + // Human readable description for better understanding an intent like its + // scope, content, result etc. Maximum character limit: 140 characters. + string description = 8; +} + +// The request message for [Intents.ListIntents][google.cloud.dialogflow.cx.v3.Intents.ListIntents]. +message ListIntentsRequest { + // Required. The agent to list all intents for. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Intent" + } + ]; + + // The language to list intents for. The following fields are language + // dependent: + // + // * `Intent.training_phrases.parts.text` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + string language_code = 2; + + // The resource view to apply to the returned intent. + IntentView intent_view = 5; + + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 3; + + // The next_page_token value returned from a previous list request. + string page_token = 4; +} + +// The response message for [Intents.ListIntents][google.cloud.dialogflow.cx.v3.Intents.ListIntents]. +message ListIntentsResponse { + // The list of intents. There will be a maximum number of items returned based + // on the page_size field in the request. + repeated Intent intents = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for [Intents.GetIntent][google.cloud.dialogflow.cx.v3.Intents.GetIntent]. +message GetIntentRequest { + // Required. The name of the intent. + // Format: `projects//locations//agents//intents/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Intent" + } + ]; + + // The language to retrieve the intent for. The following fields are language + // dependent: + // + // * `Intent.training_phrases.parts.text` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + string language_code = 2; +} + +// The request message for [Intents.CreateIntent][google.cloud.dialogflow.cx.v3.Intents.CreateIntent]. +message CreateIntentRequest { + // Required. The agent to create an intent for. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Intent" + } + ]; + + // Required. The intent to create. + Intent intent = 2 [(google.api.field_behavior) = REQUIRED]; + + // The language of the following fields in `intent`: + // + // * `Intent.training_phrases.parts.text` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + string language_code = 3; +} + +// The request message for [Intents.UpdateIntent][google.cloud.dialogflow.cx.v3.Intents.UpdateIntent]. +message UpdateIntentRequest { + // Required. The intent to update. + Intent intent = 1 [(google.api.field_behavior) = REQUIRED]; + + // The language of the following fields in `intent`: + // + // * `Intent.training_phrases.parts.text` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + string language_code = 2; + + // The mask to control which fields get updated. If the mask is not present, + // all fields will be updated. + google.protobuf.FieldMask update_mask = 3; +} + +// The request message for [Intents.DeleteIntent][google.cloud.dialogflow.cx.v3.Intents.DeleteIntent]. +message DeleteIntentRequest { + // Required. The name of the intent to delete. + // Format: `projects//locations//agents//intents/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Intent" + } + ]; +} + +// Represents the options for views of an intent. +// An intent can be a sizable object. Therefore, we provide a resource view that +// does not return training phrases in the response. +enum IntentView { + // Not specified. Treated as INTENT_VIEW_FULL. + INTENT_VIEW_UNSPECIFIED = 0; + + // Training phrases field is not populated in the response. + INTENT_VIEW_PARTIAL = 1; + + // All fields are populated. + INTENT_VIEW_FULL = 2; +} diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/page.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/page.proto new file mode 100644 index 00000000000..e9753b144ee --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/page.proto @@ -0,0 +1,561 @@ +// Copyright 2022 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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3/fulfillment.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx"; +option java_multiple_files = true; +option java_outer_classname = "PageProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; + +// Service for managing [Pages][google.cloud.dialogflow.cx.v3.Page]. +service Pages { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all pages in the specified flow. + rpc ListPages(ListPagesRequest) returns (ListPagesResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*/agents/*/flows/*}/pages" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified page. + rpc GetPage(GetPageRequest) returns (Page) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/agents/*/flows/*/pages/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a page in the specified flow. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + rpc CreatePage(CreatePageRequest) returns (Page) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*/flows/*}/pages" + body: "page" + }; + option (google.api.method_signature) = "parent,page"; + } + + // Updates the specified page. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + rpc UpdatePage(UpdatePageRequest) returns (Page) { + option (google.api.http) = { + patch: "/v3/{page.name=projects/*/locations/*/agents/*/flows/*/pages/*}" + body: "page" + }; + option (google.api.method_signature) = "page,update_mask"; + } + + // Deletes the specified page. + // + // Note: You should always train a flow prior to sending it queries. See the + // [training + // documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). + rpc DeletePage(DeletePageRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/locations/*/agents/*/flows/*/pages/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// A Dialogflow CX conversation (session) can be described and visualized as a +// state machine. The states of a CX session are represented by pages. +// +// For each flow, you define many pages, where your combined pages can handle a +// complete conversation on the topics the flow is designed for. At any given +// moment, exactly one page is the current page, the current page is considered +// active, and the flow associated with that page is considered active. Every +// flow has a special start page. When a flow initially becomes active, the +// start page page becomes the current page. For each conversational turn, the +// current page will either stay the same or transition to another page. +// +// You configure each page to collect information from the end-user that is +// relevant for the conversational state represented by the page. +// +// For more information, see the +// [Page guide](https://cloud.google.com/dialogflow/cx/docs/concept/page). +message Page { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Page" + pattern: "projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}" + }; + + // The unique identifier of the page. + // Required for the [Pages.UpdatePage][google.cloud.dialogflow.cx.v3.Pages.UpdatePage] method. [Pages.CreatePage][google.cloud.dialogflow.cx.v3.Pages.CreatePage] + // populates the name automatically. + // Format: `projects//locations//agents//flows//pages/`. + string name = 1; + + // Required. The human-readable name of the page, unique within the flow. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // The fulfillment to call when the session is entering the page. + Fulfillment entry_fulfillment = 7; + + // The form associated with the page, used for collecting parameters + // relevant to the page. + Form form = 4; + + // Ordered list of [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] associated + // with the page. Transition route groups must be unique within a page. + // + // * If multiple transition routes within a page scope refer to the same + // intent, then the precedence order is: page's transition route -> page's + // transition route group -> flow's transition routes. + // + // * If multiple transition route groups within a page contain the same + // intent, then the first group in the ordered list takes precedence. + // + // Format:`projects//locations//agents//flows//transitionRouteGroups/`. + repeated string transition_route_groups = 11 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/TransitionRouteGroup" + }]; + + // A list of transitions for the transition rules of this page. + // They route the conversation to another page in the same flow, or another + // flow. + // + // When we are in a certain page, the TransitionRoutes are evalauted in the + // following order: + // + // * TransitionRoutes defined in the page with intent specified. + // * TransitionRoutes defined in the + // [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with intent + // specified. + // * TransitionRoutes defined in flow with intent specified. + // * TransitionRoutes defined in the + // [transition route groups][google.cloud.dialogflow.cx.v3.Flow.transition_route_groups] with intent + // specified. + // * TransitionRoutes defined in the page with only condition specified. + // * TransitionRoutes defined in the + // [transition route groups][google.cloud.dialogflow.cx.v3.Page.transition_route_groups] with only + // condition specified. + repeated TransitionRoute transition_routes = 9; + + // Handlers associated with the page to handle events such as webhook errors, + // no match or no input. + repeated EventHandler event_handlers = 10; +} + +// 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][google.cloud.dialogflow.cx.v3.Page]. When form filling is done, the filled parameters will be +// written to the [session][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. +message Form { + // Represents a form parameter. + message Parameter { + // Configuration for how the filling of a parameter should be handled. + message FillBehavior { + // Required. The fulfillment to provide the initial prompt that the agent + // can present to the user in order to fill the parameter. + Fulfillment initial_prompt_fulfillment = 3 [(google.api.field_behavior) = REQUIRED]; + + // 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. + repeated EventHandler reprompt_event_handlers = 5; + } + + // Required. The human-readable name of the parameter, unique within the + // form. + string display_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // 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. + bool required = 2; + + // 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. + string entity_type = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Indicates whether the parameter represents a list of values. + bool is_list = 4; + + // Required. Defines fill behavior for the parameter. + FillBehavior fill_behavior = 7 [(google.api.field_behavior) = REQUIRED]; + + // The default value of an optional parameter. If the parameter is required, + // the default value will be ignored. + google.protobuf.Value default_value = 9; + + // 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][google.cloud.dialogflow.cx.v3.EntityType.redact] is + // enabled. + bool redact = 11; + } + + // Parameters to collect from the user. + repeated Parameter parameters = 1; +} + +// An event handler specifies an [event][google.cloud.dialogflow.cx.v3.EventHandler.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`][google.cloud.dialogflow.cx.v3.EventHandler.trigger_fulfillment] associated with +// the event, it will be called. +// * If there is a [`target_page`][google.cloud.dialogflow.cx.v3.EventHandler.target_page] associated +// with the event, the session will transition into the specified page. +// * If there is a [`target_flow`][google.cloud.dialogflow.cx.v3.EventHandler.target_flow] associated +// with the event, the session will transition into the specified flow. +message EventHandler { + // Output only. The unique identifier of this event handler. + string name = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The name of the event to handle. + string event = 4 [(google.api.field_behavior) = REQUIRED]; + + // 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. + Fulfillment trigger_fulfillment = 5; + + // The target to transition to, either a page in the same host flow (the flow + // that owns this [TransitionRoute][google.cloud.dialogflow.cx.v3.TransitionRoute]), or another flow in the same agent. + oneof target { + // The target page to transition to. + // Format: `projects//locations//agents//flows//pages/`. + string target_page = 2 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Page" + }]; + + // The target flow to transition to. + // Format: `projects//locations//agents//flows/`. + string target_flow = 3 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Flow" + }]; + } +} + +// A transition route specifies a [intent][google.cloud.dialogflow.cx.v3.Intent] that can be matched and/or a +// data condition that can be evaluated during a session. When a specified +// transition is matched, the following actions are taken in order: +// +// * If there is a +// [`trigger_fulfillment`][google.cloud.dialogflow.cx.v3.TransitionRoute.trigger_fulfillment] associated with +// the transition, it will be called. +// * If there is a [`target_page`][google.cloud.dialogflow.cx.v3.TransitionRoute.target_page] associated +// with the transition, the session will transition into the specified page. +// * If there is a [`target_flow`][google.cloud.dialogflow.cx.v3.TransitionRoute.target_flow] associated +// with the transition, the session will transition into the specified flow. +message TransitionRoute { + // Output only. The unique identifier of this transition route. + string name = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The unique identifier of an [Intent][google.cloud.dialogflow.cx.v3.Intent]. + // Format: `projects//locations//agents//intents/`. + // Indicates that the transition can only happen when the given intent is + // matched. + // At least one of `intent` or `condition` must be specified. When both + // `intent` and `condition` are specified, the transition can only happen + // when both are fulfilled. + string intent = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Intent" + }]; + + // The condition to evaluate against [form parameters][google.cloud.dialogflow.cx.v3.Form.parameters] or + // [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters]. + // + // See the [conditions + // reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). + // At least one of `intent` or `condition` must be specified. When both + // `intent` and `condition` are specified, the transition can only happen + // when both are fulfilled. + string condition = 2; + + // The fulfillment to call when the condition is satisfied. At least one of + // `trigger_fulfillment` and `target` must be specified. When both are + // defined, `trigger_fulfillment` is executed first. + Fulfillment trigger_fulfillment = 3; + + // The target to transition to, either a page in the same host flow (the flow + // that owns this [TransitionRoute][google.cloud.dialogflow.cx.v3.TransitionRoute]), or another flow in the same agent. + oneof target { + // The target page to transition to. + // Format: `projects//locations//agents//flows//pages/`. + string target_page = 4 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Page" + }]; + + // The target flow to transition to. + // Format: `projects//locations//agents//flows/`. + string target_flow = 5 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Flow" + }]; + } +} + +// The request message for [Pages.ListPages][google.cloud.dialogflow.cx.v3.Pages.ListPages]. +message ListPagesRequest { + // Required. The flow to list all pages for. + // Format: `projects//locations//agents//flows/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Page" + } + ]; + + // The language to list pages for. The following fields are language + // dependent: + // + // * `Page.entry_fulfillment.messages` + // * `Page.entry_fulfillment.conditional_cases` + // * `Page.event_handlers.trigger_fulfillment.messages` + // * `Page.event_handlers.trigger_fulfillment.conditional_cases` + // * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + // * + // `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + // * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + // * + // `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + // * `Page.transition_routes.trigger_fulfillment.messages` + // * `Page.transition_routes.trigger_fulfillment.conditional_cases` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + string language_code = 2; + + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 3; + + // The next_page_token value returned from a previous list request. + string page_token = 4; +} + +// The response message for [Pages.ListPages][google.cloud.dialogflow.cx.v3.Pages.ListPages]. +message ListPagesResponse { + // The list of pages. There will be a maximum number of items returned based + // on the page_size field in the request. + repeated Page pages = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for [Pages.GetPage][google.cloud.dialogflow.cx.v3.Pages.GetPage]. +message GetPageRequest { + // Required. The name of the page. + // Format: `projects//locations//agents//flows//pages/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Page" + } + ]; + + // The language to retrieve the page for. The following fields are language + // dependent: + // + // * `Page.entry_fulfillment.messages` + // * `Page.entry_fulfillment.conditional_cases` + // * `Page.event_handlers.trigger_fulfillment.messages` + // * `Page.event_handlers.trigger_fulfillment.conditional_cases` + // * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + // * + // `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + // * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + // * + // `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + // * `Page.transition_routes.trigger_fulfillment.messages` + // * `Page.transition_routes.trigger_fulfillment.conditional_cases` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + string language_code = 2; +} + +// The request message for [Pages.CreatePage][google.cloud.dialogflow.cx.v3.Pages.CreatePage]. +message CreatePageRequest { + // Required. The flow to create a page for. + // Format: `projects//locations//agents//flows/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Page" + } + ]; + + // Required. The page to create. + Page page = 2 [(google.api.field_behavior) = REQUIRED]; + + // The language of the following fields in `page`: + // + // * `Page.entry_fulfillment.messages` + // * `Page.entry_fulfillment.conditional_cases` + // * `Page.event_handlers.trigger_fulfillment.messages` + // * `Page.event_handlers.trigger_fulfillment.conditional_cases` + // * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + // * + // `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + // * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + // * + // `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + // * `Page.transition_routes.trigger_fulfillment.messages` + // * `Page.transition_routes.trigger_fulfillment.conditional_cases` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + string language_code = 3; +} + +// The request message for [Pages.UpdatePage][google.cloud.dialogflow.cx.v3.Pages.UpdatePage]. +message UpdatePageRequest { + // Required. The page to update. + Page page = 1 [(google.api.field_behavior) = REQUIRED]; + + // The language of the following fields in `page`: + // + // * `Page.entry_fulfillment.messages` + // * `Page.entry_fulfillment.conditional_cases` + // * `Page.event_handlers.trigger_fulfillment.messages` + // * `Page.event_handlers.trigger_fulfillment.conditional_cases` + // * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages` + // * + // `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.conditional_cases` + // * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages` + // * + // `Page.form.parameters.fill_behavior.reprompt_event_handlers.conditional_cases` + // * `Page.transition_routes.trigger_fulfillment.messages` + // * `Page.transition_routes.trigger_fulfillment.conditional_cases` + // + // If not specified, the agent's default language is used. + // [Many + // languages](https://cloud.google.com/dialogflow/cx/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + string language_code = 2; + + // The mask to control which fields get updated. If the mask is not present, + // all fields will be updated. + google.protobuf.FieldMask update_mask = 3; +} + +// The request message for [Pages.DeletePage][google.cloud.dialogflow.cx.v3.Pages.DeletePage]. +message DeletePageRequest { + // Required. The name of the page to delete. + // Format: `projects//locations//agents//Flows//pages/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Page" + } + ]; + + // This field has no effect for pages with no incoming transitions. + // For pages with incoming transitions: + // + // * If `force` is set to false, an error will be returned with message + // indicating the incoming transitions. + // * If `force` is set to true, Dialogflow will remove the page, as well as + // any transitions to the page (i.e. [Target + // page][EventHandler.target_page] in event handlers or [Target + // page][TransitionRoute.target_page] in transition routes that point to + // this page will be cleared). + bool force = 2; +} diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/response_message.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/response_message.proto new file mode 100644 index 00000000000..72a235714cd --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/response_message.proto @@ -0,0 +1,220 @@ +// Copyright 2022 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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/field_behavior.proto"; +import "google/protobuf/struct.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx"; +option java_multiple_files = true; +option java_outer_classname = "ResponseMessageProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; + +// Represents a response message that can be returned by a conversational agent. +// +// Response messages are also used for output audio synthesis. The approach is +// as follows: +// +// * If at least one OutputAudioText response is present, then all +// OutputAudioText responses are linearly concatenated, and the result is used +// for output audio synthesis. +// * If the OutputAudioText responses are a mixture of text and SSML, then the +// concatenated result is treated as SSML; otherwise, the result is treated as +// either text or SSML as appropriate. The agent designer should ideally use +// either text or SSML consistently throughout the bot design. +// * Otherwise, all Text responses are linearly concatenated, and the result is +// used for output audio synthesis. +// +// This approach allows for more sophisticated user experience scenarios, where +// the text displayed to the user may differ from what is heard. +message ResponseMessage { + // The text response message. + message Text { + // Required. A collection of text responses. + repeated string text = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Whether the playback of this message can be interrupted by the end + // user's speech and the client can then starts the next Dialogflow + // request. + bool allow_playback_interruption = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Indicates that the conversation should be handed off to a live agent. + // + // Dialogflow only uses this to determine which conversations were handed off + // to a human agent for measurement purposes. What else to do with this signal + // is up to you and your handoff procedures. + // + // You may set this, for example: + // * In the [entry_fulfillment][google.cloud.dialogflow.cx.v3.Page.entry_fulfillment] of a [Page][google.cloud.dialogflow.cx.v3.Page] if + // entering the page indicates something went extremely wrong in the + // conversation. + // * In a webhook response when you determine that the customer issue can only + // be handled by a human. + message LiveAgentHandoff { + // Custom metadata for your handoff procedure. Dialogflow doesn't impose + // any structure on this. + google.protobuf.Struct metadata = 1; + } + + // Indicates that the conversation succeeded, i.e., the bot handled the issue + // that the customer talked to it about. + // + // Dialogflow only uses this to determine which conversations should be + // counted as successful and doesn't process the metadata in this message in + // any way. Note that Dialogflow also considers conversations that get to the + // conversation end page as successful even if they don't return + // [ConversationSuccess][google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess]. + // + // You may set this, for example: + // * In the [entry_fulfillment][google.cloud.dialogflow.cx.v3.Page.entry_fulfillment] of a [Page][google.cloud.dialogflow.cx.v3.Page] if + // entering the page indicates that the conversation succeeded. + // * In a webhook response when you determine that you handled the customer + // issue. + message ConversationSuccess { + // Custom metadata. Dialogflow doesn't impose any structure on this. + google.protobuf.Struct metadata = 1; + } + + // A text or ssml response that is preferentially used for TTS output audio + // synthesis, as described in the comment on the ResponseMessage message. + message OutputAudioText { + // The source, which is either plain text or SSML. + oneof source { + // The raw text to be synthesized. + string text = 1; + + // The SSML text to be synthesized. For more information, see + // [SSML](/speech/text-to-speech/docs/ssml). + string ssml = 2; + } + + // Output only. Whether the playback of this message can be interrupted by the end + // user's speech and the client can then starts the next Dialogflow + // request. + bool allow_playback_interruption = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Indicates that interaction with the Dialogflow agent has ended. + // This message is generated by Dialogflow only and not supposed to be + // defined by the user. + message EndInteraction { + + } + + // Specifies an audio clip to be played by the client as part of the response. + message PlayAudio { + // Required. URI of the audio clip. Dialogflow does not impose any validation on this + // value. It is specific to the client that reads it. + string audio_uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Whether the playback of this message can be interrupted by the end + // user's speech and the client can then starts the next Dialogflow + // request. + bool allow_playback_interruption = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Represents an audio message that is composed of both segments + // synthesized from the Dialogflow agent prompts and ones hosted externally + // at the specified URIs. + // The external URIs are specified via + // [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio]. + // This message is generated by Dialogflow only and not supposed to be + // defined by the user. + message MixedAudio { + // Represents one segment of audio. + message Segment { + // Content of the segment. + oneof content { + // Raw audio synthesized from the Dialogflow agent's response using + // the output config specified in the request. + bytes audio = 1; + + // Client-specific URI that points to an audio clip accessible to the + // client. Dialogflow does not impose any validation on it. + string uri = 2; + } + + // Output only. Whether the playback of this segment can be interrupted by the end + // user's speech and the client should then start the next Dialogflow + // request. + bool allow_playback_interruption = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Segments this audio response is composed of. + repeated Segment segments = 1; + } + + // Represents the signal that telles the client to transfer the phone call + // connected to the agent to a third-party endpoint. + message TelephonyTransferCall { + // Endpoint to transfer the call to. + oneof endpoint { + // Transfer the call to a phone number + // in [E.164 format](https://en.wikipedia.org/wiki/E.164). + string phone_number = 1; + } + } + + // Required. The rich response message. + oneof message { + // Returns a text response. + Text text = 1; + + // Returns a response containing a custom, platform-specific payload. + google.protobuf.Struct payload = 2; + + // Indicates that the conversation succeeded. + ConversationSuccess conversation_success = 9; + + // A text or ssml response that is preferentially used for TTS output audio + // synthesis, as described in the comment on the ResponseMessage message. + OutputAudioText output_audio_text = 8; + + // Hands off conversation to a human agent. + LiveAgentHandoff live_agent_handoff = 10; + + // Output only. A signal that indicates the interaction with the Dialogflow agent has + // ended. + // This message is generated by Dialogflow only when the conversation + // reaches `END_SESSION` page. It is not supposed to be defined by the user. + // + // It's guaranteed that there is at most one such message in each response. + EndInteraction end_interaction = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Signal that the client should play an audio clip hosted at a + // client-specific URI. Dialogflow uses this to construct + // [mixed_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.mixed_audio]. However, Dialogflow itself + // does not try to read or process the URI in any way. + PlayAudio play_audio = 12; + + // Output only. An audio response message composed of both the synthesized Dialogflow + // agent responses and responses defined via + // [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio]. + // This message is generated by Dialogflow only and not supposed to be + // defined by the user. + MixedAudio mixed_audio = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A signal that the client should transfer the phone call connected to + // this agent to a third-party endpoint. + TelephonyTransferCall telephony_transfer_call = 18; + } +} diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/security_settings.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/security_settings.proto new file mode 100644 index 00000000000..0c9c0942a53 --- /dev/null +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/security_settings.proto @@ -0,0 +1,359 @@ +// Copyright 2022 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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx"; +option java_multiple_files = true; +option java_outer_classname = "SecuritySettingsProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3"; +option (google.api.resource_definition) = { + type: "dlp.googleapis.com/InspectTemplate" + pattern: "organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}" + pattern: "projects/{project}/locations/{location}/inspectTemplates/{inspect_template}" +}; +option (google.api.resource_definition) = { + type: "dlp.googleapis.com/DeidentifyTemplate" + pattern: "organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}" + pattern: "projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}" +}; + +// Service for managing security settings for Dialogflow. +service SecuritySettingsService { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Create security settings in the specified location. + rpc CreateSecuritySettings(CreateSecuritySettingsRequest) returns (SecuritySettings) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*}/securitySettings" + body: "security_settings" + }; + option (google.api.method_signature) = "parent,security_settings"; + } + + // Retrieves the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. + // The returned settings may be stale by up to 1 minute. + rpc GetSecuritySettings(GetSecuritySettingsRequest) returns (SecuritySettings) { + option (google.api.http) = { + get: "/v3/{name=projects/*/locations/*/securitySettings/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. + rpc UpdateSecuritySettings(UpdateSecuritySettingsRequest) returns (SecuritySettings) { + option (google.api.http) = { + patch: "/v3/{security_settings.name=projects/*/locations/*/securitySettings/*}" + body: "security_settings" + }; + option (google.api.method_signature) = "security_settings,update_mask"; + } + + // Returns the list of all security settings in the specified location. + rpc ListSecuritySettings(ListSecuritySettingsRequest) returns (ListSecuritySettingsResponse) { + option (google.api.http) = { + get: "/v3/{parent=projects/*/locations/*}/securitySettings" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. + rpc DeleteSecuritySettings(DeleteSecuritySettingsRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3/{name=projects/*/locations/*/securitySettings/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// The request message for [SecuritySettingsService.GetSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.GetSecuritySettings]. +message GetSecuritySettingsRequest { + // Required. Resource name of the settings. + // Format: `projects//locations//securitySettings/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/SecuritySettings" + } + ]; +} + +// The request message for [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettings]. +message UpdateSecuritySettingsRequest { + // Required. [SecuritySettings] object that contains values for each of the + // fields to update. + SecuritySettings security_settings = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The mask to control which fields get updated. If the mask is not present, + // all fields will be updated. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [SecuritySettings.ListSecuritySettings][]. +message ListSecuritySettingsRequest { + // Required. The location to list all security settings for. + // Format: `projects//locations/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/SecuritySettings" + } + ]; + + // The maximum number of items to return in a single page. By default 20 and + // at most 100. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// The response message for [SecuritySettings.ListSecuritySettings][]. +message ListSecuritySettingsResponse { + // The list of security settings. + repeated SecuritySettings security_settings = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for [SecuritySettings.CreateSecuritySettings][]. +message CreateSecuritySettingsRequest { + // Required. The location to create an [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] for. + // Format: `projects//locations/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/SecuritySettings" + } + ]; + + // Required. The security settings to create. + SecuritySettings security_settings = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for [SecuritySettings.DeleteSecuritySettings][]. +message DeleteSecuritySettingsRequest { + // Required. The name of the [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] to delete. + // Format: `projects//locations//securitySettings/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/SecuritySettings" + } + ]; +} + +// Represents the settings related to security issues, such as data redaction +// and data retention. It may take hours for updates on the settings to +// propagate to all the related components and take effect. +message SecuritySettings { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/SecuritySettings" + pattern: "projects/{project}/locations/{location}/securitySettings/{security_settings}" + }; + + // Defines how we redact data. + enum RedactionStrategy { + // Do not redact. + REDACTION_STRATEGY_UNSPECIFIED = 0; + + // Call redaction service to clean up the data to be persisted. + REDACT_WITH_SERVICE = 1; + } + + // Defines what types of data to redact. + enum RedactionScope { + // Don't redact any kind of data. + REDACTION_SCOPE_UNSPECIFIED = 0; + + // On data to be written to disk or similar devices that are capable of + // holding data even if power is disconnected. This includes data that are + // temporarily saved on disk. + REDACT_DISK_STORAGE = 2; + } + + // Type of data we purge after retention settings triggers purge. + enum PurgeDataType { + // Unspecified. Do not use. + PURGE_DATA_TYPE_UNSPECIFIED = 0; + + // Dialogflow history. This does not include Cloud logging, which is + // owned by the user - not Dialogflow. + DIALOGFLOW_HISTORY = 1; + } + + // Settings for exporting audio. + message AudioExportSettings { + // File format for exported audio file. Currently only in telephony + // recordings. + enum AudioFormat { + // Unspecified. Do not use. + AUDIO_FORMAT_UNSPECIFIED = 0; + + // G.711 mu-law PCM with 8kHz sample rate. + MULAW = 1; + + // MP3 file format. + MP3 = 2; + + // OGG Vorbis. + OGG = 3; + } + + // Cloud Storage bucket to export audio record to. + // Setting this field would grant the Storage Object Creator role to + // the Dialogflow Service Agent. + // API caller that tries to modify this field should have the permission of + // storage.buckets.setIamPolicy. + string gcs_bucket = 1; + + // Filename pattern for exported audio. + string audio_export_pattern = 2; + + // Enable audio redaction if it is true. + bool enable_audio_redaction = 3; + + // File format for exported audio file. Currently only in telephony + // recordings. + AudioFormat audio_format = 4; + } + + // Settings for exporting conversations to + // [Insights](https://cloud.google.com/contact-center/insights/docs). + message InsightsExportSettings { + // If enabled, we will automatically exports + // conversations to Insights and Insights runs its analyzers. + bool enable_insights_export = 1; + } + + // Resource name of the settings. + // Required for the [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettings] method. + // [SecuritySettingsService.CreateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.CreateSecuritySettings] populates the name + // automatically. + // Format: `projects//locations//securitySettings/`. + string name = 1; + + // Required. The human-readable name of the security settings, unique within the + // location. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Strategy that defines how we do redaction. + RedactionStrategy redaction_strategy = 3; + + // Defines the data for which Dialogflow applies redaction. Dialogflow does + // not redact data that it does not have access to – for example, Cloud + // logging. + RedactionScope redaction_scope = 4; + + // [DLP](https://cloud.google.com/dlp/docs) inspect template name. Use this + // template to define inspect base settings. + // + // The `DLP Inspect Templates Reader` role is needed on the Dialogflow + // service identity service account (has the form + // `service-PROJECT_NUMBER@gcp-sa-dialogflow.iam.gserviceaccount.com`) + // for your agent's project. + // + // If empty, we use the default DLP inspect config. + // + // The template name will have one of the following formats: + // `projects//locations//inspectTemplates/