@firfi/huly-mcp 0.1.39 → 0.1.41
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 +23 -1
- package/dist/index.cjs +1364 -392
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -31019,7 +31019,7 @@ var require_utils2 = __commonJS({
|
|
|
31019
31019
|
escapeLikeForRegexp: () => escapeLikeForRegexp,
|
|
31020
31020
|
fillConfiguration: () => fillConfiguration,
|
|
31021
31021
|
fillDefaults: () => fillDefaults,
|
|
31022
|
-
generateId: () =>
|
|
31022
|
+
generateId: () => generateId15,
|
|
31023
31023
|
generateUuid: () => generateUuid,
|
|
31024
31024
|
getBranding: () => getBranding,
|
|
31025
31025
|
getCurrentAccount: () => getCurrentAccount,
|
|
@@ -31080,10 +31080,10 @@ var require_utils2 = __commonJS({
|
|
|
31080
31080
|
return toHex(val, 6);
|
|
31081
31081
|
}
|
|
31082
31082
|
__name(count3, "count");
|
|
31083
|
-
function
|
|
31083
|
+
function generateId15(join4 = "") {
|
|
31084
31084
|
return timestamp() + join4 + random4 + join4 + count3();
|
|
31085
31085
|
}
|
|
31086
|
-
__name(
|
|
31086
|
+
__name(generateId15, "generateId");
|
|
31087
31087
|
function generateUuid() {
|
|
31088
31088
|
return crypto.randomUUID();
|
|
31089
31089
|
}
|
|
@@ -34037,15 +34037,15 @@ var require_storage = __commonJS({
|
|
|
34037
34037
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
34038
34038
|
var storage_exports = {};
|
|
34039
34039
|
__export2(storage_exports, {
|
|
34040
|
-
SortingOrder: () =>
|
|
34040
|
+
SortingOrder: () => SortingOrder19,
|
|
34041
34041
|
shouldShowArchived: () => shouldShowArchived
|
|
34042
34042
|
});
|
|
34043
34043
|
module2.exports = __toCommonJS2(storage_exports);
|
|
34044
|
-
var
|
|
34044
|
+
var SortingOrder19 = /* @__PURE__ */ ((SortingOrder22) => {
|
|
34045
34045
|
SortingOrder22[SortingOrder22["Ascending"] = 1] = "Ascending";
|
|
34046
34046
|
SortingOrder22[SortingOrder22["Descending"] = -1] = "Descending";
|
|
34047
34047
|
return SortingOrder22;
|
|
34048
|
-
})(
|
|
34048
|
+
})(SortingOrder19 || {});
|
|
34049
34049
|
function shouldShowArchived(query, options) {
|
|
34050
34050
|
if (options?.showArchived !== void 0) {
|
|
34051
34051
|
return options.showArchived;
|
|
@@ -34475,7 +34475,7 @@ var require_client3 = __commonJS({
|
|
|
34475
34475
|
getClient: () => getClient
|
|
34476
34476
|
});
|
|
34477
34477
|
module2.exports = __toCommonJS2(client_exports);
|
|
34478
|
-
var
|
|
34478
|
+
var import_core38 = require_lib4();
|
|
34479
34479
|
var import_platform2 = __toESM2(require_lib());
|
|
34480
34480
|
var import_utils14 = require_utils3();
|
|
34481
34481
|
function getClient(accountsUrl, token, retryTimeoutMs) {
|
|
@@ -34511,7 +34511,7 @@ var require_client3 = __commonJS({
|
|
|
34511
34511
|
rpc;
|
|
34512
34512
|
async getProviders() {
|
|
34513
34513
|
return await withRetryUntilMaxAttempts(async () => {
|
|
34514
|
-
const response = await fetch((0,
|
|
34514
|
+
const response = await fetch((0, import_core38.concatLink)(this.url, "/providers"));
|
|
34515
34515
|
return await response.json();
|
|
34516
34516
|
})();
|
|
34517
34517
|
}
|
|
@@ -35152,7 +35152,7 @@ var require_client3 = __commonJS({
|
|
|
35152
35152
|
await this.rpc(request2);
|
|
35153
35153
|
}
|
|
35154
35154
|
async setCookie() {
|
|
35155
|
-
const url4 = (0,
|
|
35155
|
+
const url4 = (0, import_core38.concatLink)(this.url, "/cookie");
|
|
35156
35156
|
const response = await fetch(url4, { ...this.request, method: "PUT" });
|
|
35157
35157
|
if (!response.ok) {
|
|
35158
35158
|
const result = await response.json();
|
|
@@ -35162,7 +35162,7 @@ var require_client3 = __commonJS({
|
|
|
35162
35162
|
}
|
|
35163
35163
|
}
|
|
35164
35164
|
async deleteCookie() {
|
|
35165
|
-
const url4 = (0,
|
|
35165
|
+
const url4 = (0, import_core38.concatLink)(this.url, "/cookie");
|
|
35166
35166
|
const response = await fetch(url4, { ...this.request, method: "DELETE" });
|
|
35167
35167
|
if (!response.ok) {
|
|
35168
35168
|
const result = await response.json();
|
|
@@ -35412,9 +35412,9 @@ var require_config = __commonJS({
|
|
|
35412
35412
|
loadServerConfig: () => loadServerConfig4
|
|
35413
35413
|
});
|
|
35414
35414
|
module2.exports = __toCommonJS2(config_exports3);
|
|
35415
|
-
var
|
|
35415
|
+
var import_core38 = require_lib4();
|
|
35416
35416
|
async function loadServerConfig4(url4) {
|
|
35417
|
-
const configUrl = (0,
|
|
35417
|
+
const configUrl = (0, import_core38.concatLink)(url4, "/config.json");
|
|
35418
35418
|
const res = await fetch(configUrl, { keepalive: true });
|
|
35419
35419
|
if (res.ok) {
|
|
35420
35420
|
return await res.json();
|
|
@@ -35500,7 +35500,7 @@ var require_client4 = __commonJS({
|
|
|
35500
35500
|
getClient: () => getClient
|
|
35501
35501
|
});
|
|
35502
35502
|
module2.exports = __toCommonJS2(client_exports);
|
|
35503
|
-
var
|
|
35503
|
+
var import_core38 = require_lib4();
|
|
35504
35504
|
var import_utils14 = require_utils4();
|
|
35505
35505
|
function getClient(workspaceId, token, collaboratorUrl) {
|
|
35506
35506
|
const url4 = collaboratorUrl.replaceAll("wss://", "https://").replace("ws://", "http://");
|
|
@@ -35519,7 +35519,7 @@ var require_client4 = __commonJS({
|
|
|
35519
35519
|
async rpc(document2, method, payload) {
|
|
35520
35520
|
const workspace = this.workspace;
|
|
35521
35521
|
const documentId = (0, import_utils14.encodeDocumentId)(workspace, document2);
|
|
35522
|
-
const url4 = (0,
|
|
35522
|
+
const url4 = (0, import_core38.concatLink)(this.collaboratorUrl, `/rpc/${encodeURIComponent(documentId)}`);
|
|
35523
35523
|
const res = await fetch(url4, {
|
|
35524
35524
|
method: "POST",
|
|
35525
35525
|
headers: {
|
|
@@ -53086,9 +53086,9 @@ var require_image = __commonJS({
|
|
|
53086
53086
|
ImageNode: () => ImageNode
|
|
53087
53087
|
});
|
|
53088
53088
|
module2.exports = __toCommonJS2(image_exports);
|
|
53089
|
-
var
|
|
53089
|
+
var import_core38 = require_dist16();
|
|
53090
53090
|
var import_utils14 = require_utils5();
|
|
53091
|
-
var ImageNode =
|
|
53091
|
+
var ImageNode = import_core38.Node.create({
|
|
53092
53092
|
name: "image",
|
|
53093
53093
|
addOptions() {
|
|
53094
53094
|
return {
|
|
@@ -53147,7 +53147,7 @@ var require_image = __commonJS({
|
|
|
53147
53147
|
"data-type": this.name,
|
|
53148
53148
|
"data-align": node.attrs.align
|
|
53149
53149
|
};
|
|
53150
|
-
const imgAttributes = (0,
|
|
53150
|
+
const imgAttributes = (0, import_core38.mergeAttributes)(
|
|
53151
53151
|
{
|
|
53152
53152
|
"data-type": this.name
|
|
53153
53153
|
},
|
|
@@ -53191,9 +53191,9 @@ var require_reference = __commonJS({
|
|
|
53191
53191
|
ReferenceNode: () => ReferenceNode
|
|
53192
53192
|
});
|
|
53193
53193
|
module2.exports = __toCommonJS2(reference_exports);
|
|
53194
|
-
var
|
|
53194
|
+
var import_core38 = require_dist16();
|
|
53195
53195
|
var import_utils14 = require_utils5();
|
|
53196
|
-
var ReferenceNode =
|
|
53196
|
+
var ReferenceNode = import_core38.Node.create({
|
|
53197
53197
|
name: "reference",
|
|
53198
53198
|
group: "inline",
|
|
53199
53199
|
inline: true,
|
|
@@ -53228,7 +53228,7 @@ var require_reference = __commonJS({
|
|
|
53228
53228
|
renderHTML({ node, HTMLAttributes }) {
|
|
53229
53229
|
return [
|
|
53230
53230
|
"span",
|
|
53231
|
-
(0,
|
|
53231
|
+
(0, import_core38.mergeAttributes)(
|
|
53232
53232
|
{
|
|
53233
53233
|
"data-type": this.name,
|
|
53234
53234
|
"data-id": node.attrs.id,
|
|
@@ -53287,8 +53287,8 @@ var require_emoji = __commonJS({
|
|
|
53287
53287
|
EmojiNode: () => EmojiNode
|
|
53288
53288
|
});
|
|
53289
53289
|
module2.exports = __toCommonJS2(emoji_exports);
|
|
53290
|
-
var
|
|
53291
|
-
var EmojiNode =
|
|
53290
|
+
var import_core38 = require_dist16();
|
|
53291
|
+
var EmojiNode = import_core38.Node.create({
|
|
53292
53292
|
name: "emoji",
|
|
53293
53293
|
group: "inline",
|
|
53294
53294
|
inline: true,
|
|
@@ -53328,7 +53328,7 @@ var require_emoji = __commonJS({
|
|
|
53328
53328
|
addNodeView() {
|
|
53329
53329
|
return ({ node, HTMLAttributes }) => {
|
|
53330
53330
|
const container = document.createElement("span");
|
|
53331
|
-
const containerAttributes = (0,
|
|
53331
|
+
const containerAttributes = (0, import_core38.mergeAttributes)(
|
|
53332
53332
|
{
|
|
53333
53333
|
"data-type": this.name,
|
|
53334
53334
|
class: "emoji"
|
|
@@ -53361,7 +53361,7 @@ var require_emoji = __commonJS({
|
|
|
53361
53361
|
if (node.attrs.kind === "image") {
|
|
53362
53362
|
return [
|
|
53363
53363
|
"span",
|
|
53364
|
-
(0,
|
|
53364
|
+
(0, import_core38.mergeAttributes)(
|
|
53365
53365
|
{
|
|
53366
53366
|
"data-type": this.name,
|
|
53367
53367
|
class: "emoji"
|
|
@@ -53370,7 +53370,7 @@ var require_emoji = __commonJS({
|
|
|
53370
53370
|
),
|
|
53371
53371
|
[
|
|
53372
53372
|
"img",
|
|
53373
|
-
(0,
|
|
53373
|
+
(0, import_core38.mergeAttributes)({
|
|
53374
53374
|
"data-type": this.name,
|
|
53375
53375
|
src: node.attrs.image,
|
|
53376
53376
|
alt: node.attrs.emoji
|
|
@@ -53380,7 +53380,7 @@ var require_emoji = __commonJS({
|
|
|
53380
53380
|
}
|
|
53381
53381
|
return [
|
|
53382
53382
|
"span",
|
|
53383
|
-
(0,
|
|
53383
|
+
(0, import_core38.mergeAttributes)(
|
|
53384
53384
|
{
|
|
53385
53385
|
"data-type": this.name,
|
|
53386
53386
|
class: "emoji"
|
|
@@ -53688,8 +53688,8 @@ var require_file = __commonJS({
|
|
|
53688
53688
|
FileNode: () => FileNode
|
|
53689
53689
|
});
|
|
53690
53690
|
module2.exports = __toCommonJS2(file_exports);
|
|
53691
|
-
var
|
|
53692
|
-
var FileNode =
|
|
53691
|
+
var import_core38 = require_dist16();
|
|
53692
|
+
var FileNode = import_core38.Node.create({
|
|
53693
53693
|
name: "file",
|
|
53694
53694
|
addOptions() {
|
|
53695
53695
|
return {
|
|
@@ -53999,7 +53999,7 @@ var require_codeblock = __commonJS({
|
|
|
53999
53999
|
tildeInputRegex: () => tildeInputRegex
|
|
54000
54000
|
});
|
|
54001
54001
|
module2.exports = __toCommonJS2(codeblock_exports);
|
|
54002
|
-
var
|
|
54002
|
+
var import_core38 = require_dist16();
|
|
54003
54003
|
var import_extension_code_block = __toESM2(require_dist19());
|
|
54004
54004
|
var codeBlockOptions = {
|
|
54005
54005
|
defaultLanguage: "plaintext",
|
|
@@ -54045,11 +54045,11 @@ var require_codeblock = __commonJS({
|
|
|
54045
54045
|
},
|
|
54046
54046
|
addInputRules() {
|
|
54047
54047
|
return [
|
|
54048
|
-
(0,
|
|
54048
|
+
(0, import_core38.textblockTypeInputRule)({
|
|
54049
54049
|
find: backtickInputRegex,
|
|
54050
54050
|
type: this.type
|
|
54051
54051
|
}),
|
|
54052
|
-
(0,
|
|
54052
|
+
(0, import_core38.textblockTypeInputRule)({
|
|
54053
54053
|
find: tildeInputRegex,
|
|
54054
54054
|
type: this.type
|
|
54055
54055
|
})
|
|
@@ -54085,8 +54085,8 @@ var require_comment = __commonJS({
|
|
|
54085
54085
|
CommentNode: () => CommentNode
|
|
54086
54086
|
});
|
|
54087
54087
|
module2.exports = __toCommonJS2(comment_exports);
|
|
54088
|
-
var
|
|
54089
|
-
var CommentNode =
|
|
54088
|
+
var import_core38 = require_dist16();
|
|
54089
|
+
var CommentNode = import_core38.Node.create({
|
|
54090
54090
|
name: "comment",
|
|
54091
54091
|
group: "inline",
|
|
54092
54092
|
inline: true,
|
|
@@ -54132,8 +54132,8 @@ var require_markdown = __commonJS({
|
|
|
54132
54132
|
MarkdownNode: () => MarkdownNode
|
|
54133
54133
|
});
|
|
54134
54134
|
module2.exports = __toCommonJS2(markdown_exports);
|
|
54135
|
-
var
|
|
54136
|
-
var MarkdownNode =
|
|
54135
|
+
var import_core38 = require_dist16();
|
|
54136
|
+
var MarkdownNode = import_core38.Node.create({
|
|
54137
54137
|
name: "markdown",
|
|
54138
54138
|
group: "block",
|
|
54139
54139
|
content: "text*",
|
|
@@ -54151,7 +54151,7 @@ var require_markdown = __commonJS({
|
|
|
54151
54151
|
renderHTML({ node, HTMLAttributes }) {
|
|
54152
54152
|
return [
|
|
54153
54153
|
"pre",
|
|
54154
|
-
(0,
|
|
54154
|
+
(0, import_core38.mergeAttributes)({ "data-type": this.name }, this.options.HTMLAttributes, HTMLAttributes),
|
|
54155
54155
|
["code", {}, 0]
|
|
54156
54156
|
];
|
|
54157
54157
|
}
|
|
@@ -54185,8 +54185,8 @@ var require_embed = __commonJS({
|
|
|
54185
54185
|
EmbedNode: () => EmbedNode
|
|
54186
54186
|
});
|
|
54187
54187
|
module2.exports = __toCommonJS2(embed_exports);
|
|
54188
|
-
var
|
|
54189
|
-
var EmbedNode =
|
|
54188
|
+
var import_core38 = require_dist16();
|
|
54189
|
+
var EmbedNode = import_core38.Node.create({
|
|
54190
54190
|
name: "embed",
|
|
54191
54191
|
addOptions() {
|
|
54192
54192
|
return {};
|
|
@@ -54211,7 +54211,7 @@ var require_embed = __commonJS({
|
|
|
54211
54211
|
];
|
|
54212
54212
|
},
|
|
54213
54213
|
renderHTML({ HTMLAttributes }) {
|
|
54214
|
-
return ["figure", { "data-type": this.name }, ["iframe", (0,
|
|
54214
|
+
return ["figure", { "data-type": this.name }, ["iframe", (0, import_core38.mergeAttributes)(HTMLAttributes)]];
|
|
54215
54215
|
}
|
|
54216
54216
|
});
|
|
54217
54217
|
}
|
|
@@ -54285,7 +54285,7 @@ var require_noteBase = __commonJS({
|
|
|
54285
54285
|
name: () => name
|
|
54286
54286
|
});
|
|
54287
54287
|
module2.exports = __toCommonJS2(noteBase_exports);
|
|
54288
|
-
var
|
|
54288
|
+
var import_core38 = require_dist16();
|
|
54289
54289
|
var import_nodes = require_nodes();
|
|
54290
54290
|
var name = "note";
|
|
54291
54291
|
var NoteKind = /* @__PURE__ */ ((NoteKind2) => {
|
|
@@ -54300,7 +54300,7 @@ var require_noteBase = __commonJS({
|
|
|
54300
54300
|
NoteKind2["PrimaryLight"] = "primary-light";
|
|
54301
54301
|
return NoteKind2;
|
|
54302
54302
|
})(NoteKind || {});
|
|
54303
|
-
var NoteBaseExtension =
|
|
54303
|
+
var NoteBaseExtension = import_core38.Mark.create({
|
|
54304
54304
|
name,
|
|
54305
54305
|
parseHTML() {
|
|
54306
54306
|
return [
|
|
@@ -54357,9 +54357,9 @@ var require_qmsInlineCommentMark = __commonJS({
|
|
|
54357
54357
|
QMSInlineCommentMark: () => QMSInlineCommentMark
|
|
54358
54358
|
});
|
|
54359
54359
|
module2.exports = __toCommonJS2(qmsInlineCommentMark_exports);
|
|
54360
|
-
var
|
|
54360
|
+
var import_core38 = require_dist16();
|
|
54361
54361
|
var NAME2 = "node-uuid";
|
|
54362
|
-
var QMSInlineCommentMark =
|
|
54362
|
+
var QMSInlineCommentMark = import_core38.Mark.create({
|
|
54363
54363
|
name: NAME2,
|
|
54364
54364
|
inline: true,
|
|
54365
54365
|
parseHTML() {
|
|
@@ -54404,9 +54404,9 @@ var require_kit = __commonJS({
|
|
|
54404
54404
|
mergeKitOptions: () => mergeKitOptions
|
|
54405
54405
|
});
|
|
54406
54406
|
module2.exports = __toCommonJS2(kit_exports);
|
|
54407
|
-
var
|
|
54407
|
+
var import_core38 = require_dist16();
|
|
54408
54408
|
function extensionKit(name, fn2) {
|
|
54409
|
-
return
|
|
54409
|
+
return import_core38.Extension.create({
|
|
54410
54410
|
name,
|
|
54411
54411
|
addExtensions() {
|
|
54412
54412
|
const e = /* @__PURE__ */ __name((extension, options) => {
|
|
@@ -61435,9 +61435,9 @@ var require_colors = __commonJS({
|
|
|
61435
61435
|
TextColor: () => TextColor
|
|
61436
61436
|
});
|
|
61437
61437
|
module2.exports = __toCommonJS2(colors_exports);
|
|
61438
|
-
var
|
|
61438
|
+
var import_core38 = require_dist16();
|
|
61439
61439
|
var import_extension_text_style = require_dist20();
|
|
61440
|
-
var BackgroundColor =
|
|
61440
|
+
var BackgroundColor = import_core38.Extension.create({
|
|
61441
61441
|
name: "backgroundColor",
|
|
61442
61442
|
addOptions() {
|
|
61443
61443
|
return {
|
|
@@ -61478,7 +61478,7 @@ var require_colors = __commonJS({
|
|
|
61478
61478
|
};
|
|
61479
61479
|
}
|
|
61480
61480
|
});
|
|
61481
|
-
var TextColor =
|
|
61481
|
+
var TextColor = import_core38.Extension.create({
|
|
61482
61482
|
name: "textColor",
|
|
61483
61483
|
addOptions() {
|
|
61484
61484
|
return {
|
|
@@ -61550,10 +61550,10 @@ var require_inlineComment = __commonJS({
|
|
|
61550
61550
|
InlineCommentPasteFixPlugin: () => InlineCommentPasteFixPlugin
|
|
61551
61551
|
});
|
|
61552
61552
|
module2.exports = __toCommonJS2(inlineComment_exports);
|
|
61553
|
-
var
|
|
61553
|
+
var import_core38 = require_dist16();
|
|
61554
61554
|
var import_model = require_dist10();
|
|
61555
61555
|
var import_state = require_dist5();
|
|
61556
|
-
var InlineCommentMark =
|
|
61556
|
+
var InlineCommentMark = import_core38.Mark.create({
|
|
61557
61557
|
name: "inline-comment",
|
|
61558
61558
|
excludes: "",
|
|
61559
61559
|
inclusive: false,
|
|
@@ -77071,7 +77071,7 @@ var require_client5 = __commonJS({
|
|
|
77071
77071
|
createMarkupOperations: () => createMarkupOperations
|
|
77072
77072
|
});
|
|
77073
77073
|
module2.exports = __toCommonJS2(client_exports);
|
|
77074
|
-
var
|
|
77074
|
+
var import_core38 = require_lib4();
|
|
77075
77075
|
var import_collaborator_client2 = require_lib7();
|
|
77076
77076
|
var import_text3 = require_lib9();
|
|
77077
77077
|
var import_text_markdown3 = require_lib17();
|
|
@@ -77085,8 +77085,8 @@ var require_client5 = __commonJS({
|
|
|
77085
77085
|
this.workspace = workspace;
|
|
77086
77086
|
this.token = token;
|
|
77087
77087
|
this.config = config3;
|
|
77088
|
-
this.refUrl = (0,
|
|
77089
|
-
this.imageUrl = (0,
|
|
77088
|
+
this.refUrl = (0, import_core38.concatLink)(this.url, `/browse?workspace=${workspace}`);
|
|
77089
|
+
this.imageUrl = (0, import_core38.concatLink)(this.url, `/files?workspace=${workspace}&file=`);
|
|
77090
77090
|
this.collaborator = (0, import_collaborator_client2.getClient)(workspace, token, config3.COLLABORATOR_URL);
|
|
77091
77091
|
}
|
|
77092
77092
|
static {
|
|
@@ -77096,7 +77096,7 @@ var require_client5 = __commonJS({
|
|
|
77096
77096
|
imageUrl;
|
|
77097
77097
|
refUrl;
|
|
77098
77098
|
async fetchMarkup(objectClass, objectId, objectAttr, doc, format7) {
|
|
77099
|
-
const collabId = (0,
|
|
77099
|
+
const collabId = (0, import_core38.makeCollabId)(objectClass, objectId, objectAttr);
|
|
77100
77100
|
const markup = await this.collaborator.getMarkup(collabId, doc);
|
|
77101
77101
|
const json3 = (0, import_text3.markupToJSON)(markup);
|
|
77102
77102
|
switch (format7) {
|
|
@@ -77125,7 +77125,7 @@ var require_client5 = __commonJS({
|
|
|
77125
77125
|
default:
|
|
77126
77126
|
throw new Error("Unknown content format");
|
|
77127
77127
|
}
|
|
77128
|
-
const collabId = (0,
|
|
77128
|
+
const collabId = (0, import_core38.makeCollabId)(objectClass, objectId, objectAttr);
|
|
77129
77129
|
return await this.collaborator.createMarkup(collabId, markup);
|
|
77130
77130
|
}
|
|
77131
77131
|
};
|
|
@@ -81609,8 +81609,8 @@ var require_connection2 = __commonJS({
|
|
|
81609
81609
|
});
|
|
81610
81610
|
module2.exports = __toCommonJS2(connection_exports);
|
|
81611
81611
|
var import_analytics = require_lib2();
|
|
81612
|
-
var
|
|
81613
|
-
var
|
|
81612
|
+
var import_client18 = __toESM2(require_lib6());
|
|
81613
|
+
var import_core38 = __toESM2(require_lib4());
|
|
81614
81614
|
var import_platform2 = __toESM2(require_lib());
|
|
81615
81615
|
var import_rpc = require_lib18();
|
|
81616
81616
|
var import_snappyjs = require_snappyjs();
|
|
@@ -81654,7 +81654,7 @@ var require_connection2 = __commonJS({
|
|
|
81654
81654
|
const sKey = "session.id." + this.url;
|
|
81655
81655
|
let sessionId = sessionStorage.getItem(sKey) ?? void 0;
|
|
81656
81656
|
if (sessionId === void 0) {
|
|
81657
|
-
sessionId = (0,
|
|
81657
|
+
sessionId = (0, import_core38.generateId)();
|
|
81658
81658
|
console.log("Generate new SessionId", sessionId);
|
|
81659
81659
|
this.sessionId = sessionId;
|
|
81660
81660
|
} else {
|
|
@@ -81665,7 +81665,7 @@ var require_connection2 = __commonJS({
|
|
|
81665
81665
|
sessionStorage.setItem(sKey, sessionId);
|
|
81666
81666
|
});
|
|
81667
81667
|
} else {
|
|
81668
|
-
this.sessionId = (0,
|
|
81668
|
+
this.sessionId = (0, import_core38.generateId)();
|
|
81669
81669
|
}
|
|
81670
81670
|
this.rpcHandler = opt?.useGlobalRPCHandler === true ? globalRPCHandler : new import_rpc.RPCHandler();
|
|
81671
81671
|
this.pushHandler(handler);
|
|
@@ -81720,7 +81720,7 @@ var require_connection2 = __commonJS({
|
|
|
81720
81720
|
}
|
|
81721
81721
|
if (!this.closed) {
|
|
81722
81722
|
void this.sendRequest({
|
|
81723
|
-
method:
|
|
81723
|
+
method: import_client18.pingConst,
|
|
81724
81724
|
params: [],
|
|
81725
81725
|
once: true,
|
|
81726
81726
|
handleResult: /* @__PURE__ */ __name(async (result) => {
|
|
@@ -81753,7 +81753,7 @@ var require_connection2 = __commonJS({
|
|
|
81753
81753
|
}
|
|
81754
81754
|
}
|
|
81755
81755
|
isConnected() {
|
|
81756
|
-
return this.websocket != null && this.websocket.readyState ===
|
|
81756
|
+
return this.websocket != null && this.websocket.readyState === import_client18.ClientSocketReadyState.OPEN && this.helloReceived;
|
|
81757
81757
|
}
|
|
81758
81758
|
delay = 0;
|
|
81759
81759
|
onConnectHandlers = [];
|
|
@@ -81845,7 +81845,7 @@ var require_connection2 = __commonJS({
|
|
|
81845
81845
|
if (resp.id === -1) {
|
|
81846
81846
|
this.delay = 0;
|
|
81847
81847
|
if (resp.result?.state === "upgrading") {
|
|
81848
|
-
void this.onConnect?.(
|
|
81848
|
+
void this.onConnect?.(import_core38.ClientConnectEvent.Maintenance, void 0, resp.result.stats);
|
|
81849
81849
|
this.upgrading = true;
|
|
81850
81850
|
this.delay = 3;
|
|
81851
81851
|
return;
|
|
@@ -81880,7 +81880,7 @@ var require_connection2 = __commonJS({
|
|
|
81880
81880
|
v.reconnect?.();
|
|
81881
81881
|
}
|
|
81882
81882
|
void this.onConnect?.(
|
|
81883
|
-
helloResp.reconnect === true ?
|
|
81883
|
+
helloResp.reconnect === true ? import_core38.ClientConnectEvent.Reconnected : import_core38.ClientConnectEvent.Connected,
|
|
81884
81884
|
helloResp.lastTx,
|
|
81885
81885
|
this.sessionId
|
|
81886
81886
|
)?.catch((err) => {
|
|
@@ -81893,8 +81893,8 @@ var require_connection2 = __commonJS({
|
|
|
81893
81893
|
}
|
|
81894
81894
|
return;
|
|
81895
81895
|
}
|
|
81896
|
-
if (resp.result ===
|
|
81897
|
-
void this.sendRequest({ method:
|
|
81896
|
+
if (resp.result === import_client18.pingConst) {
|
|
81897
|
+
void this.sendRequest({ method: import_client18.pingConst, params: [] }).catch((err) => {
|
|
81898
81898
|
this.ctx.error("failed to send ping", { err });
|
|
81899
81899
|
});
|
|
81900
81900
|
return;
|
|
@@ -81930,7 +81930,7 @@ var require_connection2 = __commonJS({
|
|
|
81930
81930
|
}
|
|
81931
81931
|
result = result.concat(c.data);
|
|
81932
81932
|
}
|
|
81933
|
-
resp.result = (0,
|
|
81933
|
+
resp.result = (0, import_core38.toFindResult)(result, total, lookupMap);
|
|
81934
81934
|
resp.chunk = void 0;
|
|
81935
81935
|
} else {
|
|
81936
81936
|
return;
|
|
@@ -81974,7 +81974,7 @@ var require_connection2 = __commonJS({
|
|
|
81974
81974
|
} else {
|
|
81975
81975
|
const txArr = Array.isArray(resp.result) ? resp.result : [resp.result];
|
|
81976
81976
|
for (const tx of txArr) {
|
|
81977
|
-
if (tx?._class ===
|
|
81977
|
+
if (tx?._class === import_core38.default.class.TxModelUpgrade) {
|
|
81978
81978
|
console.log("Processing upgrade", this.workspace, this.user);
|
|
81979
81979
|
this.opt?.onUpgrade?.();
|
|
81980
81980
|
return;
|
|
@@ -81986,15 +81986,15 @@ var require_connection2 = __commonJS({
|
|
|
81986
81986
|
}
|
|
81987
81987
|
}
|
|
81988
81988
|
checkArrayBufferPing(data) {
|
|
81989
|
-
if (data.byteLength ===
|
|
81989
|
+
if (data.byteLength === import_client18.pingConst.length || data.byteLength === import_client18.pongConst.length) {
|
|
81990
81990
|
const text = new TextDecoder().decode(data);
|
|
81991
|
-
if (text ===
|
|
81992
|
-
void this.sendRequest({ method:
|
|
81991
|
+
if (text === import_client18.pingConst) {
|
|
81992
|
+
void this.sendRequest({ method: import_client18.pingConst, params: [] }).catch((err) => {
|
|
81993
81993
|
this.ctx.error("failed to send ping", { err });
|
|
81994
81994
|
});
|
|
81995
81995
|
return true;
|
|
81996
81996
|
}
|
|
81997
|
-
if (text ===
|
|
81997
|
+
if (text === import_client18.pongConst) {
|
|
81998
81998
|
this.pingResponse = Date.now();
|
|
81999
81999
|
return true;
|
|
82000
82000
|
}
|
|
@@ -82004,7 +82004,7 @@ var require_connection2 = __commonJS({
|
|
|
82004
82004
|
openConnection(ctx, socketId) {
|
|
82005
82005
|
this.binaryMode = false;
|
|
82006
82006
|
this.helloReceived = false;
|
|
82007
|
-
const clientSocketFactory = this.opt?.socketFactory ?? (0, import_platform2.getMetadata)(
|
|
82007
|
+
const clientSocketFactory = this.opt?.socketFactory ?? (0, import_platform2.getMetadata)(import_client18.default.metadata.ClientSocketFactory) ?? ((url4) => {
|
|
82008
82008
|
const s = new WebSocket(url4);
|
|
82009
82009
|
return s;
|
|
82010
82010
|
});
|
|
@@ -82039,12 +82039,12 @@ var require_connection2 = __commonJS({
|
|
|
82039
82039
|
if (this.websocket !== wsocket) {
|
|
82040
82040
|
return;
|
|
82041
82041
|
}
|
|
82042
|
-
if (event.data ===
|
|
82042
|
+
if (event.data === import_client18.pongConst) {
|
|
82043
82043
|
this.pingResponse = Date.now();
|
|
82044
82044
|
return;
|
|
82045
82045
|
}
|
|
82046
|
-
if (event.data ===
|
|
82047
|
-
void this.sendRequest({ method:
|
|
82046
|
+
if (event.data === import_client18.pingConst) {
|
|
82047
|
+
void this.sendRequest({ method: import_client18.pingConst, params: [] }).catch((err) => {
|
|
82048
82048
|
this.ctx.error("failed to send ping", { err });
|
|
82049
82049
|
});
|
|
82050
82050
|
return;
|
|
@@ -82109,8 +82109,8 @@ var require_connection2 = __commonJS({
|
|
|
82109
82109
|
if (this.websocket !== wsocket) {
|
|
82110
82110
|
return;
|
|
82111
82111
|
}
|
|
82112
|
-
const useBinary = this.opt?.useBinaryProtocol ?? (0, import_platform2.getMetadata)(
|
|
82113
|
-
this.compressionMode = this.opt?.useProtocolCompression ?? (0, import_platform2.getMetadata)(
|
|
82112
|
+
const useBinary = this.opt?.useBinaryProtocol ?? (0, import_platform2.getMetadata)(import_client18.default.metadata.UseBinaryProtocol) ?? true;
|
|
82113
|
+
this.compressionMode = this.opt?.useProtocolCompression ?? (0, import_platform2.getMetadata)(import_client18.default.metadata.UseProtocolCompression) ?? false;
|
|
82114
82114
|
const helloRequest = {
|
|
82115
82115
|
method: "hello",
|
|
82116
82116
|
params: [],
|
|
@@ -82156,13 +82156,13 @@ var require_connection2 = __commonJS({
|
|
|
82156
82156
|
if (w instanceof Promise) {
|
|
82157
82157
|
await w;
|
|
82158
82158
|
}
|
|
82159
|
-
if (data.method !==
|
|
82159
|
+
if (data.method !== import_client18.pingConst) {
|
|
82160
82160
|
this.requests.set(id, promise4);
|
|
82161
82161
|
}
|
|
82162
82162
|
promise4.sendData = () => {
|
|
82163
|
-
if (this.websocket?.readyState ===
|
|
82163
|
+
if (this.websocket?.readyState === import_client18.ClientSocketReadyState.OPEN) {
|
|
82164
82164
|
promise4.startTime = Date.now();
|
|
82165
|
-
if (data.method !==
|
|
82165
|
+
if (data.method !== import_client18.pingConst) {
|
|
82166
82166
|
const dta = this.rpcHandler.serialize(
|
|
82167
82167
|
{
|
|
82168
82168
|
method: data.method,
|
|
@@ -82175,7 +82175,7 @@ var require_connection2 = __commonJS({
|
|
|
82175
82175
|
);
|
|
82176
82176
|
this.websocket?.send(dta);
|
|
82177
82177
|
} else {
|
|
82178
|
-
this.websocket?.send(
|
|
82178
|
+
this.websocket?.send(import_client18.pingConst);
|
|
82179
82179
|
}
|
|
82180
82180
|
}
|
|
82181
82181
|
};
|
|
@@ -82189,7 +82189,7 @@ var require_connection2 = __commonJS({
|
|
|
82189
82189
|
};
|
|
82190
82190
|
}
|
|
82191
82191
|
promise4.sendData();
|
|
82192
|
-
if (data.method !==
|
|
82192
|
+
if (data.method !== import_client18.pingConst) {
|
|
82193
82193
|
return await promise4.promise;
|
|
82194
82194
|
}
|
|
82195
82195
|
},
|
|
@@ -82204,7 +82204,7 @@ var require_connection2 = __commonJS({
|
|
|
82204
82204
|
}
|
|
82205
82205
|
getAccount() {
|
|
82206
82206
|
if (this.account !== void 0) {
|
|
82207
|
-
return Promise.resolve((0,
|
|
82207
|
+
return Promise.resolve((0, import_core38.clone)(this.account));
|
|
82208
82208
|
}
|
|
82209
82209
|
return this.sendRequest({ method: "getAccount", params: [] });
|
|
82210
82210
|
}
|
|
@@ -82262,10 +82262,10 @@ var require_connection2 = __commonJS({
|
|
|
82262
82262
|
method: "tx",
|
|
82263
82263
|
params: [tx],
|
|
82264
82264
|
retry: /* @__PURE__ */ __name(async () => {
|
|
82265
|
-
if (tx._class ===
|
|
82266
|
-
return (await this.findAll(
|
|
82265
|
+
if (tx._class === import_core38.default.class.TxApplyIf) {
|
|
82266
|
+
return (await this.findAll(import_core38.default.class.Tx, { _id: tx.txes[0]._id }, { limit: 1 })).length === 0;
|
|
82267
82267
|
}
|
|
82268
|
-
return (await this.findAll(
|
|
82268
|
+
return (await this.findAll(import_core38.default.class.Tx, { _id: tx._id }, { limit: 1 })).length === 0;
|
|
82269
82269
|
}, "retry")
|
|
82270
82270
|
});
|
|
82271
82271
|
}
|
|
@@ -82305,7 +82305,7 @@ var require_connection2 = __commonJS({
|
|
|
82305
82305
|
};
|
|
82306
82306
|
function connect(url4, handler, workspace, user, opt) {
|
|
82307
82307
|
return new Connection(
|
|
82308
|
-
opt?.ctx?.newChild?.("connection", {}) ?? new
|
|
82308
|
+
opt?.ctx?.newChild?.("connection", {}) ?? new import_core38.MeasureMetricsContext("connection", {}),
|
|
82309
82309
|
url4,
|
|
82310
82310
|
handler,
|
|
82311
82311
|
workspace,
|
|
@@ -82355,14 +82355,14 @@ var require_lib19 = __commonJS({
|
|
|
82355
82355
|
default: () => index_default
|
|
82356
82356
|
});
|
|
82357
82357
|
module2.exports = __toCommonJS2(index_exports2);
|
|
82358
|
-
var
|
|
82359
|
-
var
|
|
82358
|
+
var import_client18 = __toESM2(require_lib6());
|
|
82359
|
+
var import_core38 = __toESM2(require_lib4());
|
|
82360
82360
|
var import_platform2 = __toESM2(require_lib());
|
|
82361
82361
|
var import_connection = require_connection2();
|
|
82362
82362
|
var dbRequest;
|
|
82363
82363
|
var dbPromise = Promise.resolve(void 0);
|
|
82364
82364
|
if (typeof localStorage !== "undefined") {
|
|
82365
|
-
const st = (0,
|
|
82365
|
+
const st = (0, import_core38.platformNow)();
|
|
82366
82366
|
dbPromise = new Promise((resolve2) => {
|
|
82367
82367
|
dbRequest = indexedDB.open("model.db.persistence", 2);
|
|
82368
82368
|
dbRequest.onupgradeneeded = function() {
|
|
@@ -82373,7 +82373,7 @@ var require_lib19 = __commonJS({
|
|
|
82373
82373
|
};
|
|
82374
82374
|
dbRequest.onsuccess = function() {
|
|
82375
82375
|
const db = dbRequest.result;
|
|
82376
|
-
console.log("init DB complete", (0,
|
|
82376
|
+
console.log("init DB complete", (0, import_core38.platformNow)() - st);
|
|
82377
82377
|
resolve2(db);
|
|
82378
82378
|
};
|
|
82379
82379
|
});
|
|
@@ -82399,19 +82399,19 @@ var require_lib19 = __commonJS({
|
|
|
82399
82399
|
return {
|
|
82400
82400
|
function: {
|
|
82401
82401
|
GetClient: /* @__PURE__ */ __name(async (token, endpoint, opt) => {
|
|
82402
|
-
const filterModel = (0, import_platform2.getMetadata)(
|
|
82403
|
-
const extraFilter = (0, import_platform2.getMetadata)(
|
|
82402
|
+
const filterModel = (0, import_platform2.getMetadata)(import_client18.default.metadata.FilterModel) ?? "none";
|
|
82403
|
+
const extraFilter = (0, import_platform2.getMetadata)(import_client18.default.metadata.ExtraFilter) ?? [];
|
|
82404
82404
|
const handler = /* @__PURE__ */ __name(async (handler2) => {
|
|
82405
|
-
const url4 = (0,
|
|
82405
|
+
const url4 = (0, import_core38.concatLink)(endpoint, `/${token}`);
|
|
82406
82406
|
const upgradeHandler = /* @__PURE__ */ __name((...txes) => {
|
|
82407
82407
|
for (const tx of txes) {
|
|
82408
|
-
if (tx?._class ===
|
|
82408
|
+
if (tx?._class === import_core38.default.class.TxModelUpgrade) {
|
|
82409
82409
|
opt?.onUpgrade?.();
|
|
82410
82410
|
return;
|
|
82411
82411
|
}
|
|
82412
|
-
if (tx?._class ===
|
|
82412
|
+
if (tx?._class === import_core38.default.class.TxWorkspaceEvent) {
|
|
82413
82413
|
const event = tx;
|
|
82414
|
-
if (event.event ===
|
|
82414
|
+
if (event.event === import_core38.WorkspaceEvent.MaintenanceNotification) {
|
|
82415
82415
|
void (0, import_platform2.setPlatformStatus)(
|
|
82416
82416
|
new import_platform2.Status(import_platform2.Severity.WARNING, import_platform2.default.status.MaintenanceWarning, {
|
|
82417
82417
|
time: event.params.timeMinutes,
|
|
@@ -82428,7 +82428,7 @@ var require_lib19 = __commonJS({
|
|
|
82428
82428
|
throw new Error("Workspace or account not found in token");
|
|
82429
82429
|
}
|
|
82430
82430
|
const newOpt = { ...opt };
|
|
82431
|
-
const connectTimeout = opt?.connectionTimeout ?? (0, import_platform2.getMetadata)(
|
|
82431
|
+
const connectTimeout = opt?.connectionTimeout ?? (0, import_platform2.getMetadata)(import_client18.default.metadata.ConnectionTimeout);
|
|
82432
82432
|
let connectPromise;
|
|
82433
82433
|
if ((connectTimeout ?? 0) > 0) {
|
|
82434
82434
|
connectPromise = new Promise((resolve2, reject) => {
|
|
@@ -82449,7 +82449,7 @@ var require_lib19 = __commonJS({
|
|
|
82449
82449
|
reject(error2);
|
|
82450
82450
|
return;
|
|
82451
82451
|
}
|
|
82452
|
-
if (event !==
|
|
82452
|
+
if (event !== import_core38.ClientConnectEvent.Maintenance) {
|
|
82453
82453
|
clearTimeout(connectTO);
|
|
82454
82454
|
resolve2();
|
|
82455
82455
|
}
|
|
@@ -82471,7 +82471,7 @@ var require_lib19 = __commonJS({
|
|
|
82471
82471
|
}
|
|
82472
82472
|
return txes;
|
|
82473
82473
|
}, "modelFilter");
|
|
82474
|
-
const client = (0,
|
|
82474
|
+
const client = (0, import_core38.createClient)(handler, modelFilter, createModelPersistence(getWSFromToken(token)), opt?.ctx);
|
|
82475
82475
|
return await client;
|
|
82476
82476
|
}, "GetClient")
|
|
82477
82477
|
}
|
|
@@ -82479,17 +82479,17 @@ var require_lib19 = __commonJS({
|
|
|
82479
82479
|
}, "default");
|
|
82480
82480
|
function returnUITxes(txes, extraFilter) {
|
|
82481
82481
|
const configs = /* @__PURE__ */ new Map();
|
|
82482
|
-
(0,
|
|
82483
|
-
const allowedPlugins = [...(0, import_platform2.getPlugins)(), ...(0, import_platform2.getMetadata)(
|
|
82482
|
+
(0, import_core38.fillConfiguration)(txes, configs);
|
|
82483
|
+
const allowedPlugins = [...(0, import_platform2.getPlugins)(), ...(0, import_platform2.getMetadata)(import_client18.default.metadata.ExtraPlugins) ?? []];
|
|
82484
82484
|
const excludedPlugins = Array.from(configs.values()).filter(
|
|
82485
82485
|
(it) => !it.enabled || !allowedPlugins.includes(it.pluginId) || extraFilter.includes(it.pluginId)
|
|
82486
82486
|
);
|
|
82487
|
-
return (0,
|
|
82487
|
+
return (0, import_core38.pluginFilterTx)(excludedPlugins, configs, txes);
|
|
82488
82488
|
}
|
|
82489
82489
|
__name(returnUITxes, "returnUITxes");
|
|
82490
82490
|
function returnClientTxes(txes) {
|
|
82491
82491
|
const configs = /* @__PURE__ */ new Map();
|
|
82492
|
-
(0,
|
|
82492
|
+
(0, import_core38.fillConfiguration)(txes, configs);
|
|
82493
82493
|
const excludedPlugins = Array.from(configs.values()).filter((it) => !it.enabled || it.pluginId.startsWith("server-"));
|
|
82494
82494
|
const toExclude = /* @__PURE__ */ new Set([
|
|
82495
82495
|
"workbench:class:Application",
|
|
@@ -82515,8 +82515,8 @@ var require_lib19 = __commonJS({
|
|
|
82515
82515
|
"setting:class:WorkspaceSettingCategory",
|
|
82516
82516
|
"notification:class:NotificationProvider"
|
|
82517
82517
|
]);
|
|
82518
|
-
const result = (0,
|
|
82519
|
-
if (tx?._class ===
|
|
82518
|
+
const result = (0, import_core38.pluginFilterTx)(excludedPlugins, configs, txes).filter((tx) => {
|
|
82519
|
+
if (tx?._class === import_core38.default.class.TxCreateDoc || tx?._class === import_core38.default.class.TxUpdateDoc || tx?._class === import_core38.default.class.TxRemoveDoc) {
|
|
82520
82520
|
const cud = tx;
|
|
82521
82521
|
if (toExclude.has(cud.objectClass)) {
|
|
82522
82522
|
return false;
|
|
@@ -82528,7 +82528,7 @@ var require_lib19 = __commonJS({
|
|
|
82528
82528
|
}
|
|
82529
82529
|
__name(returnClientTxes, "returnClientTxes");
|
|
82530
82530
|
function createModelPersistence(workspace) {
|
|
82531
|
-
const overrideStore = (0, import_platform2.getMetadata)(
|
|
82531
|
+
const overrideStore = (0, import_platform2.getMetadata)(import_client18.default.metadata.OverridePersistenceStore);
|
|
82532
82532
|
if (overrideStore !== void 0) {
|
|
82533
82533
|
return overrideStore;
|
|
82534
82534
|
}
|
|
@@ -82625,8 +82625,8 @@ var require_client6 = __commonJS({
|
|
|
82625
82625
|
});
|
|
82626
82626
|
module2.exports = __toCommonJS2(client_exports);
|
|
82627
82627
|
var import_account_client2 = require_lib5();
|
|
82628
|
-
var
|
|
82629
|
-
var
|
|
82628
|
+
var import_client18 = __toESM2(require_lib6());
|
|
82629
|
+
var import_core38 = require_lib4();
|
|
82630
82630
|
var import_platform2 = require_lib();
|
|
82631
82631
|
var import_config8 = require_config();
|
|
82632
82632
|
var import_markup = require_markup();
|
|
@@ -82643,7 +82643,7 @@ var require_client6 = __commonJS({
|
|
|
82643
82643
|
const account = {
|
|
82644
82644
|
uuid: wsLoginInfo.account,
|
|
82645
82645
|
role: wsLoginInfo.role,
|
|
82646
|
-
primarySocialId: (0,
|
|
82646
|
+
primarySocialId: (0, import_core38.pickPrimarySocialId)(socialIds)._id,
|
|
82647
82647
|
socialIds: socialIds.map((si) => si._id),
|
|
82648
82648
|
fullSocialIds: socialIds
|
|
82649
82649
|
};
|
|
@@ -82651,9 +82651,9 @@ var require_client6 = __commonJS({
|
|
|
82651
82651
|
}
|
|
82652
82652
|
__name(connect, "connect");
|
|
82653
82653
|
async function createClient(url4, endpoint, token, workspaceUuid, account, config3, options) {
|
|
82654
|
-
(0, import_platform2.addLocation)(
|
|
82654
|
+
(0, import_platform2.addLocation)(import_client18.clientId, () => Promise.resolve().then(() => __toESM(require_lib19())));
|
|
82655
82655
|
const { socketFactory, connectionTimeout } = options;
|
|
82656
|
-
const clientFactory = await (0, import_platform2.getResource)(
|
|
82656
|
+
const clientFactory = await (0, import_platform2.getResource)(import_client18.default.function.GetClient);
|
|
82657
82657
|
const connection = await clientFactory(token, endpoint, {
|
|
82658
82658
|
socketFactory,
|
|
82659
82659
|
connectionTimeout
|
|
@@ -82669,7 +82669,7 @@ var require_client6 = __commonJS({
|
|
|
82669
82669
|
this.config = config3;
|
|
82670
82670
|
this.connection = connection;
|
|
82671
82671
|
this.account = account;
|
|
82672
|
-
this.client = new
|
|
82672
|
+
this.client = new import_core38.TxOperations(connection, account.primarySocialId);
|
|
82673
82673
|
this.markup = (0, import_markup.createMarkupOperations)(url4, workspace, token, config3);
|
|
82674
82674
|
}
|
|
82675
82675
|
static {
|
|
@@ -82709,7 +82709,7 @@ var require_client6 = __commonJS({
|
|
|
82709
82709
|
}
|
|
82710
82710
|
// DocOperations
|
|
82711
82711
|
async createDoc(_class, space, attributes, id) {
|
|
82712
|
-
id ??= (0,
|
|
82712
|
+
id ??= (0, import_core38.generateId)();
|
|
82713
82713
|
const data = await this.processMarkup(_class, id, attributes);
|
|
82714
82714
|
return await this.client.createDoc(_class, space, data, id);
|
|
82715
82715
|
}
|
|
@@ -82722,7 +82722,7 @@ var require_client6 = __commonJS({
|
|
|
82722
82722
|
}
|
|
82723
82723
|
// CollectionOperations
|
|
82724
82724
|
async addCollection(_class, space, attachedTo, attachedToClass, collection, attributes, id) {
|
|
82725
|
-
id ??= (0,
|
|
82725
|
+
id ??= (0, import_core38.generateId)();
|
|
82726
82726
|
const data = await this.processMarkup(_class, id, attributes);
|
|
82727
82727
|
return await this.client.addCollection(_class, space, attachedTo, attachedToClass, collection, data, id);
|
|
82728
82728
|
}
|
|
@@ -83049,7 +83049,7 @@ var require_rest = __commonJS({
|
|
|
83049
83049
|
createRestClient: () => createRestClient
|
|
83050
83050
|
});
|
|
83051
83051
|
module2.exports = __toCommonJS2(rest_exports);
|
|
83052
|
-
var
|
|
83052
|
+
var import_core38 = require_lib4();
|
|
83053
83053
|
var import_platform2 = require_lib();
|
|
83054
83054
|
var import_utils14 = require_utils9();
|
|
83055
83055
|
var import_utils22 = require_utils10();
|
|
@@ -83104,7 +83104,7 @@ var require_rest = __commonJS({
|
|
|
83104
83104
|
if (options !== void 0 && Object.keys(options).length > 0) {
|
|
83105
83105
|
params.append("options", JSON.stringify(options));
|
|
83106
83106
|
}
|
|
83107
|
-
const requestUrl = (0,
|
|
83107
|
+
const requestUrl = (0, import_core38.concatLink)(this.endpoint, `/api/v1/find-all/${this.workspace}?${params.toString()}`);
|
|
83108
83108
|
const result = await (0, import_utils22.withRetry)(async () => {
|
|
83109
83109
|
const response = await fetch(requestUrl, this.requestInit());
|
|
83110
83110
|
if (!response.ok) {
|
|
@@ -83178,7 +83178,7 @@ var require_rest = __commonJS({
|
|
|
83178
83178
|
}
|
|
83179
83179
|
}
|
|
83180
83180
|
async getAccount() {
|
|
83181
|
-
const requestUrl = (0,
|
|
83181
|
+
const requestUrl = (0, import_core38.concatLink)(this.endpoint, `/api/v1/account/${this.workspace}`);
|
|
83182
83182
|
await this.checkRate();
|
|
83183
83183
|
const result = await (0, import_utils22.withRetry)(async () => {
|
|
83184
83184
|
const response = await fetch(requestUrl, this.requestInit());
|
|
@@ -83195,7 +83195,7 @@ var require_rest = __commonJS({
|
|
|
83195
83195
|
return result;
|
|
83196
83196
|
}
|
|
83197
83197
|
async getModel(full = false) {
|
|
83198
|
-
const requestUrl = new URL((0,
|
|
83198
|
+
const requestUrl = new URL((0, import_core38.concatLink)(this.endpoint, `/api/v1/load-model/${this.workspace}`));
|
|
83199
83199
|
if (full) {
|
|
83200
83200
|
requestUrl.searchParams.append("full", "true");
|
|
83201
83201
|
}
|
|
@@ -83208,10 +83208,10 @@ var require_rest = __commonJS({
|
|
|
83208
83208
|
}
|
|
83209
83209
|
this.updateRateLimit(response);
|
|
83210
83210
|
const modelResponse = await (0, import_utils22.extractJson)(response);
|
|
83211
|
-
const hierarchy = new
|
|
83212
|
-
const model = new
|
|
83213
|
-
const ctx = new
|
|
83214
|
-
(0,
|
|
83211
|
+
const hierarchy = new import_core38.Hierarchy();
|
|
83212
|
+
const model = new import_core38.ModelDb(hierarchy);
|
|
83213
|
+
const ctx = new import_core38.MeasureMetricsContext("loadModel", {});
|
|
83214
|
+
(0, import_core38.buildModel)(ctx, modelResponse, void 0, hierarchy, model);
|
|
83215
83215
|
return { hierarchy, model };
|
|
83216
83216
|
}, isRLE);
|
|
83217
83217
|
if (result.error !== void 0) {
|
|
@@ -83223,7 +83223,7 @@ var require_rest = __commonJS({
|
|
|
83223
83223
|
return (await this.findAll(_class, query, { ...options, limit: 1 })).shift();
|
|
83224
83224
|
}
|
|
83225
83225
|
async tx(tx) {
|
|
83226
|
-
const requestUrl = (0,
|
|
83226
|
+
const requestUrl = (0, import_core38.concatLink)(this.endpoint, `/api/v1/tx/${this.workspace}`);
|
|
83227
83227
|
await this.checkRate();
|
|
83228
83228
|
const result = await (0, import_utils22.withRetry)(async () => {
|
|
83229
83229
|
const response = await fetch(requestUrl, {
|
|
@@ -83257,7 +83257,7 @@ var require_rest = __commonJS({
|
|
|
83257
83257
|
if (options.limit != null) {
|
|
83258
83258
|
params.append("limit", `${options.limit}`);
|
|
83259
83259
|
}
|
|
83260
|
-
const requestUrl = (0,
|
|
83260
|
+
const requestUrl = (0, import_core38.concatLink)(this.endpoint, `/api/v1/search-fulltext/${this.workspace}?${params.toString()}`);
|
|
83261
83261
|
const response = await fetch(requestUrl, {
|
|
83262
83262
|
method: "GET",
|
|
83263
83263
|
headers: this.jsonHeaders(),
|
|
@@ -83276,7 +83276,7 @@ var require_rest = __commonJS({
|
|
|
83276
83276
|
return result;
|
|
83277
83277
|
}
|
|
83278
83278
|
async domainRequest(domain3, params, options) {
|
|
83279
|
-
const requestUrl = (0,
|
|
83279
|
+
const requestUrl = (0, import_core38.concatLink)(this.endpoint, `/api/v1/request/${domain3}/${this.workspace}`);
|
|
83280
83280
|
await this.checkRate();
|
|
83281
83281
|
return await (0, import_utils22.withRetry)(async () => {
|
|
83282
83282
|
const response = await fetch(requestUrl, {
|
|
@@ -83295,7 +83295,7 @@ var require_rest = __commonJS({
|
|
|
83295
83295
|
}, isRLE);
|
|
83296
83296
|
}
|
|
83297
83297
|
async ensurePerson(socialType, socialValue, firstName, lastName) {
|
|
83298
|
-
const requestUrl = (0,
|
|
83298
|
+
const requestUrl = (0, import_core38.concatLink)(this.endpoint, `/api/v1/ensure-person/${this.workspace}`);
|
|
83299
83299
|
await this.checkRate();
|
|
83300
83300
|
const result = await (0, import_utils22.withRetry)(async () => {
|
|
83301
83301
|
const response = await fetch(requestUrl, {
|
|
@@ -83352,13 +83352,13 @@ var require_tx2 = __commonJS({
|
|
|
83352
83352
|
createRestTxOperations: () => createRestTxOperations2
|
|
83353
83353
|
});
|
|
83354
83354
|
module2.exports = __toCommonJS2(tx_exports);
|
|
83355
|
-
var
|
|
83355
|
+
var import_core38 = require_lib4();
|
|
83356
83356
|
var import_rest = require_rest();
|
|
83357
83357
|
async function createRestTxOperations2(endpoint, workspaceId, token, fullModel = false) {
|
|
83358
83358
|
const restClient = new import_rest.RestClientImpl(endpoint, workspaceId, token);
|
|
83359
83359
|
const account = await restClient.getAccount();
|
|
83360
83360
|
const { hierarchy, model } = await restClient.getModel(fullModel);
|
|
83361
|
-
return new
|
|
83361
|
+
return new import_core38.TxOperations(new RestTxClient(restClient, hierarchy, model, account), account.socialIds[0]);
|
|
83362
83362
|
}
|
|
83363
83363
|
__name(createRestTxOperations2, "createRestTxOperations");
|
|
83364
83364
|
var RestTxClient = class {
|
|
@@ -83379,7 +83379,7 @@ var require_tx2 = __commonJS({
|
|
|
83379
83379
|
const result = data.map((v) => {
|
|
83380
83380
|
return this.hierarchy.updateLookupMixin(_class, v, options);
|
|
83381
83381
|
});
|
|
83382
|
-
return (0,
|
|
83382
|
+
return (0, import_core38.toFindResult)(result, data.total);
|
|
83383
83383
|
}
|
|
83384
83384
|
async domainRequest(domain3, params, options) {
|
|
83385
83385
|
return await this.client.domainRequest(domain3, params, options);
|
|
@@ -83561,7 +83561,7 @@ var require_client7 = __commonJS({
|
|
|
83561
83561
|
createStorageClient: () => createStorageClient2
|
|
83562
83562
|
});
|
|
83563
83563
|
module2.exports = __toCommonJS2(client_exports);
|
|
83564
|
-
var
|
|
83564
|
+
var import_core38 = __toESM2(require_lib4());
|
|
83565
83565
|
var import_stream2 = require("stream");
|
|
83566
83566
|
var import_config8 = require_config();
|
|
83567
83567
|
var import_error = require_error3();
|
|
@@ -83598,13 +83598,13 @@ var require_client7 = __commonJS({
|
|
|
83598
83598
|
const size13 = parseInt(headers.get("Content-Length") ?? "0", 10);
|
|
83599
83599
|
return {
|
|
83600
83600
|
provider: "",
|
|
83601
|
-
_class:
|
|
83601
|
+
_class: import_core38.default.class.Blob,
|
|
83602
83602
|
_id: objectName,
|
|
83603
83603
|
contentType: headers.get("Content-Type") ?? "",
|
|
83604
83604
|
size: isNaN(size13) ? 0 : size13 ?? 0,
|
|
83605
83605
|
etag: headers.get("ETag") ?? "",
|
|
83606
|
-
space:
|
|
83607
|
-
modifiedBy:
|
|
83606
|
+
space: import_core38.default.space.Configuration,
|
|
83607
|
+
modifiedBy: import_core38.default.account.System,
|
|
83608
83608
|
modifiedOn: isNaN(lastModified) ? 0 : lastModified,
|
|
83609
83609
|
version: null
|
|
83610
83610
|
};
|
|
@@ -83639,11 +83639,11 @@ var require_client7 = __commonJS({
|
|
|
83639
83639
|
if (Object.hasOwn(result[0], "id")) {
|
|
83640
83640
|
const fileResult = result[0];
|
|
83641
83641
|
return {
|
|
83642
|
-
_class:
|
|
83642
|
+
_class: import_core38.default.class.Blob,
|
|
83643
83643
|
_id: fileResult.id,
|
|
83644
|
-
space:
|
|
83644
|
+
space: import_core38.default.space.Configuration,
|
|
83645
83645
|
modifiedOn: fileResult.metadata.lastModified,
|
|
83646
|
-
modifiedBy:
|
|
83646
|
+
modifiedBy: import_core38.default.account.System,
|
|
83647
83647
|
provider: "",
|
|
83648
83648
|
contentType: fileResult.metadata.contentType,
|
|
83649
83649
|
etag: fileResult.metadata.etag,
|
|
@@ -83717,11 +83717,11 @@ var require_client7 = __commonJS({
|
|
|
83717
83717
|
async function connectStorage(url4, options, config3) {
|
|
83718
83718
|
config3 ??= await (0, import_config8.loadServerConfig)(url4);
|
|
83719
83719
|
const token = await (0, import_utils14.getWorkspaceToken)(url4, options, config3);
|
|
83720
|
-
const filesUrl = (config3.FILES_URL.startsWith("/") ? (0,
|
|
83720
|
+
const filesUrl = (config3.FILES_URL.startsWith("/") ? (0, import_core38.concatLink)(url4, config3.FILES_URL) : config3.FILES_URL).replace(
|
|
83721
83721
|
":workspace",
|
|
83722
83722
|
token.workspaceId
|
|
83723
83723
|
);
|
|
83724
|
-
const uploadUrl = (config3.UPLOAD_URL.startsWith("/") ? (0,
|
|
83724
|
+
const uploadUrl = (config3.UPLOAD_URL.startsWith("/") ? (0, import_core38.concatLink)(url4, config3.UPLOAD_URL) : config3.UPLOAD_URL).replace(":workspace", token.workspaceId);
|
|
83725
83725
|
return new StorageClientImpl(filesUrl, uploadUrl, token.token, token.workspaceId);
|
|
83726
83726
|
}
|
|
83727
83727
|
__name(connectStorage, "connectStorage");
|
|
@@ -83774,11 +83774,11 @@ var require_storage2 = __commonJS({
|
|
|
83774
83774
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
83775
83775
|
var storage_exports = {};
|
|
83776
83776
|
__export2(storage_exports, {
|
|
83777
|
-
connectStorage: () =>
|
|
83778
|
-
createStorageClient: () =>
|
|
83777
|
+
connectStorage: () => import_client18.connectStorage,
|
|
83778
|
+
createStorageClient: () => import_client18.createStorageClient
|
|
83779
83779
|
});
|
|
83780
83780
|
module2.exports = __toCommonJS2(storage_exports);
|
|
83781
|
-
var
|
|
83781
|
+
var import_client18 = require_client7();
|
|
83782
83782
|
__reExport2(storage_exports, require_error3(), module2.exports);
|
|
83783
83783
|
__reExport2(storage_exports, require_types8(), module2.exports);
|
|
83784
83784
|
}
|
|
@@ -84434,7 +84434,7 @@ var require_utils11 = __commonJS({
|
|
|
84434
84434
|
getWeekday: () => getWeekday
|
|
84435
84435
|
});
|
|
84436
84436
|
module2.exports = __toCommonJS2(utils_exports);
|
|
84437
|
-
var
|
|
84437
|
+
var import_core38 = require_lib4();
|
|
84438
84438
|
var import__ = __toESM2(require_lib24());
|
|
84439
84439
|
function getInstance(event, date7) {
|
|
84440
84440
|
const diff8 = event.dueDate - event.date;
|
|
@@ -84446,7 +84446,7 @@ var require_utils11 = __commonJS({
|
|
|
84446
84446
|
originalStartTime: date7,
|
|
84447
84447
|
_class: import__.default.class.ReccuringInstance,
|
|
84448
84448
|
eventId: generateEventId2(),
|
|
84449
|
-
_id: (0,
|
|
84449
|
+
_id: (0, import_core38.generateId)(),
|
|
84450
84450
|
virtual: true
|
|
84451
84451
|
};
|
|
84452
84452
|
}
|
|
@@ -84759,7 +84759,7 @@ var require_utils11 = __commonJS({
|
|
|
84759
84759
|
}
|
|
84760
84760
|
__name(getAllEvents, "getAllEvents");
|
|
84761
84761
|
function generateEventId2() {
|
|
84762
|
-
const id = (0,
|
|
84762
|
+
const id = (0, import_core38.generateId)();
|
|
84763
84763
|
return encodeToBase32Hex(id);
|
|
84764
84764
|
}
|
|
84765
84765
|
__name(generateEventId2, "generateEventId");
|
|
@@ -84977,6 +84977,164 @@ var require_lib24 = __commonJS({
|
|
|
84977
84977
|
}
|
|
84978
84978
|
});
|
|
84979
84979
|
|
|
84980
|
+
// node_modules/.pnpm/@hcengineering+card@0.7.0/node_modules/@hcengineering/card/lib/analytics.js
|
|
84981
|
+
var require_analytics3 = __commonJS({
|
|
84982
|
+
"node_modules/.pnpm/@hcengineering+card@0.7.0/node_modules/@hcengineering/card/lib/analytics.js"(exports2, module2) {
|
|
84983
|
+
"use strict";
|
|
84984
|
+
var __defProp2 = Object.defineProperty;
|
|
84985
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
84986
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
84987
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
84988
|
+
var __export2 = (target, all8) => {
|
|
84989
|
+
for (var name in all8)
|
|
84990
|
+
__defProp2(target, name, { get: all8[name], enumerable: true });
|
|
84991
|
+
};
|
|
84992
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
84993
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
84994
|
+
for (let key of __getOwnPropNames2(from))
|
|
84995
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
84996
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
84997
|
+
}
|
|
84998
|
+
return to;
|
|
84999
|
+
};
|
|
85000
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
85001
|
+
var analytics_exports = {};
|
|
85002
|
+
__export2(analytics_exports, {
|
|
85003
|
+
CardEvents: () => CardEvents
|
|
85004
|
+
});
|
|
85005
|
+
module2.exports = __toCommonJS2(analytics_exports);
|
|
85006
|
+
var CardEvents = /* @__PURE__ */ ((CardEvents2) => {
|
|
85007
|
+
CardEvents2["TypeCreated"] = "card.card.TypeCreated";
|
|
85008
|
+
CardEvents2["TagCreated"] = "card.card.TagCreated";
|
|
85009
|
+
CardEvents2["RelationCreated"] = "card.card.RelationCreated";
|
|
85010
|
+
CardEvents2["CardCreated"] = "card.card.Created";
|
|
85011
|
+
CardEvents2["CardOpened"] = "card.card.Opened";
|
|
85012
|
+
CardEvents2["TypeChanged"] = "card.card.TypeChanged";
|
|
85013
|
+
return CardEvents2;
|
|
85014
|
+
})(CardEvents || {});
|
|
85015
|
+
}
|
|
85016
|
+
});
|
|
85017
|
+
|
|
85018
|
+
// node_modules/.pnpm/@hcengineering+card@0.7.0/node_modules/@hcengineering/card/lib/index.js
|
|
85019
|
+
var require_lib25 = __commonJS({
|
|
85020
|
+
"node_modules/.pnpm/@hcengineering+card@0.7.0/node_modules/@hcengineering/card/lib/index.js"(exports2, module2) {
|
|
85021
|
+
"use strict";
|
|
85022
|
+
var __defProp2 = Object.defineProperty;
|
|
85023
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
85024
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
85025
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
85026
|
+
var __export2 = (target, all8) => {
|
|
85027
|
+
for (var name in all8)
|
|
85028
|
+
__defProp2(target, name, { get: all8[name], enumerable: true });
|
|
85029
|
+
};
|
|
85030
|
+
var __copyProps2 = (to, from, except, desc) => {
|
|
85031
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
85032
|
+
for (let key of __getOwnPropNames2(from))
|
|
85033
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
85034
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
85035
|
+
}
|
|
85036
|
+
return to;
|
|
85037
|
+
};
|
|
85038
|
+
var __reExport2 = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default"));
|
|
85039
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
85040
|
+
var index_exports2 = {};
|
|
85041
|
+
__export2(index_exports2, {
|
|
85042
|
+
DOMAIN_CARD: () => DOMAIN_CARD,
|
|
85043
|
+
cardId: () => cardId,
|
|
85044
|
+
default: () => index_default
|
|
85045
|
+
});
|
|
85046
|
+
module2.exports = __toCommonJS2(index_exports2);
|
|
85047
|
+
var import_platform2 = require_lib();
|
|
85048
|
+
__reExport2(index_exports2, require_analytics3(), module2.exports);
|
|
85049
|
+
var cardId = "card";
|
|
85050
|
+
var DOMAIN_CARD = "card";
|
|
85051
|
+
var cardPlugin2 = (0, import_platform2.plugin)(cardId, {
|
|
85052
|
+
class: {
|
|
85053
|
+
Card: "",
|
|
85054
|
+
MasterTag: "",
|
|
85055
|
+
Tag: "",
|
|
85056
|
+
MasterTagEditorSection: "",
|
|
85057
|
+
CardSpace: "",
|
|
85058
|
+
Role: "",
|
|
85059
|
+
CardSection: "",
|
|
85060
|
+
FavoriteCard: ""
|
|
85061
|
+
},
|
|
85062
|
+
mixin: {
|
|
85063
|
+
CardViewDefaults: "",
|
|
85064
|
+
CreateCardExtension: ""
|
|
85065
|
+
},
|
|
85066
|
+
space: {
|
|
85067
|
+
Default: ""
|
|
85068
|
+
},
|
|
85069
|
+
types: {
|
|
85070
|
+
File: "",
|
|
85071
|
+
Document: ""
|
|
85072
|
+
},
|
|
85073
|
+
icon: {
|
|
85074
|
+
MasterTags: "",
|
|
85075
|
+
MasterTag: "",
|
|
85076
|
+
Tag: "",
|
|
85077
|
+
Tags: "",
|
|
85078
|
+
Card: "",
|
|
85079
|
+
File: "",
|
|
85080
|
+
View: "",
|
|
85081
|
+
Document: "",
|
|
85082
|
+
Home: "",
|
|
85083
|
+
Space: "",
|
|
85084
|
+
Expand: "",
|
|
85085
|
+
Feed: "",
|
|
85086
|
+
All: ""
|
|
85087
|
+
},
|
|
85088
|
+
extensions: {
|
|
85089
|
+
EditCardExtension: ""
|
|
85090
|
+
},
|
|
85091
|
+
string: {
|
|
85092
|
+
MasterTag: "",
|
|
85093
|
+
MasterTags: "",
|
|
85094
|
+
Tags: "",
|
|
85095
|
+
Tag: "",
|
|
85096
|
+
Card: "",
|
|
85097
|
+
Cards: "",
|
|
85098
|
+
CardApplication: "",
|
|
85099
|
+
Views: "",
|
|
85100
|
+
Labels: "",
|
|
85101
|
+
GetIndividualPublicLink: "",
|
|
85102
|
+
AddTag: "",
|
|
85103
|
+
Feed: "",
|
|
85104
|
+
AllCards: ""
|
|
85105
|
+
},
|
|
85106
|
+
section: {
|
|
85107
|
+
Attachments: "",
|
|
85108
|
+
Children: "",
|
|
85109
|
+
Content: "",
|
|
85110
|
+
Properties: "",
|
|
85111
|
+
Relations: ""
|
|
85112
|
+
},
|
|
85113
|
+
ids: {
|
|
85114
|
+
CardWidget: ""
|
|
85115
|
+
},
|
|
85116
|
+
component: {
|
|
85117
|
+
LabelsPresenter: "",
|
|
85118
|
+
CardTagColored: "",
|
|
85119
|
+
CardTagsColored: "",
|
|
85120
|
+
CardIcon: "",
|
|
85121
|
+
CardArrayEditor: "",
|
|
85122
|
+
CardFeedView: ""
|
|
85123
|
+
},
|
|
85124
|
+
function: {
|
|
85125
|
+
OpenCardInSidebar: "",
|
|
85126
|
+
GetSpaceAccessPublicLink: "",
|
|
85127
|
+
CanGetSpaceAccessPublicLink: ""
|
|
85128
|
+
},
|
|
85129
|
+
label: {
|
|
85130
|
+
Subscribed: "",
|
|
85131
|
+
NewMessages: ""
|
|
85132
|
+
}
|
|
85133
|
+
});
|
|
85134
|
+
var index_default = cardPlugin2;
|
|
85135
|
+
}
|
|
85136
|
+
});
|
|
85137
|
+
|
|
84980
85138
|
// node_modules/.pnpm/@hcengineering+chunter@0.7.0/node_modules/@hcengineering/chunter/lib/utils.js
|
|
84981
85139
|
var require_utils12 = __commonJS({
|
|
84982
85140
|
"node_modules/.pnpm/@hcengineering+chunter@0.7.0/node_modules/@hcengineering/chunter/lib/utils.js"(exports2, module2) {
|
|
@@ -85015,8 +85173,8 @@ var require_utils12 = __commonJS({
|
|
|
85015
85173
|
});
|
|
85016
85174
|
module2.exports = __toCommonJS2(utils_exports);
|
|
85017
85175
|
var import_fast_equals = require_cjs();
|
|
85018
|
-
var
|
|
85019
|
-
var import__ = __toESM2(
|
|
85176
|
+
var import_core38 = __toESM2(require_lib4());
|
|
85177
|
+
var import__ = __toESM2(require_lib26());
|
|
85020
85178
|
async function getDirectChannel(client, me, employeeAccount) {
|
|
85021
85179
|
const accIds = [me, employeeAccount].sort();
|
|
85022
85180
|
const existingDms = await client.findAll(import__.default.class.DirectMessage, {});
|
|
@@ -85025,7 +85183,7 @@ var require_utils12 = __commonJS({
|
|
|
85025
85183
|
return dm._id;
|
|
85026
85184
|
}
|
|
85027
85185
|
}
|
|
85028
|
-
return await client.createDoc(import__.default.class.DirectMessage,
|
|
85186
|
+
return await client.createDoc(import__.default.class.DirectMessage, import_core38.default.space.Space, {
|
|
85029
85187
|
name: "",
|
|
85030
85188
|
description: "",
|
|
85031
85189
|
private: true,
|
|
@@ -85038,7 +85196,7 @@ var require_utils12 = __commonJS({
|
|
|
85038
85196
|
});
|
|
85039
85197
|
|
|
85040
85198
|
// node_modules/.pnpm/@hcengineering+chunter@0.7.0/node_modules/@hcengineering/chunter/lib/analytics.js
|
|
85041
|
-
var
|
|
85199
|
+
var require_analytics4 = __commonJS({
|
|
85042
85200
|
"node_modules/.pnpm/@hcengineering+chunter@0.7.0/node_modules/@hcengineering/chunter/lib/analytics.js"(exports2, module2) {
|
|
85043
85201
|
"use strict";
|
|
85044
85202
|
var __defProp2 = Object.defineProperty;
|
|
@@ -85072,7 +85230,7 @@ var require_analytics3 = __commonJS({
|
|
|
85072
85230
|
});
|
|
85073
85231
|
|
|
85074
85232
|
// node_modules/.pnpm/@hcengineering+chunter@0.7.0/node_modules/@hcengineering/chunter/lib/index.js
|
|
85075
|
-
var
|
|
85233
|
+
var require_lib26 = __commonJS({
|
|
85076
85234
|
"node_modules/.pnpm/@hcengineering+chunter@0.7.0/node_modules/@hcengineering/chunter/lib/index.js"(exports2, module2) {
|
|
85077
85235
|
"use strict";
|
|
85078
85236
|
var __defProp2 = Object.defineProperty;
|
|
@@ -85101,7 +85259,7 @@ var require_lib25 = __commonJS({
|
|
|
85101
85259
|
module2.exports = __toCommonJS2(index_exports2);
|
|
85102
85260
|
var import_platform2 = require_lib();
|
|
85103
85261
|
__reExport2(index_exports2, require_utils12(), module2.exports);
|
|
85104
|
-
__reExport2(index_exports2,
|
|
85262
|
+
__reExport2(index_exports2, require_analytics4(), module2.exports);
|
|
85105
85263
|
var chunterId = "chunter";
|
|
85106
85264
|
var index_default = (0, import_platform2.plugin)(chunterId, {
|
|
85107
85265
|
icon: {
|
|
@@ -85329,18 +85487,18 @@ var require_cache4 = __commonJS({
|
|
|
85329
85487
|
default: () => ContactCache
|
|
85330
85488
|
});
|
|
85331
85489
|
module2.exports = __toCommonJS2(cache_exports);
|
|
85332
|
-
var
|
|
85333
|
-
var import__ = __toESM2(
|
|
85490
|
+
var import_core38 = __toESM2(require_lib4());
|
|
85491
|
+
var import__ = __toESM2(require_lib27());
|
|
85334
85492
|
function isCreateTx(tx) {
|
|
85335
|
-
return tx._class ===
|
|
85493
|
+
return tx._class === import_core38.default.class.TxCreateDoc;
|
|
85336
85494
|
}
|
|
85337
85495
|
__name(isCreateTx, "isCreateTx");
|
|
85338
85496
|
function isUpdateTx(tx) {
|
|
85339
|
-
return tx._class ===
|
|
85497
|
+
return tx._class === import_core38.default.class.TxUpdateDoc;
|
|
85340
85498
|
}
|
|
85341
85499
|
__name(isUpdateTx, "isUpdateTx");
|
|
85342
85500
|
function isMixinTx(tx) {
|
|
85343
|
-
return tx._class ===
|
|
85501
|
+
return tx._class === import_core38.default.class.TxMixin;
|
|
85344
85502
|
}
|
|
85345
85503
|
__name(isMixinTx, "isMixinTx");
|
|
85346
85504
|
function isPersonTx(tx) {
|
|
@@ -85447,7 +85605,7 @@ var require_cache4 = __commonJS({
|
|
|
85447
85605
|
const ref = tx.objectId;
|
|
85448
85606
|
const person = this._personByRef.get(ref);
|
|
85449
85607
|
if (person === void 0) return;
|
|
85450
|
-
const createdPerson =
|
|
85608
|
+
const createdPerson = import_core38.TxProcessor.createDoc2Doc(tx);
|
|
85451
85609
|
this._personByRef.set(ref, createdPerson);
|
|
85452
85610
|
const personIds = Array.from(this._personIdsByPersonRef.get(ref) ?? []);
|
|
85453
85611
|
for (const personId of personIds) {
|
|
@@ -85465,7 +85623,7 @@ var require_cache4 = __commonJS({
|
|
|
85465
85623
|
const newPersonRef = tx.attachedTo;
|
|
85466
85624
|
this._personRefByPersonId.set(personId, newPersonRef);
|
|
85467
85625
|
this.addPersonIdToPersonRef(newPersonRef, personId);
|
|
85468
|
-
const createdSocialId =
|
|
85626
|
+
const createdSocialId = import_core38.TxProcessor.createDoc2Doc(tx);
|
|
85469
85627
|
this._socialIdByPersonId.set(personId, createdSocialId);
|
|
85470
85628
|
this.broadcastChange({
|
|
85471
85629
|
personRef: newPersonRef,
|
|
@@ -85476,7 +85634,7 @@ var require_cache4 = __commonJS({
|
|
|
85476
85634
|
const ref = tx.objectId;
|
|
85477
85635
|
const person = this._personByRef.get(ref);
|
|
85478
85636
|
if (person == null) return;
|
|
85479
|
-
const updatedPerson = isUpdateTx(tx) ?
|
|
85637
|
+
const updatedPerson = isUpdateTx(tx) ? import_core38.TxProcessor.updateDoc2Doc(person, tx) : import_core38.TxProcessor.updateMixin4Doc(person, tx);
|
|
85480
85638
|
this._personByRef.set(ref, updatedPerson);
|
|
85481
85639
|
const personIds = Array.from(this._personIdsByPersonRef.get(ref) ?? []);
|
|
85482
85640
|
for (const personId of personIds) {
|
|
@@ -85591,9 +85749,9 @@ var require_utils13 = __commonJS({
|
|
|
85591
85749
|
setCurrentEmployeeSpace: () => setCurrentEmployeeSpace
|
|
85592
85750
|
});
|
|
85593
85751
|
module2.exports = __toCommonJS2(utils_exports);
|
|
85594
|
-
var
|
|
85752
|
+
var import_core38 = require_lib4();
|
|
85595
85753
|
var import_platform2 = require_lib();
|
|
85596
|
-
var import__ = __toESM2(
|
|
85754
|
+
var import__ = __toESM2(require_lib27());
|
|
85597
85755
|
var import_types11 = require_types9();
|
|
85598
85756
|
var import_cache2 = __toESM2(require_cache4());
|
|
85599
85757
|
var currentEmployee;
|
|
@@ -85795,7 +85953,7 @@ var require_utils13 = __commonJS({
|
|
|
85795
85953
|
if (socialIds.length === 0) {
|
|
85796
85954
|
return;
|
|
85797
85955
|
}
|
|
85798
|
-
return (0,
|
|
85956
|
+
return (0, import_core38.pickPrimarySocialId)(socialIds)._id;
|
|
85799
85957
|
}
|
|
85800
85958
|
__name(getPrimarySocialId, "getPrimarySocialId");
|
|
85801
85959
|
async function getAllSocialStringsByPersonId(client, personId) {
|
|
@@ -85834,12 +85992,12 @@ var require_utils13 = __commonJS({
|
|
|
85834
85992
|
__name(getSocialStringsByEmployee, "getSocialStringsByEmployee");
|
|
85835
85993
|
async function getAllAccounts(client) {
|
|
85836
85994
|
const employees = await client.findAll(import__.default.mixin.Employee, { active: true });
|
|
85837
|
-
return employees.map((it) => it.personUuid).filter(
|
|
85995
|
+
return employees.map((it) => it.personUuid).filter(import_core38.notEmpty);
|
|
85838
85996
|
}
|
|
85839
85997
|
__name(getAllAccounts, "getAllAccounts");
|
|
85840
85998
|
async function getAllUserAccounts(client) {
|
|
85841
85999
|
const employees = await client.findAll(import__.default.mixin.Employee, { active: true });
|
|
85842
|
-
return employees.map((it) => it.personUuid).filter(
|
|
86000
|
+
return employees.map((it) => it.personUuid).filter(import_core38.notEmpty);
|
|
85843
86001
|
}
|
|
85844
86002
|
__name(getAllUserAccounts, "getAllUserAccounts");
|
|
85845
86003
|
async function ensureEmployee(ctx, me, client, socialIds, getGlobalPerson) {
|
|
@@ -85848,7 +86006,7 @@ var require_utils13 = __commonJS({
|
|
|
85848
86006
|
}
|
|
85849
86007
|
__name(ensureEmployee, "ensureEmployee");
|
|
85850
86008
|
async function ensureEmployeeForPerson(ctx, me, person, client, socialIds, globalPerson) {
|
|
85851
|
-
const txFactory = new
|
|
86009
|
+
const txFactory = new import_core38.TxFactory(me.primarySocialId);
|
|
85852
86010
|
const personByUuid = await client.findOne(import__.default.class.Person, { personUuid: person.uuid });
|
|
85853
86011
|
let personRef = personByUuid?._id;
|
|
85854
86012
|
if (personRef === void 0) {
|
|
@@ -85869,7 +86027,7 @@ var require_utils13 = __commonJS({
|
|
|
85869
86027
|
city: globalPerson.city,
|
|
85870
86028
|
avatarType: import__.AvatarType.COLOR
|
|
85871
86029
|
};
|
|
85872
|
-
personRef = (0,
|
|
86030
|
+
personRef = (0, import_core38.generateId)();
|
|
85873
86031
|
const createPersonTx = txFactory.createTxCreateDoc(import__.default.class.Person, import__.default.space.Contacts, data, personRef);
|
|
85874
86032
|
await client.tx(createPersonTx);
|
|
85875
86033
|
});
|
|
@@ -85879,7 +86037,7 @@ var require_utils13 = __commonJS({
|
|
|
85879
86037
|
});
|
|
85880
86038
|
await client.tx(updatePersonTx);
|
|
85881
86039
|
}
|
|
85882
|
-
const existingIdentifiers = (0,
|
|
86040
|
+
const existingIdentifiers = (0, import_core38.toIdMap)(
|
|
85883
86041
|
await client.findAll(import__.default.class.SocialIdentity, { _id: { $in: person.socialIds } })
|
|
85884
86042
|
);
|
|
85885
86043
|
for (const socialId of socialIds) {
|
|
@@ -85904,7 +86062,7 @@ var require_utils13 = __commonJS({
|
|
|
85904
86062
|
collection: "socialIds",
|
|
85905
86063
|
type: socialId.type,
|
|
85906
86064
|
value: socialId.value,
|
|
85907
|
-
key: (0,
|
|
86065
|
+
key: (0, import_core38.buildSocialIdString)(socialId),
|
|
85908
86066
|
// TODO: fill it in trigger or on DB level as stored calculated column or smth?
|
|
85909
86067
|
verifiedOn: socialId.verifiedOn,
|
|
85910
86068
|
isDeleted: socialId.isDeleted
|
|
@@ -85945,9 +86103,9 @@ var require_utils13 = __commonJS({
|
|
|
85945
86103
|
}
|
|
85946
86104
|
}
|
|
85947
86105
|
}
|
|
85948
|
-
const employeeRole = person.role ===
|
|
86106
|
+
const employeeRole = person.role === import_core38.AccountRole.Guest || person.role === import_core38.AccountRole.ReadOnlyGuest ? "GUEST" : "USER";
|
|
85949
86107
|
const employee = await client.findOne(import__.default.mixin.Employee, { _id: personRef });
|
|
85950
|
-
if (employee === void 0 || !
|
|
86108
|
+
if (employee === void 0 || !import_core38.Hierarchy.hasMixin(employee, import__.default.mixin.Employee) || !employee.active || employee.role !== employeeRole) {
|
|
85951
86109
|
await ctx.with("create-employee", {}, async () => {
|
|
85952
86110
|
if (personRef === void 0) {
|
|
85953
86111
|
console.error("Person not found");
|
|
@@ -85987,7 +86145,7 @@ var require_utils13 = __commonJS({
|
|
|
85987
86145
|
}
|
|
85988
86146
|
__name(loadCachesForPersonId, "loadCachesForPersonId");
|
|
85989
86147
|
async function loadCachesForPersonIds(client, personIds) {
|
|
85990
|
-
const sidObjsMap = (0,
|
|
86148
|
+
const sidObjsMap = (0, import_core38.toIdMap)(
|
|
85991
86149
|
await client.findAll(
|
|
85992
86150
|
import__.default.class.SocialIdentity,
|
|
85993
86151
|
{
|
|
@@ -86022,7 +86180,7 @@ var require_utils13 = __commonJS({
|
|
|
86022
86180
|
}
|
|
86023
86181
|
__name(loadCachesForPersonRef, "loadCachesForPersonRef");
|
|
86024
86182
|
async function loadCachesForPersonRefs(client, personRefs) {
|
|
86025
|
-
const persons = (0,
|
|
86183
|
+
const persons = (0, import_core38.toIdMap)(
|
|
86026
86184
|
await client.findAll(
|
|
86027
86185
|
import__.default.class.Person,
|
|
86028
86186
|
{
|
|
@@ -86065,7 +86223,7 @@ var require_utils13 = __commonJS({
|
|
|
86065
86223
|
personIds.map((pid) => {
|
|
86066
86224
|
const ref = contactCache.personRefByPersonId.get(pid);
|
|
86067
86225
|
return ref != null ? [pid, ref] : void 0;
|
|
86068
|
-
}).filter(
|
|
86226
|
+
}).filter(import_core38.notEmpty)
|
|
86069
86227
|
);
|
|
86070
86228
|
}
|
|
86071
86229
|
__name(getPersonRefsByPersonIdsFromCache, "getPersonRefsByPersonIdsFromCache");
|
|
@@ -86112,7 +86270,7 @@ var require_utils13 = __commonJS({
|
|
|
86112
86270
|
personIds.map((pid) => {
|
|
86113
86271
|
const person = contactCache.personByPersonId.get(pid);
|
|
86114
86272
|
return person != null ? [pid, person] : void 0;
|
|
86115
|
-
}).filter(
|
|
86273
|
+
}).filter(import_core38.notEmpty)
|
|
86116
86274
|
);
|
|
86117
86275
|
}
|
|
86118
86276
|
__name(getPersonsByPersonIdsFromCache, "getPersonsByPersonIdsFromCache");
|
|
@@ -86159,7 +86317,7 @@ var require_utils13 = __commonJS({
|
|
|
86159
86317
|
personRefs.map((personRef) => {
|
|
86160
86318
|
const person = contactCache.personByRef.get(personRef);
|
|
86161
86319
|
return person != null ? [personRef, person] : void 0;
|
|
86162
|
-
}).filter(
|
|
86320
|
+
}).filter(import_core38.notEmpty)
|
|
86163
86321
|
);
|
|
86164
86322
|
}
|
|
86165
86323
|
__name(getPersonsByPersonRefsFromCache, "getPersonsByPersonRefsFromCache");
|
|
@@ -86205,7 +86363,7 @@ var require_utils13 = __commonJS({
|
|
|
86205
86363
|
});
|
|
86206
86364
|
|
|
86207
86365
|
// node_modules/.pnpm/@hcengineering+contact@0.7.0/node_modules/@hcengineering/contact/lib/analytics.js
|
|
86208
|
-
var
|
|
86366
|
+
var require_analytics5 = __commonJS({
|
|
86209
86367
|
"node_modules/.pnpm/@hcengineering+contact@0.7.0/node_modules/@hcengineering/contact/lib/analytics.js"(exports2, module2) {
|
|
86210
86368
|
"use strict";
|
|
86211
86369
|
var __defProp2 = Object.defineProperty;
|
|
@@ -86279,7 +86437,7 @@ var require_avatar = __commonJS({
|
|
|
86279
86437
|
});
|
|
86280
86438
|
module2.exports = __toCommonJS2(avatar_exports);
|
|
86281
86439
|
var import_platform2 = require_lib();
|
|
86282
|
-
var import__ = __toESM2(
|
|
86440
|
+
var import__ = __toESM2(require_lib27());
|
|
86283
86441
|
var providers = /* @__PURE__ */ new Map();
|
|
86284
86442
|
async function getAvatarProvider(client, providerId) {
|
|
86285
86443
|
const provider = providers.get(providerId);
|
|
@@ -86325,7 +86483,7 @@ var require_avatar = __commonJS({
|
|
|
86325
86483
|
});
|
|
86326
86484
|
|
|
86327
86485
|
// node_modules/.pnpm/@hcengineering+contact@0.7.0/node_modules/@hcengineering/contact/lib/index.js
|
|
86328
|
-
var
|
|
86486
|
+
var require_lib27 = __commonJS({
|
|
86329
86487
|
"node_modules/.pnpm/@hcengineering+contact@0.7.0/node_modules/@hcengineering/contact/lib/index.js"(exports2, module2) {
|
|
86330
86488
|
"use strict";
|
|
86331
86489
|
var __defProp2 = Object.defineProperty;
|
|
@@ -86357,7 +86515,7 @@ var require_lib26 = __commonJS({
|
|
|
86357
86515
|
var import_platform2 = require_lib();
|
|
86358
86516
|
__reExport2(index_exports2, require_types9(), module2.exports);
|
|
86359
86517
|
__reExport2(index_exports2, require_utils13(), module2.exports);
|
|
86360
|
-
__reExport2(index_exports2,
|
|
86518
|
+
__reExport2(index_exports2, require_analytics5(), module2.exports);
|
|
86361
86519
|
__reExport2(index_exports2, require_avatar(), module2.exports);
|
|
86362
86520
|
var AvatarType2 = /* @__PURE__ */ ((AvatarType22) => {
|
|
86363
86521
|
AvatarType22["COLOR"] = "color";
|
|
@@ -86668,7 +86826,7 @@ var require_plugin2 = __commonJS({
|
|
|
86668
86826
|
});
|
|
86669
86827
|
|
|
86670
86828
|
// node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/analytics.js
|
|
86671
|
-
var
|
|
86829
|
+
var require_analytics6 = __commonJS({
|
|
86672
86830
|
"node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/analytics.js"(exports2, module2) {
|
|
86673
86831
|
"use strict";
|
|
86674
86832
|
var __defProp2 = Object.defineProperty;
|
|
@@ -86764,9 +86922,9 @@ var require_utils14 = __commonJS({
|
|
|
86764
86922
|
getFirstRank: () => getFirstRank
|
|
86765
86923
|
});
|
|
86766
86924
|
module2.exports = __toCommonJS2(utils_exports);
|
|
86767
|
-
var
|
|
86925
|
+
var import_core38 = require_lib4();
|
|
86768
86926
|
var import_plugin = __toESM2(require_plugin2());
|
|
86769
|
-
async function getFirstRank(client, space, parent, sort3 =
|
|
86927
|
+
async function getFirstRank(client, space, parent, sort3 = import_core38.SortingOrder.Descending, extra = {}) {
|
|
86770
86928
|
const doc = await client.findOne(
|
|
86771
86929
|
import_plugin.default.class.Document,
|
|
86772
86930
|
{ space, parent, ...extra },
|
|
@@ -86779,7 +86937,7 @@ var require_utils14 = __commonJS({
|
|
|
86779
86937
|
});
|
|
86780
86938
|
|
|
86781
86939
|
// node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/index.js
|
|
86782
|
-
var
|
|
86940
|
+
var require_lib28 = __commonJS({
|
|
86783
86941
|
"node_modules/.pnpm/@hcengineering+document@0.7.0/node_modules/@hcengineering/document/lib/index.js"(exports2, module2) {
|
|
86784
86942
|
"use strict";
|
|
86785
86943
|
var __defProp2 = Object.defineProperty;
|
|
@@ -86807,7 +86965,7 @@ var require_lib27 = __commonJS({
|
|
|
86807
86965
|
});
|
|
86808
86966
|
module2.exports = __toCommonJS2(index_exports2);
|
|
86809
86967
|
var import_plugin = require_plugin2();
|
|
86810
|
-
__reExport2(index_exports2,
|
|
86968
|
+
__reExport2(index_exports2, require_analytics6(), module2.exports);
|
|
86811
86969
|
__reExport2(index_exports2, require_types10(), module2.exports);
|
|
86812
86970
|
__reExport2(index_exports2, require_utils14(), module2.exports);
|
|
86813
86971
|
var index_default = import_plugin.documentPlugin;
|
|
@@ -86837,7 +86995,7 @@ var require_types11 = __commonJS({
|
|
|
86837
86995
|
});
|
|
86838
86996
|
|
|
86839
86997
|
// node_modules/.pnpm/@hcengineering+notification@0.7.0/node_modules/@hcengineering/notification/lib/index.js
|
|
86840
|
-
var
|
|
86998
|
+
var require_lib29 = __commonJS({
|
|
86841
86999
|
"node_modules/.pnpm/@hcengineering+notification@0.7.0/node_modules/@hcengineering/notification/lib/index.js"(exports2, module2) {
|
|
86842
87000
|
"use strict";
|
|
86843
87001
|
var __defProp2 = Object.defineProperty;
|
|
@@ -86990,7 +87148,7 @@ var require_lib28 = __commonJS({
|
|
|
86990
87148
|
});
|
|
86991
87149
|
|
|
86992
87150
|
// node_modules/.pnpm/@hcengineering+tags@0.7.0/node_modules/@hcengineering/tags/lib/analytics.js
|
|
86993
|
-
var
|
|
87151
|
+
var require_analytics7 = __commonJS({
|
|
86994
87152
|
"node_modules/.pnpm/@hcengineering+tags@0.7.0/node_modules/@hcengineering/tags/lib/analytics.js"(exports2, module2) {
|
|
86995
87153
|
"use strict";
|
|
86996
87154
|
var __defProp2 = Object.defineProperty;
|
|
@@ -87024,7 +87182,7 @@ var require_analytics6 = __commonJS({
|
|
|
87024
87182
|
});
|
|
87025
87183
|
|
|
87026
87184
|
// node_modules/.pnpm/@hcengineering+tags@0.7.0/node_modules/@hcengineering/tags/lib/index.js
|
|
87027
|
-
var
|
|
87185
|
+
var require_lib30 = __commonJS({
|
|
87028
87186
|
"node_modules/.pnpm/@hcengineering+tags@0.7.0/node_modules/@hcengineering/tags/lib/index.js"(exports2, module2) {
|
|
87029
87187
|
"use strict";
|
|
87030
87188
|
var __defProp2 = Object.defineProperty;
|
|
@@ -87054,7 +87212,7 @@ var require_lib29 = __commonJS({
|
|
|
87054
87212
|
});
|
|
87055
87213
|
module2.exports = __toCommonJS2(index_exports2);
|
|
87056
87214
|
var import_platform2 = require_lib();
|
|
87057
|
-
__reExport2(index_exports2,
|
|
87215
|
+
__reExport2(index_exports2, require_analytics7(), module2.exports);
|
|
87058
87216
|
var tagsId = "tags";
|
|
87059
87217
|
var tagsPlugin = (0, import_platform2.plugin)(tagsId, {
|
|
87060
87218
|
class: {
|
|
@@ -88208,7 +88366,7 @@ var require_lexoRank2 = __commonJS({
|
|
|
88208
88366
|
});
|
|
88209
88367
|
|
|
88210
88368
|
// node_modules/.pnpm/lexorank@1.0.5/node_modules/lexorank/lib/index.js
|
|
88211
|
-
var
|
|
88369
|
+
var require_lib31 = __commonJS({
|
|
88212
88370
|
"node_modules/.pnpm/lexorank@1.0.5/node_modules/lexorank/lib/index.js"(exports2) {
|
|
88213
88371
|
"use strict";
|
|
88214
88372
|
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -88268,11 +88426,11 @@ var require_utils15 = __commonJS({
|
|
|
88268
88426
|
var utils_exports = {};
|
|
88269
88427
|
__export2(utils_exports, {
|
|
88270
88428
|
genRanks: () => genRanks,
|
|
88271
|
-
makeRank: () =>
|
|
88429
|
+
makeRank: () => makeRank4
|
|
88272
88430
|
});
|
|
88273
88431
|
module2.exports = __toCommonJS2(utils_exports);
|
|
88274
88432
|
var import_lexoRankBucket = __toESM2(require_lexoRankBucket());
|
|
88275
|
-
var import_lexorank =
|
|
88433
|
+
var import_lexorank = require_lib31();
|
|
88276
88434
|
function genRanks(count3) {
|
|
88277
88435
|
const sys = new import_lexorank.LexoNumeralSystem36();
|
|
88278
88436
|
const base = 36;
|
|
@@ -88287,7 +88445,7 @@ var require_utils15 = __commonJS({
|
|
|
88287
88445
|
return res;
|
|
88288
88446
|
}
|
|
88289
88447
|
__name(genRanks, "genRanks");
|
|
88290
|
-
function
|
|
88448
|
+
function makeRank4(prev, next4) {
|
|
88291
88449
|
try {
|
|
88292
88450
|
if (prev != null && prev.trim() === "") {
|
|
88293
88451
|
prev = void 0;
|
|
@@ -88312,12 +88470,12 @@ var require_utils15 = __commonJS({
|
|
|
88312
88470
|
throw new Error(`Failed to make rank: ${prev} ${next4} ${err.message}`);
|
|
88313
88471
|
}
|
|
88314
88472
|
}
|
|
88315
|
-
__name(
|
|
88473
|
+
__name(makeRank4, "makeRank");
|
|
88316
88474
|
}
|
|
88317
88475
|
});
|
|
88318
88476
|
|
|
88319
88477
|
// node_modules/.pnpm/@hcengineering+rank@0.7.17/node_modules/@hcengineering/rank/lib/index.js
|
|
88320
|
-
var
|
|
88478
|
+
var require_lib32 = __commonJS({
|
|
88321
88479
|
"node_modules/.pnpm/@hcengineering+rank@0.7.17/node_modules/@hcengineering/rank/lib/index.js"(exports2, module2) {
|
|
88322
88480
|
"use strict";
|
|
88323
88481
|
var __defProp2 = Object.defineProperty;
|
|
@@ -88389,13 +88547,13 @@ var require_utils16 = __commonJS({
|
|
|
88389
88547
|
updateProjectType: () => updateProjectType
|
|
88390
88548
|
});
|
|
88391
88549
|
module2.exports = __toCommonJS2(utils_exports);
|
|
88392
|
-
var
|
|
88550
|
+
var import_core38 = __toESM2(require_lib4());
|
|
88393
88551
|
var import_platform2 = require_lib();
|
|
88394
|
-
var import__ = __toESM2(
|
|
88395
|
-
var
|
|
88396
|
-
var import_rank22 =
|
|
88552
|
+
var import__ = __toESM2(require_lib33());
|
|
88553
|
+
var import_rank4 = require_lib32();
|
|
88554
|
+
var import_rank22 = require_lib32();
|
|
88397
88555
|
var calcRank = /* @__PURE__ */ __name((prev, next4) => {
|
|
88398
|
-
return (0,
|
|
88556
|
+
return (0, import_rank4.makeRank)(prev?.rank, next4?.rank);
|
|
88399
88557
|
}, "calcRank");
|
|
88400
88558
|
function getProjectTypeStates(projectType, types, statuses) {
|
|
88401
88559
|
if (projectType === void 0) return [];
|
|
@@ -88425,7 +88583,7 @@ var require_utils16 = __commonJS({
|
|
|
88425
88583
|
if (exists5 !== void 0) {
|
|
88426
88584
|
return exists5._id;
|
|
88427
88585
|
}
|
|
88428
|
-
const res = await client.createDoc(_class,
|
|
88586
|
+
const res = await client.createDoc(_class, import_core38.default.space.Model, data);
|
|
88429
88587
|
return res;
|
|
88430
88588
|
}
|
|
88431
88589
|
__name(createState, "createState");
|
|
@@ -88455,7 +88613,7 @@ var require_utils16 = __commonJS({
|
|
|
88455
88613
|
function findStatusAttr(h, _class) {
|
|
88456
88614
|
const attrs = h.getAllAttributes(_class);
|
|
88457
88615
|
for (const it of attrs.values()) {
|
|
88458
|
-
if (it.type._class ===
|
|
88616
|
+
if (it.type._class === import_core38.default.class.RefTo && h.isDerived(it.type.to, import_core38.default.class.Status)) {
|
|
88459
88617
|
return it;
|
|
88460
88618
|
}
|
|
88461
88619
|
}
|
|
@@ -88487,7 +88645,7 @@ var require_utils16 = __commonJS({
|
|
|
88487
88645
|
const targetProjectClassId = `${_id}:type:mixin`;
|
|
88488
88646
|
const tmpl = await client.createDoc(
|
|
88489
88647
|
import__.default.class.ProjectType,
|
|
88490
|
-
|
|
88648
|
+
import_core38.default.space.Model,
|
|
88491
88649
|
{
|
|
88492
88650
|
description: data.description,
|
|
88493
88651
|
shortDescription: data.shortDescription,
|
|
@@ -88502,17 +88660,17 @@ var require_utils16 = __commonJS({
|
|
|
88502
88660
|
_id
|
|
88503
88661
|
);
|
|
88504
88662
|
await client.createDoc(
|
|
88505
|
-
|
|
88506
|
-
|
|
88663
|
+
import_core38.default.class.Mixin,
|
|
88664
|
+
import_core38.default.space.Model,
|
|
88507
88665
|
{
|
|
88508
88666
|
extends: categoryObj.baseClass,
|
|
88509
|
-
kind:
|
|
88667
|
+
kind: import_core38.ClassifierKind.MIXIN,
|
|
88510
88668
|
label: (0, import_platform2.getEmbeddedLabel)(data.name),
|
|
88511
88669
|
icon: baseClassClass.icon
|
|
88512
88670
|
},
|
|
88513
88671
|
targetProjectClassId
|
|
88514
88672
|
);
|
|
88515
|
-
await client.createMixin(targetProjectClassId,
|
|
88673
|
+
await client.createMixin(targetProjectClassId, import_core38.default.class.Mixin, import_core38.default.space.Model, import__.default.mixin.ProjectTypeClass, {
|
|
88516
88674
|
projectType: _id
|
|
88517
88675
|
});
|
|
88518
88676
|
return tmpl;
|
|
@@ -88571,22 +88729,22 @@ var require_utils16 = __commonJS({
|
|
|
88571
88729
|
const targetClassId = `${taskId}:type:mixin`;
|
|
88572
88730
|
tdata.targetClass = targetClassId;
|
|
88573
88731
|
await client.createDoc(
|
|
88574
|
-
|
|
88575
|
-
|
|
88732
|
+
import_core38.default.class.Mixin,
|
|
88733
|
+
import_core38.default.space.Model,
|
|
88576
88734
|
{
|
|
88577
88735
|
extends: data.ofClass,
|
|
88578
|
-
kind:
|
|
88736
|
+
kind: import_core38.ClassifierKind.MIXIN,
|
|
88579
88737
|
label: ofClassClass.label,
|
|
88580
88738
|
icon: ofClassClass.icon
|
|
88581
88739
|
},
|
|
88582
88740
|
targetClassId
|
|
88583
88741
|
);
|
|
88584
|
-
await client.createMixin(targetClassId,
|
|
88742
|
+
await client.createMixin(targetClassId, import_core38.default.class.Mixin, import_core38.default.space.Model, import__.default.mixin.TaskTypeClass, {
|
|
88585
88743
|
taskType: taskId,
|
|
88586
88744
|
projectType: _id
|
|
88587
88745
|
});
|
|
88588
88746
|
}
|
|
88589
|
-
await client.createDoc(import__.default.class.TaskType,
|
|
88747
|
+
await client.createDoc(import__.default.class.TaskType, import_core38.default.space.Model, tdata, taskId);
|
|
88590
88748
|
tasksData.set(taskId, tdata);
|
|
88591
88749
|
_tasks.push(taskId);
|
|
88592
88750
|
}
|
|
@@ -88597,7 +88755,7 @@ var require_utils16 = __commonJS({
|
|
|
88597
88755
|
});
|
|
88598
88756
|
|
|
88599
88757
|
// node_modules/.pnpm/@hcengineering+task@0.7.0/node_modules/@hcengineering/task/lib/index.js
|
|
88600
|
-
var
|
|
88758
|
+
var require_lib33 = __commonJS({
|
|
88601
88759
|
"node_modules/.pnpm/@hcengineering+task@0.7.0/node_modules/@hcengineering/task/lib/index.js"(exports2, module2) {
|
|
88602
88760
|
"use strict";
|
|
88603
88761
|
var __defProp2 = Object.defineProperty;
|
|
@@ -88732,7 +88890,7 @@ var require_lib32 = __commonJS({
|
|
|
88732
88890
|
});
|
|
88733
88891
|
|
|
88734
88892
|
// node_modules/.pnpm/@hcengineering+time@0.7.0/node_modules/@hcengineering/time/lib/analytics.js
|
|
88735
|
-
var
|
|
88893
|
+
var require_analytics8 = __commonJS({
|
|
88736
88894
|
"node_modules/.pnpm/@hcengineering+time@0.7.0/node_modules/@hcengineering/time/lib/analytics.js"(exports2, module2) {
|
|
88737
88895
|
"use strict";
|
|
88738
88896
|
var __defProp2 = Object.defineProperty;
|
|
@@ -88767,7 +88925,7 @@ var require_analytics7 = __commonJS({
|
|
|
88767
88925
|
});
|
|
88768
88926
|
|
|
88769
88927
|
// node_modules/.pnpm/@hcengineering+time@0.7.0/node_modules/@hcengineering/time/lib/index.js
|
|
88770
|
-
var
|
|
88928
|
+
var require_lib34 = __commonJS({
|
|
88771
88929
|
"node_modules/.pnpm/@hcengineering+time@0.7.0/node_modules/@hcengineering/time/lib/index.js"(exports2, module2) {
|
|
88772
88930
|
"use strict";
|
|
88773
88931
|
var __defProp2 = Object.defineProperty;
|
|
@@ -88796,7 +88954,7 @@ var require_lib33 = __commonJS({
|
|
|
88796
88954
|
});
|
|
88797
88955
|
module2.exports = __toCommonJS2(index_exports2);
|
|
88798
88956
|
var import_platform2 = require_lib();
|
|
88799
|
-
__reExport2(index_exports2,
|
|
88957
|
+
__reExport2(index_exports2, require_analytics8(), module2.exports);
|
|
88800
88958
|
var timeId = "time";
|
|
88801
88959
|
var ToDoPriority = /* @__PURE__ */ ((ToDoPriority2) => {
|
|
88802
88960
|
ToDoPriority2[ToDoPriority2["High"] = 0] = "High";
|
|
@@ -94056,7 +94214,7 @@ var require_streams = __commonJS({
|
|
|
94056
94214
|
});
|
|
94057
94215
|
|
|
94058
94216
|
// node_modules/.pnpm/iconv-lite@0.7.2/node_modules/iconv-lite/lib/index.js
|
|
94059
|
-
var
|
|
94217
|
+
var require_lib35 = __commonJS({
|
|
94060
94218
|
"node_modules/.pnpm/iconv-lite@0.7.2/node_modules/iconv-lite/lib/index.js"(exports2, module2) {
|
|
94061
94219
|
"use strict";
|
|
94062
94220
|
var Buffer2 = require_safer().Buffer;
|
|
@@ -94232,7 +94390,7 @@ var require_raw_body = __commonJS({
|
|
|
94232
94390
|
var asyncHooks = tryRequireAsyncHooks();
|
|
94233
94391
|
var bytes = require_bytes();
|
|
94234
94392
|
var createError = require_http_errors();
|
|
94235
|
-
var iconv =
|
|
94393
|
+
var iconv = require_lib35();
|
|
94236
94394
|
var unpipe = require_unpipe();
|
|
94237
94395
|
module2.exports = getRawBody;
|
|
94238
94396
|
var ICONV_ENCODING_MESSAGE_REGEXP = /^Encoding not recognized: /;
|
|
@@ -104404,7 +104562,7 @@ var require_read = __commonJS({
|
|
|
104404
104562
|
"use strict";
|
|
104405
104563
|
var createError = require_http_errors();
|
|
104406
104564
|
var getBody = require_raw_body();
|
|
104407
|
-
var iconv =
|
|
104565
|
+
var iconv = require_lib35();
|
|
104408
104566
|
var onFinished = require_on_finished();
|
|
104409
104567
|
var zlib = require("node:zlib");
|
|
104410
104568
|
var hasBody = require_type_is().hasBody;
|
|
@@ -107172,7 +107330,7 @@ var require_parse3 = __commonJS({
|
|
|
107172
107330
|
});
|
|
107173
107331
|
|
|
107174
107332
|
// node_modules/.pnpm/qs@6.14.2/node_modules/qs/lib/index.js
|
|
107175
|
-
var
|
|
107333
|
+
var require_lib36 = __commonJS({
|
|
107176
107334
|
"node_modules/.pnpm/qs@6.14.2/node_modules/qs/lib/index.js"(exports2, module2) {
|
|
107177
107335
|
"use strict";
|
|
107178
107336
|
var stringify2 = require_stringify3();
|
|
@@ -107193,7 +107351,7 @@ var require_urlencoded = __commonJS({
|
|
|
107193
107351
|
var createError = require_http_errors();
|
|
107194
107352
|
var debug = require_src()("body-parser:urlencoded");
|
|
107195
107353
|
var read = require_read();
|
|
107196
|
-
var qs =
|
|
107354
|
+
var qs = require_lib36();
|
|
107197
107355
|
var { normalizeOptions } = require_utils17();
|
|
107198
107356
|
module2.exports = urlencoded;
|
|
107199
107357
|
function urlencoded(options) {
|
|
@@ -108574,7 +108732,7 @@ var require_utils19 = __commonJS({
|
|
|
108574
108732
|
var etag = require_etag();
|
|
108575
108733
|
var mime = require_mime_types();
|
|
108576
108734
|
var proxyaddr = require_proxy_addr();
|
|
108577
|
-
var qs =
|
|
108735
|
+
var qs = require_lib36();
|
|
108578
108736
|
var querystring = require("node:querystring");
|
|
108579
108737
|
var { Buffer: Buffer2 } = require("node:buffer");
|
|
108580
108738
|
exports2.methods = METHODS.map((method) => method.toLowerCase());
|
|
@@ -153707,6 +153865,48 @@ var AttachmentNotFoundError = class extends Schema_exports.TaggedError()(
|
|
|
153707
153865
|
return `Attachment '${this.attachmentId}' not found`;
|
|
153708
153866
|
}
|
|
153709
153867
|
};
|
|
153868
|
+
var CardSpaceNotFoundError = class extends Schema_exports.TaggedError()(
|
|
153869
|
+
"CardSpaceNotFoundError",
|
|
153870
|
+
{
|
|
153871
|
+
identifier: Schema_exports.String
|
|
153872
|
+
}
|
|
153873
|
+
) {
|
|
153874
|
+
get message() {
|
|
153875
|
+
return `Card space '${this.identifier}' not found`;
|
|
153876
|
+
}
|
|
153877
|
+
};
|
|
153878
|
+
var CardNotFoundError = class extends Schema_exports.TaggedError()(
|
|
153879
|
+
"CardNotFoundError",
|
|
153880
|
+
{
|
|
153881
|
+
identifier: Schema_exports.String,
|
|
153882
|
+
cardSpace: Schema_exports.String
|
|
153883
|
+
}
|
|
153884
|
+
) {
|
|
153885
|
+
get message() {
|
|
153886
|
+
return `Card '${this.identifier}' not found in card space '${this.cardSpace}'`;
|
|
153887
|
+
}
|
|
153888
|
+
};
|
|
153889
|
+
var MasterTagNotFoundError = class extends Schema_exports.TaggedError()(
|
|
153890
|
+
"MasterTagNotFoundError",
|
|
153891
|
+
{
|
|
153892
|
+
identifier: Schema_exports.String,
|
|
153893
|
+
cardSpace: Schema_exports.String
|
|
153894
|
+
}
|
|
153895
|
+
) {
|
|
153896
|
+
get message() {
|
|
153897
|
+
return `Master tag '${this.identifier}' not found in card space '${this.cardSpace}'`;
|
|
153898
|
+
}
|
|
153899
|
+
};
|
|
153900
|
+
var TagNotFoundError = class extends Schema_exports.TaggedError()(
|
|
153901
|
+
"TagNotFoundError",
|
|
153902
|
+
{
|
|
153903
|
+
identifier: Schema_exports.String
|
|
153904
|
+
}
|
|
153905
|
+
) {
|
|
153906
|
+
get message() {
|
|
153907
|
+
return `Tag/label '${this.identifier}' not found`;
|
|
153908
|
+
}
|
|
153909
|
+
};
|
|
153710
153910
|
var ComponentNotFoundError = class extends Schema_exports.TaggedError()(
|
|
153711
153911
|
"ComponentNotFoundError",
|
|
153712
153912
|
{
|
|
@@ -153810,6 +154010,10 @@ var HulyDomainError = Schema_exports.Union(
|
|
|
153810
154010
|
ReactionNotFoundError,
|
|
153811
154011
|
SavedMessageNotFoundError,
|
|
153812
154012
|
AttachmentNotFoundError,
|
|
154013
|
+
CardSpaceNotFoundError,
|
|
154014
|
+
CardNotFoundError,
|
|
154015
|
+
MasterTagNotFoundError,
|
|
154016
|
+
TagNotFoundError,
|
|
153813
154017
|
ComponentNotFoundError,
|
|
153814
154018
|
IssueTemplateNotFoundError,
|
|
153815
154019
|
NotificationNotFoundError,
|
|
@@ -154057,7 +154261,10 @@ var ThreadReplyId = HulyRef("ThreadReplyId");
|
|
|
154057
154261
|
var ActivityMessageId = HulyRef("ActivityMessageId");
|
|
154058
154262
|
var AttachmentId = HulyRef("AttachmentId");
|
|
154059
154263
|
var BlobId = HulyRef("BlobId");
|
|
154264
|
+
var CardId = HulyRef("CardId");
|
|
154265
|
+
var CardSpaceId = HulyRef("CardSpaceId");
|
|
154060
154266
|
var DocumentId = HulyRef("DocumentId");
|
|
154267
|
+
var MasterTagId = HulyRef("MasterTagId");
|
|
154061
154268
|
var TeamspaceId = HulyRef("TeamspaceId");
|
|
154062
154269
|
var NotificationId = HulyRef("NotificationId");
|
|
154063
154270
|
var NotificationContextId = HulyRef("NotificationContextId");
|
|
@@ -154066,6 +154273,7 @@ var TodoId = HulyRef("TodoId");
|
|
|
154066
154273
|
var SpaceId = HulyRef("SpaceId");
|
|
154067
154274
|
var CommentId = HulyRef("CommentId");
|
|
154068
154275
|
var TimeSpendReportId = HulyRef("TimeSpendReportId");
|
|
154276
|
+
var TagElementId = HulyRef("TagElementId");
|
|
154069
154277
|
var ProjectIdentifier = NonEmptyString2.pipe(Schema_exports.brand("ProjectIdentifier"));
|
|
154070
154278
|
var IssueIdentifier = NonEmptyString2.pipe(Schema_exports.brand("IssueIdentifier"));
|
|
154071
154279
|
var Email = Schema_exports.NonEmptyString.pipe(
|
|
@@ -154104,21 +154312,26 @@ var MilestoneIdentifier = NonEmptyString2.pipe(Schema_exports.brand("MilestoneId
|
|
|
154104
154312
|
var TemplateIdentifier = NonEmptyString2.pipe(Schema_exports.brand("TemplateIdentifier"));
|
|
154105
154313
|
var ChannelIdentifier = NonEmptyString2.pipe(Schema_exports.brand("ChannelIdentifier"));
|
|
154106
154314
|
var TeamspaceIdentifier = NonEmptyString2.pipe(Schema_exports.brand("TeamspaceIdentifier"));
|
|
154315
|
+
var CardIdentifier = NonEmptyString2.pipe(Schema_exports.brand("CardIdentifier"));
|
|
154316
|
+
var CardSpaceIdentifier = NonEmptyString2.pipe(Schema_exports.brand("CardSpaceIdentifier"));
|
|
154107
154317
|
var DocumentIdentifier = NonEmptyString2.pipe(Schema_exports.brand("DocumentIdentifier"));
|
|
154318
|
+
var MasterTagIdentifier = NonEmptyString2.pipe(Schema_exports.brand("MasterTagIdentifier"));
|
|
154319
|
+
var TagIdentifier = NonEmptyString2.pipe(Schema_exports.brand("TagIdentifier"));
|
|
154108
154320
|
var MemberReference = Schema_exports.String.pipe(Schema_exports.brand("MemberReference"));
|
|
154109
154321
|
|
|
154110
154322
|
// src/huly/huly-plugins.ts
|
|
154111
154323
|
var activity = require_lib22().default;
|
|
154112
154324
|
var attachment = require_lib23().default;
|
|
154113
154325
|
var calendar = require_lib24().default;
|
|
154114
|
-
var
|
|
154115
|
-
var
|
|
154326
|
+
var cardPlugin = require_lib25().default;
|
|
154327
|
+
var chunter = require_lib26().default;
|
|
154328
|
+
var contact = require_lib27().default;
|
|
154116
154329
|
var core = require_lib4().default;
|
|
154117
|
-
var documentPlugin =
|
|
154118
|
-
var notification =
|
|
154119
|
-
var tags =
|
|
154120
|
-
var task =
|
|
154121
|
-
var time =
|
|
154330
|
+
var documentPlugin = require_lib28().default;
|
|
154331
|
+
var notification = require_lib29().default;
|
|
154332
|
+
var tags = require_lib30().default;
|
|
154333
|
+
var task = require_lib33().default;
|
|
154334
|
+
var time = require_lib34().default;
|
|
154122
154335
|
var tracker = require_lib21().default;
|
|
154123
154336
|
|
|
154124
154337
|
// src/huly/operations/query-helpers.ts
|
|
@@ -173710,7 +173923,7 @@ var PostHog = class extends PostHogBackendClient {
|
|
|
173710
173923
|
};
|
|
173711
173924
|
|
|
173712
173925
|
// src/version.ts
|
|
173713
|
-
var VERSION = true ? "0.1.
|
|
173926
|
+
var VERSION = true ? "0.1.40" : "0.0.0-dev";
|
|
173714
173927
|
|
|
173715
173928
|
// src/telemetry/posthog.ts
|
|
173716
173929
|
var POSTHOG_API_KEY = "phc_TGfFqCGdnF0p68wuFzd5WSw1IsBvOJW0YgoMJDyZPjm";
|
|
@@ -174527,7 +174740,7 @@ var import_core21 = __toESM(require_lib4(), 1);
|
|
|
174527
174740
|
|
|
174528
174741
|
// src/huly/operations/documents.ts
|
|
174529
174742
|
var import_core20 = __toESM(require_lib4(), 1);
|
|
174530
|
-
var import_rank = __toESM(
|
|
174743
|
+
var import_rank = __toESM(require_lib32(), 1);
|
|
174531
174744
|
var findTeamspace = (identifier2) => Effect_exports.gen(function* () {
|
|
174532
174745
|
const client = yield* HulyClient;
|
|
174533
174746
|
const teamspace = yield* findByNameOrId(
|
|
@@ -175817,6 +176030,124 @@ var listProjectsParamsJsonSchema = JSONSchema_exports.make(ListProjectsParamsSch
|
|
|
175817
176030
|
var parseListProjectsParams = Schema_exports.decodeUnknown(ListProjectsParamsSchema);
|
|
175818
176031
|
var parseProject = Schema_exports.decodeUnknown(ProjectSchema);
|
|
175819
176032
|
|
|
176033
|
+
// src/domain/schemas/cards.ts
|
|
176034
|
+
var ListCardSpacesParamsSchema = Schema_exports.Struct({
|
|
176035
|
+
includeArchived: Schema_exports.optional(Schema_exports.Boolean.annotations({
|
|
176036
|
+
description: "Include archived card spaces in results (default: false, showing only active)"
|
|
176037
|
+
})),
|
|
176038
|
+
limit: Schema_exports.optional(
|
|
176039
|
+
LimitParam.annotations({
|
|
176040
|
+
description: "Maximum number of card spaces to return (default: 50)"
|
|
176041
|
+
})
|
|
176042
|
+
)
|
|
176043
|
+
}).annotations({
|
|
176044
|
+
title: "ListCardSpacesParams",
|
|
176045
|
+
description: "Parameters for listing card spaces"
|
|
176046
|
+
});
|
|
176047
|
+
var ListMasterTagsParamsSchema = Schema_exports.Struct({
|
|
176048
|
+
cardSpace: CardSpaceIdentifier.annotations({
|
|
176049
|
+
description: "Card space name or ID"
|
|
176050
|
+
})
|
|
176051
|
+
}).annotations({
|
|
176052
|
+
title: "ListMasterTagsParams",
|
|
176053
|
+
description: "Parameters for listing master tags (card types) available in a card space"
|
|
176054
|
+
});
|
|
176055
|
+
var ListCardsParamsSchema = Schema_exports.Struct({
|
|
176056
|
+
cardSpace: CardSpaceIdentifier.annotations({
|
|
176057
|
+
description: "Card space name or ID"
|
|
176058
|
+
}),
|
|
176059
|
+
type: Schema_exports.optional(MasterTagIdentifier.annotations({
|
|
176060
|
+
description: "Filter by master tag (card type) name or ID"
|
|
176061
|
+
})),
|
|
176062
|
+
titleSearch: Schema_exports.optional(Schema_exports.String.annotations({
|
|
176063
|
+
description: "Search cards by title substring (case-insensitive)"
|
|
176064
|
+
})),
|
|
176065
|
+
contentSearch: Schema_exports.optional(Schema_exports.String.annotations({
|
|
176066
|
+
description: "Search cards by content (fulltext search)"
|
|
176067
|
+
})),
|
|
176068
|
+
limit: Schema_exports.optional(
|
|
176069
|
+
LimitParam.annotations({
|
|
176070
|
+
description: "Maximum number of cards to return (default: 50)"
|
|
176071
|
+
})
|
|
176072
|
+
)
|
|
176073
|
+
}).annotations({
|
|
176074
|
+
title: "ListCardsParams",
|
|
176075
|
+
description: "Parameters for listing cards in a card space"
|
|
176076
|
+
});
|
|
176077
|
+
var GetCardParamsSchema = Schema_exports.Struct({
|
|
176078
|
+
cardSpace: CardSpaceIdentifier.annotations({
|
|
176079
|
+
description: "Card space name or ID"
|
|
176080
|
+
}),
|
|
176081
|
+
card: CardIdentifier.annotations({
|
|
176082
|
+
description: "Card title or ID"
|
|
176083
|
+
})
|
|
176084
|
+
}).annotations({
|
|
176085
|
+
title: "GetCardParams",
|
|
176086
|
+
description: "Parameters for getting a single card"
|
|
176087
|
+
});
|
|
176088
|
+
var CreateCardParamsSchema = Schema_exports.Struct({
|
|
176089
|
+
cardSpace: CardSpaceIdentifier.annotations({
|
|
176090
|
+
description: "Card space name or ID"
|
|
176091
|
+
}),
|
|
176092
|
+
type: MasterTagIdentifier.annotations({
|
|
176093
|
+
description: "Master tag (card type) name or ID"
|
|
176094
|
+
}),
|
|
176095
|
+
title: NonEmptyString2.annotations({
|
|
176096
|
+
description: "Card title"
|
|
176097
|
+
}),
|
|
176098
|
+
content: Schema_exports.optional(Schema_exports.String.annotations({
|
|
176099
|
+
description: "Card content (markdown supported)"
|
|
176100
|
+
})),
|
|
176101
|
+
parent: Schema_exports.optional(CardIdentifier.annotations({
|
|
176102
|
+
description: "Parent card title or ID (for creating child cards)"
|
|
176103
|
+
}))
|
|
176104
|
+
}).annotations({
|
|
176105
|
+
title: "CreateCardParams",
|
|
176106
|
+
description: "Parameters for creating a card"
|
|
176107
|
+
});
|
|
176108
|
+
var UpdateCardParamsSchema = Schema_exports.Struct({
|
|
176109
|
+
cardSpace: CardSpaceIdentifier.annotations({
|
|
176110
|
+
description: "Card space name or ID"
|
|
176111
|
+
}),
|
|
176112
|
+
card: CardIdentifier.annotations({
|
|
176113
|
+
description: "Card title or ID"
|
|
176114
|
+
}),
|
|
176115
|
+
title: Schema_exports.optional(NonEmptyString2.annotations({
|
|
176116
|
+
description: "New card title"
|
|
176117
|
+
})),
|
|
176118
|
+
content: Schema_exports.optional(Schema_exports.String.annotations({
|
|
176119
|
+
description: "New card content (markdown supported)"
|
|
176120
|
+
}))
|
|
176121
|
+
}).annotations({
|
|
176122
|
+
title: "UpdateCardParams",
|
|
176123
|
+
description: "Parameters for updating a card"
|
|
176124
|
+
});
|
|
176125
|
+
var DeleteCardParamsSchema = Schema_exports.Struct({
|
|
176126
|
+
cardSpace: CardSpaceIdentifier.annotations({
|
|
176127
|
+
description: "Card space name or ID"
|
|
176128
|
+
}),
|
|
176129
|
+
card: CardIdentifier.annotations({
|
|
176130
|
+
description: "Card title or ID"
|
|
176131
|
+
})
|
|
176132
|
+
}).annotations({
|
|
176133
|
+
title: "DeleteCardParams",
|
|
176134
|
+
description: "Parameters for deleting a card"
|
|
176135
|
+
});
|
|
176136
|
+
var listCardSpacesParamsJsonSchema = JSONSchema_exports.make(ListCardSpacesParamsSchema);
|
|
176137
|
+
var listMasterTagsParamsJsonSchema = JSONSchema_exports.make(ListMasterTagsParamsSchema);
|
|
176138
|
+
var listCardsParamsJsonSchema = JSONSchema_exports.make(ListCardsParamsSchema);
|
|
176139
|
+
var getCardParamsJsonSchema = JSONSchema_exports.make(GetCardParamsSchema);
|
|
176140
|
+
var createCardParamsJsonSchema = JSONSchema_exports.make(CreateCardParamsSchema);
|
|
176141
|
+
var updateCardParamsJsonSchema = JSONSchema_exports.make(UpdateCardParamsSchema);
|
|
176142
|
+
var deleteCardParamsJsonSchema = JSONSchema_exports.make(DeleteCardParamsSchema);
|
|
176143
|
+
var parseListCardSpacesParams = Schema_exports.decodeUnknown(ListCardSpacesParamsSchema);
|
|
176144
|
+
var parseListMasterTagsParams = Schema_exports.decodeUnknown(ListMasterTagsParamsSchema);
|
|
176145
|
+
var parseListCardsParams = Schema_exports.decodeUnknown(ListCardsParamsSchema);
|
|
176146
|
+
var parseGetCardParams = Schema_exports.decodeUnknown(GetCardParamsSchema);
|
|
176147
|
+
var parseCreateCardParams = Schema_exports.decodeUnknown(CreateCardParamsSchema);
|
|
176148
|
+
var parseUpdateCardParams = Schema_exports.decodeUnknown(UpdateCardParamsSchema);
|
|
176149
|
+
var parseDeleteCardParams = Schema_exports.decodeUnknown(DeleteCardParamsSchema);
|
|
176150
|
+
|
|
175820
176151
|
// src/utils/normalize.ts
|
|
175821
176152
|
var normalizeForComparison = (s) => s.replace(/[-_ ]/g, "").toLowerCase();
|
|
175822
176153
|
|
|
@@ -176009,11 +176340,26 @@ var DeleteIssueParamsSchema = Schema_exports.Struct({
|
|
|
176009
176340
|
title: "DeleteIssueParams",
|
|
176010
176341
|
description: "Parameters for deleting an issue"
|
|
176011
176342
|
});
|
|
176343
|
+
var RemoveLabelParamsSchema = Schema_exports.Struct({
|
|
176344
|
+
project: ProjectIdentifier.annotations({
|
|
176345
|
+
description: "Project identifier (e.g., 'HULY')"
|
|
176346
|
+
}),
|
|
176347
|
+
identifier: IssueIdentifier.annotations({
|
|
176348
|
+
description: "Issue identifier (e.g., 'HULY-123')"
|
|
176349
|
+
}),
|
|
176350
|
+
label: NonEmptyString2.annotations({
|
|
176351
|
+
description: "Label name to remove"
|
|
176352
|
+
})
|
|
176353
|
+
}).annotations({
|
|
176354
|
+
title: "RemoveLabelParams",
|
|
176355
|
+
description: "Parameters for removing a label from an issue"
|
|
176356
|
+
});
|
|
176012
176357
|
var listIssuesParamsJsonSchema = JSONSchema_exports.make(ListIssuesParamsSchema);
|
|
176013
176358
|
var getIssueParamsJsonSchema = JSONSchema_exports.make(GetIssueParamsSchema);
|
|
176014
176359
|
var createIssueParamsJsonSchema = JSONSchema_exports.make(CreateIssueParamsSchema);
|
|
176015
176360
|
var updateIssueParamsJsonSchema = JSONSchema_exports.make(UpdateIssueParamsSchema);
|
|
176016
176361
|
var addLabelParamsJsonSchema = JSONSchema_exports.make(AddLabelParamsSchema);
|
|
176362
|
+
var removeLabelParamsJsonSchema = JSONSchema_exports.make(RemoveLabelParamsSchema);
|
|
176017
176363
|
var deleteIssueParamsJsonSchema = JSONSchema_exports.make(DeleteIssueParamsSchema);
|
|
176018
176364
|
var parseIssue = Schema_exports.decodeUnknown(IssueSchema);
|
|
176019
176365
|
var parseIssueSummary = Schema_exports.decodeUnknown(IssueSummarySchema);
|
|
@@ -176022,6 +176368,7 @@ var parseGetIssueParams = Schema_exports.decodeUnknown(GetIssueParamsSchema);
|
|
|
176022
176368
|
var parseCreateIssueParams = Schema_exports.decodeUnknown(CreateIssueParamsSchema);
|
|
176023
176369
|
var parseUpdateIssueParams = Schema_exports.decodeUnknown(UpdateIssueParamsSchema);
|
|
176024
176370
|
var parseAddLabelParams = Schema_exports.decodeUnknown(AddLabelParamsSchema);
|
|
176371
|
+
var parseRemoveLabelParams = Schema_exports.decodeUnknown(RemoveLabelParamsSchema);
|
|
176025
176372
|
var parseDeleteIssueParams = Schema_exports.decodeUnknown(DeleteIssueParamsSchema);
|
|
176026
176373
|
|
|
176027
176374
|
// src/domain/schemas/components.ts
|
|
@@ -176149,6 +176496,77 @@ var parseUpdateComponentParams = Schema_exports.decodeUnknown(UpdateComponentPar
|
|
|
176149
176496
|
var parseSetIssueComponentParams = Schema_exports.decodeUnknown(SetIssueComponentParamsSchema);
|
|
176150
176497
|
var parseDeleteComponentParams = Schema_exports.decodeUnknown(DeleteComponentParamsSchema);
|
|
176151
176498
|
|
|
176499
|
+
// src/domain/schemas/labels.ts
|
|
176500
|
+
var TagElementSummarySchema = Schema_exports.Struct({
|
|
176501
|
+
id: TagElementId,
|
|
176502
|
+
title: NonEmptyString2,
|
|
176503
|
+
color: ColorCode
|
|
176504
|
+
}).annotations({
|
|
176505
|
+
title: "TagElementSummary",
|
|
176506
|
+
description: "Label/tag summary for list operations"
|
|
176507
|
+
});
|
|
176508
|
+
var ListLabelsParamsSchema = Schema_exports.Struct({
|
|
176509
|
+
limit: Schema_exports.optional(
|
|
176510
|
+
LimitParam.annotations({
|
|
176511
|
+
description: "Maximum number of labels to return (default: 50)"
|
|
176512
|
+
})
|
|
176513
|
+
)
|
|
176514
|
+
}).annotations({
|
|
176515
|
+
title: "ListLabelsParams",
|
|
176516
|
+
description: "Parameters for listing label definitions"
|
|
176517
|
+
});
|
|
176518
|
+
var CreateLabelParamsSchema = Schema_exports.Struct({
|
|
176519
|
+
title: NonEmptyString2.annotations({
|
|
176520
|
+
description: "Label name"
|
|
176521
|
+
}),
|
|
176522
|
+
color: Schema_exports.optional(
|
|
176523
|
+
ColorCode.annotations({
|
|
176524
|
+
description: "Color code (0-9, default: 0)"
|
|
176525
|
+
})
|
|
176526
|
+
),
|
|
176527
|
+
description: Schema_exports.optional(Schema_exports.String.annotations({
|
|
176528
|
+
description: "Label description"
|
|
176529
|
+
}))
|
|
176530
|
+
}).annotations({
|
|
176531
|
+
title: "CreateLabelParams",
|
|
176532
|
+
description: "Parameters for creating a label definition"
|
|
176533
|
+
});
|
|
176534
|
+
var UpdateLabelParamsSchema = Schema_exports.Struct({
|
|
176535
|
+
label: TagIdentifier.annotations({
|
|
176536
|
+
description: "Label ID or title to update"
|
|
176537
|
+
}),
|
|
176538
|
+
title: Schema_exports.optional(NonEmptyString2.annotations({
|
|
176539
|
+
description: "New label name"
|
|
176540
|
+
})),
|
|
176541
|
+
color: Schema_exports.optional(
|
|
176542
|
+
ColorCode.annotations({
|
|
176543
|
+
description: "New color code (0-9)"
|
|
176544
|
+
})
|
|
176545
|
+
),
|
|
176546
|
+
description: Schema_exports.optional(Schema_exports.String.annotations({
|
|
176547
|
+
description: "New label description"
|
|
176548
|
+
}))
|
|
176549
|
+
}).annotations({
|
|
176550
|
+
title: "UpdateLabelParams",
|
|
176551
|
+
description: "Parameters for updating a label definition"
|
|
176552
|
+
});
|
|
176553
|
+
var DeleteLabelParamsSchema = Schema_exports.Struct({
|
|
176554
|
+
label: TagIdentifier.annotations({
|
|
176555
|
+
description: "Label ID or title to delete"
|
|
176556
|
+
})
|
|
176557
|
+
}).annotations({
|
|
176558
|
+
title: "DeleteLabelParams",
|
|
176559
|
+
description: "Parameters for deleting a label definition"
|
|
176560
|
+
});
|
|
176561
|
+
var listLabelsParamsJsonSchema = JSONSchema_exports.make(ListLabelsParamsSchema);
|
|
176562
|
+
var createLabelParamsJsonSchema = JSONSchema_exports.make(CreateLabelParamsSchema);
|
|
176563
|
+
var updateLabelParamsJsonSchema = JSONSchema_exports.make(UpdateLabelParamsSchema);
|
|
176564
|
+
var deleteLabelParamsJsonSchema = JSONSchema_exports.make(DeleteLabelParamsSchema);
|
|
176565
|
+
var parseListLabelsParams = Schema_exports.decodeUnknown(ListLabelsParamsSchema);
|
|
176566
|
+
var parseCreateLabelParams = Schema_exports.decodeUnknown(CreateLabelParamsSchema);
|
|
176567
|
+
var parseUpdateLabelParams = Schema_exports.decodeUnknown(UpdateLabelParamsSchema);
|
|
176568
|
+
var parseDeleteLabelParams = Schema_exports.decodeUnknown(DeleteLabelParamsSchema);
|
|
176569
|
+
|
|
176152
176570
|
// src/domain/schemas/deletion.ts
|
|
176153
176571
|
var EntityTypeValues = ["issue", "project", "component", "milestone"];
|
|
176154
176572
|
var EntityTypeSchema = Schema_exports.Literal(...EntityTypeValues).annotations({
|
|
@@ -177465,8 +177883,365 @@ var parseUpdateUserProfileParams = Schema_exports.decodeUnknown(UpdateUserProfil
|
|
|
177465
177883
|
var parseUpdateGuestSettingsParams = Schema_exports.decodeUnknown(UpdateGuestSettingsParamsSchema);
|
|
177466
177884
|
var parseGetRegionsParams = Schema_exports.decodeUnknown(GetRegionsParamsSchema);
|
|
177467
177885
|
|
|
177468
|
-
// src/huly/operations/
|
|
177886
|
+
// src/huly/operations/cards.ts
|
|
177469
177887
|
var import_core23 = __toESM(require_lib4(), 1);
|
|
177888
|
+
var import_rank2 = __toESM(require_lib32(), 1);
|
|
177889
|
+
var findCardSpace = (identifier2) => Effect_exports.gen(function* () {
|
|
177890
|
+
const client = yield* HulyClient;
|
|
177891
|
+
const cardSpace = yield* findByNameOrId(
|
|
177892
|
+
client,
|
|
177893
|
+
cardPlugin.class.CardSpace,
|
|
177894
|
+
{ name: identifier2, archived: false },
|
|
177895
|
+
{ _id: toRef(identifier2) }
|
|
177896
|
+
);
|
|
177897
|
+
if (cardSpace === void 0) {
|
|
177898
|
+
return yield* new CardSpaceNotFoundError({ identifier: identifier2 });
|
|
177899
|
+
}
|
|
177900
|
+
return { cardSpace, client };
|
|
177901
|
+
});
|
|
177902
|
+
var findCardSpaceAndCard = (params) => Effect_exports.gen(function* () {
|
|
177903
|
+
const { cardSpace, client } = yield* findCardSpace(params.cardSpace);
|
|
177904
|
+
const card = yield* findByNameOrId(
|
|
177905
|
+
client,
|
|
177906
|
+
cardPlugin.class.Card,
|
|
177907
|
+
{ space: cardSpace._id, title: params.card },
|
|
177908
|
+
{ space: cardSpace._id, _id: toRef(params.card) }
|
|
177909
|
+
);
|
|
177910
|
+
if (card === void 0) {
|
|
177911
|
+
return yield* new CardNotFoundError({
|
|
177912
|
+
identifier: params.card,
|
|
177913
|
+
cardSpace: params.cardSpace
|
|
177914
|
+
});
|
|
177915
|
+
}
|
|
177916
|
+
return { card, cardSpace, client };
|
|
177917
|
+
});
|
|
177918
|
+
var findMasterTag = (client, cardSpace, identifier2) => Effect_exports.gen(function* () {
|
|
177919
|
+
const typeRefs = cardSpace.types;
|
|
177920
|
+
if (typeRefs.length === 0) {
|
|
177921
|
+
return yield* new MasterTagNotFoundError({
|
|
177922
|
+
identifier: identifier2,
|
|
177923
|
+
cardSpace: cardSpace.name
|
|
177924
|
+
});
|
|
177925
|
+
}
|
|
177926
|
+
const allTags = yield* client.findAll(
|
|
177927
|
+
cardPlugin.class.MasterTag,
|
|
177928
|
+
{ _id: { $in: typeRefs } }
|
|
177929
|
+
);
|
|
177930
|
+
const byName = allTags.find((t) => t.label === identifier2);
|
|
177931
|
+
if (byName !== void 0) return byName;
|
|
177932
|
+
const byId = allTags.find((t) => t._id === identifier2);
|
|
177933
|
+
if (byId !== void 0) return byId;
|
|
177934
|
+
return yield* new MasterTagNotFoundError({
|
|
177935
|
+
identifier: identifier2,
|
|
177936
|
+
cardSpace: cardSpace.name
|
|
177937
|
+
});
|
|
177938
|
+
});
|
|
177939
|
+
var listCardSpaces = (params) => Effect_exports.gen(function* () {
|
|
177940
|
+
const client = yield* HulyClient;
|
|
177941
|
+
const query = {};
|
|
177942
|
+
if (!params.includeArchived) {
|
|
177943
|
+
query.archived = false;
|
|
177944
|
+
}
|
|
177945
|
+
const limit = clampLimit(params.limit);
|
|
177946
|
+
const spaces = yield* client.findAll(
|
|
177947
|
+
cardPlugin.class.CardSpace,
|
|
177948
|
+
query,
|
|
177949
|
+
{
|
|
177950
|
+
limit,
|
|
177951
|
+
sort: {
|
|
177952
|
+
name: import_core23.SortingOrder.Ascending
|
|
177953
|
+
}
|
|
177954
|
+
}
|
|
177955
|
+
);
|
|
177956
|
+
const summaries = spaces.map((s) => ({
|
|
177957
|
+
id: CardSpaceId.make(s._id),
|
|
177958
|
+
name: s.name,
|
|
177959
|
+
description: s.description || void 0,
|
|
177960
|
+
types: s.types.map(String)
|
|
177961
|
+
}));
|
|
177962
|
+
return {
|
|
177963
|
+
cardSpaces: summaries,
|
|
177964
|
+
total: spaces.total
|
|
177965
|
+
};
|
|
177966
|
+
});
|
|
177967
|
+
var listMasterTags = (params) => Effect_exports.gen(function* () {
|
|
177968
|
+
const { cardSpace, client } = yield* findCardSpace(params.cardSpace);
|
|
177969
|
+
const typeRefs = cardSpace.types;
|
|
177970
|
+
if (typeRefs.length === 0) {
|
|
177971
|
+
return { masterTags: [], total: 0 };
|
|
177972
|
+
}
|
|
177973
|
+
const tags2 = yield* client.findAll(
|
|
177974
|
+
cardPlugin.class.MasterTag,
|
|
177975
|
+
{ _id: { $in: typeRefs } }
|
|
177976
|
+
);
|
|
177977
|
+
const summaries = tags2.map((t) => ({
|
|
177978
|
+
id: MasterTagId.make(t._id),
|
|
177979
|
+
name: t.label
|
|
177980
|
+
}));
|
|
177981
|
+
return {
|
|
177982
|
+
masterTags: summaries,
|
|
177983
|
+
total: tags2.total
|
|
177984
|
+
};
|
|
177985
|
+
});
|
|
177986
|
+
var listCards = (params) => Effect_exports.gen(function* () {
|
|
177987
|
+
const { cardSpace, client } = yield* findCardSpace(params.cardSpace);
|
|
177988
|
+
const limit = clampLimit(params.limit);
|
|
177989
|
+
const query = {
|
|
177990
|
+
space: cardSpace._id
|
|
177991
|
+
};
|
|
177992
|
+
if (params.type !== void 0) {
|
|
177993
|
+
const masterTag = yield* findMasterTag(client, cardSpace, params.type);
|
|
177994
|
+
query._class = masterTag._id;
|
|
177995
|
+
}
|
|
177996
|
+
if (params.titleSearch !== void 0 && params.titleSearch.trim() !== "") {
|
|
177997
|
+
query.title = { $like: `%${escapeLikeWildcards(params.titleSearch)}%` };
|
|
177998
|
+
}
|
|
177999
|
+
if (params.contentSearch !== void 0 && params.contentSearch.trim() !== "") {
|
|
178000
|
+
query.$search = params.contentSearch;
|
|
178001
|
+
}
|
|
178002
|
+
const cards = yield* client.findAll(
|
|
178003
|
+
cardPlugin.class.Card,
|
|
178004
|
+
query,
|
|
178005
|
+
{
|
|
178006
|
+
limit,
|
|
178007
|
+
sort: {
|
|
178008
|
+
modifiedOn: import_core23.SortingOrder.Descending
|
|
178009
|
+
}
|
|
178010
|
+
}
|
|
178011
|
+
);
|
|
178012
|
+
const summaries = cards.map((c) => ({
|
|
178013
|
+
id: CardId.make(c._id),
|
|
178014
|
+
title: c.title,
|
|
178015
|
+
type: String(c._class),
|
|
178016
|
+
modifiedOn: c.modifiedOn
|
|
178017
|
+
}));
|
|
178018
|
+
return {
|
|
178019
|
+
cards: summaries,
|
|
178020
|
+
total: cards.total
|
|
178021
|
+
};
|
|
178022
|
+
});
|
|
178023
|
+
var getCard = (params) => Effect_exports.gen(function* () {
|
|
178024
|
+
const { card, cardSpace, client } = yield* findCardSpaceAndCard({
|
|
178025
|
+
card: params.card,
|
|
178026
|
+
cardSpace: params.cardSpace
|
|
178027
|
+
});
|
|
178028
|
+
let content;
|
|
178029
|
+
if (card.content) {
|
|
178030
|
+
content = yield* client.fetchMarkup(
|
|
178031
|
+
card._class,
|
|
178032
|
+
card._id,
|
|
178033
|
+
"content",
|
|
178034
|
+
card.content,
|
|
178035
|
+
"markdown"
|
|
178036
|
+
);
|
|
178037
|
+
}
|
|
178038
|
+
return {
|
|
178039
|
+
id: CardId.make(card._id),
|
|
178040
|
+
title: card.title,
|
|
178041
|
+
content,
|
|
178042
|
+
type: String(card._class),
|
|
178043
|
+
parent: card.parent ? String(card.parent) : void 0,
|
|
178044
|
+
children: card.children,
|
|
178045
|
+
cardSpace: cardSpace.name,
|
|
178046
|
+
modifiedOn: card.modifiedOn,
|
|
178047
|
+
createdOn: card.createdOn
|
|
178048
|
+
};
|
|
178049
|
+
});
|
|
178050
|
+
var createCard = (params) => Effect_exports.gen(function* () {
|
|
178051
|
+
const { cardSpace, client } = yield* findCardSpace(params.cardSpace);
|
|
178052
|
+
const masterTag = yield* findMasterTag(client, cardSpace, params.type);
|
|
178053
|
+
const cardId = (0, import_core23.generateId)();
|
|
178054
|
+
const lastCard = yield* client.findOne(
|
|
178055
|
+
cardPlugin.class.Card,
|
|
178056
|
+
{ space: cardSpace._id },
|
|
178057
|
+
{ sort: { rank: import_core23.SortingOrder.Descending } }
|
|
178058
|
+
);
|
|
178059
|
+
const rank = (0, import_rank2.makeRank)(lastCard?.rank, void 0);
|
|
178060
|
+
const contentMarkupRef = yield* client.uploadMarkup(
|
|
178061
|
+
masterTag._id,
|
|
178062
|
+
cardId,
|
|
178063
|
+
"content",
|
|
178064
|
+
params.content ?? "",
|
|
178065
|
+
"markdown"
|
|
178066
|
+
);
|
|
178067
|
+
let parentRef = null;
|
|
178068
|
+
let parentInfo = [];
|
|
178069
|
+
if (params.parent !== void 0) {
|
|
178070
|
+
const parentCard = yield* findByNameOrId(
|
|
178071
|
+
client,
|
|
178072
|
+
cardPlugin.class.Card,
|
|
178073
|
+
{ space: cardSpace._id, title: params.parent },
|
|
178074
|
+
{ space: cardSpace._id, _id: toRef(params.parent) }
|
|
178075
|
+
);
|
|
178076
|
+
if (parentCard === void 0) {
|
|
178077
|
+
return yield* new CardNotFoundError({
|
|
178078
|
+
identifier: params.parent,
|
|
178079
|
+
cardSpace: cardSpace.name
|
|
178080
|
+
});
|
|
178081
|
+
}
|
|
178082
|
+
parentRef = parentCard._id;
|
|
178083
|
+
parentInfo = [
|
|
178084
|
+
...parentCard.parentInfo,
|
|
178085
|
+
{ _id: parentCard._id, _class: parentCard._class, title: parentCard.title }
|
|
178086
|
+
];
|
|
178087
|
+
}
|
|
178088
|
+
const cardData = {
|
|
178089
|
+
title: params.title,
|
|
178090
|
+
content: contentMarkupRef,
|
|
178091
|
+
blobs: {},
|
|
178092
|
+
parentInfo,
|
|
178093
|
+
parent: parentRef,
|
|
178094
|
+
rank
|
|
178095
|
+
};
|
|
178096
|
+
yield* client.createDoc(
|
|
178097
|
+
masterTag._id,
|
|
178098
|
+
cardSpace._id,
|
|
178099
|
+
cardData,
|
|
178100
|
+
cardId
|
|
178101
|
+
);
|
|
178102
|
+
return { id: CardId.make(cardId), title: params.title };
|
|
178103
|
+
});
|
|
178104
|
+
var updateCard = (params) => Effect_exports.gen(function* () {
|
|
178105
|
+
const { card, cardSpace, client } = yield* findCardSpaceAndCard({
|
|
178106
|
+
card: params.card,
|
|
178107
|
+
cardSpace: params.cardSpace
|
|
178108
|
+
});
|
|
178109
|
+
const updateOps = {};
|
|
178110
|
+
let contentUpdatedInPlace = false;
|
|
178111
|
+
if (params.title !== void 0) {
|
|
178112
|
+
updateOps.title = params.title;
|
|
178113
|
+
}
|
|
178114
|
+
if (params.content !== void 0) {
|
|
178115
|
+
if (card.content) {
|
|
178116
|
+
yield* client.updateMarkup(
|
|
178117
|
+
card._class,
|
|
178118
|
+
card._id,
|
|
178119
|
+
"content",
|
|
178120
|
+
params.content,
|
|
178121
|
+
"markdown"
|
|
178122
|
+
);
|
|
178123
|
+
contentUpdatedInPlace = true;
|
|
178124
|
+
} else {
|
|
178125
|
+
const contentMarkupRef = yield* client.uploadMarkup(
|
|
178126
|
+
card._class,
|
|
178127
|
+
card._id,
|
|
178128
|
+
"content",
|
|
178129
|
+
params.content,
|
|
178130
|
+
"markdown"
|
|
178131
|
+
);
|
|
178132
|
+
updateOps.content = contentMarkupRef;
|
|
178133
|
+
}
|
|
178134
|
+
}
|
|
178135
|
+
if (Object.keys(updateOps).length === 0 && !contentUpdatedInPlace) {
|
|
178136
|
+
return { id: CardId.make(card._id), updated: false };
|
|
178137
|
+
}
|
|
178138
|
+
if (Object.keys(updateOps).length > 0) {
|
|
178139
|
+
yield* client.updateDoc(
|
|
178140
|
+
card._class,
|
|
178141
|
+
cardSpace._id,
|
|
178142
|
+
card._id,
|
|
178143
|
+
updateOps
|
|
178144
|
+
);
|
|
178145
|
+
}
|
|
178146
|
+
return { id: CardId.make(card._id), updated: true };
|
|
178147
|
+
});
|
|
178148
|
+
var deleteCard = (params) => Effect_exports.gen(function* () {
|
|
178149
|
+
const { card, cardSpace, client } = yield* findCardSpaceAndCard({
|
|
178150
|
+
card: params.card,
|
|
178151
|
+
cardSpace: params.cardSpace
|
|
178152
|
+
});
|
|
178153
|
+
yield* client.removeDoc(
|
|
178154
|
+
card._class,
|
|
178155
|
+
cardSpace._id,
|
|
178156
|
+
card._id
|
|
178157
|
+
);
|
|
178158
|
+
return { id: CardId.make(card._id), deleted: true };
|
|
178159
|
+
});
|
|
178160
|
+
|
|
178161
|
+
// src/mcp/tools/cards.ts
|
|
178162
|
+
var CATEGORY4 = "cards";
|
|
178163
|
+
var cardTools = [
|
|
178164
|
+
{
|
|
178165
|
+
name: "list_card_spaces",
|
|
178166
|
+
description: "List all Huly card spaces. Returns card spaces sorted by name. Card spaces are containers for cards.",
|
|
178167
|
+
category: CATEGORY4,
|
|
178168
|
+
inputSchema: listCardSpacesParamsJsonSchema,
|
|
178169
|
+
handler: createToolHandler(
|
|
178170
|
+
"list_card_spaces",
|
|
178171
|
+
parseListCardSpacesParams,
|
|
178172
|
+
listCardSpaces
|
|
178173
|
+
)
|
|
178174
|
+
},
|
|
178175
|
+
{
|
|
178176
|
+
name: "list_master_tags",
|
|
178177
|
+
description: "List master tags (card types) available in a Huly card space. Master tags define the type/schema of cards that can be created in a space.",
|
|
178178
|
+
category: CATEGORY4,
|
|
178179
|
+
inputSchema: listMasterTagsParamsJsonSchema,
|
|
178180
|
+
handler: createToolHandler(
|
|
178181
|
+
"list_master_tags",
|
|
178182
|
+
parseListMasterTagsParams,
|
|
178183
|
+
listMasterTags
|
|
178184
|
+
)
|
|
178185
|
+
},
|
|
178186
|
+
{
|
|
178187
|
+
name: "list_cards",
|
|
178188
|
+
description: "List cards in a Huly card space. Returns cards sorted by modification date (newest first). Supports filtering by type (master tag), title substring, and content search.",
|
|
178189
|
+
category: CATEGORY4,
|
|
178190
|
+
inputSchema: listCardsParamsJsonSchema,
|
|
178191
|
+
handler: createToolHandler(
|
|
178192
|
+
"list_cards",
|
|
178193
|
+
parseListCardsParams,
|
|
178194
|
+
listCards
|
|
178195
|
+
)
|
|
178196
|
+
},
|
|
178197
|
+
{
|
|
178198
|
+
name: "get_card",
|
|
178199
|
+
description: "Retrieve full details for a Huly card including markdown content. Use this to view card content and metadata.",
|
|
178200
|
+
category: CATEGORY4,
|
|
178201
|
+
inputSchema: getCardParamsJsonSchema,
|
|
178202
|
+
handler: createToolHandler(
|
|
178203
|
+
"get_card",
|
|
178204
|
+
parseGetCardParams,
|
|
178205
|
+
getCard
|
|
178206
|
+
)
|
|
178207
|
+
},
|
|
178208
|
+
{
|
|
178209
|
+
name: "create_card",
|
|
178210
|
+
description: "Create a new card in a Huly card space. Requires a master tag (card type). Content supports markdown formatting. Returns the created card id.",
|
|
178211
|
+
category: CATEGORY4,
|
|
178212
|
+
inputSchema: createCardParamsJsonSchema,
|
|
178213
|
+
handler: createToolHandler(
|
|
178214
|
+
"create_card",
|
|
178215
|
+
parseCreateCardParams,
|
|
178216
|
+
createCard
|
|
178217
|
+
)
|
|
178218
|
+
},
|
|
178219
|
+
{
|
|
178220
|
+
name: "update_card",
|
|
178221
|
+
description: "Update fields on an existing Huly card. Only provided fields are modified. Content updates support markdown.",
|
|
178222
|
+
category: CATEGORY4,
|
|
178223
|
+
inputSchema: updateCardParamsJsonSchema,
|
|
178224
|
+
handler: createToolHandler(
|
|
178225
|
+
"update_card",
|
|
178226
|
+
parseUpdateCardParams,
|
|
178227
|
+
updateCard
|
|
178228
|
+
)
|
|
178229
|
+
},
|
|
178230
|
+
{
|
|
178231
|
+
name: "delete_card",
|
|
178232
|
+
description: "Permanently delete a Huly card. This action cannot be undone.",
|
|
178233
|
+
category: CATEGORY4,
|
|
178234
|
+
inputSchema: deleteCardParamsJsonSchema,
|
|
178235
|
+
handler: createToolHandler(
|
|
178236
|
+
"delete_card",
|
|
178237
|
+
parseDeleteCardParams,
|
|
178238
|
+
deleteCard
|
|
178239
|
+
)
|
|
178240
|
+
}
|
|
178241
|
+
];
|
|
178242
|
+
|
|
178243
|
+
// src/huly/operations/channels.ts
|
|
178244
|
+
var import_core24 = __toESM(require_lib4(), 1);
|
|
177470
178245
|
var import_text2 = __toESM(require_lib9(), 1);
|
|
177471
178246
|
var import_text_markdown2 = __toESM(require_lib17(), 1);
|
|
177472
178247
|
var personIdsAsSocialIdentityRefs = (ids3) => ids3;
|
|
@@ -177553,7 +178328,7 @@ var listChannels = (params) => Effect_exports.gen(function* () {
|
|
|
177553
178328
|
{
|
|
177554
178329
|
limit,
|
|
177555
178330
|
sort: {
|
|
177556
|
-
name:
|
|
178331
|
+
name: import_core24.SortingOrder.Ascending
|
|
177557
178332
|
}
|
|
177558
178333
|
}
|
|
177559
178334
|
);
|
|
@@ -177595,7 +178370,7 @@ var getChannel = (params) => Effect_exports.gen(function* () {
|
|
|
177595
178370
|
});
|
|
177596
178371
|
var createChannel = (params) => Effect_exports.gen(function* () {
|
|
177597
178372
|
const client = yield* HulyClient;
|
|
177598
|
-
const channelId = (0,
|
|
178373
|
+
const channelId = (0, import_core24.generateId)();
|
|
177599
178374
|
const channelData = {
|
|
177600
178375
|
name: params.name,
|
|
177601
178376
|
topic: params.topic || "",
|
|
@@ -177652,7 +178427,7 @@ var listChannelMessages = (params) => Effect_exports.gen(function* () {
|
|
|
177652
178427
|
{
|
|
177653
178428
|
limit,
|
|
177654
178429
|
sort: {
|
|
177655
|
-
createdOn:
|
|
178430
|
+
createdOn: import_core24.SortingOrder.Descending
|
|
177656
178431
|
}
|
|
177657
178432
|
}
|
|
177658
178433
|
);
|
|
@@ -177680,7 +178455,7 @@ var listChannelMessages = (params) => Effect_exports.gen(function* () {
|
|
|
177680
178455
|
});
|
|
177681
178456
|
var sendChannelMessage = (params) => Effect_exports.gen(function* () {
|
|
177682
178457
|
const { channel, client } = yield* findChannel(params.channel);
|
|
177683
|
-
const messageId = (0,
|
|
178458
|
+
const messageId = (0, import_core24.generateId)();
|
|
177684
178459
|
const markup = markdownToMarkupString(params.body);
|
|
177685
178460
|
const messageData = {
|
|
177686
178461
|
message: markup,
|
|
@@ -177706,7 +178481,7 @@ var listDirectMessages = (params) => Effect_exports.gen(function* () {
|
|
|
177706
178481
|
{
|
|
177707
178482
|
limit,
|
|
177708
178483
|
sort: {
|
|
177709
|
-
modifiedOn:
|
|
178484
|
+
modifiedOn: import_core24.SortingOrder.Descending
|
|
177710
178485
|
}
|
|
177711
178486
|
}
|
|
177712
178487
|
);
|
|
@@ -177732,7 +178507,7 @@ var listDirectMessages = (params) => Effect_exports.gen(function* () {
|
|
|
177732
178507
|
});
|
|
177733
178508
|
|
|
177734
178509
|
// src/huly/operations/threads.ts
|
|
177735
|
-
var
|
|
178510
|
+
var import_core25 = __toESM(require_lib4(), 1);
|
|
177736
178511
|
var findMessage = (channelIdentifier, messageId) => Effect_exports.gen(function* () {
|
|
177737
178512
|
const { channel, client } = yield* findChannel(channelIdentifier);
|
|
177738
178513
|
const message = yield* client.findOne(
|
|
@@ -177776,7 +178551,7 @@ var listThreadReplies = (params) => Effect_exports.gen(function* () {
|
|
|
177776
178551
|
{
|
|
177777
178552
|
limit,
|
|
177778
178553
|
sort: {
|
|
177779
|
-
createdOn:
|
|
178554
|
+
createdOn: import_core25.SortingOrder.Ascending
|
|
177780
178555
|
}
|
|
177781
178556
|
}
|
|
177782
178557
|
);
|
|
@@ -177803,7 +178578,7 @@ var listThreadReplies = (params) => Effect_exports.gen(function* () {
|
|
|
177803
178578
|
});
|
|
177804
178579
|
var addThreadReply = (params) => Effect_exports.gen(function* () {
|
|
177805
178580
|
const { channel, client, message } = yield* findMessage(params.channel, params.messageId);
|
|
177806
|
-
const replyId = (0,
|
|
178581
|
+
const replyId = (0, import_core25.generateId)();
|
|
177807
178582
|
const markup = markdownToMarkupString(params.body);
|
|
177808
178583
|
const replyData = {
|
|
177809
178584
|
message: markup,
|
|
@@ -177854,12 +178629,12 @@ var deleteThreadReply = (params) => Effect_exports.gen(function* () {
|
|
|
177854
178629
|
});
|
|
177855
178630
|
|
|
177856
178631
|
// src/mcp/tools/channels.ts
|
|
177857
|
-
var
|
|
178632
|
+
var CATEGORY5 = "channels";
|
|
177858
178633
|
var channelTools = [
|
|
177859
178634
|
{
|
|
177860
178635
|
name: "list_channels",
|
|
177861
178636
|
description: "List all Huly channels. Returns channels sorted by name. Supports filtering by archived status. Supports searching by name substring (nameSearch) and topic substring (topicSearch).",
|
|
177862
|
-
category:
|
|
178637
|
+
category: CATEGORY5,
|
|
177863
178638
|
inputSchema: listChannelsParamsJsonSchema,
|
|
177864
178639
|
handler: createToolHandler(
|
|
177865
178640
|
"list_channels",
|
|
@@ -177870,7 +178645,7 @@ var channelTools = [
|
|
|
177870
178645
|
{
|
|
177871
178646
|
name: "get_channel",
|
|
177872
178647
|
description: "Retrieve full details for a Huly channel including topic and member list.",
|
|
177873
|
-
category:
|
|
178648
|
+
category: CATEGORY5,
|
|
177874
178649
|
inputSchema: getChannelParamsJsonSchema,
|
|
177875
178650
|
handler: createToolHandler(
|
|
177876
178651
|
"get_channel",
|
|
@@ -177881,7 +178656,7 @@ var channelTools = [
|
|
|
177881
178656
|
{
|
|
177882
178657
|
name: "create_channel",
|
|
177883
178658
|
description: "Create a new channel in Huly. Returns the created channel ID and name.",
|
|
177884
|
-
category:
|
|
178659
|
+
category: CATEGORY5,
|
|
177885
178660
|
inputSchema: createChannelParamsJsonSchema,
|
|
177886
178661
|
handler: createToolHandler(
|
|
177887
178662
|
"create_channel",
|
|
@@ -177892,7 +178667,7 @@ var channelTools = [
|
|
|
177892
178667
|
{
|
|
177893
178668
|
name: "update_channel",
|
|
177894
178669
|
description: "Update fields on an existing Huly channel. Only provided fields are modified.",
|
|
177895
|
-
category:
|
|
178670
|
+
category: CATEGORY5,
|
|
177896
178671
|
inputSchema: updateChannelParamsJsonSchema,
|
|
177897
178672
|
handler: createToolHandler(
|
|
177898
178673
|
"update_channel",
|
|
@@ -177903,7 +178678,7 @@ var channelTools = [
|
|
|
177903
178678
|
{
|
|
177904
178679
|
name: "delete_channel",
|
|
177905
178680
|
description: "Permanently delete a Huly channel. This action cannot be undone.",
|
|
177906
|
-
category:
|
|
178681
|
+
category: CATEGORY5,
|
|
177907
178682
|
inputSchema: deleteChannelParamsJsonSchema,
|
|
177908
178683
|
handler: createToolHandler(
|
|
177909
178684
|
"delete_channel",
|
|
@@ -177914,7 +178689,7 @@ var channelTools = [
|
|
|
177914
178689
|
{
|
|
177915
178690
|
name: "list_channel_messages",
|
|
177916
178691
|
description: "List messages in a Huly channel. Returns messages sorted by date (newest first).",
|
|
177917
|
-
category:
|
|
178692
|
+
category: CATEGORY5,
|
|
177918
178693
|
inputSchema: listChannelMessagesParamsJsonSchema,
|
|
177919
178694
|
handler: createToolHandler(
|
|
177920
178695
|
"list_channel_messages",
|
|
@@ -177925,7 +178700,7 @@ var channelTools = [
|
|
|
177925
178700
|
{
|
|
177926
178701
|
name: "send_channel_message",
|
|
177927
178702
|
description: "Send a message to a Huly channel. Message body supports markdown formatting.",
|
|
177928
|
-
category:
|
|
178703
|
+
category: CATEGORY5,
|
|
177929
178704
|
inputSchema: sendChannelMessageParamsJsonSchema,
|
|
177930
178705
|
handler: createToolHandler(
|
|
177931
178706
|
"send_channel_message",
|
|
@@ -177936,7 +178711,7 @@ var channelTools = [
|
|
|
177936
178711
|
{
|
|
177937
178712
|
name: "list_direct_messages",
|
|
177938
178713
|
description: "List direct message conversations in Huly. Returns conversations sorted by date (newest first).",
|
|
177939
|
-
category:
|
|
178714
|
+
category: CATEGORY5,
|
|
177940
178715
|
inputSchema: listDirectMessagesParamsJsonSchema,
|
|
177941
178716
|
handler: createToolHandler(
|
|
177942
178717
|
"list_direct_messages",
|
|
@@ -177947,7 +178722,7 @@ var channelTools = [
|
|
|
177947
178722
|
{
|
|
177948
178723
|
name: "list_thread_replies",
|
|
177949
178724
|
description: "List replies in a message thread. Returns replies sorted by date (oldest first).",
|
|
177950
|
-
category:
|
|
178725
|
+
category: CATEGORY5,
|
|
177951
178726
|
inputSchema: listThreadRepliesParamsJsonSchema,
|
|
177952
178727
|
handler: createToolHandler(
|
|
177953
178728
|
"list_thread_replies",
|
|
@@ -177958,7 +178733,7 @@ var channelTools = [
|
|
|
177958
178733
|
{
|
|
177959
178734
|
name: "add_thread_reply",
|
|
177960
178735
|
description: "Add a reply to a message thread. Reply body supports markdown formatting.",
|
|
177961
|
-
category:
|
|
178736
|
+
category: CATEGORY5,
|
|
177962
178737
|
inputSchema: addThreadReplyParamsJsonSchema,
|
|
177963
178738
|
handler: createToolHandler(
|
|
177964
178739
|
"add_thread_reply",
|
|
@@ -177969,7 +178744,7 @@ var channelTools = [
|
|
|
177969
178744
|
{
|
|
177970
178745
|
name: "update_thread_reply",
|
|
177971
178746
|
description: "Update a thread reply. Only the body can be modified.",
|
|
177972
|
-
category:
|
|
178747
|
+
category: CATEGORY5,
|
|
177973
178748
|
inputSchema: updateThreadReplyParamsJsonSchema,
|
|
177974
178749
|
handler: createToolHandler(
|
|
177975
178750
|
"update_thread_reply",
|
|
@@ -177980,7 +178755,7 @@ var channelTools = [
|
|
|
177980
178755
|
{
|
|
177981
178756
|
name: "delete_thread_reply",
|
|
177982
178757
|
description: "Permanently delete a thread reply. This action cannot be undone.",
|
|
177983
|
-
category:
|
|
178758
|
+
category: CATEGORY5,
|
|
177984
178759
|
inputSchema: deleteThreadReplyParamsJsonSchema,
|
|
177985
178760
|
handler: createToolHandler(
|
|
177986
178761
|
"delete_thread_reply",
|
|
@@ -177991,7 +178766,7 @@ var channelTools = [
|
|
|
177991
178766
|
];
|
|
177992
178767
|
|
|
177993
178768
|
// src/huly/operations/comments.ts
|
|
177994
|
-
var
|
|
178769
|
+
var import_core26 = __toESM(require_lib4(), 1);
|
|
177995
178770
|
var findProjectAndIssue2 = (params) => findProjectAndIssue({ project: params.project, identifier: params.issueIdentifier });
|
|
177996
178771
|
var findComment = (params) => Effect_exports.gen(function* () {
|
|
177997
178772
|
const { client, issue: issue2, project: project3 } = yield* findProjectAndIssue2({
|
|
@@ -178029,7 +178804,7 @@ var listComments = (params) => Effect_exports.gen(function* () {
|
|
|
178029
178804
|
{
|
|
178030
178805
|
limit,
|
|
178031
178806
|
sort: {
|
|
178032
|
-
createdOn:
|
|
178807
|
+
createdOn: import_core26.SortingOrder.Ascending
|
|
178033
178808
|
}
|
|
178034
178809
|
}
|
|
178035
178810
|
);
|
|
@@ -178048,7 +178823,7 @@ var addComment = (params) => Effect_exports.gen(function* () {
|
|
|
178048
178823
|
project: params.project,
|
|
178049
178824
|
issueIdentifier: params.issueIdentifier
|
|
178050
178825
|
});
|
|
178051
|
-
const commentId = (0,
|
|
178826
|
+
const commentId = (0, import_core26.generateId)();
|
|
178052
178827
|
const commentData = {
|
|
178053
178828
|
message: params.body
|
|
178054
178829
|
};
|
|
@@ -178106,12 +178881,12 @@ var deleteComment = (params) => Effect_exports.gen(function* () {
|
|
|
178106
178881
|
});
|
|
178107
178882
|
|
|
178108
178883
|
// src/mcp/tools/comments.ts
|
|
178109
|
-
var
|
|
178884
|
+
var CATEGORY6 = "comments";
|
|
178110
178885
|
var commentTools = [
|
|
178111
178886
|
{
|
|
178112
178887
|
name: "list_comments",
|
|
178113
178888
|
description: "List comments on a Huly issue. Returns comments sorted by creation date (oldest first).",
|
|
178114
|
-
category:
|
|
178889
|
+
category: CATEGORY6,
|
|
178115
178890
|
inputSchema: listCommentsParamsJsonSchema,
|
|
178116
178891
|
handler: createToolHandler(
|
|
178117
178892
|
"list_comments",
|
|
@@ -178122,7 +178897,7 @@ var commentTools = [
|
|
|
178122
178897
|
{
|
|
178123
178898
|
name: "add_comment",
|
|
178124
178899
|
description: "Add a comment to a Huly issue. Comment body supports markdown formatting.",
|
|
178125
|
-
category:
|
|
178900
|
+
category: CATEGORY6,
|
|
178126
178901
|
inputSchema: addCommentParamsJsonSchema,
|
|
178127
178902
|
handler: createToolHandler(
|
|
178128
178903
|
"add_comment",
|
|
@@ -178133,7 +178908,7 @@ var commentTools = [
|
|
|
178133
178908
|
{
|
|
178134
178909
|
name: "update_comment",
|
|
178135
178910
|
description: "Update an existing comment on a Huly issue. Comment body supports markdown formatting.",
|
|
178136
|
-
category:
|
|
178911
|
+
category: CATEGORY6,
|
|
178137
178912
|
inputSchema: updateCommentParamsJsonSchema,
|
|
178138
178913
|
handler: createToolHandler(
|
|
178139
178914
|
"update_comment",
|
|
@@ -178144,7 +178919,7 @@ var commentTools = [
|
|
|
178144
178919
|
{
|
|
178145
178920
|
name: "delete_comment",
|
|
178146
178921
|
description: "Delete a comment from a Huly issue. This action cannot be undone.",
|
|
178147
|
-
category:
|
|
178922
|
+
category: CATEGORY6,
|
|
178148
178923
|
inputSchema: deleteCommentParamsJsonSchema,
|
|
178149
178924
|
handler: createToolHandler(
|
|
178150
178925
|
"delete_comment",
|
|
@@ -178155,8 +178930,8 @@ var commentTools = [
|
|
|
178155
178930
|
];
|
|
178156
178931
|
|
|
178157
178932
|
// src/huly/operations/contacts.ts
|
|
178158
|
-
var import_contact = __toESM(
|
|
178159
|
-
var
|
|
178933
|
+
var import_contact = __toESM(require_lib27(), 1);
|
|
178934
|
+
var import_core27 = __toESM(require_lib4(), 1);
|
|
178160
178935
|
var formatName = (firstName, lastName) => `${lastName},${firstName}`;
|
|
178161
178936
|
var parseName = (name) => {
|
|
178162
178937
|
const parts2 = name.split(",");
|
|
@@ -178215,7 +178990,7 @@ var listPersons = (params) => Effect_exports.gen(function* () {
|
|
|
178215
178990
|
query,
|
|
178216
178991
|
{
|
|
178217
178992
|
limit,
|
|
178218
|
-
sort: { modifiedOn:
|
|
178993
|
+
sort: { modifiedOn: import_core27.SortingOrder.Descending }
|
|
178219
178994
|
}
|
|
178220
178995
|
);
|
|
178221
178996
|
const personIds = persons.map((p) => p._id);
|
|
@@ -178285,7 +179060,7 @@ var getPerson = (params) => Effect_exports.gen(function* () {
|
|
|
178285
179060
|
});
|
|
178286
179061
|
var createPerson = (params) => Effect_exports.gen(function* () {
|
|
178287
179062
|
const client = yield* HulyClient;
|
|
178288
|
-
const personId = (0,
|
|
179063
|
+
const personId = (0, import_core27.generateId)();
|
|
178289
179064
|
const personData = {
|
|
178290
179065
|
name: formatName(params.firstName, params.lastName),
|
|
178291
179066
|
// Huly API requires city field to be set, even if empty
|
|
@@ -178361,7 +179136,7 @@ var listEmployees = (params) => Effect_exports.gen(function* () {
|
|
|
178361
179136
|
{},
|
|
178362
179137
|
{
|
|
178363
179138
|
limit,
|
|
178364
|
-
sort: { modifiedOn:
|
|
179139
|
+
sort: { modifiedOn: import_core27.SortingOrder.Descending }
|
|
178365
179140
|
}
|
|
178366
179141
|
);
|
|
178367
179142
|
const employeeIds = employees.map((e) => e._id);
|
|
@@ -178386,7 +179161,7 @@ var listOrganizations = (params) => Effect_exports.gen(function* () {
|
|
|
178386
179161
|
{},
|
|
178387
179162
|
{
|
|
178388
179163
|
limit,
|
|
178389
|
-
sort: { modifiedOn:
|
|
179164
|
+
sort: { modifiedOn: import_core27.SortingOrder.Descending }
|
|
178390
179165
|
}
|
|
178391
179166
|
);
|
|
178392
179167
|
return orgs.map((org) => ({
|
|
@@ -178399,7 +179174,7 @@ var listOrganizations = (params) => Effect_exports.gen(function* () {
|
|
|
178399
179174
|
});
|
|
178400
179175
|
var createOrganization = (params) => Effect_exports.gen(function* () {
|
|
178401
179176
|
const client = yield* HulyClient;
|
|
178402
|
-
const orgId = (0,
|
|
179177
|
+
const orgId = (0, import_core27.generateId)();
|
|
178403
179178
|
const orgData = {
|
|
178404
179179
|
name: params.name,
|
|
178405
179180
|
city: "",
|
|
@@ -178441,12 +179216,12 @@ var createOrganization = (params) => Effect_exports.gen(function* () {
|
|
|
178441
179216
|
});
|
|
178442
179217
|
|
|
178443
179218
|
// src/mcp/tools/contacts.ts
|
|
178444
|
-
var
|
|
179219
|
+
var CATEGORY7 = "contacts";
|
|
178445
179220
|
var contactTools = [
|
|
178446
179221
|
{
|
|
178447
179222
|
name: "list_persons",
|
|
178448
179223
|
description: "List all persons in the Huly workspace. Returns persons sorted by modification date (newest first). Supports searching by name substring (nameSearch) and email substring (emailSearch).",
|
|
178449
|
-
category:
|
|
179224
|
+
category: CATEGORY7,
|
|
178450
179225
|
inputSchema: listPersonsParamsJsonSchema,
|
|
178451
179226
|
handler: createToolHandler(
|
|
178452
179227
|
"list_persons",
|
|
@@ -178457,7 +179232,7 @@ var contactTools = [
|
|
|
178457
179232
|
{
|
|
178458
179233
|
name: "get_person",
|
|
178459
179234
|
description: "Retrieve full details for a person including contact channels. Use personId or email to identify the person.",
|
|
178460
|
-
category:
|
|
179235
|
+
category: CATEGORY7,
|
|
178461
179236
|
inputSchema: getPersonParamsJsonSchema,
|
|
178462
179237
|
handler: createToolHandler(
|
|
178463
179238
|
"get_person",
|
|
@@ -178468,7 +179243,7 @@ var contactTools = [
|
|
|
178468
179243
|
{
|
|
178469
179244
|
name: "create_person",
|
|
178470
179245
|
description: "Create a new person in Huly. Returns the created person ID.",
|
|
178471
|
-
category:
|
|
179246
|
+
category: CATEGORY7,
|
|
178472
179247
|
inputSchema: createPersonParamsJsonSchema,
|
|
178473
179248
|
handler: createToolHandler(
|
|
178474
179249
|
"create_person",
|
|
@@ -178479,7 +179254,7 @@ var contactTools = [
|
|
|
178479
179254
|
{
|
|
178480
179255
|
name: "update_person",
|
|
178481
179256
|
description: "Update fields on an existing person. Only provided fields are modified.",
|
|
178482
|
-
category:
|
|
179257
|
+
category: CATEGORY7,
|
|
178483
179258
|
inputSchema: updatePersonParamsJsonSchema,
|
|
178484
179259
|
handler: createToolHandler(
|
|
178485
179260
|
"update_person",
|
|
@@ -178490,7 +179265,7 @@ var contactTools = [
|
|
|
178490
179265
|
{
|
|
178491
179266
|
name: "delete_person",
|
|
178492
179267
|
description: "Permanently delete a person from Huly. This action cannot be undone.",
|
|
178493
|
-
category:
|
|
179268
|
+
category: CATEGORY7,
|
|
178494
179269
|
inputSchema: deletePersonParamsJsonSchema,
|
|
178495
179270
|
handler: createToolHandler(
|
|
178496
179271
|
"delete_person",
|
|
@@ -178501,7 +179276,7 @@ var contactTools = [
|
|
|
178501
179276
|
{
|
|
178502
179277
|
name: "list_employees",
|
|
178503
179278
|
description: "List employees (persons who are team members). Returns employees sorted by modification date (newest first).",
|
|
178504
|
-
category:
|
|
179279
|
+
category: CATEGORY7,
|
|
178505
179280
|
inputSchema: listEmployeesParamsJsonSchema,
|
|
178506
179281
|
handler: createToolHandler(
|
|
178507
179282
|
"list_employees",
|
|
@@ -178512,7 +179287,7 @@ var contactTools = [
|
|
|
178512
179287
|
{
|
|
178513
179288
|
name: "list_organizations",
|
|
178514
179289
|
description: "List all organizations in the Huly workspace. Returns organizations sorted by modification date (newest first).",
|
|
178515
|
-
category:
|
|
179290
|
+
category: CATEGORY7,
|
|
178516
179291
|
inputSchema: listOrganizationsParamsJsonSchema,
|
|
178517
179292
|
handler: createToolHandler(
|
|
178518
179293
|
"list_organizations",
|
|
@@ -178523,7 +179298,7 @@ var contactTools = [
|
|
|
178523
179298
|
{
|
|
178524
179299
|
name: "create_organization",
|
|
178525
179300
|
description: "Create a new organization in Huly. Optionally add members by person ID or email. Returns the created organization ID.",
|
|
178526
|
-
category:
|
|
179301
|
+
category: CATEGORY7,
|
|
178527
179302
|
inputSchema: createOrganizationParamsJsonSchema,
|
|
178528
179303
|
handler: createToolHandler(
|
|
178529
179304
|
"create_organization",
|
|
@@ -178534,7 +179309,7 @@ var contactTools = [
|
|
|
178534
179309
|
];
|
|
178535
179310
|
|
|
178536
179311
|
// src/huly/operations/components.ts
|
|
178537
|
-
var
|
|
179312
|
+
var import_core28 = __toESM(require_lib4(), 1);
|
|
178538
179313
|
|
|
178539
179314
|
// src/utils/assertions.ts
|
|
178540
179315
|
var AssertionError = class extends Error {
|
|
@@ -178591,7 +179366,7 @@ var listComponents = (params) => Effect_exports.gen(function* () {
|
|
|
178591
179366
|
{ space: project3._id },
|
|
178592
179367
|
{
|
|
178593
179368
|
limit,
|
|
178594
|
-
sort: { modifiedOn:
|
|
179369
|
+
sort: { modifiedOn: import_core28.SortingOrder.Descending }
|
|
178595
179370
|
}
|
|
178596
179371
|
);
|
|
178597
179372
|
const leadIds = [
|
|
@@ -178640,7 +179415,7 @@ var getComponent = (params) => Effect_exports.gen(function* () {
|
|
|
178640
179415
|
});
|
|
178641
179416
|
var createComponent = (params) => Effect_exports.gen(function* () {
|
|
178642
179417
|
const { client, project: project3 } = yield* findProject(params.project);
|
|
178643
|
-
const componentId = (0,
|
|
179418
|
+
const componentId = (0, import_core28.generateId)();
|
|
178644
179419
|
let leadRef = null;
|
|
178645
179420
|
if (params.lead !== void 0) {
|
|
178646
179421
|
const person = yield* findPersonByEmailOrName(client, params.lead);
|
|
@@ -178881,12 +179656,12 @@ var previewDeletion = (params) => {
|
|
|
178881
179656
|
};
|
|
178882
179657
|
|
|
178883
179658
|
// src/mcp/tools/deletion.ts
|
|
178884
|
-
var
|
|
179659
|
+
var CATEGORY8 = "issues";
|
|
178885
179660
|
var deletionTools = [
|
|
178886
179661
|
{
|
|
178887
179662
|
name: "preview_deletion",
|
|
178888
179663
|
description: "Preview the impact of deleting a Huly entity before actually deleting it. Shows affected sub-entities, relations, and warnings. Supports issues, projects, components, and milestones. Use this to understand cascade effects before calling a delete operation.",
|
|
178889
|
-
category:
|
|
179664
|
+
category: CATEGORY8,
|
|
178890
179665
|
inputSchema: previewDeletionParamsJsonSchema,
|
|
178891
179666
|
handler: createToolHandler(
|
|
178892
179667
|
"preview_deletion",
|
|
@@ -178897,12 +179672,12 @@ var deletionTools = [
|
|
|
178897
179672
|
];
|
|
178898
179673
|
|
|
178899
179674
|
// src/mcp/tools/documents.ts
|
|
178900
|
-
var
|
|
179675
|
+
var CATEGORY9 = "documents";
|
|
178901
179676
|
var documentTools = [
|
|
178902
179677
|
{
|
|
178903
179678
|
name: "list_teamspaces",
|
|
178904
179679
|
description: "List all Huly document teamspaces. Returns teamspaces sorted by name. Supports filtering by archived status.",
|
|
178905
|
-
category:
|
|
179680
|
+
category: CATEGORY9,
|
|
178906
179681
|
inputSchema: listTeamspacesParamsJsonSchema,
|
|
178907
179682
|
handler: createToolHandler(
|
|
178908
179683
|
"list_teamspaces",
|
|
@@ -178913,7 +179688,7 @@ var documentTools = [
|
|
|
178913
179688
|
{
|
|
178914
179689
|
name: "list_documents",
|
|
178915
179690
|
description: "List documents in a Huly teamspace. Returns documents sorted by modification date (newest first). Supports searching by title substring (titleSearch) and content (contentSearch).",
|
|
178916
|
-
category:
|
|
179691
|
+
category: CATEGORY9,
|
|
178917
179692
|
inputSchema: listDocumentsParamsJsonSchema,
|
|
178918
179693
|
handler: createToolHandler(
|
|
178919
179694
|
"list_documents",
|
|
@@ -178924,7 +179699,7 @@ var documentTools = [
|
|
|
178924
179699
|
{
|
|
178925
179700
|
name: "get_document",
|
|
178926
179701
|
description: "Retrieve full details for a Huly document including markdown content. Use this to view document content and metadata.",
|
|
178927
|
-
category:
|
|
179702
|
+
category: CATEGORY9,
|
|
178928
179703
|
inputSchema: getDocumentParamsJsonSchema,
|
|
178929
179704
|
handler: createToolHandler(
|
|
178930
179705
|
"get_document",
|
|
@@ -178935,7 +179710,7 @@ var documentTools = [
|
|
|
178935
179710
|
{
|
|
178936
179711
|
name: "create_document",
|
|
178937
179712
|
description: "Create a new document in a Huly teamspace. Content supports markdown formatting. Returns the created document id.",
|
|
178938
|
-
category:
|
|
179713
|
+
category: CATEGORY9,
|
|
178939
179714
|
inputSchema: createDocumentParamsJsonSchema,
|
|
178940
179715
|
handler: createToolHandler(
|
|
178941
179716
|
"create_document",
|
|
@@ -178946,7 +179721,7 @@ var documentTools = [
|
|
|
178946
179721
|
{
|
|
178947
179722
|
name: "update_document",
|
|
178948
179723
|
description: "Update fields on an existing Huly document. Only provided fields are modified. Content updates support markdown.",
|
|
178949
|
-
category:
|
|
179724
|
+
category: CATEGORY9,
|
|
178950
179725
|
inputSchema: updateDocumentParamsJsonSchema,
|
|
178951
179726
|
handler: createToolHandler(
|
|
178952
179727
|
"update_document",
|
|
@@ -178957,7 +179732,7 @@ var documentTools = [
|
|
|
178957
179732
|
{
|
|
178958
179733
|
name: "delete_document",
|
|
178959
179734
|
description: "Permanently delete a Huly document. This action cannot be undone.",
|
|
178960
|
-
category:
|
|
179735
|
+
category: CATEGORY9,
|
|
178961
179736
|
inputSchema: deleteDocumentParamsJsonSchema,
|
|
178962
179737
|
handler: createToolHandler(
|
|
178963
179738
|
"delete_document",
|
|
@@ -178968,11 +179743,11 @@ var documentTools = [
|
|
|
178968
179743
|
];
|
|
178969
179744
|
|
|
178970
179745
|
// src/huly/operations/issue-templates.ts
|
|
178971
|
-
var
|
|
179746
|
+
var import_core30 = __toESM(require_lib4(), 1);
|
|
178972
179747
|
|
|
178973
179748
|
// src/huly/operations/issues.ts
|
|
178974
|
-
var
|
|
178975
|
-
var
|
|
179749
|
+
var import_core29 = __toESM(require_lib4(), 1);
|
|
179750
|
+
var import_rank3 = __toESM(require_lib32(), 1);
|
|
178976
179751
|
var import_tracker2 = __toESM(require_lib21(), 1);
|
|
178977
179752
|
var TxIncResult = Schema_exports.Struct({
|
|
178978
179753
|
object: Schema_exports.Struct({
|
|
@@ -179071,7 +179846,7 @@ var listIssues = (params) => Effect_exports.gen(function* () {
|
|
|
179071
179846
|
{
|
|
179072
179847
|
limit,
|
|
179073
179848
|
sort: {
|
|
179074
|
-
modifiedOn:
|
|
179849
|
+
modifiedOn: import_core29.SortingOrder.Descending
|
|
179075
179850
|
}
|
|
179076
179851
|
},
|
|
179077
179852
|
{ assignee: contact.class.Person }
|
|
@@ -179157,7 +179932,7 @@ var createIssue = (params) => Effect_exports.gen(function* () {
|
|
|
179157
179932
|
statuses: []
|
|
179158
179933
|
}));
|
|
179159
179934
|
const { client, project: project3, statuses } = result;
|
|
179160
|
-
const issueId = (0,
|
|
179935
|
+
const issueId = (0, import_core29.generateId)();
|
|
179161
179936
|
const incOps = { $inc: { sequence: 1 } };
|
|
179162
179937
|
const incResult = yield* client.updateDoc(
|
|
179163
179938
|
tracker.class.Project,
|
|
@@ -179179,9 +179954,9 @@ var createIssue = (params) => Effect_exports.gen(function* () {
|
|
|
179179
179954
|
const lastIssue = yield* client.findOne(
|
|
179180
179955
|
tracker.class.Issue,
|
|
179181
179956
|
{ space: project3._id },
|
|
179182
|
-
{ sort: { rank:
|
|
179957
|
+
{ sort: { rank: import_core29.SortingOrder.Descending } }
|
|
179183
179958
|
);
|
|
179184
|
-
const rank = (0,
|
|
179959
|
+
const rank = (0, import_rank3.makeRank)(lastIssue?.rank, void 0);
|
|
179185
179960
|
let descriptionMarkupRef = null;
|
|
179186
179961
|
if (params.description !== void 0 && params.description.trim() !== "") {
|
|
179187
179962
|
descriptionMarkupRef = yield* client.uploadMarkup(
|
|
@@ -179331,7 +180106,7 @@ var addLabel = (params) => Effect_exports.gen(function* () {
|
|
|
179331
180106
|
}
|
|
179332
180107
|
);
|
|
179333
180108
|
if (tagElement === void 0) {
|
|
179334
|
-
const tagElementId = (0,
|
|
180109
|
+
const tagElementId = (0, import_core29.generateId)();
|
|
179335
180110
|
const tagElementData = {
|
|
179336
180111
|
title: labelTitle,
|
|
179337
180112
|
description: "",
|
|
@@ -179417,7 +180192,7 @@ var listIssueTemplates = (params) => Effect_exports.gen(function* () {
|
|
|
179417
180192
|
{ space: project3._id },
|
|
179418
180193
|
{
|
|
179419
180194
|
limit,
|
|
179420
|
-
sort: { modifiedOn:
|
|
180195
|
+
sort: { modifiedOn: import_core30.SortingOrder.Descending }
|
|
179421
180196
|
}
|
|
179422
180197
|
);
|
|
179423
180198
|
const summaries = templates.map((t) => ({
|
|
@@ -179466,7 +180241,7 @@ var getIssueTemplate = (params) => Effect_exports.gen(function* () {
|
|
|
179466
180241
|
});
|
|
179467
180242
|
var createIssueTemplate = (params) => Effect_exports.gen(function* () {
|
|
179468
180243
|
const { client, project: project3 } = yield* findProject(params.project);
|
|
179469
|
-
const templateId = (0,
|
|
180244
|
+
const templateId = (0, import_core30.generateId)();
|
|
179470
180245
|
let assigneeRef = null;
|
|
179471
180246
|
if (params.assignee !== void 0) {
|
|
179472
180247
|
const person = yield* findPersonByEmailOrName(client, params.assignee);
|
|
@@ -179607,6 +180382,141 @@ var deleteIssueTemplate = (params) => Effect_exports.gen(function* () {
|
|
|
179607
180382
|
return { id: IssueTemplateId.make(template._id), deleted: true };
|
|
179608
180383
|
});
|
|
179609
180384
|
|
|
180385
|
+
// src/huly/operations/labels.ts
|
|
180386
|
+
var import_core31 = __toESM(require_lib4(), 1);
|
|
180387
|
+
var issueClassRef = toRef(tracker.class.Issue);
|
|
180388
|
+
var findTagByIdOrTitle = (client, idOrTitle) => Effect_exports.gen(function* () {
|
|
180389
|
+
let tag2 = yield* client.findOne(
|
|
180390
|
+
tags.class.TagElement,
|
|
180391
|
+
{
|
|
180392
|
+
_id: toRef(idOrTitle),
|
|
180393
|
+
targetClass: issueClassRef
|
|
180394
|
+
}
|
|
180395
|
+
);
|
|
180396
|
+
if (tag2 === void 0) {
|
|
180397
|
+
tag2 = yield* client.findOne(
|
|
180398
|
+
tags.class.TagElement,
|
|
180399
|
+
{
|
|
180400
|
+
title: idOrTitle,
|
|
180401
|
+
targetClass: issueClassRef
|
|
180402
|
+
}
|
|
180403
|
+
);
|
|
180404
|
+
}
|
|
180405
|
+
return tag2;
|
|
180406
|
+
});
|
|
180407
|
+
var findTagOrFail = (client, idOrTitle) => Effect_exports.gen(function* () {
|
|
180408
|
+
const tag2 = yield* findTagByIdOrTitle(client, idOrTitle);
|
|
180409
|
+
if (tag2 === void 0) {
|
|
180410
|
+
return yield* new TagNotFoundError({ identifier: idOrTitle });
|
|
180411
|
+
}
|
|
180412
|
+
return tag2;
|
|
180413
|
+
});
|
|
180414
|
+
var listLabels = (params) => Effect_exports.gen(function* () {
|
|
180415
|
+
const client = yield* HulyClient;
|
|
180416
|
+
const limit = clampLimit(params.limit);
|
|
180417
|
+
const elements = yield* client.findAll(
|
|
180418
|
+
tags.class.TagElement,
|
|
180419
|
+
{ targetClass: issueClassRef },
|
|
180420
|
+
{
|
|
180421
|
+
limit,
|
|
180422
|
+
sort: { modifiedOn: import_core31.SortingOrder.Descending }
|
|
180423
|
+
}
|
|
180424
|
+
);
|
|
180425
|
+
return elements.map((e) => ({
|
|
180426
|
+
id: TagElementId.make(e._id),
|
|
180427
|
+
title: e.title,
|
|
180428
|
+
// Clamp to valid range — Huly API may return out-of-range color values
|
|
180429
|
+
color: ColorCode.make(Math.max(0, Math.min(9, Math.trunc(e.color))))
|
|
180430
|
+
// eslint-disable-line no-magic-numbers
|
|
180431
|
+
}));
|
|
180432
|
+
});
|
|
180433
|
+
var createLabel = (params) => Effect_exports.gen(function* () {
|
|
180434
|
+
const client = yield* HulyClient;
|
|
180435
|
+
const existing = yield* client.findOne(
|
|
180436
|
+
tags.class.TagElement,
|
|
180437
|
+
{
|
|
180438
|
+
title: params.title,
|
|
180439
|
+
targetClass: issueClassRef
|
|
180440
|
+
}
|
|
180441
|
+
);
|
|
180442
|
+
if (existing !== void 0) {
|
|
180443
|
+
return { id: TagElementId.make(existing._id), title: existing.title, created: false };
|
|
180444
|
+
}
|
|
180445
|
+
const tagId = (0, import_core31.generateId)();
|
|
180446
|
+
const color = params.color ?? 0;
|
|
180447
|
+
const tagData = {
|
|
180448
|
+
title: params.title,
|
|
180449
|
+
description: params.description ?? "",
|
|
180450
|
+
targetClass: issueClassRef,
|
|
180451
|
+
color,
|
|
180452
|
+
category: tracker.category.Other
|
|
180453
|
+
};
|
|
180454
|
+
yield* client.createDoc(
|
|
180455
|
+
tags.class.TagElement,
|
|
180456
|
+
toRef(core.space.Workspace),
|
|
180457
|
+
tagData,
|
|
180458
|
+
tagId
|
|
180459
|
+
);
|
|
180460
|
+
return { id: TagElementId.make(tagId), title: params.title, created: true };
|
|
180461
|
+
});
|
|
180462
|
+
var updateLabel = (params) => Effect_exports.gen(function* () {
|
|
180463
|
+
const client = yield* HulyClient;
|
|
180464
|
+
const tag2 = yield* findTagOrFail(client, params.label);
|
|
180465
|
+
const updateOps = {};
|
|
180466
|
+
if (params.title !== void 0) {
|
|
180467
|
+
updateOps.title = params.title;
|
|
180468
|
+
}
|
|
180469
|
+
if (params.color !== void 0) {
|
|
180470
|
+
updateOps.color = params.color;
|
|
180471
|
+
}
|
|
180472
|
+
if (params.description !== void 0) {
|
|
180473
|
+
updateOps.description = params.description;
|
|
180474
|
+
}
|
|
180475
|
+
if (Object.keys(updateOps).length === 0) {
|
|
180476
|
+
return { id: TagElementId.make(tag2._id), updated: false };
|
|
180477
|
+
}
|
|
180478
|
+
yield* client.updateDoc(
|
|
180479
|
+
tags.class.TagElement,
|
|
180480
|
+
toRef(core.space.Workspace),
|
|
180481
|
+
tag2._id,
|
|
180482
|
+
updateOps
|
|
180483
|
+
);
|
|
180484
|
+
return { id: TagElementId.make(tag2._id), updated: true };
|
|
180485
|
+
});
|
|
180486
|
+
var deleteLabel = (params) => Effect_exports.gen(function* () {
|
|
180487
|
+
const client = yield* HulyClient;
|
|
180488
|
+
const tag2 = yield* findTagOrFail(client, params.label);
|
|
180489
|
+
yield* client.removeDoc(
|
|
180490
|
+
tags.class.TagElement,
|
|
180491
|
+
toRef(core.space.Workspace),
|
|
180492
|
+
tag2._id
|
|
180493
|
+
);
|
|
180494
|
+
return { id: TagElementId.make(tag2._id), deleted: true };
|
|
180495
|
+
});
|
|
180496
|
+
var removeIssueLabel = (params) => Effect_exports.gen(function* () {
|
|
180497
|
+
const { client, issue: issue2, project: project3 } = yield* findProjectAndIssue(params);
|
|
180498
|
+
const labelTitle = params.label.trim();
|
|
180499
|
+
const tagRefs = yield* client.findAll(
|
|
180500
|
+
tags.class.TagReference,
|
|
180501
|
+
{
|
|
180502
|
+
attachedTo: issue2._id,
|
|
180503
|
+
attachedToClass: tracker.class.Issue
|
|
180504
|
+
}
|
|
180505
|
+
);
|
|
180506
|
+
const matchingRef = tagRefs.find(
|
|
180507
|
+
(r) => r.title.toLowerCase() === labelTitle.toLowerCase()
|
|
180508
|
+
);
|
|
180509
|
+
if (matchingRef === void 0) {
|
|
180510
|
+
return yield* new TagNotFoundError({ identifier: labelTitle });
|
|
180511
|
+
}
|
|
180512
|
+
yield* client.removeDoc(
|
|
180513
|
+
tags.class.TagReference,
|
|
180514
|
+
project3._id,
|
|
180515
|
+
matchingRef._id
|
|
180516
|
+
);
|
|
180517
|
+
return { identifier: IssueIdentifier.make(issue2.identifier), labelRemoved: true };
|
|
180518
|
+
});
|
|
180519
|
+
|
|
179610
180520
|
// src/huly/operations/relations.ts
|
|
179611
180521
|
var resolveTargetIssue = (client, sourceProject, targetIssueStr) => Effect_exports.gen(function* () {
|
|
179612
180522
|
const { fullIdentifier } = parseIssueIdentifier(targetIssueStr, sourceProject.identifier);
|
|
@@ -179767,12 +180677,12 @@ var listIssueRelations = (params) => Effect_exports.gen(function* () {
|
|
|
179767
180677
|
});
|
|
179768
180678
|
|
|
179769
180679
|
// src/mcp/tools/issues.ts
|
|
179770
|
-
var
|
|
180680
|
+
var CATEGORY10 = "issues";
|
|
179771
180681
|
var issueTools = [
|
|
179772
180682
|
{
|
|
179773
180683
|
name: "list_issues",
|
|
179774
180684
|
description: "Query Huly issues with optional filters. Returns issues sorted by modification date (newest first). Supports filtering by project, status, assignee, and milestone. Supports searching by title substring (titleSearch) and description content (descriptionSearch).",
|
|
179775
|
-
category:
|
|
180685
|
+
category: CATEGORY10,
|
|
179776
180686
|
inputSchema: listIssuesParamsJsonSchema,
|
|
179777
180687
|
handler: createToolHandler(
|
|
179778
180688
|
"list_issues",
|
|
@@ -179783,7 +180693,7 @@ var issueTools = [
|
|
|
179783
180693
|
{
|
|
179784
180694
|
name: "get_issue",
|
|
179785
180695
|
description: "Retrieve full details for a Huly issue including markdown description. Use this to view issue content, comments, or full metadata.",
|
|
179786
|
-
category:
|
|
180696
|
+
category: CATEGORY10,
|
|
179787
180697
|
inputSchema: getIssueParamsJsonSchema,
|
|
179788
180698
|
handler: createToolHandler(
|
|
179789
180699
|
"get_issue",
|
|
@@ -179794,7 +180704,7 @@ var issueTools = [
|
|
|
179794
180704
|
{
|
|
179795
180705
|
name: "create_issue",
|
|
179796
180706
|
description: "Create a new issue in a Huly project. Optionally create as a sub-issue by specifying parentIssue. Description supports markdown formatting. Returns the created issue identifier.",
|
|
179797
|
-
category:
|
|
180707
|
+
category: CATEGORY10,
|
|
179798
180708
|
inputSchema: createIssueParamsJsonSchema,
|
|
179799
180709
|
handler: createToolHandler(
|
|
179800
180710
|
"create_issue",
|
|
@@ -179805,7 +180715,7 @@ var issueTools = [
|
|
|
179805
180715
|
{
|
|
179806
180716
|
name: "update_issue",
|
|
179807
180717
|
description: "Update fields on an existing Huly issue. Only provided fields are modified. Description updates support markdown.",
|
|
179808
|
-
category:
|
|
180718
|
+
category: CATEGORY10,
|
|
179809
180719
|
inputSchema: updateIssueParamsJsonSchema,
|
|
179810
180720
|
handler: createToolHandler(
|
|
179811
180721
|
"update_issue",
|
|
@@ -179816,7 +180726,7 @@ var issueTools = [
|
|
|
179816
180726
|
{
|
|
179817
180727
|
name: "add_issue_label",
|
|
179818
180728
|
description: "Add a tag/label to a Huly issue. Creates the tag if it doesn't exist in the project.",
|
|
179819
|
-
category:
|
|
180729
|
+
category: CATEGORY10,
|
|
179820
180730
|
inputSchema: addLabelParamsJsonSchema,
|
|
179821
180731
|
handler: createToolHandler(
|
|
179822
180732
|
"add_issue_label",
|
|
@@ -179824,10 +180734,21 @@ var issueTools = [
|
|
|
179824
180734
|
addLabel
|
|
179825
180735
|
)
|
|
179826
180736
|
},
|
|
180737
|
+
{
|
|
180738
|
+
name: "remove_issue_label",
|
|
180739
|
+
description: "Remove a tag/label from a Huly issue. Detaches the label reference; does not delete the label definition.",
|
|
180740
|
+
category: CATEGORY10,
|
|
180741
|
+
inputSchema: removeLabelParamsJsonSchema,
|
|
180742
|
+
handler: createToolHandler(
|
|
180743
|
+
"remove_issue_label",
|
|
180744
|
+
parseRemoveLabelParams,
|
|
180745
|
+
removeIssueLabel
|
|
180746
|
+
)
|
|
180747
|
+
},
|
|
179827
180748
|
{
|
|
179828
180749
|
name: "delete_issue",
|
|
179829
180750
|
description: "Permanently delete a Huly issue. This action cannot be undone.",
|
|
179830
|
-
category:
|
|
180751
|
+
category: CATEGORY10,
|
|
179831
180752
|
inputSchema: deleteIssueParamsJsonSchema,
|
|
179832
180753
|
handler: createToolHandler(
|
|
179833
180754
|
"delete_issue",
|
|
@@ -179838,7 +180759,7 @@ var issueTools = [
|
|
|
179838
180759
|
{
|
|
179839
180760
|
name: "list_components",
|
|
179840
180761
|
description: "List components in a Huly project. Components organize issues by area/feature. Returns components sorted by modification date (newest first).",
|
|
179841
|
-
category:
|
|
180762
|
+
category: CATEGORY10,
|
|
179842
180763
|
inputSchema: listComponentsParamsJsonSchema,
|
|
179843
180764
|
handler: createToolHandler(
|
|
179844
180765
|
"list_components",
|
|
@@ -179849,7 +180770,7 @@ var issueTools = [
|
|
|
179849
180770
|
{
|
|
179850
180771
|
name: "get_component",
|
|
179851
180772
|
description: "Retrieve full details for a Huly component. Use this to view component content and metadata.",
|
|
179852
|
-
category:
|
|
180773
|
+
category: CATEGORY10,
|
|
179853
180774
|
inputSchema: getComponentParamsJsonSchema,
|
|
179854
180775
|
handler: createToolHandler(
|
|
179855
180776
|
"get_component",
|
|
@@ -179860,7 +180781,7 @@ var issueTools = [
|
|
|
179860
180781
|
{
|
|
179861
180782
|
name: "create_component",
|
|
179862
180783
|
description: "Create a new component in a Huly project. Components help organize issues by area/feature. Returns the created component ID and label.",
|
|
179863
|
-
category:
|
|
180784
|
+
category: CATEGORY10,
|
|
179864
180785
|
inputSchema: createComponentParamsJsonSchema,
|
|
179865
180786
|
handler: createToolHandler(
|
|
179866
180787
|
"create_component",
|
|
@@ -179871,7 +180792,7 @@ var issueTools = [
|
|
|
179871
180792
|
{
|
|
179872
180793
|
name: "update_component",
|
|
179873
180794
|
description: "Update fields on an existing Huly component. Only provided fields are modified.",
|
|
179874
|
-
category:
|
|
180795
|
+
category: CATEGORY10,
|
|
179875
180796
|
inputSchema: updateComponentParamsJsonSchema,
|
|
179876
180797
|
handler: createToolHandler(
|
|
179877
180798
|
"update_component",
|
|
@@ -179882,7 +180803,7 @@ var issueTools = [
|
|
|
179882
180803
|
{
|
|
179883
180804
|
name: "set_issue_component",
|
|
179884
180805
|
description: "Set or clear the component on a Huly issue. Pass null for component to clear it.",
|
|
179885
|
-
category:
|
|
180806
|
+
category: CATEGORY10,
|
|
179886
180807
|
inputSchema: setIssueComponentParamsJsonSchema,
|
|
179887
180808
|
handler: createToolHandler(
|
|
179888
180809
|
"set_issue_component",
|
|
@@ -179893,7 +180814,7 @@ var issueTools = [
|
|
|
179893
180814
|
{
|
|
179894
180815
|
name: "delete_component",
|
|
179895
180816
|
description: "Permanently delete a Huly component. This action cannot be undone.",
|
|
179896
|
-
category:
|
|
180817
|
+
category: CATEGORY10,
|
|
179897
180818
|
inputSchema: deleteComponentParamsJsonSchema,
|
|
179898
180819
|
handler: createToolHandler(
|
|
179899
180820
|
"delete_component",
|
|
@@ -179904,7 +180825,7 @@ var issueTools = [
|
|
|
179904
180825
|
{
|
|
179905
180826
|
name: "list_issue_templates",
|
|
179906
180827
|
description: "List issue templates in a Huly project. Templates define reusable issue configurations. Returns templates sorted by modification date (newest first).",
|
|
179907
|
-
category:
|
|
180828
|
+
category: CATEGORY10,
|
|
179908
180829
|
inputSchema: listIssueTemplatesParamsJsonSchema,
|
|
179909
180830
|
handler: createToolHandler(
|
|
179910
180831
|
"list_issue_templates",
|
|
@@ -179915,7 +180836,7 @@ var issueTools = [
|
|
|
179915
180836
|
{
|
|
179916
180837
|
name: "get_issue_template",
|
|
179917
180838
|
description: "Retrieve full details for a Huly issue template. Use this to view template content and default values.",
|
|
179918
|
-
category:
|
|
180839
|
+
category: CATEGORY10,
|
|
179919
180840
|
inputSchema: getIssueTemplateParamsJsonSchema,
|
|
179920
180841
|
handler: createToolHandler(
|
|
179921
180842
|
"get_issue_template",
|
|
@@ -179926,7 +180847,7 @@ var issueTools = [
|
|
|
179926
180847
|
{
|
|
179927
180848
|
name: "create_issue_template",
|
|
179928
180849
|
description: "Create a new issue template in a Huly project. Templates define default values for new issues. Returns the created template ID and title.",
|
|
179929
|
-
category:
|
|
180850
|
+
category: CATEGORY10,
|
|
179930
180851
|
inputSchema: createIssueTemplateParamsJsonSchema,
|
|
179931
180852
|
handler: createToolHandler(
|
|
179932
180853
|
"create_issue_template",
|
|
@@ -179937,7 +180858,7 @@ var issueTools = [
|
|
|
179937
180858
|
{
|
|
179938
180859
|
name: "create_issue_from_template",
|
|
179939
180860
|
description: "Create a new issue from a template. Applies template defaults, allowing overrides for specific fields. Returns the created issue identifier.",
|
|
179940
|
-
category:
|
|
180861
|
+
category: CATEGORY10,
|
|
179941
180862
|
inputSchema: createIssueFromTemplateParamsJsonSchema,
|
|
179942
180863
|
handler: createToolHandler(
|
|
179943
180864
|
"create_issue_from_template",
|
|
@@ -179948,7 +180869,7 @@ var issueTools = [
|
|
|
179948
180869
|
{
|
|
179949
180870
|
name: "update_issue_template",
|
|
179950
180871
|
description: "Update fields on an existing Huly issue template. Only provided fields are modified.",
|
|
179951
|
-
category:
|
|
180872
|
+
category: CATEGORY10,
|
|
179952
180873
|
inputSchema: updateIssueTemplateParamsJsonSchema,
|
|
179953
180874
|
handler: createToolHandler(
|
|
179954
180875
|
"update_issue_template",
|
|
@@ -179959,7 +180880,7 @@ var issueTools = [
|
|
|
179959
180880
|
{
|
|
179960
180881
|
name: "delete_issue_template",
|
|
179961
180882
|
description: "Permanently delete a Huly issue template. This action cannot be undone.",
|
|
179962
|
-
category:
|
|
180883
|
+
category: CATEGORY10,
|
|
179963
180884
|
inputSchema: deleteIssueTemplateParamsJsonSchema,
|
|
179964
180885
|
handler: createToolHandler(
|
|
179965
180886
|
"delete_issue_template",
|
|
@@ -179970,7 +180891,7 @@ var issueTools = [
|
|
|
179970
180891
|
{
|
|
179971
180892
|
name: "add_issue_relation",
|
|
179972
180893
|
description: "Add a relation between two issues. Relation types: 'blocks' (source blocks target \u2014 pushes into target's blockedBy), 'is-blocked-by' (source is blocked by target \u2014 pushes into source's blockedBy), 'relates-to' (bidirectional link \u2014 updates both sides). targetIssue accepts cross-project identifiers like 'OTHER-42'. No-op if the relation already exists.",
|
|
179973
|
-
category:
|
|
180894
|
+
category: CATEGORY10,
|
|
179974
180895
|
inputSchema: addIssueRelationParamsJsonSchema,
|
|
179975
180896
|
handler: createToolHandler(
|
|
179976
180897
|
"add_issue_relation",
|
|
@@ -179981,7 +180902,7 @@ var issueTools = [
|
|
|
179981
180902
|
{
|
|
179982
180903
|
name: "remove_issue_relation",
|
|
179983
180904
|
description: "Remove a relation between two issues. Mirrors add_issue_relation: 'blocks' pulls from target's blockedBy, 'is-blocked-by' pulls from source's blockedBy, 'relates-to' pulls from both sides. No-op if the relation doesn't exist.",
|
|
179984
|
-
category:
|
|
180905
|
+
category: CATEGORY10,
|
|
179985
180906
|
inputSchema: removeIssueRelationParamsJsonSchema,
|
|
179986
180907
|
handler: createToolHandler(
|
|
179987
180908
|
"remove_issue_relation",
|
|
@@ -179992,7 +180913,7 @@ var issueTools = [
|
|
|
179992
180913
|
{
|
|
179993
180914
|
name: "list_issue_relations",
|
|
179994
180915
|
description: "List all relations of an issue. Returns blockedBy (issues blocking this one) and relations (bidirectional links) with resolved identifiers. Does NOT return issues that this issue blocks \u2014 use list_issue_relations on the target issue to see that.",
|
|
179995
|
-
category:
|
|
180916
|
+
category: CATEGORY10,
|
|
179996
180917
|
inputSchema: listIssueRelationsParamsJsonSchema,
|
|
179997
180918
|
handler: createToolHandler(
|
|
179998
180919
|
"list_issue_relations",
|
|
@@ -180002,8 +180923,57 @@ var issueTools = [
|
|
|
180002
180923
|
}
|
|
180003
180924
|
];
|
|
180004
180925
|
|
|
180926
|
+
// src/mcp/tools/labels.ts
|
|
180927
|
+
var CATEGORY11 = "labels";
|
|
180928
|
+
var labelTools = [
|
|
180929
|
+
{
|
|
180930
|
+
name: "list_labels",
|
|
180931
|
+
description: "List label/tag definitions in the workspace. Labels are global (not project-scoped). Returns labels for tracker issues sorted by modification date (newest first).",
|
|
180932
|
+
category: CATEGORY11,
|
|
180933
|
+
inputSchema: listLabelsParamsJsonSchema,
|
|
180934
|
+
handler: createToolHandler(
|
|
180935
|
+
"list_labels",
|
|
180936
|
+
parseListLabelsParams,
|
|
180937
|
+
listLabels
|
|
180938
|
+
)
|
|
180939
|
+
},
|
|
180940
|
+
{
|
|
180941
|
+
name: "create_label",
|
|
180942
|
+
description: "Create a new label/tag definition in the workspace. Labels are global and can be attached to any issue. Returns existing label if one with the same title already exists (created=false). Use add_issue_label to attach a label to a specific issue.",
|
|
180943
|
+
category: CATEGORY11,
|
|
180944
|
+
inputSchema: createLabelParamsJsonSchema,
|
|
180945
|
+
handler: createToolHandler(
|
|
180946
|
+
"create_label",
|
|
180947
|
+
parseCreateLabelParams,
|
|
180948
|
+
createLabel
|
|
180949
|
+
)
|
|
180950
|
+
},
|
|
180951
|
+
{
|
|
180952
|
+
name: "update_label",
|
|
180953
|
+
description: "Update a label/tag definition. Accepts label ID or title. Only provided fields are modified.",
|
|
180954
|
+
category: CATEGORY11,
|
|
180955
|
+
inputSchema: updateLabelParamsJsonSchema,
|
|
180956
|
+
handler: createToolHandler(
|
|
180957
|
+
"update_label",
|
|
180958
|
+
parseUpdateLabelParams,
|
|
180959
|
+
updateLabel
|
|
180960
|
+
)
|
|
180961
|
+
},
|
|
180962
|
+
{
|
|
180963
|
+
name: "delete_label",
|
|
180964
|
+
description: "Permanently delete a label/tag definition. Accepts label ID or title. This action cannot be undone.",
|
|
180965
|
+
category: CATEGORY11,
|
|
180966
|
+
inputSchema: deleteLabelParamsJsonSchema,
|
|
180967
|
+
handler: createToolHandler(
|
|
180968
|
+
"delete_label",
|
|
180969
|
+
parseDeleteLabelParams,
|
|
180970
|
+
deleteLabel
|
|
180971
|
+
)
|
|
180972
|
+
}
|
|
180973
|
+
];
|
|
180974
|
+
|
|
180005
180975
|
// src/huly/operations/milestones.ts
|
|
180006
|
-
var
|
|
180976
|
+
var import_core32 = __toESM(require_lib4(), 1);
|
|
180007
180977
|
var import_tracker3 = __toESM(require_lib21(), 1);
|
|
180008
180978
|
var milestoneStatusToStringMap = {
|
|
180009
180979
|
[import_tracker3.MilestoneStatus.Planned]: "planned",
|
|
@@ -180047,7 +181017,7 @@ var listMilestones = (params) => Effect_exports.gen(function* () {
|
|
|
180047
181017
|
{ space: project3._id },
|
|
180048
181018
|
{
|
|
180049
181019
|
limit,
|
|
180050
|
-
sort: { modifiedOn:
|
|
181020
|
+
sort: { modifiedOn: import_core32.SortingOrder.Descending }
|
|
180051
181021
|
}
|
|
180052
181022
|
);
|
|
180053
181023
|
const summaries = milestones.map((m) => ({
|
|
@@ -180075,7 +181045,7 @@ var getMilestone = (params) => Effect_exports.gen(function* () {
|
|
|
180075
181045
|
});
|
|
180076
181046
|
var createMilestone = (params) => Effect_exports.gen(function* () {
|
|
180077
181047
|
const { client, project: project3 } = yield* findProject(params.project);
|
|
180078
|
-
const milestoneId = (0,
|
|
181048
|
+
const milestoneId = (0, import_core32.generateId)();
|
|
180079
181049
|
const milestoneData = {
|
|
180080
181050
|
label: params.label,
|
|
180081
181051
|
description: params.description ?? "",
|
|
@@ -180143,12 +181113,12 @@ var deleteMilestone = (params) => Effect_exports.gen(function* () {
|
|
|
180143
181113
|
});
|
|
180144
181114
|
|
|
180145
181115
|
// src/mcp/tools/milestones.ts
|
|
180146
|
-
var
|
|
181116
|
+
var CATEGORY12 = "milestones";
|
|
180147
181117
|
var milestoneTools = [
|
|
180148
181118
|
{
|
|
180149
181119
|
name: "list_milestones",
|
|
180150
181120
|
description: "List milestones in a Huly project. Returns milestones sorted by modification date (newest first).",
|
|
180151
|
-
category:
|
|
181121
|
+
category: CATEGORY12,
|
|
180152
181122
|
inputSchema: listMilestonesParamsJsonSchema,
|
|
180153
181123
|
handler: createToolHandler(
|
|
180154
181124
|
"list_milestones",
|
|
@@ -180159,7 +181129,7 @@ var milestoneTools = [
|
|
|
180159
181129
|
{
|
|
180160
181130
|
name: "get_milestone",
|
|
180161
181131
|
description: "Retrieve full details for a Huly milestone. Use this to view milestone content and metadata.",
|
|
180162
|
-
category:
|
|
181132
|
+
category: CATEGORY12,
|
|
180163
181133
|
inputSchema: getMilestoneParamsJsonSchema,
|
|
180164
181134
|
handler: createToolHandler(
|
|
180165
181135
|
"get_milestone",
|
|
@@ -180170,7 +181140,7 @@ var milestoneTools = [
|
|
|
180170
181140
|
{
|
|
180171
181141
|
name: "create_milestone",
|
|
180172
181142
|
description: "Create a new milestone in a Huly project. Returns the created milestone ID and label.",
|
|
180173
|
-
category:
|
|
181143
|
+
category: CATEGORY12,
|
|
180174
181144
|
inputSchema: createMilestoneParamsJsonSchema,
|
|
180175
181145
|
handler: createToolHandler(
|
|
180176
181146
|
"create_milestone",
|
|
@@ -180181,7 +181151,7 @@ var milestoneTools = [
|
|
|
180181
181151
|
{
|
|
180182
181152
|
name: "update_milestone",
|
|
180183
181153
|
description: "Update fields on an existing Huly milestone. Only provided fields are modified.",
|
|
180184
|
-
category:
|
|
181154
|
+
category: CATEGORY12,
|
|
180185
181155
|
inputSchema: updateMilestoneParamsJsonSchema,
|
|
180186
181156
|
handler: createToolHandler(
|
|
180187
181157
|
"update_milestone",
|
|
@@ -180192,7 +181162,7 @@ var milestoneTools = [
|
|
|
180192
181162
|
{
|
|
180193
181163
|
name: "set_issue_milestone",
|
|
180194
181164
|
description: "Set or clear the milestone on a Huly issue. Pass null for milestone to clear it.",
|
|
180195
|
-
category:
|
|
181165
|
+
category: CATEGORY12,
|
|
180196
181166
|
inputSchema: setIssueMilestoneParamsJsonSchema,
|
|
180197
181167
|
handler: createToolHandler(
|
|
180198
181168
|
"set_issue_milestone",
|
|
@@ -180203,7 +181173,7 @@ var milestoneTools = [
|
|
|
180203
181173
|
{
|
|
180204
181174
|
name: "delete_milestone",
|
|
180205
181175
|
description: "Permanently delete a Huly milestone. This action cannot be undone.",
|
|
180206
|
-
category:
|
|
181176
|
+
category: CATEGORY12,
|
|
180207
181177
|
inputSchema: deleteMilestoneParamsJsonSchema,
|
|
180208
181178
|
handler: createToolHandler(
|
|
180209
181179
|
"delete_milestone",
|
|
@@ -180214,7 +181184,7 @@ var milestoneTools = [
|
|
|
180214
181184
|
];
|
|
180215
181185
|
|
|
180216
181186
|
// src/huly/operations/notifications.ts
|
|
180217
|
-
var
|
|
181187
|
+
var import_core33 = __toESM(require_lib4(), 1);
|
|
180218
181188
|
var toDocNotifyContextSummary = (ctx) => ({
|
|
180219
181189
|
id: NotificationContextId.make(ctx._id),
|
|
180220
181190
|
objectId: ctx.objectId,
|
|
@@ -180260,7 +181230,7 @@ var listNotifications = (params) => Effect_exports.gen(function* () {
|
|
|
180260
181230
|
{
|
|
180261
181231
|
limit,
|
|
180262
181232
|
sort: {
|
|
180263
|
-
modifiedOn:
|
|
181233
|
+
modifiedOn: import_core33.SortingOrder.Descending
|
|
180264
181234
|
}
|
|
180265
181235
|
}
|
|
180266
181236
|
);
|
|
@@ -180402,7 +181372,7 @@ var listNotificationContexts = (params) => Effect_exports.gen(function* () {
|
|
|
180402
181372
|
{
|
|
180403
181373
|
limit,
|
|
180404
181374
|
sort: {
|
|
180405
|
-
lastUpdateTimestamp:
|
|
181375
|
+
lastUpdateTimestamp: import_core33.SortingOrder.Descending
|
|
180406
181376
|
}
|
|
180407
181377
|
}
|
|
180408
181378
|
);
|
|
@@ -180471,12 +181441,12 @@ var getUnreadNotificationCount = () => Effect_exports.gen(function* () {
|
|
|
180471
181441
|
});
|
|
180472
181442
|
|
|
180473
181443
|
// src/mcp/tools/notifications.ts
|
|
180474
|
-
var
|
|
181444
|
+
var CATEGORY13 = "notifications";
|
|
180475
181445
|
var notificationTools = [
|
|
180476
181446
|
{
|
|
180477
181447
|
name: "list_notifications",
|
|
180478
181448
|
description: "List inbox notifications. Returns notifications sorted by modification date (newest first). Supports filtering by read/archived status.",
|
|
180479
|
-
category:
|
|
181449
|
+
category: CATEGORY13,
|
|
180480
181450
|
inputSchema: listNotificationsParamsJsonSchema,
|
|
180481
181451
|
handler: createToolHandler(
|
|
180482
181452
|
"list_notifications",
|
|
@@ -180487,7 +181457,7 @@ var notificationTools = [
|
|
|
180487
181457
|
{
|
|
180488
181458
|
name: "get_notification",
|
|
180489
181459
|
description: "Retrieve full details for a notification. Use this to view notification content and metadata.",
|
|
180490
|
-
category:
|
|
181460
|
+
category: CATEGORY13,
|
|
180491
181461
|
inputSchema: getNotificationParamsJsonSchema,
|
|
180492
181462
|
handler: createToolHandler(
|
|
180493
181463
|
"get_notification",
|
|
@@ -180498,7 +181468,7 @@ var notificationTools = [
|
|
|
180498
181468
|
{
|
|
180499
181469
|
name: "mark_notification_read",
|
|
180500
181470
|
description: "Mark a notification as read.",
|
|
180501
|
-
category:
|
|
181471
|
+
category: CATEGORY13,
|
|
180502
181472
|
inputSchema: markNotificationReadParamsJsonSchema,
|
|
180503
181473
|
handler: createToolHandler(
|
|
180504
181474
|
"mark_notification_read",
|
|
@@ -180509,7 +181479,7 @@ var notificationTools = [
|
|
|
180509
181479
|
{
|
|
180510
181480
|
name: "mark_all_notifications_read",
|
|
180511
181481
|
description: "Mark all unread notifications as read. Returns the count of notifications marked.",
|
|
180512
|
-
category:
|
|
181482
|
+
category: CATEGORY13,
|
|
180513
181483
|
inputSchema: emptyParamsJsonSchema,
|
|
180514
181484
|
handler: createToolHandler(
|
|
180515
181485
|
"mark_all_notifications_read",
|
|
@@ -180520,7 +181490,7 @@ var notificationTools = [
|
|
|
180520
181490
|
{
|
|
180521
181491
|
name: "archive_notification",
|
|
180522
181492
|
description: "Archive a notification. Archived notifications are hidden from the main inbox view.",
|
|
180523
|
-
category:
|
|
181493
|
+
category: CATEGORY13,
|
|
180524
181494
|
inputSchema: archiveNotificationParamsJsonSchema,
|
|
180525
181495
|
handler: createToolHandler(
|
|
180526
181496
|
"archive_notification",
|
|
@@ -180531,7 +181501,7 @@ var notificationTools = [
|
|
|
180531
181501
|
{
|
|
180532
181502
|
name: "archive_all_notifications",
|
|
180533
181503
|
description: "Archive all notifications. Returns the count of notifications archived.",
|
|
180534
|
-
category:
|
|
181504
|
+
category: CATEGORY13,
|
|
180535
181505
|
inputSchema: emptyParamsJsonSchema,
|
|
180536
181506
|
handler: createToolHandler(
|
|
180537
181507
|
"archive_all_notifications",
|
|
@@ -180542,7 +181512,7 @@ var notificationTools = [
|
|
|
180542
181512
|
{
|
|
180543
181513
|
name: "delete_notification",
|
|
180544
181514
|
description: "Permanently delete a notification. This action cannot be undone.",
|
|
180545
|
-
category:
|
|
181515
|
+
category: CATEGORY13,
|
|
180546
181516
|
inputSchema: deleteNotificationParamsJsonSchema,
|
|
180547
181517
|
handler: createToolHandler(
|
|
180548
181518
|
"delete_notification",
|
|
@@ -180553,7 +181523,7 @@ var notificationTools = [
|
|
|
180553
181523
|
{
|
|
180554
181524
|
name: "get_notification_context",
|
|
180555
181525
|
description: "Get notification context for an entity. Returns tracking information for a specific object.",
|
|
180556
|
-
category:
|
|
181526
|
+
category: CATEGORY13,
|
|
180557
181527
|
inputSchema: getNotificationContextParamsJsonSchema,
|
|
180558
181528
|
handler: createToolHandler(
|
|
180559
181529
|
"get_notification_context",
|
|
@@ -180564,7 +181534,7 @@ var notificationTools = [
|
|
|
180564
181534
|
{
|
|
180565
181535
|
name: "list_notification_contexts",
|
|
180566
181536
|
description: "List notification contexts. Returns contexts sorted by last update timestamp (newest first). Supports filtering by pinned status.",
|
|
180567
|
-
category:
|
|
181537
|
+
category: CATEGORY13,
|
|
180568
181538
|
inputSchema: listNotificationContextsParamsJsonSchema,
|
|
180569
181539
|
handler: createToolHandler(
|
|
180570
181540
|
"list_notification_contexts",
|
|
@@ -180575,7 +181545,7 @@ var notificationTools = [
|
|
|
180575
181545
|
{
|
|
180576
181546
|
name: "pin_notification_context",
|
|
180577
181547
|
description: "Pin or unpin a notification context. Pinned contexts are highlighted in the inbox.",
|
|
180578
|
-
category:
|
|
181548
|
+
category: CATEGORY13,
|
|
180579
181549
|
inputSchema: pinNotificationContextParamsJsonSchema,
|
|
180580
181550
|
handler: createToolHandler(
|
|
180581
181551
|
"pin_notification_context",
|
|
@@ -180586,7 +181556,7 @@ var notificationTools = [
|
|
|
180586
181556
|
{
|
|
180587
181557
|
name: "list_notification_settings",
|
|
180588
181558
|
description: "List notification provider settings. Returns current notification preferences.",
|
|
180589
|
-
category:
|
|
181559
|
+
category: CATEGORY13,
|
|
180590
181560
|
inputSchema: listNotificationSettingsParamsJsonSchema,
|
|
180591
181561
|
handler: createToolHandler(
|
|
180592
181562
|
"list_notification_settings",
|
|
@@ -180597,7 +181567,7 @@ var notificationTools = [
|
|
|
180597
181567
|
{
|
|
180598
181568
|
name: "update_notification_provider_setting",
|
|
180599
181569
|
description: "Update notification provider setting. Enable or disable notifications for a specific provider.",
|
|
180600
|
-
category:
|
|
181570
|
+
category: CATEGORY13,
|
|
180601
181571
|
inputSchema: updateNotificationProviderSettingParamsJsonSchema,
|
|
180602
181572
|
handler: createToolHandler(
|
|
180603
181573
|
"update_notification_provider_setting",
|
|
@@ -180608,7 +181578,7 @@ var notificationTools = [
|
|
|
180608
181578
|
{
|
|
180609
181579
|
name: "get_unread_notification_count",
|
|
180610
181580
|
description: "Get the count of unread notifications.",
|
|
180611
|
-
category:
|
|
181581
|
+
category: CATEGORY13,
|
|
180612
181582
|
inputSchema: emptyParamsJsonSchema,
|
|
180613
181583
|
handler: createToolHandler(
|
|
180614
181584
|
"get_unread_notification_count",
|
|
@@ -180619,7 +181589,7 @@ var notificationTools = [
|
|
|
180619
181589
|
];
|
|
180620
181590
|
|
|
180621
181591
|
// src/huly/operations/projects.ts
|
|
180622
|
-
var
|
|
181592
|
+
var import_core34 = __toESM(require_lib4(), 1);
|
|
180623
181593
|
var import_tracker4 = __toESM(require_lib21(), 1);
|
|
180624
181594
|
var listProjects = (params) => Effect_exports.gen(function* () {
|
|
180625
181595
|
const client = yield* HulyClient;
|
|
@@ -180634,7 +181604,7 @@ var listProjects = (params) => Effect_exports.gen(function* () {
|
|
|
180634
181604
|
{
|
|
180635
181605
|
limit,
|
|
180636
181606
|
sort: {
|
|
180637
|
-
name:
|
|
181607
|
+
name: import_core34.SortingOrder.Ascending
|
|
180638
181608
|
}
|
|
180639
181609
|
}
|
|
180640
181610
|
);
|
|
@@ -180652,12 +181622,12 @@ var listProjects = (params) => Effect_exports.gen(function* () {
|
|
|
180652
181622
|
});
|
|
180653
181623
|
|
|
180654
181624
|
// src/mcp/tools/projects.ts
|
|
180655
|
-
var
|
|
181625
|
+
var CATEGORY14 = "projects";
|
|
180656
181626
|
var projectTools = [
|
|
180657
181627
|
{
|
|
180658
181628
|
name: "list_projects",
|
|
180659
181629
|
description: "List all Huly projects. Returns projects sorted by name. Supports filtering by archived status.",
|
|
180660
|
-
category:
|
|
181630
|
+
category: CATEGORY14,
|
|
180661
181631
|
inputSchema: listProjectsParamsJsonSchema,
|
|
180662
181632
|
handler: createToolHandler(
|
|
180663
181633
|
"list_projects",
|
|
@@ -180668,7 +181638,7 @@ var projectTools = [
|
|
|
180668
181638
|
];
|
|
180669
181639
|
|
|
180670
181640
|
// src/huly/operations/search.ts
|
|
180671
|
-
var
|
|
181641
|
+
var import_core35 = __toESM(require_lib4(), 1);
|
|
180672
181642
|
var fulltextSearch = (params) => Effect_exports.gen(function* () {
|
|
180673
181643
|
const client = yield* HulyClient;
|
|
180674
181644
|
const limit = clampLimit(params.limit);
|
|
@@ -180678,7 +181648,7 @@ var fulltextSearch = (params) => Effect_exports.gen(function* () {
|
|
|
180678
181648
|
{
|
|
180679
181649
|
limit,
|
|
180680
181650
|
sort: {
|
|
180681
|
-
modifiedOn:
|
|
181651
|
+
modifiedOn: import_core35.SortingOrder.Descending
|
|
180682
181652
|
}
|
|
180683
181653
|
}
|
|
180684
181654
|
);
|
|
@@ -180697,12 +181667,12 @@ var fulltextSearch = (params) => Effect_exports.gen(function* () {
|
|
|
180697
181667
|
});
|
|
180698
181668
|
|
|
180699
181669
|
// src/mcp/tools/search.ts
|
|
180700
|
-
var
|
|
181670
|
+
var CATEGORY15 = "search";
|
|
180701
181671
|
var searchTools = [
|
|
180702
181672
|
{
|
|
180703
181673
|
name: "fulltext_search",
|
|
180704
181674
|
description: "Perform a global fulltext search across all Huly content. Searches issues, documents, messages, and other indexed content. Returns matching items sorted by relevance (newest first).",
|
|
180705
|
-
category:
|
|
181675
|
+
category: CATEGORY15,
|
|
180706
181676
|
inputSchema: fulltextSearchParamsJsonSchema,
|
|
180707
181677
|
handler: createToolHandler(
|
|
180708
181678
|
"fulltext_search",
|
|
@@ -180725,12 +181695,12 @@ var uploadFile = (params) => Effect_exports.gen(function* () {
|
|
|
180725
181695
|
});
|
|
180726
181696
|
|
|
180727
181697
|
// src/mcp/tools/storage.ts
|
|
180728
|
-
var
|
|
181698
|
+
var CATEGORY16 = "storage";
|
|
180729
181699
|
var storageTools = [
|
|
180730
181700
|
{
|
|
180731
181701
|
name: "upload_file",
|
|
180732
181702
|
description: "Upload a file to Huly storage. Provide ONE of: filePath (local file - preferred), fileUrl (fetch from URL), or data (base64 - for small files only). Returns blob ID and URL for referencing the file.",
|
|
180733
|
-
category:
|
|
181703
|
+
category: CATEGORY16,
|
|
180734
181704
|
inputSchema: uploadFileParamsJsonSchema,
|
|
180735
181705
|
handler: createStorageToolHandler(
|
|
180736
181706
|
"upload_file",
|
|
@@ -180742,7 +181712,7 @@ var storageTools = [
|
|
|
180742
181712
|
|
|
180743
181713
|
// src/huly/operations/time.ts
|
|
180744
181714
|
var import_calendar5 = __toESM(require_lib24(), 1);
|
|
180745
|
-
var
|
|
181715
|
+
var import_core36 = __toESM(require_lib4(), 1);
|
|
180746
181716
|
var import_tracker5 = __toESM(require_lib21(), 1);
|
|
180747
181717
|
var serverPopulatedCalendar = toRef("");
|
|
180748
181718
|
var serverPopulatedPersonId = "";
|
|
@@ -180752,7 +181722,7 @@ var logTime = (params) => Effect_exports.gen(function* () {
|
|
|
180752
181722
|
project: params.project,
|
|
180753
181723
|
identifier: params.identifier
|
|
180754
181724
|
});
|
|
180755
|
-
const reportId = (0,
|
|
181725
|
+
const reportId = (0, import_core36.generateId)();
|
|
180756
181726
|
const reportData = {
|
|
180757
181727
|
employee: null,
|
|
180758
181728
|
date: Date.now(),
|
|
@@ -180791,7 +181761,7 @@ var getTimeReport = (params) => Effect_exports.gen(function* () {
|
|
|
180791
181761
|
const reports = yield* client.findAll(
|
|
180792
181762
|
tracker.class.TimeSpendReport,
|
|
180793
181763
|
{ attachedTo: issue2._id },
|
|
180794
|
-
{ sort: { date:
|
|
181764
|
+
{ sort: { date: import_core36.SortingOrder.Descending } }
|
|
180795
181765
|
);
|
|
180796
181766
|
const employeeIds = [
|
|
180797
181767
|
...new Set(
|
|
@@ -180843,7 +181813,7 @@ var listTimeSpendReports = (params) => Effect_exports.gen(function* () {
|
|
|
180843
181813
|
tracker.class.TimeSpendReport,
|
|
180844
181814
|
query,
|
|
180845
181815
|
withLookup(
|
|
180846
|
-
{ limit, sort: { date:
|
|
181816
|
+
{ limit, sort: { date: import_core36.SortingOrder.Descending } },
|
|
180847
181817
|
{
|
|
180848
181818
|
attachedTo: tracker.class.Issue,
|
|
180849
181819
|
employee: contact.class.Person
|
|
@@ -180872,7 +181842,7 @@ var getDetailedTimeReport = (params) => Effect_exports.gen(function* () {
|
|
|
180872
181842
|
tracker.class.TimeSpendReport,
|
|
180873
181843
|
query,
|
|
180874
181844
|
withLookup(
|
|
180875
|
-
{ sort: { date:
|
|
181845
|
+
{ sort: { date: import_core36.SortingOrder.Descending } },
|
|
180876
181846
|
{
|
|
180877
181847
|
attachedTo: tracker.class.Issue,
|
|
180878
181848
|
employee: contact.class.Person
|
|
@@ -180948,7 +181918,7 @@ var listWorkSlots = (params) => Effect_exports.gen(function* () {
|
|
|
180948
181918
|
const slots = yield* client.findAll(
|
|
180949
181919
|
time.class.WorkSlot,
|
|
180950
181920
|
query,
|
|
180951
|
-
{ limit, sort: { date:
|
|
181921
|
+
{ limit, sort: { date: import_core36.SortingOrder.Descending } }
|
|
180952
181922
|
);
|
|
180953
181923
|
return slots.map((s) => ({
|
|
180954
181924
|
id: s._id,
|
|
@@ -180960,7 +181930,7 @@ var listWorkSlots = (params) => Effect_exports.gen(function* () {
|
|
|
180960
181930
|
});
|
|
180961
181931
|
var createWorkSlot = (params) => Effect_exports.gen(function* () {
|
|
180962
181932
|
const client = yield* HulyClient;
|
|
180963
|
-
const slotId = (0,
|
|
181933
|
+
const slotId = (0, import_core36.generateId)();
|
|
180964
181934
|
const slotData = {
|
|
180965
181935
|
date: params.date,
|
|
180966
181936
|
dueDate: params.dueDate,
|
|
@@ -181011,12 +181981,12 @@ var stopTimer = (params) => Effect_exports.gen(function* () {
|
|
|
181011
181981
|
});
|
|
181012
181982
|
|
|
181013
181983
|
// src/mcp/tools/time.ts
|
|
181014
|
-
var
|
|
181984
|
+
var CATEGORY17 = "time tracking";
|
|
181015
181985
|
var timeTools = [
|
|
181016
181986
|
{
|
|
181017
181987
|
name: "log_time",
|
|
181018
181988
|
description: "Log time spent on a Huly issue. Records a time entry with optional description. Time value is in minutes.",
|
|
181019
|
-
category:
|
|
181989
|
+
category: CATEGORY17,
|
|
181020
181990
|
inputSchema: logTimeParamsJsonSchema,
|
|
181021
181991
|
handler: createToolHandler(
|
|
181022
181992
|
"log_time",
|
|
@@ -181027,7 +181997,7 @@ var timeTools = [
|
|
|
181027
181997
|
{
|
|
181028
181998
|
name: "get_time_report",
|
|
181029
181999
|
description: "Get time tracking report for a specific Huly issue. Shows total time, estimation, remaining time, and all time entries.",
|
|
181030
|
-
category:
|
|
182000
|
+
category: CATEGORY17,
|
|
181031
182001
|
inputSchema: getTimeReportParamsJsonSchema,
|
|
181032
182002
|
handler: createToolHandler(
|
|
181033
182003
|
"get_time_report",
|
|
@@ -181038,7 +182008,7 @@ var timeTools = [
|
|
|
181038
182008
|
{
|
|
181039
182009
|
name: "list_time_spend_reports",
|
|
181040
182010
|
description: "List all time entries across issues. Supports filtering by project and date range. Returns entries sorted by date (newest first).",
|
|
181041
|
-
category:
|
|
182011
|
+
category: CATEGORY17,
|
|
181042
182012
|
inputSchema: listTimeSpendReportsParamsJsonSchema,
|
|
181043
182013
|
handler: createToolHandler(
|
|
181044
182014
|
"list_time_spend_reports",
|
|
@@ -181049,7 +182019,7 @@ var timeTools = [
|
|
|
181049
182019
|
{
|
|
181050
182020
|
name: "get_detailed_time_report",
|
|
181051
182021
|
description: "Get detailed time breakdown for a project. Shows total time grouped by issue and by employee. Supports date range filtering.",
|
|
181052
|
-
category:
|
|
182022
|
+
category: CATEGORY17,
|
|
181053
182023
|
inputSchema: getDetailedTimeReportParamsJsonSchema,
|
|
181054
182024
|
handler: createToolHandler(
|
|
181055
182025
|
"get_detailed_time_report",
|
|
@@ -181060,7 +182030,7 @@ var timeTools = [
|
|
|
181060
182030
|
{
|
|
181061
182031
|
name: "list_work_slots",
|
|
181062
182032
|
description: "List scheduled work slots. Shows planned time blocks attached to ToDos. Supports filtering by employee and date range.",
|
|
181063
|
-
category:
|
|
182033
|
+
category: CATEGORY17,
|
|
181064
182034
|
inputSchema: listWorkSlotsParamsJsonSchema,
|
|
181065
182035
|
handler: createToolHandler(
|
|
181066
182036
|
"list_work_slots",
|
|
@@ -181071,7 +182041,7 @@ var timeTools = [
|
|
|
181071
182041
|
{
|
|
181072
182042
|
name: "create_work_slot",
|
|
181073
182043
|
description: "Create a scheduled work slot. Attaches a time block to a ToDo for planning purposes.",
|
|
181074
|
-
category:
|
|
182044
|
+
category: CATEGORY17,
|
|
181075
182045
|
inputSchema: createWorkSlotParamsJsonSchema,
|
|
181076
182046
|
handler: createToolHandler(
|
|
181077
182047
|
"create_work_slot",
|
|
@@ -181082,7 +182052,7 @@ var timeTools = [
|
|
|
181082
182052
|
{
|
|
181083
182053
|
name: "start_timer",
|
|
181084
182054
|
description: "Start a client-side timer on a Huly issue. Validates the issue exists and returns a start timestamp. Use log_time to record the elapsed time when done.",
|
|
181085
|
-
category:
|
|
182055
|
+
category: CATEGORY17,
|
|
181086
182056
|
inputSchema: startTimerParamsJsonSchema,
|
|
181087
182057
|
handler: createToolHandler(
|
|
181088
182058
|
"start_timer",
|
|
@@ -181093,7 +182063,7 @@ var timeTools = [
|
|
|
181093
182063
|
{
|
|
181094
182064
|
name: "stop_timer",
|
|
181095
182065
|
description: "Stop a client-side timer on a Huly issue. Returns the stop timestamp. Calculate elapsed time from start/stop timestamps and use log_time to record it.",
|
|
181096
|
-
category:
|
|
182066
|
+
category: CATEGORY17,
|
|
181097
182067
|
inputSchema: stopTimerParamsJsonSchema,
|
|
181098
182068
|
handler: createToolHandler(
|
|
181099
182069
|
"stop_timer",
|
|
@@ -181104,15 +182074,15 @@ var timeTools = [
|
|
|
181104
182074
|
];
|
|
181105
182075
|
|
|
181106
182076
|
// src/huly/operations/workspace.ts
|
|
181107
|
-
var
|
|
182077
|
+
var import_core37 = __toESM(require_lib4(), 1);
|
|
181108
182078
|
var accountRoleMap = {
|
|
181109
|
-
READONLYGUEST:
|
|
181110
|
-
DocGuest:
|
|
181111
|
-
GUEST:
|
|
181112
|
-
USER:
|
|
181113
|
-
MAINTAINER:
|
|
181114
|
-
OWNER:
|
|
181115
|
-
ADMIN:
|
|
182079
|
+
READONLYGUEST: import_core37.AccountRole.ReadOnlyGuest,
|
|
182080
|
+
DocGuest: import_core37.AccountRole.DocGuest,
|
|
182081
|
+
GUEST: import_core37.AccountRole.Guest,
|
|
182082
|
+
USER: import_core37.AccountRole.User,
|
|
182083
|
+
MAINTAINER: import_core37.AccountRole.Maintainer,
|
|
182084
|
+
OWNER: import_core37.AccountRole.Owner,
|
|
182085
|
+
ADMIN: import_core37.AccountRole.Admin
|
|
181116
182086
|
};
|
|
181117
182087
|
var toHulyAccountRole = (role) => accountRoleMap[role];
|
|
181118
182088
|
var formatVersion = (info) => `${info.versionMajor}.${info.versionMinor}.${info.versionPatch}`;
|
|
@@ -181268,12 +182238,12 @@ var getRegions = () => Effect_exports.gen(function* () {
|
|
|
181268
182238
|
});
|
|
181269
182239
|
|
|
181270
182240
|
// src/mcp/tools/workspace.ts
|
|
181271
|
-
var
|
|
182241
|
+
var CATEGORY18 = "workspace";
|
|
181272
182242
|
var workspaceTools = [
|
|
181273
182243
|
{
|
|
181274
182244
|
name: "list_workspace_members",
|
|
181275
182245
|
description: "List members in the current Huly workspace with their roles. Returns members with account IDs and roles.",
|
|
181276
|
-
category:
|
|
182246
|
+
category: CATEGORY18,
|
|
181277
182247
|
inputSchema: listWorkspaceMembersParamsJsonSchema,
|
|
181278
182248
|
handler: createWorkspaceToolHandler(
|
|
181279
182249
|
"list_workspace_members",
|
|
@@ -181284,7 +182254,7 @@ var workspaceTools = [
|
|
|
181284
182254
|
{
|
|
181285
182255
|
name: "update_member_role",
|
|
181286
182256
|
description: "Update a workspace member's role. Requires appropriate permissions. Valid roles: READONLYGUEST, DocGuest, GUEST, USER, MAINTAINER, OWNER, ADMIN.",
|
|
181287
|
-
category:
|
|
182257
|
+
category: CATEGORY18,
|
|
181288
182258
|
inputSchema: updateMemberRoleParamsJsonSchema,
|
|
181289
182259
|
handler: createWorkspaceToolHandler(
|
|
181290
182260
|
"update_member_role",
|
|
@@ -181295,7 +182265,7 @@ var workspaceTools = [
|
|
|
181295
182265
|
{
|
|
181296
182266
|
name: "get_workspace_info",
|
|
181297
182267
|
description: "Get information about the current workspace including name, URL, region, and settings.",
|
|
181298
|
-
category:
|
|
182268
|
+
category: CATEGORY18,
|
|
181299
182269
|
inputSchema: emptyParamsJsonSchema,
|
|
181300
182270
|
handler: createNoParamsWorkspaceToolHandler(
|
|
181301
182271
|
getWorkspaceInfo
|
|
@@ -181304,7 +182274,7 @@ var workspaceTools = [
|
|
|
181304
182274
|
{
|
|
181305
182275
|
name: "list_workspaces",
|
|
181306
182276
|
description: "List all workspaces accessible to the current user. Returns workspace summaries sorted by last visit.",
|
|
181307
|
-
category:
|
|
182277
|
+
category: CATEGORY18,
|
|
181308
182278
|
inputSchema: listWorkspacesParamsJsonSchema,
|
|
181309
182279
|
handler: createWorkspaceToolHandler(
|
|
181310
182280
|
"list_workspaces",
|
|
@@ -181315,7 +182285,7 @@ var workspaceTools = [
|
|
|
181315
182285
|
{
|
|
181316
182286
|
name: "create_workspace",
|
|
181317
182287
|
description: "Create a new Huly workspace. Returns the workspace UUID and URL. Optionally specify a region.",
|
|
181318
|
-
category:
|
|
182288
|
+
category: CATEGORY18,
|
|
181319
182289
|
inputSchema: createWorkspaceParamsJsonSchema,
|
|
181320
182290
|
handler: createWorkspaceToolHandler(
|
|
181321
182291
|
"create_workspace",
|
|
@@ -181326,7 +182296,7 @@ var workspaceTools = [
|
|
|
181326
182296
|
{
|
|
181327
182297
|
name: "delete_workspace",
|
|
181328
182298
|
description: "Permanently delete the current workspace. This action cannot be undone. Use with extreme caution.",
|
|
181329
|
-
category:
|
|
182299
|
+
category: CATEGORY18,
|
|
181330
182300
|
inputSchema: emptyParamsJsonSchema,
|
|
181331
182301
|
handler: createNoParamsWorkspaceToolHandler(
|
|
181332
182302
|
deleteWorkspace
|
|
@@ -181335,7 +182305,7 @@ var workspaceTools = [
|
|
|
181335
182305
|
{
|
|
181336
182306
|
name: "get_user_profile",
|
|
181337
182307
|
description: "Get the current user's profile information including bio, location, and social links.",
|
|
181338
|
-
category:
|
|
182308
|
+
category: CATEGORY18,
|
|
181339
182309
|
inputSchema: emptyParamsJsonSchema,
|
|
181340
182310
|
handler: createNoParamsWorkspaceToolHandler(
|
|
181341
182311
|
getUserProfile
|
|
@@ -181344,7 +182314,7 @@ var workspaceTools = [
|
|
|
181344
182314
|
{
|
|
181345
182315
|
name: "update_user_profile",
|
|
181346
182316
|
description: "Update the current user's profile. Supports bio, city, country, website, social links, and public visibility.",
|
|
181347
|
-
category:
|
|
182317
|
+
category: CATEGORY18,
|
|
181348
182318
|
inputSchema: updateUserProfileParamsJsonSchema,
|
|
181349
182319
|
handler: createWorkspaceToolHandler(
|
|
181350
182320
|
"update_user_profile",
|
|
@@ -181355,7 +182325,7 @@ var workspaceTools = [
|
|
|
181355
182325
|
{
|
|
181356
182326
|
name: "update_guest_settings",
|
|
181357
182327
|
description: "Update workspace guest settings. Control read-only guest access and guest sign-up permissions.",
|
|
181358
|
-
category:
|
|
182328
|
+
category: CATEGORY18,
|
|
181359
182329
|
inputSchema: updateGuestSettingsParamsJsonSchema,
|
|
181360
182330
|
handler: createWorkspaceToolHandler(
|
|
181361
182331
|
"update_guest_settings",
|
|
@@ -181366,7 +182336,7 @@ var workspaceTools = [
|
|
|
181366
182336
|
{
|
|
181367
182337
|
name: "get_regions",
|
|
181368
182338
|
description: "Get available regions for workspace creation. Returns region codes and display names.",
|
|
181369
|
-
category:
|
|
182339
|
+
category: CATEGORY18,
|
|
181370
182340
|
inputSchema: getRegionsParamsJsonSchema,
|
|
181371
182341
|
handler: createWorkspaceToolHandler(
|
|
181372
182342
|
"get_regions",
|
|
@@ -181380,6 +182350,7 @@ var workspaceTools = [
|
|
|
181380
182350
|
var allTools = [
|
|
181381
182351
|
...projectTools,
|
|
181382
182352
|
...issueTools,
|
|
182353
|
+
...labelTools,
|
|
181383
182354
|
...commentTools,
|
|
181384
182355
|
...deletionTools,
|
|
181385
182356
|
...milestoneTools,
|
|
@@ -181388,6 +182359,7 @@ var allTools = [
|
|
|
181388
182359
|
...attachmentTools,
|
|
181389
182360
|
...contactTools,
|
|
181390
182361
|
...channelTools,
|
|
182362
|
+
...cardTools,
|
|
181391
182363
|
...calendarTools,
|
|
181392
182364
|
...timeTools,
|
|
181393
182365
|
...searchTools,
|