bruce-models 7.0.9 → 7.0.10
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 +84 -2
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +82 -1
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +2 -1
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/change-set/change-set.js +100 -0
- package/dist/lib/change-set/change-set.js.map +1 -0
- package/dist/types/bruce-models.d.ts +2 -1
- package/dist/types/change-set/change-set.d.ts +45 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -16731,8 +16731,89 @@
|
|
|
16731
16731
|
}
|
|
16732
16732
|
}
|
|
16733
16733
|
|
|
16734
|
+
(function (ChangeSet) {
|
|
16735
|
+
/**
|
|
16736
|
+
* Updates existing or crates new Change Set record.
|
|
16737
|
+
*/
|
|
16738
|
+
function Update(params) {
|
|
16739
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16740
|
+
let { changeSet: data, api, req: reqParams } = params;
|
|
16741
|
+
if (!api) {
|
|
16742
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
16743
|
+
}
|
|
16744
|
+
const url = `change` + (data.ID == null ? "" : "/" + data.ID);
|
|
16745
|
+
const res = yield api.POST(url, data, exports.Api.PrepReqParams(reqParams));
|
|
16746
|
+
return;
|
|
16747
|
+
});
|
|
16748
|
+
}
|
|
16749
|
+
ChangeSet.Update = Update;
|
|
16750
|
+
/**
|
|
16751
|
+
* Deletes the specified Change Set record.
|
|
16752
|
+
*/
|
|
16753
|
+
function Delete(params) {
|
|
16754
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16755
|
+
let { id, api, req: reqParams } = params;
|
|
16756
|
+
if (!api) {
|
|
16757
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
16758
|
+
}
|
|
16759
|
+
yield api.DELETE(`change/${id}`, exports.Api.PrepReqParams(reqParams));
|
|
16760
|
+
});
|
|
16761
|
+
}
|
|
16762
|
+
ChangeSet.Delete = Delete;
|
|
16763
|
+
/**
|
|
16764
|
+
* Gets the Change Set record by its ID.
|
|
16765
|
+
*/
|
|
16766
|
+
function Get(params) {
|
|
16767
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16768
|
+
let { id, api, req: reqParams } = params;
|
|
16769
|
+
if (!api) {
|
|
16770
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
16771
|
+
}
|
|
16772
|
+
reqParams = exports.Api.PrepReqParams(reqParams);
|
|
16773
|
+
const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
16774
|
+
try {
|
|
16775
|
+
const data = yield api.GET(`change/${id}`, exports.Api.PrepReqParams(reqParams));
|
|
16776
|
+
res({
|
|
16777
|
+
changeSet: data
|
|
16778
|
+
});
|
|
16779
|
+
}
|
|
16780
|
+
catch (e) {
|
|
16781
|
+
rej(e);
|
|
16782
|
+
}
|
|
16783
|
+
}));
|
|
16784
|
+
return prom;
|
|
16785
|
+
});
|
|
16786
|
+
}
|
|
16787
|
+
ChangeSet.Get = Get;
|
|
16788
|
+
/**
|
|
16789
|
+
* Gets the list of all the Change Set records.
|
|
16790
|
+
*/
|
|
16791
|
+
function GetList(params) {
|
|
16792
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16793
|
+
let { api, req: reqParams } = params;
|
|
16794
|
+
if (!api) {
|
|
16795
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
16796
|
+
}
|
|
16797
|
+
reqParams = exports.Api.PrepReqParams(reqParams);
|
|
16798
|
+
const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
16799
|
+
try {
|
|
16800
|
+
const data = yield api.GET("changes", exports.Api.PrepReqParams(reqParams));
|
|
16801
|
+
res({
|
|
16802
|
+
changeSet: data === null || data === void 0 ? void 0 : data.Items
|
|
16803
|
+
});
|
|
16804
|
+
}
|
|
16805
|
+
catch (e) {
|
|
16806
|
+
rej(e);
|
|
16807
|
+
}
|
|
16808
|
+
}));
|
|
16809
|
+
return prom;
|
|
16810
|
+
});
|
|
16811
|
+
}
|
|
16812
|
+
ChangeSet.GetList = GetList;
|
|
16813
|
+
})(exports.ChangeSet || (exports.ChangeSet = {}));
|
|
16814
|
+
|
|
16734
16815
|
// This is updated with the package.json version on build.
|
|
16735
|
-
const VERSION = "7.0.
|
|
16816
|
+
const VERSION = "7.0.10";
|
|
16736
16817
|
|
|
16737
16818
|
exports.VERSION = VERSION;
|
|
16738
16819
|
exports.AbstractApi = AbstractApi;
|