@topconsultnpm/sdk-ts 6.19.0-dev1.8 → 6.19.0-test1
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/lib/Engine.js
CHANGED
|
@@ -490,6 +490,32 @@ export class DcmtTypeEngine extends BaseEngine {
|
|
|
490
490
|
(_c = d.isUnique) !== null && _c !== void 0 ? _c : (d.isUnique = 0);
|
|
491
491
|
return d;
|
|
492
492
|
}
|
|
493
|
+
static NormalizeLayoutDescriptor(d, isNew) {
|
|
494
|
+
var _a, _b, _c, _d;
|
|
495
|
+
if (!d)
|
|
496
|
+
return;
|
|
497
|
+
(_a = d.id) !== null && _a !== void 0 ? _a : (d.id = 0);
|
|
498
|
+
(_b = d.isForArchive) !== null && _b !== void 0 ? _b : (d.isForArchive = false);
|
|
499
|
+
(_c = d.isForUpdate) !== null && _c !== void 0 ? _c : (d.isForUpdate = false);
|
|
500
|
+
(_d = d.tid) !== null && _d !== void 0 ? _d : (d.tid = 0);
|
|
501
|
+
if (d.items) {
|
|
502
|
+
for (let item of d.items) {
|
|
503
|
+
this.NormalizeLayoutItemDescriptor(item, isNew);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
else {
|
|
507
|
+
d.items = [];
|
|
508
|
+
}
|
|
509
|
+
return d;
|
|
510
|
+
}
|
|
511
|
+
static NormalizeLayoutItemDescriptor(d, isNew) {
|
|
512
|
+
var _a, _b;
|
|
513
|
+
if (!d)
|
|
514
|
+
return;
|
|
515
|
+
(_a = d.layoutItemID) !== null && _a !== void 0 ? _a : (d.layoutItemID = 0);
|
|
516
|
+
(_b = d.parentID) !== null && _b !== void 0 ? _b : (d.parentID = 0);
|
|
517
|
+
return d;
|
|
518
|
+
}
|
|
493
519
|
CreateAsync(d) {
|
|
494
520
|
return __awaiter(this, void 0, void 0, function* () { var _a; return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.dcmtTypeCreate(d)); });
|
|
495
521
|
}
|
|
@@ -548,7 +574,7 @@ export class DcmtTypeEngine extends BaseEngine {
|
|
|
548
574
|
return __awaiter(this, void 0, void 0, function* () { var _a; return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.layoutCreate(ld)); });
|
|
549
575
|
}
|
|
550
576
|
LayoutRetrieveAsync(TID, layoutMode) {
|
|
551
|
-
return __awaiter(this, void 0, void 0, function* () { var _a; return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.layoutRetrieve(TID, layoutMode)); });
|
|
577
|
+
return __awaiter(this, void 0, void 0, function* () { var _a; return DcmtTypeEngine.NormalizeLayoutDescriptor(yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.layoutRetrieve(TID, layoutMode)), false); });
|
|
552
578
|
}
|
|
553
579
|
LayoutRetrieveAdminAsync(TID, id) {
|
|
554
580
|
return __awaiter(this, void 0, void 0, function* () { var _a; return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.layoutRetrieveAdmin(TID, id)); });
|
|
@@ -3886,6 +3912,9 @@ export class SearchEngine extends BaseEngine {
|
|
|
3886
3912
|
GetMetadataAsync(TID_1, DID_1, getTag_1) {
|
|
3887
3913
|
return __awaiter(this, arguments, void 0, function* (TID, DID, getTag, outputType = 6) { var _a; return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.getMetadata(TID, DID, getTag ? 1 : 0, outputType)); });
|
|
3888
3914
|
}
|
|
3915
|
+
GetSharedDcmtsAsync(TID_1, DID_1) {
|
|
3916
|
+
return __awaiter(this, arguments, void 0, function* (TID, DID, outputType = 6) { var _a; return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.getSharedDcmts(TID, DID, outputType)); });
|
|
3917
|
+
}
|
|
3889
3918
|
ManyToManyRelateAsync(masterTID, masterDID, detailTID, detailDID) {
|
|
3890
3919
|
return __awaiter(this, void 0, void 0, function* () { var _a; return yield ((_a = this.TMSClient) === null || _a === void 0 ? void 0 : _a.manyToManyRelate(masterTID, masterDID, detailTID, detailDID)); });
|
|
3891
3920
|
}
|