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

Commit a0124c7

Browse files
fix: do not modify options object, use defaultScopes (#27)
* fix: do not modify options object, use defaultScopes Regenerated the library using gapic-generator-typescript v1.2.1. * fix(deps): require google-gax ^2.9.2
1 parent ef4ceef commit a0124c7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+3175
-1695
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"samples-test": "cd samples/ && npm link ../ && npm test"
5151
},
5252
"dependencies": {
53-
"google-gax": "^2.7.0"
53+
"google-gax": "^2.9.2"
5454
},
5555
"devDependencies": {
5656
"@types/mocha": "^8.0.2",

protos/google/cloud/dialogflow/cx/v3beta1/agent.proto

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ service Agents {
8282
option (google.api.method_signature) = "name";
8383
}
8484

85-
// Exports the specified agent to a ZIP file.
85+
// Exports the specified agent to a binary file.
8686
rpc ExportAgent(ExportAgentRequest) returns (google.longrunning.Operation) {
8787
option (google.api.http) = {
8888
post: "/v3beta1/{name=projects/*/locations/*/agents/*}:export"
@@ -94,10 +94,10 @@ service Agents {
9494
};
9595
}
9696

97-
// Restores the specified agent from a ZIP file.
97+
// Restores the specified agent from a binary file.
9898
//
99-
// Note that all existing intents, intent routes, entity types, pages and
100-
// webhooks in the agent will be deleted.
99+
// Replaces the current agent with a new one. Note that all existing resources
100+
// in agent (e.g. intents, entity types, flows) will be removed.
101101
rpc RestoreAgent(RestoreAgentRequest) returns (google.longrunning.Operation) {
102102
option (google.api.http) = {
103103
post: "/v3beta1/{name=projects/*/locations/*/agents/*}:restore"

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

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ syntax = "proto3";
1616

1717
package google.cloud.dialogflow.cx.v3beta1;
1818

19-
import "google/api/annotations.proto";
2019
import "google/api/field_behavior.proto";
2120
import "google/api/resource.proto";
2221
import "google/protobuf/duration.proto";
22+
import "google/api/annotations.proto";
2323

2424
option cc_enable_arenas = true;
2525
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1";
@@ -115,12 +115,10 @@ message InputAudioConfig {
115115
// more details.
116116
int32 sample_rate_hertz = 2;
117117

118-
// Optional. If `true`, Dialogflow returns
119-
// [SpeechWordInfo][google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo] in
120-
// [StreamingRecognitionResult][google.cloud.dialogflow.cx.v3beta1.StreamingRecognitionResult]
121-
// with information about the recognized speech words, e.g. start and end time
122-
// offsets. If false or unspecified, Speech doesn't return any word-level
123-
// information.
118+
// Optional. If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo] in
119+
// [StreamingRecognitionResult][google.cloud.dialogflow.cx.v3beta1.StreamingRecognitionResult] with information about the recognized speech
120+
// words, e.g. start and end time offsets. If false or unspecified, Speech
121+
// doesn't return any word-level information.
124122
bool enable_word_info = 13;
125123

126124
// Optional. A list of strings containing words and phrases that the speech
@@ -144,8 +142,7 @@ message InputAudioConfig {
144142
// for more details.
145143
string model = 7;
146144

147-
// Optional. Which variant of the [Speech
148-
// model][google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.model] to use.
145+
// Optional. Which variant of the [Speech model][google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.model] to use.
149146
SpeechModelVariant model_variant = 10;
150147

151148
// Optional. If `false` (default), recognition does not cease until the
@@ -159,8 +156,7 @@ message InputAudioConfig {
159156
bool single_utterance = 8;
160157
}
161158

162-
// Variant of the specified [Speech
163-
// model][google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.model] to use.
159+
// Variant of the specified [Speech model][google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.model] to use.
164160
//
165161
// See the [Cloud Speech
166162
// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models)
@@ -189,8 +185,8 @@ enum SpeechModelVariant {
189185
// Use an enhanced model variant:
190186
//
191187
// * If an enhanced variant does not exist for the given
192-
// [model][google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.model] and
193-
// request language, Dialogflow falls back to the standard variant.
188+
// [model][google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.model] and request language, Dialogflow falls
189+
// back to the standard variant.
194190
//
195191
// The [Cloud Speech
196192
// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models)
@@ -212,10 +208,9 @@ message VoiceSelectionParams {
212208

213209
// Optional. The preferred gender of the voice. If not set, the service will
214210
// choose a voice based on the other parameters such as language_code and
215-
// [name][google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.name]. Note
216-
// that this is only a preference, not requirement. If a voice of the
217-
// appropriate gender is not available, the synthesizer should substitute a
218-
// voice with a different gender rather than failing the request.
211+
// [name][google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.name]. Note that this is only a preference, not requirement. If a
212+
// voice of the appropriate gender is not available, the synthesizer should
213+
// substitute a voice with a different gender rather than failing the request.
219214
SsmlVoiceGender ssml_gender = 2;
220215
}
221216

@@ -271,8 +266,7 @@ enum SsmlVoiceGender {
271266
// Instructs the speech synthesizer how to generate the output audio content.
272267
message OutputAudioConfig {
273268
// Required. Audio encoding of the synthesized audio content.
274-
OutputAudioEncoding audio_encoding = 1
275-
[(google.api.field_behavior) = REQUIRED];
269+
OutputAudioEncoding audio_encoding = 1 [(google.api.field_behavior) = REQUIRED];
276270

277271
// Optional. The synthesis sample rate (in hertz) for this audio. If not
278272
// provided, then the synthesizer will use the default sample rate based on

protos/google/cloud/dialogflow/cx/v3beta1/entity_type.proto

Lines changed: 15 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,15 @@ option java_outer_classname = "EntityTypeProto";
3131
option java_package = "com.google.cloud.dialogflow.cx.v3beta1";
3232
option objc_class_prefix = "DF";
3333

34-
// Service for managing
35-
// [EntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityType].
34+
// Service for managing [EntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityType].
3635
service EntityTypes {
3736
option (google.api.default_host) = "dialogflow.googleapis.com";
3837
option (google.api.oauth_scopes) =
3938
"https://www.googleapis.com/auth/cloud-platform,"
4039
"https://www.googleapis.com/auth/dialogflow";
4140

4241
// Returns the list of all entity types in the specified agent.
43-
rpc ListEntityTypes(ListEntityTypesRequest)
44-
returns (ListEntityTypesResponse) {
42+
rpc ListEntityTypes(ListEntityTypesRequest) returns (ListEntityTypesResponse) {
4543
option (google.api.http) = {
4644
get: "/v3beta1/{parent=projects/*/locations/*/agents/*}/entityTypes"
4745
};
@@ -75,8 +73,7 @@ service EntityTypes {
7573
}
7674

7775
// Deletes the specified entity type.
78-
rpc DeleteEntityType(DeleteEntityTypeRequest)
79-
returns (google.protobuf.Empty) {
76+
rpc DeleteEntityType(DeleteEntityTypeRequest) returns (google.protobuf.Empty) {
8077
option (google.api.http) = {
8178
delete: "/v3beta1/{name=projects/*/locations/*/agents/*/entityTypes/*}"
8279
};
@@ -107,9 +104,7 @@ service EntityTypes {
107104
//
108105
// * **User** - entities that are built for an individual user such as
109106
// favorites, preferences, playlists, and so on. A user entity is
110-
// represented by the
111-
// [SessionEntityType][google.cloud.dialogflow.cx.v3beta1.SessionEntityType]
112-
// type.
107+
// represented by the [SessionEntityType][google.cloud.dialogflow.cx.v3beta1.SessionEntityType] type.
113108
//
114109
// For more information about entity types, see the [Dialogflow
115110
// documentation](https://cloud.google.com/dialogflow/docs/entities-overview).
@@ -184,14 +179,12 @@ message EntityType {
184179
}
185180

186181
// The unique identifier of the entity type.
187-
// Required for
188-
// [EntityTypes.UpdateEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.UpdateEntityType].
182+
// Required for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.UpdateEntityType].
189183
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
190184
// ID>/entityTypes/<Entity Type ID>`.
191185
string name = 1;
192186

193-
// Required. The human-readable name of the entity type, unique within the
194-
// agent.
187+
// Required. The human-readable name of the entity type, unique within the agent.
195188
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
196189

197190
// Required. Indicates the kind of entity type.
@@ -214,8 +207,7 @@ message EntityType {
214207
bool enable_fuzzy_extraction = 7;
215208
}
216209

217-
// The request message for
218-
// [EntityTypes.ListEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypes].
210+
// The request message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypes].
219211
message ListEntityTypesRequest {
220212
// Required. The agent to list all entity types for.
221213
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
@@ -248,8 +240,7 @@ message ListEntityTypesRequest {
248240
string page_token = 4;
249241
}
250242

251-
// The response message for
252-
// [EntityTypes.ListEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypes].
243+
// The response message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypes].
253244
message ListEntityTypesResponse {
254245
// The list of entity types. There will be a maximum number of items returned
255246
// based on the page_size field in the request.
@@ -260,8 +251,7 @@ message ListEntityTypesResponse {
260251
string next_page_token = 2;
261252
}
262253

263-
// The request message for
264-
// [EntityTypes.GetEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.GetEntityType].
254+
// The request message for [EntityTypes.GetEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.GetEntityType].
265255
message GetEntityTypeRequest {
266256
// Required. The name of the entity type.
267257
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
@@ -288,8 +278,7 @@ message GetEntityTypeRequest {
288278
string language_code = 2;
289279
}
290280

291-
// The request message for
292-
// [EntityTypes.CreateEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.CreateEntityType].
281+
// The request message for [EntityTypes.CreateEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.CreateEntityType].
293282
message CreateEntityTypeRequest {
294283
// Required. The agent to create a entity type for.
295284
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
@@ -317,8 +306,7 @@ message CreateEntityTypeRequest {
317306
string language_code = 3;
318307
}
319308

320-
// The request message for
321-
// [EntityTypes.UpdateEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.UpdateEntityType].
309+
// The request message for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.UpdateEntityType].
322310
message UpdateEntityTypeRequest {
323311
// Required. The entity type to update.
324312
EntityType entity_type = 1 [(google.api.field_behavior) = REQUIRED];
@@ -340,8 +328,7 @@ message UpdateEntityTypeRequest {
340328
google.protobuf.FieldMask update_mask = 3;
341329
}
342330

343-
// The request message for
344-
// [EntityTypes.DeleteEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.DeleteEntityType].
331+
// The request message for [EntityTypes.DeleteEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.DeleteEntityType].
345332
message DeleteEntityTypeRequest {
346333
// Required. The name of the entity type to delete.
347334
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
@@ -360,10 +347,8 @@ message DeleteEntityTypeRequest {
360347
// indicating the referencing resources.
361348
// * If `force` is set to true, Dialogflow will remove the entity type, as
362349
// well as any references to the entity type (i.e. Page
363-
// [parameter][google.cloud.dialogflow.cx.v3beta1.Form.Parameter] of the
364-
// entity type will be changed to
365-
// '@sys.any' and intent
366-
// [parameter][google.cloud.dialogflow.cx.v3beta1.Intent.Parameter] of the
367-
// entity type will be removed).
350+
// [parameter][google.cloud.dialogflow.cx.v3beta1.Form.Parameter] of the entity type will be changed to
351+
// '@sys.any' and intent [parameter][google.cloud.dialogflow.cx.v3beta1.Intent.Parameter] of the entity type
352+
// will be removed).
368353
bool force = 2;
369354
}

protos/google/cloud/dialogflow/cx/v3beta1/flow.proto

Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import "google/cloud/dialogflow/cx/v3beta1/page.proto";
2424
import "google/longrunning/operations.proto";
2525
import "google/protobuf/empty.proto";
2626
import "google/protobuf/field_mask.proto";
27+
import "google/protobuf/timestamp.proto";
2728

2829
option cc_enable_arenas = true;
2930
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1";
@@ -138,10 +139,6 @@ message NluSettings {
138139

139140
// Indicates NLU model training mode.
140141
ModelTrainingMode model_training_mode = 4;
141-
142-
// Indicates if automatic spell correction is enabled in detect intent
143-
// requests.
144-
bool enable_spell_correction = 5 [deprecated = true];
145142
}
146143

147144
// Flows represents the conversation flows when you build your chatbot agent.
@@ -203,18 +200,16 @@ message Flow {
203200
// regardless of the current page. Event handlers defined in the page
204201
// have higher priority than those defined in the flow.
205202
//
206-
// Unlike
207-
// [transition_routes][google.cloud.dialogflow.cx.v3beta1.Flow.transition_routes],
208-
// these handlers are evaluated on a first-match basis. The first one that
209-
// matches the event get executed, with the rest being ignored.
203+
// Unlike [transition_routes][google.cloud.dialogflow.cx.v3beta1.Flow.transition_routes], these handlers are
204+
// evaluated on a first-match basis. The first one that matches the event
205+
// get executed, with the rest being ignored.
210206
repeated EventHandler event_handlers = 10;
211207

212208
// NLU related settings of the flow.
213209
NluSettings nlu_settings = 11;
214210
}
215211

216-
// The request message for
217-
// [Flows.CreateFlow][google.cloud.dialogflow.cx.v3beta1.Flows.CreateFlow].
212+
// The request message for [Flows.CreateFlow][google.cloud.dialogflow.cx.v3beta1.Flows.CreateFlow].
218213
message CreateFlowRequest {
219214
// Required. The agent to create a flow for.
220215
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
@@ -241,15 +236,16 @@ message CreateFlowRequest {
241236
string language_code = 3;
242237
}
243238

244-
// The request message for
245-
// [Flows.DeleteFlow][google.cloud.dialogflow.cx.v3beta1.Flows.DeleteFlow].
239+
// The request message for [Flows.DeleteFlow][google.cloud.dialogflow.cx.v3beta1.Flows.DeleteFlow].
246240
message DeleteFlowRequest {
247241
// Required. The name of the flow to delete.
248242
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
249243
// ID>/flows/<Flow ID>`.
250244
string name = 1 [
251245
(google.api.field_behavior) = REQUIRED,
252-
(google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" }
246+
(google.api.resource_reference) = {
247+
type: "dialogflow.googleapis.com/Flow"
248+
}
253249
];
254250

255251
// This field has no effect for flows with no incoming transitions.
@@ -265,8 +261,7 @@ message DeleteFlowRequest {
265261
bool force = 2;
266262
}
267263

268-
// The request message for
269-
// [Flows.ListFlows][google.cloud.dialogflow.cx.v3beta1.Flows.ListFlows].
264+
// The request message for [Flows.ListFlows][google.cloud.dialogflow.cx.v3beta1.Flows.ListFlows].
270265
message ListFlowsRequest {
271266
// Required. The agent containing the flows.
272267
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
@@ -298,8 +293,7 @@ message ListFlowsRequest {
298293
string language_code = 4;
299294
}
300295

301-
// The response message for
302-
// [Flows.ListFlows][google.cloud.dialogflow.cx.v3beta1.Flows.ListFlows].
296+
// The response message for [Flows.ListFlows][google.cloud.dialogflow.cx.v3beta1.Flows.ListFlows].
303297
message ListFlowsResponse {
304298
// The list of flows. There will be a maximum number of items returned based
305299
// on the page_size field in the request.
@@ -310,15 +304,16 @@ message ListFlowsResponse {
310304
string next_page_token = 2;
311305
}
312306

313-
// The response message for
314-
// [Flows.GetFlow][google.cloud.dialogflow.cx.v3beta1.Flows.GetFlow].
307+
// The response message for [Flows.GetFlow][google.cloud.dialogflow.cx.v3beta1.Flows.GetFlow].
315308
message GetFlowRequest {
316309
// Required. The name of the flow to get.
317310
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
318311
// ID>/flows/<Flow ID>`.
319312
string name = 1 [
320313
(google.api.field_behavior) = REQUIRED,
321-
(google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" }
314+
(google.api.resource_reference) = {
315+
type: "dialogflow.googleapis.com/Flow"
316+
}
322317
];
323318

324319
// The language to retrieve the flow for. The following fields are language
@@ -335,16 +330,14 @@ message GetFlowRequest {
335330
string language_code = 2;
336331
}
337332

338-
// The request message for
339-
// [Flows.UpdateFlow][google.cloud.dialogflow.cx.v3beta1.Flows.UpdateFlow].
333+
// The request message for [Flows.UpdateFlow][google.cloud.dialogflow.cx.v3beta1.Flows.UpdateFlow].
340334
message UpdateFlowRequest {
341335
// Required. The flow to update.
342336
Flow flow = 1 [(google.api.field_behavior) = REQUIRED];
343337

344-
// Required. The mask to control which fields get updated. If `update_mask` is
345-
// not specified, an error will be returned.
346-
google.protobuf.FieldMask update_mask = 2
347-
[(google.api.field_behavior) = REQUIRED];
338+
// Required. The mask to control which fields get updated. If `update_mask` is not
339+
// specified, an error will be returned.
340+
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
348341

349342
// The language of the following fields in `flow`:
350343
//
@@ -359,14 +352,15 @@ message UpdateFlowRequest {
359352
string language_code = 3;
360353
}
361354

362-
// The request message for
363-
// [Flows.TrainFlow][google.cloud.dialogflow.cx.v3beta1.Flows.TrainFlow].
355+
// The request message for [Flows.TrainFlow][google.cloud.dialogflow.cx.v3beta1.Flows.TrainFlow].
364356
message TrainFlowRequest {
365357
// Required. The flow to train.
366358
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
367359
// ID>/flows/<Flow ID>`.
368360
string name = 1 [
369361
(google.api.field_behavior) = REQUIRED,
370-
(google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" }
362+
(google.api.resource_reference) = {
363+
type: "dialogflow.googleapis.com/Flow"
364+
}
371365
];
372366
}

0 commit comments

Comments
 (0)