@ada-support/embed2 1.0.51 → 1.0.55

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.
@@ -12,5 +12,5 @@ interface TriggerCampaignImplParams {
12
12
  messageService: MessageService;
13
13
  }
14
14
  export declare function triggerCampaignImpl({ adaSettings, chatterToken, campaign, ignoreStatus, ignoreFrequency, clearCampaignToTrigger, messageService, }: TriggerCampaignImplParams): void;
15
- export declare const getCampaignToTrigger: (adaSettings: StartOptions, marketingCampaigns: MarketingCampaign[] | undefined, options: EvaluateCampaignParams, onlyBasic: boolean) => MarketingCampaign;
15
+ export declare const getCampaignToTrigger: (adaSettings: StartOptions, marketingCampaigns: MarketingCampaign[] | undefined, options: EvaluateCampaignParams, onlyBasic: boolean) => MarketingCampaign | undefined;
16
16
  export {};
@@ -22,14 +22,14 @@ export interface MarketingCampaign {
22
22
  _id: string;
23
23
  version: "2021-01-12";
24
24
  client_id: string;
25
- created_at: string;
26
- updated_at: string;
25
+ created: string;
26
+ updated: string;
27
27
  updated_by: string;
28
28
  name: string;
29
29
  description: string;
30
30
  campaign_key: string;
31
31
  status: "draft" | "active" | "off";
32
- trigger_conditions: TriggerCondition[];
32
+ trigger_conditions?: TriggerCondition[];
33
33
  goals: GoalEvent[];
34
34
  message_frequency: CampaignFrequency;
35
35
  message_delay: number;
@@ -1,5 +1,3 @@
1
- import type { CurrentIntro, Intro } from "common/types/http";
2
1
  export declare function getProcessedPath(path: string): string;
3
2
  export declare function getPathSearchRegex(path: string): RegExp;
4
3
  export declare function doesUrlMatchPath(url: string, path: string): boolean;
5
- export declare function getIntroForCurrentUrl(intros: Intro[], language: string): CurrentIntro | undefined;
@@ -29,5 +29,4 @@ export declare class Client {
29
29
  [key: string]: unknown;
30
30
  constructor(clientResponse: ClientResponse["client"]);
31
31
  }
32
- export declare function hasCampaignsEnabled(client?: Client): boolean;
33
32
  export declare function getButtonText(client?: Client): string;
@@ -6,20 +6,6 @@ export interface ChatButton {
6
6
  icon_path: string;
7
7
  icon_type: string;
8
8
  }
9
- interface MessageBody {
10
- message_text: {
11
- [language: string]: string;
12
- };
13
- emoji_link: string;
14
- }
15
- export interface Intro {
16
- style: "Text" | "Emoji";
17
- response_id: string;
18
- duration: number;
19
- paths: string[];
20
- delay: number;
21
- body: MessageBody;
22
- }
23
9
  export interface CurrentIntro {
24
10
  response_id: string;
25
11
  body: string;
@@ -34,7 +20,6 @@ export interface Features {
34
20
  developer_proactive?: boolean;
35
21
  afm_business_events?: boolean;
36
22
  afm_proactive_messaging?: boolean;
37
- afm_proactive_messaging_free_tier?: boolean;
38
23
  embed_test_bot?: boolean;
39
24
  rtl_language_support?: boolean;
40
25
  translations?: boolean;
@@ -62,7 +47,6 @@ export interface CachedClientObject {
62
47
  privacy: boolean;
63
48
  tint: string;
64
49
  chat_button: ChatButton | null;
65
- intros?: Intro[];
66
50
  features: Features;
67
51
  business_events?: BusinessEvent[];
68
52
  marketing_campaigns_order?: string[];
@@ -75,4 +59,3 @@ export interface NotificationStatusResponse {
75
59
  is_live_state: boolean;
76
60
  unread_amount: number;
77
61
  }
78
- export {};