@webuildbots/webuildbots-sdk 11.4.1 → 11.5.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/lib/builder/block/block-builder.d.ts +1 -1
- package/lib/builder/block/block-builder.js +1 -1
- package/lib/builder/choice/choice-builder.d.ts +4 -0
- package/lib/builder/choice/url-cb.d.ts +2 -0
- package/lib/builder/choice/url-cb.js +8 -0
- package/lib/interfaces/block-item.d.ts +2 -0
- package/lib/interfaces/block.d.ts +3 -6
- package/lib/interfaces/choice.d.ts +2 -0
- package/lib/interfaces/wbb-event.d.ts +8 -8
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ import { Languages } from '../../const/languages-enums';
|
|
|
10
10
|
export default class BlockBuilder {
|
|
11
11
|
static DEFAULT_NAME: CommonGroups;
|
|
12
12
|
static DEFAULT_GROUP: CommonGroups;
|
|
13
|
-
static VERSION:
|
|
13
|
+
static VERSION: number;
|
|
14
14
|
block: DeepPartial<Block>;
|
|
15
15
|
constructor();
|
|
16
16
|
addTitle(lang: Languages, title: string): this;
|
|
@@ -112,7 +112,7 @@ var BlockBuilder = /** @class */ (function () {
|
|
|
112
112
|
};
|
|
113
113
|
BlockBuilder.DEFAULT_NAME = block_enums_1.CommonGroups.BUILT_AT_RUNTIME;
|
|
114
114
|
BlockBuilder.DEFAULT_GROUP = block_enums_1.CommonGroups.BUILT_AT_RUNTIME;
|
|
115
|
-
BlockBuilder.VERSION =
|
|
115
|
+
BlockBuilder.VERSION = 1;
|
|
116
116
|
return BlockBuilder;
|
|
117
117
|
}());
|
|
118
118
|
exports.default = BlockBuilder;
|
|
@@ -7,6 +7,8 @@ export default abstract class ChoiceBuilder {
|
|
|
7
7
|
action: {
|
|
8
8
|
type: string;
|
|
9
9
|
value?: any;
|
|
10
|
+
view?: string;
|
|
11
|
+
track?: boolean;
|
|
10
12
|
};
|
|
11
13
|
protected session?: any;
|
|
12
14
|
private profile?;
|
|
@@ -15,6 +17,8 @@ export default abstract class ChoiceBuilder {
|
|
|
15
17
|
constructor(action: {
|
|
16
18
|
type: string;
|
|
17
19
|
value?: any;
|
|
20
|
+
view?: string;
|
|
21
|
+
track?: boolean;
|
|
18
22
|
}, session?: any, profile?: any, functionArgs?: any);
|
|
19
23
|
addTitle(lang: Languages, text: string): this;
|
|
20
24
|
setTitle(polylang: Polylang): this;
|
|
@@ -4,5 +4,7 @@ import ChoiceBuilder from './choice-builder';
|
|
|
4
4
|
export default class UrlCB extends ChoiceBuilder {
|
|
5
5
|
constructor(session?: any, profile?: any);
|
|
6
6
|
addUrl(lang: Languages | string, url: string): this;
|
|
7
|
+
useExtension(): this;
|
|
8
|
+
trackClick(track: boolean): this;
|
|
7
9
|
setUrl(polylang: Polylang): this;
|
|
8
10
|
}
|
|
@@ -33,6 +33,14 @@ var UrlCB = /** @class */ (function (_super) {
|
|
|
33
33
|
this.choice.action.value[lang] = url;
|
|
34
34
|
return this;
|
|
35
35
|
};
|
|
36
|
+
UrlCB.prototype.useExtension = function () {
|
|
37
|
+
this.choice.action.view = 'extension';
|
|
38
|
+
return this;
|
|
39
|
+
};
|
|
40
|
+
UrlCB.prototype.trackClick = function (track) {
|
|
41
|
+
this.choice.action.track = track;
|
|
42
|
+
return this;
|
|
43
|
+
};
|
|
36
44
|
UrlCB.prototype.setUrl = function (polylang) {
|
|
37
45
|
this.choice.action.value = polylang;
|
|
38
46
|
return this;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
export default interface BlockObj {
|
|
2
2
|
_id?: any;
|
|
3
|
-
revision?:
|
|
4
|
-
history?: Array<{
|
|
5
|
-
id?: string;
|
|
6
|
-
revision?: string;
|
|
7
|
-
created?: Date;
|
|
8
|
-
}>;
|
|
3
|
+
revision?: number;
|
|
9
4
|
clientDbId?: any;
|
|
10
5
|
created: Date;
|
|
11
6
|
eventIds?: string[];
|
|
@@ -86,6 +81,8 @@ export default interface BlockObj {
|
|
|
86
81
|
action: {
|
|
87
82
|
type: string;
|
|
88
83
|
value?: any;
|
|
84
|
+
view?: string;
|
|
85
|
+
track?: boolean;
|
|
89
86
|
};
|
|
90
87
|
profile?: any;
|
|
91
88
|
formValue?: string;
|
|
@@ -93,10 +93,10 @@ export default interface WBBEvent {
|
|
|
93
93
|
args: any;
|
|
94
94
|
};
|
|
95
95
|
blocks?: Array<{
|
|
96
|
-
revision?:
|
|
96
|
+
revision?: number;
|
|
97
97
|
history?: Array<{
|
|
98
98
|
id?: string;
|
|
99
|
-
revision?:
|
|
99
|
+
revision?: number;
|
|
100
100
|
created?: Date;
|
|
101
101
|
}>;
|
|
102
102
|
clientDbId?: any;
|
|
@@ -270,10 +270,10 @@ export default interface WBBEvent {
|
|
|
270
270
|
};
|
|
271
271
|
}>;
|
|
272
272
|
evaluatedBlocks?: Array<{
|
|
273
|
-
revision?:
|
|
273
|
+
revision?: number;
|
|
274
274
|
history?: Array<{
|
|
275
275
|
id?: string;
|
|
276
|
-
revision?:
|
|
276
|
+
revision?: number;
|
|
277
277
|
created?: Date;
|
|
278
278
|
}>;
|
|
279
279
|
clientDbId?: any;
|
|
@@ -447,10 +447,10 @@ export default interface WBBEvent {
|
|
|
447
447
|
};
|
|
448
448
|
}>;
|
|
449
449
|
preprocessedBlocks?: Array<{
|
|
450
|
-
revision?:
|
|
450
|
+
revision?: number;
|
|
451
451
|
history?: Array<{
|
|
452
452
|
id?: string;
|
|
453
|
-
revision?:
|
|
453
|
+
revision?: number;
|
|
454
454
|
created?: Date;
|
|
455
455
|
}>;
|
|
456
456
|
clientDbId?: any;
|
|
@@ -690,10 +690,10 @@ export default interface WBBEvent {
|
|
|
690
690
|
args?: any;
|
|
691
691
|
};
|
|
692
692
|
blocks?: Array<{
|
|
693
|
-
revision?:
|
|
693
|
+
revision?: number;
|
|
694
694
|
history?: Array<{
|
|
695
695
|
id?: string;
|
|
696
|
-
revision?:
|
|
696
|
+
revision?: number;
|
|
697
697
|
created?: Date;
|
|
698
698
|
}>;
|
|
699
699
|
clientDbId?: any;
|