@bringg/dashboard-sdk 5.1.2 → 5.2.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/dist/BringgDashboardSDK.d.ts +0 -2
- package/dist/BringgDashboardSDK.js +0 -2
- package/dist/BringgDashboardSDK.js.map +1 -1
- package/dist/Services/ServiceRequest.js +1 -1
- package/dist/bringg-dashboard-sdk-cjs2.js +460 -618
- package/dist/bringg-dashboard-sdk-cjs2.js.map +1 -1
- package/dist/bringg-dashboard-sdk.js +2 -28
- package/dist/bringg-dashboard-sdk.min.js +4 -4
- package/dist/bringg-dashboard-sdk.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/Workflow/Entity/WorkflowEntity.d.ts +0 -9
- package/dist/Workflow/Entity/WorkflowEntity.js +0 -48
- package/dist/Workflow/Entity/WorkflowEntity.js.map +0 -1
- package/dist/Workflow/WorkflowApi.d.ts +0 -13
- package/dist/Workflow/WorkflowApi.js +0 -96
- package/dist/Workflow/WorkflowApi.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { CreateWorkflowResponse, WorkflowTemplateResponse } from '@bringg/types';
|
|
2
|
-
import Session from '../../Services/Identity/Session';
|
|
3
|
-
import Entity from '../../Core/Entity';
|
|
4
|
-
import { CommonOptions } from '../../Core/RouteGenerator';
|
|
5
|
-
export default class WorkflowEntity extends Entity<CreateWorkflowResponse> {
|
|
6
|
-
constructor(session: Session);
|
|
7
|
-
duplicate(workflowId: number, commonOptions?: CommonOptions): Promise<CreateWorkflowResponse>;
|
|
8
|
-
getTemplates(commonOptions?: CommonOptions): Promise<WorkflowTemplateResponse[]>;
|
|
9
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
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
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
var Entity_1 = require("../../Core/Entity");
|
|
19
|
-
var entityName = 'rule-service/workflow';
|
|
20
|
-
var baseRoute = "/".concat(entityName);
|
|
21
|
-
var WorkflowEntity = /** @class */ (function (_super) {
|
|
22
|
-
__extends(WorkflowEntity, _super);
|
|
23
|
-
function WorkflowEntity(session) {
|
|
24
|
-
return _super.call(this, {
|
|
25
|
-
session: session,
|
|
26
|
-
entityName: entityName,
|
|
27
|
-
routes: [Entity_1.BaseRoutes.Patch, Entity_1.BaseRoutes.Delete, Entity_1.BaseRoutes.Create, Entity_1.BaseRoutes.GetAll, Entity_1.BaseRoutes.Update]
|
|
28
|
-
}) || this;
|
|
29
|
-
}
|
|
30
|
-
WorkflowEntity.prototype.duplicate = function (workflowId, commonOptions) {
|
|
31
|
-
return this.service.routeGenerator
|
|
32
|
-
.post("".concat(baseRoute, "/{:id}/duplicate"))
|
|
33
|
-
.withRouteParams({ id: workflowId })
|
|
34
|
-
.setException("failed to duplicate workflow ".concat(workflowId))
|
|
35
|
-
.withCommonOptions(commonOptions)
|
|
36
|
-
.invoke();
|
|
37
|
-
};
|
|
38
|
-
WorkflowEntity.prototype.getTemplates = function (commonOptions) {
|
|
39
|
-
return this.service.routeGenerator
|
|
40
|
-
.get("".concat(baseRoute, "/templates"))
|
|
41
|
-
.setException("failed to get workflow templates")
|
|
42
|
-
.withCommonOptions(commonOptions)
|
|
43
|
-
.invoke();
|
|
44
|
-
};
|
|
45
|
-
return WorkflowEntity;
|
|
46
|
-
}(Entity_1.default));
|
|
47
|
-
exports.default = WorkflowEntity;
|
|
48
|
-
//# sourceMappingURL=WorkflowEntity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WorkflowEntity.js","sourceRoot":"","sources":["../../../src/Workflow/Entity/WorkflowEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,4CAAuD;AAGvD,IAAM,UAAU,GAAG,uBAAuB,CAAC;AAC3C,IAAM,SAAS,GAAG,WAAI,UAAU,CAAE,CAAC;AAEnC;IAA4C,kCAA8B;IACzE,wBAAY,OAAgB;eAC3B,kBAAM;YACL,OAAO,SAAA;YACP,UAAU,YAAA;YACV,MAAM,EAAE,CAAC,mBAAU,CAAC,KAAK,EAAE,mBAAU,CAAC,MAAM,EAAE,mBAAU,CAAC,MAAM,EAAE,mBAAU,CAAC,MAAM,EAAE,mBAAU,CAAC,MAAM,CAAC;SACtG,CAAC;IACH,CAAC;IAED,kCAAS,GAAT,UAAU,UAAkB,EAAE,aAA6B;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc;aAChC,IAAI,CAAC,UAAG,SAAS,qBAAkB,CAAC;aACpC,eAAe,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC;aACnC,YAAY,CAAC,uCAAgC,UAAU,CAAE,CAAC;aAC1D,iBAAiB,CAAC,aAAa,CAAC;aAChC,MAAM,EAAkD,CAAC;IAC5D,CAAC;IAED,qCAAY,GAAZ,UAAa,aAA6B;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc;aAChC,GAAG,CAAC,UAAG,SAAS,eAAY,CAAC;aAC7B,YAAY,CAAC,kCAAkC,CAAC;aAChD,iBAAiB,CAAC,aAAa,CAAC;aAChC,MAAM,EAA0D,CAAC;IACpE,CAAC;IACF,qBAAC;AAAD,CAAC,AAzBD,CAA4C,gBAAM,GAyBjD"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { CreateWorkflowRequest, CreateWorkflowResponse, GetAllWorkflowResponse, PatchWorkflowRequest, PatchWorkflowResponse, UpdateWorkflowRequest, UpdateWorkflowResponse, WorkflowTemplateResponse } from '@bringg/types';
|
|
2
|
-
import Session from '../Services/Identity/Session';
|
|
3
|
-
export default class WorkflowApi {
|
|
4
|
-
private workflowEntity;
|
|
5
|
-
constructor(session: Session);
|
|
6
|
-
getAll(): Promise<GetAllWorkflowResponse>;
|
|
7
|
-
getTemplates(): Promise<WorkflowTemplateResponse[]>;
|
|
8
|
-
create(request: CreateWorkflowRequest): Promise<CreateWorkflowResponse>;
|
|
9
|
-
duplicate(id: number): Promise<CreateWorkflowResponse>;
|
|
10
|
-
delete(id: number): Promise<boolean>;
|
|
11
|
-
update(id: number, request: UpdateWorkflowRequest): Promise<UpdateWorkflowResponse>;
|
|
12
|
-
patch(id: number, request: PatchWorkflowRequest): Promise<PatchWorkflowResponse>;
|
|
13
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
var WorkflowEntity_1 = require("./Entity/WorkflowEntity");
|
|
40
|
-
var WorkflowApi = /** @class */ (function () {
|
|
41
|
-
function WorkflowApi(session) {
|
|
42
|
-
this.workflowEntity = new WorkflowEntity_1.default(session);
|
|
43
|
-
}
|
|
44
|
-
WorkflowApi.prototype.getAll = function () {
|
|
45
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
46
|
-
return __generator(this, function (_a) {
|
|
47
|
-
return [2 /*return*/, this.workflowEntity.service.getAll()];
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
WorkflowApi.prototype.getTemplates = function () {
|
|
52
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
53
|
-
return __generator(this, function (_a) {
|
|
54
|
-
return [2 /*return*/, this.workflowEntity.getTemplates()];
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
WorkflowApi.prototype.create = function (request) {
|
|
59
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
60
|
-
return __generator(this, function (_a) {
|
|
61
|
-
return [2 /*return*/, this.workflowEntity.service.create(request)];
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
WorkflowApi.prototype.duplicate = function (id) {
|
|
66
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
67
|
-
return __generator(this, function (_a) {
|
|
68
|
-
return [2 /*return*/, this.workflowEntity.duplicate(id)];
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
WorkflowApi.prototype.delete = function (id) {
|
|
73
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
74
|
-
return __generator(this, function (_a) {
|
|
75
|
-
return [2 /*return*/, this.workflowEntity.service.delete(id)];
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
WorkflowApi.prototype.update = function (id, request) {
|
|
80
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
81
|
-
return __generator(this, function (_a) {
|
|
82
|
-
return [2 /*return*/, this.workflowEntity.service.update(id, request)];
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
};
|
|
86
|
-
WorkflowApi.prototype.patch = function (id, request) {
|
|
87
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
88
|
-
return __generator(this, function (_a) {
|
|
89
|
-
return [2 /*return*/, this.workflowEntity.service.patch(id, request)];
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
};
|
|
93
|
-
return WorkflowApi;
|
|
94
|
-
}());
|
|
95
|
-
exports.default = WorkflowApi;
|
|
96
|
-
//# sourceMappingURL=WorkflowApi.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WorkflowApi.js","sourceRoot":"","sources":["../../src/Workflow/WorkflowApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,0DAAqD;AAErD;IAGC,qBAAY,OAAgB;QAC3B,IAAI,CAAC,cAAc,GAAG,IAAI,wBAAc,CAAC,OAAO,CAAC,CAAC;IACnD,CAAC;IAEY,4BAAM,GAAnB;;;gBACC,sBAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,EAAC;;;KAC5C;IAEY,kCAAY,GAAzB;;;gBACC,sBAAO,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE,EAAC;;;KAC1C;IAEY,4BAAM,GAAnB,UAAoB,OAA8B;;;gBACjD,sBAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,EAAC;;;KACnD;IAEY,+BAAS,GAAtB,UAAuB,EAAU;;;gBAChC,sBAAO,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,CAAC,EAAC;;;KACzC;IAEY,4BAAM,GAAnB,UAAoB,EAAU;;;gBAC7B,sBAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,EAAC;;;KAC9C;IAEY,4BAAM,GAAnB,UAAoB,EAAU,EAAE,OAA8B;;;gBAC7D,sBAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,EAAC;;;KACvD;IAEY,2BAAK,GAAlB,UAAmB,EAAU,EAAE,OAA6B;;;gBAC3D,sBAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE,OAAO,CAAC,EAAC;;;KACtD;IACF,kBAAC;AAAD,CAAC,AAlCD,IAkCC"}
|