bruce-models 7.1.115 → 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.
@@ -24080,6 +24080,26 @@
24080
24080
  })(exports.UrlUtils || (exports.UrlUtils = {}));
24081
24081
 
24082
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 = {}));
24083
24103
  function Get(params) {
24084
24104
  return __awaiter(this, void 0, void 0, function* () {
24085
24105
  let { api, workflowItemId, req } = params;
@@ -24170,6 +24190,7 @@
24170
24190
  });
24171
24191
  }
24172
24192
  WorkflowItem.GetStatistics = GetStatistics;
24193
+ /** Creates an item, including its optional Priority and Parent.Item.ID. */
24173
24194
  function Create(params) {
24174
24195
  var _a, _b, _c, _d, _e;
24175
24196
  return __awaiter(this, void 0, void 0, function* () {
@@ -24196,6 +24217,10 @@
24196
24217
  });
24197
24218
  }
24198
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
+ */
24199
24224
  function Update(params) {
24200
24225
  return __awaiter(this, void 0, void 0, function* () {
24201
24226
  let { api, workflowItem, req } = params;
@@ -24215,6 +24240,45 @@
24215
24240
  });
24216
24241
  }
24217
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;
24218
24282
  function Delete(params) {
24219
24283
  return __awaiter(this, void 0, void 0, function* () {
24220
24284
  let { api, workflowItemId, req } = params;
@@ -24844,7 +24908,7 @@
24844
24908
  }
24845
24909
 
24846
24910
  // This is updated with the package.json version on build.
24847
- const VERSION = "7.1.115";
24911
+ const VERSION = "7.1.116";
24848
24912
 
24849
24913
  exports.VERSION = VERSION;
24850
24914
  exports.AbstractApi = AbstractApi;