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/dist/bruce-models.umd.js
CHANGED
|
@@ -13909,7 +13909,7 @@
|
|
|
13909
13909
|
DataLab.Get = Get;
|
|
13910
13910
|
/**
|
|
13911
13911
|
* Suggests a DataLab query from natural language prompt.
|
|
13912
|
-
* This calls: POST entities/datalab/
|
|
13912
|
+
* This calls: POST entities/datalab/suggestQuery
|
|
13913
13913
|
*/
|
|
13914
13914
|
function SuggestDataLabQueryByPrompt(params) {
|
|
13915
13915
|
var _a, _b, _c;
|
|
@@ -13921,7 +13921,7 @@
|
|
|
13921
13921
|
if (!api) {
|
|
13922
13922
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
13923
13923
|
}
|
|
13924
|
-
const res = yield api.POST("entities/datalab/
|
|
13924
|
+
const res = yield api.POST("entities/datalab/suggestQuery", body, req ? exports.Api.PrepReqParams(req) : undefined);
|
|
13925
13925
|
const raw = res;
|
|
13926
13926
|
return {
|
|
13927
13927
|
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,
|
|
@@ -14613,6 +14613,16 @@
|
|
|
14613
14613
|
EEffectType["None"] = "NONE";
|
|
14614
14614
|
EEffectType["Water"] = "WATER";
|
|
14615
14615
|
})(EEffectType = Style.EEffectType || (Style.EEffectType = {}));
|
|
14616
|
+
/**
|
|
14617
|
+
* A look a renderer may put over a point, on top of the point or icon itself.
|
|
14618
|
+
* Default is "NONE".
|
|
14619
|
+
*/
|
|
14620
|
+
let EPointEffectType;
|
|
14621
|
+
(function (EPointEffectType) {
|
|
14622
|
+
EPointEffectType["None"] = "NONE";
|
|
14623
|
+
// Marks which way the Entity faces, read from its Bruce.Transform.
|
|
14624
|
+
EPointEffectType["Orientation"] = "ORIENTATION";
|
|
14625
|
+
})(EPointEffectType = Style.EPointEffectType || (Style.EPointEffectType = {}));
|
|
14616
14626
|
/**
|
|
14617
14627
|
* Returns a list of styles.
|
|
14618
14628
|
* @param params
|
|
@@ -19208,10 +19218,91 @@
|
|
|
19208
19218
|
UIMarkup.GetListCacheKey = GetListCacheKey;
|
|
19209
19219
|
})(exports.UIMarkup || (exports.UIMarkup = {}));
|
|
19210
19220
|
|
|
19211
|
-
|
|
19212
|
-
|
|
19221
|
+
/**
|
|
19222
|
+
* Wire contract of the Navigator chat-event protocol: the JSON-RPC methods, the `eventType` values the
|
|
19223
|
+
* frontend sends, the step types and tracking kinds the backend broadcasts, and the parser for what the
|
|
19224
|
+
* backend sends back. Values are fixed by deployed servers and frontends; the shared fixtures in the
|
|
19225
|
+
* bruce-chat repository (ops/chat-contract-fixtures) pin them for every repository. This module has no
|
|
19226
|
+
* runtime imports so any chat module can depend on it. Exported to consumers through ./navigator-chat.
|
|
19227
|
+
*/
|
|
19228
|
+
const NAVIGATOR_CHAT_RPC_METHOD_CHAT_EVENT = "chat/event";
|
|
19229
|
+
const NAVIGATOR_CHAT_RPC_METHOD_SERVER_READY = "server_ready";
|
|
19230
|
+
const NAVIGATOR_CHAT_RPC_METHOD_SERVER_READY_ACK = "server_ready_ack";
|
|
19231
|
+
const NAVIGATOR_CHAT_RPC_METHOD_TOOLS_CALL = "tools/call";
|
|
19232
|
+
const NAVIGATOR_CHAT_RPC_METHOD_TOOL_RESPONSE = "tool_response";
|
|
19233
|
+
/** `eventType` values the frontend sends to the backend inside `chat/event`. */
|
|
19213
19234
|
const NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED = "entity_highlight_applied";
|
|
19214
19235
|
const NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED = "scene_context_prefetched";
|
|
19236
|
+
const NAVIGATOR_CHAT_EVENT_PRESENTATION_PLAN_APPLIED = "presentation_plan_applied";
|
|
19237
|
+
/** Legacy bare event (field `event`, no step `type`) the backend broadcasts when a session is cleared. */
|
|
19238
|
+
const NAVIGATOR_CHAT_LEGACY_EVENT_SESSION_CLEARED = "SESSION_CLEARED";
|
|
19239
|
+
/** Step `type` values the backend broadcasts that the frontend routes specially. */
|
|
19240
|
+
const NAVIGATOR_CHAT_STEP_TRACKING_UPDATE = "TRACKING_UPDATE";
|
|
19241
|
+
const NAVIGATOR_CHAT_STEP_JOB_COMPLETE = "JOB_COMPLETE";
|
|
19242
|
+
const NAVIGATOR_CHAT_STEP_QUEUED_INPUT = "QUEUED_INPUT";
|
|
19243
|
+
const NAVIGATOR_CHAT_STEP_LLM_CONTEXT = "LLM_CONTEXT";
|
|
19244
|
+
/** `trackingKind` of the plan step the backend emits; the receipts reuse the event names above. */
|
|
19245
|
+
const NAVIGATOR_CHAT_TRACKING_KIND_PRESENTATION_PLAN = "presentation_plan";
|
|
19246
|
+
/**
|
|
19247
|
+
* Job statuses that mean the job did not run to its end. The WebSocket step path and the streaming
|
|
19248
|
+
* (SSE) path have always recognised slightly different sets - the stream path never treated
|
|
19249
|
+
* INTERRUPTED as cancellation - so each keeps its own list.
|
|
19250
|
+
*/
|
|
19251
|
+
const NAVIGATOR_CHAT_CANCELLED_JOB_STATUSES = {
|
|
19252
|
+
chatEvent: ["CANCELLED", "CANCELED", "INTERRUPTED", "PAUSED"],
|
|
19253
|
+
chatStream: ["CANCELLED", "CANCELED", "PAUSED"]
|
|
19254
|
+
};
|
|
19255
|
+
const CLIENT_EVENT_TYPES = [
|
|
19256
|
+
NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED,
|
|
19257
|
+
NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED,
|
|
19258
|
+
NAVIGATOR_CHAT_EVENT_PRESENTATION_PLAN_APPLIED
|
|
19259
|
+
];
|
|
19260
|
+
/** True for an `eventType` the backend acts on. Matching is exact and case-sensitive. */
|
|
19261
|
+
function isNavigatorChatClientEventType(value) {
|
|
19262
|
+
return typeof value === "string" && CLIENT_EVENT_TYPES.indexOf(value) !== -1;
|
|
19263
|
+
}
|
|
19264
|
+
/** True when a job status means the job was cancelled, interrupted or paused on that path. */
|
|
19265
|
+
function isNavigatorChatCancelledJobStatus(status, path = "chatEvent") {
|
|
19266
|
+
return typeof status === "string"
|
|
19267
|
+
&& NAVIGATOR_CHAT_CANCELLED_JOB_STATUSES[path].indexOf(status) !== -1;
|
|
19268
|
+
}
|
|
19269
|
+
/** The JSON-RPC message that carries a frontend chat event to the backend. */
|
|
19270
|
+
function buildNavigatorChatEventMessage(event) {
|
|
19271
|
+
return {
|
|
19272
|
+
jsonrpc: "2.0",
|
|
19273
|
+
method: NAVIGATOR_CHAT_RPC_METHOD_CHAT_EVENT,
|
|
19274
|
+
params: event
|
|
19275
|
+
};
|
|
19276
|
+
}
|
|
19277
|
+
/**
|
|
19278
|
+
* Classifies a raw WebSocket message from the backend. A string is parsed as JSON and a parse failure
|
|
19279
|
+
* throws, so the caller keeps deciding how to report an invalid message. A `chat/event` without params
|
|
19280
|
+
* is delivered as an empty event rather than dropped, as older servers relied on.
|
|
19281
|
+
*/
|
|
19282
|
+
function parseNavigatorChatServerMessage(raw) {
|
|
19283
|
+
var _a, _b, _c;
|
|
19284
|
+
const message = typeof raw === "string" ? JSON.parse(raw) : raw;
|
|
19285
|
+
const method = message === null || message === void 0 ? void 0 : message.method;
|
|
19286
|
+
if (method === NAVIGATOR_CHAT_RPC_METHOD_CHAT_EVENT) {
|
|
19287
|
+
return { kind: "chat_event", event: ((_a = message === null || message === void 0 ? void 0 : message.params) !== null && _a !== void 0 ? _a : {}) };
|
|
19288
|
+
}
|
|
19289
|
+
if (method !== NAVIGATOR_CHAT_RPC_METHOD_TOOLS_CALL) {
|
|
19290
|
+
return { kind: "ignored", method, message };
|
|
19291
|
+
}
|
|
19292
|
+
const name = (_b = message === null || message === void 0 ? void 0 : message.params) === null || _b === void 0 ? void 0 : _b.name;
|
|
19293
|
+
if (!name) {
|
|
19294
|
+
return { kind: "invalid_tool_call", message };
|
|
19295
|
+
}
|
|
19296
|
+
return {
|
|
19297
|
+
kind: "tool_call",
|
|
19298
|
+
name,
|
|
19299
|
+
args: (_c = message === null || message === void 0 ? void 0 : message.params) === null || _c === void 0 ? void 0 : _c.arguments,
|
|
19300
|
+
messageId: message === null || message === void 0 ? void 0 : message.id
|
|
19301
|
+
};
|
|
19302
|
+
}
|
|
19303
|
+
|
|
19304
|
+
const DEFAULT_JOB_POLL_INTERVAL_MS = 1000;
|
|
19305
|
+
const DEFAULT_JOB_POLL_TIMEOUT_MS = 10 * 60 * 1000; // match server timeout (10 minutes)
|
|
19215
19306
|
const DEFAULT_BASE_URL = "http://localhost:8888";
|
|
19216
19307
|
/**
|
|
19217
19308
|
* Lightweight client for the Navigator MCP chat HTTP endpoints.
|
|
@@ -19468,7 +19559,7 @@
|
|
|
19468
19559
|
return;
|
|
19469
19560
|
(_b = (_a = this.logger()).log) === null || _b === void 0 ? void 0 : _b.call(_a, "[NavigatorMcpWS] Connected");
|
|
19470
19561
|
this.isConnecting = false;
|
|
19471
|
-
this.send({ method:
|
|
19562
|
+
this.send({ method: NAVIGATOR_CHAT_RPC_METHOD_SERVER_READY });
|
|
19472
19563
|
this.flushResponses();
|
|
19473
19564
|
(_d = (_c = this.options).onOpen) === null || _d === void 0 ? void 0 : _d.call(_c, event);
|
|
19474
19565
|
};
|
|
@@ -19534,11 +19625,7 @@
|
|
|
19534
19625
|
this.currentAuth = auth;
|
|
19535
19626
|
}
|
|
19536
19627
|
sendChatEvent(event) {
|
|
19537
|
-
this.send(
|
|
19538
|
-
jsonrpc: "2.0",
|
|
19539
|
-
method: "chat/event",
|
|
19540
|
-
params: event
|
|
19541
|
-
});
|
|
19628
|
+
this.send(buildNavigatorChatEventMessage(event));
|
|
19542
19629
|
}
|
|
19543
19630
|
logger() {
|
|
19544
19631
|
var _a;
|
|
@@ -19575,27 +19662,25 @@
|
|
|
19575
19662
|
return urlInstance.toString();
|
|
19576
19663
|
}
|
|
19577
19664
|
handleMessage(raw) {
|
|
19578
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m
|
|
19665
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
19579
19666
|
return __awaiter(this, void 0, void 0, function* () {
|
|
19580
19667
|
try {
|
|
19581
|
-
const
|
|
19582
|
-
|
|
19583
|
-
|
|
19584
|
-
const payload = ((_a = message === null || message === void 0 ? void 0 : message.params) !== null && _a !== void 0 ? _a : {});
|
|
19585
|
-
(_c = (_b = this.options).onChatEvent) === null || _c === void 0 ? void 0 : _c.call(_b, payload);
|
|
19668
|
+
const parsed = parseNavigatorChatServerMessage(raw);
|
|
19669
|
+
if (parsed.kind === "chat_event") {
|
|
19670
|
+
(_b = (_a = this.options).onChatEvent) === null || _b === void 0 ? void 0 : _b.call(_a, parsed.event);
|
|
19586
19671
|
return;
|
|
19587
19672
|
}
|
|
19588
|
-
if (
|
|
19589
|
-
(
|
|
19673
|
+
if (parsed.kind === "ignored") {
|
|
19674
|
+
(_d = (_c = this.logger()).debug) === null || _d === void 0 ? void 0 : _d.call(_c, "[NavigatorMcpWS] Ignoring unsupported message", parsed.message);
|
|
19590
19675
|
return;
|
|
19591
19676
|
}
|
|
19592
|
-
|
|
19593
|
-
|
|
19594
|
-
const messageId = message === null || message === void 0 ? void 0 : message.id;
|
|
19595
|
-
if (!toolName) {
|
|
19596
|
-
(_j = (_h = this.logger()).warn) === null || _j === void 0 ? void 0 : _j.call(_h, "[NavigatorMcpWS] Received tool call without name", message);
|
|
19677
|
+
if (parsed.kind === "invalid_tool_call") {
|
|
19678
|
+
(_f = (_e = this.logger()).warn) === null || _f === void 0 ? void 0 : _f.call(_e, "[NavigatorMcpWS] Received tool call without name", parsed.message);
|
|
19597
19679
|
return;
|
|
19598
19680
|
}
|
|
19681
|
+
const toolName = parsed.name;
|
|
19682
|
+
const toolArgs = parsed.args;
|
|
19683
|
+
const messageId = parsed.messageId;
|
|
19599
19684
|
let result;
|
|
19600
19685
|
const generation = this.responseGeneration;
|
|
19601
19686
|
try {
|
|
@@ -19606,21 +19691,21 @@
|
|
|
19606
19691
|
});
|
|
19607
19692
|
}
|
|
19608
19693
|
catch (error) {
|
|
19609
|
-
(
|
|
19694
|
+
(_h = (_g = this.logger()).error) === null || _h === void 0 ? void 0 : _h.call(_g, "[NavigatorMcpWS] Tool handler threw", error);
|
|
19610
19695
|
result = `Error: ${error instanceof Error ? error.message : String(error)}`;
|
|
19611
19696
|
}
|
|
19612
19697
|
if (generation !== this.responseGeneration) {
|
|
19613
|
-
(
|
|
19698
|
+
(_k = (_j = this.logger()).warn) === null || _k === void 0 ? void 0 : _k.call(_j, "[NavigatorMcpWS] Discarding result from a previous session", messageId);
|
|
19614
19699
|
return;
|
|
19615
19700
|
}
|
|
19616
19701
|
this.sendResponse({
|
|
19617
|
-
method:
|
|
19702
|
+
method: NAVIGATOR_CHAT_RPC_METHOD_TOOL_RESPONSE,
|
|
19618
19703
|
id: messageId,
|
|
19619
19704
|
result
|
|
19620
19705
|
});
|
|
19621
19706
|
}
|
|
19622
19707
|
catch (error) {
|
|
19623
|
-
(
|
|
19708
|
+
(_m = (_l = this.logger()).error) === null || _m === void 0 ? void 0 : _m.call(_l, "[NavigatorMcpWS] Invalid message", error);
|
|
19624
19709
|
}
|
|
19625
19710
|
});
|
|
19626
19711
|
}
|
|
@@ -21807,6 +21892,10 @@
|
|
|
21807
21892
|
EContentType["WEB_3D_MODEL_SPACE"] = "WEB_3D_MODEL_SPACE";
|
|
21808
21893
|
EContentType["WEB_3D_SPLIT_PLUGIN"] = "WEB_3D_SPLIT_PLUGIN";
|
|
21809
21894
|
EContentType["IFRAME"] = "IFRAME";
|
|
21895
|
+
// Renders a dashboard in place of the scene.
|
|
21896
|
+
EContentType["DASHBOARD"] = "DASHBOARD";
|
|
21897
|
+
// Renders a diagram (2D graph view) in place of the scene.
|
|
21898
|
+
EContentType["DIAGRAM"] = "DIAGRAM";
|
|
21810
21899
|
})(EContentType = ProjectViewBookmark.EContentType || (ProjectViewBookmark.EContentType = {}));
|
|
21811
21900
|
/**
|
|
21812
21901
|
* Gets a bookmark record.
|
|
@@ -23533,9 +23622,10 @@
|
|
|
23533
23622
|
* @param accountId
|
|
23534
23623
|
* @param exclusive
|
|
23535
23624
|
* @param search
|
|
23625
|
+
* @param expand
|
|
23536
23626
|
* @returns
|
|
23537
23627
|
*/
|
|
23538
|
-
function GetListCacheKey(sessionId, accountId, exclusive, search) {
|
|
23628
|
+
function GetListCacheKey(sessionId, accountId, exclusive, search, expand) {
|
|
23539
23629
|
if (!exclusive) {
|
|
23540
23630
|
exclusive = false;
|
|
23541
23631
|
}
|
|
@@ -23548,7 +23638,10 @@
|
|
|
23548
23638
|
if (!accountId) {
|
|
23549
23639
|
accountId = "";
|
|
23550
23640
|
}
|
|
23551
|
-
|
|
23641
|
+
if (!expand) {
|
|
23642
|
+
expand = "";
|
|
23643
|
+
}
|
|
23644
|
+
return exports.Api.ECacheKey.User + exports.Api.ECacheKey.Account + exports.Api.ECacheKey.Id + accountId + exports.Api.ECacheKey.Id + exclusive + exports.Api.ECacheKey.Id + search + exports.Api.ECacheKey.Session + exports.Api.ECacheKey.Id + sessionId + exports.Api.ECacheKey.Id + expand;
|
|
23552
23645
|
}
|
|
23553
23646
|
LoginUser.GetListCacheKey = GetListCacheKey;
|
|
23554
23647
|
/**
|
|
@@ -23575,15 +23668,16 @@
|
|
|
23575
23668
|
*/
|
|
23576
23669
|
function GetList(params) {
|
|
23577
23670
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23578
|
-
let { api, accountId, exclusive, req: reqParams, search } = params;
|
|
23671
|
+
let { api, accountId, exclusive, req: reqParams, search, expandLastAccess } = params;
|
|
23579
23672
|
if (!api) {
|
|
23580
23673
|
api = exports.ENVIRONMENT.Api().GetGuardianApi();
|
|
23581
23674
|
}
|
|
23582
23675
|
if (!exclusive) {
|
|
23583
23676
|
exclusive = false;
|
|
23584
23677
|
}
|
|
23678
|
+
const expand = GetListExpand(expandLastAccess);
|
|
23585
23679
|
const sessionId = api.GetSessionId();
|
|
23586
|
-
const cacheKey = GetListCacheKey(sessionId, accountId, exclusive, search);
|
|
23680
|
+
const cacheKey = GetListCacheKey(sessionId, accountId, exclusive, search, expand);
|
|
23587
23681
|
const cache = exclusive ? null : api.GetCacheItem(cacheKey, reqParams);
|
|
23588
23682
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
23589
23683
|
return cache.data;
|
|
@@ -23600,6 +23694,9 @@
|
|
|
23600
23694
|
if (exclusive) {
|
|
23601
23695
|
urlParams.append("allExcludingClientAccount", "true");
|
|
23602
23696
|
}
|
|
23697
|
+
if (expand) {
|
|
23698
|
+
urlParams.append("Expand", expand);
|
|
23699
|
+
}
|
|
23603
23700
|
const data = yield api.GET(`v3/users?${urlParams.toString()}`, reqParams);
|
|
23604
23701
|
res({
|
|
23605
23702
|
users: data.Items
|
|
@@ -23775,16 +23872,20 @@
|
|
|
23775
23872
|
* }
|
|
23776
23873
|
* @param sessionId
|
|
23777
23874
|
* @param accountId
|
|
23875
|
+
* @param expand
|
|
23778
23876
|
* @returns
|
|
23779
23877
|
*/
|
|
23780
|
-
function GetListCacheKey(sessionId, accountId) {
|
|
23878
|
+
function GetListCacheKey(sessionId, accountId, expand) {
|
|
23781
23879
|
if (!sessionId) {
|
|
23782
23880
|
sessionId = "anonymous";
|
|
23783
23881
|
}
|
|
23784
23882
|
if (!accountId) {
|
|
23785
23883
|
accountId = "";
|
|
23786
23884
|
}
|
|
23787
|
-
|
|
23885
|
+
if (!expand) {
|
|
23886
|
+
expand = "";
|
|
23887
|
+
}
|
|
23888
|
+
return exports.Api.ECacheKey.AccessToken + exports.Api.ECacheKey.Account + exports.Api.ECacheKey.Id + accountId + exports.Api.ECacheKey.Session + exports.Api.ECacheKey.Id + sessionId + exports.Api.ECacheKey.Id + expand;
|
|
23788
23889
|
}
|
|
23789
23890
|
AccessToken.GetListCacheKey = GetListCacheKey;
|
|
23790
23891
|
/**
|
|
@@ -23794,18 +23895,26 @@
|
|
|
23794
23895
|
*/
|
|
23795
23896
|
function GetList(params) {
|
|
23796
23897
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23797
|
-
let { api, accountId, req: reqParams } = params;
|
|
23898
|
+
let { api, accountId, expandLastAccess, req: reqParams } = params;
|
|
23899
|
+
if (!accountId) {
|
|
23900
|
+
throw ("Account ID is required.");
|
|
23901
|
+
}
|
|
23798
23902
|
if (!api) {
|
|
23799
23903
|
api = exports.ENVIRONMENT.Api().GetGuardianApi();
|
|
23800
23904
|
}
|
|
23801
|
-
const
|
|
23905
|
+
const expand = GetListExpand(expandLastAccess);
|
|
23906
|
+
const cacheKey = GetListCacheKey(api.GetSessionId(), accountId, expand);
|
|
23802
23907
|
const cache = api.GetCacheItem(cacheKey, reqParams);
|
|
23803
23908
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
23804
23909
|
return cache.data;
|
|
23805
23910
|
}
|
|
23806
23911
|
const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
23807
23912
|
try {
|
|
23808
|
-
|
|
23913
|
+
let url = `v3/account/${accountId}/accessTokens`;
|
|
23914
|
+
if (expand) {
|
|
23915
|
+
url += "?Expand=" + expand;
|
|
23916
|
+
}
|
|
23917
|
+
const data = yield api.GET(url, reqParams);
|
|
23809
23918
|
res({
|
|
23810
23919
|
users: data.Items
|
|
23811
23920
|
});
|
|
@@ -23868,6 +23977,16 @@
|
|
|
23868
23977
|
}
|
|
23869
23978
|
AccessToken.Create = Create;
|
|
23870
23979
|
})(AccessToken = User.AccessToken || (User.AccessToken = {}));
|
|
23980
|
+
/**
|
|
23981
|
+
* Builds the Expand value for a user list, or undefined to leave Guardian's default.
|
|
23982
|
+
* An explicit Expand replaces the default permission expansion, so it is asked for again.
|
|
23983
|
+
*/
|
|
23984
|
+
function GetListExpand(expandLastAccess) {
|
|
23985
|
+
if (!expandLastAccess) {
|
|
23986
|
+
return undefined;
|
|
23987
|
+
}
|
|
23988
|
+
return "permission,lastAccess";
|
|
23989
|
+
}
|
|
23871
23990
|
/**
|
|
23872
23991
|
* Updates the password for a user by supplying the existing and new password.
|
|
23873
23992
|
* @param params
|
|
@@ -24481,6 +24600,73 @@
|
|
|
24481
24600
|
EOrderBy["THUMBNAIL_CLIENT_FILE_ID"] = "ThumbnailClientFileID";
|
|
24482
24601
|
EOrderBy["RANDOM"] = "RANDOM";
|
|
24483
24602
|
})(EOrderBy = WorkflowItem.EOrderBy || (WorkflowItem.EOrderBy = {}));
|
|
24603
|
+
/**
|
|
24604
|
+
* Gets the history timeline of a Workflow Item, newest first.
|
|
24605
|
+
* Route: GET workflow/item/{workflow_item_id}/history
|
|
24606
|
+
*/
|
|
24607
|
+
function GetHistoryList(params) {
|
|
24608
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24609
|
+
let { api, workflowItemId, req } = params;
|
|
24610
|
+
if (isInvalidId(workflowItemId)) {
|
|
24611
|
+
throw ("Workflow Item ID is required.");
|
|
24612
|
+
}
|
|
24613
|
+
if (!api) {
|
|
24614
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
24615
|
+
}
|
|
24616
|
+
const key = GetHistoryListCacheKey(workflowItemId);
|
|
24617
|
+
const cache = api.GetCacheItem(key, req);
|
|
24618
|
+
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
24619
|
+
return cache.data;
|
|
24620
|
+
}
|
|
24621
|
+
const request = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
24622
|
+
try {
|
|
24623
|
+
const data = yield api.GET(`workflow/item/${workflowItemId}/history`, exports.Api.PrepReqParams(req));
|
|
24624
|
+
res(ParseHistoryListResponse(data));
|
|
24625
|
+
}
|
|
24626
|
+
catch (e) {
|
|
24627
|
+
rej(e);
|
|
24628
|
+
}
|
|
24629
|
+
}));
|
|
24630
|
+
api.SetCacheItem({ key, value: request, req });
|
|
24631
|
+
return request;
|
|
24632
|
+
});
|
|
24633
|
+
}
|
|
24634
|
+
WorkflowItem.GetHistoryList = GetHistoryList;
|
|
24635
|
+
/**
|
|
24636
|
+
* Gets one history record of a Workflow Item.
|
|
24637
|
+
* Route: GET workflow/item/{workflow_item_id}/history/{workflow_item_history_id}
|
|
24638
|
+
*/
|
|
24639
|
+
function GetHistory(params) {
|
|
24640
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24641
|
+
let { api, workflowItemId, workflowItemHistoryId, req } = params;
|
|
24642
|
+
if (isInvalidId(workflowItemId)) {
|
|
24643
|
+
throw ("Workflow Item ID is required.");
|
|
24644
|
+
}
|
|
24645
|
+
if (isInvalidId(workflowItemHistoryId)) {
|
|
24646
|
+
throw ("Workflow Item History ID is required.");
|
|
24647
|
+
}
|
|
24648
|
+
if (!api) {
|
|
24649
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
24650
|
+
}
|
|
24651
|
+
const key = GetHistoryCacheKey(workflowItemId, workflowItemHistoryId);
|
|
24652
|
+
const cache = api.GetCacheItem(key, req);
|
|
24653
|
+
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
24654
|
+
return cache.data;
|
|
24655
|
+
}
|
|
24656
|
+
const request = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
24657
|
+
try {
|
|
24658
|
+
const data = yield api.GET(`workflow/item/${workflowItemId}/history/${workflowItemHistoryId}`, exports.Api.PrepReqParams(req));
|
|
24659
|
+
res({ history: ParseHistoryResponse(data) });
|
|
24660
|
+
}
|
|
24661
|
+
catch (e) {
|
|
24662
|
+
rej(e);
|
|
24663
|
+
}
|
|
24664
|
+
}));
|
|
24665
|
+
api.SetCacheItem({ key, value: request, req });
|
|
24666
|
+
return request;
|
|
24667
|
+
});
|
|
24668
|
+
}
|
|
24669
|
+
WorkflowItem.GetHistory = GetHistory;
|
|
24484
24670
|
function Get(params) {
|
|
24485
24671
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24486
24672
|
let { api, workflowItemId, req } = params;
|
|
@@ -24765,10 +24951,41 @@
|
|
|
24765
24951
|
return result;
|
|
24766
24952
|
}
|
|
24767
24953
|
WorkflowItem.ParseStatisticsResponse = ParseStatisticsResponse;
|
|
24954
|
+
function ParseHistoryResponse(response) {
|
|
24955
|
+
var _a;
|
|
24956
|
+
const parsed = parseObject$5(response);
|
|
24957
|
+
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;
|
|
24958
|
+
return parsedResult !== null && parsedResult !== void 0 ? parsedResult : parsed;
|
|
24959
|
+
}
|
|
24960
|
+
WorkflowItem.ParseHistoryResponse = ParseHistoryResponse;
|
|
24961
|
+
function ParseHistoryListResponse(response) {
|
|
24962
|
+
var _a;
|
|
24963
|
+
const parsed = parseObject$5(response);
|
|
24964
|
+
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;
|
|
24965
|
+
const source = parsedResult !== null && parsedResult !== void 0 ? parsedResult : parsed;
|
|
24966
|
+
const items = Array.isArray(source)
|
|
24967
|
+
? source
|
|
24968
|
+
: Array.isArray(source === null || source === void 0 ? void 0 : source.Items)
|
|
24969
|
+
? source.Items
|
|
24970
|
+
: [];
|
|
24971
|
+
return {
|
|
24972
|
+
items,
|
|
24973
|
+
totalCount: source === null || source === void 0 ? void 0 : source.TotalCount
|
|
24974
|
+
};
|
|
24975
|
+
}
|
|
24976
|
+
WorkflowItem.ParseHistoryListResponse = ParseHistoryListResponse;
|
|
24768
24977
|
function GetCacheKey(id) {
|
|
24769
24978
|
return `${exports.Api.ECacheKey.WorkflowItem}${exports.Api.ECacheKey.Id}${id}`;
|
|
24770
24979
|
}
|
|
24771
24980
|
WorkflowItem.GetCacheKey = GetCacheKey;
|
|
24981
|
+
function GetHistoryListCacheKey(workflowItemId) {
|
|
24982
|
+
return `${exports.Api.ECacheKey.WorkflowItem}${exports.Api.ECacheKey.Id}${workflowItemId}${exports.Api.ECacheKey.ListId}history`;
|
|
24983
|
+
}
|
|
24984
|
+
WorkflowItem.GetHistoryListCacheKey = GetHistoryListCacheKey;
|
|
24985
|
+
function GetHistoryCacheKey(workflowItemId, workflowItemHistoryId) {
|
|
24986
|
+
return `${exports.Api.ECacheKey.WorkflowItem}${exports.Api.ECacheKey.Id}${workflowItemId}${exports.Api.ECacheKey.ListId}history${exports.Api.ECacheKey.Id}${workflowItemHistoryId}`;
|
|
24987
|
+
}
|
|
24988
|
+
WorkflowItem.GetHistoryCacheKey = GetHistoryCacheKey;
|
|
24772
24989
|
function GetListCacheKey(params) {
|
|
24773
24990
|
return `${exports.Api.ECacheKey.WorkflowItem}${exports.Api.ECacheKey.ListId}${BuildListUrl(params)}`;
|
|
24774
24991
|
}
|
|
@@ -25289,7 +25506,7 @@
|
|
|
25289
25506
|
}
|
|
25290
25507
|
|
|
25291
25508
|
// This is updated with the package.json version on build.
|
|
25292
|
-
const VERSION = "7.1.
|
|
25509
|
+
const VERSION = "7.1.128";
|
|
25293
25510
|
|
|
25294
25511
|
exports.VERSION = VERSION;
|
|
25295
25512
|
exports.AbstractApi = AbstractApi;
|
|
@@ -25298,9 +25515,26 @@
|
|
|
25298
25515
|
exports.CacheControl = CacheControl;
|
|
25299
25516
|
exports.DelayQueue = DelayQueue;
|
|
25300
25517
|
exports.LRUCache = LRUCache;
|
|
25518
|
+
exports.NavigatorChatClient = NavigatorChatClient;
|
|
25519
|
+
exports.NAVIGATOR_CHAT_RPC_METHOD_CHAT_EVENT = NAVIGATOR_CHAT_RPC_METHOD_CHAT_EVENT;
|
|
25520
|
+
exports.NAVIGATOR_CHAT_RPC_METHOD_SERVER_READY = NAVIGATOR_CHAT_RPC_METHOD_SERVER_READY;
|
|
25521
|
+
exports.NAVIGATOR_CHAT_RPC_METHOD_SERVER_READY_ACK = NAVIGATOR_CHAT_RPC_METHOD_SERVER_READY_ACK;
|
|
25522
|
+
exports.NAVIGATOR_CHAT_RPC_METHOD_TOOLS_CALL = NAVIGATOR_CHAT_RPC_METHOD_TOOLS_CALL;
|
|
25523
|
+
exports.NAVIGATOR_CHAT_RPC_METHOD_TOOL_RESPONSE = NAVIGATOR_CHAT_RPC_METHOD_TOOL_RESPONSE;
|
|
25301
25524
|
exports.NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED = NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED;
|
|
25302
25525
|
exports.NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED = NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED;
|
|
25303
|
-
exports.
|
|
25526
|
+
exports.NAVIGATOR_CHAT_EVENT_PRESENTATION_PLAN_APPLIED = NAVIGATOR_CHAT_EVENT_PRESENTATION_PLAN_APPLIED;
|
|
25527
|
+
exports.NAVIGATOR_CHAT_LEGACY_EVENT_SESSION_CLEARED = NAVIGATOR_CHAT_LEGACY_EVENT_SESSION_CLEARED;
|
|
25528
|
+
exports.NAVIGATOR_CHAT_STEP_TRACKING_UPDATE = NAVIGATOR_CHAT_STEP_TRACKING_UPDATE;
|
|
25529
|
+
exports.NAVIGATOR_CHAT_STEP_JOB_COMPLETE = NAVIGATOR_CHAT_STEP_JOB_COMPLETE;
|
|
25530
|
+
exports.NAVIGATOR_CHAT_STEP_QUEUED_INPUT = NAVIGATOR_CHAT_STEP_QUEUED_INPUT;
|
|
25531
|
+
exports.NAVIGATOR_CHAT_STEP_LLM_CONTEXT = NAVIGATOR_CHAT_STEP_LLM_CONTEXT;
|
|
25532
|
+
exports.NAVIGATOR_CHAT_TRACKING_KIND_PRESENTATION_PLAN = NAVIGATOR_CHAT_TRACKING_KIND_PRESENTATION_PLAN;
|
|
25533
|
+
exports.NAVIGATOR_CHAT_CANCELLED_JOB_STATUSES = NAVIGATOR_CHAT_CANCELLED_JOB_STATUSES;
|
|
25534
|
+
exports.isNavigatorChatClientEventType = isNavigatorChatClientEventType;
|
|
25535
|
+
exports.isNavigatorChatCancelledJobStatus = isNavigatorChatCancelledJobStatus;
|
|
25536
|
+
exports.buildNavigatorChatEventMessage = buildNavigatorChatEventMessage;
|
|
25537
|
+
exports.parseNavigatorChatServerMessage = parseNavigatorChatServerMessage;
|
|
25304
25538
|
exports.NavigatorMcpWebSocketClient = NavigatorMcpWebSocketClient;
|
|
25305
25539
|
exports.WorkflowItemType = WorkflowItemType;
|
|
25306
25540
|
|