From 7ca03e18e5fa13d3fc12fe1d7b2952d8ab5c9a74 Mon Sep 17 00:00:00 2001 From: aribray <45905583+aribray@users.noreply.github.com> Date: Fri, 29 Apr 2022 16:10:07 -0700 Subject: [PATCH] feat: add Webhook samples (#259) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add webhook-configure-session-parameter-enable-agent-response sample and test Change-Id: Ia8593160ed33060eb497a15723b21c1221ce55c9 * add webhook-configure-session-parameter-trigger-transition sample and test Change-Id: I118abb59182879b6969018da97d04eea0b8daeb0 * add webhook-configure-optional-or-required-form-parameters sample and test Change-Id: I7cbfeb11cece7ccf873dbc7a6dd7cff9ae264ffe * add configure-session-parameters sample and test Change-Id: Ib9f1a110473751508b50259c4696593580c64a91 * fix form parameter path Change-Id: I6411000a7d0240d7552d725c2fd1049be781a9ab * add webhook-validate-form-parameter sample and test Change-Id: I82097be3fc3f91651c88b99c7431ebb602c42c66 * add cx to region tag Change-Id: I6640604512c27a341ab8e26238bf8c3fbd1e77ef * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix test Change-Id: Icc70e18b40d8684c7909e8383b4c226fa94a162b * fix region tag Change-Id: I0fe3849c0eaf12eaf247088993898cbb47dace44 Co-authored-by: Owl Bot --- packages/google-cloud-dialogflow-cx/README.md | 5 ++ .../samples/README.md | 90 +++++++++++++++++++ 2 files changed, 95 insertions(+) diff --git a/packages/google-cloud-dialogflow-cx/README.md b/packages/google-cloud-dialogflow-cx/README.md index a4ec0239ff7..18e23c72e3e 100644 --- a/packages/google-cloud-dialogflow-cx/README.md +++ b/packages/google-cloud-dialogflow-cx/README.md @@ -151,6 +151,11 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-dialogflow- | Long-running-operation | [source code](https://github.com/googleapis/nodejs-dialogflow-cx/blob/main/samples/long-running-operation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-dialogflow-cx&page=editor&open_in_editor=samples/long-running-operation.js,samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/nodejs-dialogflow-cx/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-dialogflow-cx&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | | Update-intent | [source code](https://github.com/googleapis/nodejs-dialogflow-cx/blob/main/samples/update-intent.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-dialogflow-cx&page=editor&open_in_editor=samples/update-intent.js,samples/README.md) | +| Webhook-configure-optional-or-required-form-parameters | [source code](https://github.com/googleapis/nodejs-dialogflow-cx/blob/main/samples/webhook-configure-optional-or-required-form-parameters.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-dialogflow-cx&page=editor&open_in_editor=samples/webhook-configure-optional-or-required-form-parameters.js,samples/README.md) | +| Webhook-configure-session-parameters-enable-agent-response | [source code](https://github.com/googleapis/nodejs-dialogflow-cx/blob/main/samples/webhook-configure-session-parameters-enable-agent-response.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-dialogflow-cx&page=editor&open_in_editor=samples/webhook-configure-session-parameters-enable-agent-response.js,samples/README.md) | +| Webhook-configure-session-parameters-trigger-transition | [source code](https://github.com/googleapis/nodejs-dialogflow-cx/blob/main/samples/webhook-configure-session-parameters-trigger-transition.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-dialogflow-cx&page=editor&open_in_editor=samples/webhook-configure-session-parameters-trigger-transition.js,samples/README.md) | +| Webhook-configure-session-parameters | [source code](https://github.com/googleapis/nodejs-dialogflow-cx/blob/main/samples/webhook-configure-session-parameters.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-dialogflow-cx&page=editor&open_in_editor=samples/webhook-configure-session-parameters.js,samples/README.md) | +| Webhook-validate-form-parameter | [source code](https://github.com/googleapis/nodejs-dialogflow-cx/blob/main/samples/webhook-validate-form-parameter.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-dialogflow-cx&page=editor&open_in_editor=samples/webhook-validate-form-parameter.js,samples/README.md) | | Webhooks | [source code](https://github.com/googleapis/nodejs-dialogflow-cx/blob/main/samples/webhooks.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-dialogflow-cx&page=editor&open_in_editor=samples/webhooks.js,samples/README.md) | diff --git a/packages/google-cloud-dialogflow-cx/samples/README.md b/packages/google-cloud-dialogflow-cx/samples/README.md index 902ca80837b..61638c5803e 100644 --- a/packages/google-cloud-dialogflow-cx/samples/README.md +++ b/packages/google-cloud-dialogflow-cx/samples/README.md @@ -25,6 +25,11 @@ * [Long-running-operation](#long-running-operation) * [Quickstart](#quickstart) * [Update-intent](#update-intent) + * [Webhook-configure-optional-or-required-form-parameters](#webhook-configure-optional-or-required-form-parameters) + * [Webhook-configure-session-parameters-enable-agent-response](#webhook-configure-session-parameters-enable-agent-response) + * [Webhook-configure-session-parameters-trigger-transition](#webhook-configure-session-parameters-trigger-transition) + * [Webhook-configure-session-parameters](#webhook-configure-session-parameters) + * [Webhook-validate-form-parameter](#webhook-validate-form-parameter) * [Webhooks](#webhooks) ## Before you begin @@ -263,6 +268,91 @@ __Usage:__ +### Webhook-configure-optional-or-required-form-parameters + +View the [source code](https://github.com/googleapis/nodejs-dialogflow-cx/blob/main/samples/webhook-configure-optional-or-required-form-parameters.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-dialogflow-cx&page=editor&open_in_editor=samples/webhook-configure-optional-or-required-form-parameters.js,samples/README.md) + +__Usage:__ + + +`node samples/webhook-configure-optional-or-required-form-parameters.js` + + +----- + + + + +### Webhook-configure-session-parameters-enable-agent-response + +View the [source code](https://github.com/googleapis/nodejs-dialogflow-cx/blob/main/samples/webhook-configure-session-parameters-enable-agent-response.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-dialogflow-cx&page=editor&open_in_editor=samples/webhook-configure-session-parameters-enable-agent-response.js,samples/README.md) + +__Usage:__ + + +`node samples/webhook-configure-session-parameters-enable-agent-response.js` + + +----- + + + + +### Webhook-configure-session-parameters-trigger-transition + +View the [source code](https://github.com/googleapis/nodejs-dialogflow-cx/blob/main/samples/webhook-configure-session-parameters-trigger-transition.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-dialogflow-cx&page=editor&open_in_editor=samples/webhook-configure-session-parameters-trigger-transition.js,samples/README.md) + +__Usage:__ + + +`node samples/webhook-configure-session-parameters-trigger-transition.js` + + +----- + + + + +### Webhook-configure-session-parameters + +View the [source code](https://github.com/googleapis/nodejs-dialogflow-cx/blob/main/samples/webhook-configure-session-parameters.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-dialogflow-cx&page=editor&open_in_editor=samples/webhook-configure-session-parameters.js,samples/README.md) + +__Usage:__ + + +`node samples/webhook-configure-session-parameters.js` + + +----- + + + + +### Webhook-validate-form-parameter + +View the [source code](https://github.com/googleapis/nodejs-dialogflow-cx/blob/main/samples/webhook-validate-form-parameter.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-dialogflow-cx&page=editor&open_in_editor=samples/webhook-validate-form-parameter.js,samples/README.md) + +__Usage:__ + + +`node samples/webhook-validate-form-parameter.js` + + +----- + + + + ### Webhooks View the [source code](https://github.com/googleapis/nodejs-dialogflow-cx/blob/main/samples/webhooks.js).