bruce-models 7.1.114 → 7.1.116
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 +45 -1
- package/dist/bruce-models.es5.js +113 -3
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +113 -3
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/data-lab/data-lab.js.map +1 -1
- package/dist/lib/entity/entity.js +15 -2
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/lib/markup/markup.js.map +1 -1
- package/dist/lib/tracking/tracking.js +33 -0
- package/dist/lib/tracking/tracking.js.map +1 -1
- package/dist/lib/workflow/workflow-item.js +64 -0
- package/dist/lib/workflow/workflow-item.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/data-lab/data-lab.d.ts +2 -2
- package/dist/types/entity/entity.d.ts +1 -0
- package/dist/types/markup/markup.d.ts +1 -0
- package/dist/types/tracking/tracking.d.ts +26 -0
- package/dist/types/workflow/workflow-item.d.ts +51 -2
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -7097,11 +7097,18 @@
|
|
|
7097
7097
|
function Update(params) {
|
|
7098
7098
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
7099
7099
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7100
|
-
let { api, entity: data, entities, override, req: reqParams, migrated } = params;
|
|
7100
|
+
let { api, entity: data, entities, override, req: reqParams, migrated, skipSourcePush } = params;
|
|
7101
7101
|
if (migrated == null || migrated == undefined) {
|
|
7102
7102
|
// Changed to default = true. 18th April 2025.
|
|
7103
7103
|
migrated = true;
|
|
7104
7104
|
}
|
|
7105
|
+
let skipSourcePushParam = null;
|
|
7106
|
+
if (skipSourcePush === true) {
|
|
7107
|
+
skipSourcePushParam = "true";
|
|
7108
|
+
}
|
|
7109
|
+
else if (Array.isArray(skipSourcePush) && skipSourcePush.length) {
|
|
7110
|
+
skipSourcePushParam = skipSourcePush.join(",");
|
|
7111
|
+
}
|
|
7105
7112
|
// Bulk save. Always using a v3 endpoint as v1 did not have a bulk save.
|
|
7106
7113
|
if (entities === null || entities === void 0 ? void 0 : entities.length) {
|
|
7107
7114
|
// If the Entities don't have IDs, then they must have a Type ID.
|
|
@@ -7116,7 +7123,10 @@
|
|
|
7116
7123
|
if (!api) {
|
|
7117
7124
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
7118
7125
|
}
|
|
7119
|
-
|
|
7126
|
+
let reqUrl = "v3/entities";
|
|
7127
|
+
if (skipSourcePushParam) {
|
|
7128
|
+
reqUrl += `?SkipSourcePush=${encodeURIComponent(skipSourcePushParam)}`;
|
|
7129
|
+
}
|
|
7120
7130
|
const reqBody = {
|
|
7121
7131
|
Items: entities,
|
|
7122
7132
|
Override: override
|
|
@@ -7176,6 +7186,9 @@
|
|
|
7176
7186
|
if (!migrated) {
|
|
7177
7187
|
reqUrl += "&hasMigrated=false";
|
|
7178
7188
|
}
|
|
7189
|
+
if (skipSourcePushParam) {
|
|
7190
|
+
reqUrl += `&SkipSourcePush=${encodeURIComponent(skipSourcePushParam)}`;
|
|
7191
|
+
}
|
|
7179
7192
|
const res = yield api.POST(reqUrl, data, exports.Api.PrepReqParams(reqParams));
|
|
7180
7193
|
api.Cache.RemoveByContains(GetContainsKey(data.Bruce.ID));
|
|
7181
7194
|
exports.EntityHistoricData.ClearCacheByEntityIds(api, [data.Bruce.ID]);
|
|
@@ -22603,12 +22616,27 @@
|
|
|
22603
22616
|
})(exports.PendingAction || (exports.PendingAction = {}));
|
|
22604
22617
|
|
|
22605
22618
|
(function (Tracking) {
|
|
22619
|
+
/**
|
|
22620
|
+
* Columns a transaction summary can be grouped by.
|
|
22621
|
+
* Guardian groups by App, Account, Type and Count when none are given.
|
|
22622
|
+
*/
|
|
22623
|
+
let ETransactionGroupBy;
|
|
22624
|
+
(function (ETransactionGroupBy) {
|
|
22625
|
+
ETransactionGroupBy["App"] = "App";
|
|
22626
|
+
ETransactionGroupBy["Account"] = "Account";
|
|
22627
|
+
ETransactionGroupBy["User"] = "User";
|
|
22628
|
+
ETransactionGroupBy["Environment"] = "Environment";
|
|
22629
|
+
ETransactionGroupBy["Type"] = "Type";
|
|
22630
|
+
ETransactionGroupBy["Count"] = "Count";
|
|
22631
|
+
ETransactionGroupBy["Month"] = "Month";
|
|
22632
|
+
})(ETransactionGroupBy = Tracking.ETransactionGroupBy || (Tracking.ETransactionGroupBy = {}));
|
|
22606
22633
|
/**
|
|
22607
22634
|
* Returns tracking data based on provided parameters.
|
|
22608
22635
|
* @param params
|
|
22609
22636
|
* @returns
|
|
22610
22637
|
*/
|
|
22611
22638
|
function GetData(params) {
|
|
22639
|
+
var _a;
|
|
22612
22640
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22613
22641
|
let { api, req } = params;
|
|
22614
22642
|
if (!api) {
|
|
@@ -22621,6 +22649,9 @@
|
|
|
22621
22649
|
if (params.cType) {
|
|
22622
22650
|
query.append("CType", params.cType);
|
|
22623
22651
|
}
|
|
22652
|
+
if (params.tType) {
|
|
22653
|
+
query.append("TType", params.tType);
|
|
22654
|
+
}
|
|
22624
22655
|
if (params.tCount) {
|
|
22625
22656
|
query.append("TCount", params.tCount);
|
|
22626
22657
|
}
|
|
@@ -22630,12 +22661,27 @@
|
|
|
22630
22661
|
if (params.app) {
|
|
22631
22662
|
query.append("App", params.app);
|
|
22632
22663
|
}
|
|
22664
|
+
if (params.environment) {
|
|
22665
|
+
query.append("Environment", params.environment);
|
|
22666
|
+
}
|
|
22667
|
+
if (params.includeDeleted != null) {
|
|
22668
|
+
query.append("IncludeDeleted", String(params.includeDeleted));
|
|
22669
|
+
}
|
|
22633
22670
|
if (params.year) {
|
|
22634
22671
|
query.append("Year", String(params.year));
|
|
22635
22672
|
}
|
|
22636
22673
|
if (params.month) {
|
|
22637
22674
|
query.append("Month", String(params.month));
|
|
22638
22675
|
}
|
|
22676
|
+
if (params.fromYear) {
|
|
22677
|
+
query.append("FromYear", String(params.fromYear));
|
|
22678
|
+
}
|
|
22679
|
+
if (params.fromMonth) {
|
|
22680
|
+
query.append("FromMonth", String(params.fromMonth));
|
|
22681
|
+
}
|
|
22682
|
+
if ((_a = params.groupBy) === null || _a === void 0 ? void 0 : _a.length) {
|
|
22683
|
+
query.append("GroupBy", params.groupBy.join(","));
|
|
22684
|
+
}
|
|
22639
22685
|
return yield api.GET("tracking?" + query.toString(), exports.Api.PrepReqParams(req));
|
|
22640
22686
|
});
|
|
22641
22687
|
}
|
|
@@ -24034,6 +24080,26 @@
|
|
|
24034
24080
|
})(exports.UrlUtils || (exports.UrlUtils = {}));
|
|
24035
24081
|
|
|
24036
24082
|
(function (WorkflowItem) {
|
|
24083
|
+
/** Sort fields supported by workflow/itemsquery. */
|
|
24084
|
+
let EOrderBy;
|
|
24085
|
+
(function (EOrderBy) {
|
|
24086
|
+
EOrderBy["ID"] = "ID";
|
|
24087
|
+
EOrderBy["ENTITY_ID"] = "EntityID";
|
|
24088
|
+
EOrderBy["CREATED"] = "Created";
|
|
24089
|
+
EOrderBy["UPDATED"] = "Updated";
|
|
24090
|
+
EOrderBy["DUE_DATE"] = "DueDate";
|
|
24091
|
+
EOrderBy["CREATED_BY_USER_ID"] = "CreatedByUserID";
|
|
24092
|
+
EOrderBy["ITEM_TYPE_ID"] = "ItemTypeID";
|
|
24093
|
+
EOrderBy["ITEM_STATUS_ID"] = "ItemStatusID";
|
|
24094
|
+
EOrderBy["QUEUE_ID"] = "QueueID";
|
|
24095
|
+
EOrderBy["WORKFLOW_SCHEDULE_ID"] = "WorkflowScheduleID";
|
|
24096
|
+
EOrderBy["PRIORITY"] = "Priority";
|
|
24097
|
+
EOrderBy["PARENT_ITEM_ID"] = "ParentItemID";
|
|
24098
|
+
EOrderBy["DESCRIPTION"] = "Description";
|
|
24099
|
+
EOrderBy["UI_SLIDE_ID"] = "UISlideID";
|
|
24100
|
+
EOrderBy["THUMBNAIL_CLIENT_FILE_ID"] = "ThumbnailClientFileID";
|
|
24101
|
+
EOrderBy["RANDOM"] = "RANDOM";
|
|
24102
|
+
})(EOrderBy = WorkflowItem.EOrderBy || (WorkflowItem.EOrderBy = {}));
|
|
24037
24103
|
function Get(params) {
|
|
24038
24104
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24039
24105
|
let { api, workflowItemId, req } = params;
|
|
@@ -24124,6 +24190,7 @@
|
|
|
24124
24190
|
});
|
|
24125
24191
|
}
|
|
24126
24192
|
WorkflowItem.GetStatistics = GetStatistics;
|
|
24193
|
+
/** Creates an item, including its optional Priority and Parent.Item.ID. */
|
|
24127
24194
|
function Create(params) {
|
|
24128
24195
|
var _a, _b, _c, _d, _e;
|
|
24129
24196
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -24150,6 +24217,10 @@
|
|
|
24150
24217
|
});
|
|
24151
24218
|
}
|
|
24152
24219
|
WorkflowItem.Create = Create;
|
|
24220
|
+
/**
|
|
24221
|
+
* Saves item changes. Omitted fields are preserved; null clears Priority or Parent.Item.ID.
|
|
24222
|
+
* The API validates that the parent exists and that its parent chain is not circular.
|
|
24223
|
+
*/
|
|
24153
24224
|
function Update(params) {
|
|
24154
24225
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24155
24226
|
let { api, workflowItem, req } = params;
|
|
@@ -24169,6 +24240,45 @@
|
|
|
24169
24240
|
});
|
|
24170
24241
|
}
|
|
24171
24242
|
WorkflowItem.Update = Update;
|
|
24243
|
+
/** Updates only the priority of an existing item. Pass null to clear it. */
|
|
24244
|
+
function UpdatePriority(params) {
|
|
24245
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24246
|
+
const { api, workflowItemId, priority, req } = params;
|
|
24247
|
+
if (isInvalidId(workflowItemId) || !Number.isSafeInteger(Number(workflowItemId))) {
|
|
24248
|
+
throw ("Workflow Item ID is required.");
|
|
24249
|
+
}
|
|
24250
|
+
if (priority !== null && (!Number.isInteger(priority) || priority < -2147483648 || priority > 2147483647)) {
|
|
24251
|
+
throw ("Workflow Item priority must be a signed 32-bit integer or null.");
|
|
24252
|
+
}
|
|
24253
|
+
return Update({
|
|
24254
|
+
api,
|
|
24255
|
+
workflowItem: { ID: Number(workflowItemId), Priority: priority },
|
|
24256
|
+
req
|
|
24257
|
+
});
|
|
24258
|
+
});
|
|
24259
|
+
}
|
|
24260
|
+
WorkflowItem.UpdatePriority = UpdatePriority;
|
|
24261
|
+
/**
|
|
24262
|
+
* Updates only the parent of an existing item. Pass null to detach it.
|
|
24263
|
+
* The API validates parent existence and rejects circular parent chains.
|
|
24264
|
+
*/
|
|
24265
|
+
function UpdateParent(params) {
|
|
24266
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24267
|
+
const { api, workflowItemId, parentItemId, req } = params;
|
|
24268
|
+
if (isInvalidId(workflowItemId) || !Number.isSafeInteger(Number(workflowItemId))) {
|
|
24269
|
+
throw ("Workflow Item ID is required.");
|
|
24270
|
+
}
|
|
24271
|
+
if (parentItemId !== null && (!Number.isSafeInteger(parentItemId) || parentItemId <= 0)) {
|
|
24272
|
+
throw ("Parent Workflow Item ID must be a positive safe integer or null.");
|
|
24273
|
+
}
|
|
24274
|
+
return Update({
|
|
24275
|
+
api,
|
|
24276
|
+
workflowItem: { ID: Number(workflowItemId), "Parent.Item.ID": parentItemId },
|
|
24277
|
+
req
|
|
24278
|
+
});
|
|
24279
|
+
});
|
|
24280
|
+
}
|
|
24281
|
+
WorkflowItem.UpdateParent = UpdateParent;
|
|
24172
24282
|
function Delete(params) {
|
|
24173
24283
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24174
24284
|
let { api, workflowItemId, req } = params;
|
|
@@ -24798,7 +24908,7 @@
|
|
|
24798
24908
|
}
|
|
24799
24909
|
|
|
24800
24910
|
// This is updated with the package.json version on build.
|
|
24801
|
-
const VERSION = "7.1.
|
|
24911
|
+
const VERSION = "7.1.116";
|
|
24802
24912
|
|
|
24803
24913
|
exports.VERSION = VERSION;
|
|
24804
24914
|
exports.AbstractApi = AbstractApi;
|