Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
feat: include original user query in WebhookRequest; add GetTextCaser…
Browse files Browse the repository at this point in the history
…esult API. doc: clarify resource format for session response. (#82)

* feat: include original user query in WebhookRequest; add GetTextCaseresult API. doc: clarify resource format for session response.

PiperOrigin-RevId: 364734171

Source-Link: googleapis/googleapis@551ddbb

Source-Link: googleapis/googleapis-gen@19c469f

* 🦉 Updates from OwlBot

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Mar 24, 2021
1 parent 275ee05 commit ff13a97
Show file tree
Hide file tree
Showing 12 changed files with 839 additions and 15 deletions.
16 changes: 12 additions & 4 deletions protos/google/cloud/dialogflow/cx/v3beta1/session.proto
Original file line number Diff line number Diff line change
Expand Up @@ -452,10 +452,14 @@ message QueryResult {

// If an [intent][google.cloud.dialogflow.cx.v3beta1.IntentInput] was provided as input, this field will
// contain a copy of the intent identifier.
string trigger_intent = 11;
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/intents/<Intent ID>`.
string trigger_intent = 11 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Intent"
}];

// If [natural language speech audio][google.cloud.dialogflow.cx.v3beta1.AudioInput] was provided as input,
// this field will contain the trascript for the audio.
// this field will contain the transcript for the audio.
string transcript = 12;

// If an [event][google.cloud.dialogflow.cx.v3beta1.EventInput] was provided as input, this field will contain
Expand Down Expand Up @@ -694,10 +698,14 @@ message MatchIntentResponse {

// If an [intent][google.cloud.dialogflow.cx.v3beta1.IntentInput] was provided as input, this field will
// contain a copy of the intent identifier.
string trigger_intent = 2;
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/intents/<Intent ID>`.
string trigger_intent = 2 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Intent"
}];

// If [natural language speech audio][google.cloud.dialogflow.cx.v3beta1.AudioInput] was provided as input,
// this field will contain the trascript for the audio.
// this field will contain the transcript for the audio.
string transcript = 3;

// If an [event][google.cloud.dialogflow.cx.v3beta1.EventInput] was provided as input, this field will
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ service SessionEntityTypes {
}

// Creates a session entity type.
//
// If the specified session entity type already exists, overrides the
// session entity type.
rpc CreateSessionEntityType(CreateSessionEntityTypeRequest) returns (SessionEntityType) {
option (google.api.http) = {
post: "/v3beta1/{parent=projects/*/locations/*/agents/*/sessions/*}/entityTypes"
Expand Down
21 changes: 21 additions & 0 deletions protos/google/cloud/dialogflow/cx/v3beta1/test_case.proto
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,14 @@ service TestCases {
};
option (google.api.method_signature) = "parent";
}

// Gets a test case result.
rpc GetTestCaseResult(GetTestCaseResultRequest) returns (TestCaseResult) {
option (google.api.http) = {
get: "/v3beta1/{name=projects/*/locations/*/agents/*/testCases/*/results/*}"
};
option (google.api.method_signature) = "name";
}
}

// Represents a test case.
Expand Down Expand Up @@ -862,6 +870,19 @@ message ListTestCaseResultsResponse {
string next_page_token = 2;
}

// The request message for [TestCases.GetTestCaseResult][google.cloud.dialogflow.cx.v3beta1.TestCases.GetTestCaseResult].
message GetTestCaseResultRequest {
// Required. The name of the testcase.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/testCases/<TestCase ID>/results/<TestCaseResult ID>`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/TestCaseResult"
}
];
}

// The test result for a test case and an agent environment.
enum TestResult {
// Not specified. Should never be used.
Expand Down
31 changes: 28 additions & 3 deletions protos/google/cloud/dialogflow/cx/v3beta1/webhook.proto
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ message DeleteWebhookRequest {
bool force = 2;
}

// The request message for a webhook call.
// The request message for a webhook call. The request is sent as a JSON object
// and the field names will be presented in camel cases.
message WebhookRequest {
// Represents fulfillment information communicated to the webhook.
message FulfillmentInfo {
Expand All @@ -253,8 +254,9 @@ message WebhookRequest {
}

// Always present. The unique identifier of the last matched
// [intent][google.cloud.dialogflow.cx.v3beta1.Intent]. Format: `projects/<Project ID>/locations/<Location
// ID>/agents/<Agent ID>/intents/<Intent ID>`.
// [intent][google.cloud.dialogflow.cx.v3beta1.Intent].
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/intents/<Intent ID>`.
string last_matched_intent = 1 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Intent"
}];
Expand Down Expand Up @@ -289,6 +291,29 @@ message WebhookRequest {
// will be returned to the API caller.
string detect_intent_response_id = 1;

// The original conversational query.
oneof query {
// If [natural language text][google.cloud.dialogflow.cx.v3beta1.TextInput] was provided as input, this field
// will contain a copy of the text.
string text = 10;

// If an [intent][google.cloud.dialogflow.cx.v3beta1.IntentInput] was provided as input, this field will
// contain a copy of the intent identifier.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/intents/<Intent ID>`.
string trigger_intent = 11 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Intent"
}];

// If [natural language speech audio][google.cloud.dialogflow.cx.v3beta1.AudioInput] was provided as input,
// this field will contain the transcript for the audio.
string transcript = 12;

// If an [event][google.cloud.dialogflow.cx.v3beta1.EventInput] was provided as input, this field will contain
// the name of the event.
string trigger_event = 14;
}

// Always present. Information about the fulfillment that triggered this
// webhook call.
FulfillmentInfo fulfillment_info = 6;
Expand Down
138 changes: 138 additions & 0 deletions protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ff13a97

Please sign in to comment.