Skip to content

V4.0.0 branch #854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 159 commits into from
Mar 28, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
1548413
build: remove support for node 4
dpopp07 Sep 26, 2018
624de81
chore: test disabling ssl with websocket
dpopp07 Sep 27, 2018
f8466c8
fix(icp): disabling ssl verification now works for websocket connection
dpopp07 Sep 27, 2018
5a2de11
refactor: refactor not to depend on a variable
dpopp07 Sep 27, 2018
2a2fd9d
refactor: fix silly mistake and use variable assignment
dpopp07 Sep 27, 2018
fc09838
refactor: remove unnecessary ternary operator
dpopp07 Sep 27, 2018
b96e3e6
test: modify ssl verification tests
dpopp07 Sep 27, 2018
69a6f78
Merge pull request #782 from watson-developer-cloud/disable-ssl-for-w…
dpopp07 Sep 28, 2018
b4532b0
chore(release): 3.11.1 [skip ci]
semantic-release-bot Sep 28, 2018
6ba952a
docs(readme): fix typo in assistant v2 example
dpopp07 Sep 28, 2018
dba0da1
test: use RC instance for all visual recognition integration tests
dpopp07 Oct 1, 2018
50971c0
Merge pull request #783 from watson-developer-cloud/drp/readme-typo
dpopp07 Oct 1, 2018
8bd82de
Merge branch 'v4.0.0' into drop-node-4-support
dpopp07 Oct 1, 2018
afe76a5
Merge pull request #784 from watson-developer-cloud/drop-node-4-support
dpopp07 Oct 1, 2018
01d44ac
docs(readme): remove documentation for old visrec 'apikey'
dpopp07 Oct 4, 2018
e48679d
docs(examples): update vis rec example to use iam_apikey
dpopp07 Oct 4, 2018
a8c2206
Merge pull request #787 from watson-developer-cloud/update-vis-rec-ex…
dpopp07 Oct 4, 2018
838b044
feat(discovery): new parameters added to match updates to the service
dpopp07 Oct 8, 2018
7977787
docs: add deprecation messages for conversation v1 and language trans…
dpopp07 Oct 8, 2018
a538015
docs: add deprecation message for api_key in visual recognition
dpopp07 Oct 8, 2018
e51c93c
Merge branch 'master' into v4.0.0
dpopp07 Oct 8, 2018
92d48e2
chore: remove all code dealing with api_key in the base class
dpopp07 Oct 8, 2018
43b75fd
test(discovery): update unit tests to reflect new changes
dpopp07 Oct 8, 2018
f18cbfb
test: remove api_key artifacts from vis rec tests
dpopp07 Oct 9, 2018
1c4fee6
chore(discovery): hand edit to convert arrays to strings when require…
dpopp07 Oct 9, 2018
965c86e
Merge pull request #788 from watson-developer-cloud/regenerate-sdk-re…
dpopp07 Oct 10, 2018
de1b436
chore(release): 3.12.0 [skip ci]
semantic-release-bot Oct 10, 2018
e4cb53b
Merge branch 'master' into v4.0.0
dpopp07 Oct 10, 2018
d1b1200
Merge branch 'v4.0.0' into remove-api-key
dpopp07 Oct 10, 2018
7d7408f
chore(dialog): remove dialog service and all associated
dpopp07 Oct 11, 2018
83d9232
chore(language-translator-v2): remove language translator v2 service …
dpopp07 Oct 11, 2018
c810de2
chore(conversation): remove conversation service and all associated code
dpopp07 Oct 11, 2018
1e37c14
build: update encrypted auth file to account for removed services
dpopp07 Oct 11, 2018
2a612a0
build: correct typo in travis file
dpopp07 Oct 11, 2018
9d60823
Merge pull request #790 from watson-developer-cloud/remove-deprecated…
dpopp07 Oct 12, 2018
8571a1f
refactor(discovery): remove compatibility layer for discovery
dpopp07 Oct 12, 2018
ddc7a20
Merge branch 'v4.0.0' into remove-api-key
dpopp07 Oct 12, 2018
532ac32
Merge pull request #789 from watson-developer-cloud/remove-api-key
germanattanasio Oct 15, 2018
575638b
Merge branch 'v4.0.0' into remove-compatibility-layer
dpopp07 Oct 15, 2018
0ac087c
refactor(natural-language-classifier): remove compatibility layer for…
dpopp07 Oct 15, 2018
4d50f89
docs: remove api_key from error message list of authentication patterns
dpopp07 Oct 15, 2018
359cc79
refactor(natural-language-understanding): remove compatibility layer …
dpopp07 Oct 15, 2018
1b27685
refactor(personality-insights-v3): remove compatibility layer for per…
dpopp07 Oct 15, 2018
9f10898
refactor(tone-analyzer): remove compatibility layer for tone analyzer
dpopp07 Oct 15, 2018
6377067
refactor(visual-recognition): remove compatibility layer for visual r…
dpopp07 Oct 15, 2018
d39e497
docs(assistant-v2): update readme to notify users that assistant v2 i…
dpopp07 Oct 19, 2018
fcfe626
Merge pull request #794 from watson-developer-cloud/update-readme-ass…
germanattanasio Oct 19, 2018
6994d3c
refactor(text-to-speech): remove compatibility layer for text to speech
dpopp07 Oct 22, 2018
310bdd0
refactor(speech-to-text): remove compatibility layer for speech to text
dpopp07 Oct 22, 2018
1bc0426
build: fix typedoc generator to match naming changes
dpopp07 Oct 24, 2018
8a4144f
test: update discovery credentials
dpopp07 Oct 24, 2018
abaf582
test: add conversation credentials
dpopp07 Oct 24, 2018
6f75dba
test: replace missing services in auth js file
dpopp07 Oct 24, 2018
d96af84
test: make discovery test node 4 friendly
dpopp07 Oct 24, 2018
ead267e
Merge branch 'master' into update-discovery-credentials
dpopp07 Oct 24, 2018
0d93955
Merge pull request #796 from watson-developer-cloud/update-discovery-…
germanattanasio Oct 25, 2018
55015d9
docs: add a first draft add a migration guide
dpopp07 Oct 26, 2018
5ed4f6b
build: update encrypted auth file
dpopp07 Oct 29, 2018
858a8cb
Merge branch 'master' into v4.0.0
dpopp07 Oct 29, 2018
b4fbc45
test: update ltv3 test
dpopp07 Oct 29, 2018
9d38275
Merge branch 'v4.0.0' into remove-compatibility-layer
dpopp07 Oct 29, 2018
df82a9e
test: update tests to match changes
dpopp07 Oct 29, 2018
26cd5c2
Merge pull request #795 from watson-developer-cloud/remove-compatibil…
dpopp07 Oct 29, 2018
d5ba660
feat(discovery): add new methods: `createTokenizationDictionary`, `de…
dpopp07 Oct 29, 2018
5ac33db
test: add unit and integration tests for new discovery methods
dpopp07 Oct 29, 2018
a5047f5
Merge pull request #797 from watson-developer-cloud/regenerate-sdk-re…
dpopp07 Oct 30, 2018
c33404a
chore(release): 3.13.0 [skip ci]
semantic-release-bot Oct 30, 2018
3ed91de
test: update encrypted auth file
dpopp07 Nov 2, 2018
8eaa578
Merge branch 'master' into v4.0.0
dpopp07 Nov 2, 2018
b1a124c
refactor(discovery): rename model `QueryResultResultMetadata` to `Que…
dpopp07 Nov 2, 2018
2668ad1
Merge pull request #798 from watson-developer-cloud/update-discovery-…
dpopp07 Nov 2, 2018
2d5875e
Merge branch 'master' into v4.0.0
dpopp07 Nov 5, 2018
4567f81
update discovery with new endpoints
dpopp07 Nov 5, 2018
60694a4
Merge branch 'v4.0.0' into update-query_result_metadata-model-name
dpopp07 Nov 5, 2018
a87447f
Merge pull request #799 from watson-developer-cloud/update-query_resu…
dpopp07 Nov 5, 2018
b914f81
Merge branch 'master' into v4.0.0
dpopp07 Dec 11, 2018
cb58577
chore: maintain filenames until release
dpopp07 Dec 11, 2018
bd2f654
test: clean up tests
dpopp07 Dec 11, 2018
938d22d
refactor(assistant-v2): refactor assistant to return Promises in addi…
dpopp07 Dec 12, 2018
465caae
chore: revise POC for Promise support
dpopp07 Dec 13, 2018
f7037af
test: Add POC unit tests for Promise handling
dpopp07 Dec 13, 2018
15a4c7f
feat: add model `MessageContextSkill`
dpopp07 Jan 4, 2019
ad97164
Merge branch 'master' into v4.0.0-branch
dpopp07 Jan 7, 2019
0cef883
Merge branch 'master' into v4.0.0-branch
dpopp07 Jan 7, 2019
1df75ac
feat: add `sort` query parameter to `getWorkspace()`
dpopp07 Jan 8, 2019
fd6e20b
feat: The SDK now returns a Promise for all methods if a callback is …
dpopp07 Jan 8, 2019
b153db6
Merge branch 'master' into add-promise-support
dpopp07 Jan 9, 2019
a2ee6f2
test: add unit tests for promise support
dpopp07 Jan 10, 2019
e5e5302
chore(personality-insights): remove Personality Insights v2
dpopp07 Jan 10, 2019
e6899e5
Merge branch 'master' into v4.0.0-branch
dpopp07 Jan 10, 2019
c48a211
docs: add documentation and an example for using promises
dpopp07 Jan 10, 2019
0367e60
Merge branch 'master' into v4.0.0-branch
dpopp07 Jan 17, 2019
d5aece4
test: fix filename typo in test
dpopp07 Jan 17, 2019
2a3638f
Merge branch 'master' into add-promise-support
dpopp07 Jan 18, 2019
fa03491
Merge branch 'v4.0.0-branch' into add-promise-support
dpopp07 Jan 18, 2019
4db3e4b
chore: fix typos
dpopp07 Jan 18, 2019
f656731
refactor: refactor core code to use `axios` instead of `request` for …
dpopp07 Jan 23, 2019
bb545cd
chore: address pr comments
dpopp07 Jan 29, 2019
cf59770
chore: add support for rejectUnauthorized
dpopp07 Jan 29, 2019
2c3d91e
chore: gzip responses using the Accept-Encoding header
dpopp07 Jan 29, 2019
e3cd70a
chore: commit lockfile
dpopp07 Feb 5, 2019
c324ab0
feat: new error formatter, provides the same information regardless o…
dpopp07 Feb 7, 2019
7ff3e98
docs: add recent changes to upgrade file
dpopp07 Feb 7, 2019
5b45a86
chore: add all response headers to error object
dpopp07 Feb 8, 2019
2e6e18d
Merge pull request #829 from watson-developer-cloud/use-axios-for-req…
dpopp07 Feb 8, 2019
569b1fc
Merge branch 'master' into v4.0.0-branch
dpopp07 Feb 8, 2019
09e0e91
refactor: stop using cookies in requests
dpopp07 Feb 8, 2019
6fd8af3
Merge branch 'v4.0.0-branch' into add-promise-support
dpopp07 Feb 8, 2019
07c1c7d
Merge pull request #834 from watson-developer-cloud/remove-cookie-code
dpopp07 Feb 11, 2019
36dc27e
chore: remove unneeded file
dpopp07 Feb 11, 2019
a922875
Merge branch 'v4.0.0-branch' into add-promise-support
dpopp07 Feb 11, 2019
dc08ced
docs: update upgrade docs with info about promises
dpopp07 Feb 11, 2019
7b4e8a3
Merge pull request #813 from watson-developer-cloud/add-promise-support
dpopp07 Feb 11, 2019
25acf8f
build: change version number in package.json for v4 release candidate
dpopp07 Feb 11, 2019
bfc61a0
Merge branch 'master' into v4.0.0-branch
dpopp07 Feb 13, 2019
dd534f6
refactor: remove module for converting training_data to csv
dpopp07 Feb 13, 2019
66bb198
Merge pull request #836 from watson-developer-cloud/remove-json-train…
dpopp07 Feb 14, 2019
dd8e283
Merge branch 'master' into v4.0.0-branch
dpopp07 Feb 14, 2019
9902fa4
build: update dependencies to latest versions
dpopp07 Feb 14, 2019
0ea5683
Merge pull request #837 from watson-developer-cloud/update-dependencies
dpopp07 Feb 15, 2019
06d7c65
refactor: in `query` and `federatedQuery`, only accept string values …
dpopp07 Feb 18, 2019
db71919
docs: update UPGRADE doc with array parameter changes
dpopp07 Feb 18, 2019
7e400de
Merge pull request #840 from watson-developer-cloud/discovery/fix-arr…
dpopp07 Feb 18, 2019
682b17f
chore: add temporary wrapper files to use until release
dpopp07 Feb 19, 2019
f376862
chore: back-fill new discovery and stt methods with promise support
dpopp07 Feb 19, 2019
8466043
build: create a new release candidate
dpopp07 Feb 19, 2019
574a974
refactor: remove ReadableStream as a return type for all generated me…
dpopp07 Feb 20, 2019
5cff833
docs: update examples that returned streams
dpopp07 Feb 20, 2019
9d56d5b
Merge pull request #841 from watson-developer-cloud/no-stream-return-…
dpopp07 Feb 20, 2019
91ed5a4
refactor(assistant-v1): change name of variable `export` to `_export`
dpopp07 Mar 1, 2019
8d9e3d2
docs: add export -> _export change to migration document
dpopp07 Mar 1, 2019
ecb5dee
Merge pull request #844 from watson-developer-cloud/escape-export-var…
dpopp07 Mar 1, 2019
8f7c62f
refactor: require filenames for `createStopwordList` in discovery and…
dpopp07 Mar 14, 2019
f5d4315
Merge pull request #847 from watson-developer-cloud/make-filename-req…
dpopp07 Mar 18, 2019
4d42940
refactor: separate core code from v4 branch
dpopp07 Mar 21, 2019
cc698c4
refactor: migrate tests to use correct import mechanism
dpopp07 Mar 21, 2019
75485a7
chore: update unit tests
dpopp07 Mar 21, 2019
4ea3c27
refactor: remove index.ts file as it was deprecated starting in v3
dpopp07 Mar 21, 2019
92d1ee2
Merge branch 'v4.0.0-branch' into update-index-file
dpopp07 Mar 21, 2019
ec601c5
Merge pull request #851 from watson-developer-cloud/update-index-file
dpopp07 Mar 22, 2019
6fac701
refactor: in discovery, rename `getSourceCredentials` to `getCredenti…
dpopp07 Mar 26, 2019
4757091
refactor(assistant-v2): remove MessageContextSkill interface
dpopp07 Mar 27, 2019
f6adbe9
refactor(assistant-v2): parameter names changed for v4
dpopp07 Mar 27, 2019
908d8e7
refactor(compare-comply): parameter names changed for v4
dpopp07 Mar 27, 2019
1c20e07
refactor(discovery): v4 changes
dpopp07 Mar 28, 2019
e7989cf
refactor(language-translator): v4 changes
dpopp07 Mar 28, 2019
9230f6c
refactor(natural-language-classifier): v4 changes
dpopp07 Mar 28, 2019
4a2c731
refactor(natural-language-understanding): v4 changes
dpopp07 Mar 28, 2019
7dc7809
refactor(personality-insights): v4 changes
dpopp07 Mar 28, 2019
57f7109
refactor(speech-to-text): v4 changes
dpopp07 Mar 28, 2019
8cb2db2
refactor(text-to-speech): v4 changes
dpopp07 Mar 28, 2019
dc5f859
refactor(tone-analyzer): v4 changes
dpopp07 Mar 28, 2019
3957e2d
refactor(visual_recognition): v4 changes
dpopp07 Mar 28, 2019
931bc08
chore: re-order imports
dpopp07 Mar 28, 2019
45e759b
docs: readme updates for v4
dpopp07 Mar 28, 2019
a3beeb9
Merge branch 'master' into v4.0.0-branch
dpopp07 Mar 28, 2019
0ea8c5f
build: rebuild package-lock file
dpopp07 Mar 28, 2019
29f87df
fix: update ibm-cloud-sdk-core to 0.1.1
dpopp07 Mar 28, 2019
bd74547
Merge branch 'master' into v4.0.0-branch
dpopp07 Mar 28, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor(assistant-v2): remove MessageContextSkill interface
  • Loading branch information
dpopp07 committed Mar 27, 2019
commit 47570916ccfaaee9e9733ce9d8c20b2989457b03
8 changes: 6 additions & 2 deletions UPGRADE-4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
- [Default Methods Compatibility]
- [Removed Services]
- [Constructor Compatibility]
- [Assistant Compatibility]
- [Assistant V1 Compatibility]
- [Assistant V2 Compatibility]
- [Discovery Compatibility]
- [Natural Language Classifier Compatibility]
- [Personality Insights v3 Compatibility]
Expand Down Expand Up @@ -57,9 +58,12 @@ The following services have been deprecated for an extended period of time and w
- Parameter name changed: `version_date` -> `version`
- The parameter `apikey` is no longer supported

### Assistant Compatibility
### Assistant V1 Compatibility
- Parameter name changed: `export` -> `_export` (_All instances_)

### Assistant V2 Compatibility
- Interface `MessageContextSkill` removed

### Discovery Compatibility
#### getSourceCredentials
- Method name changed: `getSourceCredentials` -> `getCredentials`
Expand Down
65 changes: 29 additions & 36 deletions assistant/v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

import { AxiosResponse } from 'axios';
import * as extend from 'extend';
import { BaseService } from 'ibm-cloud-sdk-core';
import { getMissingParams } from 'ibm-cloud-sdk-core';
import { BaseService, getMissingParams } from 'ibm-cloud-sdk-core';
import { getSdkHeaders } from '../lib/common';

/**
Expand Down Expand Up @@ -70,12 +69,12 @@ class AssistantV2 extends BaseService {
* @param {Object} params - The parameters to send to the service.
* @param {string} params.assistant_id - Unique identifier of the assistant. You can find the assistant ID of an
* assistant on the **Assistants** tab of the Watson Assistant tool. For information about creating assistants, see
* the [documentation](https://console.bluemix.net/docs/services/assistant/create-assistant.html#creating-assistants).
* the [documentation](https://console.bluemix.net/docs/services/assistant/assistant-add.html#assistant-add-task).
*
* **Note:** Currently, the v2 API does not support creating assistants.
* @param {Object} [params.headers] - Custom request headers
* @param {Function} [callback] - The callback that handles the response.
* @returns {NodeJS.ReadableStream|void}
* @returns {Promise<any>|void}
*/
public createSession(params: AssistantV2.CreateSessionParams, callback?: AssistantV2.Callback<AssistantV2.SessionResponse>): Promise<any> | void {
const _params = extend({}, params);
Expand All @@ -100,7 +99,7 @@ class AssistantV2 extends BaseService {
};

const sdkHeaders = getSdkHeaders('conversation', 'v2', 'createSession');

const parameters = {
options: {
url: '/v2/assistants/{assistant_id}/sessions',
Expand All @@ -110,7 +109,6 @@ class AssistantV2 extends BaseService {
defaultOptions: extend(true, {}, this._options, {
headers: extend(true, sdkHeaders, {
'Accept': 'application/json',
'Content-Type': 'application/json',
}, _params.headers),
}),
};
Expand All @@ -126,13 +124,13 @@ class AssistantV2 extends BaseService {
* @param {Object} params - The parameters to send to the service.
* @param {string} params.assistant_id - Unique identifier of the assistant. You can find the assistant ID of an
* assistant on the **Assistants** tab of the Watson Assistant tool. For information about creating assistants, see
* the [documentation](https://console.bluemix.net/docs/services/assistant/create-assistant.html#creating-assistants).
* the [documentation](https://console.bluemix.net/docs/services/assistant/assistant-add.html#assistant-add-task).
*
* **Note:** Currently, the v2 API does not support creating assistants.
* @param {string} params.session_id - Unique identifier of the session.
* @param {Object} [params.headers] - Custom request headers
* @param {Function} [callback] - The callback that handles the response.
* @returns {NodeJS.ReadableStream|void}
* @returns {Promise<any>|void}
*/
public deleteSession(params: AssistantV2.DeleteSessionParams, callback?: AssistantV2.Callback<AssistantV2.Empty>): Promise<any> | void {
const _params = extend({}, params);
Expand All @@ -158,7 +156,7 @@ class AssistantV2 extends BaseService {
};

const sdkHeaders = getSdkHeaders('conversation', 'v2', 'deleteSession');

const parameters = {
options: {
url: '/v2/assistants/{assistant_id}/sessions/{session_id}',
Expand Down Expand Up @@ -189,15 +187,17 @@ class AssistantV2 extends BaseService {
* @param {Object} params - The parameters to send to the service.
* @param {string} params.assistant_id - Unique identifier of the assistant. You can find the assistant ID of an
* assistant on the **Assistants** tab of the Watson Assistant tool. For information about creating assistants, see
* the [documentation](https://console.bluemix.net/docs/services/assistant/create-assistant.html#creating-assistants).
* the [documentation](https://console.bluemix.net/docs/services/assistant/assistant-add.html#assistant-add-task).
*
* **Note:** Currently, the v2 API does not support creating assistants.
* @param {string} params.session_id - Unique identifier of the session.
* @param {MessageInput} [params.input] - The user input.
* @param {MessageContext} [params.context] - State information for the conversation.
* @param {MessageInput} [params.input] - An input object that includes the input text.
* @param {MessageContext} [params.context] - State information for the conversation. The context is stored by the
* assistant on a per-session basis. You can use this property to set or modify context variables, which can also be
* accessed by dialog nodes.
* @param {Object} [params.headers] - Custom request headers
* @param {Function} [callback] - The callback that handles the response.
* @returns {NodeJS.ReadableStream|void}
* @returns {Promise<any>|void}
*/
public message(params: AssistantV2.MessageParams, callback?: AssistantV2.Callback<AssistantV2.MessageResponse>): Promise<any> | void {
const _params = extend({}, params);
Expand Down Expand Up @@ -228,12 +228,11 @@ class AssistantV2 extends BaseService {
};

const sdkHeaders = getSdkHeaders('conversation', 'v2', 'message');

const parameters = {
options: {
url: '/v2/assistants/{assistant_id}/sessions/{session_id}/message',
method: 'POST',
json: true,
body,
path,
},
Expand Down Expand Up @@ -284,15 +283,15 @@ namespace AssistantV2 {

/** Parameters for the `createSession` operation. */
export interface CreateSessionParams {
/** Unique identifier of the assistant. You can find the assistant ID of an assistant on the **Assistants** tab of the Watson Assistant tool. For information about creating assistants, see the [documentation](https://console.bluemix.net/docs/services/assistant/create-assistant.html#creating-assistants). **Note:** Currently, the v2 API does not support creating assistants. */
/** Unique identifier of the assistant. You can find the assistant ID of an assistant on the **Assistants** tab of the Watson Assistant tool. For information about creating assistants, see the [documentation](https://console.bluemix.net/docs/services/assistant/assistant-add.html#assistant-add-task). **Note:** Currently, the v2 API does not support creating assistants. */
assistant_id: string;
headers?: Object;
return_response?: boolean;
}

/** Parameters for the `deleteSession` operation. */
export interface DeleteSessionParams {
/** Unique identifier of the assistant. You can find the assistant ID of an assistant on the **Assistants** tab of the Watson Assistant tool. For information about creating assistants, see the [documentation](https://console.bluemix.net/docs/services/assistant/create-assistant.html#creating-assistants). **Note:** Currently, the v2 API does not support creating assistants. */
/** Unique identifier of the assistant. You can find the assistant ID of an assistant on the **Assistants** tab of the Watson Assistant tool. For information about creating assistants, see the [documentation](https://console.bluemix.net/docs/services/assistant/assistant-add.html#assistant-add-task). **Note:** Currently, the v2 API does not support creating assistants. */
assistant_id: string;
/** Unique identifier of the session. */
session_id: string;
Expand All @@ -302,13 +301,13 @@ namespace AssistantV2 {

/** Parameters for the `message` operation. */
export interface MessageParams {
/** Unique identifier of the assistant. You can find the assistant ID of an assistant on the **Assistants** tab of the Watson Assistant tool. For information about creating assistants, see the [documentation](https://console.bluemix.net/docs/services/assistant/create-assistant.html#creating-assistants). **Note:** Currently, the v2 API does not support creating assistants. */
/** Unique identifier of the assistant. You can find the assistant ID of an assistant on the **Assistants** tab of the Watson Assistant tool. For information about creating assistants, see the [documentation](https://console.bluemix.net/docs/services/assistant/assistant-add.html#assistant-add-task). **Note:** Currently, the v2 API does not support creating assistants. */
assistant_id: string;
/** Unique identifier of the session. */
session_id: string;
/** The user input. */
/** An input object that includes the input text. */
input?: MessageInput;
/** State information for the conversation. */
/** State information for the conversation. The context is stored by the assistant on a per-session basis. You can use this property to set or modify context variables, which can also be accessed by dialog nodes. */
context?: MessageContext;
headers?: Object;
return_response?: boolean;
Expand Down Expand Up @@ -384,7 +383,7 @@ namespace AssistantV2 {
typing?: boolean;
/** The URL of the image. */
source?: string;
/** The title to show before the response. */
/** The title or introductory text to show before the response. */
title?: string;
/** The description to show with the the response. */
description?: string;
Expand Down Expand Up @@ -416,37 +415,31 @@ namespace AssistantV2 {
input?: MessageInput;
}

/** State information for the conversation. */
/** MessageContext. */
export interface MessageContext {
/** Contains information that can be shared by all skills within the Assistant. */
/** Information that is shared by all skills used by the Assistant. */
global?: MessageContextGlobal;
/** Contains information specific to particular skills within the Assistant. */
/** Information specific to particular skills used by the Assistant. **Note:** Currently, only a single property named `main skill` is supported. This object contains variables that apply to the dialog skill used by the assistant. */
skills?: MessageContextSkills;
}

/** Contains information that can be shared by all skills within the Assistant. */
/** Information that is shared by all skills used by the Assistant. */
export interface MessageContextGlobal {
/** Properties that are shared by all skills used by the assistant. */
/** Built-in system properties that apply to all skills used by the assistant. */
system?: MessageContextGlobalSystem;
}

/** Properties that are shared by all skills used by the assistant. */
/** Built-in system properties that apply to all skills used by the assistant. */
export interface MessageContextGlobalSystem {
/** The user time zone. The assistant uses the time zone to correctly resolve relative time references. */
timezone?: string;
/** A string value that identifies the user who is interacting with the assistant. The client must provide a unique identifier for each individual end user who accesses the application. For Plus and Premium plans, this user ID is used to identify unique users for billing purposes. This string cannot contain carriage return, newline, or tab characters. */
user_id?: string;
/** A counter that is automatically incremented with each turn of the conversation. A value of 1 indicates that this is the the first turn of a new conversation, which can affect the behavior of some skills. */
/** A counter that is automatically incremented with each turn of the conversation. A value of 1 indicates that this is the the first turn of a new conversation, which can affect the behavior of some skills (for example, triggering the start node of a dialog). */
turn_count?: number;
}

/** Contains information specific to a particular skill within the Assistant. */
export interface MessageContextSkill {
/** Arbitrary variables that can be read and written to by a particular skill within the Assistant. */
user_defined?: string;
}

/** Contains information specific to particular skills within the Assistant. */
/** Information specific to particular skills used by the Assistant. **Note:** Currently, only a single property named `main skill` is supported. This object contains variables that apply to the dialog skill used by the assistant. */
export interface MessageContextSkills {
/** MessageContextSkills accepts additional properties. */
[propName: string]: any;
Expand Down Expand Up @@ -512,7 +505,7 @@ namespace AssistantV2 {
export interface MessageResponse {
/** Assistant output to be rendered or processed by the client. */
output: MessageOutput;
/** State information for the conversation. */
/** State information for the conversation. The context is stored by the assistant on a per-session basis. You can use this property to access context variables. **Note:** The context is included in message responses only if **return_context**=`true` in the message request. */
context?: MessageContext;
}

Expand Down
2 changes: 1 addition & 1 deletion test/integration/assistant.v2.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const AssistantV2 = require('../../assistant/v2');
const authHelper = require('../resources/auth_helper.js');

const auth = authHelper.auth.assistant;
auth.version = '2018-09-19';
auth.version = '2019-03-27';

describe('assistant v2 integration', function() {
const assistant = new AssistantV2(auth);
Expand Down
Loading