1
1
/**
2
- * (C) Copyright IBM Corp. 2018, 2021 .
2
+ * (C) Copyright IBM Corp. 2018, 2022 .
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -46,7 +46,7 @@ class AssistantV2 extends BaseService {
46
46
static DEFAULT_SERVICE_NAME : string = 'conversation' ;
47
47
48
48
/** Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. The current version is
49
- * `2021-06-14 `.
49
+ * `2021-11-27 `.
50
50
*/
51
51
version : string ;
52
52
@@ -55,7 +55,7 @@ class AssistantV2 extends BaseService {
55
55
*
56
56
* @param {Object } options - Options for the service.
57
57
* @param {string } options.version - Release date of the API version you want to use. Specify dates in YYYY-MM-DD
58
- * format. The current version is `2021-06-14 `.
58
+ * format. The current version is `2021-11-27 `.
59
59
* @param {string } [options.serviceUrl] - The base url to use when contacting the service. The base url may differ between IBM Cloud regions.
60
60
* @param {OutgoingHttpHeaders } [options.headers] - Default headers that shall be included with every request to the service.
61
61
* @param {string } [options.serviceName] - The name of the service to configure
@@ -620,7 +620,7 @@ namespace AssistantV2 {
620
620
/** Options for the `AssistantV2` constructor. */
621
621
export interface Options extends UserOptions {
622
622
/** Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. The current version is
623
- * `2021-06-14 `.
623
+ * `2021-11-27 `.
624
624
*/
625
625
version : string ;
626
626
}
@@ -887,8 +887,8 @@ namespace AssistantV2 {
887
887
input ?: MessageInput ;
888
888
}
889
889
890
- /** DialogNodesVisited . */
891
- export interface DialogNodesVisited {
890
+ /** An objects containing detailed diagnostic information about a dialog node that was triggered during processing of the input message . */
891
+ export interface DialogNodeVisited {
892
892
/** A dialog node that was triggered during processing of the input message. */
893
893
dialog_node ?: string ;
894
894
/** The title of the dialog node. */
@@ -969,25 +969,29 @@ namespace AssistantV2 {
969
969
970
970
/** MessageContext. */
971
971
export interface MessageContext {
972
- /** Session context data that is shared by all skills used by the Assistant . */
972
+ /** Session context data that is shared by all skills used by the assistant . */
973
973
global ?: MessageContextGlobal ;
974
974
/** Information specific to particular skills used by the assistant.
975
975
*
976
976
* **Note:** Currently, only a single child property is supported, containing variables that apply to the dialog
977
977
* skill used by the assistant.
978
978
*/
979
979
skills ?: JsonObject ;
980
+ /** An object containing context data that is specific to particular integrations. For more information, see the
981
+ * [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-integrations).
982
+ */
983
+ integrations ?: JsonObject ;
980
984
}
981
985
982
- /** Session context data that is shared by all skills used by the Assistant . */
986
+ /** Session context data that is shared by all skills used by the assistant . */
983
987
export interface MessageContextGlobal {
984
988
/** Built-in system properties that apply to all skills used by the assistant. */
985
989
system ?: MessageContextGlobalSystem ;
986
990
/** The session ID. */
987
991
session_id ?: string ;
988
992
}
989
993
990
- /** Session context data that is shared by all skills used by the Assistant . */
994
+ /** Session context data that is shared by all skills used by the assistant . */
991
995
export interface MessageContextGlobalStateless {
992
996
/** Built-in system properties that apply to all skills used by the assistant. */
993
997
system ?: MessageContextGlobalSystem ;
@@ -1047,9 +1051,11 @@ namespace AssistantV2 {
1047
1051
* conversation (such as a change to a skill the assistant uses).
1048
1052
*/
1049
1053
state ?: string ;
1054
+ /** For internal use only. */
1055
+ skip_user_input ?: boolean ;
1050
1056
}
1051
1057
1052
- /** Contains information specific to a particular skill used by the Assistant . The property name must be the same as the name of the skill (for example, `main skill`). */
1058
+ /** Contains information specific to a particular skill used by the assistant . The property name must be the same as the name of the skill (for example, `main skill`). */
1053
1059
export interface MessageContextSkill {
1054
1060
/** Arbitrary variables that can be read and written by a particular skill. */
1055
1061
user_defined ?: JsonObject ;
@@ -1071,14 +1077,18 @@ namespace AssistantV2 {
1071
1077
1072
1078
/** MessageContextStateless. */
1073
1079
export interface MessageContextStateless {
1074
- /** Session context data that is shared by all skills used by the Assistant . */
1080
+ /** Session context data that is shared by all skills used by the assistant . */
1075
1081
global ?: MessageContextGlobalStateless ;
1076
1082
/** Information specific to particular skills used by the assistant.
1077
1083
*
1078
1084
* **Note:** Currently, only a single child property is supported, containing variables that apply to the dialog
1079
1085
* skill used by the assistant.
1080
1086
*/
1081
1087
skills ?: JsonObject ;
1088
+ /** An object containing context data that is specific to particular integrations. For more information, see the
1089
+ * [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-integrations).
1090
+ */
1091
+ integrations ?: JsonObject ;
1082
1092
}
1083
1093
1084
1094
/** An input object that includes the input text. */
@@ -1103,10 +1113,24 @@ namespace AssistantV2 {
1103
1113
entities ?: RuntimeEntity [ ] ;
1104
1114
/** For internal use only. */
1105
1115
suggestion_id ?: string ;
1116
+ /** An array of multimedia attachments to be sent with the message.
1117
+ *
1118
+ * **Note:** Attachments are not processed by the assistant itself, but can be sent to external services by
1119
+ * webhooks.
1120
+ */
1121
+ attachments ?: MessageInputAttachment [ ] ;
1106
1122
/** Optional properties that control how the assistant responds. */
1107
1123
options ?: MessageInputOptions ;
1108
1124
}
1109
1125
1126
+ /** A reference to a media file to be sent as an attachment with the message. */
1127
+ export interface MessageInputAttachment {
1128
+ /** The URL of the media file. */
1129
+ url : string ;
1130
+ /** The media content type (such as a MIME type) of the attachment. */
1131
+ media_type ?: string ;
1132
+ }
1133
+
1110
1134
/** Optional properties that control how the assistant responds. */
1111
1135
export interface MessageInputOptions {
1112
1136
/** Whether to restart dialog processing at the root of the dialog, regardless of any previously visited nodes.
@@ -1195,6 +1219,12 @@ namespace AssistantV2 {
1195
1219
entities ?: RuntimeEntity [ ] ;
1196
1220
/** For internal use only. */
1197
1221
suggestion_id ?: string ;
1222
+ /** An array of multimedia attachments to be sent with the message.
1223
+ *
1224
+ * **Note:** Attachments are not processed by the assistant itself, but can be sent to external services by
1225
+ * webhooks.
1226
+ */
1227
+ attachments ?: MessageInputAttachment [ ] ;
1198
1228
/** Optional properties that control how the assistant responds. */
1199
1229
options ?: MessageInputOptionsStateless ;
1200
1230
}
@@ -1223,15 +1253,15 @@ namespace AssistantV2 {
1223
1253
1224
1254
/** Additional detailed information about a message response and how it was generated. */
1225
1255
export interface MessageOutputDebug {
1226
- /** An array of objects containing detailed diagnostic information about the nodes that were triggered during
1256
+ /** An array of objects containing detailed diagnostic information about dialog nodes that were triggered during
1227
1257
* processing of the input message.
1228
1258
*/
1229
- nodes_visited ?: DialogNodesVisited [ ] ;
1259
+ nodes_visited ?: DialogNodeVisited [ ] ;
1230
1260
/** An array of up to 50 messages logged with the request. */
1231
1261
log_messages ?: DialogLogMessage [ ] ;
1232
1262
/** Assistant sets this to true when this message response concludes or interrupts a dialog. */
1233
1263
branch_exited ?: boolean ;
1234
- /** When `branch_exited` is set to `true` by the Assistant , the `branch_exited_reason` specifies whether the
1264
+ /** When `branch_exited` is set to `true` by the assistant , the `branch_exited_reason` specifies whether the
1235
1265
* dialog completed by itself or got interrupted.
1236
1266
*/
1237
1267
branch_exited_reason ?: string ;
@@ -1334,12 +1364,6 @@ namespace AssistantV2 {
1334
1364
value : string ;
1335
1365
/** A decimal percentage that represents Watson's confidence in the recognized entity. */
1336
1366
confidence ?: number ;
1337
- /** **Deprecated.** Any metadata for the entity.
1338
- *
1339
- * Beginning with the `2021-06-14` API version, the `metadata` property is no longer returned. For information
1340
- * about system entities recognized in the user input, see the `interpretation` property.
1341
- */
1342
- metadata ?: JsonObject ;
1343
1367
/** The recognized capture groups for the entity, as defined by the entity pattern. */
1344
1368
groups ?: CaptureGroup [ ] ;
1345
1369
/** An object containing detailed information about the entity recognized in the user input. This property is
@@ -1590,6 +1614,30 @@ namespace AssistantV2 {
1590
1614
step : string ;
1591
1615
}
1592
1616
1617
+ /** RuntimeResponseGenericRuntimeResponseTypeAudio. */
1618
+ export interface RuntimeResponseGenericRuntimeResponseTypeAudio extends RuntimeResponseGeneric {
1619
+ /** The type of response returned by the dialog node. The specified response type must be supported by the
1620
+ * client application or channel.
1621
+ */
1622
+ response_type : string ;
1623
+ /** The `https:` URL of the audio clip. */
1624
+ source : string ;
1625
+ /** The title or introductory text to show before the response. */
1626
+ title ?: string ;
1627
+ /** The description to show with the the response. */
1628
+ description ?: string ;
1629
+ /** An array of objects specifying channels for which the response is intended. If **channels** is present, the
1630
+ * response is intended for a built-in integration and should not be handled by an API client.
1631
+ */
1632
+ channels ?: ResponseGenericChannel [ ] ;
1633
+ /** For internal use only. */
1634
+ channel_options ?: JsonObject ;
1635
+ /** Descriptive text that can be used for screen readers or other situations where the audio player cannot be
1636
+ * seen.
1637
+ */
1638
+ alt_text ?: string ;
1639
+ }
1640
+
1593
1641
/** RuntimeResponseGenericRuntimeResponseTypeChannelTransfer. */
1594
1642
export interface RuntimeResponseGenericRuntimeResponseTypeChannelTransfer extends RuntimeResponseGeneric {
1595
1643
/** The type of response returned by the dialog node. The specified response type must be supported by the
@@ -1634,6 +1682,26 @@ namespace AssistantV2 {
1634
1682
channels ?: ResponseGenericChannel [ ] ;
1635
1683
}
1636
1684
1685
+ /** RuntimeResponseGenericRuntimeResponseTypeIframe. */
1686
+ export interface RuntimeResponseGenericRuntimeResponseTypeIframe extends RuntimeResponseGeneric {
1687
+ /** The type of response returned by the dialog node. The specified response type must be supported by the
1688
+ * client application or channel.
1689
+ */
1690
+ response_type : string ;
1691
+ /** The `https:` URL of the embeddable content. */
1692
+ source : string ;
1693
+ /** The title or introductory text to show before the response. */
1694
+ title ?: string ;
1695
+ /** The description to show with the the response. */
1696
+ description ?: string ;
1697
+ /** The URL of an image that shows a preview of the embedded content. */
1698
+ image_url ?: string ;
1699
+ /** An array of objects specifying channels for which the response is intended. If **channels** is present, the
1700
+ * response is intended for a built-in integration and should not be handled by an API client.
1701
+ */
1702
+ channels ?: ResponseGenericChannel [ ] ;
1703
+ }
1704
+
1637
1705
/** RuntimeResponseGenericRuntimeResponseTypeImage. */
1638
1706
export interface RuntimeResponseGenericRuntimeResponseTypeImage extends RuntimeResponseGeneric {
1639
1707
/** The type of response returned by the dialog node. The specified response type must be supported by the
@@ -1753,6 +1821,28 @@ namespace AssistantV2 {
1753
1821
*/
1754
1822
channels ?: ResponseGenericChannel [ ] ;
1755
1823
}
1824
+
1825
+ /** RuntimeResponseGenericRuntimeResponseTypeVideo. */
1826
+ export interface RuntimeResponseGenericRuntimeResponseTypeVideo extends RuntimeResponseGeneric {
1827
+ /** The type of response returned by the dialog node. The specified response type must be supported by the
1828
+ * client application or channel.
1829
+ */
1830
+ response_type : string ;
1831
+ /** The `https:` URL of the video. */
1832
+ source : string ;
1833
+ /** The title or introductory text to show before the response. */
1834
+ title ?: string ;
1835
+ /** The description to show with the the response. */
1836
+ description ?: string ;
1837
+ /** An array of objects specifying channels for which the response is intended. If **channels** is present, the
1838
+ * response is intended for a built-in integration and should not be handled by an API client.
1839
+ */
1840
+ channels ?: ResponseGenericChannel [ ] ;
1841
+ /** For internal use only. */
1842
+ channel_options ?: JsonObject ;
1843
+ /** Descriptive text that can be used for screen readers or other situations where the video cannot be seen. */
1844
+ alt_text ?: string ;
1845
+ }
1756
1846
}
1757
1847
1758
1848
export = AssistantV2 ;
0 commit comments