@telia-ace/widget-core-flamingo 1.1.75 → 1.1.76-rc.1

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/models/site.d.ts CHANGED
@@ -1,5 +1,6 @@
1
+ import { IHttpClient } from '../services/http-client.service';
1
2
  import { SiteAPI } from '../services/site-api';
2
- import { InitConfig } from '../types';
3
+ import { InitConfig, SiteTrigger } from '../types';
3
4
  import { Environment } from './environment';
4
5
  export declare class Site {
5
6
  environment?: Environment;
@@ -7,9 +8,11 @@ export declare class Site {
7
8
  private url?;
8
9
  private httpClient;
9
10
  api: SiteAPI;
11
+ triggers: SiteTrigger[];
10
12
  constructor(urlOrConfig: string | InitConfig);
11
13
  load(url: string): Promise<void>;
12
14
  loadFromConfig(config: InitConfig): void;
15
+ setHttpClient(client: IHttpClient): void;
13
16
  bootstrap(handler: (environment: Environment) => void): Promise<void>;
14
17
  private addGlobal;
15
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-core-flamingo",
3
- "version": "1.1.75",
3
+ "version": "1.1.76-rc.1",
4
4
  "dependencies": {
5
5
  "lit": "^3.0.2",
6
6
  "@teliads/icons": "^8.4.0",
package/types.d.ts CHANGED
@@ -40,8 +40,24 @@ export type AppConfig = {
40
40
  };
41
41
  export type SiteConfig = {
42
42
  id: string;
43
+ triggers?: SiteTrigger[];
43
44
  apps: AppConfig[];
44
45
  };
46
+ export type SiteTrigger = {
47
+ id: string;
48
+ triggerType: 'visit';
49
+ condition: TriggerCondition;
50
+ };
51
+ export type TriggerCondition = {
52
+ type: 'url';
53
+ outputs: {
54
+ value: string;
55
+ action: {
56
+ type: string;
57
+ data: string;
58
+ };
59
+ }[];
60
+ };
45
61
  export type InitConfig = {
46
62
  apps: {
47
63
  widgetId: string;