New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/omnichannel-chat-sdk

Package Overview
Dependencies
Maintainers
4
Versions
351
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/omnichannel-chat-sdk - npm Package Compare versions

Comparing version 0.1.1-main.34c5a39 to 0.1.1-main.3b3e3ff

lib/tsconfig.tsbuildinfo

7

CHANGELOG.md

@@ -9,3 +9,10 @@ # Changelog

- React sample app using Omnichannel Chat SDK with [BotFramework-WebChat](https://github.com/microsoft/BotFramework-WebChat)
- Expose `sessiontInit`'s `initContext` on `startChat`'s optional paramaters
### Changed
- Uptake [@microsoft/ocsdk@0.1.1](https://www.npmjs.com/package/@microsoft/ocsdk/v/0.1.1)
- Uptake [@microsoft/omnichannel-ic3core@0.1.1](https://www.npmjs.com/package/@microsoft/omnichannel-ic3core/v/0.1.1)
- Uptake [jest@26.6.3](https://www.npmjs.com/package/jest/v/26.6.3)
- Uptake [ts-jest@26.5.1](https://www.npmjs.com/package/ts-jest/v/26.5.1)
### Fixed

@@ -12,0 +19,0 @@ - onAgentEndSession triggered on accept voice & video call

@@ -0,1 +1,2 @@

import InitContext from "@microsoft/ocsdk/lib/Model/InitContext";
import ILiveChatContext from "./ILiveChatContext";

@@ -5,2 +6,8 @@ export default interface IStartChatOptionalParams {

preChatResponse?: object;
customContext?: object;
browser?: string;
os?: string;
locale?: string;
device?: string;
initContext?: InitContext;
}

@@ -121,5 +121,24 @@ "use strict";

};
if (optionalParams.customContext) {
sessionInitOptionalParams.initContext.customContextData = optionalParams.customContext; // eslint-disable-line @typescript-eslint/no-explicit-any
}
if (optionalParams.browser) {
sessionInitOptionalParams.initContext.browser = optionalParams.browser;
}
if (optionalParams.os) {
sessionInitOptionalParams.initContext.os = optionalParams.os;
}
if (optionalParams.locale) {
sessionInitOptionalParams.initContext.locale = optionalParams.locale;
}
if (optionalParams.device) {
sessionInitOptionalParams.initContext.device = optionalParams.device;
}
if (optionalParams.preChatResponse) {
sessionInitOptionalParams.initContext.preChatResponse = optionalParams.preChatResponse;
}
// Override initContext completely
if (optionalParams.initContext) {
sessionInitOptionalParams.initContext = optionalParams.initContext;
}
if (this.authenticatedUserToken) {

@@ -126,0 +145,0 @@ sessionInitOptionalParams.authenticatedUserToken = this.authenticatedUserToken;

13

package.json
{
"name": "@microsoft/omnichannel-chat-sdk",
"version": "0.1.1-main.34c5a39",
"version": "0.1.1-main.3b3e3ff",
"description": "Microsoft Omnichannel Chat SDK",
"files": [
"lib/**/*"
],
"main": "lib/index.js",

@@ -33,10 +36,10 @@ "types": "lib/index.d.ts",

"eslint": "^7.15.0",
"jest": "^26.4.2",
"ts-jest": "^26.3.0",
"jest": "^26.6.3",
"ts-jest": "^26.5.1",
"typescript": "^3.9.5"
},
"dependencies": {
"@microsoft/ocsdk": "^0.1.0",
"@microsoft/omnichannel-ic3core": "^0.1.0"
"@microsoft/ocsdk": "^0.1.1",
"@microsoft/omnichannel-ic3core": "^0.1.1"
}
}

@@ -8,2 +8,9 @@ # Omnichannel Chat SDK

## Table of Contents
- [API Reference](#api-reference)
- [API Examples](#api-examples)
- [Sample Apps](samples/)
- [Common Scenarios](#common-scenarios)
- [Feature Comparisons](#feature-comparisons)
## Installation

@@ -15,6 +22,4 @@

## API
## API Reference
### High Level Overview
| Method | Description | Notes |

@@ -43,2 +48,4 @@ | ------ | ----------- | ----- |

## API examples
### Import

@@ -101,5 +108,12 @@ ```ts

```ts
const customContext = {
'contextKey1': {'value': 'contextValue1', 'isDisplayable': true},
'contextKey2': {'value': 12.34, 'isDisplayable': false},
'contextKey3': {'value': true}
};
const optionalParams = {
preChatResponse: '', // PreChatSurvey response
liveChatContext: {} // EXISTING chat context data
liveChatContext: {}, // EXISTING chat context data
customContext // Custom Context
};

@@ -204,3 +218,3 @@ await chatSDK.startChat(optionalParams);

## Samples
## Common Scenarios

@@ -207,0 +221,0 @@ ### PreChatSurvey

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc