@microsoft/omnichannel-chat-sdk 1.4.4-main.045b7b7 → 1.4.4-main.0b9f2f1

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/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ![Release CI](https://github.com/microsoft/omnichannel-chat-sdk/workflows/Release%20CI/badge.svg)
6
6
  ![npm](https://img.shields.io/npm/dm/@microsoft/omnichannel-chat-sdk)
7
7
 
8
- > ❗ Chat SDK **v1.1.0** is the minimum version to support the **new** messaging platform. More [here](https://docs.microsoft.com/en-us/dynamics365/customer-service/migrate-acs)
8
+ > ❗ We recommend using official release versions in production as listed [here](#releases). Support will be provided only on official versions.
9
9
 
10
10
  > 📢 Try out our new React component library [omnichannel-chat-widget](https://github.com/microsoft/omnichannel-chat-widget) with Chat SDK
11
11
 
@@ -15,6 +15,7 @@ Please make sure you have a chat widget configured before using this package or
15
15
 
16
16
  ## Table of Contents
17
17
  - [Live Chat Widget vs. Chat SDK](#live-chat-widget-vs-chat-sdk)
18
+ - [Releases](#releases)
18
19
  - [Installation](#installation)
19
20
  - [Installation on React Native](#installation-on-react-native)
20
21
  - [SDK Methods](#sdk-methods)
@@ -96,6 +97,24 @@ Omnichannel offers an live chat widget (LCW) by default. You can use the Chat SD
96
97
 
97
98
  **\*** BYOI: Bring Your Own Implementation
98
99
 
100
+ ## Releases
101
+
102
+ New releases are published on a regular basis to ensure the product quality.
103
+
104
+ | Version | Docs | Release Date | End of Support | Deprecated |
105
+ | -- | -- | -- | -- | -- |
106
+ | 1.4.3 | [Release Notes](https://github.com/microsoft/omnichannel-chat-sdk/releases/tag/v1.4.3) | Jun 15th 2023 | Jun 15th 2024 | |
107
+ | 1.4.2 | [Release Notes](https://github.com/microsoft/omnichannel-chat-sdk/releases/tag/v1.4.2) | May 19th 2023 | May 19th 2024 | |
108
+ | 1.4.1 | [Release Notes](https://github.com/microsoft/omnichannel-chat-sdk/releases/tag/v1.4.1) | May 5th 2023 | May 5th 2024 | |
109
+ | 1.4.0 | [Release Notes](https://github.com/microsoft/omnichannel-chat-sdk/releases/tag/v1.4.0) | May 2nd 2023 | May 2nd 2024 | |
110
+ | 1.3.0 | [Release Notes](https://github.com/microsoft/omnichannel-chat-sdk/releases/tag/v1.3.0) | Apr 5th 2023 | Apr 5th 2024 | |
111
+ | 1.2.0 | [Release Notes](https://github.com/microsoft/omnichannel-chat-sdk/releases/tag/v1.2.0) | Nov 11th 2022 | Nov 11th 2023 | |
112
+ | 1.1.0 | [Release Notes](https://github.com/microsoft/omnichannel-chat-sdk/releases/tag/v1.1.0) | Apr 15th 2021 | Apr 15th 2022 | ✔️ |
113
+ | 1.0.0 | [Release Notes](https://github.com/microsoft/omnichannel-chat-sdk/releases/tag/v1.0.0) | Oct 8th 2021 | Oct 8th 2022 | ✔️ |
114
+ | 0.3.0 | [Release Notes](https://github.com/microsoft/omnichannel-chat-sdk/releases/tag/v0.3.0) | Sep 3rd 2021 | Sep 3rd 2022 | ✔️ |
115
+ | 0.2.0 | [Release Notes](https://github.com/microsoft/omnichannel-chat-sdk/releases/tag/v0.2.0) | Apr 30th 2021 | Apr 30th 2022 | ✔️ |
116
+ | 0.1.0 | [Release Notes](https://github.com/microsoft/omnichannel-chat-sdk/releases/tag/v0.1.0) | Oct 26th 2020 | Oct 26th 2021 | ✔️ |
117
+
99
118
  ## Installation
100
119
 
101
120
  ```
@@ -1522,7 +1522,7 @@
1522
1522
  "affectsGlobalScope": false
1523
1523
  },
1524
1524
  "../src/validators/OmnichannelConfigValidator.ts": {
1525
- "version": "2bd25461b51df12ace053d6e4de7cac7fc44ab84b01d42ab10650e26e0ef1244",
1525
+ "version": "08c65f7b916dd5867cc71ff4ea84ccdd76bfa15f6bf19c87edb6c2df0f0d2dcf",
1526
1526
  "signature": "36754e9e735007b6b26e3eec4bad359eb7f0fe24ec837b7ca8cbf02ab7d289d7",
1527
1527
  "affectsGlobalScope": false
1528
1528
  },
@@ -5,12 +5,24 @@ var validateOmnichannelConfig = function (omnichannelConfig) {
5
5
  if (!omnichannelConfig) {
6
6
  throw new Error("OmnichannelConfiguration not found");
7
7
  }
8
- var currentOmnichannelConfigParams = Object.keys(omnichannelConfig);
9
8
  for (var _i = 0, requiredOmnichannelConfigParams_1 = requiredOmnichannelConfigParams; _i < requiredOmnichannelConfigParams_1.length; _i++) {
10
9
  var key = requiredOmnichannelConfigParams_1[_i];
11
- if (!currentOmnichannelConfigParams.includes(key)) {
10
+ //check for they key present in the map, if not present or value is undefined then throw error
11
+ var isPresent = Reflect.has(omnichannelConfig, key);
12
+ if (!isPresent) {
12
13
  throw new Error("Missing '" + key + "' in OmnichannelConfiguration");
13
14
  }
15
+ /**
16
+ * Since we know the keys that are required and we know those values are string,
17
+ * there is no point in make a generic function to validate the object and different
18
+ * types of values based on its type. We can just check for the keys and check if the value is empty or not.
19
+ */
20
+ var propertyValue = Reflect.get(omnichannelConfig, key);
21
+ if (!propertyValue ||
22
+ (typeof propertyValue === "string" && propertyValue.trim().length === 0) ||
23
+ propertyValue.length === 0) {
24
+ throw new Error("Empty '" + key + "' in OmnichannelConfiguration");
25
+ }
14
26
  }
15
27
  };
16
28
  exports.default = validateOmnichannelConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"OmnichannelConfigValidator.js","sourceRoot":"","sources":["../../src/validators/OmnichannelConfigValidator.ts"],"names":[],"mappings":";;AAEA,IAAM,+BAA+B,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AAExE,IAAM,yBAAyB,GAAG,UAAC,iBAAoC;IACnE,IAAI,CAAC,iBAAiB,EAAE;QACtB,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;KACvD;IAED,IAAM,8BAA8B,GAAG,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IACtE,KAAkB,UAA+B,EAA/B,mEAA+B,EAA/B,6CAA+B,EAA/B,IAA+B,EAAE;QAA9C,IAAM,GAAG,wCAAA;QACZ,IAAI,CAAC,8BAA8B,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACjD,MAAM,IAAI,KAAK,CAAC,cAAY,GAAG,kCAA+B,CAAC,CAAC;SACjE;KACF;AACL,CAAC,CAAA;AAED,kBAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"OmnichannelConfigValidator.js","sourceRoot":"","sources":["../../src/validators/OmnichannelConfigValidator.ts"],"names":[],"mappings":";;AAEA,IAAM,+BAA+B,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AAExE,IAAM,yBAAyB,GAAG,UAAC,iBAAoC;IACnE,IAAI,CAAC,iBAAiB,EAAE;QACtB,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;KACvD;IAED,KAAkB,UAA+B,EAA/B,mEAA+B,EAA/B,6CAA+B,EAA/B,IAA+B,EAAE;QAA9C,IAAM,GAAG,wCAAA;QACZ,8FAA8F;QAC9F,IAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC;QAEtD,IAAI,CAAC,SAAS,EAAE;YACd,MAAM,IAAI,KAAK,CAAC,cAAY,GAAG,kCAA+B,CAAC,CAAC;SACjE;QAED;;;;UAIE;QACF,IAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC;QAE1D,IAAI,CAAC,aAAa;YAChB,CAAC,OAAO,aAAa,KAAK,QAAQ,IAAI,aAAa,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC;YACxE,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5B,MAAM,IAAI,KAAK,CAAC,YAAU,GAAG,kCAA+B,CAAC,CAAC;SAC/D;KACF;AACL,CAAC,CAAA;AAED,kBAAe,yBAAyB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/omnichannel-chat-sdk",
3
- "version": "1.4.4-main.045b7b7",
3
+ "version": "1.4.4-main.0b9f2f1",
4
4
  "description": "Microsoft Omnichannel Chat SDK",
5
5
  "files": [
6
6
  "lib/**/*"