@microsoft/omnichannel-chat-sdk 1.3.1-main.2674439 → 1.3.1-main.6c37a66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
4
  ## [Unreleased]
5
+ ### Added
6
+ - Add ability to use `ChatSDK.getLiveChatTranscript()` to fetch live chat transcript from `liveChatContext`
7
+ - Add ability to use `ChatSDK.getConversationDetails()` to fetch conversation details from `liveChatContext`
8
+
9
+ ### Changed
10
+ - Update `ChatSDKErrors` to include standard ChatSDK errors to be more predictable
5
11
 
6
12
  ## [1.3.0] - 2023-04-05
7
13
  ### Added
package/README.md CHANGED
@@ -272,7 +272,11 @@ const chatReconnectContext = await chatSDK.getChatReconnectContext(optionalParam
272
272
  It gets the details of the current conversation such as its state & when the agent joined the conversation.
273
273
 
274
274
  ```ts
275
- const conversationDetails = await chatSDK.getConversationDetails();
275
+ const optionalParams = {
276
+ liveChatContext: {}, // EXISTING chat context data
277
+ };
278
+
279
+ const conversationDetails = await chatSDK.getConversationDetails(optionalParams);
276
280
  ```
277
281
 
278
282
  ### Get chat Token
@@ -376,7 +380,11 @@ await chatSDK.emailLiveChatTranscript(body);
376
380
  It fetches the current conversation transcript data in JSON.
377
381
 
378
382
  ```ts
379
- await chatSDK.getLiveChatTranscript();
383
+ const optionalParams = {
384
+ liveChatContext: {}, // EXISTING chat context data
385
+ };
386
+
387
+ await chatSDK.getLiveChatTranscript(optionalParams);
380
388
  ```
381
389
 
382
390
  ### Upload File Attachment
@@ -25,6 +25,8 @@ import OmnichannelConfig from "./core/OmnichannelConfig";
25
25
  import OmnichannelMessage from "./core/messaging/OmnichannelMessage";
26
26
  import OnNewMessageOptionalParams from "./core/messaging/OnNewMessageOptionalParams";
27
27
  import StartChatOptionalParams from "./core/StartChatOptionalParams";
28
+ import GetLiveChatTranscriptOptionalParams from "./core/GetLiveChatTranscriptOptionalParams";
29
+ import GetConversationDetailsOptionalParams from "./core/GetConversationDetailsOptionalParams";
28
30
  declare class OmnichannelChatSDK {
29
31
  private debug;
30
32
  runtimeId: string;
@@ -67,7 +69,7 @@ declare class OmnichannelChatSDK {
67
69
  startChat(optionalParams?: StartChatOptionalParams): Promise<void>;
68
70
  endChat(): Promise<void>;
69
71
  getCurrentLiveChatContext(): Promise<LiveChatContext | {}>;
70
- getConversationDetails(): Promise<LiveWorkItemDetails>;
72
+ getConversationDetails(optionalParams?: GetConversationDetailsOptionalParams): Promise<LiveWorkItemDetails>;
71
73
  /**
72
74
  * Gets PreChat Survey.
73
75
  * @param parse Whether to parse PreChatSurvey to JSON or not.
@@ -86,7 +88,7 @@ declare class OmnichannelChatSDK {
86
88
  uploadFileAttachment(fileInfo: IFileInfo | File): Promise<IRawMessage | OmnichannelMessage>;
87
89
  downloadFileAttachment(fileMetadata: FileMetadata | IFileMetadata): Promise<Blob>;
88
90
  emailLiveChatTranscript(body: ChatTranscriptBody): Promise<any>;
89
- getLiveChatTranscript(): Promise<any>;
91
+ getLiveChatTranscript(optionalParams?: GetLiveChatTranscriptOptionalParams): Promise<any>;
90
92
  createChatAdapter(optionalParams?: ChatAdapterOptionalParams): Promise<unknown>;
91
93
  getVoiceVideoCalling(params?: any): Promise<any>;
92
94
  getPostChatSurveyContext(): Promise<any>;