bruce-models 7.1.115 → 7.1.117
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 +66 -1
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +66 -1
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity-type-trigger.js +1 -0
- package/dist/lib/entity/entity-type-trigger.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/entity/entity-type-trigger.d.ts +30 -5
- package/dist/types/workflow/workflow-item.d.ts +51 -2
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -17198,6 +17198,7 @@
|
|
|
17198
17198
|
(function (EType) {
|
|
17199
17199
|
EType["DataLabQuery"] = "DataLabQuery";
|
|
17200
17200
|
EType["WorkflowTicket"] = "WorkflowTicket";
|
|
17201
|
+
EType["CreateEntity"] = "CreateEntity";
|
|
17201
17202
|
})(EType = EntityTypeTrigger.EType || (EntityTypeTrigger.EType = {}));
|
|
17202
17203
|
/**
|
|
17203
17204
|
* Builds the Settings payload for a WorkflowTicket trigger.
|
|
@@ -24080,6 +24081,26 @@
|
|
|
24080
24081
|
})(exports.UrlUtils || (exports.UrlUtils = {}));
|
|
24081
24082
|
|
|
24082
24083
|
(function (WorkflowItem) {
|
|
24084
|
+
/** Sort fields supported by workflow/itemsquery. */
|
|
24085
|
+
let EOrderBy;
|
|
24086
|
+
(function (EOrderBy) {
|
|
24087
|
+
EOrderBy["ID"] = "ID";
|
|
24088
|
+
EOrderBy["ENTITY_ID"] = "EntityID";
|
|
24089
|
+
EOrderBy["CREATED"] = "Created";
|
|
24090
|
+
EOrderBy["UPDATED"] = "Updated";
|
|
24091
|
+
EOrderBy["DUE_DATE"] = "DueDate";
|
|
24092
|
+
EOrderBy["CREATED_BY_USER_ID"] = "CreatedByUserID";
|
|
24093
|
+
EOrderBy["ITEM_TYPE_ID"] = "ItemTypeID";
|
|
24094
|
+
EOrderBy["ITEM_STATUS_ID"] = "ItemStatusID";
|
|
24095
|
+
EOrderBy["QUEUE_ID"] = "QueueID";
|
|
24096
|
+
EOrderBy["WORKFLOW_SCHEDULE_ID"] = "WorkflowScheduleID";
|
|
24097
|
+
EOrderBy["PRIORITY"] = "Priority";
|
|
24098
|
+
EOrderBy["PARENT_ITEM_ID"] = "ParentItemID";
|
|
24099
|
+
EOrderBy["DESCRIPTION"] = "Description";
|
|
24100
|
+
EOrderBy["UI_SLIDE_ID"] = "UISlideID";
|
|
24101
|
+
EOrderBy["THUMBNAIL_CLIENT_FILE_ID"] = "ThumbnailClientFileID";
|
|
24102
|
+
EOrderBy["RANDOM"] = "RANDOM";
|
|
24103
|
+
})(EOrderBy = WorkflowItem.EOrderBy || (WorkflowItem.EOrderBy = {}));
|
|
24083
24104
|
function Get(params) {
|
|
24084
24105
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24085
24106
|
let { api, workflowItemId, req } = params;
|
|
@@ -24170,6 +24191,7 @@
|
|
|
24170
24191
|
});
|
|
24171
24192
|
}
|
|
24172
24193
|
WorkflowItem.GetStatistics = GetStatistics;
|
|
24194
|
+
/** Creates an item, including its optional Priority and Parent.Item.ID. */
|
|
24173
24195
|
function Create(params) {
|
|
24174
24196
|
var _a, _b, _c, _d, _e;
|
|
24175
24197
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -24196,6 +24218,10 @@
|
|
|
24196
24218
|
});
|
|
24197
24219
|
}
|
|
24198
24220
|
WorkflowItem.Create = Create;
|
|
24221
|
+
/**
|
|
24222
|
+
* Saves item changes. Omitted fields are preserved; null clears Priority or Parent.Item.ID.
|
|
24223
|
+
* The API validates that the parent exists and that its parent chain is not circular.
|
|
24224
|
+
*/
|
|
24199
24225
|
function Update(params) {
|
|
24200
24226
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24201
24227
|
let { api, workflowItem, req } = params;
|
|
@@ -24215,6 +24241,45 @@
|
|
|
24215
24241
|
});
|
|
24216
24242
|
}
|
|
24217
24243
|
WorkflowItem.Update = Update;
|
|
24244
|
+
/** Updates only the priority of an existing item. Pass null to clear it. */
|
|
24245
|
+
function UpdatePriority(params) {
|
|
24246
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24247
|
+
const { api, workflowItemId, priority, req } = params;
|
|
24248
|
+
if (isInvalidId(workflowItemId) || !Number.isSafeInteger(Number(workflowItemId))) {
|
|
24249
|
+
throw ("Workflow Item ID is required.");
|
|
24250
|
+
}
|
|
24251
|
+
if (priority !== null && (!Number.isInteger(priority) || priority < -2147483648 || priority > 2147483647)) {
|
|
24252
|
+
throw ("Workflow Item priority must be a signed 32-bit integer or null.");
|
|
24253
|
+
}
|
|
24254
|
+
return Update({
|
|
24255
|
+
api,
|
|
24256
|
+
workflowItem: { ID: Number(workflowItemId), Priority: priority },
|
|
24257
|
+
req
|
|
24258
|
+
});
|
|
24259
|
+
});
|
|
24260
|
+
}
|
|
24261
|
+
WorkflowItem.UpdatePriority = UpdatePriority;
|
|
24262
|
+
/**
|
|
24263
|
+
* Updates only the parent of an existing item. Pass null to detach it.
|
|
24264
|
+
* The API validates parent existence and rejects circular parent chains.
|
|
24265
|
+
*/
|
|
24266
|
+
function UpdateParent(params) {
|
|
24267
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24268
|
+
const { api, workflowItemId, parentItemId, req } = params;
|
|
24269
|
+
if (isInvalidId(workflowItemId) || !Number.isSafeInteger(Number(workflowItemId))) {
|
|
24270
|
+
throw ("Workflow Item ID is required.");
|
|
24271
|
+
}
|
|
24272
|
+
if (parentItemId !== null && (!Number.isSafeInteger(parentItemId) || parentItemId <= 0)) {
|
|
24273
|
+
throw ("Parent Workflow Item ID must be a positive safe integer or null.");
|
|
24274
|
+
}
|
|
24275
|
+
return Update({
|
|
24276
|
+
api,
|
|
24277
|
+
workflowItem: { ID: Number(workflowItemId), "Parent.Item.ID": parentItemId },
|
|
24278
|
+
req
|
|
24279
|
+
});
|
|
24280
|
+
});
|
|
24281
|
+
}
|
|
24282
|
+
WorkflowItem.UpdateParent = UpdateParent;
|
|
24218
24283
|
function Delete(params) {
|
|
24219
24284
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24220
24285
|
let { api, workflowItemId, req } = params;
|
|
@@ -24844,7 +24909,7 @@
|
|
|
24844
24909
|
}
|
|
24845
24910
|
|
|
24846
24911
|
// This is updated with the package.json version on build.
|
|
24847
|
-
const VERSION = "7.1.
|
|
24912
|
+
const VERSION = "7.1.117";
|
|
24848
24913
|
|
|
24849
24914
|
exports.VERSION = VERSION;
|
|
24850
24915
|
exports.AbstractApi = AbstractApi;
|