@microsoft/omnichannel-chat-sdk
Advanced tools
Comparing version 1.6.2-main.28d2661 to 1.6.2-main.6593a0b
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
## Unreleased | ||
## [Unreleased] | ||
### Fixed | ||
- Add `supportedImagesMimeTypes` to support `MIME` types `image/heic` & `image/webp` as images | ||
@@ -5,0 +7,0 @@ ## [1.6.1] - 2023-12-07 |
@@ -42,2 +42,4 @@ import FramedClient from "@microsoft/omnichannel-amsclient/lib/FramedClient"; | ||
private options; | ||
private supportedImagesMimeTypes; | ||
private omnichannelChatToken; | ||
fileScanner: any; | ||
@@ -44,0 +46,0 @@ constructor(amsClient: FramedClient, logger?: ACSAdapterLogger | null, options?: any); |
@@ -72,2 +72,3 @@ "use strict"; | ||
})(AMSViewScanStatus = exports.AMSViewScanStatus || (exports.AMSViewScanStatus = {})); | ||
var supportedImagesMimeTypes = ["image/jpeg", "image/png", "image/gif", "image/heic", "image/webp"]; | ||
var AMSFileManager = /** @class */ (function () { | ||
@@ -78,5 +79,7 @@ function AMSFileManager(amsClient, logger, options) { | ||
var _a; | ||
this.supportedImagesMimeTypes = supportedImagesMimeTypes; | ||
this.logger = logger; | ||
this.amsClient = amsClient; | ||
this.options = options; | ||
this.omnichannelChatToken = null; | ||
if (((_a = this.options.fileScan) === null || _a === void 0 ? void 0 : _a.disabled) === false) { | ||
@@ -275,3 +278,3 @@ var options_1 = __assign({}, this.options.fileScan); | ||
_f.trys.push([5, 7, , 8]); | ||
return [4 /*yield*/, this.amsClient.createObject(this.amsClient.chatToken.chatId, file)]; | ||
return [4 /*yield*/, this.amsClient.createObject(this.amsClient.chatToken.chatId, file, this.omnichannelChatToken, this.supportedImagesMimeTypes)]; | ||
case 6: | ||
@@ -292,3 +295,3 @@ response = _f.sent(); // eslint-disable-line @typescript-eslint/no-explicit-any | ||
_f.trys.push([8, 10, , 11]); | ||
return [4 /*yield*/, this.amsClient.uploadDocument(response.id, file)]; | ||
return [4 /*yield*/, this.amsClient.uploadDocument(response.id, file, this.omnichannelChatToken, this.supportedImagesMimeTypes)]; | ||
case 9: | ||
@@ -339,3 +342,3 @@ _f.sent(); | ||
_g.trys.push([1, 3, , 4]); | ||
return [4 /*yield*/, this.amsClient.getViewStatus(fileMetadata)]; | ||
return [4 /*yield*/, this.amsClient.getViewStatus(fileMetadata, this.omnichannelChatToken, this.supportedImagesMimeTypes)]; | ||
case 2: | ||
@@ -371,3 +374,3 @@ response = _g.sent(); // eslint-disable-line @typescript-eslint/no-explicit-any | ||
_g.trys.push([5, 7, , 8]); | ||
return [4 /*yield*/, this.amsClient.getView(fileMetadata, view_location)]; | ||
return [4 /*yield*/, this.amsClient.getView(fileMetadata, view_location, this.omnichannelChatToken, this.supportedImagesMimeTypes)]; | ||
case 6: | ||
@@ -374,0 +377,0 @@ blob = _g.sent(); // eslint-disable-line @typescript-eslint/no-explicit-any |
{ | ||
"name": "@microsoft/omnichannel-chat-sdk", | ||
"version": "1.6.2-main.28d2661", | ||
"version": "1.6.2-main.6593a0b", | ||
"description": "Microsoft Omnichannel Chat SDK", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1310579
14097