@webuildbots/webuildbots-sdk 9.5.0 → 10.0.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.
- package/lib/builder/block/image-bb.d.ts +2 -3
- package/lib/builder/block/image-bb.js +3 -10
- package/lib/builder/block/media-bb.d.ts +6 -0
- package/lib/builder/block/media-bb.js +38 -0
- package/lib/const/block-enums.d.ts +2 -2
- package/lib/const/block-enums.js +1 -1
- package/lib/index.d.ts +3 -2
- package/lib/index.js +5 -3
- package/lib/interfaces/block.d.ts +9 -1
- package/package.json +1 -1
|
@@ -16,19 +16,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
var
|
|
20
|
-
var block_builder_1 = __importDefault(require("./block-builder"));
|
|
19
|
+
var media_bb_1 = __importDefault(require("./media-bb"));
|
|
21
20
|
var ImageBB = /** @class */ (function (_super) {
|
|
22
21
|
__extends(ImageBB, _super);
|
|
23
22
|
function ImageBB() {
|
|
24
|
-
|
|
25
|
-
_this.block.type = block_enums_1.BlockTypes.IMAGE;
|
|
26
|
-
return _this;
|
|
23
|
+
return _super.call(this) || this;
|
|
27
24
|
}
|
|
28
|
-
ImageBB.prototype.addImage = function (media) {
|
|
29
|
-
this.block.content.image = media;
|
|
30
|
-
return this;
|
|
31
|
-
};
|
|
32
25
|
return ImageBB;
|
|
33
|
-
}(
|
|
26
|
+
}(media_bb_1.default));
|
|
34
27
|
exports.default = ImageBB;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
extendStatics(d, b);
|
|
11
|
+
function __() { this.constructor = d; }
|
|
12
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
var block_enums_1 = require("../../const/block-enums");
|
|
20
|
+
var block_builder_1 = __importDefault(require("./block-builder"));
|
|
21
|
+
var MediaBB = /** @class */ (function (_super) {
|
|
22
|
+
__extends(MediaBB, _super);
|
|
23
|
+
function MediaBB() {
|
|
24
|
+
var _this = _super.call(this) || this;
|
|
25
|
+
_this.block.type = block_enums_1.BlockTypes.MEDIA;
|
|
26
|
+
return _this;
|
|
27
|
+
}
|
|
28
|
+
MediaBB.prototype.addImage = function (media) {
|
|
29
|
+
this.block.content.image = media;
|
|
30
|
+
return this;
|
|
31
|
+
};
|
|
32
|
+
MediaBB.prototype.addVideo = function (media) {
|
|
33
|
+
this.block.content.video = media;
|
|
34
|
+
return this;
|
|
35
|
+
};
|
|
36
|
+
return MediaBB;
|
|
37
|
+
}(block_builder_1.default));
|
|
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",
|
package/lib/const/block-enums.js
CHANGED
|
@@ -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
|
|
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,5 @@ 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
|
-
|
|
25
|
+
import ImageBB from './builder/block/image-bb';
|
|
26
|
+
export { BlockBuilder, ComplexBB, FunctionBB, EmailFormTableBB, UnsetFormBB, MediaBB, 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 };
|
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.ImageBB = 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
|
|
24
|
-
exports.
|
|
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"));
|
|
@@ -52,3 +52,5 @@ var webhook_1 = require("./interfaces/webhook");
|
|
|
52
52
|
Object.defineProperty(exports, "ResponseUnitType", { enumerable: true, get: function () { return webhook_1.ResponseUnitType; } });
|
|
53
53
|
var logic_bb_1 = __importDefault(require("./builder/block/logic-bb"));
|
|
54
54
|
exports.LogicBB = logic_bb_1.default;
|
|
55
|
+
var image_bb_1 = __importDefault(require("./builder/block/image-bb"));
|
|
56
|
+
exports.ImageBB = image_bb_1.default;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
export default interface
|
|
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?: {
|