Skip to content

Commit 4e8d68b

Browse files
committed
feat(regerate): regenerate sdk using current api defs
1 parent 41d8d8b commit 4e8d68b

24 files changed

+288
-35
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: node_js
22
node_js:
3-
- "8.3"
3+
- "8"
44
os:
55
- osx
66
osx_image: xcode61

Scripts/Services/Assistant/V1/AssistantService.cs

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,9 @@ private void OnListWorkspacesResponse(RESTConnector.Request req, RESTConnector.R
313313
/// (optional)</param>
314314
/// <param name="counterexamples">An array of objects defining input examples that have been marked as
315315
/// irrelevant input. (optional)</param>
316+
/// <param name="webhooks"> (optional)</param>
316317
/// <returns><see cref="Workspace" />Workspace</returns>
317-
public bool CreateWorkspace(Callback<Workspace> callback, string name = null, string description = null, string language = null, Dictionary<string, object> metadata = null, bool? learningOptOut = null, WorkspaceSystemSettings systemSettings = null, List<CreateIntent> intents = null, List<CreateEntity> entities = null, List<DialogNode> dialogNodes = null, List<Counterexample> counterexamples = null)
318+
public bool CreateWorkspace(Callback<Workspace> callback, string name = null, string description = null, string language = null, Dictionary<string, object> metadata = null, bool? learningOptOut = null, WorkspaceSystemSettings systemSettings = null, List<CreateIntent> intents = null, List<CreateEntity> entities = null, List<DialogNode> dialogNodes = null, List<Counterexample> counterexamples = null, List<Webhook> webhooks = null)
318319
{
319320
if (callback == null)
320321
throw new ArgumentNullException("`callback` is required for `CreateWorkspace`");
@@ -363,6 +364,8 @@ public bool CreateWorkspace(Callback<Workspace> callback, string name = null, st
363364
bodyObject["dialog_nodes"] = JToken.FromObject(dialogNodes);
364365
if (counterexamples != null && counterexamples.Count > 0)
365366
bodyObject["counterexamples"] = JToken.FromObject(counterexamples);
367+
if (webhooks != null && webhooks.Count > 0)
368+
bodyObject["webhooks"] = JToken.FromObject(webhooks);
366369
req.Send = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(bodyObject));
367370

368371
req.OnResponse = OnCreateWorkspaceResponse;
@@ -514,6 +517,7 @@ private void OnGetWorkspaceResponse(RESTConnector.Request req, RESTConnector.Res
514517
/// (optional)</param>
515518
/// <param name="counterexamples">An array of objects defining input examples that have been marked as
516519
/// irrelevant input. (optional)</param>
520+
/// <param name="webhooks"> (optional)</param>
517521
/// <param name="append">Whether the new data is to be appended to the existing data in the workspace. If
518522
/// **append**=`false`, elements included in the new data completely replace the corresponding existing
519523
/// elements, including all subelements. For example, if the new data includes **entities** and
@@ -522,7 +526,7 @@ private void OnGetWorkspaceResponse(RESTConnector.Request req, RESTConnector.Res
522526
/// If **append**=`true`, existing elements are preserved, and the new elements are added. If any elements in
523527
/// the new data collide with existing elements, the update request fails. (optional, default to false)</param>
524528
/// <returns><see cref="Workspace" />Workspace</returns>
525-
public bool UpdateWorkspace(Callback<Workspace> callback, string workspaceId, string name = null, string description = null, string language = null, Dictionary<string, object> metadata = null, bool? learningOptOut = null, WorkspaceSystemSettings systemSettings = null, List<CreateIntent> intents = null, List<CreateEntity> entities = null, List<DialogNode> dialogNodes = null, List<Counterexample> counterexamples = null, bool? append = null)
529+
public bool UpdateWorkspace(Callback<Workspace> callback, string workspaceId, string name = null, string description = null, string language = null, Dictionary<string, object> metadata = null, bool? learningOptOut = null, WorkspaceSystemSettings systemSettings = null, List<CreateIntent> intents = null, List<CreateEntity> entities = null, List<DialogNode> dialogNodes = null, List<Counterexample> counterexamples = null, List<Webhook> webhooks = null, bool? append = null)
526530
{
527531
if (callback == null)
528532
throw new ArgumentNullException("`callback` is required for `UpdateWorkspace`");
@@ -577,6 +581,8 @@ public bool UpdateWorkspace(Callback<Workspace> callback, string workspaceId, st
577581
bodyObject["dialog_nodes"] = JToken.FromObject(dialogNodes);
578582
if (counterexamples != null && counterexamples.Count > 0)
579583
bodyObject["counterexamples"] = JToken.FromObject(counterexamples);
584+
if (webhooks != null && webhooks.Count > 0)
585+
bodyObject["webhooks"] = JToken.FromObject(webhooks);
580586
req.Send = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(bodyObject));
581587

582588
req.OnResponse = OnUpdateWorkspaceResponse;
@@ -3595,8 +3601,10 @@ private void OnListDialogNodesResponse(RESTConnector.Request req, RESTConnector.
35953601
/// (optional)</param>
35963602
/// <param name="userLabel">A label that can be displayed externally to describe the purpose of the node to
35973603
/// users. (optional)</param>
3604+
/// <param name="disambiguationOptOut">Whether the dialog node should be excluded from disambiguation
3605+
/// suggestions. (optional, default to false)</param>
35983606
/// <returns><see cref="DialogNode" />DialogNode</returns>
3599-
public bool CreateDialogNode(Callback<DialogNode> callback, string workspaceId, string dialogNode, string description = null, string conditions = null, string parent = null, string previousSibling = null, DialogNodeOutput output = null, Dictionary<string, object> context = null, Dictionary<string, object> metadata = null, DialogNodeNextStep nextStep = null, string title = null, string type = null, string eventName = null, string variable = null, List<DialogNodeAction> actions = null, string digressIn = null, string digressOut = null, string digressOutSlots = null, string userLabel = null)
3607+
public bool CreateDialogNode(Callback<DialogNode> callback, string workspaceId, string dialogNode, string description = null, string conditions = null, string parent = null, string previousSibling = null, DialogNodeOutput output = null, Dictionary<string, object> context = null, Dictionary<string, object> metadata = null, DialogNodeNextStep nextStep = null, string title = null, string type = null, string eventName = null, string variable = null, List<DialogNodeAction> actions = null, string digressIn = null, string digressOut = null, string digressOutSlots = null, string userLabel = null, bool? disambiguationOptOut = null)
36003608
{
36013609
if (callback == null)
36023610
throw new ArgumentNullException("`callback` is required for `CreateDialogNode`");
@@ -3665,6 +3673,8 @@ public bool CreateDialogNode(Callback<DialogNode> callback, string workspaceId,
36653673
bodyObject["digress_out_slots"] = digressOutSlots;
36663674
if (!string.IsNullOrEmpty(userLabel))
36673675
bodyObject["user_label"] = userLabel;
3676+
if (disambiguationOptOut != null)
3677+
bodyObject["disambiguation_opt_out"] = JToken.FromObject(disambiguationOptOut);
36683678
req.Send = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(bodyObject));
36693679

36703680
req.OnResponse = OnCreateDialogNodeResponse;
@@ -3825,8 +3835,10 @@ private void OnGetDialogNodeResponse(RESTConnector.Request req, RESTConnector.Re
38253835
/// (optional)</param>
38263836
/// <param name="newUserLabel">A label that can be displayed externally to describe the purpose of the node to
38273837
/// users. (optional)</param>
3838+
/// <param name="newDisambiguationOptOut">Whether the dialog node should be excluded from disambiguation
3839+
/// suggestions. (optional, default to false)</param>
38283840
/// <returns><see cref="DialogNode" />DialogNode</returns>
3829-
public bool UpdateDialogNode(Callback<DialogNode> callback, string workspaceId, string dialogNode, string newDialogNode = null, string newDescription = null, string newConditions = null, string newParent = null, string newPreviousSibling = null, DialogNodeOutput newOutput = null, Dictionary<string, object> newContext = null, Dictionary<string, object> newMetadata = null, DialogNodeNextStep newNextStep = null, string newTitle = null, string newType = null, string newEventName = null, string newVariable = null, List<DialogNodeAction> newActions = null, string newDigressIn = null, string newDigressOut = null, string newDigressOutSlots = null, string newUserLabel = null)
3841+
public bool UpdateDialogNode(Callback<DialogNode> callback, string workspaceId, string dialogNode, string newDialogNode = null, string newDescription = null, string newConditions = null, string newParent = null, string newPreviousSibling = null, DialogNodeOutput newOutput = null, Dictionary<string, object> newContext = null, Dictionary<string, object> newMetadata = null, DialogNodeNextStep newNextStep = null, string newTitle = null, string newType = null, string newEventName = null, string newVariable = null, List<DialogNodeAction> newActions = null, string newDigressIn = null, string newDigressOut = null, string newDigressOutSlots = null, string newUserLabel = null, bool? newDisambiguationOptOut = null)
38303842
{
38313843
if (callback == null)
38323844
throw new ArgumentNullException("`callback` is required for `UpdateDialogNode`");
@@ -3895,6 +3907,8 @@ public bool UpdateDialogNode(Callback<DialogNode> callback, string workspaceId,
38953907
bodyObject["digress_out_slots"] = newDigressOutSlots;
38963908
if (!string.IsNullOrEmpty(newUserLabel))
38973909
bodyObject["user_label"] = newUserLabel;
3910+
if (newDisambiguationOptOut != null)
3911+
bodyObject["disambiguation_opt_out"] = JToken.FromObject(newDisambiguationOptOut);
38983912
req.Send = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(bodyObject));
38993913

39003914
req.OnResponse = OnUpdateDialogNodeResponse;
@@ -4107,8 +4121,9 @@ private void OnListLogsResponse(RESTConnector.Request req, RESTConnector.Respons
41074121
/// </summary>
41084122
/// <param name="callback">The callback function that is invoked when the operation completes.</param>
41094123
/// <param name="filter">A cacheable parameter that limits the results to those matching the specified filter.
4110-
/// You must specify a filter query that includes a value for `language`, as well as a value for `workspace_id`
4111-
/// or `request.context.metadata.deployment`. For more information, see the
4124+
/// You must specify a filter query that includes a value for `language`, as well as a value for
4125+
/// `request.context.system.assistant_id`, `workspace_id`, or `request.context.metadata.deployment`. For more
4126+
/// information, see the
41124127
/// [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-filter-reference#filter-reference).</param>
41134128
/// <param name="sort">How to sort the returned log events. You can sort by **request_timestamp**. To reverse
41144129
/// the sort order, prefix the parameter value with a minus sign (`-`). (optional)</param>

Scripts/Services/Assistant/V1/Model/DialogNode.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,11 @@ public class DigressOutSlotsValue
263263
[JsonProperty("user_label", NullValueHandling = NullValueHandling.Ignore)]
264264
public string UserLabel { get; set; }
265265
/// <summary>
266+
/// Whether the dialog node should be excluded from disambiguation suggestions.
267+
/// </summary>
268+
[JsonProperty("disambiguation_opt_out", NullValueHandling = NullValueHandling.Ignore)]
269+
public bool? DisambiguationOptOut { get; set; }
270+
/// <summary>
266271
/// For internal use only.
267272
/// </summary>
268273
[JsonProperty("disabled", NullValueHandling = NullValueHandling.Ignore)]

Scripts/Services/Assistant/V1/Model/DialogNodeAction.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ public class TypeValue
4646
/// Constant WEB_ACTION for web_action
4747
/// </summary>
4848
public const string WEB_ACTION = "web_action";
49+
/// <summary>
50+
/// Constant WEBHOOK for webhook
51+
/// </summary>
52+
public const string WEBHOOK = "webhook";
4953

5054
}
5155

Scripts/Services/Assistant/V1/Model/DialogSuggestion.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ namespace IBM.Watson.Assistant.V1.Model
2525
public class DialogSuggestion
2626
{
2727
/// <summary>
28-
/// The user-facing label for the disambiguation option. This label is taken from the **user_label** property of
29-
/// the corresponding dialog node.
28+
/// The user-facing label for the disambiguation option. This label is taken from the **title** or
29+
/// **user_label** property of the corresponding dialog node, depending on the disambiguation options.
3030
/// </summary>
3131
[JsonProperty("label", NullValueHandling = NullValueHandling.Ignore)]
3232
public string Label { get; set; }

Scripts/Services/Assistant/V1/Model/RuntimeResponseGeneric.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public class PreferenceValue
149149
/// An array of objects describing the possible matching dialog nodes from which the user can choose.
150150
///
151151
/// **Note:** The **suggestions** property is part of the disambiguation feature, which is only available for
152-
/// Premium users.
152+
/// Plus and Premium users.
153153
/// </summary>
154154
[JsonProperty("suggestions", NullValueHandling = NullValueHandling.Ignore)]
155155
public List<DialogSuggestion> Suggestions { get; set; }
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/**
2+
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
using System.Collections.Generic;
19+
using Newtonsoft.Json;
20+
21+
namespace IBM.Watson.Assistant.V1.Model
22+
{
23+
/// <summary>
24+
/// A webhook that can be used by dialog nodes to make programmatic calls to an external function.
25+
///
26+
/// **Note:** Currently, only a single webhook named `main_webhook` is supported.
27+
/// </summary>
28+
public class Webhook
29+
{
30+
/// <summary>
31+
/// The URL for the external service or application to which you want to send HTTP POST requests.
32+
/// </summary>
33+
[JsonProperty("url", NullValueHandling = NullValueHandling.Ignore)]
34+
public string Url { get; set; }
35+
/// <summary>
36+
/// The name of the webhook. Currently, `main_webhook` is the only supported value.
37+
/// </summary>
38+
[JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
39+
public string Name { get; set; }
40+
/// <summary>
41+
/// An optional array of HTTP headers to pass with the HTTP request.
42+
/// </summary>
43+
[JsonProperty("headers", NullValueHandling = NullValueHandling.Ignore)]
44+
public List<WebhookHeader> Headers { get; set; }
45+
}
46+
}

Scripts/Services/Assistant/V1/Model/Webhook.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/**
2+
* Copyright 2018, 2019 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
using Newtonsoft.Json;
19+
20+
namespace IBM.Watson.Assistant.V1.Model
21+
{
22+
/// <summary>
23+
/// A key/value pair defining an HTTP header and a value.
24+
/// </summary>
25+
public class WebhookHeader
26+
{
27+
/// <summary>
28+
/// The name of an HTTP header (for example, `Authorization`).
29+
/// </summary>
30+
[JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
31+
public string Name { get; set; }
32+
/// <summary>
33+
/// The value of an HTTP header.
34+
/// </summary>
35+
[JsonProperty("value", NullValueHandling = NullValueHandling.Ignore)]
36+
public string Value { get; set; }
37+
}
38+
}

Scripts/Services/Assistant/V1/Model/WebhookHeader.cs.meta

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

Scripts/Services/Assistant/V1/Model/Workspace.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,5 +126,10 @@ public class StatusValue
126126
/// </summary>
127127
[JsonProperty("counterexamples", NullValueHandling = NullValueHandling.Ignore)]
128128
public List<Counterexample> Counterexamples { get; set; }
129+
/// <summary>
130+
/// Gets or Sets Webhooks
131+
/// </summary>
132+
[JsonProperty("webhooks", NullValueHandling = NullValueHandling.Ignore)]
133+
public List<Webhook> Webhooks { get; set; }
129134
}
130135
}

Scripts/Services/Assistant/V1/Model/WorkspaceSystemSettings.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class WorkspaceSystemSettings
3333
/// <summary>
3434
/// Workspace settings related to the disambiguation feature.
3535
///
36-
/// **Note:** This feature is available only to Premium users.
36+
/// **Note:** This feature is available only to Plus and Premium users.
3737
/// </summary>
3838
[JsonProperty("disambiguation", NullValueHandling = NullValueHandling.Ignore)]
3939
public WorkspaceSystemSettingsDisambiguation Disambiguation { get; set; }
@@ -42,5 +42,10 @@ public class WorkspaceSystemSettings
4242
/// </summary>
4343
[JsonProperty("human_agent_assist", NullValueHandling = NullValueHandling.Ignore)]
4444
public Dictionary<string, object> HumanAgentAssist { get; set; }
45+
/// <summary>
46+
/// Workspace settings related to detection of irrelevant input.
47+
/// </summary>
48+
[JsonProperty("off_topic", NullValueHandling = NullValueHandling.Ignore)]
49+
public WorkspaceSystemSettingsOffTopic OffTopic { get; set; }
4550
}
4651
}

Scripts/Services/Assistant/V1/Model/WorkspaceSystemSettingsDisambiguation.cs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace IBM.Watson.Assistant.V1.Model
2222
/// <summary>
2323
/// Workspace settings related to the disambiguation feature.
2424
///
25-
/// **Note:** This feature is available only to Premium users.
25+
/// **Note:** This feature is available only to Plus and Premium users.
2626
/// </summary>
2727
public class WorkspaceSystemSettingsDisambiguation
2828
{
@@ -66,5 +66,21 @@ public class SensitivityValue
6666
/// </summary>
6767
[JsonProperty("enabled", NullValueHandling = NullValueHandling.Ignore)]
6868
public bool? Enabled { get; set; }
69+
/// <summary>
70+
/// Whether the order in which disambiguation suggestions are presented should be randomized (but still
71+
/// influenced by relative confidence).
72+
/// </summary>
73+
[JsonProperty("randomize", NullValueHandling = NullValueHandling.Ignore)]
74+
public bool? Randomize { get; set; }
75+
/// <summary>
76+
/// The maximum number of disambigation suggestions that can be included in a `suggestion` response.
77+
/// </summary>
78+
[JsonProperty("max_suggestions", NullValueHandling = NullValueHandling.Ignore)]
79+
public long? MaxSuggestions { get; set; }
80+
/// <summary>
81+
/// For internal use only.
82+
/// </summary>
83+
[JsonProperty("suggestion_text_policy", NullValueHandling = NullValueHandling.Ignore)]
84+
public string SuggestionTextPolicy { get; set; }
6985
}
7086
}

0 commit comments

Comments
 (0)