@telia-ace/widget-core-flamingo 1.1.72-rc.22 → 1.1.72-rc.23
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +21 -21
- package/index.mjs +311 -287
- package/models/site.d.ts +2 -1
- package/package.json +1 -1
- package/types.d.ts +16 -0
package/models/site.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { IHttpClient } from '../services/http-client.service';
|
2
2
|
import { SiteAPI } from '../services/site-api';
|
3
|
-
import { InitConfig } from '../types';
|
3
|
+
import { InitConfig, SiteTrigger } from '../types';
|
4
4
|
import { Environment } from './environment';
|
5
5
|
export declare class Site {
|
6
6
|
environment?: Environment;
|
@@ -8,6 +8,7 @@ export declare class Site {
|
|
8
8
|
private url?;
|
9
9
|
private httpClient;
|
10
10
|
api: SiteAPI;
|
11
|
+
triggers: SiteTrigger[];
|
11
12
|
constructor(urlOrConfig: string | InitConfig);
|
12
13
|
load(url: string): Promise<void>;
|
13
14
|
loadFromConfig(config: InitConfig): void;
|
package/package.json
CHANGED
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;
|