From 6f04caaf2efdce290e68e4c0f7ca3e0bc9a066dd Mon Sep 17 00:00:00 2001 From: Steven Davelaar Date: Tue, 28 Nov 2023 15:01:12 +0100 Subject: [PATCH] New version 2.7.3 (#52) --- RELEASE_NOTES.md | 7 +++++++ package-lock.json | 2 +- package.json | 2 +- .../updateApplicationContextCommandMessage.ts | 18 ++++++++++++++---- .../lib/message/messageDeserializer.spec.ts | 2 +- 5 files changed, 24 insertions(+), 7 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 9ecb785..273a24f 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,6 @@ # Release Notes +- [Version 2.7.3](#v273) - [Version 2.7.2](#v272) - [Version 2.7.1](#v271) - [Version 2.7.0](#v270) @@ -21,6 +22,12 @@ - [Version 2.4.3](#v243) - [Version 2.4.2](#v242) +## Version 2.7.3 + +### Fixed Issues + +- Renamed contextSource property to source in UpdateApplicationContextCommand + ## Version 2.7.2 ### New Features diff --git a/package-lock.json b/package-lock.json index 7da28d1..5e2cdd2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@oracle/bots-node-sdk", - "version": "2.7.2", + "version": "2.7.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 212c8a0..520651a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@oracle/bots-node-sdk", - "version": "2.7.2", + "version": "2.7.3", "description": "Oracle Digital Assistant SDK for custom component development and webhook integrations", "main": "index.js", "browser": "index-browser.js", diff --git a/ts/lib2/messagev2/messagePayload/updateApplicationContextCommandMessage.ts b/ts/lib2/messagev2/messagePayload/updateApplicationContextCommandMessage.ts index d6d73fc..34fcb72 100644 --- a/ts/lib2/messagev2/messagePayload/updateApplicationContextCommandMessage.ts +++ b/ts/lib2/messagev2/messagePayload/updateApplicationContextCommandMessage.ts @@ -22,7 +22,7 @@ export class UpdateApplicationContextCommandMessage extends CommandMessage { private pageName?: string; private fieldName?: string; private parameters?: Map; - private contextSource: ContextSource; + private source: ContextSource; private reset?: boolean; /** @@ -31,7 +31,7 @@ export class UpdateApplicationContextCommandMessage extends CommandMessage { */ constructor(applicationName: string) { super(CommandType.updateApplicationContext); - this.contextSource = ContextSource.skill; + this.source = ContextSource.skill; this.applicationName = applicationName; } @@ -39,8 +39,18 @@ export class UpdateApplicationContextCommandMessage extends CommandMessage { * Gets the context source * @returns {ContextSource} The context source */ - public getContextSource(): ContextSource { - return this.contextSource; + public getSource(): ContextSource { + return this.source; + } + + /** + * Sets the context source + * @param {ContextSource} The context source + * @returns {this} The updated instance of the UpdateContextCommandMessage. + */ + public setSource(source: ContextSource): this { + this.source = source; + return this; } /** diff --git a/ts/spec/lib/message/messageDeserializer.spec.ts b/ts/spec/lib/message/messageDeserializer.spec.ts index d977989..460c5e8 100644 --- a/ts/spec/lib/message/messageDeserializer.spec.ts +++ b/ts/spec/lib/message/messageDeserializer.spec.ts @@ -205,7 +205,7 @@ describe('MessageDeserializer', () => { let expected: string = fs.readFileSync(file, 'utf-8'); let msg = MF.messageFromJson(JSON.parse(expected)) as UpdateApplicationContextCommandMessage; expect(msg.getCommand()).toEqual(CommandType.updateApplicationContext); - expect(msg.getContextSource()).toEqual(ContextSource.skill); + expect(msg.getSource()).toEqual(ContextSource.skill); expect(msg.getReset()).toBeTruthy; expect(msg.getApplicationName()).toEqual('HCM'); expect(msg.getPageName()).toEqual('JobRequisition');