@ada-support/embed2 1.8.10 → 1.8.11

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.
@@ -13949,7 +13949,7 @@ const client = new BrowserClient({
13949
13949
  return event;
13950
13950
  },
13951
13951
  environment: "production",
13952
- release: "1.8.10-b7d62d8",
13952
+ release: "1.8.11-3fd3f35",
13953
13953
  sampleRate: 0.25,
13954
13954
  autoSessionTracking: false,
13955
13955
  // Integrations don't seem to work with Sentry: https://github.com/getsentry/sentry-javascript/issues/2541
@@ -14526,7 +14526,7 @@ function getEmbedURL(_ref) {
14526
14526
  } else {
14527
14527
  host = `http://${handle}.localhost:9001`;
14528
14528
  }
14529
- return `${host}/embed/${frameName}/${"b7d62d8"}/index.html`;
14529
+ return `${host}/embed/${frameName}/${"3fd3f35"}/index.html`;
14530
14530
  }
14531
14531
  function constructQueryString(query) {
14532
14532
  return Object.keys(query).map(key => {
@@ -15721,9 +15721,9 @@ async function log(message, extra, options) {
15721
15721
  service: "embed",
15722
15722
  env: "production",
15723
15723
  embedVersion: 2,
15724
- version: "1.8.10",
15724
+ version: "1.8.11",
15725
15725
  isNpm: true,
15726
- commitHash: "b7d62d8"
15726
+ commitHash: "3fd3f35"
15727
15727
  }))
15728
15728
  });
15729
15729
  }
@@ -16367,7 +16367,7 @@ function proactiveTriggerImpl(_ref) {
16367
16367
  });
16368
16368
  }
16369
16369
  function evaluateUrlTriggerConditions(conditions, url) {
16370
- if (!conditions.length) {
16370
+ if (!conditions || !conditions.length) {
16371
16371
  return false;
16372
16372
  }
16373
16373
  return evalUrlMatchTriggerCondition(conditions, url);
@@ -16898,7 +16898,7 @@ class ChatFrame extends d {
16898
16898
  const hostPageUrlParams = new URL(window.location.href).searchParams;
16899
16899
  const smsToken = hostPageUrlParams.get("adaSMSToken");
16900
16900
  const queryParams = {
16901
- embedVersion: "b7d62d8".slice(0, 7),
16901
+ embedVersion: "3fd3f35".slice(0, 7),
16902
16902
  greeting,
16903
16903
  language,
16904
16904
  skipGreeting,
@@ -1,6 +1,6 @@
1
1
  import type { StartOptions } from "@ada-support/embed-types";
2
2
  import type { MessageService } from "client/lib/message-service";
3
- import type { ProactiveConversation, RecentProactiveConversationConfig, UrlTriggerCondition } from "./types";
3
+ import type { ProactiveConversation, ProactiveConversationUrlTriggerConditions, RecentProactiveConversationConfig } from "./types";
4
4
  export declare function proactiveTriggerImpl({ proactiveConversation, adaSettings, messageService, language, setRecentProactiveConversationConfig, clearProactiveConversation, }: {
5
5
  proactiveConversation: ProactiveConversation;
6
6
  adaSettings: StartOptions;
@@ -9,4 +9,4 @@ export declare function proactiveTriggerImpl({ proactiveConversation, adaSetting
9
9
  setRecentProactiveConversationConfig: (config: RecentProactiveConversationConfig) => void;
10
10
  clearProactiveConversation: () => void;
11
11
  }): void;
12
- export declare function evaluateUrlTriggerConditions(conditions: UrlTriggerCondition[], url: string): boolean;
12
+ export declare function evaluateUrlTriggerConditions(conditions: ProactiveConversationUrlTriggerConditions, url: string): boolean;
@@ -1,3 +1,4 @@
1
+ export declare type ProactiveConversationUrlTriggerConditions = UrlTriggerCondition[] | null;
1
2
  export interface ProactiveConversation {
2
3
  messages: {
3
4
  [language: string]: string[];
@@ -5,7 +6,7 @@ export interface ProactiveConversation {
5
6
  modality_config: {
6
7
  [modality: string]: {
7
8
  active: boolean;
8
- url_trigger_conditions: UrlTriggerCondition[];
9
+ url_trigger_conditions: ProactiveConversationUrlTriggerConditions;
9
10
  delay: number;
10
11
  duration: number;
11
12
  frequency: ProactiveConversationFrequency;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ada-support/embed2",
3
- "version": "1.8.10",
3
+ "version": "1.8.11",
4
4
  "description": "",
5
5
  "main": "dist/npm-entry",
6
6
  "typings": "dist/npm-entry/index-npm.d.ts",