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.
@@ -3,6 +3,25 @@ import { BruceApi } from "../api/bruce-api";
3
3
  type WorkflowItemId = number | string;
4
4
  type WorkflowSettingId = number | string;
5
5
  export declare namespace WorkflowItem {
6
+ /** Sort fields supported by workflow/itemsquery. */
7
+ enum EOrderBy {
8
+ ID = "ID",
9
+ ENTITY_ID = "EntityID",
10
+ CREATED = "Created",
11
+ UPDATED = "Updated",
12
+ DUE_DATE = "DueDate",
13
+ CREATED_BY_USER_ID = "CreatedByUserID",
14
+ ITEM_TYPE_ID = "ItemTypeID",
15
+ ITEM_STATUS_ID = "ItemStatusID",
16
+ QUEUE_ID = "QueueID",
17
+ WORKFLOW_SCHEDULE_ID = "WorkflowScheduleID",
18
+ PRIORITY = "Priority",
19
+ PARENT_ITEM_ID = "ParentItemID",
20
+ DESCRIPTION = "Description",
21
+ UI_SLIDE_ID = "UISlideID",
22
+ THUMBNAIL_CLIENT_FILE_ID = "ThumbnailClientFileID",
23
+ RANDOM = "RANDOM"
24
+ }
6
25
  interface IItem {
7
26
  ID?: number;
8
27
  "Entity.ID"?: string;
@@ -14,7 +33,9 @@ export declare namespace WorkflowItem {
14
33
  "ItemStatus.ID"?: number;
15
34
  "Queue.ID"?: number;
16
35
  "Workflow.Schedule.ID"?: number | null;
36
+ /** Optional signed int32 priority. Send null to clear; omit to preserve on update. */
17
37
  Priority?: number | null;
38
+ /** Optional int64 parent Workflow Item ID. Send null to detach; omit to preserve on update. */
18
39
  "Parent.Item.ID"?: number | null;
19
40
  Description?: string;
20
41
  "UI.Slide.ID"?: string;
@@ -33,7 +54,7 @@ export declare namespace WorkflowItem {
33
54
  api?: BruceApi.Api;
34
55
  pageSize?: number;
35
56
  pageIndex?: number;
36
- orderBy?: string;
57
+ orderBy?: EOrderBy | string;
37
58
  sortOrder?: Api.ESortOrderStr | "ASC" | "DESC" | string;
38
59
  statusEnd?: boolean;
39
60
  assignedToMe?: boolean;
@@ -41,8 +62,10 @@ export declare namespace WorkflowItem {
41
62
  queueId?: WorkflowSettingId | WorkflowSettingId[];
42
63
  scheduleId?: WorkflowSettingId | WorkflowSettingId[];
43
64
  workflowScheduleId?: WorkflowSettingId | WorkflowSettingId[];
65
+ /** Match one or more integer priorities, including zero and negative values. */
44
66
  priority?: number | number[];
45
- parentItemId?: WorkflowSettingId | WorkflowSettingId[];
67
+ /** Match direct children of one or more parent Workflow Items. */
68
+ parentItemId?: WorkflowItemId | WorkflowItemId[];
46
69
  statusId?: WorkflowSettingId | WorkflowSettingId[];
47
70
  createdByUserId?: string | string[];
48
71
  dueDate?: string | string[];
@@ -111,6 +134,7 @@ export declare namespace WorkflowItem {
111
134
  * Parent Entity Type and Ontology breakdowns are returned only when expanded.
112
135
  */
113
136
  function GetStatistics(params?: IStatisticsParams): Promise<IStatisticsResponse>;
137
+ /** Creates an item, including its optional Priority and Parent.Item.ID. */
114
138
  function Create(params: {
115
139
  api?: BruceApi.Api;
116
140
  workflowItemTypeId?: WorkflowSettingId;
@@ -121,6 +145,10 @@ export declare namespace WorkflowItem {
121
145
  workflowItem: IItem;
122
146
  entity?: any;
123
147
  }>;
148
+ /**
149
+ * Saves item changes. Omitted fields are preserved; null clears Priority or Parent.Item.ID.
150
+ * The API validates that the parent exists and that its parent chain is not circular.
151
+ */
124
152
  function Update(params: {
125
153
  api?: BruceApi.Api;
126
154
  workflowItem: IItem;
@@ -128,6 +156,27 @@ export declare namespace WorkflowItem {
128
156
  }): Promise<{
129
157
  workflowItem: IItem;
130
158
  }>;
159
+ /** Updates only the priority of an existing item. Pass null to clear it. */
160
+ function UpdatePriority(params: {
161
+ api?: BruceApi.Api;
162
+ workflowItemId: WorkflowItemId;
163
+ priority: number | null;
164
+ req?: Api.IReqParams;
165
+ }): Promise<{
166
+ workflowItem: IItem;
167
+ }>;
168
+ /**
169
+ * Updates only the parent of an existing item. Pass null to detach it.
170
+ * The API validates parent existence and rejects circular parent chains.
171
+ */
172
+ function UpdateParent(params: {
173
+ api?: BruceApi.Api;
174
+ workflowItemId: WorkflowItemId;
175
+ parentItemId: number | null;
176
+ req?: Api.IReqParams;
177
+ }): Promise<{
178
+ workflowItem: IItem;
179
+ }>;
131
180
  function Delete(params: {
132
181
  api?: BruceApi.Api;
133
182
  workflowItemId: WorkflowItemId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bruce-models",
3
- "version": "7.1.114",
3
+ "version": "7.1.116",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "main": "dist/bruce-models.umd.js",