@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,
@@ -13,7 +13,8 @@ export declare enum BlockTypes {
13
13
  COMPLEX = "complex",
14
14
  SELECT = "select",
15
15
  FUNCTION = "function",
16
- DEV_SWITCH = "dev-switch"
16
+ DEV_SWITCH = "dev-switch",
17
+ VARIABLE = "variable"
17
18
  }
18
19
  export declare enum ChoiceTypes {
19
20
  QREPLY = "qreply",
@@ -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: string;
124
+ formId?: string;
121
125
  defaultMappingBlockId: string;
122
126
  expressions?: Array<{
123
127
  condition: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webuildbots/webuildbots-sdk",
3
- "version": "9.2.6",
3
+ "version": "9.3.2",
4
4
  "description": "webuildbots sdk",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",