@webuildbots/webuildbots-sdk 11.2.8 → 11.3.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.
@@ -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: number;
13
+ static VERSION: string;
14
14
  block: DeepPartial<Block>;
15
15
  constructor();
16
16
  addTitle(lang: Languages, title: string): this;
@@ -6,7 +6,7 @@ var BlockBuilder = /** @class */ (function () {
6
6
  this.block = {
7
7
  name: BlockBuilder.DEFAULT_NAME,
8
8
  group: BlockBuilder.DEFAULT_GROUP,
9
- version: BlockBuilder.VERSION,
9
+ revision: BlockBuilder.VERSION,
10
10
  created: new Date(),
11
11
  content: {},
12
12
  meta: {}
@@ -111,7 +111,7 @@ var BlockBuilder = /** @class */ (function () {
111
111
  };
112
112
  BlockBuilder.DEFAULT_NAME = block_enums_1.CommonGroups.BUILT_AT_RUNTIME;
113
113
  BlockBuilder.DEFAULT_GROUP = block_enums_1.CommonGroups.BUILT_AT_RUNTIME;
114
- BlockBuilder.VERSION = 2;
114
+ BlockBuilder.VERSION = '0.0.1';
115
115
  return BlockBuilder;
116
116
  }());
117
117
  exports.default = BlockBuilder;
@@ -1,4 +1,6 @@
1
1
  import FunctionBB from './function-bb';
2
2
  export default class UnsetFormBB<T = any> extends FunctionBB<T> {
3
3
  constructor(fncName?: keyof T, args?: any);
4
+ addUnsetFormIds(formId: string): this;
5
+ setUnsetAllForms(unsetAllForms: boolean): this;
4
6
  }
@@ -25,6 +25,18 @@ var UnsetFormBB = /** @class */ (function (_super) {
25
25
  _this.block.function.type = block_enums_1.FunctionTypes.UNSET_FORM;
26
26
  return _this;
27
27
  }
28
+ UnsetFormBB.prototype.addUnsetFormIds = function (formId) {
29
+ var _a;
30
+ if (!((_a = this.block.function) === null || _a === void 0 ? void 0 : _a.unsetFormIds)) {
31
+ this.block.function.unsetFormIds = [];
32
+ }
33
+ this.block.function.unsetFormIds.push(formId);
34
+ return this;
35
+ };
36
+ UnsetFormBB.prototype.setUnsetAllForms = function (unsetAllForms) {
37
+ this.block.function.unsetAllForms = unsetAllForms;
38
+ return this;
39
+ };
28
40
  return UnsetFormBB;
29
41
  }(function_bb_1.default));
30
42
  exports.default = UnsetFormBB;
@@ -1,6 +1,11 @@
1
1
  export default interface BlockObj {
2
2
  _id?: any;
3
- version: number;
3
+ revision?: string;
4
+ history?: Array<{
5
+ id?: string;
6
+ revision?: string;
7
+ created?: Date;
8
+ }>;
4
9
  clientDbId?: any;
5
10
  created: Date;
6
11
  eventIds?: string[];
@@ -131,6 +136,8 @@ export default interface BlockObj {
131
136
  name?: string;
132
137
  handlerName?: string;
133
138
  type?: string;
139
+ unsetFormIds?: string[];
140
+ unsetAllForms?: boolean;
134
141
  logic?: {
135
142
  formId?: string;
136
143
  defaultMappingBlockId: string;
@@ -93,7 +93,12 @@ export default interface WBBEvent {
93
93
  args: any;
94
94
  };
95
95
  blocks?: Array<{
96
- version: number;
96
+ revision?: string;
97
+ history?: Array<{
98
+ id?: string;
99
+ revision?: string;
100
+ created?: Date;
101
+ }>;
97
102
  clientDbId?: any;
98
103
  created: Date;
99
104
  deleted?: boolean;
@@ -265,7 +270,12 @@ export default interface WBBEvent {
265
270
  };
266
271
  }>;
267
272
  evaluatedBlocks?: Array<{
268
- version: number;
273
+ revision?: string;
274
+ history?: Array<{
275
+ id?: string;
276
+ revision?: string;
277
+ created?: Date;
278
+ }>;
269
279
  clientDbId?: any;
270
280
  created: Date;
271
281
  deleted?: boolean;
@@ -437,7 +447,12 @@ export default interface WBBEvent {
437
447
  };
438
448
  }>;
439
449
  preprocessedBlocks?: Array<{
440
- version: number;
450
+ revision?: string;
451
+ history?: Array<{
452
+ id?: string;
453
+ revision?: string;
454
+ created?: Date;
455
+ }>;
441
456
  clientDbId?: any;
442
457
  created: Date;
443
458
  deleted?: boolean;
@@ -675,7 +690,12 @@ export default interface WBBEvent {
675
690
  args?: any;
676
691
  };
677
692
  blocks?: Array<{
678
- version: number;
693
+ revision?: string;
694
+ history?: Array<{
695
+ id?: string;
696
+ revision?: string;
697
+ created?: Date;
698
+ }>;
679
699
  clientDbId?: any;
680
700
  created: Date;
681
701
  deleted?: boolean;
@@ -93,7 +93,7 @@ var ResponseService = /** @class */ (function () {
93
93
  switch (_c.label) {
94
94
  case 0:
95
95
  block = {
96
- version: __1.BlockBuilder.VERSION,
96
+ revision: __1.BlockBuilder.VERSION,
97
97
  created: new Date().toISOString(),
98
98
  content: content,
99
99
  type: type,
@@ -174,7 +174,9 @@ var ResponseService = /** @class */ (function () {
174
174
  options = {
175
175
  method: 'PUT',
176
176
  data: payload,
177
- headers: { 'Content-Type': 'multipart/form-data' }
177
+ headers: {
178
+ 'content-type': "multipart/form-data; boundary=" + payload.getBoundary()
179
+ }
178
180
  };
179
181
  _c.label = 6;
180
182
  case 6:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webuildbots/webuildbots-sdk",
3
- "version": "11.2.8",
3
+ "version": "11.3.1",
4
4
  "description": "webuildbots sdk",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",