Skip to content

Commit 64af37a

Browse files
feat: [dialogflow-cx] add support for flexible webhook (#4334)
- [ ] Regenerate this pull request now. docs: update synthesize speech configs's documentation PiperOrigin-RevId: 539265734 Source-Link: https://togithub.com/googleapis/googleapis/commit/091bc8c603d028cab2ea8074417ef9f191adb869 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/ca652d5e3b92aac32c1aa28589e0421c3e5b7bc5 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctY3gvLk93bEJvdC55YW1sIiwiaCI6ImNhNjUyZDVlM2I5MmFhYzMyYzFhYTI4NTg5ZTA0MjFjM2U1YjdiYzUifQ== BEGIN_NESTED_COMMIT feat: [dialogflow-cx] add support for flexible webhook docs: update synthesize speech configs's documentation PiperOrigin-RevId: 539265592 Source-Link: https://togithub.com/googleapis/googleapis/commit/2f59906698328d577734707dd442dd00db7b6320 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/b92963b88b826eafc045c886b04962b4cc29e8ef Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctY3gvLk93bEJvdC55YW1sIiwiaCI6ImI5Mjk2M2I4OGI4MjZlYWZjMDQ1Yzg4NmIwNDk2MmI0Y2MyOWU4ZWYifQ== END_NESTED_COMMIT
1 parent 342a28c commit 64af37a

9 files changed

Lines changed: 820 additions & 14 deletions

File tree

packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/audio_config.proto

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,9 @@ message OutputAudioConfig {
320320
int32 sample_rate_hertz = 2;
321321

322322
// Optional. Configuration of how speech should be synthesized.
323+
// If not specified,
324+
// [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings]
325+
// is applied.
323326
SynthesizeSpeechConfig synthesize_speech_config = 3;
324327
}
325328

@@ -331,12 +334,16 @@ message TextToSpeechSettings {
331334
//
332335
// These settings affect:
333336
//
334-
// - The synthesize configuration used in [phone
335-
// gateway](https://cloud.google.com/dialogflow/cx/docs/concept/integration/phone-gateway).
337+
// - The [phone
338+
// gateway](https://cloud.google.com/dialogflow/cx/docs/concept/integration/phone-gateway)
339+
// synthesize configuration set via
340+
// [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings].
336341
//
337-
// - You no longer need to specify
342+
// - How speech is synthesized when invoking
343+
// [session][google.cloud.dialogflow.cx.v3.Sessions] APIs.
344+
// [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3.Agent.text_to_speech_settings]
345+
// only applies if
338346
// [OutputAudioConfig.synthesize_speech_config][google.cloud.dialogflow.cx.v3.OutputAudioConfig.synthesize_speech_config]
339-
// when invoking API calls. Your agent will use the pre-configured options
340-
// for speech synthesizing.
347+
// is not specified.
341348
map<string, SynthesizeSpeechConfig> synthesize_speech_configs = 1;
342349
}

packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/test_case.proto

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,8 @@ message TestRunDifference {
403403
// The type of diff.
404404
DiffType type = 1;
405405

406-
// A description of the diff, showing the actual output vs expected output.
406+
// A human readable description of the diff, showing the actual output vs
407+
// expected output.
407408
string description = 2;
408409
}
409410

packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/webhook.proto

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,45 @@ message Webhook {
101101

102102
// Represents configuration for a generic web service.
103103
message GenericWebService {
104+
// Represents the type of webhook configuration.
105+
enum WebhookType {
106+
// Default value. This value is unused.
107+
WEBHOOK_TYPE_UNSPECIFIED = 0;
108+
109+
// Represents a standard webhook.
110+
STANDARD = 1;
111+
112+
// Represents a flexible webhook.
113+
FLEXIBLE = 2;
114+
}
115+
116+
// HTTP method to use when calling webhooks.
117+
enum HttpMethod {
118+
// HTTP method not specified.
119+
HTTP_METHOD_UNSPECIFIED = 0;
120+
121+
// HTTP POST Method.
122+
POST = 1;
123+
124+
// HTTP GET Method.
125+
GET = 2;
126+
127+
// HTTP HEAD Method.
128+
HEAD = 3;
129+
130+
// HTTP PUT Method.
131+
PUT = 4;
132+
133+
// HTTP DELETE Method.
134+
DELETE = 5;
135+
136+
// HTTP PATCH Method.
137+
PATCH = 6;
138+
139+
// HTTP OPTIONS Method.
140+
OPTIONS = 7;
141+
}
142+
104143
// Required. The webhook URI for receiving POST requests. It must use https
105144
// protocol.
106145
string uri = 1 [(google.api.field_behavior) = REQUIRED];
@@ -129,6 +168,24 @@ message Webhook {
129168
// ```
130169
repeated bytes allowed_ca_certs = 5
131170
[(google.api.field_behavior) = OPTIONAL];
171+
172+
// Optional. Type of the webhook.
173+
WebhookType webhook_type = 6 [(google.api.field_behavior) = OPTIONAL];
174+
175+
// Optional. HTTP method for the flexible webhook calls. Standard webhook
176+
// always uses POST.
177+
HttpMethod http_method = 7 [(google.api.field_behavior) = OPTIONAL];
178+
179+
// Optional. Defines a custom JSON object as request body to send to
180+
// flexible webhook.
181+
string request_body = 8 [(google.api.field_behavior) = OPTIONAL];
182+
183+
// Optional. Maps the values extracted from specific fields of the flexible
184+
// webhook response into session parameters.
185+
// - Key: session parameter name
186+
// - Value: field path in the webhook response
187+
map<string, string> parameter_mapping = 9
188+
[(google.api.field_behavior) = OPTIONAL];
132189
}
133190

134191
// Represents configuration for a [Service

packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,9 @@ message OutputAudioConfig {
320320
int32 sample_rate_hertz = 2;
321321

322322
// Optional. Configuration of how speech should be synthesized.
323+
// If not specified,
324+
// [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3beta1.Agent.text_to_speech_settings]
325+
// is applied.
323326
SynthesizeSpeechConfig synthesize_speech_config = 3;
324327
}
325328

@@ -331,12 +334,16 @@ message TextToSpeechSettings {
331334
//
332335
// These settings affect:
333336
//
334-
// - The synthesize configuration used in [phone
335-
// gateway](https://cloud.google.com/dialogflow/cx/docs/concept/integration/phone-gateway).
337+
// - The [phone
338+
// gateway](https://cloud.google.com/dialogflow/cx/docs/concept/integration/phone-gateway)
339+
// synthesize configuration set via
340+
// [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3beta1.Agent.text_to_speech_settings].
336341
//
337-
// - You no longer need to specify
342+
// - How speech is synthesized when invoking
343+
// [session][google.cloud.dialogflow.cx.v3beta1.Sessions] APIs.
344+
// [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3beta1.Agent.text_to_speech_settings]
345+
// only applies if
338346
// [OutputAudioConfig.synthesize_speech_config][google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.synthesize_speech_config]
339-
// when invoking API calls. Your agent will use the pre-configured options
340-
// for speech synthesizing.
347+
// is not specified.
341348
map<string, SynthesizeSpeechConfig> synthesize_speech_configs = 1;
342349
}

packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/test_case.proto

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,8 @@ message TestRunDifference {
406406
// The type of diff.
407407
DiffType type = 1;
408408

409-
// A description of the diff, showing the actual output vs expected output.
409+
// A human readable description of the diff, showing the actual output vs
410+
// expected output.
410411
string description = 2;
411412
}
412413

packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3beta1/webhook.proto

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,45 @@ message Webhook {
101101

102102
// Represents configuration for a generic web service.
103103
message GenericWebService {
104+
// Represents the type of webhook configuration.
105+
enum WebhookType {
106+
// Default value. This value is unused.
107+
WEBHOOK_TYPE_UNSPECIFIED = 0;
108+
109+
// Represents a standard webhook.
110+
STANDARD = 1;
111+
112+
// Represents a flexible webhook.
113+
FLEXIBLE = 2;
114+
}
115+
116+
// HTTP method to use when calling webhooks.
117+
enum HttpMethod {
118+
// HTTP method not specified.
119+
HTTP_METHOD_UNSPECIFIED = 0;
120+
121+
// HTTP POST Method.
122+
POST = 1;
123+
124+
// HTTP GET Method.
125+
GET = 2;
126+
127+
// HTTP HEAD Method.
128+
HEAD = 3;
129+
130+
// HTTP PUT Method.
131+
PUT = 4;
132+
133+
// HTTP DELETE Method.
134+
DELETE = 5;
135+
136+
// HTTP PATCH Method.
137+
PATCH = 6;
138+
139+
// HTTP OPTIONS Method.
140+
OPTIONS = 7;
141+
}
142+
104143
// Required. The webhook URI for receiving POST requests. It must use https
105144
// protocol.
106145
string uri = 1 [(google.api.field_behavior) = REQUIRED];
@@ -129,6 +168,24 @@ message Webhook {
129168
// ```
130169
repeated bytes allowed_ca_certs = 5
131170
[(google.api.field_behavior) = OPTIONAL];
171+
172+
// Optional. Type of the webhook.
173+
WebhookType webhook_type = 6 [(google.api.field_behavior) = OPTIONAL];
174+
175+
// Optional. HTTP method for the flexible webhook calls. Standard webhook
176+
// always uses POST.
177+
HttpMethod http_method = 7 [(google.api.field_behavior) = OPTIONAL];
178+
179+
// Optional. Defines a custom JSON object as request body to send to
180+
// flexible webhook.
181+
string request_body = 8 [(google.api.field_behavior) = OPTIONAL];
182+
183+
// Optional. Maps the values extracted from specific fields of the flexible
184+
// webhook response into session parameters.
185+
// - Key: session parameter name
186+
// - Value: field path in the webhook response
187+
map<string, string> parameter_mapping = 9
188+
[(google.api.field_behavior) = OPTIONAL];
132189
}
133190

134191
// Represents configuration for a [Service

packages/google-cloud-dialogflow-cx/protos/protos.d.ts

Lines changed: 92 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)