bruce-models 7.1.126 → 7.1.128
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 +2 -97
- package/dist/bruce-models.es5.js +255 -38
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +272 -38
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/account/account-audit.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/data-lab/data-lab.js +2 -2
- package/dist/lib/data-lab/data-lab.js.map +1 -1
- package/dist/lib/mcp/navigator-chat-contract.js +90 -0
- package/dist/lib/mcp/navigator-chat-contract.js.map +1 -0
- package/dist/lib/mcp/navigator-chat.js +18 -3
- package/dist/lib/mcp/navigator-chat.js.map +1 -1
- package/dist/lib/mcp/navigator-mcp-websocket.js +18 -23
- package/dist/lib/mcp/navigator-mcp-websocket.js.map +1 -1
- package/dist/lib/project/project-view-bookmark.js +4 -0
- package/dist/lib/project/project-view-bookmark.js.map +1 -1
- package/dist/lib/style/style.js +10 -0
- package/dist/lib/style/style.js.map +1 -1
- package/dist/lib/user/user.js +39 -9
- package/dist/lib/user/user.js.map +1 -1
- package/dist/lib/workflow/workflow-item.js +98 -0
- package/dist/lib/workflow/workflow-item.js.map +1 -1
- package/dist/types/account/account-audit.d.ts +2 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/data-lab/data-lab.d.ts +2 -1
- package/dist/types/mcp/navigator-chat-contract.d.ts +68 -0
- package/dist/types/mcp/navigator-chat.d.ts +17 -4
- package/dist/types/project/project-view-bookmark.d.ts +6 -2
- package/dist/types/project/project-view.d.ts +1 -1
- package/dist/types/style/style.d.ts +15 -0
- package/dist/types/user/user.d.ts +8 -2
- package/dist/types/workflow/workflow-item.d.ts +47 -0
- 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
|
-
|
|
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).
|
package/dist/bruce-models.es5.js
CHANGED
|
@@ -14052,7 +14052,7 @@ var DataLab;
|
|
|
14052
14052
|
DataLab.Get = Get;
|
|
14053
14053
|
/**
|
|
14054
14054
|
* Suggests a DataLab query from natural language prompt.
|
|
14055
|
-
* This calls: POST entities/datalab/
|
|
14055
|
+
* This calls: POST entities/datalab/suggestQuery
|
|
14056
14056
|
*/
|
|
14057
14057
|
function SuggestDataLabQueryByPrompt(params) {
|
|
14058
14058
|
var _a, _b, _c;
|
|
@@ -14064,7 +14064,7 @@ var DataLab;
|
|
|
14064
14064
|
if (!api) {
|
|
14065
14065
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
14066
14066
|
}
|
|
14067
|
-
const res = yield api.POST("entities/datalab/
|
|
14067
|
+
const res = yield api.POST("entities/datalab/suggestQuery", body, req ? Api.PrepReqParams(req) : undefined);
|
|
14068
14068
|
const raw = res;
|
|
14069
14069
|
return {
|
|
14070
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,
|
|
@@ -14775,6 +14775,16 @@ var Style;
|
|
|
14775
14775
|
EEffectType["None"] = "NONE";
|
|
14776
14776
|
EEffectType["Water"] = "WATER";
|
|
14777
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 = {}));
|
|
14778
14788
|
/**
|
|
14779
14789
|
* Returns a list of styles.
|
|
14780
14790
|
* @param params
|
|
@@ -19496,10 +19506,91 @@ var UIMarkup;
|
|
|
19496
19506
|
UIMarkup.GetListCacheKey = GetListCacheKey;
|
|
19497
19507
|
})(UIMarkup || (UIMarkup = {}));
|
|
19498
19508
|
|
|
19499
|
-
|
|
19500
|
-
|
|
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`. */
|
|
19501
19522
|
const NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED = "entity_highlight_applied";
|
|
19502
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)
|
|
19503
19594
|
const DEFAULT_BASE_URL = "http://localhost:8888";
|
|
19504
19595
|
/**
|
|
19505
19596
|
* Lightweight client for the Navigator MCP chat HTTP endpoints.
|
|
@@ -19756,7 +19847,7 @@ class NavigatorMcpWebSocketClient {
|
|
|
19756
19847
|
return;
|
|
19757
19848
|
(_b = (_a = this.logger()).log) === null || _b === void 0 ? void 0 : _b.call(_a, "[NavigatorMcpWS] Connected");
|
|
19758
19849
|
this.isConnecting = false;
|
|
19759
|
-
this.send({ method:
|
|
19850
|
+
this.send({ method: NAVIGATOR_CHAT_RPC_METHOD_SERVER_READY });
|
|
19760
19851
|
this.flushResponses();
|
|
19761
19852
|
(_d = (_c = this.options).onOpen) === null || _d === void 0 ? void 0 : _d.call(_c, event);
|
|
19762
19853
|
};
|
|
@@ -19822,11 +19913,7 @@ class NavigatorMcpWebSocketClient {
|
|
|
19822
19913
|
this.currentAuth = auth;
|
|
19823
19914
|
}
|
|
19824
19915
|
sendChatEvent(event) {
|
|
19825
|
-
this.send(
|
|
19826
|
-
jsonrpc: "2.0",
|
|
19827
|
-
method: "chat/event",
|
|
19828
|
-
params: event
|
|
19829
|
-
});
|
|
19916
|
+
this.send(buildNavigatorChatEventMessage(event));
|
|
19830
19917
|
}
|
|
19831
19918
|
logger() {
|
|
19832
19919
|
var _a;
|
|
@@ -19863,27 +19950,25 @@ class NavigatorMcpWebSocketClient {
|
|
|
19863
19950
|
return urlInstance.toString();
|
|
19864
19951
|
}
|
|
19865
19952
|
handleMessage(raw) {
|
|
19866
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m
|
|
19953
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
19867
19954
|
return __awaiter(this, void 0, void 0, function* () {
|
|
19868
19955
|
try {
|
|
19869
|
-
const
|
|
19870
|
-
|
|
19871
|
-
|
|
19872
|
-
const payload = ((_a = message === null || message === void 0 ? void 0 : message.params) !== null && _a !== void 0 ? _a : {});
|
|
19873
|
-
(_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);
|
|
19874
19959
|
return;
|
|
19875
19960
|
}
|
|
19876
|
-
if (
|
|
19877
|
-
(
|
|
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);
|
|
19878
19963
|
return;
|
|
19879
19964
|
}
|
|
19880
|
-
|
|
19881
|
-
|
|
19882
|
-
const messageId = message === null || message === void 0 ? void 0 : message.id;
|
|
19883
|
-
if (!toolName) {
|
|
19884
|
-
(_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);
|
|
19885
19967
|
return;
|
|
19886
19968
|
}
|
|
19969
|
+
const toolName = parsed.name;
|
|
19970
|
+
const toolArgs = parsed.args;
|
|
19971
|
+
const messageId = parsed.messageId;
|
|
19887
19972
|
let result;
|
|
19888
19973
|
const generation = this.responseGeneration;
|
|
19889
19974
|
try {
|
|
@@ -19894,21 +19979,21 @@ class NavigatorMcpWebSocketClient {
|
|
|
19894
19979
|
});
|
|
19895
19980
|
}
|
|
19896
19981
|
catch (error) {
|
|
19897
|
-
(
|
|
19982
|
+
(_h = (_g = this.logger()).error) === null || _h === void 0 ? void 0 : _h.call(_g, "[NavigatorMcpWS] Tool handler threw", error);
|
|
19898
19983
|
result = `Error: ${error instanceof Error ? error.message : String(error)}`;
|
|
19899
19984
|
}
|
|
19900
19985
|
if (generation !== this.responseGeneration) {
|
|
19901
|
-
(
|
|
19986
|
+
(_k = (_j = this.logger()).warn) === null || _k === void 0 ? void 0 : _k.call(_j, "[NavigatorMcpWS] Discarding result from a previous session", messageId);
|
|
19902
19987
|
return;
|
|
19903
19988
|
}
|
|
19904
19989
|
this.sendResponse({
|
|
19905
|
-
method:
|
|
19990
|
+
method: NAVIGATOR_CHAT_RPC_METHOD_TOOL_RESPONSE,
|
|
19906
19991
|
id: messageId,
|
|
19907
19992
|
result
|
|
19908
19993
|
});
|
|
19909
19994
|
}
|
|
19910
19995
|
catch (error) {
|
|
19911
|
-
(
|
|
19996
|
+
(_m = (_l = this.logger()).error) === null || _m === void 0 ? void 0 : _m.call(_l, "[NavigatorMcpWS] Invalid message", error);
|
|
19912
19997
|
}
|
|
19913
19998
|
});
|
|
19914
19999
|
}
|
|
@@ -22133,6 +22218,10 @@ var ProjectViewBookmark;
|
|
|
22133
22218
|
EContentType["WEB_3D_MODEL_SPACE"] = "WEB_3D_MODEL_SPACE";
|
|
22134
22219
|
EContentType["WEB_3D_SPLIT_PLUGIN"] = "WEB_3D_SPLIT_PLUGIN";
|
|
22135
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";
|
|
22136
22225
|
})(EContentType = ProjectViewBookmark.EContentType || (ProjectViewBookmark.EContentType = {}));
|
|
22137
22226
|
/**
|
|
22138
22227
|
* Gets a bookmark record.
|
|
@@ -23911,9 +24000,10 @@ var User;
|
|
|
23911
24000
|
* @param accountId
|
|
23912
24001
|
* @param exclusive
|
|
23913
24002
|
* @param search
|
|
24003
|
+
* @param expand
|
|
23914
24004
|
* @returns
|
|
23915
24005
|
*/
|
|
23916
|
-
function GetListCacheKey(sessionId, accountId, exclusive, search) {
|
|
24006
|
+
function GetListCacheKey(sessionId, accountId, exclusive, search, expand) {
|
|
23917
24007
|
if (!exclusive) {
|
|
23918
24008
|
exclusive = false;
|
|
23919
24009
|
}
|
|
@@ -23926,7 +24016,10 @@ var User;
|
|
|
23926
24016
|
if (!accountId) {
|
|
23927
24017
|
accountId = "";
|
|
23928
24018
|
}
|
|
23929
|
-
|
|
24019
|
+
if (!expand) {
|
|
24020
|
+
expand = "";
|
|
24021
|
+
}
|
|
24022
|
+
return Api.ECacheKey.User + Api.ECacheKey.Account + Api.ECacheKey.Id + accountId + Api.ECacheKey.Id + exclusive + Api.ECacheKey.Id + search + Api.ECacheKey.Session + Api.ECacheKey.Id + sessionId + Api.ECacheKey.Id + expand;
|
|
23930
24023
|
}
|
|
23931
24024
|
LoginUser.GetListCacheKey = GetListCacheKey;
|
|
23932
24025
|
/**
|
|
@@ -23953,15 +24046,16 @@ var User;
|
|
|
23953
24046
|
*/
|
|
23954
24047
|
function GetList(params) {
|
|
23955
24048
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23956
|
-
let { api, accountId, exclusive, req: reqParams, search } = params;
|
|
24049
|
+
let { api, accountId, exclusive, req: reqParams, search, expandLastAccess } = params;
|
|
23957
24050
|
if (!api) {
|
|
23958
24051
|
api = ENVIRONMENT.Api().GetGuardianApi();
|
|
23959
24052
|
}
|
|
23960
24053
|
if (!exclusive) {
|
|
23961
24054
|
exclusive = false;
|
|
23962
24055
|
}
|
|
24056
|
+
const expand = GetListExpand(expandLastAccess);
|
|
23963
24057
|
const sessionId = api.GetSessionId();
|
|
23964
|
-
const cacheKey = GetListCacheKey(sessionId, accountId, exclusive, search);
|
|
24058
|
+
const cacheKey = GetListCacheKey(sessionId, accountId, exclusive, search, expand);
|
|
23965
24059
|
const cache = exclusive ? null : api.GetCacheItem(cacheKey, reqParams);
|
|
23966
24060
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
23967
24061
|
return cache.data;
|
|
@@ -23978,6 +24072,9 @@ var User;
|
|
|
23978
24072
|
if (exclusive) {
|
|
23979
24073
|
urlParams.append("allExcludingClientAccount", "true");
|
|
23980
24074
|
}
|
|
24075
|
+
if (expand) {
|
|
24076
|
+
urlParams.append("Expand", expand);
|
|
24077
|
+
}
|
|
23981
24078
|
const data = yield api.GET(`v3/users?${urlParams.toString()}`, reqParams);
|
|
23982
24079
|
res({
|
|
23983
24080
|
users: data.Items
|
|
@@ -24153,16 +24250,20 @@ var User;
|
|
|
24153
24250
|
* }
|
|
24154
24251
|
* @param sessionId
|
|
24155
24252
|
* @param accountId
|
|
24253
|
+
* @param expand
|
|
24156
24254
|
* @returns
|
|
24157
24255
|
*/
|
|
24158
|
-
function GetListCacheKey(sessionId, accountId) {
|
|
24256
|
+
function GetListCacheKey(sessionId, accountId, expand) {
|
|
24159
24257
|
if (!sessionId) {
|
|
24160
24258
|
sessionId = "anonymous";
|
|
24161
24259
|
}
|
|
24162
24260
|
if (!accountId) {
|
|
24163
24261
|
accountId = "";
|
|
24164
24262
|
}
|
|
24165
|
-
|
|
24263
|
+
if (!expand) {
|
|
24264
|
+
expand = "";
|
|
24265
|
+
}
|
|
24266
|
+
return Api.ECacheKey.AccessToken + Api.ECacheKey.Account + Api.ECacheKey.Id + accountId + Api.ECacheKey.Session + Api.ECacheKey.Id + sessionId + Api.ECacheKey.Id + expand;
|
|
24166
24267
|
}
|
|
24167
24268
|
AccessToken.GetListCacheKey = GetListCacheKey;
|
|
24168
24269
|
/**
|
|
@@ -24172,18 +24273,26 @@ var User;
|
|
|
24172
24273
|
*/
|
|
24173
24274
|
function GetList(params) {
|
|
24174
24275
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24175
|
-
let { api, accountId, req: reqParams } = params;
|
|
24276
|
+
let { api, accountId, expandLastAccess, req: reqParams } = params;
|
|
24277
|
+
if (!accountId) {
|
|
24278
|
+
throw ("Account ID is required.");
|
|
24279
|
+
}
|
|
24176
24280
|
if (!api) {
|
|
24177
24281
|
api = ENVIRONMENT.Api().GetGuardianApi();
|
|
24178
24282
|
}
|
|
24179
|
-
const
|
|
24283
|
+
const expand = GetListExpand(expandLastAccess);
|
|
24284
|
+
const cacheKey = GetListCacheKey(api.GetSessionId(), accountId, expand);
|
|
24180
24285
|
const cache = api.GetCacheItem(cacheKey, reqParams);
|
|
24181
24286
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
24182
24287
|
return cache.data;
|
|
24183
24288
|
}
|
|
24184
24289
|
const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
24185
24290
|
try {
|
|
24186
|
-
|
|
24291
|
+
let url = `v3/account/${accountId}/accessTokens`;
|
|
24292
|
+
if (expand) {
|
|
24293
|
+
url += "?Expand=" + expand;
|
|
24294
|
+
}
|
|
24295
|
+
const data = yield api.GET(url, reqParams);
|
|
24187
24296
|
res({
|
|
24188
24297
|
users: data.Items
|
|
24189
24298
|
});
|
|
@@ -24246,6 +24355,16 @@ var User;
|
|
|
24246
24355
|
}
|
|
24247
24356
|
AccessToken.Create = Create;
|
|
24248
24357
|
})(AccessToken = User$$1.AccessToken || (User$$1.AccessToken = {}));
|
|
24358
|
+
/**
|
|
24359
|
+
* Builds the Expand value for a user list, or undefined to leave Guardian's default.
|
|
24360
|
+
* An explicit Expand replaces the default permission expansion, so it is asked for again.
|
|
24361
|
+
*/
|
|
24362
|
+
function GetListExpand(expandLastAccess) {
|
|
24363
|
+
if (!expandLastAccess) {
|
|
24364
|
+
return undefined;
|
|
24365
|
+
}
|
|
24366
|
+
return "permission,lastAccess";
|
|
24367
|
+
}
|
|
24249
24368
|
/**
|
|
24250
24369
|
* Updates the password for a user by supplying the existing and new password.
|
|
24251
24370
|
* @param params
|
|
@@ -24868,6 +24987,73 @@ var WorkflowItem;
|
|
|
24868
24987
|
EOrderBy["THUMBNAIL_CLIENT_FILE_ID"] = "ThumbnailClientFileID";
|
|
24869
24988
|
EOrderBy["RANDOM"] = "RANDOM";
|
|
24870
24989
|
})(EOrderBy = WorkflowItem.EOrderBy || (WorkflowItem.EOrderBy = {}));
|
|
24990
|
+
/**
|
|
24991
|
+
* Gets the history timeline of a Workflow Item, newest first.
|
|
24992
|
+
* Route: GET workflow/item/{workflow_item_id}/history
|
|
24993
|
+
*/
|
|
24994
|
+
function GetHistoryList(params) {
|
|
24995
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24996
|
+
let { api, workflowItemId, req } = params;
|
|
24997
|
+
if (isInvalidId(workflowItemId)) {
|
|
24998
|
+
throw ("Workflow Item ID is required.");
|
|
24999
|
+
}
|
|
25000
|
+
if (!api) {
|
|
25001
|
+
api = ENVIRONMENT.Api().GetBruceApi();
|
|
25002
|
+
}
|
|
25003
|
+
const key = GetHistoryListCacheKey(workflowItemId);
|
|
25004
|
+
const cache = api.GetCacheItem(key, req);
|
|
25005
|
+
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
25006
|
+
return cache.data;
|
|
25007
|
+
}
|
|
25008
|
+
const request = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
25009
|
+
try {
|
|
25010
|
+
const data = yield api.GET(`workflow/item/${workflowItemId}/history`, Api.PrepReqParams(req));
|
|
25011
|
+
res(ParseHistoryListResponse(data));
|
|
25012
|
+
}
|
|
25013
|
+
catch (e) {
|
|
25014
|
+
rej(e);
|
|
25015
|
+
}
|
|
25016
|
+
}));
|
|
25017
|
+
api.SetCacheItem({ key, value: request, req });
|
|
25018
|
+
return request;
|
|
25019
|
+
});
|
|
25020
|
+
}
|
|
25021
|
+
WorkflowItem.GetHistoryList = GetHistoryList;
|
|
25022
|
+
/**
|
|
25023
|
+
* Gets one history record of a Workflow Item.
|
|
25024
|
+
* Route: GET workflow/item/{workflow_item_id}/history/{workflow_item_history_id}
|
|
25025
|
+
*/
|
|
25026
|
+
function GetHistory(params) {
|
|
25027
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25028
|
+
let { api, workflowItemId, workflowItemHistoryId, req } = params;
|
|
25029
|
+
if (isInvalidId(workflowItemId)) {
|
|
25030
|
+
throw ("Workflow Item ID is required.");
|
|
25031
|
+
}
|
|
25032
|
+
if (isInvalidId(workflowItemHistoryId)) {
|
|
25033
|
+
throw ("Workflow Item History ID is required.");
|
|
25034
|
+
}
|
|
25035
|
+
if (!api) {
|
|
25036
|
+
api = ENVIRONMENT.Api().GetBruceApi();
|
|
25037
|
+
}
|
|
25038
|
+
const key = GetHistoryCacheKey(workflowItemId, workflowItemHistoryId);
|
|
25039
|
+
const cache = api.GetCacheItem(key, req);
|
|
25040
|
+
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
25041
|
+
return cache.data;
|
|
25042
|
+
}
|
|
25043
|
+
const request = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
25044
|
+
try {
|
|
25045
|
+
const data = yield api.GET(`workflow/item/${workflowItemId}/history/${workflowItemHistoryId}`, Api.PrepReqParams(req));
|
|
25046
|
+
res({ history: ParseHistoryResponse(data) });
|
|
25047
|
+
}
|
|
25048
|
+
catch (e) {
|
|
25049
|
+
rej(e);
|
|
25050
|
+
}
|
|
25051
|
+
}));
|
|
25052
|
+
api.SetCacheItem({ key, value: request, req });
|
|
25053
|
+
return request;
|
|
25054
|
+
});
|
|
25055
|
+
}
|
|
25056
|
+
WorkflowItem.GetHistory = GetHistory;
|
|
24871
25057
|
function Get(params) {
|
|
24872
25058
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24873
25059
|
let { api, workflowItemId, req } = params;
|
|
@@ -25152,10 +25338,41 @@ var WorkflowItem;
|
|
|
25152
25338
|
return result;
|
|
25153
25339
|
}
|
|
25154
25340
|
WorkflowItem.ParseStatisticsResponse = ParseStatisticsResponse;
|
|
25341
|
+
function ParseHistoryResponse(response) {
|
|
25342
|
+
var _a;
|
|
25343
|
+
const parsed = parseObject$5(response);
|
|
25344
|
+
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;
|
|
25345
|
+
return parsedResult !== null && parsedResult !== void 0 ? parsedResult : parsed;
|
|
25346
|
+
}
|
|
25347
|
+
WorkflowItem.ParseHistoryResponse = ParseHistoryResponse;
|
|
25348
|
+
function ParseHistoryListResponse(response) {
|
|
25349
|
+
var _a;
|
|
25350
|
+
const parsed = parseObject$5(response);
|
|
25351
|
+
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;
|
|
25352
|
+
const source = parsedResult !== null && parsedResult !== void 0 ? parsedResult : parsed;
|
|
25353
|
+
const items = Array.isArray(source)
|
|
25354
|
+
? source
|
|
25355
|
+
: Array.isArray(source === null || source === void 0 ? void 0 : source.Items)
|
|
25356
|
+
? source.Items
|
|
25357
|
+
: [];
|
|
25358
|
+
return {
|
|
25359
|
+
items,
|
|
25360
|
+
totalCount: source === null || source === void 0 ? void 0 : source.TotalCount
|
|
25361
|
+
};
|
|
25362
|
+
}
|
|
25363
|
+
WorkflowItem.ParseHistoryListResponse = ParseHistoryListResponse;
|
|
25155
25364
|
function GetCacheKey(id) {
|
|
25156
25365
|
return `${Api.ECacheKey.WorkflowItem}${Api.ECacheKey.Id}${id}`;
|
|
25157
25366
|
}
|
|
25158
25367
|
WorkflowItem.GetCacheKey = GetCacheKey;
|
|
25368
|
+
function GetHistoryListCacheKey(workflowItemId) {
|
|
25369
|
+
return `${Api.ECacheKey.WorkflowItem}${Api.ECacheKey.Id}${workflowItemId}${Api.ECacheKey.ListId}history`;
|
|
25370
|
+
}
|
|
25371
|
+
WorkflowItem.GetHistoryListCacheKey = GetHistoryListCacheKey;
|
|
25372
|
+
function GetHistoryCacheKey(workflowItemId, workflowItemHistoryId) {
|
|
25373
|
+
return `${Api.ECacheKey.WorkflowItem}${Api.ECacheKey.Id}${workflowItemId}${Api.ECacheKey.ListId}history${Api.ECacheKey.Id}${workflowItemHistoryId}`;
|
|
25374
|
+
}
|
|
25375
|
+
WorkflowItem.GetHistoryCacheKey = GetHistoryCacheKey;
|
|
25159
25376
|
function GetListCacheKey(params) {
|
|
25160
25377
|
return `${Api.ECacheKey.WorkflowItem}${Api.ECacheKey.ListId}${BuildListUrl(params)}`;
|
|
25161
25378
|
}
|
|
@@ -25682,7 +25899,7 @@ function getFirstWrappedArray(data, wrapperKeys) {
|
|
|
25682
25899
|
}
|
|
25683
25900
|
|
|
25684
25901
|
// This is updated with the package.json version on build.
|
|
25685
|
-
const VERSION = "7.1.
|
|
25902
|
+
const VERSION = "7.1.128";
|
|
25686
25903
|
|
|
25687
|
-
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,
|
|
25904
|
+
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 };
|
|
25688
25905
|
//# sourceMappingURL=bruce-models.es5.js.map
|