bruce-models 7.1.124 → 7.1.127

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.
Files changed (34) hide show
  1. package/README.md +2 -97
  2. package/dist/bruce-models.es5.js +229 -32
  3. package/dist/bruce-models.es5.js.map +1 -1
  4. package/dist/bruce-models.umd.js +246 -32
  5. package/dist/bruce-models.umd.js.map +1 -1
  6. package/dist/lib/account/account-audit.js.map +1 -1
  7. package/dist/lib/bruce-models.js +1 -1
  8. package/dist/lib/data-lab/data-lab.js +2 -2
  9. package/dist/lib/data-lab/data-lab.js.map +1 -1
  10. package/dist/lib/entity/entity.js +13 -3
  11. package/dist/lib/entity/entity.js.map +1 -1
  12. package/dist/lib/mcp/navigator-chat-contract.js +90 -0
  13. package/dist/lib/mcp/navigator-chat-contract.js.map +1 -0
  14. package/dist/lib/mcp/navigator-chat.js +18 -3
  15. package/dist/lib/mcp/navigator-chat.js.map +1 -1
  16. package/dist/lib/mcp/navigator-mcp-websocket.js +18 -23
  17. package/dist/lib/mcp/navigator-mcp-websocket.js.map +1 -1
  18. package/dist/lib/project/project-view-bookmark.js +4 -0
  19. package/dist/lib/project/project-view-bookmark.js.map +1 -1
  20. package/dist/lib/style/style.js +10 -0
  21. package/dist/lib/style/style.js.map +1 -1
  22. package/dist/lib/workflow/workflow-item.js +98 -0
  23. package/dist/lib/workflow/workflow-item.js.map +1 -1
  24. package/dist/types/account/account-audit.d.ts +2 -1
  25. package/dist/types/bruce-models.d.ts +1 -1
  26. package/dist/types/data-lab/data-lab.d.ts +2 -1
  27. package/dist/types/entity/entity.d.ts +1 -0
  28. package/dist/types/mcp/navigator-chat-contract.d.ts +68 -0
  29. package/dist/types/mcp/navigator-chat.d.ts +17 -4
  30. package/dist/types/project/project-view-bookmark.d.ts +6 -2
  31. package/dist/types/project/project-view.d.ts +1 -1
  32. package/dist/types/style/style.d.ts +15 -0
  33. package/dist/types/workflow/workflow-item.d.ts +47 -0
  34. package/package.json +1 -1
package/README.md CHANGED
@@ -2,100 +2,5 @@
2
2
 
3
3
  This is a library which defines data-models for the Nextspace API and provides functions for communicating with the endpoints.
4
4
 
5
- ### Workflow Item priority and parent
6
-
7
- `WorkflowItem.IItem` and `WorkflowItem.ICreateItem` represent `Priority` as an optional
8
- `number | null` (signed int32) and `"Parent.Item.ID"` as an optional `number | null`
9
- (the API's int64 parent reference). Use parent IDs that JavaScript can represent
10
- as safe integers. Priority accepts zero and negative values; the API defines no
11
- fixed priority scale.
12
-
13
- `Create` and `Update` accept both fields. On update, omit a field to preserve it or
14
- send `null` to clear it. The API checks that the parent exists and prevents circular
15
- parent chains. The focused helpers update existing items through
16
- `POST workflow/item/{id}` and invalidate Workflow Item caches after success.
17
-
18
- ```ts
19
- import { WorkflowItem } from "bruce-models";
20
-
21
- // Update one attribute while preserving other item fields.
22
- await WorkflowItem.UpdatePriority({ api, workflowItemId: 9, priority: 3 });
23
- await WorkflowItem.UpdateParent({ api, workflowItemId: 9, parentItemId: 5 });
24
-
25
- // Clear priority or detach from the parent.
26
- await WorkflowItem.UpdatePriority({ api, workflowItemId: 9, priority: null });
27
- await WorkflowItem.UpdateParent({ api, workflowItemId: 9, parentItemId: null });
28
-
29
- // Change both attributes in one request.
30
- await WorkflowItem.Update({
31
- api,
32
- workflowItem: { ID: 9, Priority: 0, "Parent.Item.ID": 5 }
33
- });
34
-
35
- // List direct children, filtered and sorted by priority.
36
- const { items } = await WorkflowItem.GetList({
37
- api,
38
- parentItemId: 5,
39
- priority: [-2, 0, 3],
40
- orderBy: WorkflowItem.EOrderBy.PRIORITY,
41
- sortOrder: "DESC"
42
- });
43
- ```
44
-
45
- `GetList` uses `GET workflow/itemsquery` with `Priority` and `ParentItemID` query
46
- parameters. Both filters accept a single value or an array. Use
47
- `WorkflowItem.EOrderBy.PARENT_ITEM_ID` to sort by parent instead.
48
-
49
- <br>
50
-
51
- ### Client File folders
52
-
53
- `ClientFileFolder` manages virtual folders through `Get`, `GetList`, `Create`, `Update`, and `Delete`.
54
- Deleting a folder moves its files and immediate subfolders into its parent, or the top level; it preserves file data.
55
-
56
- ```ts
57
- const { folder } = await ClientFileFolder.Create({ api, folder: { Name: "Plans" } });
58
- await ClientFile.Upload({ api, file, folderId: folder.ID, purpose: "Import" });
59
- await ClientFile.Update({ api, fileId, folderId: folder.ID });
60
- const { clientFiles } = await ClientFile.GetList({
61
- api, filter: { "ClientFileFolder.ID": folder.ID, Purpose: "Import" }
62
- });
63
- const { folders } = await ClientFileFolder.GetList({ api, parentFolderId: folder.ID });
64
- ```
65
-
66
- Omit the folder filter to include all folders; use `0` (or `null` in JSON filters) for top-level files.
67
- Folder filters combine with the existing criteria and layer permissions. `ClientFile.GetListByQuery`
68
- wraps `GET files` and also returns `nextPage` and `nextPageUrl`. Existing `GetList` callers keep using
69
- `POST files/filtered` without changes.
70
-
71
- `ClientFile.Update`, `UpdateList`, `ReplaceContent`, and `Upload` support folder membership. On updates,
72
- omit the field to preserve it; set `null` or `0` to clear it. Upload metadata is carried on every multipart request.
73
- All four `GetCounts*` methods accept `folderId`, with separate caches for each folder and the unfiltered result.
74
- Pass bigint IDs outside JavaScript's safe integer range as decimal strings when supplying IDs to these methods.
75
- Folder permissions and record-change events use the `clff` concept code.
76
-
77
- ### Local build
78
-
79
- - `npm i`
80
-
81
- - `npm run build`
82
-
83
- <br>
84
-
85
- ### Running tests
86
-
87
- - `npm i` (ignore if already run)
88
-
89
- - `npm run test` (running all tests)
90
-
91
- - `npx run jest ./test/unit/util` (example for testing just one test folder)
92
-
93
- <br>
94
-
95
- ### Publishing new versions
96
-
97
- - Increase version inside `package.json` and push the change.
98
-
99
- - Bitbucket will run a build and test step.
100
-
101
- - Manually click `NPM Release` in Bitbucket Pipelines.
5
+ To get started, see [Getting started (with web)](https://docs.nextspace.host/webgettingstarted/) in
6
+ the Nextspace developer docs at [docs.nextspace.host](https://docs.nextspace.host).
@@ -7203,7 +7203,7 @@ var Entity;
7203
7203
  function Update(params) {
7204
7204
  var _a, _b, _c, _d, _e, _f, _g;
7205
7205
  return __awaiter(this, void 0, void 0, function* () {
7206
- let { api, entity: data, entities, override, req: reqParams, migrated, skipSourcePush } = params;
7206
+ let { api, entity: data, entities, override, req: reqParams, migrated, skipSourcePush, expandLocation } = params;
7207
7207
  if (migrated == null || migrated == undefined) {
7208
7208
  // Changed to default = true. 18th April 2025.
7209
7209
  migrated = true;
@@ -7229,9 +7229,16 @@ var Entity;
7229
7229
  if (!api) {
7230
7230
  api = ENVIRONMENT.Api().GetBruceApi();
7231
7231
  }
7232
- let reqUrl = "v3/entities";
7232
+ const urlParams = new URLSearchParams();
7233
7233
  if (skipSourcePushParam) {
7234
- reqUrl += `?SkipSourcePush=${encodeURIComponent(skipSourcePushParam)}`;
7234
+ urlParams.set("SkipSourcePush", skipSourcePushParam);
7235
+ }
7236
+ if (expandLocation) {
7237
+ urlParams.set("Expand", "location");
7238
+ }
7239
+ let reqUrl = "v3/entities";
7240
+ if (urlParams.toString()) {
7241
+ reqUrl += `?${urlParams.toString()}`;
7235
7242
  }
7236
7243
  const reqBody = {
7237
7244
  Items: entities,
@@ -7295,6 +7302,9 @@ var Entity;
7295
7302
  if (skipSourcePushParam) {
7296
7303
  reqUrl += `&SkipSourcePush=${encodeURIComponent(skipSourcePushParam)}`;
7297
7304
  }
7305
+ if (expandLocation) {
7306
+ reqUrl += "&Expand=location";
7307
+ }
7298
7308
  const res = yield api.POST(reqUrl, data, Api.PrepReqParams(reqParams));
7299
7309
  api.Cache.RemoveByContains(GetContainsKey(data.Bruce.ID));
7300
7310
  EntityHistoricData.ClearCacheByEntityIds(api, [data.Bruce.ID]);
@@ -14042,7 +14052,7 @@ var DataLab;
14042
14052
  DataLab.Get = Get;
14043
14053
  /**
14044
14054
  * Suggests a DataLab query from natural language prompt.
14045
- * This calls: POST entities/datalab/suggestDataLabQueryByPrompt
14055
+ * This calls: POST entities/datalab/suggestQuery
14046
14056
  */
14047
14057
  function SuggestDataLabQueryByPrompt(params) {
14048
14058
  var _a, _b, _c;
@@ -14054,7 +14064,7 @@ var DataLab;
14054
14064
  if (!api) {
14055
14065
  api = ENVIRONMENT.Api().GetBruceApi();
14056
14066
  }
14057
- const res = yield api.POST("entities/datalab/suggestDataLabQueryByPrompt", body, req ? Api.PrepReqParams(req) : undefined);
14067
+ const res = yield api.POST("entities/datalab/suggestQuery", body, req ? Api.PrepReqParams(req) : undefined);
14058
14068
  const raw = res;
14059
14069
  return {
14060
14070
  query: (_c = (_b = (_a = raw === null || raw === void 0 ? void 0 : raw.Query) !== null && _a !== void 0 ? _a : raw === null || raw === void 0 ? void 0 : raw.SuggestedQuery) !== null && _b !== void 0 ? _b : raw === null || raw === void 0 ? void 0 : raw.DataLabQuery) !== null && _c !== void 0 ? _c : raw,
@@ -14765,6 +14775,16 @@ var Style;
14765
14775
  EEffectType["None"] = "NONE";
14766
14776
  EEffectType["Water"] = "WATER";
14767
14777
  })(EEffectType = Style.EEffectType || (Style.EEffectType = {}));
14778
+ /**
14779
+ * A look a renderer may put over a point, on top of the point or icon itself.
14780
+ * Default is "NONE".
14781
+ */
14782
+ let EPointEffectType;
14783
+ (function (EPointEffectType) {
14784
+ EPointEffectType["None"] = "NONE";
14785
+ // Marks which way the Entity faces, read from its Bruce.Transform.
14786
+ EPointEffectType["Orientation"] = "ORIENTATION";
14787
+ })(EPointEffectType = Style.EPointEffectType || (Style.EPointEffectType = {}));
14768
14788
  /**
14769
14789
  * Returns a list of styles.
14770
14790
  * @param params
@@ -19486,10 +19506,91 @@ var UIMarkup;
19486
19506
  UIMarkup.GetListCacheKey = GetListCacheKey;
19487
19507
  })(UIMarkup || (UIMarkup = {}));
19488
19508
 
19489
- const DEFAULT_JOB_POLL_INTERVAL_MS = 1000;
19490
- const DEFAULT_JOB_POLL_TIMEOUT_MS = 10 * 60 * 1000; // match server timeout (10 minutes)
19509
+ /**
19510
+ * Wire contract of the Navigator chat-event protocol: the JSON-RPC methods, the `eventType` values the
19511
+ * frontend sends, the step types and tracking kinds the backend broadcasts, and the parser for what the
19512
+ * backend sends back. Values are fixed by deployed servers and frontends; the shared fixtures in the
19513
+ * bruce-chat repository (ops/chat-contract-fixtures) pin them for every repository. This module has no
19514
+ * runtime imports so any chat module can depend on it. Exported to consumers through ./navigator-chat.
19515
+ */
19516
+ const NAVIGATOR_CHAT_RPC_METHOD_CHAT_EVENT = "chat/event";
19517
+ const NAVIGATOR_CHAT_RPC_METHOD_SERVER_READY = "server_ready";
19518
+ const NAVIGATOR_CHAT_RPC_METHOD_SERVER_READY_ACK = "server_ready_ack";
19519
+ const NAVIGATOR_CHAT_RPC_METHOD_TOOLS_CALL = "tools/call";
19520
+ const NAVIGATOR_CHAT_RPC_METHOD_TOOL_RESPONSE = "tool_response";
19521
+ /** `eventType` values the frontend sends to the backend inside `chat/event`. */
19491
19522
  const NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED = "entity_highlight_applied";
19492
19523
  const NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED = "scene_context_prefetched";
19524
+ const NAVIGATOR_CHAT_EVENT_PRESENTATION_PLAN_APPLIED = "presentation_plan_applied";
19525
+ /** Legacy bare event (field `event`, no step `type`) the backend broadcasts when a session is cleared. */
19526
+ const NAVIGATOR_CHAT_LEGACY_EVENT_SESSION_CLEARED = "SESSION_CLEARED";
19527
+ /** Step `type` values the backend broadcasts that the frontend routes specially. */
19528
+ const NAVIGATOR_CHAT_STEP_TRACKING_UPDATE = "TRACKING_UPDATE";
19529
+ const NAVIGATOR_CHAT_STEP_JOB_COMPLETE = "JOB_COMPLETE";
19530
+ const NAVIGATOR_CHAT_STEP_QUEUED_INPUT = "QUEUED_INPUT";
19531
+ const NAVIGATOR_CHAT_STEP_LLM_CONTEXT = "LLM_CONTEXT";
19532
+ /** `trackingKind` of the plan step the backend emits; the receipts reuse the event names above. */
19533
+ const NAVIGATOR_CHAT_TRACKING_KIND_PRESENTATION_PLAN = "presentation_plan";
19534
+ /**
19535
+ * Job statuses that mean the job did not run to its end. The WebSocket step path and the streaming
19536
+ * (SSE) path have always recognised slightly different sets - the stream path never treated
19537
+ * INTERRUPTED as cancellation - so each keeps its own list.
19538
+ */
19539
+ const NAVIGATOR_CHAT_CANCELLED_JOB_STATUSES = {
19540
+ chatEvent: ["CANCELLED", "CANCELED", "INTERRUPTED", "PAUSED"],
19541
+ chatStream: ["CANCELLED", "CANCELED", "PAUSED"]
19542
+ };
19543
+ const CLIENT_EVENT_TYPES = [
19544
+ NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED,
19545
+ NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED,
19546
+ NAVIGATOR_CHAT_EVENT_PRESENTATION_PLAN_APPLIED
19547
+ ];
19548
+ /** True for an `eventType` the backend acts on. Matching is exact and case-sensitive. */
19549
+ function isNavigatorChatClientEventType(value) {
19550
+ return typeof value === "string" && CLIENT_EVENT_TYPES.indexOf(value) !== -1;
19551
+ }
19552
+ /** True when a job status means the job was cancelled, interrupted or paused on that path. */
19553
+ function isNavigatorChatCancelledJobStatus(status, path = "chatEvent") {
19554
+ return typeof status === "string"
19555
+ && NAVIGATOR_CHAT_CANCELLED_JOB_STATUSES[path].indexOf(status) !== -1;
19556
+ }
19557
+ /** The JSON-RPC message that carries a frontend chat event to the backend. */
19558
+ function buildNavigatorChatEventMessage(event) {
19559
+ return {
19560
+ jsonrpc: "2.0",
19561
+ method: NAVIGATOR_CHAT_RPC_METHOD_CHAT_EVENT,
19562
+ params: event
19563
+ };
19564
+ }
19565
+ /**
19566
+ * Classifies a raw WebSocket message from the backend. A string is parsed as JSON and a parse failure
19567
+ * throws, so the caller keeps deciding how to report an invalid message. A `chat/event` without params
19568
+ * is delivered as an empty event rather than dropped, as older servers relied on.
19569
+ */
19570
+ function parseNavigatorChatServerMessage(raw) {
19571
+ var _a, _b, _c;
19572
+ const message = typeof raw === "string" ? JSON.parse(raw) : raw;
19573
+ const method = message === null || message === void 0 ? void 0 : message.method;
19574
+ if (method === NAVIGATOR_CHAT_RPC_METHOD_CHAT_EVENT) {
19575
+ return { kind: "chat_event", event: ((_a = message === null || message === void 0 ? void 0 : message.params) !== null && _a !== void 0 ? _a : {}) };
19576
+ }
19577
+ if (method !== NAVIGATOR_CHAT_RPC_METHOD_TOOLS_CALL) {
19578
+ return { kind: "ignored", method, message };
19579
+ }
19580
+ const name = (_b = message === null || message === void 0 ? void 0 : message.params) === null || _b === void 0 ? void 0 : _b.name;
19581
+ if (!name) {
19582
+ return { kind: "invalid_tool_call", message };
19583
+ }
19584
+ return {
19585
+ kind: "tool_call",
19586
+ name,
19587
+ args: (_c = message === null || message === void 0 ? void 0 : message.params) === null || _c === void 0 ? void 0 : _c.arguments,
19588
+ messageId: message === null || message === void 0 ? void 0 : message.id
19589
+ };
19590
+ }
19591
+
19592
+ const DEFAULT_JOB_POLL_INTERVAL_MS = 1000;
19593
+ const DEFAULT_JOB_POLL_TIMEOUT_MS = 10 * 60 * 1000; // match server timeout (10 minutes)
19493
19594
  const DEFAULT_BASE_URL = "http://localhost:8888";
19494
19595
  /**
19495
19596
  * Lightweight client for the Navigator MCP chat HTTP endpoints.
@@ -19746,7 +19847,7 @@ class NavigatorMcpWebSocketClient {
19746
19847
  return;
19747
19848
  (_b = (_a = this.logger()).log) === null || _b === void 0 ? void 0 : _b.call(_a, "[NavigatorMcpWS] Connected");
19748
19849
  this.isConnecting = false;
19749
- this.send({ method: "server_ready" });
19850
+ this.send({ method: NAVIGATOR_CHAT_RPC_METHOD_SERVER_READY });
19750
19851
  this.flushResponses();
19751
19852
  (_d = (_c = this.options).onOpen) === null || _d === void 0 ? void 0 : _d.call(_c, event);
19752
19853
  };
@@ -19812,11 +19913,7 @@ class NavigatorMcpWebSocketClient {
19812
19913
  this.currentAuth = auth;
19813
19914
  }
19814
19915
  sendChatEvent(event) {
19815
- this.send({
19816
- jsonrpc: "2.0",
19817
- method: "chat/event",
19818
- params: event
19819
- });
19916
+ this.send(buildNavigatorChatEventMessage(event));
19820
19917
  }
19821
19918
  logger() {
19822
19919
  var _a;
@@ -19853,27 +19950,25 @@ class NavigatorMcpWebSocketClient {
19853
19950
  return urlInstance.toString();
19854
19951
  }
19855
19952
  handleMessage(raw) {
19856
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
19953
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
19857
19954
  return __awaiter(this, void 0, void 0, function* () {
19858
19955
  try {
19859
- const message = typeof raw === "string" ? JSON.parse(raw) : raw;
19860
- const method = message === null || message === void 0 ? void 0 : message.method;
19861
- if (method === "chat/event") {
19862
- const payload = ((_a = message === null || message === void 0 ? void 0 : message.params) !== null && _a !== void 0 ? _a : {});
19863
- (_c = (_b = this.options).onChatEvent) === null || _c === void 0 ? void 0 : _c.call(_b, payload);
19956
+ const parsed = parseNavigatorChatServerMessage(raw);
19957
+ if (parsed.kind === "chat_event") {
19958
+ (_b = (_a = this.options).onChatEvent) === null || _b === void 0 ? void 0 : _b.call(_a, parsed.event);
19864
19959
  return;
19865
19960
  }
19866
- if (method !== "tools/call") {
19867
- (_e = (_d = this.logger()).debug) === null || _e === void 0 ? void 0 : _e.call(_d, "[NavigatorMcpWS] Ignoring unsupported message", message);
19961
+ if (parsed.kind === "ignored") {
19962
+ (_d = (_c = this.logger()).debug) === null || _d === void 0 ? void 0 : _d.call(_c, "[NavigatorMcpWS] Ignoring unsupported message", parsed.message);
19868
19963
  return;
19869
19964
  }
19870
- const toolName = (_f = message === null || message === void 0 ? void 0 : message.params) === null || _f === void 0 ? void 0 : _f.name;
19871
- const toolArgs = (_g = message === null || message === void 0 ? void 0 : message.params) === null || _g === void 0 ? void 0 : _g.arguments;
19872
- const messageId = message === null || message === void 0 ? void 0 : message.id;
19873
- if (!toolName) {
19874
- (_j = (_h = this.logger()).warn) === null || _j === void 0 ? void 0 : _j.call(_h, "[NavigatorMcpWS] Received tool call without name", message);
19965
+ if (parsed.kind === "invalid_tool_call") {
19966
+ (_f = (_e = this.logger()).warn) === null || _f === void 0 ? void 0 : _f.call(_e, "[NavigatorMcpWS] Received tool call without name", parsed.message);
19875
19967
  return;
19876
19968
  }
19969
+ const toolName = parsed.name;
19970
+ const toolArgs = parsed.args;
19971
+ const messageId = parsed.messageId;
19877
19972
  let result;
19878
19973
  const generation = this.responseGeneration;
19879
19974
  try {
@@ -19884,21 +19979,21 @@ class NavigatorMcpWebSocketClient {
19884
19979
  });
19885
19980
  }
19886
19981
  catch (error) {
19887
- (_l = (_k = this.logger()).error) === null || _l === void 0 ? void 0 : _l.call(_k, "[NavigatorMcpWS] Tool handler threw", error);
19982
+ (_h = (_g = this.logger()).error) === null || _h === void 0 ? void 0 : _h.call(_g, "[NavigatorMcpWS] Tool handler threw", error);
19888
19983
  result = `Error: ${error instanceof Error ? error.message : String(error)}`;
19889
19984
  }
19890
19985
  if (generation !== this.responseGeneration) {
19891
- (_o = (_m = this.logger()).warn) === null || _o === void 0 ? void 0 : _o.call(_m, "[NavigatorMcpWS] Discarding result from a previous session", messageId);
19986
+ (_k = (_j = this.logger()).warn) === null || _k === void 0 ? void 0 : _k.call(_j, "[NavigatorMcpWS] Discarding result from a previous session", messageId);
19892
19987
  return;
19893
19988
  }
19894
19989
  this.sendResponse({
19895
- method: "tool_response",
19990
+ method: NAVIGATOR_CHAT_RPC_METHOD_TOOL_RESPONSE,
19896
19991
  id: messageId,
19897
19992
  result
19898
19993
  });
19899
19994
  }
19900
19995
  catch (error) {
19901
- (_q = (_p = this.logger()).error) === null || _q === void 0 ? void 0 : _q.call(_p, "[NavigatorMcpWS] Invalid message", error);
19996
+ (_m = (_l = this.logger()).error) === null || _m === void 0 ? void 0 : _m.call(_l, "[NavigatorMcpWS] Invalid message", error);
19902
19997
  }
19903
19998
  });
19904
19999
  }
@@ -22123,6 +22218,10 @@ var ProjectViewBookmark;
22123
22218
  EContentType["WEB_3D_MODEL_SPACE"] = "WEB_3D_MODEL_SPACE";
22124
22219
  EContentType["WEB_3D_SPLIT_PLUGIN"] = "WEB_3D_SPLIT_PLUGIN";
22125
22220
  EContentType["IFRAME"] = "IFRAME";
22221
+ // Renders a dashboard in place of the scene.
22222
+ EContentType["DASHBOARD"] = "DASHBOARD";
22223
+ // Renders a diagram (2D graph view) in place of the scene.
22224
+ EContentType["DIAGRAM"] = "DIAGRAM";
22126
22225
  })(EContentType = ProjectViewBookmark.EContentType || (ProjectViewBookmark.EContentType = {}));
22127
22226
  /**
22128
22227
  * Gets a bookmark record.
@@ -24858,6 +24957,73 @@ var WorkflowItem;
24858
24957
  EOrderBy["THUMBNAIL_CLIENT_FILE_ID"] = "ThumbnailClientFileID";
24859
24958
  EOrderBy["RANDOM"] = "RANDOM";
24860
24959
  })(EOrderBy = WorkflowItem.EOrderBy || (WorkflowItem.EOrderBy = {}));
24960
+ /**
24961
+ * Gets the history timeline of a Workflow Item, newest first.
24962
+ * Route: GET workflow/item/{workflow_item_id}/history
24963
+ */
24964
+ function GetHistoryList(params) {
24965
+ return __awaiter(this, void 0, void 0, function* () {
24966
+ let { api, workflowItemId, req } = params;
24967
+ if (isInvalidId(workflowItemId)) {
24968
+ throw ("Workflow Item ID is required.");
24969
+ }
24970
+ if (!api) {
24971
+ api = ENVIRONMENT.Api().GetBruceApi();
24972
+ }
24973
+ const key = GetHistoryListCacheKey(workflowItemId);
24974
+ const cache = api.GetCacheItem(key, req);
24975
+ if (cache === null || cache === void 0 ? void 0 : cache.found) {
24976
+ return cache.data;
24977
+ }
24978
+ const request = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
24979
+ try {
24980
+ const data = yield api.GET(`workflow/item/${workflowItemId}/history`, Api.PrepReqParams(req));
24981
+ res(ParseHistoryListResponse(data));
24982
+ }
24983
+ catch (e) {
24984
+ rej(e);
24985
+ }
24986
+ }));
24987
+ api.SetCacheItem({ key, value: request, req });
24988
+ return request;
24989
+ });
24990
+ }
24991
+ WorkflowItem.GetHistoryList = GetHistoryList;
24992
+ /**
24993
+ * Gets one history record of a Workflow Item.
24994
+ * Route: GET workflow/item/{workflow_item_id}/history/{workflow_item_history_id}
24995
+ */
24996
+ function GetHistory(params) {
24997
+ return __awaiter(this, void 0, void 0, function* () {
24998
+ let { api, workflowItemId, workflowItemHistoryId, req } = params;
24999
+ if (isInvalidId(workflowItemId)) {
25000
+ throw ("Workflow Item ID is required.");
25001
+ }
25002
+ if (isInvalidId(workflowItemHistoryId)) {
25003
+ throw ("Workflow Item History ID is required.");
25004
+ }
25005
+ if (!api) {
25006
+ api = ENVIRONMENT.Api().GetBruceApi();
25007
+ }
25008
+ const key = GetHistoryCacheKey(workflowItemId, workflowItemHistoryId);
25009
+ const cache = api.GetCacheItem(key, req);
25010
+ if (cache === null || cache === void 0 ? void 0 : cache.found) {
25011
+ return cache.data;
25012
+ }
25013
+ const request = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
25014
+ try {
25015
+ const data = yield api.GET(`workflow/item/${workflowItemId}/history/${workflowItemHistoryId}`, Api.PrepReqParams(req));
25016
+ res({ history: ParseHistoryResponse(data) });
25017
+ }
25018
+ catch (e) {
25019
+ rej(e);
25020
+ }
25021
+ }));
25022
+ api.SetCacheItem({ key, value: request, req });
25023
+ return request;
25024
+ });
25025
+ }
25026
+ WorkflowItem.GetHistory = GetHistory;
24861
25027
  function Get(params) {
24862
25028
  return __awaiter(this, void 0, void 0, function* () {
24863
25029
  let { api, workflowItemId, req } = params;
@@ -25142,10 +25308,41 @@ var WorkflowItem;
25142
25308
  return result;
25143
25309
  }
25144
25310
  WorkflowItem.ParseStatisticsResponse = ParseStatisticsResponse;
25311
+ function ParseHistoryResponse(response) {
25312
+ var _a;
25313
+ const parsed = parseObject$5(response);
25314
+ const parsedResult = (_a = parseObject$5(parsed === null || parsed === void 0 ? void 0 : parsed.Result)) !== null && _a !== void 0 ? _a : parsed === null || parsed === void 0 ? void 0 : parsed.Result;
25315
+ return parsedResult !== null && parsedResult !== void 0 ? parsedResult : parsed;
25316
+ }
25317
+ WorkflowItem.ParseHistoryResponse = ParseHistoryResponse;
25318
+ function ParseHistoryListResponse(response) {
25319
+ var _a;
25320
+ const parsed = parseObject$5(response);
25321
+ const parsedResult = (_a = parseObject$5(parsed === null || parsed === void 0 ? void 0 : parsed.Result)) !== null && _a !== void 0 ? _a : parsed === null || parsed === void 0 ? void 0 : parsed.Result;
25322
+ const source = parsedResult !== null && parsedResult !== void 0 ? parsedResult : parsed;
25323
+ const items = Array.isArray(source)
25324
+ ? source
25325
+ : Array.isArray(source === null || source === void 0 ? void 0 : source.Items)
25326
+ ? source.Items
25327
+ : [];
25328
+ return {
25329
+ items,
25330
+ totalCount: source === null || source === void 0 ? void 0 : source.TotalCount
25331
+ };
25332
+ }
25333
+ WorkflowItem.ParseHistoryListResponse = ParseHistoryListResponse;
25145
25334
  function GetCacheKey(id) {
25146
25335
  return `${Api.ECacheKey.WorkflowItem}${Api.ECacheKey.Id}${id}`;
25147
25336
  }
25148
25337
  WorkflowItem.GetCacheKey = GetCacheKey;
25338
+ function GetHistoryListCacheKey(workflowItemId) {
25339
+ return `${Api.ECacheKey.WorkflowItem}${Api.ECacheKey.Id}${workflowItemId}${Api.ECacheKey.ListId}history`;
25340
+ }
25341
+ WorkflowItem.GetHistoryListCacheKey = GetHistoryListCacheKey;
25342
+ function GetHistoryCacheKey(workflowItemId, workflowItemHistoryId) {
25343
+ return `${Api.ECacheKey.WorkflowItem}${Api.ECacheKey.Id}${workflowItemId}${Api.ECacheKey.ListId}history${Api.ECacheKey.Id}${workflowItemHistoryId}`;
25344
+ }
25345
+ WorkflowItem.GetHistoryCacheKey = GetHistoryCacheKey;
25149
25346
  function GetListCacheKey(params) {
25150
25347
  return `${Api.ECacheKey.WorkflowItem}${Api.ECacheKey.ListId}${BuildListUrl(params)}`;
25151
25348
  }
@@ -25672,7 +25869,7 @@ function getFirstWrappedArray(data, wrapperKeys) {
25672
25869
  }
25673
25870
 
25674
25871
  // This is updated with the package.json version on build.
25675
- const VERSION = "7.1.124";
25872
+ const VERSION = "7.1.127";
25676
25873
 
25677
- export { VERSION, Account, AccountAudit, AccountConcept, AccountFeatures, AccountInvite, AccountLimits, AccountTemplate, AccountType, AnnDocument, AbstractApi, Api, ApiGetters, BruceApi, GlobalApi, GuardianApi, Assembly, Calculator, ChangeSet, ClientFile, ClientFileFolder, ClientFileValueMap, Bounds, BruceEvent, BruceVariable, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, RequestLane, GeoJson, Geometry, LRUCache, UTC, CustomForm, DashboardView, DataFeed, DataLab, DataLabGroup, DataSource, DataTransform, Comment, Entity, EntityAttachment, EntityAttachmentType, EntityAttribute, EntityComment, EntityCoords, EntityHistoricData, EntityLink, EntityLod, EntityLodCategory, EntityRelation, EntityRelationType, EntitySource, EntityTableView, EntityTag, EntityType, EntityTypeRelation, EntityTypeSource, EntityTypeTrigger, Ontology, OntologyDocument, ENVIRONMENT, ExportBrz, ExportCsv, ExportNsx, ExportUsd, Hexbin, ImportAssembly, ImportCad, ImportCsv, ImportGeoJson, ImportJson, ImportKml, ImportLcc, ImportTif, ImportedFile, Uploader, Markup, UIMarkup, NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED, NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED, NavigatorChatClient, NavigatorMcpWebSocketClient, Plugin, PluginAiTool, ProgramKey, MenuItem, ProjectView, ProjectViewBookmark, ProjectViewBookmarkGroup, ProjectViewLegacy, ProjectViewLegacyBookmark, ProjectViewLegacyTile, ProjectViewTile, ZoomControl, Scenario, HostingLocation, MessageBroker, PendingAction, RecordChangeFeed, Style, Tileset, Tracking, Permission, Session, User, UserGroup, UserMfaMethod, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, WorkflowItem, WorkflowSchedule, WorkflowType, WorkflowItemType };
25874
+ export { VERSION, Account, AccountAudit, AccountConcept, AccountFeatures, AccountInvite, AccountLimits, AccountTemplate, AccountType, AnnDocument, AbstractApi, Api, ApiGetters, BruceApi, GlobalApi, GuardianApi, Assembly, Calculator, ChangeSet, ClientFile, ClientFileFolder, ClientFileValueMap, Bounds, BruceEvent, BruceVariable, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, RequestLane, GeoJson, Geometry, LRUCache, UTC, CustomForm, DashboardView, DataFeed, DataLab, DataLabGroup, DataSource, DataTransform, Comment, Entity, EntityAttachment, EntityAttachmentType, EntityAttribute, EntityComment, EntityCoords, EntityHistoricData, EntityLink, EntityLod, EntityLodCategory, EntityRelation, EntityRelationType, EntitySource, EntityTableView, EntityTag, EntityType, EntityTypeRelation, EntityTypeSource, EntityTypeTrigger, Ontology, OntologyDocument, ENVIRONMENT, ExportBrz, ExportCsv, ExportNsx, ExportUsd, Hexbin, ImportAssembly, ImportCad, ImportCsv, ImportGeoJson, ImportJson, ImportKml, ImportLcc, ImportTif, ImportedFile, Uploader, Markup, UIMarkup, NavigatorChatClient, NAVIGATOR_CHAT_RPC_METHOD_CHAT_EVENT, NAVIGATOR_CHAT_RPC_METHOD_SERVER_READY, NAVIGATOR_CHAT_RPC_METHOD_SERVER_READY_ACK, NAVIGATOR_CHAT_RPC_METHOD_TOOLS_CALL, NAVIGATOR_CHAT_RPC_METHOD_TOOL_RESPONSE, NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED, NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED, NAVIGATOR_CHAT_EVENT_PRESENTATION_PLAN_APPLIED, NAVIGATOR_CHAT_LEGACY_EVENT_SESSION_CLEARED, NAVIGATOR_CHAT_STEP_TRACKING_UPDATE, NAVIGATOR_CHAT_STEP_JOB_COMPLETE, NAVIGATOR_CHAT_STEP_QUEUED_INPUT, NAVIGATOR_CHAT_STEP_LLM_CONTEXT, NAVIGATOR_CHAT_TRACKING_KIND_PRESENTATION_PLAN, NAVIGATOR_CHAT_CANCELLED_JOB_STATUSES, isNavigatorChatClientEventType, isNavigatorChatCancelledJobStatus, buildNavigatorChatEventMessage, parseNavigatorChatServerMessage, NavigatorMcpWebSocketClient, Plugin, PluginAiTool, ProgramKey, MenuItem, ProjectView, ProjectViewBookmark, ProjectViewBookmarkGroup, ProjectViewLegacy, ProjectViewLegacyBookmark, ProjectViewLegacyTile, ProjectViewTile, ZoomControl, Scenario, HostingLocation, MessageBroker, PendingAction, RecordChangeFeed, Style, Tileset, Tracking, Permission, Session, User, UserGroup, UserMfaMethod, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, WorkflowItem, WorkflowSchedule, WorkflowType, WorkflowItemType };
25678
25875
  //# sourceMappingURL=bruce-models.es5.js.map