@@ -46,6 +46,7 @@ class ConversationV1 extends GeneratedConversationV1 {
4646  } 
4747
4848  getIntents ( params ,  callback )  { 
49+     console . warn ( "WARNING: getIntents() was renamed to listIntents(). Support for getIntents() will be removed in the next major release" ) ; 
4950    return  super . listIntents ( params ,  callback ) ; 
5051  } 
5152
@@ -64,18 +65,17 @@ class ConversationV1 extends GeneratedConversationV1 {
6465    const  missingParams  =  getMissingParams ( params ,  requiredParams ) ; 
6566    if  ( missingParams )  {  return  callback ( missingParams ) ;  } 
6667
67-     const  _params : GeneratedConversationV1 . UpdateIntentParams  =  { 
68-       workspace_id : params . workspace_id , 
69-       intent : params . old_intent , 
70-       new_intent : params . intent , 
71-       new_description : params . description , 
72-       new_examples : params . examples 
73-     } ; 
68+     const  newParams  =  extend ( { } ,  params ) ; 
69+     newParams . intent  =  params . old_intent ; 
70+     newParams . new_intent  =  params . intent ; 
71+     newParams . new_description  =  params . description ; 
72+     newParams . new_examples  =  params . examples ; 
7473
75-     return  super . updateIntent ( _params ,  callback ) ; 
74+     return  super . updateIntent ( newParams ,  callback ) ; 
7675  } 
7776
7877  getExamples ( params ,  callback )  { 
78+     console . warn ( "WARNING: getExamples() was renamed to listExamples(). Support for getExamples() will be removed in the next major release" ) ; 
7979    return  super . listExamples ( params ,  callback ) ; 
8080  } 
8181
@@ -88,17 +88,15 @@ class ConversationV1 extends GeneratedConversationV1 {
8888    const  missingParams  =  getMissingParams ( params ,  requiredParams ) ; 
8989    if  ( missingParams )  {  return  callback ( missingParams ) ;  } 
9090
91-     const  _params : GeneratedConversationV1 . UpdateExampleParams  =  { 
92-       workspace_id : params . workspace_id , 
93-       intent : params . intent , 
94-       text : params . old_text , 
95-       new_text : params . text 
96-     } ; 
91+     const  newParams  =  extend ( { } ,  params ) ; 
92+     newParams . text  =  params . old_text ; 
93+     newParams . new_text  =  params . text ; 
9794
98-     return  super . updateExample ( _params ,  callback ) ; 
95+     return  super . updateExample ( newParams ,  callback ) ; 
9996  } 
10097
10198  getCounterExamples ( params ,  callback )  { 
99+     console . warn ( "WARNING: getCounterExamples() was renamed to listCounterExamples(). Support for getCounterExamples() will be removed in the next major release" ) ; 
102100    return  super . listCounterexamples ( params ,  callback ) ; 
103101  } 
104102
@@ -123,16 +121,15 @@ class ConversationV1 extends GeneratedConversationV1 {
123121    const  missingParams  =  getMissingParams ( params ,  requiredParams ) ; 
124122    if  ( missingParams )  {  return  callback ( missingParams ) ;  } 
125123
126-     const  _params : GeneratedConversationV1 . UpdateCounterexampleParams  =  { 
127-       workspace_id : params . workspace_id , 
128-       text : params . old_text , 
129-       new_text : params . text 
130-     } ; 
124+     const  newParams  =  extend ( { } ,  params ) ; 
125+     newParams . text  =  params . old_text ; 
126+     newParams . new_text  =  params . text ; 
131127
132-     return  super . updateCounterexample ( _params ,  callback ) ; 
128+     return  super . updateCounterexample ( newParams ,  callback ) ; 
133129  } 
134130
135131  getEntities ( params ,  callback )  { 
132+     console . warn ( "WARNING: getEntities() was renamed to listEntities(). Support for getEntities() will be removed in the next major release" ) ; 
136133    return  super . listEntities ( params ,  callback ) ; 
137134  } 
138135
@@ -153,20 +150,19 @@ class ConversationV1 extends GeneratedConversationV1 {
153150    const  missingParams  =  getMissingParams ( params ,  requiredParams ) ; 
154151    if  ( missingParams )  {  return  callback ( missingParams ) ;  } 
155152
156-     const  _params : GeneratedConversationV1 . UpdateEntityParams  =  { 
157-       workspace_id : params . workspace_id , 
158-       entity : params . old_entity , 
159-       new_entity : params . entity , 
160-       new_description : params . description , 
161-       new_metadata : params . metadata , 
162-       new_fuzzy_match : params . fuzzy_match , 
163-       new_values : params . values 
164-     } ; 
165- 
166-     return  super . updateEntity ( _params ,  callback ) ; 
153+     const  newParams  =  extend ( { } ,  params ) ; 
154+     newParams . entity  =  params . old_entity ; 
155+     newParams . new_entity  =  params . entity ; 
156+     newParams . new_description  =  params . description ; 
157+     newParams . new_metadata  =  params . metadata ; 
158+     newParams . new_fuzzy_match  =  params . fuzzy_match ; 
159+     newParams . new_values  =  params . values ; 
160+ 
161+     return  super . updateEntity ( newParams ,  callback ) ; 
167162  } 
168163
169164  getValues ( params ,  callback )  { 
165+     console . warn ( "WARNING: getValues() was renamed to listValues(). Support for getValues() will be removed in the next major release" ) ; 
170166    return  super . listValues ( params ,  callback ) ; 
171167  } 
172168
@@ -187,21 +183,19 @@ class ConversationV1 extends GeneratedConversationV1 {
187183    const  missingParams  =  getMissingParams ( params ,  requiredParams ) ; 
188184    if  ( missingParams )  {  return  callback ( missingParams ) ;  } 
189185
190-     const  _params : GeneratedConversationV1 . UpdateValueParams  =  { 
191-       workspace_id : params . workspace_id , 
192-       entity : params . entity , 
193-       value : params . old_value , 
194-       new_value : params . value , 
195-       new_metadata : params . metadata , 
196-       new_type : params . type , 
197-       new_synonyms : params . synonyms , 
198-       new_patterns : params . patterns 
199-     } ; 
200- 
201-     return  super . updateValue ( _params ,  callback ) ; 
186+     const  newParams  =  extend ( { } ,  params ) ; 
187+     newParams . value  =  params . old_value ; 
188+     newParams . new_value  =  params . value ; 
189+     newParams . new_metadata  =  params . metadata ; 
190+     newParams . new_type  =  params . type ; 
191+     newParams . new_synonyms  =  params . synonyms ; 
192+     newParams . new_patterns  =  params . patterns ; 
193+ 
194+     return  super . updateValue ( newParams ,  callback ) ; 
202195  } 
203196
204197  getSynonyms ( params ,  callback )  { 
198+     console . warn ( "WARNING: getSynonyms() was renamed to listSynonyms(). Support for getSynonyms() will be removed in the next major release" ) ; 
205199    return  super . listSynonyms ( params ,  callback ) ; 
206200  } 
207201
@@ -220,30 +214,28 @@ class ConversationV1 extends GeneratedConversationV1 {
220214    const  missingParams  =  getMissingParams ( params ,  requiredParams ) ; 
221215    if  ( missingParams )  {  return  callback ( missingParams ) ;  } 
222216
223-     const  _params : GeneratedConversationV1 . UpdateSynonymParams  =  { 
224-       workspace_id : params . workspace_id , 
225-       entity : params . entity , 
226-       value : params . value , 
227-       synonym : params . old_synonym , 
228-       new_synonym : params . synonym 
229-     } ; 
217+     const  newParams  =  extend ( { } ,  params ) ; 
218+     newParams . synonym  =  params . old_synonym ; 
219+     newParams . new_synonym  =  params . synonym ; 
230220
231-     return  super . updateSynonym ( _params ,  callback ) ; 
221+     return  super . updateSynonym ( newParams ,  callback ) ; 
232222  } 
233223
234224  getLogs ( params ,  callback )  { 
225+     console . warn ( "WARNING: getLogs() was renamed to listLogs(). Support for getLogs() will be removed in the next major release" ) ; 
235226    return  super . listLogs ( params ,  callback ) ; 
236227  } 
237228
238229  createDialogNode ( params ,  callback )  { 
239-     const  _params  =  extend ( { } ,  params ) ; 
240-     if  ( params  &&  params . type  &&  ! _params . node_type )  { 
241-       _params . node_type  =  params . type ; 
230+     const  newParams  =  extend ( { } ,  params ) ; 
231+     if  ( params  &&  params . type  &&  ! newParams . node_type )  { 
232+       newParams . node_type  =  params . type ; 
242233    } 
243-     return  super . createDialogNode ( _params ,  callback ) ; 
234+     return  super . createDialogNode ( newParams ,  callback ) ; 
244235  } 
245236
246237  getDialogNodes ( params ,  callback )  { 
238+     console . warn ( "WARNING: getDialogNodes() was renamed to listDialogNodes(). Support for getDialogNodes() will be removed in the next major release" ) ; 
247239    return  super . listDialogNodes ( params ,  callback ) ; 
248240  } 
249241
@@ -273,26 +265,24 @@ class ConversationV1 extends GeneratedConversationV1 {
273265    const  missingParams  =  getMissingParams ( params ,  requiredParams ) ; 
274266    if  ( missingParams )  {  return  callback ( missingParams ) ;  } 
275267
276-     const  _params : GeneratedConversationV1 . UpdateDialogNodeParams  =  { 
277-       workspace_id : params . workspace_id , 
278-       dialog_node : params . old_dialog_node , 
279-       new_dialog_node : params . dialog_node , 
280-       new_description : params . description , 
281-       new_conditions : params . conditions , 
282-       new_parent : params . parent , 
283-       new_previous_sibling : params . previous_sibling , 
284-       new_output : params . output , 
285-       new_context : params . context , 
286-       new_metadata : params . metadata , 
287-       new_next_step : params . next_step , 
288-       new_title : params . title , 
289-       new_type : params . type , 
290-       new_event_name : params . event_name , 
291-       new_variable : params . variable , 
292-       new_actions : params . actions 
293-     } ; 
294- 
295-     return  super . updateDialogNode ( _params ,  callback ) ; 
268+     const  newParams  =  extend ( { } ,  params ) ; 
269+     newParams . dialog_node  =  params . old_dialog_node ; 
270+     newParams . new_dialog_node  =  params . dialog_node ; 
271+     newParams . new_description  =  params . description ; 
272+     newParams . new_conditions  =  params . conditions ; 
273+     newParams . new_parent  =  params . parent ; 
274+     newParams . new_previous_sibling  =  params . previous_sibling ; 
275+     newParams . new_output  =  params . output ; 
276+     newParams . new_context  =  params . context ; 
277+     newParams . new_metadata  =  params . metadata ; 
278+     newParams . new_next_step  =  params . next_step ; 
279+     newParams . new_title  =  params . title ; 
280+     newParams . new_type  =  params . type ; 
281+     newParams . new_event_name  =  params . event_name ; 
282+     newParams . new_variable  =  params . variable ; 
283+     newParams . new_actions  =  params . actions ; 
284+ 
285+     return  super . updateDialogNode ( newParams ,  callback ) ; 
296286  } 
297287} 
298288
0 commit comments