├── .eslintignore ├── .eslintrc.json ├── .gitignore ├── .mocharc.js ├── .prettierignore ├── .prettierrc.js ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── package.json ├── protos ├── google │ └── actions │ │ └── sdk │ │ └── v2 │ │ ├── account_linking.proto │ │ ├── account_linking_secret.proto │ │ ├── action.proto │ │ ├── actions_sdk.proto │ │ ├── actions_testing.proto │ │ ├── config_file.proto │ │ ├── conversation │ │ ├── intent.proto │ │ ├── prompt │ │ │ ├── content │ │ │ │ ├── canvas.proto │ │ │ │ ├── card.proto │ │ │ │ ├── collection.proto │ │ │ │ ├── content.proto │ │ │ │ ├── image.proto │ │ │ │ ├── link.proto │ │ │ │ ├── list.proto │ │ │ │ ├── media.proto │ │ │ │ └── table.proto │ │ │ ├── prompt.proto │ │ │ ├── simple.proto │ │ │ └── suggestion.proto │ │ └── scene.proto │ │ ├── data_file.proto │ │ ├── event_logs.proto │ │ ├── files.proto │ │ ├── interactionmodel │ │ ├── conditional_event.proto │ │ ├── entity_set.proto │ │ ├── event_handler.proto │ │ ├── global_intent_event.proto │ │ ├── intent.proto │ │ ├── intent_event.proto │ │ ├── prompt │ │ │ ├── content │ │ │ │ ├── static_canvas_prompt.proto │ │ │ │ ├── static_card_prompt.proto │ │ │ │ ├── static_collection_browse_prompt.proto │ │ │ │ ├── static_collection_prompt.proto │ │ │ │ ├── static_content_prompt.proto │ │ │ │ ├── static_image_prompt.proto │ │ │ │ ├── static_link_prompt.proto │ │ │ │ ├── static_list_prompt.proto │ │ │ │ ├── static_media_prompt.proto │ │ │ │ └── static_table_prompt.proto │ │ │ ├── static_prompt.proto │ │ │ ├── static_simple_prompt.proto │ │ │ ├── suggestion.proto │ │ │ └── surface_capabilities.proto │ │ ├── scene.proto │ │ ├── slot.proto │ │ └── type │ │ │ ├── class_reference.proto │ │ │ ├── entity_display.proto │ │ │ ├── free_text_type.proto │ │ │ ├── regular_expression_type.proto │ │ │ ├── synonym_type.proto │ │ │ └── type.proto │ │ ├── localized_settings.proto │ │ ├── manifest.proto │ │ ├── release_channel.proto │ │ ├── settings.proto │ │ ├── surface.proto │ │ ├── theme_customization.proto │ │ ├── validation_results.proto │ │ ├── version.proto │ │ └── webhook.proto ├── protos.d.ts ├── protos.js └── protos.json ├── src ├── index.ts └── v2 │ ├── actions_sdk_client.ts │ ├── actions_sdk_client_config.json │ ├── actions_sdk_proto_list.json │ ├── actions_testing_client.ts │ ├── actions_testing_client_config.json │ ├── actions_testing_proto_list.json │ └── index.ts ├── synth.metadata ├── synth.py ├── system-test ├── fixtures │ └── sample │ │ └── src │ │ ├── index.js │ │ └── index.ts └── install.ts ├── test ├── gapic_actions_sdk_v2.ts └── gapic_actions_testing_v2.ts ├── tsconfig.json └── webpack.config.js /.eslintignore: -------------------------------------------------------------------------------- 1 | **/node_modules 2 | **/.coverage 3 | build/ 4 | docs/ 5 | protos/ 6 | system-test/ 7 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./node_modules/gts" 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/*.log 2 | **/node_modules 3 | .coverage 4 | coverage 5 | .nyc_output 6 | docs/ 7 | out/ 8 | build/ 9 | system-test/secrets.js 10 | system-test/*key.json 11 | *.lock 12 | .DS_Store 13 | package-lock.json 14 | __pycache__ 15 | -------------------------------------------------------------------------------- /.mocharc.js: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | // ** This file is automatically generated by gapic-generator-typescript. ** 16 | // ** https://github.com/googleapis/gapic-generator-typescript ** 17 | // ** All changes to this file may be overwritten. ** 18 | 19 | const config = { 20 | "enable-source-maps": true, 21 | "throw-deprecation": true, 22 | "timeout": 10000 23 | } 24 | if (process.env.MOCHA_THROW_DEPRECATION === 'false') { 25 | delete config['throw-deprecation']; 26 | } 27 | if (process.env.MOCHA_REPORTER) { 28 | config.reporter = process.env.MOCHA_REPORTER; 29 | } 30 | if (process.env.MOCHA_REPORTER_OUTPUT) { 31 | config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; 32 | } 33 | module.exports = config 34 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | **/node_modules 2 | **/coverage 3 | test/fixtures 4 | build/ 5 | docs/ 6 | protos/ 7 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | // ** This file is automatically generated by gapic-generator-typescript. ** 16 | // ** https://github.com/googleapis/gapic-generator-typescript ** 17 | // ** All changes to this file may be overwritten. ** 18 | 19 | 20 | module.exports = { 21 | ...require('gts/.prettierrc.json') 22 | } 23 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to become a contributor and submit your own code 2 | 3 | **Table of contents** 4 | 5 | * [Contributor License Agreements](#contributor-license-agreements) 6 | * [Contributing a patch](#contributing-a-patch) 7 | * [Running the tests](#running-the-tests) 8 | * [Releasing the library](#releasing-the-library) 9 | 10 | ## Contributor License Agreements 11 | 12 | We'd love to accept your sample apps and patches! Before we can take them, we 13 | have to jump a couple of legal hurdles. 14 | 15 | Please fill out either the individual or corporate Contributor License Agreement 16 | (CLA). 17 | 18 | * If you are an individual writing original source code and you're sure you 19 | own the intellectual property, then you'll need to sign an [individual CLA](https://developers.google.com/open-source/cla/individual). 20 | * If you work for a company that wants to allow you to contribute your work, 21 | then you'll need to sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate). 22 | 23 | Follow either of the two links above to access the appropriate CLA and 24 | instructions for how to sign and return it. Once we receive it, we'll be able to 25 | accept your pull requests. 26 | 27 | ## Contributing A Patch 28 | 29 | 1. Submit an issue describing your proposed change to the repo in question. 30 | 1. The repo owner will respond to your issue promptly. 31 | 1. If your proposed change is accepted, and you haven't already done so, sign a 32 | Contributor License Agreement (see details above). 33 | 1. Fork the desired repo, develop and test your code changes. 34 | 1. Ensure that your code adheres to the existing style in the code to which 35 | you are contributing. 36 | 1. Ensure that your code has an appropriate set of tests which all pass. 37 | 1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. 38 | 1. Submit a pull request. 39 | 40 | ## Running the tests 41 | 42 | 1. [Prepare your environment for Node.js setup][setup]. 43 | 44 | 1. Install dependencies: 45 | 46 | npm install 47 | 48 | 1. Run the tests: 49 | 50 | # Run unit tests. 51 | npm test 52 | 53 | # Run sample integration tests. 54 | gcloud auth application-default login 55 | npm run samples-test 56 | 57 | # Run all system tests. 58 | gcloud auth application-default login 59 | npm run system-test 60 | 61 | 1. Lint (and maybe fix) any changes: 62 | 63 | npm run fix 64 | 65 | [setup]: https://cloud.google.com/nodejs/docs/setup 66 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Actions API Node.js Client Library 2 | 3 | *:warning: Warning: Conversational Actions will be deprecated on June 13, 2023. For more information, see [Conversational Actions Sunset](https://goo.gle/ca-sunset).* 4 | 5 | 6 | This library provides an easy way to call the Actions API. The library wraps the [Actions API](https://developers.google.com/assistant/actions/api/reference/rest). 7 | 8 | ## Quickstart 9 | 10 | ### Installing the client library 11 | 12 | ```bash 13 | npm install @assistant/actions 14 | ``` 15 | 16 | ### Using the client library 17 | 18 | The code below makes a call to the [sendInteraction](https://developers.google.com/assistant/actions/api/reference/rest/v2/projects/sendInteraction) endpoint to play one round of conversation of a user's Action, using the provided query text: 19 | 20 | ```javascript 21 | import {ActionsTestingClient} from '@assistant/actions'; 22 | 23 | /** 24 | * Make request to Actions API to send a query to an Action for the 25 | * given project ID. 26 | */ 27 | async function sendInteraction(projectId = 'your-project-id', queryText = 'example query text') { 28 | const request = { 29 | parent: `projects/${projectId}`, 30 | input: {query: queryText} 31 | }; 32 | // Create client 33 | const actionsTestingClient = new ActionsTestingClient(); 34 | // Send request to sendInteraction endpoint to play one round of conversation 35 | const res = await actionsTestingClient.sendInteraction(request); 36 | return res[0]; 37 | } 38 | ``` 39 | 40 | The code below makes a call to the [writePreview](https://developers.google.com/assistant/actions/api/reference/rest/v2/projects.preview/write) endpoint to updates a user's project preview from draft: 41 | 42 | ```javascript 43 | import {ActionsSdkClient} from '@assistant/actions'; 44 | 45 | /** 46 | * Make request to Actions API to write preview from draft for the 47 | * given project ID. 48 | */ 49 | async function writePreviewFromDraft(projectId = 'your-project-id') { 50 | // Create request payload 51 | const request = { 52 | parent: `projects/${projectId}`, 53 | reviewSettings: {sandbox: {value: true}}, 54 | draft: {} 55 | }; 56 | const [responsePromise, responseCallback] = getStreamResponsePromise(); 57 | // Create client 58 | const actionsSdkClient = new ActionsSdkClient(); 59 | // Send write preview request to stream endpoint 60 | const writePreviewStream = actionsSdkClient.writePreview(responseCallback); 61 | writePreviewStream.write(request); 62 | writePreviewStream.end(); 63 | return await responsePromise; 64 | } 65 | 66 | /** Gets a resonse promise and callback for a stream request. */ 67 | function getStreamResponsePromise() { 68 | let writeSuccess: any, writeFailure: any; 69 | const responsePromise = new Promise((resolve, reject) => { 70 | writeSuccess = resolve; 71 | writeFailure = reject; 72 | }); 73 | const responseCallback = (err: any, resp: any) => { 74 | !err ? writeSuccess(resp) : writeFailure(err); 75 | } 76 | return [responsePromise, responseCallback] 77 | } 78 | ``` 79 | 80 | ## References & Issues 81 | + Questions? Go to [StackOverflow](https://stackoverflow.com/questions/tagged/actions-on-google) or [Assistant Developer Community on Reddit](https://www.reddit.com/r/GoogleAssistantDev/). 82 | + For bugs, please report an issue on Github. 83 | + Actions on Google [Documentation](https://developers.google.com/assistant) 84 | + Actions on Google [Codelabs](https://codelabs.developers.google.com/?cat=Assistant). 85 | 86 | ## Make Contributions 87 | Please read and follow the steps in the [CONTRIBUTING.md](CONTRIBUTING.md). 88 | 89 | ## License 90 | See [LICENSE](LICENSE). -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@assistant/actions", 3 | "version": "1.1.0", 4 | "description": "Actions API client for Node.js", 5 | "repository": "actions-on-google/assistant-actions-nodejs", 6 | "license": "Apache-2.0", 7 | "author": "Google LLC", 8 | "main": "build/src/index.js", 9 | "files": [ 10 | "build/src", 11 | "build/protos" 12 | ], 13 | "keywords": [ 14 | "google apis client", 15 | "google api client", 16 | "google apis", 17 | "google api", 18 | "google", 19 | "google sdk", 20 | "sdk", 21 | "actions sdk", 22 | "actions testing" 23 | ], 24 | "scripts": { 25 | "clean": "gts clean", 26 | "compile": "tsc -p . && cp -r protos build/", 27 | "compile-protos": "compileProtos src", 28 | "fix": "gts fix", 29 | "lint": "gts check", 30 | "prepare": "npm run compile-protos && npm run compile", 31 | "system-test": "c8 mocha build/system-test", 32 | "test": "c8 mocha build/test" 33 | }, 34 | "dependencies": { 35 | "google-gax": "^2.12.0" 36 | }, 37 | "devDependencies": { 38 | "@types/mocha": "^8.2.2", 39 | "@types/node": "^14.14.44", 40 | "@types/sinon": "^10.0.0", 41 | "c8": "^7.7.2", 42 | "gts": "^3.1.0", 43 | "jsdoc": "^3.6.6", 44 | "jsdoc-fresh": "^1.0.2", 45 | "jsdoc-region-tag": "^1.0.6", 46 | "linkinator": "^2.13.6", 47 | "mocha": "^8.4.0", 48 | "null-loader": "^4.0.1", 49 | "pack-n-play": "^1.0.0-2", 50 | "sinon": "^10.0.0", 51 | "ts-loader": "^9.1.2", 52 | "typescript": "^4.2.4", 53 | "webpack": "^5.36.2", 54 | "webpack-cli": "^4.7.0" 55 | }, 56 | "engines": { 57 | "node": ">=v10.24.0" 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/account_linking.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2; 18 | 19 | import "google/api/field_behavior.proto"; 20 | 21 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk"; 22 | option java_multiple_files = true; 23 | option java_outer_classname = "AccountLinkingProto"; 24 | option java_package = "com.google.actions.sdk.v2"; 25 | 26 | // AccountLinking allows Google to guide the user to sign-in to the App's web 27 | // services. 28 | // 29 | // For Google Sign In and OAuth + Google Sign In linking types, Google generates 30 | // a client ID identifying your App to Google ("Client ID issued by Google to 31 | // your Actions" on Console UI). This field is read-only and can be checked by 32 | // navigating to the Console UI's Account Linking page. 33 | // See: https://developers.google.com/assistant/identity/google-sign-in 34 | // 35 | // Note: For all account linking setting types (except for Google Sign In), you 36 | // must provide a username and password for a test account in 37 | // Settings.testing_instructions for the review team to review the app (they 38 | // will not be visible to users). 39 | message AccountLinking { 40 | // The type of Account Linking to perform. 41 | enum LinkingType { 42 | // Unspecified. 43 | LINKING_TYPE_UNSPECIFIED = 0; 44 | 45 | // Google Sign In linking type. 46 | // If using this linking type, no OAuth-related fields need to be set below. 47 | GOOGLE_SIGN_IN = 1; 48 | 49 | // OAuth and Google Sign In linking type. 50 | OAUTH_AND_GOOGLE_SIGN_IN = 2; 51 | 52 | // OAuth linking type. 53 | OAUTH = 3; 54 | } 55 | 56 | // The OAuth2 grant type Google uses to guide the user to sign in to your 57 | // App's web service. 58 | enum AuthGrantType { 59 | // Unspecified. 60 | AUTH_GRANT_TYPE_UNSPECIFIED = 0; 61 | 62 | // Authorization code grant. Requires you to provide both 63 | // authentication URL and access token URL. 64 | AUTH_CODE = 1; 65 | 66 | // Implicit code grant. Only requires you to provide authentication 67 | // URL. 68 | IMPLICIT = 2; 69 | } 70 | 71 | // Required. If `true`, users are allowed to sign up for new accounts via voice. 72 | // If `false`, account creation is only allowed on your website. Select this 73 | // option if you want to display your terms of service or obtain user consents 74 | // during sign-up. 75 | // linking_type cannot be GOOGLE_SIGN_IN when this is `false`. 76 | // linking_type cannot be OAUTH when this is `true`. 77 | bool enable_account_creation = 1 [(google.api.field_behavior) = REQUIRED]; 78 | 79 | // Required. The linking type to use. 80 | // See https://developers.google.com/assistant/identity for further details on 81 | // the linking types. 82 | LinkingType linking_type = 2 [(google.api.field_behavior) = REQUIRED]; 83 | 84 | // Optional. Indicates the type of authentication for OAUTH linking_type. 85 | AuthGrantType auth_grant_type = 3 [(google.api.field_behavior) = OPTIONAL]; 86 | 87 | // Optional. Client ID issued by your App to Google. 88 | // This is the OAuth2 Client ID identifying Google to your service. 89 | // Only set when using OAuth. 90 | string app_client_id = 4 [(google.api.field_behavior) = OPTIONAL]; 91 | 92 | // Optional. Endpoint for your sign-in web page that supports OAuth2 code or 93 | // implicit flows. 94 | // URL must use HTTPS. 95 | // Only set when using OAuth. 96 | string authorization_url = 5 [(google.api.field_behavior) = OPTIONAL]; 97 | 98 | // Optional. OAuth2 endpoint for token exchange. 99 | // URL must use HTTPS. 100 | // This is not set when only using OAuth with IMPLICIT grant as the 101 | // linking type. 102 | // Only set when using OAuth. 103 | string token_url = 6 [(google.api.field_behavior) = OPTIONAL]; 104 | 105 | // Optional. List of permissions the user must consent to in order to use 106 | // your service. 107 | // Only set when using OAuth. 108 | // Make sure to provide a Terms of Service in the directory information in 109 | // LocalizedSettings.terms_of_service_url section if specifying this field. 110 | repeated string scopes = 7 [(google.api.field_behavior) = OPTIONAL]; 111 | 112 | // Optional. This is the web page on your service which describes the 113 | // permissions the user is granting to Google. 114 | // Only set if using OAuth and Google Sign In. 115 | // Make sure to provide a Terms of Service in the directory information in 116 | // LocalizedSettings.terms_of_service_url section if specifying this field. 117 | string learn_more_url = 8 [(google.api.field_behavior) = OPTIONAL]; 118 | 119 | // Optional. If true, allow Google to transmit client ID and secret via HTTP 120 | // basic auth header. Otherwise, Google uses the client ID and secret inside 121 | // the post body. 122 | // Only set when using OAuth. 123 | // Make sure to provide a Terms of Service in the directory information in 124 | // LocalizedSettings.terms_of_service_url section if specifying this field. 125 | bool use_basic_auth_header = 9 [(google.api.field_behavior) = OPTIONAL]; 126 | } 127 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/account_linking_secret.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2; 18 | 19 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk"; 20 | option java_multiple_files = true; 21 | option java_outer_classname = "AccountLinkingSecretProto"; 22 | option java_package = "com.google.actions.sdk.v2"; 23 | 24 | // Information about the encrypted OAuth client secret used in account linking 25 | // flows (for AUTH_CODE grant type). 26 | message AccountLinkingSecret { 27 | // Encrypted account linking client secret ciphertext. 28 | bytes encrypted_client_secret = 1; 29 | 30 | // The version of the crypto key used to encrypt the account linking client 31 | // secret. 32 | // Note that this field is ignored in push, preview, and version creation 33 | // flows. 34 | string encryption_key_version = 2; 35 | } 36 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/action.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2; 18 | 19 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk"; 20 | option java_multiple_files = true; 21 | option java_outer_classname = "ActionProto"; 22 | option java_package = "com.google.actions.sdk.v2"; 23 | 24 | // Represents the list of Actions defined in a project. 25 | message Actions { 26 | // Defines the engagement mechanisms associated with this action. This 27 | // allows end users to subscribe to push notification and daily update. 28 | message Engagement { 29 | // Defines push notification settings that this engagement supports. 30 | message PushNotification { 31 | 32 | } 33 | 34 | // Defines daily update settings that this engagement supports. 35 | message DailyUpdate { 36 | 37 | } 38 | 39 | // Indicates whether sharing links is enabled for this action and the 40 | // corresponding settings. Action links are used to deep link a user into a 41 | // specific action. 42 | // ActionLink is deprecated. Use AssistantLink instead. 43 | message ActionLink { 44 | option deprecated = true; 45 | 46 | // User friendly display title for the link. 47 | string title = 1; 48 | } 49 | 50 | // Indicates whether sharing links is enabled for this action and the 51 | // corresponding settings. Assistant links are used to deep link a user into 52 | // a specific action. 53 | message AssistantLink { 54 | // User friendly display title for the link. 55 | string title = 1; 56 | } 57 | 58 | // The title of the engagement that will be sent to end users asking for 59 | // their permission to receive updates. The prompt sent to end users for 60 | // daily updates will look like "What time would you like me to send your 61 | // daily {title}" and for push notifications will look like 62 | // "Is it ok if I send push notifications for {title}". 63 | // **This field is localizable.** 64 | string title = 1; 65 | 66 | // Push notification settings that this engagement supports. 67 | PushNotification push_notification = 2; 68 | 69 | // Recurring update settings that this engagement supports. 70 | oneof recurring_update { 71 | // Daily update settings that this engagement supports. 72 | DailyUpdate daily_update = 3; 73 | } 74 | 75 | // Link config for an action which determines whether sharing links is 76 | // enabled for the action and if so, contains the user friendly display name 77 | // for the link. 78 | // ActionLink is deprecated. Use AssistantLink instead. 79 | ActionLink action_link = 4 [deprecated = true]; 80 | 81 | // Link config for an action which determines whether sharing links is 82 | // enabled for the action and if so, contains the user friendly display name 83 | // for the link. 84 | AssistantLink assistant_link = 6; 85 | } 86 | 87 | // Details regarding a custom action. 88 | message CustomAction { 89 | // Engagement mechanisms associated with the action to help end users 90 | // subscribe to push notifications and daily updates. 91 | // Note that the intent name specified in daily updates/push notifications 92 | // slot config needs to match the intent corresponding to this action for 93 | // end users to subscribe to these updates. 94 | Engagement engagement = 2; 95 | } 96 | 97 | // Map from intents to custom Actions to configure invocation for the project. 98 | // The invocation intents could either be system or custom intents defined 99 | // in the "custom/intents/" package. All intents defined here (system 100 | // intents & custom intents) must have a corresponding intent file in the 101 | // "custom/global/" package. 102 | map custom = 3; 103 | } 104 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/actions_testing.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2; 18 | 19 | import "google/actions/sdk/v2/conversation/intent.proto"; 20 | import "google/actions/sdk/v2/conversation/prompt/content/canvas.proto"; 21 | import "google/actions/sdk/v2/conversation/prompt/prompt.proto"; 22 | import "google/actions/sdk/v2/event_logs.proto"; 23 | import "google/api/annotations.proto"; 24 | import "google/api/client.proto"; 25 | import "google/api/field_behavior.proto"; 26 | import "google/protobuf/empty.proto"; 27 | import "google/type/latlng.proto"; 28 | 29 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk"; 30 | option java_multiple_files = true; 31 | option java_outer_classname = "ActionsTestingProto"; 32 | option java_package = "com.google.actions.sdk.v2"; 33 | 34 | // Actions Testing API which allows developers to run automated tests. 35 | service ActionsTesting { 36 | option (google.api.default_host) = "actions.googleapis.com"; 37 | 38 | // Plays one round of the conversation. 39 | rpc SendInteraction(SendInteractionRequest) returns (SendInteractionResponse) { 40 | option (google.api.http) = { 41 | post: "/v2/{project=projects/*}:sendInteraction" 42 | body: "*" 43 | }; 44 | } 45 | 46 | // Finds the intents that match a given query. 47 | rpc MatchIntents(MatchIntentsRequest) returns (MatchIntentsResponse) { 48 | option (google.api.http) = { 49 | post: "/v2/{project=projects/*}:matchIntents" 50 | body: "*" 51 | }; 52 | option (google.api.method_signature) = "project,query,locale"; 53 | } 54 | 55 | // Sets the Web & App Activity control on a service account. 56 | // 57 | // It is necessary to have this setting enabled in order to use call Actions. 58 | // The setting is originally disabled for service accounts, and it is 59 | // preserved until set to a different value. This means it only needs to be 60 | // enabled once per account (and not necessarily once per test), unless it is 61 | // later disabled. 62 | // 63 | // Returns an error if the caller is not a service account. User accounts can 64 | // change this setting via the Activity Controls page. See 65 | // https://support.google.com/websearch/answer/54068. 66 | rpc SetWebAndAppActivityControl(SetWebAndAppActivityControlRequest) returns (google.protobuf.Empty) { 67 | option (google.api.http) = { 68 | post: "/v2:setWebAndAppActivityControl" 69 | body: "*" 70 | }; 71 | option (google.api.method_signature) = "enabled"; 72 | } 73 | } 74 | 75 | // Request for playing a round of the conversation. 76 | message SendInteractionRequest { 77 | // Required. The project being tested, indicated by the Project ID. 78 | // Format: projects/{project} 79 | string project = 1 [(google.api.field_behavior) = REQUIRED]; 80 | 81 | // Required. Input provided by the user. 82 | UserInput input = 2 [(google.api.field_behavior) = REQUIRED]; 83 | 84 | // Required. Properties of the device used for interacting with the Action. 85 | DeviceProperties device_properties = 3 [(google.api.field_behavior) = REQUIRED]; 86 | 87 | // Opaque token that must be passed as received from SendInteractionResponse 88 | // on the previous interaction. This can be left unset in order to start a new 89 | // conversation, either as the first interaction of a testing session or to 90 | // abandon a previous conversation and start a new one. 91 | string conversation_token = 4; 92 | } 93 | 94 | // User input provided on a conversation round. 95 | message UserInput { 96 | // Indicates the input source, typed query or voice query. 97 | enum InputType { 98 | // Unspecified input source. 99 | INPUT_TYPE_UNSPECIFIED = 0; 100 | 101 | // Query from a GUI interaction. 102 | TOUCH = 1; 103 | 104 | // Voice query. 105 | VOICE = 2; 106 | 107 | // Typed query. 108 | KEYBOARD = 3; 109 | 110 | // The action was triggered by a URL link. 111 | URL = 4; 112 | } 113 | 114 | // Content of the input sent by the user. 115 | string query = 1; 116 | 117 | // Type of the input. 118 | InputType type = 2; 119 | } 120 | 121 | // Properties of device relevant to a conversation round. 122 | message DeviceProperties { 123 | // Possible surfaces used to interact with the Action. 124 | // Additional values may be included in the future. 125 | enum Surface { 126 | // Default value. This value is unused. 127 | SURFACE_UNSPECIFIED = 0; 128 | 129 | // Speaker (e.g. Google Home). 130 | SPEAKER = 1; 131 | 132 | // Phone. 133 | PHONE = 2; 134 | 135 | // Allo Chat. 136 | ALLO = 3; 137 | 138 | // Smart Display Device. 139 | SMART_DISPLAY = 4; 140 | 141 | // KaiOS. 142 | KAI_OS = 5; 143 | } 144 | 145 | // Surface used for interacting with the Action. 146 | Surface surface = 1; 147 | 148 | // Device location such as latitude, longitude, and formatted address. 149 | Location location = 2; 150 | 151 | // Locale as set on the device. 152 | // The format should follow BCP 47: https://tools.ietf.org/html/bcp47 153 | // Examples: en, en-US, es-419 (more examples at 154 | // https://tools.ietf.org/html/bcp47#appendix-A). 155 | string locale = 3; 156 | 157 | // Time zone as set on the device. 158 | // The format should follow the IANA Time Zone Database, e.g. 159 | // "America/New_York": https://www.iana.org/time-zones 160 | string time_zone = 4; 161 | } 162 | 163 | // Container that represents a location. 164 | message Location { 165 | // Geo coordinates. 166 | // Requires the [DEVICE_PRECISE_LOCATION] 167 | // [google.actions.v2.Permission.DEVICE_PRECISE_LOCATION] permission. 168 | google.type.LatLng coordinates = 1; 169 | 170 | // Display address, e.g., "1600 Amphitheatre Pkwy, Mountain View, CA 94043". 171 | // Requires the [DEVICE_PRECISE_LOCATION] 172 | // [google.actions.v2.Permission.DEVICE_PRECISE_LOCATION] permission. 173 | string formatted_address = 2; 174 | 175 | // Zip code. 176 | // Requires the [DEVICE_PRECISE_LOCATION] 177 | // [google.actions.v2.Permission.DEVICE_PRECISE_LOCATION] or 178 | // [DEVICE_COARSE_LOCATION] 179 | // [google.actions.v2.Permission.DEVICE_COARSE_LOCATION] permission. 180 | string zip_code = 3; 181 | 182 | // City. 183 | // Requires the [DEVICE_PRECISE_LOCATION] 184 | // [google.actions.v2.Permission.DEVICE_PRECISE_LOCATION] or 185 | // [DEVICE_COARSE_LOCATION] 186 | // [google.actions.v2.Permission.DEVICE_COARSE_LOCATION] permission. 187 | string city = 4; 188 | } 189 | 190 | // Response to a round of the conversation. 191 | message SendInteractionResponse { 192 | // Output provided to the user. 193 | Output output = 1; 194 | 195 | // Diagnostics information that explains how the request was handled. 196 | Diagnostics diagnostics = 2; 197 | 198 | // Opaque token to be set on SendInteractionRequest on the next RPC call in 199 | // order to continue the same conversation. 200 | string conversation_token = 3; 201 | } 202 | 203 | // User-visible output to the conversation round. 204 | message Output { 205 | // Spoken response sent to user as a plain string. 206 | string text = 1; 207 | 208 | // Speech content produced by the Action. This may include markup elements 209 | // such as SSML. 210 | repeated string speech = 2; 211 | 212 | // Interactive Canvas content. 213 | google.actions.sdk.v2.conversation.Canvas canvas = 3; 214 | 215 | // State of the prompt at the end of the conversation round. 216 | // More information about the prompt: 217 | // https://developers.google.com/assistant/conversational/prompts 218 | google.actions.sdk.v2.conversation.Prompt actions_builder_prompt = 4; 219 | } 220 | 221 | // Diagnostics information related to the conversation round. 222 | message Diagnostics { 223 | // List of events with details about processing of the conversation round 224 | // throughout the stages of the Actions Builder interaction model. 225 | // Populated for Actions Builder & Actions SDK apps only. 226 | repeated ExecutionEvent actions_builder_events = 1; 227 | } 228 | 229 | // Request for finding matching intents. 230 | message MatchIntentsRequest { 231 | // Required. The project being tested, indicated by the Project ID. 232 | // Format: projects/{project} 233 | string project = 1 [(google.api.field_behavior) = REQUIRED]; 234 | 235 | // Required. User query as plain text. 236 | string query = 2 [(google.api.field_behavior) = REQUIRED]; 237 | 238 | // Required. Locale to use to evaluate the query, such as "en". 239 | // The format should follow BCP 47: https://tools.ietf.org/html/bcp47 240 | // See the list of supported languages in 241 | // https://developers.google.com/assistant/console/languages-locales 242 | string locale = 3 [(google.api.field_behavior) = REQUIRED]; 243 | } 244 | 245 | // Response for finding matching intents. 246 | message MatchIntentsResponse { 247 | // Intents matched, ordered from most to least relevant. Only the first 248 | // 50 matches are returned. 249 | repeated google.actions.sdk.v2.conversation.Intent matched_intents = 1; 250 | } 251 | 252 | // Request for setting Web & App Activity preferences. 253 | message SetWebAndAppActivityControlRequest { 254 | // Whether the setting should be set to an enabled or disabled state. 255 | bool enabled = 1; 256 | } 257 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/config_file.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2; 18 | 19 | import "google/actions/sdk/v2/account_linking_secret.proto"; 20 | import "google/actions/sdk/v2/action.proto"; 21 | import "google/actions/sdk/v2/interactionmodel/entity_set.proto"; 22 | import "google/actions/sdk/v2/interactionmodel/global_intent_event.proto"; 23 | import "google/actions/sdk/v2/interactionmodel/intent.proto"; 24 | import "google/actions/sdk/v2/interactionmodel/prompt/static_prompt.proto"; 25 | import "google/actions/sdk/v2/interactionmodel/scene.proto"; 26 | import "google/actions/sdk/v2/interactionmodel/type/type.proto"; 27 | import "google/actions/sdk/v2/manifest.proto"; 28 | import "google/actions/sdk/v2/settings.proto"; 29 | import "google/actions/sdk/v2/webhook.proto"; 30 | import "google/protobuf/struct.proto"; 31 | 32 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk"; 33 | option java_multiple_files = true; 34 | option java_outer_classname = "ConfigFileProto"; 35 | option java_package = "com.google.actions.sdk.v2"; 36 | 37 | // Wrapper for repeated config files. Repeated fields cannot exist in a oneof. 38 | message ConfigFiles { 39 | // Multiple config files. 40 | repeated ConfigFile config_files = 1; 41 | } 42 | 43 | // Represents a single file which contains structured data. Developers can 44 | // define most of their project using structured config including Actions, 45 | // Settings, Fulfillment. 46 | message ConfigFile { 47 | // Relative path of the config file from the project root in the SDK file 48 | // structure. Each file types below have an allowed file path. 49 | // Eg: settings/settings.yaml 50 | string file_path = 1; 51 | 52 | // Each type of config file should have a corresponding field in the oneof. 53 | oneof file { 54 | // Single manifest file. 55 | // Allowed file path: `manifest.yaml` 56 | Manifest manifest = 2; 57 | 58 | // Single actions file with all the actions defined. 59 | // Allowed file paths: `actions/{language}?/actions.yaml` 60 | Actions actions = 3; 61 | 62 | // Single settings config which includes non-localizable settings and 63 | // settings for the project's default locale (if specified). 64 | // For a locale override file, only localized_settings field will be 65 | // populated. 66 | // Allowed file paths: `settings/{language}?/settings.yaml` 67 | // Note that the non-localized settings file `settings/settings.yaml` must 68 | // be present in the write flow requests. 69 | Settings settings = 4; 70 | 71 | // Single webhook definition. 72 | // Allowed file path: `webhooks/{WebhookName}.yaml` 73 | Webhook webhook = 6; 74 | 75 | // Single intent definition. 76 | // Allowed file paths: `custom/intents/{language}?/{IntentName}.yaml` 77 | google.actions.sdk.v2.interactionmodel.Intent intent = 7; 78 | 79 | // Single type definition. 80 | // Allowed file paths: `custom/types/{language}?/{TypeName}.yaml` 81 | google.actions.sdk.v2.interactionmodel.type.Type type = 8; 82 | 83 | // Single entity set definition. 84 | // Allowed file paths: `custom/entitySets/{language}?/{EntitySetName}.yaml` 85 | google.actions.sdk.v2.interactionmodel.EntitySet entity_set = 15; 86 | 87 | // Single global intent event definition. 88 | // Allowed file paths: `custom/global/{GlobalIntentEventName}.yaml` 89 | // The file name (GlobalIntentEventName) should be the name of the intent 90 | // that this global intent event corresponds to. 91 | google.actions.sdk.v2.interactionmodel.GlobalIntentEvent global_intent_event = 9; 92 | 93 | // Single scene definition. 94 | // Allowed file paths: `custom/scenes/{SceneName}.yaml` 95 | google.actions.sdk.v2.interactionmodel.Scene scene = 10; 96 | 97 | // Single static prompt definition. 98 | // Allowed file paths: `custom/prompts/{language}?/{StaticPromptName}.yaml` 99 | google.actions.sdk.v2.interactionmodel.prompt.StaticPrompt static_prompt = 11; 100 | 101 | // Metadata corresponding to the client secret used in account linking. 102 | // Allowed file path: `settings/accountLinkingSecret.yaml` 103 | AccountLinkingSecret account_linking_secret = 13; 104 | 105 | // Single resource bundle, which is a map from a string to a string or list 106 | // of strings. Resource bundles could be used for localizing strings in 107 | // static prompts. 108 | // Allowed file paths: `resources/strings/{language}?/{multiple 109 | // directories}?/{BundleName}.yaml` 110 | google.protobuf.Struct resource_bundle = 12; 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/conversation/intent.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.conversation; 18 | 19 | import "google/protobuf/struct.proto"; 20 | 21 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation"; 22 | option java_multiple_files = true; 23 | option java_outer_classname = "IntentProto"; 24 | option java_package = "com.google.actions.sdk.v2.conversation"; 25 | 26 | // Represents an intent. 27 | message Intent { 28 | // Required. The name of the last matched intent. 29 | string name = 1; 30 | 31 | // Required. Represents parameters identified as part of intent matching. 32 | // This is a map of the name of the identified parameter to the value of the 33 | // parameter identified from user input. All parameters defined in 34 | // the matched intent that are identified will be surfaced here. 35 | map params = 2; 36 | 37 | // Optional. Typed or spoken input from the end user that matched this intent. 38 | // This will be populated when an intent is matched, based on the user input. 39 | string query = 3; 40 | } 41 | 42 | // Represents a value for intent parameter. 43 | message IntentParameterValue { 44 | // Required. Original text value extracted from user utterance. 45 | string original = 1; 46 | 47 | // Required. Structured value for parameter extracted from user input. 48 | // This will only be populated if the parameter is defined in the matched 49 | // intent and the value of the parameter could be identified during intent 50 | // matching. 51 | google.protobuf.Value resolved = 2; 52 | } 53 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/conversation/prompt/content/canvas.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.conversation; 18 | 19 | import "google/protobuf/struct.proto"; 20 | 21 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation"; 22 | option java_multiple_files = true; 23 | option java_outer_classname = "CanvasProto"; 24 | option java_package = "com.google.actions.sdk.v2.conversation"; 25 | 26 | // Represents an Interactive Canvas response to be sent to the user. 27 | // This can be used in conjunction with the "first_simple" field in the 28 | // containing prompt to speak to the user in addition to displaying a 29 | // interactive canvas response. The maximum size of the response is 50k bytes. 30 | message Canvas { 31 | // URL of the interactive canvas web app to load. If not set, the url from 32 | // current active canvas will be reused. 33 | string url = 1; 34 | 35 | // Optional. JSON data to be passed through to the immersive experience 36 | // web page as an event. 37 | // If the "override" field in the containing prompt is "false" data values 38 | // defined in this Canvas prompt will be added after data values defined in 39 | // previous Canvas prompts. 40 | repeated google.protobuf.Value data = 4; 41 | 42 | // Optional. Default value: false. 43 | bool suppress_mic = 3; 44 | 45 | // If `true` the canvas application occupies the full screen and won't 46 | // have a header at the top. A toast message will also be displayed on the 47 | // loading screen that includes the Action's display name, the developer's 48 | // name, and instructions for exiting the Action. Default value: `false`. 49 | bool enable_full_screen = 8; 50 | } 51 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/conversation/prompt/content/card.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.conversation; 18 | 19 | import "google/actions/sdk/v2/conversation/prompt/content/image.proto"; 20 | import "google/actions/sdk/v2/conversation/prompt/content/link.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "CardProto"; 25 | option java_package = "com.google.actions.sdk.v2.conversation"; 26 | 27 | // A basic card for displaying some information, e.g. an image and/or text. 28 | message Card { 29 | // Overall title of the card. 30 | // Optional. 31 | string title = 1; 32 | 33 | // Optional. 34 | string subtitle = 2; 35 | 36 | // Body text of the card. 37 | // Supports a limited set of markdown syntax for formatting. 38 | // Required, unless image is present. 39 | string text = 3; 40 | 41 | // A hero image for the card. The height is fixed to 192dp. 42 | // Optional. 43 | Image image = 4; 44 | 45 | // How the image background will be filled. Optional. 46 | Image.ImageFill image_fill = 5; 47 | 48 | // Button. 49 | // Optional. 50 | Link button = 6; 51 | } 52 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/conversation/prompt/content/collection.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.conversation; 18 | 19 | import "google/actions/sdk/v2/conversation/prompt/content/image.proto"; 20 | 21 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation"; 22 | option java_multiple_files = true; 23 | option java_outer_classname = "CollectionProto"; 24 | option java_package = "com.google.actions.sdk.v2.conversation"; 25 | 26 | // A card for presenting a collection of options to select from. 27 | message Collection { 28 | // An item in the collection 29 | message CollectionItem { 30 | // Required. The NLU key that matches the entry key name in the associated 31 | // Type. 32 | string key = 1; 33 | } 34 | 35 | // Title of the collection. Optional. 36 | string title = 1; 37 | 38 | // Subtitle of the collection. Optional. 39 | string subtitle = 2; 40 | 41 | // min: 2 max: 10 42 | repeated CollectionItem items = 3; 43 | 44 | // How the image backgrounds of collection items will be filled. Optional. 45 | Image.ImageFill image_fill = 4; 46 | } 47 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/conversation/prompt/content/content.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.conversation; 18 | 19 | import "google/actions/sdk/v2/conversation/prompt/content/canvas.proto"; 20 | import "google/actions/sdk/v2/conversation/prompt/content/card.proto"; 21 | import "google/actions/sdk/v2/conversation/prompt/content/collection.proto"; 22 | import "google/actions/sdk/v2/conversation/prompt/content/image.proto"; 23 | import "google/actions/sdk/v2/conversation/prompt/content/list.proto"; 24 | import "google/actions/sdk/v2/conversation/prompt/content/media.proto"; 25 | import "google/actions/sdk/v2/conversation/prompt/content/table.proto"; 26 | 27 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation"; 28 | option java_multiple_files = true; 29 | option java_outer_classname = "ContentProto"; 30 | option java_package = "com.google.actions.sdk.v2.conversation"; 31 | 32 | // Content to be shown. 33 | message Content { 34 | // Content. 35 | oneof content { 36 | // A basic card. 37 | Card card = 1; 38 | 39 | // An image. 40 | Image image = 2; 41 | 42 | // Table card. 43 | Table table = 3; 44 | 45 | // Response indicating a set of media to be played. 46 | Media media = 4; 47 | 48 | // A response to be used for interactive canvas experience. 49 | Canvas canvas = 5 [deprecated = true]; 50 | 51 | // A card presenting a collection of options to select from. 52 | Collection collection = 6; 53 | 54 | // A card presenting a list of options to select from. 55 | List list = 7; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/conversation/prompt/content/image.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.conversation; 18 | 19 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation"; 20 | option java_multiple_files = true; 21 | option java_outer_classname = "ImageProto"; 22 | option java_package = "com.google.actions.sdk.v2.conversation"; 23 | 24 | // An image displayed in the card. 25 | message Image { 26 | // Possible image display options for affecting the presentation of the image. 27 | // This should be used for when the image's aspect ratio does not match the 28 | // image container's aspect ratio. 29 | enum ImageFill { 30 | // Unspecified image fill. 31 | UNSPECIFIED = 0; 32 | 33 | // Fill the gaps between the image and the image container with gray bars. 34 | GRAY = 1; 35 | 36 | // Fill the gaps between the image and the image container with white bars. 37 | WHITE = 2; 38 | 39 | // Image is scaled such that the image width and height match or exceed the 40 | // container dimensions. This may crop the top and bottom of the image if 41 | // the scaled image height is greater than the container height, or crop the 42 | // left and right of the image if the scaled image width is greater than the 43 | // container width. This is similar to "Zoom Mode" on a widescreen TV when 44 | // playing a 4:3 video. 45 | CROPPED = 3; 46 | } 47 | 48 | // The source url of the image. Images can be JPG, PNG and GIF (animated and 49 | // non-animated). For example,`https://www.agentx.com/logo.png`. Required. 50 | string url = 1; 51 | 52 | // A text description of the image to be used for accessibility, e.g. screen 53 | // readers. 54 | // Required. 55 | string alt = 2; 56 | 57 | // The height of the image in pixels. 58 | // Optional. 59 | int32 height = 3; 60 | 61 | // The width of the image in pixels. 62 | // Optional. 63 | int32 width = 4; 64 | } 65 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/conversation/prompt/content/link.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.conversation; 18 | 19 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation"; 20 | option java_multiple_files = true; 21 | option java_outer_classname = "LinkProto"; 22 | option java_package = "com.google.actions.sdk.v2.conversation"; 23 | 24 | // Link content. 25 | message Link { 26 | // Name of the link 27 | string name = 1; 28 | 29 | // What happens when a user opens the link 30 | OpenUrl open = 2; 31 | } 32 | 33 | // Action taken when a user opens a link. 34 | message OpenUrl { 35 | // The url field which could be any of: 36 | // - http/https urls for opening an App-linked App or a webpage 37 | string url = 1; 38 | 39 | // Indicates a hint for the url type. 40 | UrlHint hint = 2; 41 | } 42 | 43 | // Different types of url hints. 44 | enum UrlHint { 45 | // Unspecified 46 | LINK_UNSPECIFIED = 0; 47 | 48 | // URL that points directly to AMP content, or to a canonical URL 49 | // which refers to AMP content via . 50 | AMP = 1; 51 | } 52 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/conversation/prompt/content/list.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.conversation; 18 | 19 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation"; 20 | option java_multiple_files = true; 21 | option java_outer_classname = "ListProto"; 22 | option java_package = "com.google.actions.sdk.v2.conversation"; 23 | 24 | // A card for presenting a list of options to select from. 25 | message List { 26 | // An item in the list 27 | message ListItem { 28 | // Required. The NLU key that matches the entry key name in the associated 29 | // Type. 30 | string key = 1; 31 | } 32 | 33 | // Title of the list. Optional. 34 | string title = 1; 35 | 36 | // Subtitle of the list. Optional. 37 | string subtitle = 2; 38 | 39 | // min: 2 max: 30 40 | repeated ListItem items = 3; 41 | } 42 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/conversation/prompt/content/media.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.conversation; 18 | 19 | import "google/actions/sdk/v2/conversation/prompt/content/image.proto"; 20 | import "google/protobuf/duration.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "MediaProto"; 25 | option java_package = "com.google.actions.sdk.v2.conversation"; 26 | 27 | // Represents one media object. 28 | // Contains information about the media, such as name, description, url, etc. 29 | message Media { 30 | // Media type of this response. 31 | enum MediaType { 32 | // Unspecified media type. 33 | MEDIA_TYPE_UNSPECIFIED = 0; 34 | 35 | // Audio file. 36 | AUDIO = 1; 37 | 38 | // Response to acknowledge a media status report. 39 | MEDIA_STATUS_ACK = 2; 40 | } 41 | 42 | // Optional media control types the media response can support 43 | enum OptionalMediaControls { 44 | // Unspecified value 45 | OPTIONAL_MEDIA_CONTROLS_UNSPECIFIED = 0; 46 | 47 | // Paused event. Triggered when user pauses the media. 48 | PAUSED = 1; 49 | 50 | // Stopped event. Triggered when user exits out of 3p session during media 51 | // play. 52 | STOPPED = 2; 53 | } 54 | 55 | // Media type. 56 | MediaType media_type = 8; 57 | 58 | // Start offset of the first media object. 59 | google.protobuf.Duration start_offset = 5; 60 | 61 | // Optional media control types this media response session can support. 62 | // If set, request will be made to 3p when a certain media event happens. 63 | // If not set, 3p must still handle two default control type, FINISHED and 64 | // FAILED. 65 | repeated OptionalMediaControls optional_media_controls = 6; 66 | 67 | // List of Media Objects 68 | repeated MediaObject media_objects = 7; 69 | } 70 | 71 | // Represents a single media object 72 | message MediaObject { 73 | // Name of this media object. 74 | string name = 1; 75 | 76 | // Description of this media object. 77 | string description = 2; 78 | 79 | // The url pointing to the media content. 80 | string url = 3; 81 | 82 | // Image to show with the media card. 83 | MediaImage image = 4; 84 | } 85 | 86 | // Image to show with the media card. 87 | message MediaImage { 88 | // Image. 89 | oneof image { 90 | // A large image, such as the cover of the album, etc. 91 | Image large = 1; 92 | 93 | // A small image icon displayed on the right from the title. 94 | // It's resized to 36x36 dp. 95 | Image icon = 2; 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/conversation/prompt/content/table.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.conversation; 18 | 19 | import "google/actions/sdk/v2/conversation/prompt/content/image.proto"; 20 | import "google/actions/sdk/v2/conversation/prompt/content/link.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "TableProto"; 25 | option java_package = "com.google.actions.sdk.v2.conversation"; 26 | 27 | // A table card for displaying a table of text. 28 | message Table { 29 | // Overall title of the table. Optional but must be set if subtitle is set. 30 | string title = 1; 31 | 32 | // Subtitle for the table. Optional. 33 | string subtitle = 2; 34 | 35 | // Image associated with the table. Optional. 36 | Image image = 4; 37 | 38 | // Headers and alignment of columns. 39 | repeated TableColumn columns = 5; 40 | 41 | // Row data of the table. The first 3 rows are guaranteed to be shown but 42 | // others might be cut on certain surfaces. Please test with the simulator to 43 | // see which rows will be shown for a given surface. On surfaces that support 44 | // the WEB_BROWSER capability, you can point the user to 45 | // a web page with more data. 46 | repeated TableRow rows = 6; 47 | 48 | // Button. 49 | Link button = 7; 50 | } 51 | 52 | // Describes a column in a table. 53 | message TableColumn { 54 | // The alignment of the content within the cell. 55 | enum HorizontalAlignment { 56 | // Unspecified horizontal alignment. 57 | UNSPECIFIED = 0; 58 | 59 | // Leading edge of the cell. This is the default. 60 | LEADING = 1; 61 | 62 | // Content is aligned to the center of the column. 63 | CENTER = 2; 64 | 65 | // Content is aligned to the trailing edge of the column. 66 | TRAILING = 3; 67 | } 68 | 69 | // Header text for the column. 70 | string header = 1; 71 | 72 | // Horizontal alignment of content w.r.t column. If unspecified, content 73 | // will be aligned to the leading edge. 74 | HorizontalAlignment align = 2; 75 | } 76 | 77 | // Describes a cell in a row. 78 | message TableCell { 79 | // Text content of the cell. 80 | string text = 1; 81 | } 82 | 83 | // Describes a row in the table. 84 | message TableRow { 85 | // Cells in this row. The first 3 cells are guaranteed to be shown but 86 | // others might be cut on certain surfaces. Please test with the simulator 87 | // to see which cells will be shown for a given surface. 88 | repeated TableCell cells = 1; 89 | 90 | // Indicates whether there should be a divider after each row. 91 | bool divider = 2; 92 | } 93 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/conversation/prompt/prompt.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.conversation; 18 | 19 | import "google/actions/sdk/v2/conversation/prompt/content/canvas.proto"; 20 | import "google/actions/sdk/v2/conversation/prompt/content/content.proto"; 21 | import "google/actions/sdk/v2/conversation/prompt/content/link.proto"; 22 | import "google/actions/sdk/v2/conversation/prompt/simple.proto"; 23 | import "google/actions/sdk/v2/conversation/prompt/suggestion.proto"; 24 | 25 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation"; 26 | option java_multiple_files = true; 27 | option java_outer_classname = "PromptProto"; 28 | option java_package = "com.google.actions.sdk.v2.conversation"; 29 | 30 | // Represent a response to a user. 31 | message Prompt { 32 | // Optional. Mode for how this messages should be merged with previously 33 | // defined messages. 34 | // "false" will clear all previously defined messages (first and last 35 | // simple, content, suggestions link and canvas) and add messages defined in 36 | // this prompt. 37 | // "true" will add messages defined in this prompt to messages defined in 38 | // previous responses. Setting this field to "true" will also enable appending 39 | // to some fields inside Simple prompts, the Suggestion prompt and the Canvas 40 | // prompt (part of the Content prompt). The Content and Link messages will 41 | // always be overwritten if defined in the prompt. 42 | // Default value is "false". 43 | bool append = 1 [deprecated = true]; 44 | 45 | // Optional. Mode for how this messages should be merged with previously 46 | // defined messages. 47 | // "true" clears all previously defined messages (first and last 48 | // simple, content, suggestions link and canvas) and adds messages defined in 49 | // this prompt. 50 | // "false" adds messages defined in this prompt to messages defined in 51 | // previous responses. Leaving this field to "false" also enables 52 | // appending to some fields inside Simple prompts, the Suggestions prompt, 53 | // and the Canvas prompt (part of the Content prompt). The Content and Link 54 | // messages are always overwritten if defined in the prompt. Default 55 | // value is "false". 56 | bool override = 8; 57 | 58 | // Optional. The first voice and text-only response. 59 | Simple first_simple = 2; 60 | 61 | // Optional. A content like a card, list or media to display to the user. 62 | Content content = 3; 63 | 64 | // Optional. The last voice and text-only response. 65 | Simple last_simple = 4; 66 | 67 | // Optional. Suggestions to be displayed to the user which will always appear 68 | // at the end of the response. 69 | // If the "override" field in the containing prompt is "false", the titles 70 | // defined in this field will be added to titles defined in any previously 71 | // defined suggestions prompts and duplicate values will be removed. 72 | repeated Suggestion suggestions = 5; 73 | 74 | // Optional. An additional suggestion chip that can link out to the associated app 75 | // or site. 76 | // The chip will be rendered with the title "Open ". Max 20 chars. 77 | Link link = 6; 78 | 79 | // Optional. Represents a Interactive Canvas response to be sent to the user. 80 | Canvas canvas = 9; 81 | } 82 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/conversation/prompt/simple.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.conversation; 18 | 19 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation"; 20 | option java_multiple_files = true; 21 | option java_outer_classname = "SimpleProto"; 22 | option java_package = "com.google.actions.sdk.v2.conversation"; 23 | 24 | // Represents a simple prompt to be send to a user. 25 | message Simple { 26 | // Optional. Represents the speech to be spoken to the user. Can be SSML or 27 | // text to speech. 28 | // If the "override" field in the containing prompt is "true", the speech 29 | // defined in this field replaces the previous Simple prompt's speech. 30 | string speech = 1; 31 | 32 | // Optional text to display in the chat bubble. If not given, a display 33 | // rendering of the speech field above will be used. Limited to 640 34 | // chars. 35 | // If the "override" field in the containing prompt is "true", the text 36 | // defined in this field replaces to the previous Simple prompt's text. 37 | string text = 2; 38 | } 39 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/conversation/prompt/suggestion.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.conversation; 18 | 19 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation"; 20 | option java_multiple_files = true; 21 | option java_outer_classname = "SuggestionProto"; 22 | option java_package = "com.google.actions.sdk.v2.conversation"; 23 | 24 | // Input suggestion to be presented to the user. 25 | message Suggestion { 26 | // Required. The text shown in the suggestion chip. When tapped, this text will be 27 | // posted back to the conversation verbatim as if the user had typed it. 28 | // Each title must be unique among the set of suggestion chips. 29 | // Max 25 chars 30 | string title = 1; 31 | } 32 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/conversation/scene.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.conversation; 18 | 19 | import "google/actions/sdk/v2/conversation/prompt/prompt.proto"; 20 | import "google/protobuf/struct.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "SceneProto"; 25 | option java_package = "com.google.actions.sdk.v2.conversation"; 26 | 27 | // Represents the current status of slot filling. 28 | enum SlotFillingStatus { 29 | // Fallback value when the usage field is not populated. 30 | UNSPECIFIED = 0; 31 | 32 | // The slots have been initialized but slot filling has not started. 33 | INITIALIZED = 1; 34 | 35 | // The slot values are being collected. 36 | COLLECTING = 2; 37 | 38 | // All slot values are final and cannot be changed. 39 | FINAL = 4; 40 | } 41 | 42 | // Represents a slot. 43 | message Slot { 44 | // Represents the mode of a slot, that is, if it is required or not. 45 | enum SlotMode { 46 | // Fallback value when the usage field is not populated. 47 | MODE_UNSPECIFIED = 0; 48 | 49 | // Indicates that the slot is not required to complete slot filling. 50 | OPTIONAL = 1; 51 | 52 | // Indicates that the slot is required to complete slot filling. 53 | REQUIRED = 2; 54 | } 55 | 56 | // Represents the status of a slot. 57 | enum SlotStatus { 58 | // Fallback value when the usage field is not populated. 59 | SLOT_UNSPECIFIED = 0; 60 | 61 | // Indicates that the slot does not have any values. This status cannot be 62 | // modified through the response. 63 | EMPTY = 1; 64 | 65 | // Indicates that the slot value is invalid. This status can be set 66 | // through the response. 67 | INVALID = 2; 68 | 69 | // Indicates that the slot has a value. This status cannot be modified 70 | // through the response. 71 | FILLED = 3; 72 | } 73 | 74 | // The mode of the slot (required or optional). Can be set by developer. 75 | SlotMode mode = 1; 76 | 77 | // The status of the slot. 78 | SlotStatus status = 2; 79 | 80 | // The value of the slot. Changing this value in the response, will 81 | // modify the value in slot filling. 82 | google.protobuf.Value value = 3; 83 | 84 | // Indicates if the slot value was collected on the last turn. 85 | // This field is read-only. 86 | bool updated = 4; 87 | 88 | // Optional. This prompt is sent to the user when needed to fill a required 89 | // slot. This prompt overrides the existing prompt defined in the console. 90 | // This field is not included in the webhook request. 91 | Prompt prompt = 5; 92 | } 93 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/data_file.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2; 18 | 19 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk"; 20 | option java_multiple_files = true; 21 | option java_outer_classname = "DataFileProto"; 22 | option java_package = "com.google.actions.sdk.v2"; 23 | 24 | // Wrapper for repeated data file. Repeated fields cannot exist in a oneof. 25 | message DataFiles { 26 | // Multiple data files. 27 | repeated DataFile data_files = 1; 28 | } 29 | 30 | // Represents a single file which contains unstructured data. Examples include 31 | // image files, audio files, and cloud function source code. 32 | message DataFile { 33 | // Relative path of the data file from the project root in the SDK file 34 | // structure. 35 | // Allowed file paths: 36 | // - Images: `resources/images/{multiple 37 | // directories}?/{ImageName}.{extension}` 38 | // - Audio: `resources/audio/{multiple 39 | // directories}?/{AudioFileName}.{extension}` 40 | // - Inline Cloud Function Code: `webhooks/{WebhookName}.zip` 41 | // Allowed extensions: 42 | // - Images: `png`, `jpg`, `jpeg` 43 | // - Audio: `mp3`, `mpeg` 44 | // - Inline Cloud Functions: `zip` 45 | string file_path = 1; 46 | 47 | // Required. The content type of this asset. Example: `text/html`. The content 48 | // type must comply with the specification 49 | // (http://www.w3.org/Protocols/rfc1341/4_Content-Type.html). 50 | // Cloud functions must be in zip format and the content type should 51 | // be `application/zip;zip_type=cloud_function`. The zip_type parameter 52 | // indicates that the zip is for a cloud function. 53 | string content_type = 2; 54 | 55 | // Content of the data file. Examples would be raw bytes of images, audio 56 | // files, or cloud function zip format. 57 | // There is 10 MB strict limit on the payload size. 58 | bytes payload = 3; 59 | } 60 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/event_logs.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2; 18 | 19 | import "google/actions/sdk/v2/conversation/intent.proto"; 20 | import "google/actions/sdk/v2/conversation/prompt/prompt.proto"; 21 | import "google/actions/sdk/v2/conversation/scene.proto"; 22 | import "google/protobuf/struct.proto"; 23 | import "google/protobuf/timestamp.proto"; 24 | import "google/rpc/status.proto"; 25 | 26 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk"; 27 | option java_multiple_files = true; 28 | option java_outer_classname = "EventLogsProto"; 29 | option java_package = "com.google.actions.sdk.v2"; 30 | 31 | // Contains information about execution event which happened during processing 32 | // Actions Builder conversation request. For an overview of the stages involved 33 | // in a conversation request, see 34 | // https://developers.google.com/assistant/conversational/actions. 35 | message ExecutionEvent { 36 | // Timestamp when the event happened. 37 | google.protobuf.Timestamp event_time = 1; 38 | 39 | // State of the execution during this event. 40 | ExecutionState execution_state = 2; 41 | 42 | // Resulting status of particular execution step. 43 | google.rpc.Status status = 3; 44 | 45 | // Detailed information specific to different of events that may be involved 46 | // in processing a conversation round. The field set here defines the type of 47 | // this event. 48 | oneof EventData { 49 | // User input handling event. 50 | UserConversationInput user_input = 4; 51 | 52 | // Intent matching event. 53 | IntentMatch intent_match = 5; 54 | 55 | // Condition evaluation event. 56 | ConditionsEvaluated conditions_evaluated = 6; 57 | 58 | // OnSceneEnter execution event. 59 | OnSceneEnter on_scene_enter = 7; 60 | 61 | // Webhook request dispatch event. 62 | WebhookRequest webhook_request = 8; 63 | 64 | // Webhook response receipt event. 65 | WebhookResponse webhook_response = 9; 66 | 67 | // Webhook-initiated transition event. 68 | WebhookInitiatedTransition webhook_initiated_transition = 10; 69 | 70 | // Slot matching event. 71 | SlotMatch slot_match = 11; 72 | 73 | // Slot requesting event. 74 | SlotRequested slot_requested = 12; 75 | 76 | // Slot validation event. 77 | SlotValidated slot_validated = 13; 78 | 79 | // Form filling event. 80 | FormFilled form_filled = 14; 81 | 82 | // Waiting-for-user-input event. 83 | WaitingForUserInput waiting_user_input = 15; 84 | 85 | // End-of-conversation event. 86 | EndConversation end_conversation = 16; 87 | } 88 | 89 | // List of warnings generated during execution of this Event. Warnings are 90 | // tips for the developer discovered during the conversation request. These 91 | // are usually non-critical and do not halt the execution of the request. For 92 | // example, a warnings might be generated when webhook tries to override a 93 | // custom Type which does not exist. Errors are reported as a failed status 94 | // code, but warnings can be present even when the status is OK. 95 | repeated string warning_messages = 17; 96 | } 97 | 98 | // Current state of the execution. 99 | message ExecutionState { 100 | // ID of the scene which is currently active. 101 | string current_scene_id = 1; 102 | 103 | // State of the session storage: 104 | // https://developers.google.com/assistant/conversational/storage-session 105 | google.protobuf.Struct session_storage = 2; 106 | 107 | // State of the slots filling, if applicable: 108 | // https://developers.google.com/assistant/conversational/scenes#slot_filling 109 | Slots slots = 5; 110 | 111 | // Prompt queue: 112 | // https://developers.google.com/assistant/conversational/prompts 113 | repeated google.actions.sdk.v2.conversation.Prompt prompt_queue = 7; 114 | 115 | // State of the user storage: 116 | // https://developers.google.com/assistant/conversational/storage-user 117 | google.protobuf.Struct user_storage = 6; 118 | 119 | // State of the home storage: 120 | // https://developers.google.com/assistant/conversational/storage-home 121 | google.protobuf.Struct household_storage = 8; 122 | } 123 | 124 | // Represents the current state of a the scene's slots. 125 | message Slots { 126 | // The current status of slot filling. 127 | google.actions.sdk.v2.conversation.SlotFillingStatus status = 2; 128 | 129 | // The slots associated with the current scene. 130 | map slots = 3; 131 | } 132 | 133 | // Information related to user input. 134 | message UserConversationInput { 135 | // Type of user input. E.g. keyboard, voice, touch, etc. 136 | string type = 1; 137 | 138 | // Original text input from the user. 139 | string original_query = 2; 140 | } 141 | 142 | // Information about triggered intent match (global or within a scene): 143 | // https://developers.google.com/assistant/conversational/intents 144 | message IntentMatch { 145 | // Intent id which triggered this interaction. 146 | string intent_id = 1; 147 | 148 | // Parameters of intent which triggered this interaction. 149 | map intent_parameters = 5; 150 | 151 | // Name of the handler attached to this interaction. 152 | string handler = 3; 153 | 154 | // Scene to which this interaction leads to. 155 | string next_scene_id = 4; 156 | } 157 | 158 | // Results of conditions evaluation: 159 | // https://developers.google.com/assistant/conversational/scenes#conditions 160 | message ConditionsEvaluated { 161 | // List of conditions which were evaluated to 'false'. 162 | repeated Condition failed_conditions = 1; 163 | 164 | // The first condition which was evaluated to 'true', if any. 165 | Condition success_condition = 2; 166 | } 167 | 168 | // Evaluated condition. 169 | message Condition { 170 | // Expression specified in this condition. 171 | string expression = 1; 172 | 173 | // Handler name specified in evaluated condition. 174 | string handler = 2; 175 | 176 | // Destination scene specified in evaluated condition. 177 | string next_scene_id = 3; 178 | } 179 | 180 | // Information about execution of onSceneEnter stage: 181 | // https://developers.google.com/assistant/conversational/scenes#on_enter 182 | message OnSceneEnter { 183 | // Handler name specified in onSceneEnter event. 184 | string handler = 1; 185 | } 186 | 187 | // Event triggered by destination scene returned from webhook: 188 | // https://developers.google.com/assistant/conversational/webhooks#transition_scenes 189 | message WebhookInitiatedTransition { 190 | // ID of the scene the transition is leading to. 191 | string next_scene_id = 1; 192 | } 193 | 194 | // Information about a request dispatched to the Action webhook: 195 | // https://developers.google.com/assistant/conversational/webhooks#payloads 196 | message WebhookRequest { 197 | // Payload of the webhook request. 198 | string request_json = 1; 199 | } 200 | 201 | // Information about a response received from the Action webhook: 202 | // https://developers.google.com/assistant/conversational/webhooks#payloads 203 | message WebhookResponse { 204 | // Payload of the webhook response. 205 | string response_json = 1; 206 | } 207 | 208 | // Information about matched slot(s): 209 | // https://developers.google.com/assistant/conversational/scenes#slot_filling 210 | message SlotMatch { 211 | // Parameters extracted by NLU from user input. 212 | map nlu_parameters = 2; 213 | } 214 | 215 | // Information about currently requested slot: 216 | // https://developers.google.com/assistant/conversational/scenes#slot_filling 217 | message SlotRequested { 218 | // Name of the requested slot. 219 | string slot = 1; 220 | 221 | // Slot prompt. 222 | google.actions.sdk.v2.conversation.Prompt prompt = 3; 223 | } 224 | 225 | // Event which happens after webhook validation was finished for slot(s): 226 | // https://developers.google.com/assistant/conversational/scenes#slot_filling 227 | message SlotValidated { 228 | 229 | } 230 | 231 | // Event which happens when form is fully filled: 232 | // https://developers.google.com/assistant/conversational/scenes#slot_filling 233 | message FormFilled { 234 | 235 | } 236 | 237 | // Event which happens when system needs user input: 238 | // https://developers.google.com/assistant/conversational/scenes#input 239 | message WaitingForUserInput { 240 | 241 | } 242 | 243 | // Event which informs that conversation with agent was ended. 244 | message EndConversation { 245 | 246 | } 247 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/files.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2; 18 | 19 | import "google/actions/sdk/v2/config_file.proto"; 20 | import "google/actions/sdk/v2/data_file.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "FilesProto"; 25 | option java_package = "com.google.actions.sdk.v2"; 26 | 27 | // Wrapper for a list of files. 28 | message Files { 29 | // Only one type of files can be sent to the server at a time, config files or 30 | // data files. 31 | oneof file_type { 32 | // List of config files. This includes manifest, settings, interaction model 33 | // resource bundles and more. 34 | ConfigFiles config_files = 1; 35 | 36 | // List of data files. This includes image, audio file, cloud function 37 | // source code. 38 | DataFiles data_files = 2; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/conditional_event.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel; 18 | 19 | import "google/actions/sdk/v2/interactionmodel/event_handler.proto"; 20 | import "google/api/field_behavior.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel;interactionmodel"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "ConditionalEventProto"; 25 | option java_package = "com.google.actions.sdk.v2.interactionmodel"; 26 | 27 | // Registers events that trigger as the result of a true condition. 28 | message ConditionalEvent { 29 | // Required. Filter condition for this event to trigger. If condition is evaluated to 30 | // true then the associated `handler` will be triggered. 31 | // The following variable references are supported: 32 | // `$session` - To reference data in session storage. 33 | // `$user` - To reference data in user storage. 34 | // The following boolean operators are supported (with examples): 35 | // `&&` - `session.params.counter > 0 && session.params.counter < 100` 36 | // `||` - `session.params.foo == "John" || session.params.counter == "Adam"` 37 | // `!` - `!(session.params.counter == 5)` 38 | // The following comparisons are supported: 39 | // `==`, `!=`, `<`, `>`, `<=`, `>=` 40 | // The following list and string operators are supported (with examples): 41 | // `in` - "Watermelon" in `session.params.fruitList` 42 | // `size` - `size(session.params.fruitList) > 2` 43 | // `substring` - `session.params.fullName.contains("John")` 44 | string condition = 1 [(google.api.field_behavior) = REQUIRED]; 45 | 46 | // Optional. Destination scene which the conversation should jump to when the associated 47 | // condition is evaluated to true. The state of the current scene is destroyed 48 | // on the transition. 49 | string transition_to_scene = 2 [(google.api.field_behavior) = OPTIONAL]; 50 | 51 | // Optional. Event handler which is triggered when the associated condition is evaluated 52 | // to `true`. Should execute before transitioning to the destination scene. 53 | // Useful to generate Prompts in response to events. 54 | EventHandler handler = 3 [(google.api.field_behavior) = OPTIONAL]; 55 | } 56 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/entity_set.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2021 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel; 18 | 19 | import "google/api/field_behavior.proto"; 20 | 21 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel;interactionmodel"; 22 | option java_multiple_files = true; 23 | option java_outer_classname = "EntitySetProto"; 24 | option java_package = "com.google.actions.sdk.v2.interactionmodel"; 25 | 26 | // Entity sets describe the pre-defined set of entities that the values of 27 | // built-in intent parameters can come from. Entity sets can be referenced from 28 | // entity_set in built-in intent parameters. 29 | message EntitySet { 30 | // An entity a built-in intent parameter value can come from. 31 | message Entity { 32 | // Required. The ID of the entity. 33 | // For a list of built-in-intent parameters and their supported entities, 34 | // see 35 | // https://developers.google.com/assistant/conversational/build/built-in-intents 36 | string id = 1 [(google.api.field_behavior) = REQUIRED]; 37 | } 38 | 39 | // Required. The list of entities this entity set supports. 40 | repeated Entity entities = 1 [(google.api.field_behavior) = REQUIRED]; 41 | } 42 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/event_handler.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel; 18 | 19 | import "google/actions/sdk/v2/interactionmodel/prompt/static_prompt.proto"; 20 | 21 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel;interactionmodel"; 22 | option java_multiple_files = true; 23 | option java_outer_classname = "EventHandlerProto"; 24 | option java_package = "com.google.actions.sdk.v2.interactionmodel"; 25 | 26 | // Defines a handler to be executed after an event. Examples of events are 27 | // intent and condition based events in a scene. 28 | message EventHandler { 29 | // Name of the webhook handler to call. 30 | string webhook_handler = 1; 31 | 32 | // Prompts can either be inlined or referenced by name. 33 | oneof prompt { 34 | // Inlined static prompt. Can contain references to string resources in 35 | // bundles. 36 | google.actions.sdk.v2.interactionmodel.prompt.StaticPrompt static_prompt = 2; 37 | 38 | // Name of the static prompt to invoke. 39 | string static_prompt_name = 3; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/global_intent_event.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel; 18 | 19 | import "google/actions/sdk/v2/interactionmodel/event_handler.proto"; 20 | import "google/api/field_behavior.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel;interactionmodel"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "GlobalIntentEventProto"; 25 | option java_package = "com.google.actions.sdk.v2.interactionmodel"; 26 | 27 | // Defines a global intent handler. Global intent events are scoped to the 28 | // entire Actions project and may be overridden by intent handlers in a scene. 29 | // Intent names must be unique within an Actions project. 30 | // 31 | // Global intents can be matched anytime during a session, allowing users to 32 | // access common flows like "get help" or "go back home." They can also be 33 | // used to deep link users into specific flows when they invoke an Action. 34 | // 35 | // Note, the intent name is specified in the name of the file. 36 | message GlobalIntentEvent { 37 | // Optional. Destination scene which the conversation should jump to. The state of the 38 | // current scene is destroyed on the transition. 39 | string transition_to_scene = 1 [(google.api.field_behavior) = OPTIONAL]; 40 | 41 | // Optional. Event handler which is triggered when the intent is matched. Should execute 42 | // before transitioning to the destination scene. Useful to generate Prompts 43 | // in response to events. 44 | EventHandler handler = 2 [(google.api.field_behavior) = OPTIONAL]; 45 | } 46 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/intent.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel; 18 | 19 | import "google/actions/sdk/v2/interactionmodel/type/class_reference.proto"; 20 | import "google/api/field_behavior.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel;interactionmodel"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "IntentProto"; 25 | option java_package = "com.google.actions.sdk.v2.interactionmodel"; 26 | 27 | // Intents map open-ended user input to structured objects. Spoken 28 | // phrases are matched to intents with Google's Natural Language Understanding 29 | // (NLU). Intent matches can trigger events in your conversation design to 30 | // progress the user's conversation. 31 | // The intent name is specified in the name of the file. 32 | message Intent { 33 | // Definition of a parameter which can be used inside training phrases. 34 | message IntentParameter { 35 | // Entity set references for an intent parameter. 36 | message EntitySetReferences { 37 | // A reference to the set of allowed entities for this intent parameter. 38 | message EntitySetReference { 39 | // Required. Identifies the specific collection of entities to be considered for a 40 | // given parameter. The corresponding entity set definition should be 41 | // present in the custom/entitySets/ directory. 42 | string entity_set = 1 [(google.api.field_behavior) = REQUIRED]; 43 | } 44 | 45 | // Required. Entity set references for an intent parameter. 46 | repeated EntitySetReference entity_set_references = 1 [(google.api.field_behavior) = REQUIRED]; 47 | } 48 | 49 | // Required. Unique name of the intent parameter. Can be used in conditions and 50 | // responses to reference intent parameters extracted by NLU with 51 | // $intent.params.[name].resolved 52 | string name = 1 [(google.api.field_behavior) = REQUIRED]; 53 | 54 | // The type of the intent parameter. 55 | oneof parameter_type { 56 | // Optional. Declares the data type of this parameter. 57 | // This should not be set for built-in intents. 58 | google.actions.sdk.v2.interactionmodel.type.ClassReference type = 2 [(google.api.field_behavior) = OPTIONAL]; 59 | 60 | // Optional. References to the sets of allowed entities for this intent parameter. 61 | // Only valid for parameters of a built-in intent. These 62 | // references point to entity sets in the 'custom/entitySets' directory. 63 | EntitySetReferences entity_set_references = 3 [(google.api.field_behavior) = OPTIONAL]; 64 | } 65 | } 66 | 67 | // The list of parameters within the training phrases. All parameters must be 68 | // defined here to be used in the training phrase. 69 | repeated IntentParameter parameters = 1; 70 | 71 | // Training phrases allow Google’s NLU to automatically match intents with 72 | // user input. The more unique phrases that are provided, the better chance 73 | // this intent will be matched. 74 | // The following is the format of training phrase part which are annotated. 75 | // Note that `auto` field is optional and the default behavior when `auto` is 76 | // not specified is equivalent to `auto=false`. 77 | // `($ '' auto=)` 78 | // `auto = true` means the part was auto annotated by NLU. 79 | // `auto = false` means the part was annotated by the user. This is the 80 | // default when auto is not specified. 81 | // Example: 82 | // "Book a flight from ($source 'San Francisco' auto=false) to ($dest 83 | // 'Vancouver')" 84 | repeated string training_phrases = 2; 85 | } 86 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/intent_event.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel; 18 | 19 | import "google/actions/sdk/v2/interactionmodel/event_handler.proto"; 20 | import "google/api/field_behavior.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel;interactionmodel"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "IntentEventProto"; 25 | option java_package = "com.google.actions.sdk.v2.interactionmodel"; 26 | 27 | // Registers Events which trigger as the result of an intent match. 28 | message IntentEvent { 29 | // Required. Intent triggering the event. 30 | string intent = 1 [(google.api.field_behavior) = REQUIRED]; 31 | 32 | // Optional. Destination scene which the conversation should jump to. The state of the 33 | // current scene is destroyed on the transition. 34 | string transition_to_scene = 2 [(google.api.field_behavior) = OPTIONAL]; 35 | 36 | // Optional. Event handler which is triggered when the intent is matched. Should execute 37 | // before transitioning to the destination scene. Useful to generate prompts 38 | // in response to events. 39 | EventHandler handler = 3 [(google.api.field_behavior) = OPTIONAL]; 40 | } 41 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_canvas_prompt.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel.prompt; 18 | 19 | import "google/api/field_behavior.proto"; 20 | import "google/protobuf/duration.proto"; 21 | import "google/protobuf/struct.proto"; 22 | 23 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt"; 24 | option java_multiple_files = true; 25 | option java_outer_classname = "StaticCanvasPromptProto"; 26 | option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt"; 27 | 28 | // Represents a Interactive Canvas response to be sent to the user. 29 | // This can be used in conjunction with the `first_simple` field in the 30 | // containing prompt to speak to the user in addition to displaying a 31 | // interactive canvas response. 32 | message StaticCanvasPrompt { 33 | // Required. URL of the web view to load. 34 | string url = 1 [(google.api.field_behavior) = REQUIRED]; 35 | 36 | // Optional. JSON data to be passed through to the immersive experience web page as an 37 | // event. If the `override` field in the containing prompt is `false` data 38 | // values defined in this Canvas prompt will be added after data values 39 | // defined in previous Canvas prompts. 40 | repeated google.protobuf.Value data = 2 [(google.api.field_behavior) = OPTIONAL]; 41 | 42 | // Optional. A true value means that the mic won't be opened for capturing input after 43 | // this immersive response is presented to the user. 44 | bool suppress_mic = 3 [(google.api.field_behavior) = OPTIONAL]; 45 | 46 | // Optional. If `true`, conversation related metadata is included and send back to the 47 | // canvas application. 48 | bool send_state_data_to_canvas_app = 5 [(google.api.field_behavior) = OPTIONAL]; 49 | 50 | // Optional. If `true` the canvas application occupies the full screen and won't 51 | // have a header at the top. A toast message will also be displayed on the 52 | // loading screen that includes the Action's display name, the developer's 53 | // name, and instructions for exiting the Action. Default value: `false`. 54 | bool enable_full_screen = 6 [(google.api.field_behavior) = OPTIONAL]; 55 | } 56 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_card_prompt.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel.prompt; 18 | 19 | import "google/actions/sdk/v2/interactionmodel/prompt/content/static_image_prompt.proto"; 20 | import "google/actions/sdk/v2/interactionmodel/prompt/content/static_link_prompt.proto"; 21 | import "google/api/field_behavior.proto"; 22 | 23 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt"; 24 | option java_multiple_files = true; 25 | option java_outer_classname = "StaticCardPromptProto"; 26 | option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt"; 27 | 28 | // A basic card for displaying some information, e.g. an image and/or text. 29 | message StaticCardPrompt { 30 | // Optional. Overall title of the card. 31 | string title = 1 [(google.api.field_behavior) = OPTIONAL]; 32 | 33 | // Optional. Subtitle of the card. 34 | string subtitle = 2 [(google.api.field_behavior) = OPTIONAL]; 35 | 36 | // Required. Body text of the card which is needed unless image is present. Supports a 37 | // limited set of markdown syntax for formatting. 38 | string text = 3 [(google.api.field_behavior) = REQUIRED]; 39 | 40 | // Optional. A hero image for the card. The height is fixed to 192dp. 41 | StaticImagePrompt image = 4 [(google.api.field_behavior) = OPTIONAL]; 42 | 43 | // Optional. How the image background will be filled. 44 | StaticImagePrompt.ImageFill image_fill = 5 [(google.api.field_behavior) = OPTIONAL]; 45 | 46 | // Optional. A clickable button to be shown in the Card. 47 | StaticLinkPrompt button = 6 [(google.api.field_behavior) = OPTIONAL]; 48 | } 49 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_collection_browse_prompt.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel.prompt; 18 | 19 | import "google/actions/sdk/v2/interactionmodel/prompt/content/static_image_prompt.proto"; 20 | import "google/actions/sdk/v2/interactionmodel/prompt/content/static_link_prompt.proto"; 21 | import "google/api/field_behavior.proto"; 22 | 23 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt"; 24 | option java_multiple_files = true; 25 | option java_outer_classname = "StaticCollectionBrowsePromptProto"; 26 | option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt"; 27 | 28 | // Presents a set of web documents as a collection of large-tile items. Items 29 | // may be selected to launch their associated web document in a web viewer. 30 | message StaticCollectionBrowsePrompt { 31 | // Item in the collection. 32 | message CollectionBrowseItem { 33 | // Required. Title of the collection item. 34 | string title = 1 [(google.api.field_behavior) = REQUIRED]; 35 | 36 | // Description of the collection item. 37 | string description = 2; 38 | 39 | // Footer text for the collection item, displayed below the description. 40 | // Single line of text, truncated with an ellipsis. 41 | string footer = 3; 42 | 43 | // Image for the collection item. 44 | StaticImagePrompt image = 4; 45 | 46 | // Required. URI to open if the item selected. 47 | OpenUrl open_uri_action = 5 [(google.api.field_behavior) = REQUIRED]; 48 | } 49 | 50 | // Items in the browse collection. The list size should be in the range [2, 51 | // 10]. 52 | repeated CollectionBrowseItem items = 1; 53 | 54 | // Image display option for images in the collection. 55 | StaticImagePrompt.ImageFill image_fill = 2; 56 | } 57 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_collection_prompt.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel.prompt; 18 | 19 | import "google/actions/sdk/v2/interactionmodel/prompt/content/static_image_prompt.proto"; 20 | import "google/api/field_behavior.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "StaticCollectionPromptProto"; 25 | option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt"; 26 | 27 | // A card for presenting a collection of options to select from. 28 | message StaticCollectionPrompt { 29 | // An item in the collection. 30 | message CollectionItem { 31 | // Required. The NLU key that matches the entry key name in the associated 32 | // Type. When item tapped, this key will be posted back as a select option 33 | // parameter. 34 | string key = 1 [(google.api.field_behavior) = REQUIRED]; 35 | 36 | // Required. Title of the item. When tapped, this text will be 37 | // posted back to the conversation verbatim as if the user had typed it. 38 | // Each title must be unique among the set of items. 39 | string title = 2 [(google.api.field_behavior) = REQUIRED]; 40 | 41 | // Optional. Body text of the item. 42 | string description = 3 [(google.api.field_behavior) = OPTIONAL]; 43 | 44 | // Optional. Item image. 45 | StaticImagePrompt image = 4 [(google.api.field_behavior) = OPTIONAL]; 46 | } 47 | 48 | // Optional. Title of the collection. 49 | string title = 1 [(google.api.field_behavior) = OPTIONAL]; 50 | 51 | // Optional. Subtitle of the collection. 52 | string subtitle = 2 [(google.api.field_behavior) = OPTIONAL]; 53 | 54 | // Required. Collection items. 55 | repeated CollectionItem items = 3 [(google.api.field_behavior) = REQUIRED]; 56 | 57 | // Optional. Type of image display option. 58 | StaticImagePrompt.ImageFill image_fill = 4 [(google.api.field_behavior) = OPTIONAL]; 59 | } 60 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_content_prompt.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel.prompt; 18 | 19 | import "google/actions/sdk/v2/interactionmodel/prompt/content/static_card_prompt.proto"; 20 | import "google/actions/sdk/v2/interactionmodel/prompt/content/static_collection_browse_prompt.proto"; 21 | import "google/actions/sdk/v2/interactionmodel/prompt/content/static_collection_prompt.proto"; 22 | import "google/actions/sdk/v2/interactionmodel/prompt/content/static_image_prompt.proto"; 23 | import "google/actions/sdk/v2/interactionmodel/prompt/content/static_list_prompt.proto"; 24 | import "google/actions/sdk/v2/interactionmodel/prompt/content/static_media_prompt.proto"; 25 | import "google/actions/sdk/v2/interactionmodel/prompt/content/static_table_prompt.proto"; 26 | 27 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt"; 28 | option java_multiple_files = true; 29 | option java_outer_classname = "StaticContentPromptProto"; 30 | option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt"; 31 | 32 | // A placeholder for the Content part of a StaticPrompt. 33 | message StaticContentPrompt { 34 | // Only one type of content can be present in a Prompt. 35 | oneof content { 36 | // A basic card. 37 | StaticCardPrompt card = 1; 38 | 39 | // An image. 40 | StaticImagePrompt image = 2; 41 | 42 | // Table card. 43 | StaticTablePrompt table = 3; 44 | 45 | // Response indicating a set of media to be played. 46 | StaticMediaPrompt media = 4; 47 | 48 | // A card for presenting a list of options to select from. 49 | StaticListPrompt list = 5; 50 | 51 | // A card presenting a list of options to select from. 52 | StaticCollectionPrompt collection = 6; 53 | 54 | // A card presenting a collection of web pages to open. 55 | StaticCollectionBrowsePrompt collection_browse = 7; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_image_prompt.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel.prompt; 18 | 19 | import "google/api/field_behavior.proto"; 20 | 21 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt"; 22 | option java_multiple_files = true; 23 | option java_outer_classname = "StaticImagePromptProto"; 24 | option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt"; 25 | 26 | // An image displayed in the card. 27 | message StaticImagePrompt { 28 | // Possible image display options for affecting the presentation of the image. 29 | // This should be used for when the image's aspect ratio does not match the 30 | // image container's aspect ratio. 31 | enum ImageFill { 32 | // ImageFill unspecified. 33 | UNSPECIFIED = 0; 34 | 35 | // Fill the gaps between the image and the image container with gray bars. 36 | GRAY = 1; 37 | 38 | // Fill the gaps between the image and the image container with white bars. 39 | WHITE = 2; 40 | 41 | // Image is scaled such that the image width and height match or exceed the 42 | // container dimensions. This may crop the top and bottom of the image if 43 | // the scaled image height is greater than the container height, or crop the 44 | // left and right of the image if the scaled image width is greater than the 45 | // container width. This is similar to "Zoom Mode" on a widescreen TV when 46 | // playing a 4:3 video. 47 | CROPPED = 3; 48 | } 49 | 50 | // Required. The source url of the image. Images can be JPG, PNG and GIF (animated and 51 | // non-animated). For example,`https://www.agentx.com/logo.png`. 52 | string url = 1 [(google.api.field_behavior) = REQUIRED]; 53 | 54 | // Required. A text description of the image to be used for accessibility, e.g. screen 55 | // readers. 56 | string alt = 2 [(google.api.field_behavior) = REQUIRED]; 57 | 58 | // Optional. The height of the image in pixels. 59 | int32 height = 3 [(google.api.field_behavior) = OPTIONAL]; 60 | 61 | // Optional. The width of the image in pixels. 62 | int32 width = 4 [(google.api.field_behavior) = OPTIONAL]; 63 | } 64 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_link_prompt.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel.prompt; 18 | 19 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt"; 20 | option java_multiple_files = true; 21 | option java_outer_classname = "StaticLinkPromptProto"; 22 | option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt"; 23 | 24 | // Defines a link which will be displayed as a suggestion chip and can be opened 25 | // by the user. 26 | message StaticLinkPrompt { 27 | // Name of the link 28 | string name = 1; 29 | 30 | // Defines behavior when the user opens the link. 31 | OpenUrl open = 2; 32 | } 33 | 34 | // Defines behavior when the user opens the link. 35 | message OpenUrl { 36 | // The url field which could be any of: 37 | // - http/https urls for opening an App-linked App or a webpage 38 | string url = 1; 39 | 40 | // Indicates a hint for the url type. 41 | UrlHint hint = 2; 42 | } 43 | 44 | // Different types of url hints. 45 | enum UrlHint { 46 | // Unspecified 47 | HINT_UNSPECIFIED = 0; 48 | 49 | // URL that points directly to AMP content, or to a canonical URL 50 | // which refers to AMP content via ``. 51 | AMP = 1; 52 | } 53 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_list_prompt.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel.prompt; 18 | 19 | import "google/actions/sdk/v2/interactionmodel/prompt/content/static_image_prompt.proto"; 20 | import "google/api/field_behavior.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "StaticListPromptProto"; 25 | option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt"; 26 | 27 | // A card for presenting a list of options to select from. 28 | message StaticListPrompt { 29 | // An item in the list. 30 | message ListItem { 31 | // Required. The NLU key that matches the entry key name in the associated type. When 32 | // item tapped, this key will be posted back as a select option parameter. 33 | string key = 1 [(google.api.field_behavior) = REQUIRED]; 34 | 35 | // Required. Title of the item. When tapped, this text will be posted back to the 36 | // conversation verbatim as if the user had typed it. Each title must be 37 | // unique among the set of items. 38 | string title = 2 [(google.api.field_behavior) = REQUIRED]; 39 | 40 | // Optional. Body text of the item. 41 | string description = 3 [(google.api.field_behavior) = OPTIONAL]; 42 | 43 | // Optional. Item image. 44 | StaticImagePrompt image = 4 [(google.api.field_behavior) = OPTIONAL]; 45 | } 46 | 47 | // Optional. Title of the list. 48 | string title = 1 [(google.api.field_behavior) = OPTIONAL]; 49 | 50 | // Optional. Subtitle of the list. 51 | string subtitle = 2 [(google.api.field_behavior) = OPTIONAL]; 52 | 53 | // Required. List items. 54 | repeated ListItem items = 3 [(google.api.field_behavior) = REQUIRED]; 55 | } 56 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_media_prompt.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel.prompt; 18 | 19 | import "google/actions/sdk/v2/interactionmodel/prompt/content/static_image_prompt.proto"; 20 | import "google/protobuf/duration.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "StaticMediaPromptProto"; 25 | option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt"; 26 | 27 | // Contains information about the media, such as name, description, url, etc. 28 | // Next id: 11 29 | message StaticMediaPrompt { 30 | // Media type of this response. 31 | enum MediaType { 32 | // UNSPECIFIED value 33 | MEDIA_TYPE_UNSPECIFIED = 0; 34 | 35 | // Audio file. 36 | AUDIO = 1; 37 | 38 | // Response to acknowledge a media status report. 39 | MEDIA_STATUS_ACK = 2; 40 | } 41 | 42 | // Media control types the media response can supported optionally 43 | enum OptionalMediaControls { 44 | // Unspecified value 45 | OPTIONAL_MEDIA_CONTROLS_UNSPECIFIED = 0; 46 | 47 | // Paused event. Triggered when user pauses the media. 48 | PAUSED = 1; 49 | 50 | // Stopped event. Triggered when user exit out 3p session during media play. 51 | STOPPED = 2; 52 | } 53 | 54 | // The types of repeat mode for a list of media objects. 55 | enum RepeatMode { 56 | // Equivalent to OFF. 57 | REPEAT_MODE_UNSPECIFIED = 0; 58 | 59 | // End media session at the end of the last media object. 60 | OFF = 1; 61 | 62 | // Loop to the beginning of the first media object when the end of the last 63 | // media object is reached. 64 | ALL = 2; 65 | } 66 | 67 | // Media type of this response. 68 | MediaType media_type = 8; 69 | 70 | // Start offset of the first media object. 71 | google.protobuf.Duration start_offset = 5; 72 | 73 | // Optional media control types this media response session can support. 74 | // If set, request will be made to 3p when a certain media event happens. 75 | // If not set, 3p must still handle two default control type, FINISHED and 76 | // FAILED. 77 | repeated OptionalMediaControls optional_media_controls = 6; 78 | 79 | // List of media objects. 80 | repeated MediaObject media_objects = 7; 81 | 82 | // Repeat mode for the list of Media Objects. 83 | RepeatMode repeat_mode = 9; 84 | } 85 | 86 | // Represents a single media object. 87 | message MediaObject { 88 | // Name of this media object. 89 | string name = 1; 90 | 91 | // Description of this media object. 92 | string description = 2; 93 | 94 | // The url pointing to the media content. 95 | string url = 3; 96 | 97 | // Image to show with the media card. 98 | MediaImage image = 4; 99 | } 100 | 101 | // Image to be shown inside a MediaPrompt. 102 | message MediaImage { 103 | // Only one type of MediaImage is allowed. 104 | oneof image { 105 | // A large image, such as the cover of the album, etc. 106 | StaticImagePrompt large = 1; 107 | 108 | // A small image icon displayed on the right from the title. 109 | // It's resized to 36x36 dp. 110 | StaticImagePrompt icon = 2; 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_table_prompt.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel.prompt; 18 | 19 | import "google/actions/sdk/v2/interactionmodel/prompt/content/static_image_prompt.proto"; 20 | import "google/actions/sdk/v2/interactionmodel/prompt/content/static_link_prompt.proto"; 21 | import "google/api/field_behavior.proto"; 22 | 23 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt"; 24 | option java_multiple_files = true; 25 | option java_outer_classname = "StaticTablePromptProto"; 26 | option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt"; 27 | 28 | // A table card for displaying a table of text. 29 | message StaticTablePrompt { 30 | // Optional. Overall title of the table. Must be set if subtitle is set. 31 | string title = 1 [(google.api.field_behavior) = OPTIONAL]; 32 | 33 | // Optional. Subtitle for the table. 34 | string subtitle = 2 [(google.api.field_behavior) = OPTIONAL]; 35 | 36 | // Optional. Image associated with the table. 37 | StaticImagePrompt image = 3 [(google.api.field_behavior) = OPTIONAL]; 38 | 39 | // Optional. Headers and alignment of columns. 40 | repeated TableColumn columns = 4 [(google.api.field_behavior) = OPTIONAL]; 41 | 42 | // Optional. Row data of the table. The first 3 rows are guaranteed to be shown but 43 | // others might be cut on certain surfaces. Please test with the simulator to 44 | // see which rows will be shown for a given surface. On surfaces that support 45 | // the `WEB_BROWSER` capability, you can point the user to 46 | // a web page with more data. 47 | repeated TableRow rows = 5 [(google.api.field_behavior) = OPTIONAL]; 48 | 49 | // Optional. Button. 50 | StaticLinkPrompt button = 6 [(google.api.field_behavior) = OPTIONAL]; 51 | } 52 | 53 | // Describes a column in the table. 54 | message TableColumn { 55 | // The alignment of the content within the cell. 56 | enum HorizontalAlignment { 57 | // HorizontalAlignment unspecified. 58 | UNSPECIFIED = 0; 59 | 60 | // Leading edge of the cell. This is the default. 61 | LEADING = 1; 62 | 63 | // Content is aligned to the center of the column. 64 | CENTER = 2; 65 | 66 | // Content is aligned to the trailing edge of the column. 67 | TRAILING = 3; 68 | } 69 | 70 | // Header text for the column. 71 | string header = 1; 72 | 73 | // Horizontal alignment of content w.r.t column. If unspecified, content 74 | // will be aligned to the leading edge. 75 | HorizontalAlignment align = 2; 76 | } 77 | 78 | // Describes a cell in a row. 79 | message TableCell { 80 | // Text content of the cell. 81 | string text = 1; 82 | } 83 | 84 | // Describes a row in the table. 85 | message TableRow { 86 | // Cells in this row. The first 3 cells are guaranteed to be shown but 87 | // others might be cut on certain surfaces. Please test with the simulator 88 | // to see which cells will be shown for a given surface. 89 | repeated TableCell cells = 1; 90 | 91 | // Indicates whether there should be a divider after each row. 92 | bool divider = 2; 93 | } 94 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/prompt/static_prompt.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel.prompt; 18 | 19 | import "google/actions/sdk/v2/interactionmodel/prompt/content/static_canvas_prompt.proto"; 20 | import "google/actions/sdk/v2/interactionmodel/prompt/content/static_content_prompt.proto"; 21 | import "google/actions/sdk/v2/interactionmodel/prompt/content/static_link_prompt.proto"; 22 | import "google/actions/sdk/v2/interactionmodel/prompt/static_simple_prompt.proto"; 23 | import "google/actions/sdk/v2/interactionmodel/prompt/suggestion.proto"; 24 | import "google/actions/sdk/v2/interactionmodel/prompt/surface_capabilities.proto"; 25 | import "google/api/field_behavior.proto"; 26 | 27 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt"; 28 | option java_multiple_files = true; 29 | option java_outer_classname = "StaticPromptProto"; 30 | option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt"; 31 | 32 | // Represents a list of prompt candidates, one of which will be selected as the 33 | // prompt to be shown in the response to the user. 34 | // **This message is localizable.** 35 | message StaticPrompt { 36 | // Represents a static prompt candidate. 37 | message StaticPromptCandidate { 38 | // Represents structured responses to send to the user, such as text, 39 | // speech, cards, canvas data, suggestion chips, etc. 40 | message StaticPromptResponse { 41 | // Optional. The first voice and text-only response. 42 | StaticSimplePrompt first_simple = 2 [(google.api.field_behavior) = OPTIONAL]; 43 | 44 | // Optional. A content like a card, list or media to display to the user. 45 | StaticContentPrompt content = 3 [(google.api.field_behavior) = OPTIONAL]; 46 | 47 | // Optional. The last voice and text-only response. 48 | StaticSimplePrompt last_simple = 4 [(google.api.field_behavior) = OPTIONAL]; 49 | 50 | // Optional. Suggestions to be displayed to the user which will always 51 | // appear at the end of the response. If the `append` field in the 52 | // containing prompt is `true` the titles defined in this field will be 53 | // added to titles defined in any previously defined suggestions prompts 54 | // and duplicate values will be removed. 55 | repeated Suggestion suggestions = 5 [(google.api.field_behavior) = OPTIONAL]; 56 | 57 | // Optional. An additional suggestion chip that can link out to the associated app 58 | // or site. 59 | // The chip will be rendered with the title "Open ". Max 20 chars. 60 | StaticLinkPrompt link = 6 [(google.api.field_behavior) = OPTIONAL]; 61 | 62 | // Optional. Mode for how this messages should be merged with previously defined 63 | // messages. 64 | // `true` will clear all previously defined messages (first and last 65 | // simple, content, suggestions link and canvas) and add messages defined 66 | // in this prompt. `false` will add messages defined in this prompt to 67 | // messages defined in previous responses. Setting this field to `false` 68 | // will also enable appending to some fields inside Simple prompts, the 69 | // Suggestions prompt and the Canvas prompt (part of the Content prompt). 70 | // The Content and Link messages will always be overwritten if defined in 71 | // the prompt. Default value is `false`. 72 | bool override = 7 [(google.api.field_behavior) = OPTIONAL]; 73 | 74 | // A response to be used for interactive canvas experience. 75 | StaticCanvasPrompt canvas = 8; 76 | } 77 | 78 | // Optional. The criteria for whether this prompt matches a request. If the selector 79 | // is empty, this prompt will always be triggered. 80 | Selector selector = 1 [(google.api.field_behavior) = OPTIONAL]; 81 | 82 | // The prompt response associated with the selector. 83 | StaticPromptResponse prompt_response = 2; 84 | } 85 | 86 | // Defines the criteria for whether a prompt matches a request. 87 | message Selector { 88 | // The set of required surface capabilities. 89 | SurfaceCapabilities surface_capabilities = 1; 90 | } 91 | 92 | // The list of candidate prompts to be sent to the client. Each prompt has a 93 | // selector to determine when it can be used. The first selector that matches 94 | // a request will be sent and the rest will be ignored. 95 | repeated StaticPromptCandidate candidates = 1; 96 | } 97 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/prompt/static_simple_prompt.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel.prompt; 18 | 19 | import "google/api/field_behavior.proto"; 20 | 21 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt"; 22 | option java_multiple_files = true; 23 | option java_outer_classname = "StaticSimplePromptProto"; 24 | option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt"; 25 | 26 | // Represents a simple prompt to be send to a user. 27 | message StaticSimplePrompt { 28 | // Represents a variant which is part of the simple prompt. 29 | message Variant { 30 | // Optional. Represents the speech to be spoken to the user. Can be SSML or text to 31 | // speech. 32 | // By default, speech will be appended to previous Simple prompt's 33 | // speech. If the `override` field in the containing prompt is `true` the 34 | // speech defined in this field will override previous Simple prompt's 35 | // speech. 36 | string speech = 1 [(google.api.field_behavior) = OPTIONAL]; 37 | 38 | // Optional. Text to display in the chat bubble. If not given, a display rendering of 39 | // the speech field above will be used. Limited to 640 chars. 40 | // By default, text will be appended to previous Simple prompt's text. 41 | // If the `override` field in the containing prompt is `true` the text 42 | // defined in this field will override previous Simple prompt's text. 43 | string text = 2 [(google.api.field_behavior) = OPTIONAL]; 44 | } 45 | 46 | // List of possible variants. 47 | repeated Variant variants = 1; 48 | } 49 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/prompt/suggestion.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel.prompt; 18 | 19 | import "google/api/field_behavior.proto"; 20 | 21 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt"; 22 | option java_multiple_files = true; 23 | option java_outer_classname = "SuggestionProto"; 24 | option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt"; 25 | 26 | // Represents a suggestion chip, a UI element shown to the user for convenience. 27 | message Suggestion { 28 | // Required. The text shown in the suggestion chip. When tapped, this text will be 29 | // posted back to the conversation verbatim as if the user had typed it. 30 | // Each title must be unique among the set of suggestion chips. 31 | // Max 25 chars 32 | string title = 1 [(google.api.field_behavior) = REQUIRED]; 33 | } 34 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/prompt/surface_capabilities.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel.prompt; 18 | 19 | import "google/api/field_behavior.proto"; 20 | 21 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt"; 22 | option java_multiple_files = true; 23 | option java_outer_classname = "SurfaceCapabilitiesProto"; 24 | option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt"; 25 | 26 | // Represents the surface the user is using to make a request to the Action. 27 | message SurfaceCapabilities { 28 | // Capabilities the device surface supports at the time of the request. 29 | enum Capability { 30 | // Unspecified surface capability. 31 | UNSPECIFIED = 0; 32 | 33 | // Device can speak to the user via text-to-speech or SSML. 34 | SPEECH = 1; 35 | 36 | // Device can display rich responses like cards, lists and tables. 37 | RICH_RESPONSE = 2; 38 | 39 | // Device can play long form audio media like music and podcasts. 40 | LONG_FORM_AUDIO = 3; 41 | 42 | // Device can display a interactive canvas response. 43 | INTERACTIVE_CANVAS = 4; 44 | 45 | // Device can use web links in rich responses to open a web browser. 46 | WEB_LINK = 5; 47 | 48 | // Device can support saving and fetching home storage. 49 | HOME_STORAGE = 6; 50 | } 51 | 52 | // Required. The capabilities of the surface making a request to the Action. 53 | repeated Capability capabilities = 1 [(google.api.field_behavior) = REQUIRED]; 54 | } 55 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/scene.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel; 18 | 19 | import "google/actions/sdk/v2/interactionmodel/conditional_event.proto"; 20 | import "google/actions/sdk/v2/interactionmodel/event_handler.proto"; 21 | import "google/actions/sdk/v2/interactionmodel/intent_event.proto"; 22 | import "google/actions/sdk/v2/interactionmodel/slot.proto"; 23 | 24 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel;interactionmodel"; 25 | option java_multiple_files = true; 26 | option java_outer_classname = "SceneProto"; 27 | option java_package = "com.google.actions.sdk.v2.interactionmodel"; 28 | 29 | // Scene is the basic unit of control flow when designing a conversation. They 30 | // can be chained together with other scenes, generate prompts for the end user, 31 | // and define slots. 32 | // The scene name is specified in the name of the file. 33 | message Scene { 34 | // Handler to invoke when transitioning into this scene. 35 | EventHandler on_enter = 1; 36 | 37 | // The list of events that trigger based on intents. These events can 38 | // be triggered at any time after the on_load Handler has been called. 39 | // Important - these events define the set of intents which are scoped to 40 | // this scene and will take precedence over any globally defined events that 41 | // have the same intents or their triggering phrases. Intent names must be 42 | // unique within a scene. 43 | repeated IntentEvent intent_events = 2; 44 | 45 | // The list of events to trigger based on conditional statements. These are 46 | // evaluated after the form has been filled or immediately after on_load if 47 | // this scene does not have a form (evaluation is only done once). Only the 48 | // first matching event will be triggered. 49 | repeated ConditionalEvent conditional_events = 3; 50 | 51 | // Ordered list of slots. Each slot defines the type of data 52 | // that it will resolve and configuration to customize the experience of this 53 | // resolution (e.g. prompts). 54 | repeated Slot slots = 4; 55 | 56 | // Handler called when there is a change in state of a slot not 57 | // caused by updates within another Handler. This allows slots to be 58 | // invalidated, the scene invalidated or other changes to scene state. 59 | EventHandler on_slot_updated = 5; 60 | } 61 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/slot.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel; 18 | 19 | import "google/actions/sdk/v2/interactionmodel/event_handler.proto"; 20 | import "google/actions/sdk/v2/interactionmodel/type/class_reference.proto"; 21 | import "google/api/field_behavior.proto"; 22 | import "google/protobuf/struct.proto"; 23 | 24 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel;interactionmodel"; 25 | option java_multiple_files = true; 26 | option java_outer_classname = "SlotProto"; 27 | option java_package = "com.google.actions.sdk.v2.interactionmodel"; 28 | 29 | // Configuration for a slot. Slots are single units of data that can be filled 30 | // through natural language (ie. intent parameters), session parameters, and 31 | // other sources. 32 | message Slot { 33 | // A single place where slot prompts are defined. 34 | message PromptSettings { 35 | // Prompt for the slot value itself. Example: "What size did you want?" 36 | EventHandler initial_prompt = 1; 37 | 38 | // Prompt to give when the user's input does not match the expected 39 | // value type for the slot for the first time. Example: "Sorry, I 40 | // didn't get that." 41 | EventHandler no_match_prompt1 = 2; 42 | 43 | // Prompt to give when the user's input does not match the expected 44 | // value type for the slot for the second time. Example: "Sorry, I 45 | // didn't get that." 46 | EventHandler no_match_prompt2 = 3; 47 | 48 | // Prompt to give when the user's input does not match the expected 49 | // value type for the slot for the last time. Example: "Sorry, I 50 | // didn't get that." 51 | EventHandler no_match_final_prompt = 4; 52 | 53 | // Prompt to give when the user does not provide an input for the first 54 | // time. Example: "Sorry, I didn't get that." 55 | EventHandler no_input_prompt1 = 5; 56 | 57 | // Prompt to give when the user does not provide an input for the second 58 | // time. Example: "Sorry, I didn't get that." 59 | EventHandler no_input_prompt2 = 6; 60 | 61 | // Prompt to give when the user does not provide an input for the last 62 | // time. Example: "Sorry, I didn't get that." 63 | EventHandler no_input_final_prompt = 7; 64 | } 65 | 66 | // Message describing the commit behavior associated with the slot after it 67 | // has been successfully filled. 68 | message CommitBehavior { 69 | // The session parameter to write the slot value after it is filled. Note 70 | // that nested paths are not currently supported. "$$" is used to write the 71 | // slot value to a session parameter with same name as the slot. 72 | // Eg: write_session_param = "fruit" corresponds to "$session.params.fruit". 73 | // write_session_param = "ticket" corresponds to "$session.params.ticket". 74 | string write_session_param = 1; 75 | } 76 | 77 | // Configuration to populate a default value for this slot. 78 | message DefaultValue { 79 | // Optional. The session parameter to be used to initialize the slot value, if it has 80 | // a non-empty value. The type of the value must match the type of the slot. 81 | // Note that nested paths are not currently supported. 82 | // Eg: `session_param = "fruit"` corresponds to `$session.params.fruit`. 83 | // `session_param = "ticket"` corresponds to `$session.params.ticket`. 84 | string session_param = 1 [(google.api.field_behavior) = OPTIONAL]; 85 | 86 | // Optional. Constant default value for the slot. This will only be used if a value 87 | // for this slot was not populated through the `session_param`. The 88 | // type for this value must match the type of the slot. 89 | google.protobuf.Value constant = 2 [(google.api.field_behavior) = OPTIONAL]; 90 | } 91 | 92 | // Required. Name of the slot. 93 | string name = 1 [(google.api.field_behavior) = REQUIRED]; 94 | 95 | // Required. Declares the data type of this slot. 96 | google.actions.sdk.v2.interactionmodel.type.ClassReference type = 2 [(google.api.field_behavior) = REQUIRED]; 97 | 98 | // Optional. Indicates whether the slot is required to be filled before 99 | // advancing. Required slots that are not filled will trigger a customizable 100 | // prompt to the user. 101 | bool required = 3 [(google.api.field_behavior) = OPTIONAL]; 102 | 103 | // Optional. Registers Prompts for different stages of slot filling. 104 | PromptSettings prompt_settings = 4 [(google.api.field_behavior) = OPTIONAL]; 105 | 106 | // Optional. Commit behavior associated with the slot. 107 | CommitBehavior commit_behavior = 5 [(google.api.field_behavior) = OPTIONAL]; 108 | 109 | // Optional. Additional configuration associated with the slot which is 110 | // used for filling the slot. The format of the config is specific to the 111 | // type of the slot. Resource references to user or session parameter can be 112 | // added to this config. This config is needed for filling slots related to 113 | // transactions and user engagement. 114 | // 115 | // Example: 116 | // For a slot of type actions.type.CompletePurchaseValue, the following 117 | // config proposes a digital good order with a reference to a client defined 118 | // session parameter `userSelectedSkuId`: 119 | // 120 | // { 121 | // "@type": "type.googleapis.com/ 122 | // google.actions.transactions.v3.CompletePurchaseValueSpec", 123 | // "skuId": { 124 | // "skuType": "SKU_TYPE_IN_APP", 125 | // "id": "$session.params.userSelectedSkuId", 126 | // "packageName": "com.example.company" 127 | // } 128 | // } 129 | google.protobuf.Value config = 6 [(google.api.field_behavior) = OPTIONAL]; 130 | 131 | // Optional. Configuration to populate a default value for this slot. 132 | DefaultValue default_value = 7 [(google.api.field_behavior) = OPTIONAL]; 133 | } 134 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/type/class_reference.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel.type; 18 | 19 | import "google/api/field_behavior.proto"; 20 | 21 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/type"; 22 | option java_multiple_files = true; 23 | option java_outer_classname = "ClassReferenceProto"; 24 | option java_package = "com.google.actions.sdk.v2.interactionmodel.type"; 25 | 26 | // A reference to a class which is used to declare the type of a field or return 27 | // value. Enums are also a type of class that can be referenced using 28 | // ClassReference. 29 | message ClassReference { 30 | // Required. Name of a built-in type or custom type of the parameter. Examples: 31 | // `PizzaToppings`, `actions.type.Number` 32 | string name = 1 [(google.api.field_behavior) = REQUIRED]; 33 | 34 | // Optional. Indicates whether the data type represents a list of values. 35 | bool list = 2 [(google.api.field_behavior) = OPTIONAL]; 36 | } 37 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/type/entity_display.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel.type; 18 | 19 | import "google/api/field_behavior.proto"; 20 | 21 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/type"; 22 | option java_multiple_files = true; 23 | option java_outer_classname = "EntityDisplayProto"; 24 | option java_package = "com.google.actions.sdk.v2.interactionmodel.type"; 25 | 26 | // Elements that will be displayed on the canvas once a particular type's entity 27 | // is extracted from a query. Only relevant for canvas enabled apps. 28 | // **This message is localizable.** 29 | message EntityDisplay { 30 | // Optional. Title of the icon. 31 | string icon_title = 1 [(google.api.field_behavior) = OPTIONAL]; 32 | 33 | // Required. Url of the icon. 34 | string icon_url = 2 [(google.api.field_behavior) = REQUIRED]; 35 | } 36 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/type/free_text_type.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel.type; 18 | 19 | import "google/actions/sdk/v2/interactionmodel/type/entity_display.proto"; 20 | import "google/api/field_behavior.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/type"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "FreeTextTypeProto"; 25 | option java_package = "com.google.actions.sdk.v2.interactionmodel.type"; 26 | 27 | // Type that matches any text if surrounding words context is close to provided 28 | // training examples. 29 | message FreeTextType { 30 | // Optional. Elements that will be displayed on the canvas once an entity is extracted 31 | // from a query. Only relevant for canvas enabled apps. 32 | EntityDisplay display = 2 [(google.api.field_behavior) = OPTIONAL]; 33 | } 34 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/type/regular_expression_type.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel.type; 18 | 19 | import "google/actions/sdk/v2/interactionmodel/type/entity_display.proto"; 20 | import "google/api/field_behavior.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/type"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "RegularExpressionTypeProto"; 25 | option java_package = "com.google.actions.sdk.v2.interactionmodel.type"; 26 | 27 | // Type that matches text by regular expressions. 28 | // **This message is localizable.** 29 | message RegularExpressionType { 30 | // Represents an entity object that contains the regular expression that is 31 | // used for comparison. 32 | message Entity { 33 | // Optional. Elements that will be displayed on the canvas once an entity is 34 | // extracted from a query. Only relevant for canvas enabled apps. 35 | EntityDisplay display = 1 [(google.api.field_behavior) = OPTIONAL]; 36 | 37 | // Required. Uses RE2 regex syntax (See 38 | // https://github.com/google/re2/wiki/Syntax for more details) 39 | repeated string regular_expressions = 2 [(google.api.field_behavior) = REQUIRED]; 40 | } 41 | 42 | // Required. Named map of entities which each contain Regex strings. 43 | map entities = 1 [(google.api.field_behavior) = REQUIRED]; 44 | } 45 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/type/synonym_type.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel.type; 18 | 19 | import "google/actions/sdk/v2/interactionmodel/type/entity_display.proto"; 20 | import "google/api/field_behavior.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/type"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "SynonymTypeProto"; 25 | option java_package = "com.google.actions.sdk.v2.interactionmodel.type"; 26 | 27 | // Type that matches text by set of synonyms. 28 | message SynonymType { 29 | // Represents a synonym entity field that contains the details of a single 30 | // entry inside the type. 31 | message Entity { 32 | // Optional. The entity display details. 33 | EntityDisplay display = 1 [(google.api.field_behavior) = OPTIONAL]; 34 | 35 | // Optional. The list of synonyms for the entity. 36 | // **This field is localizable.** 37 | repeated string synonyms = 2 [(google.api.field_behavior) = OPTIONAL]; 38 | } 39 | 40 | // The type of matching that entries in this type will use. This will ensure 41 | // all of the types use the same matching method and allow variation of 42 | // matching for synonym matching (i.e. fuzzy versus exact). If the value is 43 | // `UNSPECIFIED` it will be defaulted to `EXACT_MATCH`. 44 | enum MatchType { 45 | // Defaults to `EXACT_MATCH`. 46 | UNSPECIFIED = 0; 47 | 48 | // Looks for an exact match of the synonym or name. 49 | EXACT_MATCH = 1; 50 | 51 | // Looser than `EXACT_MATCH`. Looks for similar matches as well as exact 52 | // matches. 53 | FUZZY_MATCH = 2; 54 | } 55 | 56 | // Optional. The match type for the synonym. 57 | MatchType match_type = 1 [(google.api.field_behavior) = OPTIONAL]; 58 | 59 | // Optional. When set to true this will match unknown words or phrases based on 60 | // surrounding input and intent training data, such as items that might be 61 | // added to a grocery list. 62 | bool accept_unknown_values = 3 [(google.api.field_behavior) = OPTIONAL]; 63 | 64 | // Required. Named map of synonym entities. 65 | map entities = 2 [(google.api.field_behavior) = REQUIRED]; 66 | } 67 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/interactionmodel/type/type.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2.interactionmodel.type; 18 | 19 | import "google/actions/sdk/v2/interactionmodel/type/free_text_type.proto"; 20 | import "google/actions/sdk/v2/interactionmodel/type/regular_expression_type.proto"; 21 | import "google/actions/sdk/v2/interactionmodel/type/synonym_type.proto"; 22 | 23 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/type"; 24 | option java_multiple_files = true; 25 | option java_outer_classname = "TypeProto"; 26 | option java_package = "com.google.actions.sdk.v2.interactionmodel.type"; 27 | 28 | // Declaration of a custom type, as opposed to built-in types. Types can be 29 | // assigned to slots in a scene or parameters of an intent's training phrases. 30 | // Practically, Types can be thought of as enums. 31 | // Note, type name is specified in the name of the file. 32 | message Type { 33 | // Selection of sub type based on the type of matching to be done. 34 | oneof sub_type { 35 | // Synonyms type, which is essentially an enum. 36 | SynonymType synonym = 1; 37 | 38 | // Regex type, allows regular expression matching. 39 | RegularExpressionType regular_expression = 2; 40 | 41 | // FreeText type. 42 | FreeTextType free_text = 3; 43 | } 44 | 45 | // Set of exceptional words/phrases that shouldn't be matched by type. 46 | // Note: If word/phrase is matched by the type but listed as an exclusion it 47 | // won't be returned in parameter extraction result. 48 | // **This field is localizable.** 49 | repeated string exclusions = 4; 50 | } 51 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/localized_settings.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2; 18 | 19 | import "google/actions/sdk/v2/theme_customization.proto"; 20 | import "google/api/field_behavior.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "LocalizedSettingsProto"; 25 | option java_package = "com.google.actions.sdk.v2"; 26 | 27 | // Represents settings of an Actions project that are specific to a user locale. 28 | // In this instance, user means the end user who invokes your Actions. 29 | // **This message is localizable.** 30 | message LocalizedSettings { 31 | // Required. The default display name for this Actions project (if there is no 32 | // translation available) 33 | string display_name = 1 [(google.api.field_behavior) = REQUIRED]; 34 | 35 | // Required. The pronunciation of the display name to invoke it within a voice 36 | // (spoken) context. 37 | string pronunciation = 2 [(google.api.field_behavior) = REQUIRED]; 38 | 39 | // Required. The default short description for the Actions project (if there is no 40 | // translation available). 80 character limit. 41 | string short_description = 3 [(google.api.field_behavior) = REQUIRED]; 42 | 43 | // Required. The default long description for the Actions project (if there is no 44 | // translation available). 4000 character limit. 45 | string full_description = 4 [(google.api.field_behavior) = REQUIRED]; 46 | 47 | // Required. Small square image, 192 x 192 px. 48 | // This should be specified as a reference to the corresponding image in the 49 | // `resources/images/` directory. For example, `$resources.images.foo` (without the 50 | // extension) for image in `resources/images/foo.jpg` 51 | // When working on a project pulled from Console, the Google-managed URL 52 | // pulled could be used. URLs from external sources are not allowed. 53 | string small_logo_image = 5 [(google.api.field_behavior) = REQUIRED]; 54 | 55 | // Optional. Large landscape image, 1920 x 1080 px. 56 | // This should be specified as a reference to the corresponding image in the 57 | // `resources/images/` directory. For example, `$resources.images.foo` (without the 58 | // extension) for image in `resources/images/foo.jpg` 59 | // When working on a project pulled from Console, the Google-managed URL 60 | // pulled could be used. URLs from external sources are not allowed. 61 | string large_banner_image = 6 [(google.api.field_behavior) = OPTIONAL]; 62 | 63 | // Required. The name of the developer to be displayed to users. 64 | string developer_name = 7 [(google.api.field_behavior) = REQUIRED]; 65 | 66 | // Required. The contact email address for the developer. 67 | string developer_email = 8 [(google.api.field_behavior) = REQUIRED]; 68 | 69 | // Optional. The terms of service URL. 70 | string terms_of_service_url = 9 [(google.api.field_behavior) = OPTIONAL]; 71 | 72 | // Required. The Google Assistant voice type that users hear when they interact with 73 | // your Actions. The supported values are "male_1", "male_2", "female_1", and 74 | // "female_2". 75 | string voice = 10 [(google.api.field_behavior) = REQUIRED]; 76 | 77 | // Optional. The locale for the specified voice. If not specified, this resolves 78 | // to the user's Assistant locale. If specified, the voice locale must have 79 | // the same root language as the locale specified in LocalizedSettings. 80 | string voice_locale = 14 [(google.api.field_behavior) = OPTIONAL]; 81 | 82 | // Required. The privacy policy URL. 83 | string privacy_policy_url = 11 [(google.api.field_behavior) = REQUIRED]; 84 | 85 | // Optional. Sample invocation phrases displayed as part of your Actions project's 86 | // description in the Assistant directory. This will help users learn how to 87 | // use it. 88 | repeated string sample_invocations = 12 [(google.api.field_behavior) = OPTIONAL]; 89 | 90 | // Optional. Theme customizations for visual components of your Actions. 91 | ThemeCustomization theme_customization = 13 [(google.api.field_behavior) = OPTIONAL]; 92 | } 93 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/manifest.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2; 18 | 19 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk"; 20 | option java_multiple_files = true; 21 | option java_outer_classname = "ManifestProto"; 22 | option java_package = "com.google.actions.sdk.v2"; 23 | 24 | // Contains information that's "transportable" i.e. not specific to any given 25 | // project and can be moved between projects. 26 | message Manifest { 27 | // Version of the file format. The current file format version is 1.0 28 | // Example: "1.0" 29 | string version = 1; 30 | } 31 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/release_channel.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2; 18 | 19 | import "google/api/resource.proto"; 20 | 21 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk"; 22 | option java_multiple_files = true; 23 | option java_outer_classname = "ReleaseChannelProto"; 24 | option java_package = "com.google.actions.sdk.v2"; 25 | 26 | // Definition of release channel resource. 27 | message ReleaseChannel { 28 | option (google.api.resource) = { 29 | type: "actions.googleapis.com/ReleaseChannel" 30 | pattern: "projects/{project}/releaseChannels/{release_channel}" 31 | }; 32 | 33 | // The unique name of the release channel in the following format. 34 | // `projects/{project}/releaseChannels/{release_channel}`. 35 | string name = 1; 36 | 37 | // Version currently deployed to this release channel in the following format: 38 | // `projects/{project}/versions/{version}`. 39 | string current_version = 2; 40 | 41 | // Version to be deployed to this release channel in the following format: 42 | // `projects/{project}/versions/{version}`. 43 | string pending_version = 3; 44 | } 45 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/settings.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2; 18 | 19 | import "google/actions/sdk/v2/account_linking.proto"; 20 | import "google/actions/sdk/v2/localized_settings.proto"; 21 | import "google/actions/sdk/v2/surface.proto"; 22 | 23 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk"; 24 | option java_multiple_files = true; 25 | option java_outer_classname = "SettingsProto"; 26 | option java_package = "com.google.actions.sdk.v2"; 27 | 28 | // Represents settings of an Actions project that are not locale specific. 29 | message Settings { 30 | // The category choices for an Actions project. 31 | enum Category { 32 | // Unknown / Unspecified. 33 | CATEGORY_UNSPECIFIED = 0; 34 | 35 | // Business and Finance category. 36 | BUSINESS_AND_FINANCE = 2; 37 | 38 | // Education and Reference category. 39 | EDUCATION_AND_REFERENCE = 3; 40 | 41 | // Food and Drink category. 42 | FOOD_AND_DRINK = 4; 43 | 44 | // Games and Trivia category. 45 | GAMES_AND_TRIVIA = 5; 46 | 47 | // Health and Fitness category. 48 | HEALTH_AND_FITNESS = 6; 49 | 50 | // Kids and Family category. 51 | KIDS_AND_FAMILY = 20; 52 | 53 | // Lifestyle category. 54 | LIFESTYLE = 7; 55 | 56 | // Local category. 57 | LOCAL = 8; 58 | 59 | // Movies and TV category. 60 | MOVIES_AND_TV = 9; 61 | 62 | // Music and Audio category. 63 | MUSIC_AND_AUDIO = 10; 64 | 65 | // News category, 66 | NEWS = 1; 67 | 68 | // Novelty and Humor category. 69 | NOVELTY_AND_HUMOR = 11; 70 | 71 | // Productivity category. 72 | PRODUCTIVITY = 12; 73 | 74 | // Shopping category. 75 | SHOPPING = 13; 76 | 77 | // Social category. 78 | SOCIAL = 14; 79 | 80 | // Sports category. 81 | SPORTS = 15; 82 | 83 | // Travel and Transportation category. 84 | TRAVEL_AND_TRANSPORTATION = 16; 85 | 86 | // Utilities category. 87 | UTILITIES = 17; 88 | 89 | // Weather category. 90 | WEATHER = 18; 91 | 92 | // Home Control category. 93 | HOME_CONTROL = 19; 94 | } 95 | 96 | // Actions project id. 97 | string project_id = 1; 98 | 99 | // Locale which is default for the project. For all files except under 100 | // `resources/` with no locale in the path, the localized data is attributed 101 | // to this `default_locale`. For files under `resources/` no locale means that 102 | // the resource is applicable to all locales. 103 | string default_locale = 2; 104 | 105 | // Represents the regions where users can invoke your Actions, which is 106 | // based on the user's location of presence. Cannot be set if 107 | // `disabled_regions` is set. If both `enabled_regions` and `disabled_regions` 108 | // are not specified, users can invoke your Actions in all regions. Each 109 | // region is represented using the Canonical Name of Adwords geotargets. See 110 | // https://developers.google.com/adwords/api/docs/appendix/geotargeting 111 | // Examples include: 112 | // - "Germany" 113 | // - "Ghana" 114 | // - "Greece" 115 | // - "Grenada" 116 | // - "United Kingdom" 117 | // - "United States" 118 | // - "United States Minor Outlying Islands" 119 | // - "Uruguay" 120 | repeated string enabled_regions = 3; 121 | 122 | // Represents the regions where your Actions are blocked, based on the user's 123 | // location of presence. Cannot be set if `enabled_regions` is set. 124 | // Each region is represented using the Canonical Name of Adwords geotargets. 125 | // See https://developers.google.com/adwords/api/docs/appendix/geotargeting 126 | // Examples include: 127 | // - "Germany" 128 | // - "Ghana" 129 | // - "Greece" 130 | // - "Grenada" 131 | // - "United Kingdom" 132 | // - "United States" 133 | // - "United States Minor Outlying Islands" 134 | // - "Uruguay" 135 | repeated string disabled_regions = 4; 136 | 137 | // The category for this Actions project. 138 | Category category = 5; 139 | 140 | // Whether Actions can use transactions (for example, making 141 | // reservations, taking orders, etc.). If false, then attempts to use the 142 | // Transactions APIs fail. 143 | bool uses_transactions_api = 6; 144 | 145 | // Whether Actions can perform transactions for digital goods. 146 | bool uses_digital_purchase_api = 7; 147 | 148 | // Whether Actions use Interactive Canvas. 149 | bool uses_interactive_canvas = 8; 150 | 151 | // Whether Actions use the home storage feature. 152 | bool uses_home_storage = 17; 153 | 154 | // Whether Actions content is designed for family (DFF). 155 | bool designed_for_family = 9; 156 | 157 | // Whether Actions contains alcohol or tobacco related content. 158 | bool contains_alcohol_or_tobacco_content = 11; 159 | 160 | // Whether Actions may leave mic open without an explicit prompt during 161 | // conversation. 162 | bool keeps_mic_open = 12; 163 | 164 | // The surface requirements that a client surface must support to invoke 165 | // Actions in this project. 166 | SurfaceRequirements surface_requirements = 13; 167 | 168 | // Free-form testing instructions for Actions reviewer (for example, account 169 | // linking instructions). 170 | string testing_instructions = 14; 171 | 172 | // Localized settings for the project's default locale. Every additional 173 | // locale should have its own settings file in its own directory. 174 | LocalizedSettings localized_settings = 15; 175 | 176 | // Allow users to create or link accounts through Google sign-in and/or your 177 | // own OAuth service. 178 | AccountLinking account_linking = 16; 179 | 180 | // Android apps selected to acccess Google Play purchases for transactions. 181 | // This is a selection from the Android apps connected to the actions project 182 | // to verify brand ownership and enable additional features. See 183 | // https://developers.google.com/assistant/console/brand-verification for more 184 | // information. 185 | repeated string selected_android_apps = 20; 186 | } 187 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/surface.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2; 18 | 19 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk"; 20 | option java_multiple_files = true; 21 | option java_outer_classname = "SurfaceProto"; 22 | option java_package = "com.google.actions.sdk.v2"; 23 | 24 | // Contains a set of requirements that the client surface must support to invoke 25 | // Actions in your project. 26 | message SurfaceRequirements { 27 | // The minimum set of capabilities needed to invoke the Actions in your 28 | // project. If the surface is missing any of these, the Action will not be 29 | // triggered. 30 | repeated CapabilityRequirement minimum_requirements = 1; 31 | } 32 | 33 | // Represents a requirement about the availability of a given capability. 34 | message CapabilityRequirement { 35 | // Possible set of surface capabilities. 36 | enum SurfaceCapability { 37 | // Unknown / Unspecified. 38 | SURFACE_CAPABILITY_UNSPECIFIED = 0; 39 | 40 | // Surface supports audio output. 41 | AUDIO_OUTPUT = 1; 42 | 43 | // Surface supports screen/visual output. 44 | SCREEN_OUTPUT = 2; 45 | 46 | // Surface supports media response audio. 47 | MEDIA_RESPONSE_AUDIO = 3; 48 | 49 | // Surface supports web browsers. 50 | WEB_BROWSER = 4; 51 | 52 | // Surface supports account linking. 53 | ACCOUNT_LINKING = 7; 54 | 55 | // Surface supports Interactive Canvas. 56 | INTERACTIVE_CANVAS = 8; 57 | 58 | // Surface supports home storage. 59 | HOME_STORAGE = 9; 60 | } 61 | 62 | // The type of capability. 63 | SurfaceCapability capability = 1; 64 | } 65 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/theme_customization.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2; 18 | 19 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk"; 20 | option java_multiple_files = true; 21 | option java_outer_classname = "ThemeCustomizationProto"; 22 | option java_package = "com.google.actions.sdk.v2"; 23 | 24 | // Styles applied to cards that are presented to users 25 | message ThemeCustomization { 26 | // Describes how the borders of images should be rendered. 27 | enum ImageCornerStyle { 28 | // Undefined / Unspecified. 29 | IMAGE_CORNER_STYLE_UNSPECIFIED = 0; 30 | 31 | // Round corner for image. 32 | CURVED = 1; 33 | 34 | // Rectangular corner for image. 35 | ANGLED = 2; 36 | } 37 | 38 | // Background color of cards. Acts as a fallback if `background_image` is 39 | // not provided by developers or `background_image` doesn't fit for certain 40 | // surfaces. 41 | // Example usage: #FAFAFA 42 | string background_color = 1; 43 | 44 | // Primary theme color of the Action will be used to set text color of title, 45 | // action item background color for Actions on Google cards. 46 | // Example usage: #FAFAFA 47 | string primary_color = 2; 48 | 49 | // The font family that will be used for title of cards. 50 | // Supported fonts: 51 | // - Sans Serif 52 | // - Sans Serif Medium 53 | // - Sans Serif Bold 54 | // - Sans Serif Black 55 | // - Sans Serif Condensed 56 | // - Sans Serif Condensed Medium 57 | // - Serif 58 | // - Serif Bold 59 | // - Monospace 60 | // - Cursive 61 | // - Sans Serif Smallcaps 62 | string font_family = 3; 63 | 64 | // Border style of foreground image of cards. For example, can be applied on 65 | // the foreground image of a basic card or carousel card. 66 | ImageCornerStyle image_corner_style = 4; 67 | 68 | // Landscape mode (minimum 1920x1200 pixels). 69 | // This should be specified as a reference to the corresponding image in the 70 | // `resources/images/` directory. Eg: `$resources.images.foo` (without the 71 | // extension) for image in `resources/images/foo.jpg` 72 | // When working on a project pulled from Console the Google managed url pulled 73 | // could be used. 74 | string landscape_background_image = 5; 75 | 76 | // Portrait mode (minimum 1200x1920 pixels). 77 | // This should be specified as a reference to the corresponding image in the 78 | // `resources/images/` directory. Eg: `$resources.images.foo` (without the 79 | // extension) for image in `resources/images/foo.jpg` 80 | // When working on a project pulled from Console the Google managed url pulled 81 | // could be used. 82 | string portrait_background_image = 6; 83 | } 84 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/validation_results.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2; 18 | 19 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk"; 20 | option java_multiple_files = true; 21 | option java_outer_classname = "ValidationResultsProto"; 22 | option java_package = "com.google.actions.sdk.v2"; 23 | 24 | // Wrapper for repeated validation result. 25 | message ValidationResults { 26 | // Multiple validation results. 27 | repeated ValidationResult results = 1; 28 | } 29 | 30 | // Represents a validation result associated with the app content. 31 | message ValidationResult { 32 | // Context to identify the resource the validation message relates to. 33 | message ValidationContext { 34 | // Language code of the lozalized resource. 35 | // Empty if the error is for non-localized resource. 36 | // See the list of supported languages in 37 | // https://developers.google.com/assistant/console/languages-locales 38 | string language_code = 1; 39 | } 40 | 41 | // Holds the validation message. 42 | string validation_message = 1; 43 | 44 | // Context to identify the resource the validation message relates to. 45 | ValidationContext validation_context = 2; 46 | } 47 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/version.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2; 18 | 19 | import "google/api/resource.proto"; 20 | import "google/protobuf/timestamp.proto"; 21 | 22 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk"; 23 | option java_multiple_files = true; 24 | option java_outer_classname = "VersionProto"; 25 | option java_package = "com.google.actions.sdk.v2"; 26 | 27 | // Definition of version resource. 28 | message Version { 29 | option (google.api.resource) = { 30 | type: "actions.googleapis.com/Version" 31 | pattern: "projects/{project}/versions/{version}" 32 | }; 33 | 34 | // Represents the current state of the version. 35 | message VersionState { 36 | // Enum indicating the states that a Version can take. This enum is not yet 37 | // frozen and values maybe added later. 38 | enum State { 39 | // Default value of State. 40 | STATE_UNSPECIFIED = 0; 41 | 42 | // The version creation is in progress. 43 | CREATION_IN_PROGRESS = 1; 44 | 45 | // The version creation failed. 46 | CREATION_FAILED = 2; 47 | 48 | // The version has been successfully created. 49 | CREATED = 3; 50 | 51 | // The version is under policy review (aka Approval). 52 | REVIEW_IN_PROGRESS = 4; 53 | 54 | // The version has been approved for policy review and can be deployed. 55 | APPROVED = 5; 56 | 57 | // The version has been conditionally approved but is pending final 58 | // review. It may be rolled back if final review is denied. 59 | CONDITIONALLY_APPROVED = 6; 60 | 61 | // The version has been denied for policy review. 62 | DENIED = 7; 63 | 64 | // The version is taken down as entire agent and all versions are taken 65 | // down. 66 | UNDER_TAKEDOWN = 8; 67 | 68 | // The version has been deleted. 69 | DELETED = 9; 70 | } 71 | 72 | // The current state of the version. 73 | State state = 1; 74 | 75 | // User-friendly message for the current state of the version. 76 | string message = 2; 77 | } 78 | 79 | // The unique identifier of the version in the following format. 80 | // `projects/{project}/versions/{version}`. 81 | string name = 1; 82 | 83 | // The current state of the version. 84 | VersionState version_state = 2; 85 | 86 | // Email of the user who created this version. 87 | string creator = 3; 88 | 89 | // Timestamp of the last change to this version. 90 | google.protobuf.Timestamp update_time = 4; 91 | } 92 | -------------------------------------------------------------------------------- /protos/google/actions/sdk/v2/webhook.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.actions.sdk.v2; 18 | 19 | import "google/api/field_behavior.proto"; 20 | 21 | option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk"; 22 | option java_multiple_files = true; 23 | option java_outer_classname = "WebhookProto"; 24 | option java_package = "com.google.actions.sdk.v2"; 25 | 26 | // Metadata for different types of webhooks. If you're using 27 | // `inlineCloudFunction`, your source code must be in a directory with the same 28 | // name as the value for the `executeFunction` key. 29 | // For example, a value of `my_webhook` for the`executeFunction` key would have 30 | // a code structure like this: 31 | // - `/webhooks/my_webhook.yaml` 32 | // - `/webhooks/my_webhook/index.js` 33 | // - `/webhooks/my_webhook/package.json` 34 | message Webhook { 35 | // Declares the name of the webhoook handler. A webhook can have 36 | // multiple handlers registered. These handlers can be called from multiple 37 | // places in your Actions project. 38 | message Handler { 39 | // Required. Name of the handler. Must be unique across all handlers the Actions 40 | // project. You can check the name of this handler to invoke the correct 41 | // function in your fulfillment source code. 42 | string name = 1 [(google.api.field_behavior) = REQUIRED]; 43 | } 44 | 45 | // REST endpoint to notify if you're not using the inline editor. 46 | message HttpsEndpoint { 47 | // The HTTPS base URL for your fulfillment endpoint (HTTP is not supported). 48 | // Handler names are appended to the base URL path after a colon 49 | // (following the style guide in 50 | // https://cloud.google.com/apis/design/custom_methods). 51 | // For example a base URL of 'https://gactions.service.com/api' would 52 | // receive requests with URL 'https://gactions.service.com/api:{method}'. 53 | string base_url = 1; 54 | 55 | // Map of HTTP parameters to be included in the POST request. 56 | map http_headers = 2; 57 | 58 | // Version of the protocol used by the endpoint. This is the protocol shared 59 | // by all fulfillment types and not specific to Google fulfillment type. 60 | int32 endpoint_api_version = 3; 61 | } 62 | 63 | // Holds the metadata of an inline Cloud Function deployed from the 64 | // webhooks folder. 65 | message InlineCloudFunction { 66 | // The name of the Cloud Function entry point. The value of this field 67 | // should match the name of the method exported from the source code. 68 | string execute_function = 1; 69 | } 70 | 71 | // List of handlers for this webhook. 72 | repeated Handler handlers = 1; 73 | 74 | // Only one webhook type is supported. 75 | oneof webhook_type { 76 | // Custom webhook HTTPS endpoint. 77 | HttpsEndpoint https_endpoint = 2; 78 | 79 | // Metadata for cloud function deployed from code in the webhooks folder. 80 | InlineCloudFunction inline_cloud_function = 3; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | // ** This file is automatically generated by gapic-generator-typescript. ** 16 | // ** https://github.com/googleapis/gapic-generator-typescript ** 17 | // ** All changes to this file may be overwritten. ** 18 | 19 | import * as v2 from './v2'; 20 | const ActionsSdkClient = v2.ActionsSdkClient; 21 | type ActionsSdkClient = v2.ActionsSdkClient; 22 | const ActionsTestingClient = v2.ActionsTestingClient; 23 | type ActionsTestingClient = v2.ActionsTestingClient; 24 | export {v2, ActionsSdkClient, ActionsTestingClient}; 25 | export default {v2, ActionsSdkClient, ActionsTestingClient}; 26 | import * as protos from '../protos/protos'; 27 | export {protos} 28 | -------------------------------------------------------------------------------- /src/v2/actions_sdk_client_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "interfaces": { 3 | "google.actions.sdk.v2.ActionsSdk": { 4 | "retry_codes": { 5 | "non_idempotent": [], 6 | "idempotent": [ 7 | "DEADLINE_EXCEEDED", 8 | "UNAVAILABLE" 9 | ] 10 | }, 11 | "retry_params": { 12 | "default": { 13 | "initial_retry_delay_millis": 100, 14 | "retry_delay_multiplier": 1.3, 15 | "max_retry_delay_millis": 60000, 16 | "initial_rpc_timeout_millis": 60000, 17 | "rpc_timeout_multiplier": 1, 18 | "max_rpc_timeout_millis": 60000, 19 | "total_timeout_millis": 600000 20 | } 21 | }, 22 | "methods": { 23 | "WriteDraft": { 24 | "timeout_millis": 60000, 25 | "retry_codes_name": "non_idempotent", 26 | "retry_params_name": "default" 27 | }, 28 | "WritePreview": { 29 | "timeout_millis": 180000, 30 | "retry_codes_name": "non_idempotent", 31 | "retry_params_name": "default" 32 | }, 33 | "CreateVersion": { 34 | "timeout_millis": 60000, 35 | "retry_codes_name": "non_idempotent", 36 | "retry_params_name": "default" 37 | }, 38 | "ReadDraft": { 39 | "timeout_millis": 60000, 40 | "retry_codes_name": "non_idempotent", 41 | "retry_params_name": "default" 42 | }, 43 | "ReadVersion": { 44 | "timeout_millis": 60000, 45 | "retry_codes_name": "non_idempotent", 46 | "retry_params_name": "default" 47 | }, 48 | "EncryptSecret": { 49 | "timeout_millis": 60000, 50 | "retry_codes_name": "non_idempotent", 51 | "retry_params_name": "default" 52 | }, 53 | "DecryptSecret": { 54 | "timeout_millis": 60000, 55 | "retry_codes_name": "non_idempotent", 56 | "retry_params_name": "default" 57 | }, 58 | "ListSampleProjects": { 59 | "timeout_millis": 60000, 60 | "retry_codes_name": "non_idempotent", 61 | "retry_params_name": "default" 62 | }, 63 | "ListReleaseChannels": { 64 | "timeout_millis": 60000, 65 | "retry_codes_name": "non_idempotent", 66 | "retry_params_name": "default" 67 | }, 68 | "ListVersions": { 69 | "timeout_millis": 60000, 70 | "retry_codes_name": "non_idempotent", 71 | "retry_params_name": "default" 72 | } 73 | } 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/v2/actions_sdk_proto_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | "../../protos/google/actions/sdk/v2/account_linking.proto", 3 | "../../protos/google/actions/sdk/v2/account_linking_secret.proto", 4 | "../../protos/google/actions/sdk/v2/action.proto", 5 | "../../protos/google/actions/sdk/v2/actions_sdk.proto", 6 | "../../protos/google/actions/sdk/v2/actions_testing.proto", 7 | "../../protos/google/actions/sdk/v2/config_file.proto", 8 | "../../protos/google/actions/sdk/v2/conversation/intent.proto", 9 | "../../protos/google/actions/sdk/v2/conversation/prompt/content/canvas.proto", 10 | "../../protos/google/actions/sdk/v2/conversation/prompt/content/card.proto", 11 | "../../protos/google/actions/sdk/v2/conversation/prompt/content/collection.proto", 12 | "../../protos/google/actions/sdk/v2/conversation/prompt/content/content.proto", 13 | "../../protos/google/actions/sdk/v2/conversation/prompt/content/image.proto", 14 | "../../protos/google/actions/sdk/v2/conversation/prompt/content/link.proto", 15 | "../../protos/google/actions/sdk/v2/conversation/prompt/content/list.proto", 16 | "../../protos/google/actions/sdk/v2/conversation/prompt/content/media.proto", 17 | "../../protos/google/actions/sdk/v2/conversation/prompt/content/table.proto", 18 | "../../protos/google/actions/sdk/v2/conversation/prompt/prompt.proto", 19 | "../../protos/google/actions/sdk/v2/conversation/prompt/simple.proto", 20 | "../../protos/google/actions/sdk/v2/conversation/prompt/suggestion.proto", 21 | "../../protos/google/actions/sdk/v2/conversation/scene.proto", 22 | "../../protos/google/actions/sdk/v2/data_file.proto", 23 | "../../protos/google/actions/sdk/v2/event_logs.proto", 24 | "../../protos/google/actions/sdk/v2/files.proto", 25 | "../../protos/google/actions/sdk/v2/interactionmodel/conditional_event.proto", 26 | "../../protos/google/actions/sdk/v2/interactionmodel/entity_set.proto", 27 | "../../protos/google/actions/sdk/v2/interactionmodel/event_handler.proto", 28 | "../../protos/google/actions/sdk/v2/interactionmodel/global_intent_event.proto", 29 | "../../protos/google/actions/sdk/v2/interactionmodel/intent.proto", 30 | "../../protos/google/actions/sdk/v2/interactionmodel/intent_event.proto", 31 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_canvas_prompt.proto", 32 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_card_prompt.proto", 33 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_collection_browse_prompt.proto", 34 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_collection_prompt.proto", 35 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_content_prompt.proto", 36 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_image_prompt.proto", 37 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_link_prompt.proto", 38 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_list_prompt.proto", 39 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_media_prompt.proto", 40 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_table_prompt.proto", 41 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/static_prompt.proto", 42 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/static_simple_prompt.proto", 43 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/suggestion.proto", 44 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/surface_capabilities.proto", 45 | "../../protos/google/actions/sdk/v2/interactionmodel/scene.proto", 46 | "../../protos/google/actions/sdk/v2/interactionmodel/slot.proto", 47 | "../../protos/google/actions/sdk/v2/interactionmodel/type/class_reference.proto", 48 | "../../protos/google/actions/sdk/v2/interactionmodel/type/entity_display.proto", 49 | "../../protos/google/actions/sdk/v2/interactionmodel/type/free_text_type.proto", 50 | "../../protos/google/actions/sdk/v2/interactionmodel/type/regular_expression_type.proto", 51 | "../../protos/google/actions/sdk/v2/interactionmodel/type/synonym_type.proto", 52 | "../../protos/google/actions/sdk/v2/interactionmodel/type/type.proto", 53 | "../../protos/google/actions/sdk/v2/localized_settings.proto", 54 | "../../protos/google/actions/sdk/v2/manifest.proto", 55 | "../../protos/google/actions/sdk/v2/release_channel.proto", 56 | "../../protos/google/actions/sdk/v2/settings.proto", 57 | "../../protos/google/actions/sdk/v2/surface.proto", 58 | "../../protos/google/actions/sdk/v2/theme_customization.proto", 59 | "../../protos/google/actions/sdk/v2/validation_results.proto", 60 | "../../protos/google/actions/sdk/v2/version.proto", 61 | "../../protos/google/actions/sdk/v2/webhook.proto" 62 | ] 63 | -------------------------------------------------------------------------------- /src/v2/actions_testing_client_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "interfaces": { 3 | "google.actions.sdk.v2.ActionsTesting": { 4 | "retry_codes": { 5 | "non_idempotent": [], 6 | "idempotent": [ 7 | "DEADLINE_EXCEEDED", 8 | "UNAVAILABLE" 9 | ] 10 | }, 11 | "retry_params": { 12 | "default": { 13 | "initial_retry_delay_millis": 100, 14 | "retry_delay_multiplier": 1.3, 15 | "max_retry_delay_millis": 60000, 16 | "initial_rpc_timeout_millis": 60000, 17 | "rpc_timeout_multiplier": 1, 18 | "max_rpc_timeout_millis": 60000, 19 | "total_timeout_millis": 600000 20 | } 21 | }, 22 | "methods": { 23 | "SendInteraction": { 24 | "timeout_millis": 60000, 25 | "retry_codes_name": "non_idempotent", 26 | "retry_params_name": "default" 27 | }, 28 | "MatchIntents": { 29 | "timeout_millis": 60000, 30 | "retry_codes_name": "non_idempotent", 31 | "retry_params_name": "default" 32 | }, 33 | "SetWebAndAppActivityControl": { 34 | "timeout_millis": 60000, 35 | "retry_codes_name": "non_idempotent", 36 | "retry_params_name": "default" 37 | } 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/v2/actions_testing_proto_list.json: -------------------------------------------------------------------------------- 1 | [ 2 | "../../protos/google/actions/sdk/v2/account_linking.proto", 3 | "../../protos/google/actions/sdk/v2/account_linking_secret.proto", 4 | "../../protos/google/actions/sdk/v2/action.proto", 5 | "../../protos/google/actions/sdk/v2/actions_sdk.proto", 6 | "../../protos/google/actions/sdk/v2/actions_testing.proto", 7 | "../../protos/google/actions/sdk/v2/config_file.proto", 8 | "../../protos/google/actions/sdk/v2/conversation/intent.proto", 9 | "../../protos/google/actions/sdk/v2/conversation/prompt/content/canvas.proto", 10 | "../../protos/google/actions/sdk/v2/conversation/prompt/content/card.proto", 11 | "../../protos/google/actions/sdk/v2/conversation/prompt/content/collection.proto", 12 | "../../protos/google/actions/sdk/v2/conversation/prompt/content/content.proto", 13 | "../../protos/google/actions/sdk/v2/conversation/prompt/content/image.proto", 14 | "../../protos/google/actions/sdk/v2/conversation/prompt/content/link.proto", 15 | "../../protos/google/actions/sdk/v2/conversation/prompt/content/list.proto", 16 | "../../protos/google/actions/sdk/v2/conversation/prompt/content/media.proto", 17 | "../../protos/google/actions/sdk/v2/conversation/prompt/content/table.proto", 18 | "../../protos/google/actions/sdk/v2/conversation/prompt/prompt.proto", 19 | "../../protos/google/actions/sdk/v2/conversation/prompt/simple.proto", 20 | "../../protos/google/actions/sdk/v2/conversation/prompt/suggestion.proto", 21 | "../../protos/google/actions/sdk/v2/conversation/scene.proto", 22 | "../../protos/google/actions/sdk/v2/data_file.proto", 23 | "../../protos/google/actions/sdk/v2/event_logs.proto", 24 | "../../protos/google/actions/sdk/v2/files.proto", 25 | "../../protos/google/actions/sdk/v2/interactionmodel/conditional_event.proto", 26 | "../../protos/google/actions/sdk/v2/interactionmodel/entity_set.proto", 27 | "../../protos/google/actions/sdk/v2/interactionmodel/event_handler.proto", 28 | "../../protos/google/actions/sdk/v2/interactionmodel/global_intent_event.proto", 29 | "../../protos/google/actions/sdk/v2/interactionmodel/intent.proto", 30 | "../../protos/google/actions/sdk/v2/interactionmodel/intent_event.proto", 31 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_canvas_prompt.proto", 32 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_card_prompt.proto", 33 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_collection_browse_prompt.proto", 34 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_collection_prompt.proto", 35 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_content_prompt.proto", 36 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_image_prompt.proto", 37 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_link_prompt.proto", 38 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_list_prompt.proto", 39 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_media_prompt.proto", 40 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/content/static_table_prompt.proto", 41 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/static_prompt.proto", 42 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/static_simple_prompt.proto", 43 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/suggestion.proto", 44 | "../../protos/google/actions/sdk/v2/interactionmodel/prompt/surface_capabilities.proto", 45 | "../../protos/google/actions/sdk/v2/interactionmodel/scene.proto", 46 | "../../protos/google/actions/sdk/v2/interactionmodel/slot.proto", 47 | "../../protos/google/actions/sdk/v2/interactionmodel/type/class_reference.proto", 48 | "../../protos/google/actions/sdk/v2/interactionmodel/type/entity_display.proto", 49 | "../../protos/google/actions/sdk/v2/interactionmodel/type/free_text_type.proto", 50 | "../../protos/google/actions/sdk/v2/interactionmodel/type/regular_expression_type.proto", 51 | "../../protos/google/actions/sdk/v2/interactionmodel/type/synonym_type.proto", 52 | "../../protos/google/actions/sdk/v2/interactionmodel/type/type.proto", 53 | "../../protos/google/actions/sdk/v2/localized_settings.proto", 54 | "../../protos/google/actions/sdk/v2/manifest.proto", 55 | "../../protos/google/actions/sdk/v2/release_channel.proto", 56 | "../../protos/google/actions/sdk/v2/settings.proto", 57 | "../../protos/google/actions/sdk/v2/surface.proto", 58 | "../../protos/google/actions/sdk/v2/theme_customization.proto", 59 | "../../protos/google/actions/sdk/v2/validation_results.proto", 60 | "../../protos/google/actions/sdk/v2/version.proto", 61 | "../../protos/google/actions/sdk/v2/webhook.proto" 62 | ] 63 | -------------------------------------------------------------------------------- /src/v2/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | // ** This file is automatically generated by gapic-generator-typescript. ** 16 | // ** https://github.com/googleapis/gapic-generator-typescript ** 17 | // ** All changes to this file may be overwritten. ** 18 | 19 | export {ActionsSdkClient} from './actions_sdk_client'; 20 | export {ActionsTestingClient} from './actions_testing_client'; 21 | -------------------------------------------------------------------------------- /synth.metadata: -------------------------------------------------------------------------------- 1 | { 2 | "sources": [ 3 | { 4 | "git": { 5 | "name": "googleapis", 6 | "remote": "https://github.com/googleapis/googleapis.git", 7 | "sha": "7e17784e6465431981f36806e6376d69de1fc424", 8 | "internalRef": "341987835" 9 | } 10 | } 11 | ], 12 | "destinations": [ 13 | { 14 | "client": { 15 | "source": "googleapis", 16 | "apiName": "actions", 17 | "apiVersion": "v2", 18 | "language": "nodejs", 19 | "generator": "bazel" 20 | } 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /synth.py: -------------------------------------------------------------------------------- 1 | # Copyright 2020 Google LLC 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """This script is used to synthesize generated parts of this library.""" 15 | 16 | import synthtool as s 17 | import synthtool.gcp as gcp 18 | import synthtool.languages.node as node 19 | import subprocess 20 | import logging 21 | 22 | logging.basicConfig(level=logging.DEBUG) 23 | 24 | # run the gapic generator 25 | gapic = gcp.GAPICBazel() 26 | library = gapic.node_library('actions', 'v2', proto_path='google/actions/sdk/v2') 27 | s.copy(library, excludes=['README.md', 'package.json', 'linkinator.config.json']) 28 | 29 | node.postprocess_gapic_library() 30 | -------------------------------------------------------------------------------- /system-test/fixtures/sample/src/index.js: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | // ** This file is automatically generated by gapic-generator-typescript. ** 16 | // ** https://github.com/googleapis/gapic-generator-typescript ** 17 | // ** All changes to this file may be overwritten. ** 18 | 19 | 20 | /* eslint-disable node/no-missing-require, no-unused-vars */ 21 | const sdk = require('@assistant/actions'); 22 | 23 | function main() { 24 | const actionsSdkClient = new sdk.ActionsSdkClient(); 25 | const actionsTestingClient = new sdk.ActionsTestingClient(); 26 | } 27 | 28 | main(); 29 | -------------------------------------------------------------------------------- /system-test/fixtures/sample/src/index.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | // ** This file is automatically generated by gapic-generator-typescript. ** 16 | // ** https://github.com/googleapis/gapic-generator-typescript ** 17 | // ** All changes to this file may be overwritten. ** 18 | 19 | import {ActionsSdkClient, ActionsTestingClient} from '@assistant/actions'; 20 | 21 | // check that the client class type name can be used 22 | function doStuffWithActionsSdkClient(client: ActionsSdkClient) { 23 | client.close(); 24 | } 25 | function doStuffWithActionsTestingClient(client: ActionsTestingClient) { 26 | client.close(); 27 | } 28 | 29 | function main() { 30 | // check that the client instance can be created 31 | const actionsSdkClient = new ActionsSdkClient(); 32 | doStuffWithActionsSdkClient(actionsSdkClient); 33 | // check that the client instance can be created 34 | const actionsTestingClient = new ActionsTestingClient(); 35 | doStuffWithActionsTestingClient(actionsTestingClient); 36 | } 37 | 38 | main(); 39 | -------------------------------------------------------------------------------- /system-test/install.ts: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | // 15 | // ** This file is automatically generated by gapic-generator-typescript. ** 16 | // ** https://github.com/googleapis/gapic-generator-typescript ** 17 | // ** All changes to this file may be overwritten. ** 18 | 19 | import { packNTest } from 'pack-n-play'; 20 | import { readFileSync } from 'fs'; 21 | import { describe, it } from 'mocha'; 22 | 23 | describe('📦 pack-n-play test', () => { 24 | 25 | it('TypeScript code', async function() { 26 | this.timeout(300000); 27 | const options = { 28 | packageDir: process.cwd(), 29 | sample: { 30 | description: 'TypeScript user can use the type definitions', 31 | ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() 32 | } 33 | }; 34 | await packNTest(options); 35 | }); 36 | 37 | it('JavaScript code', async function() { 38 | this.timeout(300000); 39 | const options = { 40 | packageDir: process.cwd(), 41 | sample: { 42 | description: 'JavaScript user can use the library', 43 | ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() 44 | } 45 | }; 46 | await packNTest(options); 47 | }); 48 | 49 | }); 50 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./node_modules/gts/tsconfig-google.json", 3 | "compilerOptions": { 4 | "rootDir": ".", 5 | "outDir": "build", 6 | "resolveJsonModule": true, 7 | "lib": [ 8 | "es2018", 9 | "dom" 10 | ] 11 | }, 12 | "include": [ 13 | "src/*.ts", 14 | "src/**/*.ts", 15 | "test/*.ts", 16 | "test/**/*.ts", 17 | "system-test/*.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | // Copyright 2021 Google LLC 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // https://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | const path = require('path'); 16 | 17 | module.exports = { 18 | entry: './src/index.ts', 19 | output: { 20 | library: 'ActionsSdk', 21 | filename: './actions-sdk.js', 22 | }, 23 | node: { 24 | child_process: 'empty', 25 | fs: 'empty', 26 | crypto: 'empty', 27 | }, 28 | resolve: { 29 | alias: { 30 | '../../../package.json': path.resolve(__dirname, 'package.json'), 31 | }, 32 | extensions: ['.js', '.json', '.ts'], 33 | }, 34 | module: { 35 | rules: [ 36 | { 37 | test: /\.tsx?$/, 38 | use: 'ts-loader', 39 | exclude: /node_modules/ 40 | }, 41 | { 42 | test: /node_modules[\\/]@grpc[\\/]grpc-js/, 43 | use: 'null-loader' 44 | }, 45 | { 46 | test: /node_modules[\\/]grpc/, 47 | use: 'null-loader' 48 | }, 49 | { 50 | test: /node_modules[\\/]retry-request/, 51 | use: 'null-loader' 52 | }, 53 | { 54 | test: /node_modules[\\/]https?-proxy-agent/, 55 | use: 'null-loader' 56 | }, 57 | { 58 | test: /node_modules[\\/]gtoken/, 59 | use: 'null-loader' 60 | }, 61 | ], 62 | }, 63 | mode: 'production', 64 | }; 65 | --------------------------------------------------------------------------------