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
5
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 1.0.1-main.8af1160 to 1.0.1-main.90a4f94

lib/core/PostChatContext.d.ts

15

CHANGELOG.md

@@ -6,2 +6,17 @@ # Changelog

### Added
- Add `getPostChatSurveyContext` API method
- Add `GetPostChatSurveyContext` telemetry event
- Add `widgetId` & `clientMessageId` as metadata on sending message
- Update `ChatConfig` interface with `LiveChatVersion`, `allowedFileExtensions` & `maxUploadFileSize` properties
### Fix
- Add `acs_webchat-chat-adapter` middlewares to format `channelData.tags`
- Skip `session init` call on existing conversation
### Changed
- README: added examples on usages of the post chat APIs.
- Uptake [@azure/communication-chat@1.1.1](https://www.npmjs.com/package/@azure/communication-chat/v/1.1.1)
- Uptake [acs_webchat-chat-adapter@0.0.35-beta.2](https://unpkg.com/acs_webchat-chat-adapter@0.0.35-beta.2/dist/chat-adapter.js)
## [1.0.0] - 2021-10-08

@@ -8,0 +23,0 @@ ### Added

2

lib/config/settings.d.ts
declare const ic3ClientVersion = "2021.08.14.1";
declare const webChatIC3AdapterVersion = "0.1.0-master.2dba07b";
declare const webChatACSAdapterVersion = "0.0.30";
declare const webChatACSAdapterVersion = "0.0.35-beta.2";
declare const ariaTelemetryKey = "c7655518acf1403f93ff6b9f77942f0a-d01a02fd-6b50-4de3-a566-62eda11f93bc-7083";
export { ic3ClientVersion, webChatIC3AdapterVersion, webChatACSAdapterVersion, ariaTelemetryKey };

@@ -8,3 +8,3 @@ "use strict";

exports.webChatIC3AdapterVersion = webChatIC3AdapterVersion;
var webChatACSAdapterVersion = '0.0.30';
var webChatACSAdapterVersion = '0.0.35-beta.2';
exports.webChatACSAdapterVersion = webChatACSAdapterVersion;

@@ -11,0 +11,0 @@ var ariaTelemetryKey = 'c7655518acf1403f93ff6b9f77942f0a-d01a02fd-6b50-4de3-a566-62eda11f93bc-7083';

export default interface ChatConfig {
ChatWidgetLanguage: any;
DataMaskingInfo: unknown;
LiveChatConfigAuthSettings: unknown;
LiveChatVersion: number;
LiveWSAndLiveChatEngJoin: any;
allowedFileExtensions: string;
maxUploadFileSize: string;
}

@@ -396,3 +396,3 @@ "use strict";

senderDisplayName: ACSParticipantDisplayName_1.default.Customer,
metadata: __assign({ deliveryMode: DeliveryMode_1.default.Bridged, tags: JSON.stringify([MessageTags_1.defaultMessageTags]) }, message.metadata)
metadata: __assign({ deliveryMode: DeliveryMode_1.default.Bridged, tags: MessageTags_1.defaultMessageTags.join(',') }, message.metadata)
};

@@ -399,0 +399,0 @@ _e.label = 1;

import ACSClient from "./core/messaging/ACSClient";
import { ParticipantsRemovedEvent } from '@azure/communication-signaling';
import ChatConfig from "./core/ChatConfig";

@@ -8,3 +9,2 @@ import ChatReconnectContext from "./core/ChatReconnectContext";

import ChatTranscriptBody from "./core/ChatTranscriptBody";
import { ParticipantsRemovedEvent } from '@azure/communication-signaling';
import FileMetadata from "@microsoft/omnichannel-amsclient/lib/FileMetadata";

@@ -17,3 +17,2 @@ import FramedClient from "@microsoft/omnichannel-amsclient/lib/FramedClient";

import IMessage from "@microsoft/omnichannel-ic3core/lib/model/IMessage";
import OmnichannelConfig from "./core/OmnichannelConfig";
import IRawMessage from "@microsoft/omnichannel-ic3core/lib/model/IRawMessage";

@@ -23,4 +22,5 @@ import IRawThread from "@microsoft/omnichannel-ic3core/lib/interfaces/IRawThread";

import LiveWorkItemDetails from "./core/LiveWorkItemDetails";
import OmnichannelConfig from "./core/OmnichannelConfig";
import OmnichannelMessage from "./core/messaging/OmnichannelMessage";
import OnNewMessageOptionalParams from "./core/messaging/OnNewMessageOptionalParams";
import OmnichannelMessage from "./core/messaging/OmnichannelMessage";
import StartChatOptionalParams from "./core/StartChatOptionalParams";

@@ -87,2 +87,3 @@ declare class OmnichannelChatSDK {

getVoiceVideoCalling(params?: any): Promise<any>;
getPostChatSurveyContext(): Promise<any>;
private getIC3Client;

@@ -89,0 +90,0 @@ private getChatConfig;

@@ -34,4 +34,5 @@ declare enum TelemetryEvent {

UpdateChatToken = "UpdateChatToken",
GetChatReconnectContext = "GetChatReconnectContext"
GetChatReconnectContext = "GetChatReconnectContext",
GetPostChatSurveyContext = "GetPostChatSurveyContext"
}
export default TelemetryEvent;

@@ -38,4 +38,5 @@ "use strict";

TelemetryEvent["GetChatReconnectContext"] = "GetChatReconnectContext";
TelemetryEvent["GetPostChatSurveyContext"] = "GetPostChatSurveyContext";
})(TelemetryEvent || (TelemetryEvent = {}));
exports.default = TelemetryEvent;
//# sourceMappingURL=TelemetryEvent.js.map
{
"name": "@microsoft/omnichannel-chat-sdk",
"version": "1.0.1-main.8af1160",
"version": "1.0.1-main.90a4f94",
"description": "Microsoft Omnichannel Chat SDK",

@@ -42,3 +42,3 @@ "files": [

"dependencies": {
"@azure/communication-chat": "1.1.0-beta.2",
"@azure/communication-chat": "1.1.1",
"@azure/communication-common": "1.1.0",

@@ -45,0 +45,0 @@ "@microsoft/ocsdk": "^0.3.0",

@@ -17,3 +17,3 @@ # Omnichannel Chat SDK

- [API Examples](#api-examples)
- [Sample Apps](samples/)
- [Sample Apps](https://github.com/microsoft/omnichannel-chat-sdk-samples)
- [Common Scenarios](#common-scenarios)

@@ -39,10 +39,8 @@ - [Feature Comparisons](#feature-comparisons)

| React Native Support | ❌ | ✔ |
| Escalation to Voice & Video | ✔ | Web Only |
| Co-browse | ✔ | Web Only |
| Screen Sharing | ✔ | Web Only |
| Escalation to Voice & Video | ✔ | ✔ | Only supported on Web |
| Co-browse | ✔ | 3rd party add-on | Only supported on Web |
| Screen Sharing | ✔ | 3rd party add-on | Only supported on Web |
| Authenticated Chat | ✔ | ✔ |
| Pre-chat Survey | ✔ | ✔ |
| Post-chat Survey | ✔ | ❌ |
| Queue Position | ✔ | ✔ |
| Average Wait Time | ✔ | ✔ |
| Post-chat Survey | ✔ | ✔ |
| Download Transcript | ✔ | ✔ |

@@ -57,2 +55,4 @@ | Email Transcript | ✔ | ✔ |

| Operating Hours | ✔ | ✔ |
| Queue Position | ✔ | ✔ | No SDK method. Handled as *system message* |
| Average Wait Time | ✔ | ✔ | No SDK method. Handled as *system message* |

@@ -71,3 +71,22 @@ **\*** BYOI: Bring Your Own Implementation

1. Run `npm install node-libs-react-native --save-dev`
1. Install `node-libs-react-native`
```
npm install node-libs-react-native --save-dev
```
1. Install `react-native-randomBytes`
```
npm install react-native-randombytes --save-dev
```
1. Install `react-native-get-random-values`
```
npm install react-native-get-random-values --save-dev
```
1. Install `react-native-url-polyfill`
```
npm install react-native-url-polyfill --save-dev
```
1. Update *metro.config.js* to use React Native compatible Node Core modules

@@ -87,12 +106,9 @@ ```ts

1. Import 'node-libs-react-native/globals' on top of your entry point file
1. Add following *import* on top of your entry point file
```ts
import 'node-libs-react-native/globals';
import 'react-native-get-random-values';
import 'react-native-url-polyfill';
```
1. Install `react-native-randomBytes`
```
npm install react-native-randombytes --save-dev
```
## API Reference

@@ -124,3 +140,4 @@

| OmnichannelChatSDK.createChatAdapter() | Get IC3Adapter | **Web only** |
| OmnichannelChatSDK.getVoiceVideoCalling() | Get VoiceVideoCall SDK for Escalation to Voice & Video| **Web only** |
| OmnichannelChatSDK.getVoiceVideoCalling() | Get VoiceVideoCall SDK for Escalation to Voice & Video | **Web only** |
| OmnichannelChatSDK.getPostChatSurveyContext() | Get post chat survey link, survey locale, and whether an agent has joined the survey | |

@@ -203,2 +220,17 @@ ## API examples

### Get PostChat Survey
```ts
try {
const context = await chatSDK.getPostChatSurveyContext();
if (context.participantJoined) { // participantJoined will be true if an agent has joined the conversation, or a bot has joined the conversation and the bot survey flag has been turned on on the admin side.
// formsProLocale is the default language you have set on the CustomerVoice portal. You can override this url parameter with any locale that CustomerVoice supports.
// If "&lang=" is not set on the url, the locale will be English.
const linkToSend = context.surveyInviteLink + "&lang=" + context.formsProLocale;
// This link is accessible and will redirect to the survey page. Use it as you see fit.
}
} catch (ex) {
// If the post chat should not be shown by any reason (e.g. post chat is not enabled), promise will be rejected.
}
```
### Start Chat

@@ -205,0 +237,0 @@ ```ts

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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