@webuildbots/webuildbots-sdk 9.2.6 → 9.3.2
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.
|
@@ -20,6 +20,7 @@ export default class BlockBuilder {
|
|
|
20
20
|
description(description: string): this;
|
|
21
21
|
type(bt: BlockTypes): this;
|
|
22
22
|
next(blockId: string): this;
|
|
23
|
+
addVariables(title: string, value: any): this;
|
|
23
24
|
onReply(blockId: string, args?: any): this;
|
|
24
25
|
formFieldCallback(args: any): this;
|
|
25
26
|
voiceAction(voiceAction: VoiceAction): this;
|
|
@@ -47,6 +47,10 @@ var BlockBuilder = /** @class */ (function () {
|
|
|
47
47
|
this.block.next = blockId;
|
|
48
48
|
return this;
|
|
49
49
|
};
|
|
50
|
+
BlockBuilder.prototype.addVariables = function (title, value) {
|
|
51
|
+
this.block.variables.push({ title: title, value: value });
|
|
52
|
+
return this;
|
|
53
|
+
};
|
|
50
54
|
BlockBuilder.prototype.onReply = function (blockId, args) {
|
|
51
55
|
this.block.onReply = {
|
|
52
56
|
blockId: blockId,
|
package/lib/const/block-enums.js
CHANGED
|
@@ -19,6 +19,7 @@ var BlockTypes;
|
|
|
19
19
|
BlockTypes["SELECT"] = "select";
|
|
20
20
|
BlockTypes["FUNCTION"] = "function";
|
|
21
21
|
BlockTypes["DEV_SWITCH"] = "dev-switch";
|
|
22
|
+
BlockTypes["VARIABLE"] = "variable";
|
|
22
23
|
})(BlockTypes = exports.BlockTypes || (exports.BlockTypes = {}));
|
|
23
24
|
var ChoiceTypes;
|
|
24
25
|
(function (ChoiceTypes) {
|
|
@@ -10,6 +10,10 @@ export default interface Block {
|
|
|
10
10
|
group: string;
|
|
11
11
|
type: string;
|
|
12
12
|
next?: string;
|
|
13
|
+
variables?: Array<{
|
|
14
|
+
title: string;
|
|
15
|
+
value: any;
|
|
16
|
+
}>;
|
|
13
17
|
onReply?: {
|
|
14
18
|
blockId: string;
|
|
15
19
|
module?: string;
|
|
@@ -117,7 +121,7 @@ export default interface Block {
|
|
|
117
121
|
handlerName?: string;
|
|
118
122
|
type?: string;
|
|
119
123
|
logic?: {
|
|
120
|
-
formId
|
|
124
|
+
formId?: string;
|
|
121
125
|
defaultMappingBlockId: string;
|
|
122
126
|
expressions?: Array<{
|
|
123
127
|
condition: any;
|