bruce-models 7.1.29 → 7.1.31
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/bruce-models.es5.js +49 -103
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +49 -103
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/change-set/change-set.js +48 -102
- package/dist/lib/change-set/change-set.js.map +1 -1
- package/dist/lib/import/import-assembly.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/change-set/change-set.d.ts +54 -94
- package/dist/types/import/import-assembly.d.ts +5 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -17506,7 +17506,7 @@
|
|
|
17506
17506
|
EStatus["ERROR"] = "Error";
|
|
17507
17507
|
})(EStatus = ChangeSet.EStatus || (ChangeSet.EStatus = {}));
|
|
17508
17508
|
/**
|
|
17509
|
-
* Single-character action values stored on
|
|
17509
|
+
* Single-character action values stored on Change Item records.
|
|
17510
17510
|
*/
|
|
17511
17511
|
let EAction;
|
|
17512
17512
|
(function (EAction) {
|
|
@@ -17514,6 +17514,16 @@
|
|
|
17514
17514
|
EAction["UPDATE"] = "U";
|
|
17515
17515
|
EAction["DELETE"] = "D";
|
|
17516
17516
|
})(EAction = ChangeSet.EAction || (ChangeSet.EAction = {}));
|
|
17517
|
+
/**
|
|
17518
|
+
* Concept codes that identify what kind of record a Change Item targets.
|
|
17519
|
+
*/
|
|
17520
|
+
let EConcept;
|
|
17521
|
+
(function (EConcept) {
|
|
17522
|
+
EConcept["ENTITY"] = "E";
|
|
17523
|
+
EConcept["ENTITY_TYPE"] = "ET";
|
|
17524
|
+
EConcept["ENTITY_LOD"] = "EL";
|
|
17525
|
+
EConcept["ENTITY_RELATION"] = "ER";
|
|
17526
|
+
})(EConcept = ChangeSet.EConcept || (ChangeSet.EConcept = {}));
|
|
17517
17527
|
/**
|
|
17518
17528
|
* Updates existing or creates new Change Set record.
|
|
17519
17529
|
* To create a new record pass a changeSet without an ID (or with ID set to 0/null).
|
|
@@ -17526,12 +17536,12 @@
|
|
|
17526
17536
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
17527
17537
|
}
|
|
17528
17538
|
const id = (_a = data.ID) !== null && _a !== void 0 ? _a : 0;
|
|
17529
|
-
return api.POST(`change/${id}`, data, exports.Api.PrepReqParams(reqParams));
|
|
17539
|
+
return api.POST(`v3/change/${id}`, data, exports.Api.PrepReqParams(reqParams));
|
|
17530
17540
|
});
|
|
17531
17541
|
}
|
|
17532
17542
|
ChangeSet.Update = Update;
|
|
17533
17543
|
/**
|
|
17534
|
-
* Deletes the specified Change Set record.
|
|
17544
|
+
* Deletes the specified Change Set record and all its associated Change Items.
|
|
17535
17545
|
*/
|
|
17536
17546
|
function Delete(params) {
|
|
17537
17547
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -17539,7 +17549,7 @@
|
|
|
17539
17549
|
if (!api) {
|
|
17540
17550
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
17541
17551
|
}
|
|
17542
|
-
yield api.DELETE(`change/${id}`, exports.Api.PrepReqParams(reqParams));
|
|
17552
|
+
yield api.DELETE(`v3/change/${id}`, exports.Api.PrepReqParams(reqParams));
|
|
17543
17553
|
});
|
|
17544
17554
|
}
|
|
17545
17555
|
ChangeSet.Delete = Delete;
|
|
@@ -17553,7 +17563,7 @@
|
|
|
17553
17563
|
if (!api) {
|
|
17554
17564
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
17555
17565
|
}
|
|
17556
|
-
return yield api.GET(`change/${id}`, exports.Api.PrepReqParams(reqParams));
|
|
17566
|
+
return yield api.GET(`v3/change/${id}`, exports.Api.PrepReqParams(reqParams));
|
|
17557
17567
|
});
|
|
17558
17568
|
}
|
|
17559
17569
|
ChangeSet.Get = Get;
|
|
@@ -17575,47 +17585,10 @@
|
|
|
17575
17585
|
urlParams.append("PageIndex", String(pageIndex));
|
|
17576
17586
|
}
|
|
17577
17587
|
const query = urlParams.toString();
|
|
17578
|
-
return api.GET(query ? `changes?${query}` : "changes", exports.Api.PrepReqParams(reqParams));
|
|
17588
|
+
return api.GET(query ? `v3/changes?${query}` : "v3/changes", exports.Api.PrepReqParams(reqParams));
|
|
17579
17589
|
});
|
|
17580
17590
|
}
|
|
17581
17591
|
ChangeSet.GetList = GetList;
|
|
17582
|
-
/**
|
|
17583
|
-
* Gets the content of the specified Change Set including Entity Type and Entity change records.
|
|
17584
|
-
* Supports pagination, mapping mode, and filtering by entity action and Entity IDs.
|
|
17585
|
-
*/
|
|
17586
|
-
function GetContent(params) {
|
|
17587
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
17588
|
-
let { id, api, req: reqParams, pageSize, pageIndex, select, entityStatus, entityId } = params;
|
|
17589
|
-
if (!api) {
|
|
17590
|
-
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
17591
|
-
}
|
|
17592
|
-
const urlParams = new URLSearchParams();
|
|
17593
|
-
if (pageSize != null) {
|
|
17594
|
-
urlParams.append("PageSize", String(pageSize));
|
|
17595
|
-
}
|
|
17596
|
-
if (pageIndex != null) {
|
|
17597
|
-
urlParams.append("PageIndex", String(pageIndex));
|
|
17598
|
-
}
|
|
17599
|
-
if (select != null) {
|
|
17600
|
-
urlParams.append("Select", select);
|
|
17601
|
-
}
|
|
17602
|
-
if (entityStatus != null) {
|
|
17603
|
-
const statuses = Array.isArray(entityStatus) ? entityStatus : [entityStatus];
|
|
17604
|
-
for (const s of statuses) {
|
|
17605
|
-
urlParams.append("EntityStatus", s);
|
|
17606
|
-
}
|
|
17607
|
-
}
|
|
17608
|
-
if (entityId != null) {
|
|
17609
|
-
const ids = Array.isArray(entityId) ? entityId : [entityId];
|
|
17610
|
-
for (const eid of ids) {
|
|
17611
|
-
urlParams.append("EntityID", eid);
|
|
17612
|
-
}
|
|
17613
|
-
}
|
|
17614
|
-
const query = urlParams.toString();
|
|
17615
|
-
return api.GET(query ? `change/${id}/content?${query}` : `change/${id}/content`, exports.Api.PrepReqParams(reqParams));
|
|
17616
|
-
});
|
|
17617
|
-
}
|
|
17618
|
-
ChangeSet.GetContent = GetContent;
|
|
17619
17592
|
/**
|
|
17620
17593
|
* Starts job to commit changes proposed in the change set.
|
|
17621
17594
|
* Returns the PA ID to monitor.
|
|
@@ -17626,30 +17599,32 @@
|
|
|
17626
17599
|
if (!api) {
|
|
17627
17600
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
17628
17601
|
}
|
|
17629
|
-
return api.POST(`change/${id}/commit`, null, exports.Api.PrepReqParams(reqParams));
|
|
17602
|
+
return api.POST(`v3/change/${id}/commit`, null, exports.Api.PrepReqParams(reqParams));
|
|
17630
17603
|
});
|
|
17631
17604
|
}
|
|
17632
17605
|
ChangeSet.Commit = Commit;
|
|
17633
17606
|
/**
|
|
17634
|
-
*
|
|
17607
|
+
* Rejects (cancels) the specified Change Set by setting its Status to Cancelled.
|
|
17635
17608
|
*/
|
|
17636
|
-
function
|
|
17609
|
+
function Reject(params) {
|
|
17637
17610
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17638
17611
|
let { id, api, req: reqParams } = params;
|
|
17639
17612
|
if (!api) {
|
|
17640
17613
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
17641
17614
|
}
|
|
17642
|
-
return api.
|
|
17615
|
+
return api.POST(`v3/change/${id}/reject`, null, exports.Api.PrepReqParams(reqParams));
|
|
17643
17616
|
});
|
|
17644
17617
|
}
|
|
17645
|
-
ChangeSet.
|
|
17618
|
+
ChangeSet.Reject = Reject;
|
|
17646
17619
|
/**
|
|
17647
|
-
* Gets the list of
|
|
17648
|
-
*
|
|
17620
|
+
* Gets the paged list of Change Items for the specified Change Set.
|
|
17621
|
+
* Optionally filter by Concept (E, ET, EL, ER) and/or EntityID.
|
|
17622
|
+
* TotalCount is returned when PageIndex is 0 (the default).
|
|
17623
|
+
* Pass -1 for both pageSize and pageIndex to get only TotalCount.
|
|
17649
17624
|
*/
|
|
17650
|
-
function
|
|
17625
|
+
function GetItems(params) {
|
|
17651
17626
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17652
|
-
let {
|
|
17627
|
+
let { id, api, req: reqParams, pageSize, pageIndex, concept, entityId } = params;
|
|
17653
17628
|
if (!api) {
|
|
17654
17629
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
17655
17630
|
}
|
|
@@ -17660,90 +17635,61 @@
|
|
|
17660
17635
|
if (pageIndex != null) {
|
|
17661
17636
|
urlParams.append("PageIndex", String(pageIndex));
|
|
17662
17637
|
}
|
|
17663
|
-
if (
|
|
17664
|
-
|
|
17665
|
-
for (const s of statuses) {
|
|
17666
|
-
urlParams.append("Status", s);
|
|
17667
|
-
}
|
|
17638
|
+
if (concept != null) {
|
|
17639
|
+
urlParams.append("Concept", concept);
|
|
17668
17640
|
}
|
|
17669
17641
|
if (entityId != null) {
|
|
17670
|
-
|
|
17671
|
-
for (const eid of ids) {
|
|
17672
|
-
urlParams.append("EntityID", eid);
|
|
17673
|
-
}
|
|
17642
|
+
urlParams.append("EntityID", entityId);
|
|
17674
17643
|
}
|
|
17675
17644
|
const query = urlParams.toString();
|
|
17676
|
-
return api.GET(query
|
|
17677
|
-
? `entity/changes/by_change_id/${changeId}?${query}`
|
|
17678
|
-
: `entity/changes/by_change_id/${changeId}`, exports.Api.PrepReqParams(reqParams));
|
|
17645
|
+
return api.GET(query ? `v3/change/${id}/items?${query}` : `v3/change/${id}/items`, exports.Api.PrepReqParams(reqParams));
|
|
17679
17646
|
});
|
|
17680
17647
|
}
|
|
17681
|
-
ChangeSet.
|
|
17648
|
+
ChangeSet.GetItems = GetItems;
|
|
17682
17649
|
/**
|
|
17683
|
-
*
|
|
17684
|
-
*
|
|
17650
|
+
* Updates existing or creates new Change Item within the specified Change Set.
|
|
17651
|
+
* To create a new item omit changeItem.ID or set it to 0.
|
|
17685
17652
|
*/
|
|
17686
|
-
function
|
|
17653
|
+
function UpdateItem(params) {
|
|
17687
17654
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17688
|
-
let { changeId, api, req: reqParams
|
|
17655
|
+
let { changeId, changeItem: data, api, req: reqParams } = params;
|
|
17689
17656
|
if (!api) {
|
|
17690
17657
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
17691
17658
|
}
|
|
17692
|
-
|
|
17693
|
-
urlParams.append("Select", "MAPPING");
|
|
17694
|
-
if (pageSize != null) {
|
|
17695
|
-
urlParams.append("PageSize", String(pageSize));
|
|
17696
|
-
}
|
|
17697
|
-
if (pageIndex != null) {
|
|
17698
|
-
urlParams.append("PageIndex", String(pageIndex));
|
|
17699
|
-
}
|
|
17700
|
-
if (status != null) {
|
|
17701
|
-
const statuses = Array.isArray(status) ? status : [status];
|
|
17702
|
-
for (const s of statuses) {
|
|
17703
|
-
urlParams.append("Status", s);
|
|
17704
|
-
}
|
|
17705
|
-
}
|
|
17706
|
-
if (entityId != null) {
|
|
17707
|
-
const ids = Array.isArray(entityId) ? entityId : [entityId];
|
|
17708
|
-
for (const eid of ids) {
|
|
17709
|
-
urlParams.append("EntityID", eid);
|
|
17710
|
-
}
|
|
17711
|
-
}
|
|
17712
|
-
return api.GET(`entity/changes/by_change_id/${changeId}?${urlParams.toString()}`, exports.Api.PrepReqParams(reqParams));
|
|
17659
|
+
return yield api.POST(`v3/change/${changeId}/item/${data.ID || 0}`, data, exports.Api.PrepReqParams(reqParams));
|
|
17713
17660
|
});
|
|
17714
17661
|
}
|
|
17715
|
-
ChangeSet.
|
|
17662
|
+
ChangeSet.UpdateItem = UpdateItem;
|
|
17716
17663
|
/**
|
|
17717
|
-
*
|
|
17718
|
-
* To create a new record, omit entityChange.ID or set it to 0.
|
|
17664
|
+
* Deletes a single Change Item from the specified Change Set.
|
|
17719
17665
|
*/
|
|
17720
|
-
function
|
|
17666
|
+
function DeleteItem(params) {
|
|
17721
17667
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17722
|
-
let { changeId,
|
|
17668
|
+
let { changeId, itemId, api, req: reqParams } = params;
|
|
17723
17669
|
if (!api) {
|
|
17724
17670
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
17725
17671
|
}
|
|
17726
|
-
|
|
17672
|
+
yield api.DELETE(`v3/change/${changeId}/item/${itemId}`, exports.Api.PrepReqParams(reqParams));
|
|
17727
17673
|
});
|
|
17728
17674
|
}
|
|
17729
|
-
ChangeSet.
|
|
17675
|
+
ChangeSet.DeleteItem = DeleteItem;
|
|
17730
17676
|
/**
|
|
17731
|
-
*
|
|
17677
|
+
* Batch-creates or updates Change Items within the specified Change Set.
|
|
17732
17678
|
*/
|
|
17733
|
-
function
|
|
17679
|
+
function UpdateItems(params) {
|
|
17734
17680
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17735
|
-
let {
|
|
17681
|
+
let { changeId, items, api, req: reqParams } = params;
|
|
17736
17682
|
if (!api) {
|
|
17737
17683
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
17738
17684
|
}
|
|
17739
|
-
yield api.
|
|
17685
|
+
return yield api.POST(`v3/change/${changeId}/items`, { Items: items }, exports.Api.PrepReqParams(reqParams));
|
|
17740
17686
|
});
|
|
17741
17687
|
}
|
|
17742
|
-
ChangeSet.
|
|
17688
|
+
ChangeSet.UpdateItems = UpdateItems;
|
|
17743
17689
|
})(exports.ChangeSet || (exports.ChangeSet = {}));
|
|
17744
17690
|
|
|
17745
17691
|
// This is updated with the package.json version on build.
|
|
17746
|
-
const VERSION = "7.1.
|
|
17692
|
+
const VERSION = "7.1.31";
|
|
17747
17693
|
|
|
17748
17694
|
exports.VERSION = VERSION;
|
|
17749
17695
|
exports.AbstractApi = AbstractApi;
|