@webuildbots/webuildbots-sdk 9.5.0 → 10.0.1-il.0

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.
@@ -1,5 +1,6 @@
1
1
  import BlockBuilder from './block-builder';
2
- export default class ImageBB extends BlockBuilder {
2
+ export default class MediaBB extends BlockBuilder {
3
3
  constructor();
4
4
  addImage(media: string): this;
5
+ addVideo(media: string): this;
5
6
  }
@@ -18,17 +18,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
19
  var block_enums_1 = require("../../const/block-enums");
20
20
  var block_builder_1 = __importDefault(require("./block-builder"));
21
- var ImageBB = /** @class */ (function (_super) {
22
- __extends(ImageBB, _super);
23
- function ImageBB() {
21
+ var MediaBB = /** @class */ (function (_super) {
22
+ __extends(MediaBB, _super);
23
+ function MediaBB() {
24
24
  var _this = _super.call(this) || this;
25
- _this.block.type = block_enums_1.BlockTypes.IMAGE;
25
+ _this.block.type = block_enums_1.BlockTypes.MEDIA;
26
26
  return _this;
27
27
  }
28
- ImageBB.prototype.addImage = function (media) {
28
+ MediaBB.prototype.addImage = function (media) {
29
29
  this.block.content.image = media;
30
30
  return this;
31
31
  };
32
- return ImageBB;
32
+ MediaBB.prototype.addVideo = function (media) {
33
+ this.block.content.video = media;
34
+ return this;
35
+ };
36
+ return MediaBB;
33
37
  }(block_builder_1.default));
34
- exports.default = ImageBB;
38
+ exports.default = MediaBB;
@@ -7,14 +7,14 @@ export declare enum BlockTypes {
7
7
  TEXT = "text",
8
8
  URL = "url",
9
9
  FILE = "file",
10
- IMAGE = "image",
11
10
  VIDEO = "video",
12
11
  AUDIO = "audio",
13
12
  COMPLEX = "complex",
14
13
  SELECT = "select",
15
14
  FUNCTION = "function",
16
15
  DEV_SWITCH = "dev-switch",
17
- VARIABLE = "variable"
16
+ VARIABLE = "variable",
17
+ MEDIA = "media"
18
18
  }
19
19
  export declare enum ChoiceTypes {
20
20
  QREPLY = "qreply",
@@ -12,7 +12,6 @@ var BlockTypes;
12
12
  BlockTypes["TEXT"] = "text";
13
13
  BlockTypes["URL"] = "url";
14
14
  BlockTypes["FILE"] = "file";
15
- BlockTypes["IMAGE"] = "image";
16
15
  BlockTypes["VIDEO"] = "video";
17
16
  BlockTypes["AUDIO"] = "audio";
18
17
  BlockTypes["COMPLEX"] = "complex";
@@ -20,6 +19,7 @@ var BlockTypes;
20
19
  BlockTypes["FUNCTION"] = "function";
21
20
  BlockTypes["DEV_SWITCH"] = "dev-switch";
22
21
  BlockTypes["VARIABLE"] = "variable";
22
+ BlockTypes["MEDIA"] = "media";
23
23
  })(BlockTypes = exports.BlockTypes || (exports.BlockTypes = {}));
24
24
  var ChoiceTypes;
25
25
  (function (ChoiceTypes) {
package/lib/index.d.ts CHANGED
@@ -6,7 +6,7 @@ import DevSwitchBB from './builder/block/dev-switch-bb';
6
6
  import EmailFormTableBB from './builder/block/email-form-table-bb';
7
7
  import UnsetFormBB from './builder/block/unset-form-bb';
8
8
  import FunctionBB from './builder/block/function-bb';
9
- import ImageBB from './builder/block/image-bb';
9
+ import MediaBB from './builder/block/media-bb';
10
10
  import SelectBB from './builder/block/select-bb';
11
11
  import TextBB from './builder/block/text-bb';
12
12
  import VideoBB from './builder/block/video-bb';
@@ -22,4 +22,4 @@ import DefinedIB from './builder/defined-ib';
22
22
  import ResponseBuilder from './builder/response-builder';
23
23
  import { WebhookRequest, WebhookResponse, ResponseUnitType, ResponseUnit, BlockPointer, Client, JWTPayload } from './interfaces/webhook';
24
24
  import LogicBB from './builder/block/logic-bb';
25
- export { BlockBuilder, ComplexBB, FunctionBB, EmailFormTableBB, UnsetFormBB, ImageBB, SelectBB, TextBB, VideoBB, DevSwitchBB, LogicBB, BlockCB, ChoiceBuilder, DefinedCB, DefinedIB, ExtensionCB, LocationCB, PhoneCB, UrlCB, GalleryBB, BasicBB, ItemBuilder, WebhookResponse, WebhookRequest, ResponseUnit, ResponseUnitType, BlockPointer, ResponseBuilder, Client, JWTPayload };
25
+ export { BlockBuilder, ComplexBB, FunctionBB, EmailFormTableBB, UnsetFormBB, MediaBB, SelectBB, TextBB, VideoBB, DevSwitchBB, LogicBB, BlockCB, ChoiceBuilder, DefinedCB, DefinedIB, ExtensionCB, LocationCB, PhoneCB, UrlCB, GalleryBB, BasicBB, ItemBuilder, WebhookResponse, WebhookRequest, ResponseUnit, ResponseUnitType, BlockPointer, ResponseBuilder, Client, JWTPayload };
package/lib/index.js CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ResponseBuilder = exports.ResponseUnitType = exports.ItemBuilder = exports.BasicBB = exports.GalleryBB = exports.UrlCB = exports.PhoneCB = exports.LocationCB = exports.ExtensionCB = exports.DefinedIB = exports.DefinedCB = exports.ChoiceBuilder = exports.BlockCB = exports.LogicBB = exports.DevSwitchBB = exports.VideoBB = exports.TextBB = exports.SelectBB = exports.ImageBB = exports.UnsetFormBB = exports.EmailFormTableBB = exports.FunctionBB = exports.ComplexBB = exports.BlockBuilder = void 0;
6
+ exports.ResponseBuilder = exports.ResponseUnitType = exports.ItemBuilder = exports.BasicBB = exports.GalleryBB = exports.UrlCB = exports.PhoneCB = exports.LocationCB = exports.ExtensionCB = exports.DefinedIB = exports.DefinedCB = exports.ChoiceBuilder = exports.BlockCB = exports.LogicBB = exports.DevSwitchBB = exports.VideoBB = exports.TextBB = exports.SelectBB = exports.MediaBB = exports.UnsetFormBB = exports.EmailFormTableBB = exports.FunctionBB = exports.ComplexBB = exports.BlockBuilder = void 0;
7
7
  var block_builder_1 = __importDefault(require("./builder/block/block-builder"));
8
8
  exports.BlockBuilder = block_builder_1.default;
9
9
  var basic_bb_1 = __importDefault(require("./builder/block/basic-bb"));
@@ -20,8 +20,8 @@ var unset_form_bb_1 = __importDefault(require("./builder/block/unset-form-bb"));
20
20
  exports.UnsetFormBB = unset_form_bb_1.default;
21
21
  var function_bb_1 = __importDefault(require("./builder/block/function-bb"));
22
22
  exports.FunctionBB = function_bb_1.default;
23
- var image_bb_1 = __importDefault(require("./builder/block/image-bb"));
24
- exports.ImageBB = image_bb_1.default;
23
+ var media_bb_1 = __importDefault(require("./builder/block/media-bb"));
24
+ exports.MediaBB = media_bb_1.default;
25
25
  var select_bb_1 = __importDefault(require("./builder/block/select-bb"));
26
26
  exports.SelectBB = select_bb_1.default;
27
27
  var text_bb_1 = __importDefault(require("./builder/block/text-bb"));
@@ -1,12 +1,15 @@
1
- export default interface Block {
1
+ export default interface BlockObj {
2
2
  _id?: any;
3
3
  version: number;
4
4
  clientDbId?: any;
5
5
  created: Date;
6
+ eventIds?: string[];
7
+ events?: string[];
6
8
  deleted?: boolean;
7
9
  delay?: number;
8
10
  module?: string;
9
11
  name: string;
12
+ ignoreDuringRecommendations?: boolean;
10
13
  group: string;
11
14
  type: string;
12
15
  next?: string;
@@ -19,6 +22,7 @@ export default interface Block {
19
22
  module?: string;
20
23
  args?: any;
21
24
  };
25
+ interventionBlock?: boolean;
22
26
  formFieldCallback?: {
23
27
  args: any;
24
28
  };
@@ -63,6 +67,7 @@ export default interface Block {
63
67
  de?: string;
64
68
  };
65
69
  image?: string;
70
+ video?: string;
66
71
  choices?: Array<{
67
72
  title?: {
68
73
  any?: string;
@@ -132,6 +137,7 @@ export default interface Block {
132
137
  toEmail: string;
133
138
  fromEmail?: string;
134
139
  subject: string;
140
+ unset?: boolean;
135
141
  };
136
142
  argosLabsExecuteScenario?: {
137
143
  apiScenarioId: string;
@@ -191,6 +197,8 @@ export default interface Block {
191
197
  };
192
198
  }>;
193
199
  webhook?: boolean;
200
+ endpoint?: string;
201
+ icon?: string;
194
202
  modules?: string[];
195
203
  };
196
204
  devSwitch?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webuildbots/webuildbots-sdk",
3
- "version": "9.5.0",
3
+ "version": "10.0.1-il.0",
4
4
  "description": "webuildbots sdk",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",