@boomi/embedkit-sdk 1.0.0 → 1.0.3
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/README.md +57 -27
- package/package.json +10 -7
- package/dist/adapters/FromBoomiXml.d.ts +0 -2
- package/dist/adapters/FromBoomiXml.js +0 -96
- package/dist/adapters/FromBoomiXml.js.map +0 -1
- package/dist/adapters/ToBoomiXml.d.ts +0 -2
- package/dist/adapters/ToBoomiXml.js +0 -98
- package/dist/adapters/ToBoomiXml.js.map +0 -1
- package/dist/canvas/ComponentMeta.d.ts +0 -20
- package/dist/canvas/ComponentMeta.js +0 -3
- package/dist/canvas/ComponentMeta.js.map +0 -1
- package/dist/canvas/Edge.d.ts +0 -12
- package/dist/canvas/Edge.js +0 -3
- package/dist/canvas/Edge.js.map +0 -1
- package/dist/canvas/Process.d.ts +0 -14
- package/dist/canvas/Process.js +0 -3
- package/dist/canvas/Process.js.map +0 -1
- package/dist/canvas/ProcessCanvas.d.ts +0 -16
- package/dist/canvas/ProcessCanvas.js +0 -3
- package/dist/canvas/ProcessCanvas.js.map +0 -1
- package/dist/canvas/ProcessWorkload.d.ts +0 -6
- package/dist/canvas/ProcessWorkload.js +0 -3
- package/dist/canvas/ProcessWorkload.js.map +0 -1
- package/dist/canvas/Shape.d.ts +0 -17
- package/dist/canvas/Shape.js +0 -3
- package/dist/canvas/Shape.js.map +0 -1
- package/dist/canvas/ShapeIcon.d.ts +0 -6
- package/dist/canvas/ShapeIcon.js +0 -3
- package/dist/canvas/ShapeIcon.js.map +0 -1
- package/dist/canvas/ShapeType.d.ts +0 -6
- package/dist/canvas/ShapeType.js +0 -3
- package/dist/canvas/ShapeType.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,29 +1,59 @@
|
|
|
1
1
|
# Boomi EmbedKit SDK
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
3
|
+
This SDK provides convenient access to the [Boomi Platofrm API](https://developer.boomi.com/api/platformapi) from applications written in server-side JavaScript.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Install the package with:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install @boomi/embedkit-sdk
|
|
11
|
+
|
|
12
|
+
or
|
|
13
|
+
|
|
14
|
+
yarn add @boomi/embedkit-sdk
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
The package needs to be configured with your Boomi Platform AccountID, API User Name, and API Token. Please visit the [Boomi API Docs](https://help.boomi.com/docs/Atomsphere/Platform/int-AtomSphere_API_Tokens_page_6a75a1f6-709c-4b08-b3bd-85fe2ac02e18) for more information.
|
|
20
|
+
|
|
21
|
+
<!-- prettier-ignore -->
|
|
22
|
+
```js
|
|
23
|
+
try {
|
|
24
|
+
const boomi = new Boomi({
|
|
25
|
+
BASE: process.env.API_URL, // Example: https://api.boomi.com/api/rest/v1/YOUR_BOOMI_ACCOUNT_ID
|
|
26
|
+
USERNAME: process.env.API_USERNAME, // Example: BOOMI_TOKEN.some_user@domain.com
|
|
27
|
+
PASSWORD: process.env.API_TOKEN, // Example: 123abc456def789ghi
|
|
28
|
+
WITH_CREDENTIALS: true, // Set to true
|
|
29
|
+
OVERRIDE_ACCOUNT: false, // Set to true
|
|
30
|
+
OVERRIDE_ACCOUNT_ID: process.env.API_AUTH_USER, // Example: Auth user BOOMI_ACCOUNT_ID
|
|
31
|
+
CREDENTIALS: 'include',
|
|
32
|
+
});
|
|
33
|
+
} catch (error) {
|
|
34
|
+
console.error('Error:', error);
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
To call and endpoint using the above:
|
|
39
|
+
|
|
40
|
+
<!-- prettier-ignore -->
|
|
41
|
+
```js
|
|
42
|
+
try {
|
|
43
|
+
const expression: AccountGroupExpression = {
|
|
44
|
+
operator: AccountGroupSimpleExpression.operator.EQUALS,
|
|
45
|
+
property: AccountGroupSimpleExpression.property.NAME,
|
|
46
|
+
argument: ['Sample Account Group Name'],
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const requestBody: AccountGroupQueryConfig = {
|
|
50
|
+
QueryFilter: { expression },
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const response = await boomi.accountGroup.queryAccountGroup(requestBody);
|
|
54
|
+
console.log('Account Groups:', response);
|
|
55
|
+
|
|
56
|
+
} catch (error) {
|
|
57
|
+
console.error('Error:', error);
|
|
58
|
+
}
|
|
59
|
+
```
|
package/package.json
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boomi/embedkit-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Boomi EmbedKit SDK",
|
|
5
5
|
"author": "Boomi",
|
|
6
6
|
"license": "BSD-2-Clause",
|
|
7
7
|
"type": "module",
|
|
8
|
-
"main": "./dist/
|
|
9
|
-
"types": "./dist/
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": "./dist/index.js",
|
|
12
|
+
"./embed-js-node.js": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist/**/*"
|
|
16
|
+
],
|
|
10
17
|
"scripts": {
|
|
11
18
|
"build": "npx tsc",
|
|
12
19
|
"prepublish": "npm run build",
|
|
@@ -15,10 +22,6 @@
|
|
|
15
22
|
"gen": "npx openapi-typescript-codegen -i ./platformopenapi.json -o ./lib/types",
|
|
16
23
|
"test": "jest --config jest.config.ts --no-cache --detectOpenHandles --silent=false --forceExit"
|
|
17
24
|
},
|
|
18
|
-
"keywords": [],
|
|
19
|
-
"files": [
|
|
20
|
-
"dist/**/*"
|
|
21
|
-
],
|
|
22
25
|
"devDependencies": {
|
|
23
26
|
"@types/jest": "^29.5.14",
|
|
24
27
|
"@types/node": "^22.14.0",
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseBoomiProcessXml = parseBoomiProcessXml;
|
|
4
|
-
/**
|
|
5
|
-
* Boomi EmbedKit component
|
|
6
|
-
*
|
|
7
|
-
* @support https://bitbucket.org/officialboomi/embedkit
|
|
8
|
-
*/
|
|
9
|
-
const fast_xml_parser_1 = require("fast-xml-parser");
|
|
10
|
-
const parser = new fast_xml_parser_1.XMLParser({
|
|
11
|
-
ignoreAttributes: false,
|
|
12
|
-
attributeNamePrefix: "@",
|
|
13
|
-
});
|
|
14
|
-
function parseBoomiProcessXml(xml) {
|
|
15
|
-
var _a, _b, _c;
|
|
16
|
-
const doc = parser.parse(xml);
|
|
17
|
-
// Root: <bns:Component ...> with attributes
|
|
18
|
-
const componentEl = doc === null || doc === void 0 ? void 0 : doc["bns:Component"];
|
|
19
|
-
if (!componentEl)
|
|
20
|
-
throw new Error("Invalid Boomi Component XML: missing bns:Component");
|
|
21
|
-
const meta = {
|
|
22
|
-
xmlns: "http://api.platform.boomi.com/",
|
|
23
|
-
folderFullPath: componentEl === null || componentEl === void 0 ? void 0 : componentEl["@folderFullPath"],
|
|
24
|
-
version: componentEl === null || componentEl === void 0 ? void 0 : componentEl["@version"],
|
|
25
|
-
name: componentEl === null || componentEl === void 0 ? void 0 : componentEl["@name"],
|
|
26
|
-
type: componentEl === null || componentEl === void 0 ? void 0 : componentEl["@type"],
|
|
27
|
-
createdDate: componentEl === null || componentEl === void 0 ? void 0 : componentEl["@createdDate"],
|
|
28
|
-
createdBy: componentEl === null || componentEl === void 0 ? void 0 : componentEl["@createdBy"],
|
|
29
|
-
modifiedDate: componentEl === null || componentEl === void 0 ? void 0 : componentEl["@modifiedDate"],
|
|
30
|
-
modifiedBy: componentEl === null || componentEl === void 0 ? void 0 : componentEl["@modifiedBy"],
|
|
31
|
-
deleted: (componentEl === null || componentEl === void 0 ? void 0 : componentEl["@deleted"]) === "true",
|
|
32
|
-
currentVersion: (componentEl === null || componentEl === void 0 ? void 0 : componentEl["@currentVersion"]) === "true",
|
|
33
|
-
folderName: componentEl === null || componentEl === void 0 ? void 0 : componentEl["@folderName"],
|
|
34
|
-
folderId: componentEl === null || componentEl === void 0 ? void 0 : componentEl["@folderId"],
|
|
35
|
-
};
|
|
36
|
-
const description = (_a = componentEl === null || componentEl === void 0 ? void 0 : componentEl["bns:description"]) !== null && _a !== void 0 ? _a : undefined;
|
|
37
|
-
// <bns:object><process ...>
|
|
38
|
-
const processEl = (_b = componentEl === null || componentEl === void 0 ? void 0 : componentEl["bns:object"]) === null || _b === void 0 ? void 0 : _b["process"];
|
|
39
|
-
if (!processEl)
|
|
40
|
-
throw new Error("Invalid Boomi Component XML: missing process");
|
|
41
|
-
const processCfg = {
|
|
42
|
-
allowSimultaneous: (processEl === null || processEl === void 0 ? void 0 : processEl["@allowSimultaneous"]) === "true",
|
|
43
|
-
enableUserLog: (processEl === null || processEl === void 0 ? void 0 : processEl["@enableUserLog"]) === "true",
|
|
44
|
-
processLogOnErrorOnly: (processEl === null || processEl === void 0 ? void 0 : processEl["@processLogOnErrorOnly"]) === "true",
|
|
45
|
-
purgeDataImmediately: (processEl === null || processEl === void 0 ? void 0 : processEl["@purgeDataImmediately"]) === "true",
|
|
46
|
-
updateRunDates: (processEl === null || processEl === void 0 ? void 0 : processEl["@updateRunDates"]) === "true",
|
|
47
|
-
workload: ((_c = processEl === null || processEl === void 0 ? void 0 : processEl["@workload"]) !== null && _c !== void 0 ? _c : "general"),
|
|
48
|
-
};
|
|
49
|
-
// Shapes & edges
|
|
50
|
-
const shapesRoot = processEl === null || processEl === void 0 ? void 0 : processEl["shapes"];
|
|
51
|
-
const rawShapes = Array.isArray(shapesRoot === null || shapesRoot === void 0 ? void 0 : shapesRoot["shape"])
|
|
52
|
-
? shapesRoot["shape"]
|
|
53
|
-
: (shapesRoot === null || shapesRoot === void 0 ? void 0 : shapesRoot["shape"])
|
|
54
|
-
? [shapesRoot["shape"]]
|
|
55
|
-
: [];
|
|
56
|
-
const shapes = rawShapes.map((s) => {
|
|
57
|
-
var _a, _b;
|
|
58
|
-
const cfg = s === null || s === void 0 ? void 0 : s["configuration"];
|
|
59
|
-
// Take the single child of <configuration>, e.g. <noaction/>, <map/>, <stop ... />
|
|
60
|
-
const config = cfg ? Object.fromEntries(Object.entries(cfg).filter(([k]) => !k.startsWith("@"))) : {};
|
|
61
|
-
return {
|
|
62
|
-
id: s === null || s === void 0 ? void 0 : s["@name"], // Boomi "name" is unique per shape; use it as id
|
|
63
|
-
name: s === null || s === void 0 ? void 0 : s["@name"],
|
|
64
|
-
type: s === null || s === void 0 ? void 0 : s["@shapetype"],
|
|
65
|
-
image: s === null || s === void 0 ? void 0 : s["@image"],
|
|
66
|
-
userLabel: (s === null || s === void 0 ? void 0 : s["@userlabel"]) || undefined,
|
|
67
|
-
x: Number((_a = s === null || s === void 0 ? void 0 : s["@x"]) !== null && _a !== void 0 ? _a : 0),
|
|
68
|
-
y: Number((_b = s === null || s === void 0 ? void 0 : s["@y"]) !== null && _b !== void 0 ? _b : 0),
|
|
69
|
-
config, // keep raw; refine per shape later
|
|
70
|
-
};
|
|
71
|
-
});
|
|
72
|
-
const edges = rawShapes.flatMap((s) => {
|
|
73
|
-
const srcId = s === null || s === void 0 ? void 0 : s["@name"];
|
|
74
|
-
const dragpoints = s === null || s === void 0 ? void 0 : s["dragpoints"];
|
|
75
|
-
const raw = dragpoints === null || dragpoints === void 0 ? void 0 : dragpoints["dragpoint"];
|
|
76
|
-
const list = Array.isArray(raw) ? raw : raw ? [raw] : [];
|
|
77
|
-
return list.map((d) => {
|
|
78
|
-
var _a, _b;
|
|
79
|
-
return ({
|
|
80
|
-
id: d === null || d === void 0 ? void 0 : d["@name"],
|
|
81
|
-
from: srcId,
|
|
82
|
-
to: d === null || d === void 0 ? void 0 : d["@toShape"],
|
|
83
|
-
x: Number((_a = d === null || d === void 0 ? void 0 : d["@x"]) !== null && _a !== void 0 ? _a : 0),
|
|
84
|
-
y: Number((_b = d === null || d === void 0 ? void 0 : d["@y"]) !== null && _b !== void 0 ? _b : 0),
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
return {
|
|
89
|
-
component: meta,
|
|
90
|
-
process: processCfg,
|
|
91
|
-
shapes,
|
|
92
|
-
edges,
|
|
93
|
-
description,
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
//# sourceMappingURL=FromBoomiXml.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FromBoomiXml.js","sourceRoot":"","sources":["../../lib/adapters/FromBoomiXml.ts"],"names":[],"mappings":";;AAiBA,oDAsFC;AAvGD;;;;GAIG;AACH,qDAA4C;AAO5C,MAAM,MAAM,GAAG,IAAI,2BAAS,CAAC;IAC3B,gBAAgB,EAAE,KAAK;IACvB,mBAAmB,EAAE,GAAG;CACzB,CAAC,CAAC;AAEH,SAAgB,oBAAoB,CAAC,GAAW;;IAC9C,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE9B,4CAA4C;IAC5C,MAAM,WAAW,GAAG,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAG,eAAe,CAAC,CAAC;IAC3C,IAAI,CAAC,WAAW;QAAE,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IAExF,MAAM,IAAI,GAAkB;QAC1B,KAAK,EAAE,gCAAgC;QACvC,cAA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AE,CAAC;QAChE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;;YAAC,OAAA,CAAC;gBACtB,EAAE,EAAE,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAG,OAAO,CAAC;gBAChB,IAAI,EAAE,KAAK;gBACX,EAAE,EAAE,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAG,UAAU,CAAC;gBACnB,CAAC,EAAE,MAAM,CAAC,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAG,IAAI,CAAC,mCAAI,CAAC,CAAC;gBACzB,CAAC,EAAE,MAAM,CAAC,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAG,IAAI,CAAC,mCAAI,CAAC,CAAC;aAC1B,CAAC,CAAA;SAAA,CAAC,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,UAAU;QACnB,MAAM;QACN,KAAK;QACL,WAAW;KACZ,CAAC;AACJ,CAAC"}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildBoomiProcessXml = buildBoomiProcessXml;
|
|
4
|
-
/**
|
|
5
|
-
* Boomi EmbedKit component
|
|
6
|
-
*
|
|
7
|
-
* @support https://bitbucket.org/officialboomi/embedkit
|
|
8
|
-
*/
|
|
9
|
-
const xmlbuilder2_1 = require("xmlbuilder2");
|
|
10
|
-
function buildBoomiProcessXml(graph) {
|
|
11
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
12
|
-
const { component, process, shapes, edges, description, } = graph;
|
|
13
|
-
const doc = (0, xmlbuilder2_1.create)({ version: "1.0", encoding: "UTF-8", standalone: true })
|
|
14
|
-
.ele("bns:Component", {
|
|
15
|
-
"xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
|
|
16
|
-
"xmlns:bns": component.xmlns || "http://api.platform.boomi.com/",
|
|
17
|
-
folderFullPath: (_a = component.folderFullPath) !== null && _a !== void 0 ? _a : "Boomi/Admin",
|
|
18
|
-
version: (_b = component.version) !== null && _b !== void 0 ? _b : "1",
|
|
19
|
-
name: component.name,
|
|
20
|
-
type: component.type,
|
|
21
|
-
createdDate: (_c = component.createdDate) !== null && _c !== void 0 ? _c : undefined,
|
|
22
|
-
createdBy: (_d = component.createdBy) !== null && _d !== void 0 ? _d : undefined,
|
|
23
|
-
modifiedDate: (_e = component.modifiedDate) !== null && _e !== void 0 ? _e : undefined,
|
|
24
|
-
modifiedBy: (_f = component.modifiedBy) !== null && _f !== void 0 ? _f : undefined,
|
|
25
|
-
deleted: String((_g = component.deleted) !== null && _g !== void 0 ? _g : false),
|
|
26
|
-
currentVersion: String((_h = component.currentVersion) !== null && _h !== void 0 ? _h : true),
|
|
27
|
-
folderName: (_j = component.folderName) !== null && _j !== void 0 ? _j : "Admin",
|
|
28
|
-
folderId: (_k = component.folderId) !== null && _k !== void 0 ? _k : undefined,
|
|
29
|
-
});
|
|
30
|
-
doc.ele("bns:encryptedValues").up();
|
|
31
|
-
doc.ele("bns:description").txt(description !== null && description !== void 0 ? description : "").up();
|
|
32
|
-
const objectEl = doc.ele("bns:object");
|
|
33
|
-
const processEl = objectEl.ele("process", {
|
|
34
|
-
allowSimultaneous: String(process.allowSimultaneous),
|
|
35
|
-
enableUserLog: String(process.enableUserLog),
|
|
36
|
-
processLogOnErrorOnly: String(process.processLogOnErrorOnly),
|
|
37
|
-
purgeDataImmediately: String(process.purgeDataImmediately),
|
|
38
|
-
updateRunDates: String(process.updateRunDates),
|
|
39
|
-
workload: process.workload,
|
|
40
|
-
});
|
|
41
|
-
const shapesEl = processEl.ele("shapes");
|
|
42
|
-
// Shapes
|
|
43
|
-
for (const s of shapes) {
|
|
44
|
-
const shapeEl = shapesEl.ele("shape", {
|
|
45
|
-
image: s.image,
|
|
46
|
-
name: s.id, // keep Boomi name in sync with our id
|
|
47
|
-
shapetype: s.type,
|
|
48
|
-
userlabel: (_l = s.userLabel) !== null && _l !== void 0 ? _l : "",
|
|
49
|
-
x: s.x.toFixed(1),
|
|
50
|
-
y: s.y.toFixed(1),
|
|
51
|
-
});
|
|
52
|
-
const cfgEl = shapeEl.ele("configuration");
|
|
53
|
-
// Dump the raw config back (single child element convention)
|
|
54
|
-
// Example configs in your sample: <noaction/>, <map/>, <stop continue="true"/>
|
|
55
|
-
if (s.config && typeof s.config === "object") {
|
|
56
|
-
for (const [tag, val] of Object.entries(s.config)) {
|
|
57
|
-
if (val == null) {
|
|
58
|
-
cfgEl.ele(tag).up();
|
|
59
|
-
}
|
|
60
|
-
else if (typeof val === "object") {
|
|
61
|
-
// attributes/object form if you later type these
|
|
62
|
-
cfgEl.ele(tag, val).up();
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
cfgEl.ele(tag).txt(String(val)).up();
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
// default to <noaction/> for start
|
|
71
|
-
if (s.type === "start")
|
|
72
|
-
cfgEl.ele("noaction").up();
|
|
73
|
-
if (s.type === "map")
|
|
74
|
-
cfgEl.ele("map").up();
|
|
75
|
-
if (s.type === "stop")
|
|
76
|
-
cfgEl.ele("stop", { continue: "true" }).up();
|
|
77
|
-
}
|
|
78
|
-
cfgEl.up();
|
|
79
|
-
// dragpoints for outgoing edges
|
|
80
|
-
const outgoing = edges.filter((e) => e.from === s.id);
|
|
81
|
-
const dpEl = shapeEl.ele("dragpoints");
|
|
82
|
-
for (const e of outgoing) {
|
|
83
|
-
dpEl.ele("dragpoint", {
|
|
84
|
-
name: e.id,
|
|
85
|
-
toShape: e.to,
|
|
86
|
-
x: e.x.toFixed(1),
|
|
87
|
-
y: e.y.toFixed(1),
|
|
88
|
-
}).up();
|
|
89
|
-
}
|
|
90
|
-
dpEl.up();
|
|
91
|
-
shapeEl.up();
|
|
92
|
-
}
|
|
93
|
-
processEl.up(); // </process>
|
|
94
|
-
objectEl.up(); // </bns:object>
|
|
95
|
-
doc.ele("bns:processOverrides").up();
|
|
96
|
-
return doc.end({ prettyPrint: true });
|
|
97
|
-
}
|
|
98
|
-
//# sourceMappingURL=ToBoomiXml.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToBoomiXml.js","sourceRoot":"","sources":["../../lib/adapters/ToBoomiXml.ts"],"names":[],"mappings":";;AAQA,oDA+FC;AAvGD;;;;GAIG;AACH,6CAAqC;AAGrC,SAAgB,oBAAoB,CAAC,KAAoB;;IACvD,MAAM,EACJ,SAAS,EACT,OAAO,EACP,MAAM,EACN,KAAK,EACL,WAAW,GACZ,GAAG,KAAK,CAAC;IAEV,MAAM,GAAG,GAAG,IAAA,oBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;SACxE,GAAG,CAAC,eAAe,EAAE;QACpB,WAAW,EAAE,2CAA2C;QACxD,WAAW,EAAE,SAAS,CAAC,KAAK,IAAI,gCAAgC;QAChE,cAAc,EAAE,MAAA,SAAS,CAAC,cAAc,mCAAI,aAAa;QACzD,OAAO,EAAE,MAAA,SAAS,CAAC,OAAO,mCAAI,GAAG;QACjC,IAAI,EAAE,SAAS,CAAC,IAAI;QACpB,IAAI,EAAE,SAAS,CAAC,IAAI;QACpB,WAAW,EAAE,MAAA,SAAS,CAAC,WAAW,mCAAI,SAAS;QAC/C,SAAS,EAAE,MAAA,SAAS,CAAC,SAAS,mCAAI,SAAS;QAC3C,YAAY,EAAE,MAAA,SAAS,CAAC,YAAY,mCAAI,SAAS;QACjD,UAAU,EAAE,MAAA,SAAS,CAAC,UAAU,mCAAI,SAAS;QAC7C,OAAO,EAAE,MAAM,CAAC,MAAA,SAAS,CAAC,OAAO,mCAAI,KAAK,CAAC;QAC3C,cAAc,EAAE,MAAM,CAAC,MAAA,SAAS,CAAC,cAAc,m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C,CAAC,EAAE,EAAE,CAAC;QACtE,CAAC;QACD,KAAK,CAAC,EAAE,EAAE,CAAC;QAEX,gCAAgC;QAChC,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;QACtD,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QACvC,KAAK,MAAM,CAAC,IAAI,QAAQ,EAAE,CAAC;YACzB,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE;gBACpB,IAAI,EAAE,CAAC,CAAC,EAAE;gBACV,OAAO,EAAE,CAAC,CAAC,EAAE;gBACb,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;gBACjB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;aAClB,CAAC,CAAC,EAAE,EAAE,CAAC;QACV,CAAC;QACD,IAAI,CAAC,EAAE,EAAE,CAAC;QACV,OAAO,CAAC,EAAE,EAAE,CAAC;IACf,CAAC;IAED,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC,aAAa;IAC7B,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAE,gBAAgB;IAChC,GAAG,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC,EAAE,EAAE,CAAC;IAErC,OAAO,GAAG,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Boomi EmbedKit component
|
|
3
|
-
*
|
|
4
|
-
* @support https://bitbucket.org/officialboomi/embedkit
|
|
5
|
-
*/
|
|
6
|
-
export type ComponentMeta = {
|
|
7
|
-
xmlns: string;
|
|
8
|
-
folderFullPath?: string;
|
|
9
|
-
version?: string;
|
|
10
|
-
name: string;
|
|
11
|
-
type: "process";
|
|
12
|
-
createdDate?: string;
|
|
13
|
-
createdBy?: string;
|
|
14
|
-
modifiedDate?: string;
|
|
15
|
-
modifiedBy?: string;
|
|
16
|
-
deleted?: boolean;
|
|
17
|
-
currentVersion?: boolean;
|
|
18
|
-
folderName?: string;
|
|
19
|
-
folderId?: string;
|
|
20
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentMeta.js","sourceRoot":"","sources":["../../lib/canvas/ComponentMeta.ts"],"names":[],"mappings":""}
|
package/dist/canvas/Edge.d.ts
DELETED
package/dist/canvas/Edge.js
DELETED
package/dist/canvas/Edge.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Edge.js","sourceRoot":"","sources":["../../lib/canvas/Edge.ts"],"names":[],"mappings":""}
|
package/dist/canvas/Process.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Boomi EmbedKit component
|
|
3
|
-
*
|
|
4
|
-
* @support https://bitbucket.org/officialboomi/embedkit
|
|
5
|
-
*/
|
|
6
|
-
import { ProcessWorkload } from "./ProcessWorkload";
|
|
7
|
-
export type Process = {
|
|
8
|
-
allowSimultaneous: boolean;
|
|
9
|
-
enableUserLog: boolean;
|
|
10
|
-
processLogOnErrorOnly: boolean;
|
|
11
|
-
purgeDataImmediately: boolean;
|
|
12
|
-
updateRunDates: boolean;
|
|
13
|
-
workload: ProcessWorkload;
|
|
14
|
-
};
|
package/dist/canvas/Process.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Process.js","sourceRoot":"","sources":["../../lib/canvas/Process.ts"],"names":[],"mappings":""}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Boomi EmbedKit component
|
|
3
|
-
*
|
|
4
|
-
* @support https://bitbucket.org/officialboomi/embedkit
|
|
5
|
-
*/
|
|
6
|
-
import { ComponentMeta } from './ComponentMeta';
|
|
7
|
-
import { Process } from './Process';
|
|
8
|
-
import { Shape } from './Shape';
|
|
9
|
-
import { Edge } from './Edge';
|
|
10
|
-
export type ProcessCanvas = {
|
|
11
|
-
component: ComponentMeta;
|
|
12
|
-
process: Process;
|
|
13
|
-
shapes: Shape[];
|
|
14
|
-
edges: Edge[];
|
|
15
|
-
description?: string;
|
|
16
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProcessCanvas.js","sourceRoot":"","sources":["../../lib/canvas/ProcessCanvas.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProcessWorkload.js","sourceRoot":"","sources":["../../lib/canvas/ProcessWorkload.ts"],"names":[],"mappings":""}
|
package/dist/canvas/Shape.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Boomi EmbedKit component
|
|
3
|
-
*
|
|
4
|
-
* @support https://bitbucket.org/officialboomi/embedkit
|
|
5
|
-
*/
|
|
6
|
-
import { ShapeType } from "./ShapeType";
|
|
7
|
-
import { ShapeIcon } from "./ShapeIcon";
|
|
8
|
-
export type Shape = {
|
|
9
|
-
id: string;
|
|
10
|
-
name: string;
|
|
11
|
-
type: ShapeType;
|
|
12
|
-
image: ShapeIcon;
|
|
13
|
-
userLabel?: string;
|
|
14
|
-
x: number;
|
|
15
|
-
y: number;
|
|
16
|
-
config: unknown;
|
|
17
|
-
};
|
package/dist/canvas/Shape.js
DELETED
package/dist/canvas/Shape.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Shape.js","sourceRoot":"","sources":["../../lib/canvas/Shape.ts"],"names":[],"mappings":""}
|
package/dist/canvas/ShapeIcon.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ShapeIcon.js","sourceRoot":"","sources":["../../lib/canvas/ShapeIcon.ts"],"names":[],"mappings":""}
|
package/dist/canvas/ShapeType.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ShapeType.js","sourceRoot":"","sources":["../../lib/canvas/ShapeType.ts"],"names":[],"mappings":""}
|