redai-automation-web-sdk 1.9.17 → 1.9.18

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/dist/index.cjs CHANGED
@@ -137,7 +137,7 @@ var HttpClient = class {
137
137
  timeout: this.config.timeout || 3e4,
138
138
  headers: {
139
139
  "Content-Type": "application/json",
140
- "User-Agent": this.config.userAgent || "@redai/automation-web-sdk/1.9.11",
140
+ "User-Agent": this.config.userAgent || "redai-automation-web-sdk/1.9.18",
141
141
  ...this.config.apiKey && { Authorization: `Bearer ${this.config.apiKey}` }
142
142
  }
143
143
  });
@@ -383,7 +383,7 @@ var DEFAULT_CONFIG = {
383
383
  timeout: 3e4,
384
384
  retryCount: 0,
385
385
  retryDelay: 0,
386
- userAgent: "@redai/automation-web-sdk/1.9.11",
386
+ userAgent: "redai-automation-web-sdk/1.9.18",
387
387
  logging: false
388
388
  };
389
389
  var ThreadType = /* @__PURE__ */ ((ThreadType4) => {
@@ -903,10 +903,16 @@ var EventUtils = class {
903
903
  return false;
904
904
  }
905
905
  }
906
+ if (criteria.zaloUids && criteria.zaloUids.length > 0) {
907
+ const zaloUid = event.zaloUid;
908
+ if (!zaloUid || !criteria.zaloUids.includes(String(zaloUid))) {
909
+ return false;
910
+ }
911
+ }
906
912
  const userFilterList = criteria.createdBys || criteria.userUuids;
907
913
  if (userFilterList && userFilterList.length > 0) {
908
914
  const creator = event.createdBy || event.userUuid;
909
- if (!creator || !userFilterList.includes(creator)) {
915
+ if (!creator || !userFilterList.map(String).includes(String(creator))) {
910
916
  return false;
911
917
  }
912
918
  }
@@ -4025,7 +4031,7 @@ var AutomationWebClient = class {
4025
4031
  * Get SDK version
4026
4032
  */
4027
4033
  getVersion() {
4028
- return "1.9.8";
4034
+ return "1.9.18";
4029
4035
  }
4030
4036
  /**
4031
4037
  * Test connection to automation-web API