@firfi/huly-mcp 0.6.1 → 0.6.3
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/dist/index.cjs +283 -266
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -28687,7 +28687,7 @@ var require_classes = __commonJS({
|
|
|
28687
28687
|
DateRangeMode: () => DateRangeMode,
|
|
28688
28688
|
IndexKind: () => IndexKind,
|
|
28689
28689
|
IndexOrder: () => IndexOrder,
|
|
28690
|
-
SocialIdType: () =>
|
|
28690
|
+
SocialIdType: () => SocialIdType2,
|
|
28691
28691
|
WorkspaceAccountPermission: () => WorkspaceAccountPermission,
|
|
28692
28692
|
isActiveMode: () => isActiveMode,
|
|
28693
28693
|
isArchivingMode: () => isArchivingMode,
|
|
@@ -28801,17 +28801,17 @@ var require_classes = __commonJS({
|
|
|
28801
28801
|
return mode === "upgrading";
|
|
28802
28802
|
}
|
|
28803
28803
|
__name(isUpgradingMode, "isUpgradingMode");
|
|
28804
|
-
var
|
|
28805
|
-
|
|
28806
|
-
|
|
28807
|
-
|
|
28808
|
-
|
|
28809
|
-
|
|
28810
|
-
|
|
28811
|
-
|
|
28812
|
-
|
|
28813
|
-
return
|
|
28814
|
-
})(
|
|
28804
|
+
var SocialIdType2 = /* @__PURE__ */ ((SocialIdType22) => {
|
|
28805
|
+
SocialIdType22["EMAIL"] = "email";
|
|
28806
|
+
SocialIdType22["GITHUB"] = "github";
|
|
28807
|
+
SocialIdType22["GOOGLE"] = "google";
|
|
28808
|
+
SocialIdType22["PHONE"] = "phone";
|
|
28809
|
+
SocialIdType22["OIDC"] = "oidc";
|
|
28810
|
+
SocialIdType22["HULY"] = "huly";
|
|
28811
|
+
SocialIdType22["TELEGRAM"] = "telegram";
|
|
28812
|
+
SocialIdType22["HULY_ASSISTANT"] = "huly-assistant";
|
|
28813
|
+
return SocialIdType22;
|
|
28814
|
+
})(SocialIdType2 || {});
|
|
28815
28815
|
var WorkspaceAccountPermission = /* @__PURE__ */ ((WorkspaceAccountPermission2) => {
|
|
28816
28816
|
WorkspaceAccountPermission2["ImportDocument"] = "ImportDocument";
|
|
28817
28817
|
return WorkspaceAccountPermission2;
|
|
@@ -34588,7 +34588,7 @@ var require_client3 = __commonJS({
|
|
|
34588
34588
|
getClient: () => getClient
|
|
34589
34589
|
});
|
|
34590
34590
|
module2.exports = __toCommonJS2(client_exports);
|
|
34591
|
-
var
|
|
34591
|
+
var import_core47 = require_lib4();
|
|
34592
34592
|
var import_platform2 = __toESM2(require_lib());
|
|
34593
34593
|
var import_utils14 = require_utils3();
|
|
34594
34594
|
function getClient(accountsUrl, token, retryTimeoutMs) {
|
|
@@ -34624,7 +34624,7 @@ var require_client3 = __commonJS({
|
|
|
34624
34624
|
rpc;
|
|
34625
34625
|
async getProviders() {
|
|
34626
34626
|
return await withRetryUntilMaxAttempts(async () => {
|
|
34627
|
-
const response = await fetch((0,
|
|
34627
|
+
const response = await fetch((0, import_core47.concatLink)(this.url, "/providers"));
|
|
34628
34628
|
return await response.json();
|
|
34629
34629
|
})();
|
|
34630
34630
|
}
|
|
@@ -35279,7 +35279,7 @@ var require_client3 = __commonJS({
|
|
|
35279
35279
|
await this.rpc(request2);
|
|
35280
35280
|
}
|
|
35281
35281
|
async setCookie() {
|
|
35282
|
-
const url4 = (0,
|
|
35282
|
+
const url4 = (0, import_core47.concatLink)(this.url, "/cookie");
|
|
35283
35283
|
const response = await fetch(url4, { ...this.request, method: "PUT" });
|
|
35284
35284
|
if (!response.ok) {
|
|
35285
35285
|
const result = await response.json();
|
|
@@ -35289,7 +35289,7 @@ var require_client3 = __commonJS({
|
|
|
35289
35289
|
}
|
|
35290
35290
|
}
|
|
35291
35291
|
async deleteCookie() {
|
|
35292
|
-
const url4 = (0,
|
|
35292
|
+
const url4 = (0, import_core47.concatLink)(this.url, "/cookie");
|
|
35293
35293
|
const response = await fetch(url4, { ...this.request, method: "DELETE" });
|
|
35294
35294
|
if (!response.ok) {
|
|
35295
35295
|
const result = await response.json();
|
|
@@ -35568,9 +35568,9 @@ var require_config = __commonJS({
|
|
|
35568
35568
|
loadServerConfig: () => loadServerConfig4
|
|
35569
35569
|
});
|
|
35570
35570
|
module2.exports = __toCommonJS2(config_exports3);
|
|
35571
|
-
var
|
|
35571
|
+
var import_core47 = require_lib4();
|
|
35572
35572
|
async function loadServerConfig4(url4) {
|
|
35573
|
-
const configUrl = (0,
|
|
35573
|
+
const configUrl = (0, import_core47.concatLink)(url4, "/config.json");
|
|
35574
35574
|
const res = await fetch(configUrl, { keepalive: true });
|
|
35575
35575
|
if (res.ok) {
|
|
35576
35576
|
return await res.json();
|
|
@@ -35656,7 +35656,7 @@ var require_client4 = __commonJS({
|
|
|
35656
35656
|
getClient: () => getClient
|
|
35657
35657
|
});
|
|
35658
35658
|
module2.exports = __toCommonJS2(client_exports);
|
|
35659
|
-
var
|
|
35659
|
+
var import_core47 = require_lib4();
|
|
35660
35660
|
var import_utils14 = require_utils4();
|
|
35661
35661
|
function getClient(workspaceId, token, collaboratorUrl) {
|
|
35662
35662
|
const url4 = collaboratorUrl.replaceAll("wss://", "https://").replace("ws://", "http://");
|
|
@@ -35675,7 +35675,7 @@ var require_client4 = __commonJS({
|
|
|
35675
35675
|
async rpc(document2, method, payload) {
|
|
35676
35676
|
const workspace = this.workspace;
|
|
35677
35677
|
const documentId = (0, import_utils14.encodeDocumentId)(workspace, document2);
|
|
35678
|
-
const url4 = (0,
|
|
35678
|
+
const url4 = (0, import_core47.concatLink)(this.collaboratorUrl, `/rpc/${encodeURIComponent(documentId)}`);
|
|
35679
35679
|
const res = await fetch(url4, {
|
|
35680
35680
|
method: "POST",
|
|
35681
35681
|
headers: {
|
|
@@ -53242,9 +53242,9 @@ var require_image = __commonJS({
|
|
|
53242
53242
|
ImageNode: () => ImageNode
|
|
53243
53243
|
});
|
|
53244
53244
|
module2.exports = __toCommonJS2(image_exports);
|
|
53245
|
-
var
|
|
53245
|
+
var import_core47 = require_dist16();
|
|
53246
53246
|
var import_utils14 = require_utils5();
|
|
53247
|
-
var ImageNode =
|
|
53247
|
+
var ImageNode = import_core47.Node.create({
|
|
53248
53248
|
name: "image",
|
|
53249
53249
|
addOptions() {
|
|
53250
53250
|
return {
|
|
@@ -53303,7 +53303,7 @@ var require_image = __commonJS({
|
|
|
53303
53303
|
"data-type": this.name,
|
|
53304
53304
|
"data-align": node.attrs.align
|
|
53305
53305
|
};
|
|
53306
|
-
const imgAttributes = (0,
|
|
53306
|
+
const imgAttributes = (0, import_core47.mergeAttributes)(
|
|
53307
53307
|
{
|
|
53308
53308
|
"data-type": this.name
|
|
53309
53309
|
},
|
|
@@ -53347,9 +53347,9 @@ var require_reference = __commonJS({
|
|
|
53347
53347
|
ReferenceNode: () => ReferenceNode
|
|
53348
53348
|
});
|
|
53349
53349
|
module2.exports = __toCommonJS2(reference_exports);
|
|
53350
|
-
var
|
|
53350
|
+
var import_core47 = require_dist16();
|
|
53351
53351
|
var import_utils14 = require_utils5();
|
|
53352
|
-
var ReferenceNode =
|
|
53352
|
+
var ReferenceNode = import_core47.Node.create({
|
|
53353
53353
|
name: "reference",
|
|
53354
53354
|
group: "inline",
|
|
53355
53355
|
inline: true,
|
|
@@ -53384,7 +53384,7 @@ var require_reference = __commonJS({
|
|
|
53384
53384
|
renderHTML({ node, HTMLAttributes }) {
|
|
53385
53385
|
return [
|
|
53386
53386
|
"span",
|
|
53387
|
-
(0,
|
|
53387
|
+
(0, import_core47.mergeAttributes)(
|
|
53388
53388
|
{
|
|
53389
53389
|
"data-type": this.name,
|
|
53390
53390
|
"data-id": node.attrs.id,
|
|
@@ -53443,8 +53443,8 @@ var require_emoji = __commonJS({
|
|
|
53443
53443
|
EmojiNode: () => EmojiNode
|
|
53444
53444
|
});
|
|
53445
53445
|
module2.exports = __toCommonJS2(emoji_exports);
|
|
53446
|
-
var
|
|
53447
|
-
var EmojiNode =
|
|
53446
|
+
var import_core47 = require_dist16();
|
|
53447
|
+
var EmojiNode = import_core47.Node.create({
|
|
53448
53448
|
name: "emoji",
|
|
53449
53449
|
group: "inline",
|
|
53450
53450
|
inline: true,
|
|
@@ -53484,7 +53484,7 @@ var require_emoji = __commonJS({
|
|
|
53484
53484
|
addNodeView() {
|
|
53485
53485
|
return ({ node, HTMLAttributes }) => {
|
|
53486
53486
|
const container = document.createElement("span");
|
|
53487
|
-
const containerAttributes = (0,
|
|
53487
|
+
const containerAttributes = (0, import_core47.mergeAttributes)(
|
|
53488
53488
|
{
|
|
53489
53489
|
"data-type": this.name,
|
|
53490
53490
|
class: "emoji"
|
|
@@ -53517,7 +53517,7 @@ var require_emoji = __commonJS({
|
|
|
53517
53517
|
if (node.attrs.kind === "image") {
|
|
53518
53518
|
return [
|
|
53519
53519
|
"span",
|
|
53520
|
-
(0,
|
|
53520
|
+
(0, import_core47.mergeAttributes)(
|
|
53521
53521
|
{
|
|
53522
53522
|
"data-type": this.name,
|
|
53523
53523
|
class: "emoji"
|
|
@@ -53526,7 +53526,7 @@ var require_emoji = __commonJS({
|
|
|
53526
53526
|
),
|
|
53527
53527
|
[
|
|
53528
53528
|
"img",
|
|
53529
|
-
(0,
|
|
53529
|
+
(0, import_core47.mergeAttributes)({
|
|
53530
53530
|
"data-type": this.name,
|
|
53531
53531
|
src: node.attrs.image,
|
|
53532
53532
|
alt: node.attrs.emoji
|
|
@@ -53536,7 +53536,7 @@ var require_emoji = __commonJS({
|
|
|
53536
53536
|
}
|
|
53537
53537
|
return [
|
|
53538
53538
|
"span",
|
|
53539
|
-
(0,
|
|
53539
|
+
(0, import_core47.mergeAttributes)(
|
|
53540
53540
|
{
|
|
53541
53541
|
"data-type": this.name,
|
|
53542
53542
|
class: "emoji"
|
|
@@ -53844,8 +53844,8 @@ var require_file = __commonJS({
|
|
|
53844
53844
|
FileNode: () => FileNode
|
|
53845
53845
|
});
|
|
53846
53846
|
module2.exports = __toCommonJS2(file_exports);
|
|
53847
|
-
var
|
|
53848
|
-
var FileNode =
|
|
53847
|
+
var import_core47 = require_dist16();
|
|
53848
|
+
var FileNode = import_core47.Node.create({
|
|
53849
53849
|
name: "file",
|
|
53850
53850
|
addOptions() {
|
|
53851
53851
|
return {
|
|
@@ -54155,7 +54155,7 @@ var require_codeblock = __commonJS({
|
|
|
54155
54155
|
tildeInputRegex: () => tildeInputRegex
|
|
54156
54156
|
});
|
|
54157
54157
|
module2.exports = __toCommonJS2(codeblock_exports);
|
|
54158
|
-
var
|
|
54158
|
+
var import_core47 = require_dist16();
|
|
54159
54159
|
var import_extension_code_block = __toESM2(require_dist19());
|
|
54160
54160
|
var codeBlockOptions = {
|
|
54161
54161
|
defaultLanguage: "plaintext",
|
|
@@ -54201,11 +54201,11 @@ var require_codeblock = __commonJS({
|
|
|
54201
54201
|
},
|
|
54202
54202
|
addInputRules() {
|
|
54203
54203
|
return [
|
|
54204
|
-
(0,
|
|
54204
|
+
(0, import_core47.textblockTypeInputRule)({
|
|
54205
54205
|
find: backtickInputRegex,
|
|
54206
54206
|
type: this.type
|
|
54207
54207
|
}),
|
|
54208
|
-
(0,
|
|
54208
|
+
(0, import_core47.textblockTypeInputRule)({
|
|
54209
54209
|
find: tildeInputRegex,
|
|
54210
54210
|
type: this.type
|
|
54211
54211
|
})
|
|
@@ -54241,8 +54241,8 @@ var require_comment = __commonJS({
|
|
|
54241
54241
|
CommentNode: () => CommentNode
|
|
54242
54242
|
});
|
|
54243
54243
|
module2.exports = __toCommonJS2(comment_exports);
|
|
54244
|
-
var
|
|
54245
|
-
var CommentNode =
|
|
54244
|
+
var import_core47 = require_dist16();
|
|
54245
|
+
var CommentNode = import_core47.Node.create({
|
|
54246
54246
|
name: "comment",
|
|
54247
54247
|
group: "inline",
|
|
54248
54248
|
inline: true,
|
|
@@ -54288,8 +54288,8 @@ var require_markdown = __commonJS({
|
|
|
54288
54288
|
MarkdownNode: () => MarkdownNode
|
|
54289
54289
|
});
|
|
54290
54290
|
module2.exports = __toCommonJS2(markdown_exports);
|
|
54291
|
-
var
|
|
54292
|
-
var MarkdownNode =
|
|
54291
|
+
var import_core47 = require_dist16();
|
|
54292
|
+
var MarkdownNode = import_core47.Node.create({
|
|
54293
54293
|
name: "markdown",
|
|
54294
54294
|
group: "block",
|
|
54295
54295
|
content: "text*",
|
|
@@ -54307,7 +54307,7 @@ var require_markdown = __commonJS({
|
|
|
54307
54307
|
renderHTML({ node, HTMLAttributes }) {
|
|
54308
54308
|
return [
|
|
54309
54309
|
"pre",
|
|
54310
|
-
(0,
|
|
54310
|
+
(0, import_core47.mergeAttributes)({ "data-type": this.name }, this.options.HTMLAttributes, HTMLAttributes),
|
|
54311
54311
|
["code", {}, 0]
|
|
54312
54312
|
];
|
|
54313
54313
|
}
|
|
@@ -54341,8 +54341,8 @@ var require_embed = __commonJS({
|
|
|
54341
54341
|
EmbedNode: () => EmbedNode
|
|
54342
54342
|
});
|
|
54343
54343
|
module2.exports = __toCommonJS2(embed_exports);
|
|
54344
|
-
var
|
|
54345
|
-
var EmbedNode =
|
|
54344
|
+
var import_core47 = require_dist16();
|
|
54345
|
+
var EmbedNode = import_core47.Node.create({
|
|
54346
54346
|
name: "embed",
|
|
54347
54347
|
addOptions() {
|
|
54348
54348
|
return {};
|
|
@@ -54367,7 +54367,7 @@ var require_embed = __commonJS({
|
|
|
54367
54367
|
];
|
|
54368
54368
|
},
|
|
54369
54369
|
renderHTML({ HTMLAttributes }) {
|
|
54370
|
-
return ["figure", { "data-type": this.name }, ["iframe", (0,
|
|
54370
|
+
return ["figure", { "data-type": this.name }, ["iframe", (0, import_core47.mergeAttributes)(HTMLAttributes)]];
|
|
54371
54371
|
}
|
|
54372
54372
|
});
|
|
54373
54373
|
}
|
|
@@ -54441,7 +54441,7 @@ var require_noteBase = __commonJS({
|
|
|
54441
54441
|
name: () => name
|
|
54442
54442
|
});
|
|
54443
54443
|
module2.exports = __toCommonJS2(noteBase_exports);
|
|
54444
|
-
var
|
|
54444
|
+
var import_core47 = require_dist16();
|
|
54445
54445
|
var import_nodes = require_nodes();
|
|
54446
54446
|
var name = "note";
|
|
54447
54447
|
var NoteKind = /* @__PURE__ */ ((NoteKind2) => {
|
|
@@ -54456,7 +54456,7 @@ var require_noteBase = __commonJS({
|
|
|
54456
54456
|
NoteKind2["PrimaryLight"] = "primary-light";
|
|
54457
54457
|
return NoteKind2;
|
|
54458
54458
|
})(NoteKind || {});
|
|
54459
|
-
var NoteBaseExtension =
|
|
54459
|
+
var NoteBaseExtension = import_core47.Mark.create({
|
|
54460
54460
|
name,
|
|
54461
54461
|
parseHTML() {
|
|
54462
54462
|
return [
|
|
@@ -54513,9 +54513,9 @@ var require_qmsInlineCommentMark = __commonJS({
|
|
|
54513
54513
|
QMSInlineCommentMark: () => QMSInlineCommentMark
|
|
54514
54514
|
});
|
|
54515
54515
|
module2.exports = __toCommonJS2(qmsInlineCommentMark_exports);
|
|
54516
|
-
var
|
|
54516
|
+
var import_core47 = require_dist16();
|
|
54517
54517
|
var NAME2 = "node-uuid";
|
|
54518
|
-
var QMSInlineCommentMark =
|
|
54518
|
+
var QMSInlineCommentMark = import_core47.Mark.create({
|
|
54519
54519
|
name: NAME2,
|
|
54520
54520
|
inline: true,
|
|
54521
54521
|
parseHTML() {
|
|
@@ -54560,9 +54560,9 @@ var require_kit = __commonJS({
|
|
|
54560
54560
|
mergeKitOptions: () => mergeKitOptions
|
|
54561
54561
|
});
|
|
54562
54562
|
module2.exports = __toCommonJS2(kit_exports);
|
|
54563
|
-
var
|
|
54563
|
+
var import_core47 = require_dist16();
|
|
54564
54564
|
function extensionKit(name, fn2) {
|
|
54565
|
-
return
|
|
54565
|
+
return import_core47.Extension.create({
|
|
54566
54566
|
name,
|
|
54567
54567
|
addExtensions() {
|
|
54568
54568
|
const e = /* @__PURE__ */ __name((extension, options) => {
|
|
@@ -61591,9 +61591,9 @@ var require_colors = __commonJS({
|
|
|
61591
61591
|
TextColor: () => TextColor
|
|
61592
61592
|
});
|
|
61593
61593
|
module2.exports = __toCommonJS2(colors_exports);
|
|
61594
|
-
var
|
|
61594
|
+
var import_core47 = require_dist16();
|
|
61595
61595
|
var import_extension_text_style = require_dist20();
|
|
61596
|
-
var BackgroundColor =
|
|
61596
|
+
var BackgroundColor = import_core47.Extension.create({
|
|
61597
61597
|
name: "backgroundColor",
|
|
61598
61598
|
addOptions() {
|
|
61599
61599
|
return {
|
|
@@ -61634,7 +61634,7 @@ var require_colors = __commonJS({
|
|
|
61634
61634
|
};
|
|
61635
61635
|
}
|
|
61636
61636
|
});
|
|
61637
|
-
var TextColor =
|
|
61637
|
+
var TextColor = import_core47.Extension.create({
|
|
61638
61638
|
name: "textColor",
|
|
61639
61639
|
addOptions() {
|
|
61640
61640
|
return {
|
|
@@ -61706,10 +61706,10 @@ var require_inlineComment = __commonJS({
|
|
|
61706
61706
|
InlineCommentPasteFixPlugin: () => InlineCommentPasteFixPlugin
|
|
61707
61707
|
});
|
|
61708
61708
|
module2.exports = __toCommonJS2(inlineComment_exports);
|
|
61709
|
-
var
|
|
61709
|
+
var import_core47 = require_dist16();
|
|
61710
61710
|
var import_model = require_dist10();
|
|
61711
61711
|
var import_state = require_dist5();
|
|
61712
|
-
var InlineCommentMark =
|
|
61712
|
+
var InlineCommentMark = import_core47.Mark.create({
|
|
61713
61713
|
name: "inline-comment",
|
|
61714
61714
|
excludes: "",
|
|
61715
61715
|
inclusive: false,
|
|
@@ -77233,7 +77233,7 @@ var require_client5 = __commonJS({
|
|
|
77233
77233
|
createMarkupOperations: () => createMarkupOperations
|
|
77234
77234
|
});
|
|
77235
77235
|
module2.exports = __toCommonJS2(client_exports);
|
|
77236
|
-
var
|
|
77236
|
+
var import_core47 = require_lib4();
|
|
77237
77237
|
var import_collaborator_client2 = require_lib7();
|
|
77238
77238
|
var import_text4 = require_lib9();
|
|
77239
77239
|
var import_text_markdown3 = require_lib17();
|
|
@@ -77247,8 +77247,8 @@ var require_client5 = __commonJS({
|
|
|
77247
77247
|
this.workspace = workspace;
|
|
77248
77248
|
this.token = token;
|
|
77249
77249
|
this.config = config3;
|
|
77250
|
-
this.refUrl = (0,
|
|
77251
|
-
this.imageUrl = (0,
|
|
77250
|
+
this.refUrl = (0, import_core47.concatLink)(this.url, `/browse?workspace=${workspace}`);
|
|
77251
|
+
this.imageUrl = (0, import_core47.concatLink)(this.url, `/files?workspace=${workspace}&file=`);
|
|
77252
77252
|
this.collaborator = (0, import_collaborator_client2.getClient)(workspace, token, config3.COLLABORATOR_URL);
|
|
77253
77253
|
}
|
|
77254
77254
|
static {
|
|
@@ -77258,7 +77258,7 @@ var require_client5 = __commonJS({
|
|
|
77258
77258
|
imageUrl;
|
|
77259
77259
|
refUrl;
|
|
77260
77260
|
async fetchMarkup(objectClass, objectId, objectAttr, doc, format7) {
|
|
77261
|
-
const collabId = (0,
|
|
77261
|
+
const collabId = (0, import_core47.makeCollabId)(objectClass, objectId, objectAttr);
|
|
77262
77262
|
const markup = await this.collaborator.getMarkup(collabId, doc);
|
|
77263
77263
|
const json3 = (0, import_text4.markupToJSON)(markup);
|
|
77264
77264
|
switch (format7) {
|
|
@@ -77287,7 +77287,7 @@ var require_client5 = __commonJS({
|
|
|
77287
77287
|
default:
|
|
77288
77288
|
throw new Error("Unknown content format");
|
|
77289
77289
|
}
|
|
77290
|
-
const collabId = (0,
|
|
77290
|
+
const collabId = (0, import_core47.makeCollabId)(objectClass, objectId, objectAttr);
|
|
77291
77291
|
return await this.collaborator.createMarkup(collabId, markup);
|
|
77292
77292
|
}
|
|
77293
77293
|
};
|
|
@@ -81772,7 +81772,7 @@ var require_connection2 = __commonJS({
|
|
|
81772
81772
|
module2.exports = __toCommonJS2(connection_exports);
|
|
81773
81773
|
var import_analytics = require_lib2();
|
|
81774
81774
|
var import_client24 = __toESM2(require_lib6());
|
|
81775
|
-
var
|
|
81775
|
+
var import_core47 = __toESM2(require_lib4());
|
|
81776
81776
|
var import_platform2 = __toESM2(require_lib());
|
|
81777
81777
|
var import_rpc = require_lib18();
|
|
81778
81778
|
var import_snappyjs = require_snappyjs();
|
|
@@ -81816,7 +81816,7 @@ var require_connection2 = __commonJS({
|
|
|
81816
81816
|
const sKey = "session.id." + this.url;
|
|
81817
81817
|
let sessionId = sessionStorage.getItem(sKey) ?? void 0;
|
|
81818
81818
|
if (sessionId === void 0) {
|
|
81819
|
-
sessionId = (0,
|
|
81819
|
+
sessionId = (0, import_core47.generateId)();
|
|
81820
81820
|
console.log("Generate new SessionId", sessionId);
|
|
81821
81821
|
this.sessionId = sessionId;
|
|
81822
81822
|
} else {
|
|
@@ -81827,7 +81827,7 @@ var require_connection2 = __commonJS({
|
|
|
81827
81827
|
sessionStorage.setItem(sKey, sessionId);
|
|
81828
81828
|
});
|
|
81829
81829
|
} else {
|
|
81830
|
-
this.sessionId = (0,
|
|
81830
|
+
this.sessionId = (0, import_core47.generateId)();
|
|
81831
81831
|
}
|
|
81832
81832
|
this.rpcHandler = opt?.useGlobalRPCHandler === true ? globalRPCHandler : new import_rpc.RPCHandler();
|
|
81833
81833
|
this.pushHandler(handler);
|
|
@@ -82007,7 +82007,7 @@ var require_connection2 = __commonJS({
|
|
|
82007
82007
|
if (resp.id === -1) {
|
|
82008
82008
|
this.delay = 0;
|
|
82009
82009
|
if (resp.result?.state === "upgrading") {
|
|
82010
|
-
void this.onConnect?.(
|
|
82010
|
+
void this.onConnect?.(import_core47.ClientConnectEvent.Maintenance, void 0, resp.result.stats);
|
|
82011
82011
|
this.upgrading = true;
|
|
82012
82012
|
this.delay = 3;
|
|
82013
82013
|
return;
|
|
@@ -82042,7 +82042,7 @@ var require_connection2 = __commonJS({
|
|
|
82042
82042
|
v.reconnect?.();
|
|
82043
82043
|
}
|
|
82044
82044
|
void this.onConnect?.(
|
|
82045
|
-
helloResp.reconnect === true ?
|
|
82045
|
+
helloResp.reconnect === true ? import_core47.ClientConnectEvent.Reconnected : import_core47.ClientConnectEvent.Connected,
|
|
82046
82046
|
helloResp.lastTx,
|
|
82047
82047
|
this.sessionId
|
|
82048
82048
|
)?.catch((err) => {
|
|
@@ -82092,7 +82092,7 @@ var require_connection2 = __commonJS({
|
|
|
82092
82092
|
}
|
|
82093
82093
|
result = result.concat(c.data);
|
|
82094
82094
|
}
|
|
82095
|
-
resp.result = (0,
|
|
82095
|
+
resp.result = (0, import_core47.toFindResult)(result, total, lookupMap);
|
|
82096
82096
|
resp.chunk = void 0;
|
|
82097
82097
|
} else {
|
|
82098
82098
|
return;
|
|
@@ -82136,7 +82136,7 @@ var require_connection2 = __commonJS({
|
|
|
82136
82136
|
} else {
|
|
82137
82137
|
const txArr = Array.isArray(resp.result) ? resp.result : [resp.result];
|
|
82138
82138
|
for (const tx of txArr) {
|
|
82139
|
-
if (tx?._class ===
|
|
82139
|
+
if (tx?._class === import_core47.default.class.TxModelUpgrade) {
|
|
82140
82140
|
console.log("Processing upgrade", this.workspace, this.user);
|
|
82141
82141
|
this.opt?.onUpgrade?.();
|
|
82142
82142
|
return;
|
|
@@ -82366,7 +82366,7 @@ var require_connection2 = __commonJS({
|
|
|
82366
82366
|
}
|
|
82367
82367
|
getAccount() {
|
|
82368
82368
|
if (this.account !== void 0) {
|
|
82369
|
-
return Promise.resolve((0,
|
|
82369
|
+
return Promise.resolve((0, import_core47.clone)(this.account));
|
|
82370
82370
|
}
|
|
82371
82371
|
return this.sendRequest({ method: "getAccount", params: [] });
|
|
82372
82372
|
}
|
|
@@ -82424,10 +82424,10 @@ var require_connection2 = __commonJS({
|
|
|
82424
82424
|
method: "tx",
|
|
82425
82425
|
params: [tx],
|
|
82426
82426
|
retry: /* @__PURE__ */ __name(async () => {
|
|
82427
|
-
if (tx._class ===
|
|
82428
|
-
return (await this.findAll(
|
|
82427
|
+
if (tx._class === import_core47.default.class.TxApplyIf) {
|
|
82428
|
+
return (await this.findAll(import_core47.default.class.Tx, { _id: tx.txes[0]._id }, { limit: 1 })).length === 0;
|
|
82429
82429
|
}
|
|
82430
|
-
return (await this.findAll(
|
|
82430
|
+
return (await this.findAll(import_core47.default.class.Tx, { _id: tx._id }, { limit: 1 })).length === 0;
|
|
82431
82431
|
}, "retry")
|
|
82432
82432
|
});
|
|
82433
82433
|
}
|
|
@@ -82467,7 +82467,7 @@ var require_connection2 = __commonJS({
|
|
|
82467
82467
|
};
|
|
82468
82468
|
function connect(url4, handler, workspace, user, opt) {
|
|
82469
82469
|
return new Connection(
|
|
82470
|
-
opt?.ctx?.newChild?.("connection", {}) ?? new
|
|
82470
|
+
opt?.ctx?.newChild?.("connection", {}) ?? new import_core47.MeasureMetricsContext("connection", {}),
|
|
82471
82471
|
url4,
|
|
82472
82472
|
handler,
|
|
82473
82473
|
workspace,
|
|
@@ -82518,13 +82518,13 @@ var require_lib19 = __commonJS({
|
|
|
82518
82518
|
});
|
|
82519
82519
|
module2.exports = __toCommonJS2(index_exports2);
|
|
82520
82520
|
var import_client24 = __toESM2(require_lib6());
|
|
82521
|
-
var
|
|
82521
|
+
var import_core47 = __toESM2(require_lib4());
|
|
82522
82522
|
var import_platform2 = __toESM2(require_lib());
|
|
82523
82523
|
var import_connection = require_connection2();
|
|
82524
82524
|
var dbRequest;
|
|
82525
82525
|
var dbPromise = Promise.resolve(void 0);
|
|
82526
82526
|
if (typeof localStorage !== "undefined") {
|
|
82527
|
-
const st = (0,
|
|
82527
|
+
const st = (0, import_core47.platformNow)();
|
|
82528
82528
|
dbPromise = new Promise((resolve2) => {
|
|
82529
82529
|
dbRequest = indexedDB.open("model.db.persistence", 2);
|
|
82530
82530
|
dbRequest.onupgradeneeded = function() {
|
|
@@ -82535,7 +82535,7 @@ var require_lib19 = __commonJS({
|
|
|
82535
82535
|
};
|
|
82536
82536
|
dbRequest.onsuccess = function() {
|
|
82537
82537
|
const db = dbRequest.result;
|
|
82538
|
-
console.log("init DB complete", (0,
|
|
82538
|
+
console.log("init DB complete", (0, import_core47.platformNow)() - st);
|
|
82539
82539
|
resolve2(db);
|
|
82540
82540
|
};
|
|
82541
82541
|
});
|
|
@@ -82564,16 +82564,16 @@ var require_lib19 = __commonJS({
|
|
|
82564
82564
|
const filterModel = (0, import_platform2.getMetadata)(import_client24.default.metadata.FilterModel) ?? "none";
|
|
82565
82565
|
const extraFilter = (0, import_platform2.getMetadata)(import_client24.default.metadata.ExtraFilter) ?? [];
|
|
82566
82566
|
const handler = /* @__PURE__ */ __name(async (handler2) => {
|
|
82567
|
-
const url4 = (0,
|
|
82567
|
+
const url4 = (0, import_core47.concatLink)(endpoint, `/${token}`);
|
|
82568
82568
|
const upgradeHandler = /* @__PURE__ */ __name((...txes) => {
|
|
82569
82569
|
for (const tx of txes) {
|
|
82570
|
-
if (tx?._class ===
|
|
82570
|
+
if (tx?._class === import_core47.default.class.TxModelUpgrade) {
|
|
82571
82571
|
opt?.onUpgrade?.();
|
|
82572
82572
|
return;
|
|
82573
82573
|
}
|
|
82574
|
-
if (tx?._class ===
|
|
82574
|
+
if (tx?._class === import_core47.default.class.TxWorkspaceEvent) {
|
|
82575
82575
|
const event = tx;
|
|
82576
|
-
if (event.event ===
|
|
82576
|
+
if (event.event === import_core47.WorkspaceEvent.MaintenanceNotification) {
|
|
82577
82577
|
void (0, import_platform2.setPlatformStatus)(
|
|
82578
82578
|
new import_platform2.Status(import_platform2.Severity.WARNING, import_platform2.default.status.MaintenanceWarning, {
|
|
82579
82579
|
time: event.params.timeMinutes,
|
|
@@ -82611,7 +82611,7 @@ var require_lib19 = __commonJS({
|
|
|
82611
82611
|
reject(error2);
|
|
82612
82612
|
return;
|
|
82613
82613
|
}
|
|
82614
|
-
if (event !==
|
|
82614
|
+
if (event !== import_core47.ClientConnectEvent.Maintenance) {
|
|
82615
82615
|
clearTimeout(connectTO);
|
|
82616
82616
|
resolve2();
|
|
82617
82617
|
}
|
|
@@ -82633,7 +82633,7 @@ var require_lib19 = __commonJS({
|
|
|
82633
82633
|
}
|
|
82634
82634
|
return txes;
|
|
82635
82635
|
}, "modelFilter");
|
|
82636
|
-
const client = (0,
|
|
82636
|
+
const client = (0, import_core47.createClient)(handler, modelFilter, createModelPersistence(getWSFromToken(token)), opt?.ctx);
|
|
82637
82637
|
return await client;
|
|
82638
82638
|
}, "GetClient")
|
|
82639
82639
|
}
|
|
@@ -82641,17 +82641,17 @@ var require_lib19 = __commonJS({
|
|
|
82641
82641
|
}, "default");
|
|
82642
82642
|
function returnUITxes(txes, extraFilter) {
|
|
82643
82643
|
const configs = /* @__PURE__ */ new Map();
|
|
82644
|
-
(0,
|
|
82644
|
+
(0, import_core47.fillConfiguration)(txes, configs);
|
|
82645
82645
|
const allowedPlugins = [...(0, import_platform2.getPlugins)(), ...(0, import_platform2.getMetadata)(import_client24.default.metadata.ExtraPlugins) ?? []];
|
|
82646
82646
|
const excludedPlugins = Array.from(configs.values()).filter(
|
|
82647
82647
|
(it) => !it.enabled || !allowedPlugins.includes(it.pluginId) || extraFilter.includes(it.pluginId)
|
|
82648
82648
|
);
|
|
82649
|
-
return (0,
|
|
82649
|
+
return (0, import_core47.pluginFilterTx)(excludedPlugins, configs, txes);
|
|
82650
82650
|
}
|
|
82651
82651
|
__name(returnUITxes, "returnUITxes");
|
|
82652
82652
|
function returnClientTxes(txes) {
|
|
82653
82653
|
const configs = /* @__PURE__ */ new Map();
|
|
82654
|
-
(0,
|
|
82654
|
+
(0, import_core47.fillConfiguration)(txes, configs);
|
|
82655
82655
|
const excludedPlugins = Array.from(configs.values()).filter((it) => !it.enabled || it.pluginId.startsWith("server-"));
|
|
82656
82656
|
const toExclude = /* @__PURE__ */ new Set([
|
|
82657
82657
|
"workbench:class:Application",
|
|
@@ -82677,8 +82677,8 @@ var require_lib19 = __commonJS({
|
|
|
82677
82677
|
"setting:class:WorkspaceSettingCategory",
|
|
82678
82678
|
"notification:class:NotificationProvider"
|
|
82679
82679
|
]);
|
|
82680
|
-
const result = (0,
|
|
82681
|
-
if (tx?._class ===
|
|
82680
|
+
const result = (0, import_core47.pluginFilterTx)(excludedPlugins, configs, txes).filter((tx) => {
|
|
82681
|
+
if (tx?._class === import_core47.default.class.TxCreateDoc || tx?._class === import_core47.default.class.TxUpdateDoc || tx?._class === import_core47.default.class.TxRemoveDoc) {
|
|
82682
82682
|
const cud = tx;
|
|
82683
82683
|
if (toExclude.has(cud.objectClass)) {
|
|
82684
82684
|
return false;
|
|
@@ -82788,7 +82788,7 @@ var require_client6 = __commonJS({
|
|
|
82788
82788
|
module2.exports = __toCommonJS2(client_exports);
|
|
82789
82789
|
var import_account_client2 = require_lib5();
|
|
82790
82790
|
var import_client24 = __toESM2(require_lib6());
|
|
82791
|
-
var
|
|
82791
|
+
var import_core47 = require_lib4();
|
|
82792
82792
|
var import_platform2 = require_lib();
|
|
82793
82793
|
var import_config8 = require_config();
|
|
82794
82794
|
var import_markup8 = require_markup();
|
|
@@ -82805,7 +82805,7 @@ var require_client6 = __commonJS({
|
|
|
82805
82805
|
const account = {
|
|
82806
82806
|
uuid: wsLoginInfo.account,
|
|
82807
82807
|
role: wsLoginInfo.role,
|
|
82808
|
-
primarySocialId: (0,
|
|
82808
|
+
primarySocialId: (0, import_core47.pickPrimarySocialId)(socialIds)._id,
|
|
82809
82809
|
socialIds: socialIds.map((si) => si._id),
|
|
82810
82810
|
fullSocialIds: socialIds
|
|
82811
82811
|
};
|
|
@@ -82831,7 +82831,7 @@ var require_client6 = __commonJS({
|
|
|
82831
82831
|
this.config = config3;
|
|
82832
82832
|
this.connection = connection;
|
|
82833
82833
|
this.account = account;
|
|
82834
|
-
this.client = new
|
|
82834
|
+
this.client = new import_core47.TxOperations(connection, account.primarySocialId);
|
|
82835
82835
|
this.markup = (0, import_markup8.createMarkupOperations)(url4, workspace, token, config3);
|
|
82836
82836
|
}
|
|
82837
82837
|
static {
|
|
@@ -82871,7 +82871,7 @@ var require_client6 = __commonJS({
|
|
|
82871
82871
|
}
|
|
82872
82872
|
// DocOperations
|
|
82873
82873
|
async createDoc(_class, space, attributes, id) {
|
|
82874
|
-
id ??= (0,
|
|
82874
|
+
id ??= (0, import_core47.generateId)();
|
|
82875
82875
|
const data = await this.processMarkup(_class, id, attributes);
|
|
82876
82876
|
return await this.client.createDoc(_class, space, data, id);
|
|
82877
82877
|
}
|
|
@@ -82884,7 +82884,7 @@ var require_client6 = __commonJS({
|
|
|
82884
82884
|
}
|
|
82885
82885
|
// CollectionOperations
|
|
82886
82886
|
async addCollection(_class, space, attachedTo, attachedToClass, collection, attributes, id) {
|
|
82887
|
-
id ??= (0,
|
|
82887
|
+
id ??= (0, import_core47.generateId)();
|
|
82888
82888
|
const data = await this.processMarkup(_class, id, attributes);
|
|
82889
82889
|
return await this.client.addCollection(_class, space, attachedTo, attachedToClass, collection, data, id);
|
|
82890
82890
|
}
|
|
@@ -83211,7 +83211,7 @@ var require_rest = __commonJS({
|
|
|
83211
83211
|
createRestClient: () => createRestClient2
|
|
83212
83212
|
});
|
|
83213
83213
|
module2.exports = __toCommonJS2(rest_exports);
|
|
83214
|
-
var
|
|
83214
|
+
var import_core47 = require_lib4();
|
|
83215
83215
|
var import_platform2 = require_lib();
|
|
83216
83216
|
var import_utils14 = require_utils9();
|
|
83217
83217
|
var import_utils22 = require_utils10();
|
|
@@ -83266,7 +83266,7 @@ var require_rest = __commonJS({
|
|
|
83266
83266
|
if (options !== void 0 && Object.keys(options).length > 0) {
|
|
83267
83267
|
params.append("options", JSON.stringify(options));
|
|
83268
83268
|
}
|
|
83269
|
-
const requestUrl = (0,
|
|
83269
|
+
const requestUrl = (0, import_core47.concatLink)(this.endpoint, `/api/v1/find-all/${this.workspace}?${params.toString()}`);
|
|
83270
83270
|
const result = await (0, import_utils22.withRetry)(async () => {
|
|
83271
83271
|
const response = await fetch(requestUrl, this.requestInit());
|
|
83272
83272
|
if (!response.ok) {
|
|
@@ -83340,7 +83340,7 @@ var require_rest = __commonJS({
|
|
|
83340
83340
|
}
|
|
83341
83341
|
}
|
|
83342
83342
|
async getAccount() {
|
|
83343
|
-
const requestUrl = (0,
|
|
83343
|
+
const requestUrl = (0, import_core47.concatLink)(this.endpoint, `/api/v1/account/${this.workspace}`);
|
|
83344
83344
|
await this.checkRate();
|
|
83345
83345
|
const result = await (0, import_utils22.withRetry)(async () => {
|
|
83346
83346
|
const response = await fetch(requestUrl, this.requestInit());
|
|
@@ -83357,7 +83357,7 @@ var require_rest = __commonJS({
|
|
|
83357
83357
|
return result;
|
|
83358
83358
|
}
|
|
83359
83359
|
async getModel(full = false) {
|
|
83360
|
-
const requestUrl = new URL((0,
|
|
83360
|
+
const requestUrl = new URL((0, import_core47.concatLink)(this.endpoint, `/api/v1/load-model/${this.workspace}`));
|
|
83361
83361
|
if (full) {
|
|
83362
83362
|
requestUrl.searchParams.append("full", "true");
|
|
83363
83363
|
}
|
|
@@ -83370,10 +83370,10 @@ var require_rest = __commonJS({
|
|
|
83370
83370
|
}
|
|
83371
83371
|
this.updateRateLimit(response);
|
|
83372
83372
|
const modelResponse = await (0, import_utils22.extractJson)(response);
|
|
83373
|
-
const hierarchy = new
|
|
83374
|
-
const model = new
|
|
83375
|
-
const ctx = new
|
|
83376
|
-
(0,
|
|
83373
|
+
const hierarchy = new import_core47.Hierarchy();
|
|
83374
|
+
const model = new import_core47.ModelDb(hierarchy);
|
|
83375
|
+
const ctx = new import_core47.MeasureMetricsContext("loadModel", {});
|
|
83376
|
+
(0, import_core47.buildModel)(ctx, modelResponse, void 0, hierarchy, model);
|
|
83377
83377
|
return { hierarchy, model };
|
|
83378
83378
|
}, isRLE);
|
|
83379
83379
|
if (result.error !== void 0) {
|
|
@@ -83385,7 +83385,7 @@ var require_rest = __commonJS({
|
|
|
83385
83385
|
return (await this.findAll(_class, query, { ...options, limit: 1 })).shift();
|
|
83386
83386
|
}
|
|
83387
83387
|
async tx(tx) {
|
|
83388
|
-
const requestUrl = (0,
|
|
83388
|
+
const requestUrl = (0, import_core47.concatLink)(this.endpoint, `/api/v1/tx/${this.workspace}`);
|
|
83389
83389
|
await this.checkRate();
|
|
83390
83390
|
const result = await (0, import_utils22.withRetry)(async () => {
|
|
83391
83391
|
const response = await fetch(requestUrl, {
|
|
@@ -83419,7 +83419,7 @@ var require_rest = __commonJS({
|
|
|
83419
83419
|
if (options.limit != null) {
|
|
83420
83420
|
params.append("limit", `${options.limit}`);
|
|
83421
83421
|
}
|
|
83422
|
-
const requestUrl = (0,
|
|
83422
|
+
const requestUrl = (0, import_core47.concatLink)(this.endpoint, `/api/v1/search-fulltext/${this.workspace}?${params.toString()}`);
|
|
83423
83423
|
const response = await fetch(requestUrl, {
|
|
83424
83424
|
method: "GET",
|
|
83425
83425
|
headers: this.jsonHeaders(),
|
|
@@ -83438,7 +83438,7 @@ var require_rest = __commonJS({
|
|
|
83438
83438
|
return result;
|
|
83439
83439
|
}
|
|
83440
83440
|
async domainRequest(domain3, params, options) {
|
|
83441
|
-
const requestUrl = (0,
|
|
83441
|
+
const requestUrl = (0, import_core47.concatLink)(this.endpoint, `/api/v1/request/${domain3}/${this.workspace}`);
|
|
83442
83442
|
await this.checkRate();
|
|
83443
83443
|
return await (0, import_utils22.withRetry)(async () => {
|
|
83444
83444
|
const response = await fetch(requestUrl, {
|
|
@@ -83457,7 +83457,7 @@ var require_rest = __commonJS({
|
|
|
83457
83457
|
}, isRLE);
|
|
83458
83458
|
}
|
|
83459
83459
|
async ensurePerson(socialType, socialValue, firstName, lastName) {
|
|
83460
|
-
const requestUrl = (0,
|
|
83460
|
+
const requestUrl = (0, import_core47.concatLink)(this.endpoint, `/api/v1/ensure-person/${this.workspace}`);
|
|
83461
83461
|
await this.checkRate();
|
|
83462
83462
|
const result = await (0, import_utils22.withRetry)(async () => {
|
|
83463
83463
|
const response = await fetch(requestUrl, {
|
|
@@ -83514,13 +83514,13 @@ var require_tx2 = __commonJS({
|
|
|
83514
83514
|
createRestTxOperations: () => createRestTxOperations2
|
|
83515
83515
|
});
|
|
83516
83516
|
module2.exports = __toCommonJS2(tx_exports);
|
|
83517
|
-
var
|
|
83517
|
+
var import_core47 = require_lib4();
|
|
83518
83518
|
var import_rest = require_rest();
|
|
83519
83519
|
async function createRestTxOperations2(endpoint, workspaceId, token, fullModel = false) {
|
|
83520
83520
|
const restClient = new import_rest.RestClientImpl(endpoint, workspaceId, token);
|
|
83521
83521
|
const account = await restClient.getAccount();
|
|
83522
83522
|
const { hierarchy, model } = await restClient.getModel(fullModel);
|
|
83523
|
-
return new
|
|
83523
|
+
return new import_core47.TxOperations(new RestTxClient(restClient, hierarchy, model, account), account.socialIds[0]);
|
|
83524
83524
|
}
|
|
83525
83525
|
__name(createRestTxOperations2, "createRestTxOperations");
|
|
83526
83526
|
var RestTxClient = class {
|
|
@@ -83541,7 +83541,7 @@ var require_tx2 = __commonJS({
|
|
|
83541
83541
|
const result = data.map((v) => {
|
|
83542
83542
|
return this.hierarchy.updateLookupMixin(_class, v, options);
|
|
83543
83543
|
});
|
|
83544
|
-
return (0,
|
|
83544
|
+
return (0, import_core47.toFindResult)(result, data.total);
|
|
83545
83545
|
}
|
|
83546
83546
|
async domainRequest(domain3, params, options) {
|
|
83547
83547
|
return await this.client.domainRequest(domain3, params, options);
|
|
@@ -83723,7 +83723,7 @@ var require_client7 = __commonJS({
|
|
|
83723
83723
|
createStorageClient: () => createStorageClient2
|
|
83724
83724
|
});
|
|
83725
83725
|
module2.exports = __toCommonJS2(client_exports);
|
|
83726
|
-
var
|
|
83726
|
+
var import_core47 = __toESM2(require_lib4());
|
|
83727
83727
|
var import_stream2 = require("stream");
|
|
83728
83728
|
var import_config8 = require_config();
|
|
83729
83729
|
var import_error = require_error3();
|
|
@@ -83760,13 +83760,13 @@ var require_client7 = __commonJS({
|
|
|
83760
83760
|
const size13 = parseInt(headers.get("Content-Length") ?? "0", 10);
|
|
83761
83761
|
return {
|
|
83762
83762
|
provider: "",
|
|
83763
|
-
_class:
|
|
83763
|
+
_class: import_core47.default.class.Blob,
|
|
83764
83764
|
_id: objectName,
|
|
83765
83765
|
contentType: headers.get("Content-Type") ?? "",
|
|
83766
83766
|
size: isNaN(size13) ? 0 : size13 ?? 0,
|
|
83767
83767
|
etag: headers.get("ETag") ?? "",
|
|
83768
|
-
space:
|
|
83769
|
-
modifiedBy:
|
|
83768
|
+
space: import_core47.default.space.Configuration,
|
|
83769
|
+
modifiedBy: import_core47.default.account.System,
|
|
83770
83770
|
modifiedOn: isNaN(lastModified) ? 0 : lastModified,
|
|
83771
83771
|
version: null
|
|
83772
83772
|
};
|
|
@@ -83801,11 +83801,11 @@ var require_client7 = __commonJS({
|
|
|
83801
83801
|
if (Object.hasOwn(result[0], "id")) {
|
|
83802
83802
|
const fileResult = result[0];
|
|
83803
83803
|
return {
|
|
83804
|
-
_class:
|
|
83804
|
+
_class: import_core47.default.class.Blob,
|
|
83805
83805
|
_id: fileResult.id,
|
|
83806
|
-
space:
|
|
83806
|
+
space: import_core47.default.space.Configuration,
|
|
83807
83807
|
modifiedOn: fileResult.metadata.lastModified,
|
|
83808
|
-
modifiedBy:
|
|
83808
|
+
modifiedBy: import_core47.default.account.System,
|
|
83809
83809
|
provider: "",
|
|
83810
83810
|
contentType: fileResult.metadata.contentType,
|
|
83811
83811
|
etag: fileResult.metadata.etag,
|
|
@@ -83879,11 +83879,11 @@ var require_client7 = __commonJS({
|
|
|
83879
83879
|
async function connectStorage(url4, options, config3) {
|
|
83880
83880
|
config3 ??= await (0, import_config8.loadServerConfig)(url4);
|
|
83881
83881
|
const token = await (0, import_utils14.getWorkspaceToken)(url4, options, config3);
|
|
83882
|
-
const filesUrl = (config3.FILES_URL.startsWith("/") ? (0,
|
|
83882
|
+
const filesUrl = (config3.FILES_URL.startsWith("/") ? (0, import_core47.concatLink)(url4, config3.FILES_URL) : config3.FILES_URL).replace(
|
|
83883
83883
|
":workspace",
|
|
83884
83884
|
token.workspaceId
|
|
83885
83885
|
);
|
|
83886
|
-
const uploadUrl = (config3.UPLOAD_URL.startsWith("/") ? (0,
|
|
83886
|
+
const uploadUrl = (config3.UPLOAD_URL.startsWith("/") ? (0, import_core47.concatLink)(url4, config3.UPLOAD_URL) : config3.UPLOAD_URL).replace(":workspace", token.workspaceId);
|
|
83887
83887
|
return new StorageClientImpl(filesUrl, uploadUrl, token.token, token.workspaceId);
|
|
83888
83888
|
}
|
|
83889
83889
|
__name(connectStorage, "connectStorage");
|
|
@@ -84596,7 +84596,7 @@ var require_utils11 = __commonJS({
|
|
|
84596
84596
|
getWeekday: () => getWeekday
|
|
84597
84597
|
});
|
|
84598
84598
|
module2.exports = __toCommonJS2(utils_exports);
|
|
84599
|
-
var
|
|
84599
|
+
var import_core47 = require_lib4();
|
|
84600
84600
|
var import__ = __toESM2(require_lib24());
|
|
84601
84601
|
function getInstance(event, date7) {
|
|
84602
84602
|
const diff8 = event.dueDate - event.date;
|
|
@@ -84608,7 +84608,7 @@ var require_utils11 = __commonJS({
|
|
|
84608
84608
|
originalStartTime: date7,
|
|
84609
84609
|
_class: import__.default.class.ReccuringInstance,
|
|
84610
84610
|
eventId: generateEventId3(),
|
|
84611
|
-
_id: (0,
|
|
84611
|
+
_id: (0, import_core47.generateId)(),
|
|
84612
84612
|
virtual: true
|
|
84613
84613
|
};
|
|
84614
84614
|
}
|
|
@@ -84921,7 +84921,7 @@ var require_utils11 = __commonJS({
|
|
|
84921
84921
|
}
|
|
84922
84922
|
__name(getAllEvents, "getAllEvents");
|
|
84923
84923
|
function generateEventId3() {
|
|
84924
|
-
const id = (0,
|
|
84924
|
+
const id = (0, import_core47.generateId)();
|
|
84925
84925
|
return encodeToBase32Hex(id);
|
|
84926
84926
|
}
|
|
84927
84927
|
__name(generateEventId3, "generateEventId");
|
|
@@ -85335,7 +85335,7 @@ var require_utils12 = __commonJS({
|
|
|
85335
85335
|
});
|
|
85336
85336
|
module2.exports = __toCommonJS2(utils_exports);
|
|
85337
85337
|
var import_fast_equals = require_cjs();
|
|
85338
|
-
var
|
|
85338
|
+
var import_core47 = __toESM2(require_lib4());
|
|
85339
85339
|
var import__ = __toESM2(require_lib26());
|
|
85340
85340
|
async function getDirectChannel(client, me, employeeAccount) {
|
|
85341
85341
|
const accIds = [me, employeeAccount].sort();
|
|
@@ -85345,7 +85345,7 @@ var require_utils12 = __commonJS({
|
|
|
85345
85345
|
return dm._id;
|
|
85346
85346
|
}
|
|
85347
85347
|
}
|
|
85348
|
-
return await client.createDoc(import__.default.class.DirectMessage,
|
|
85348
|
+
return await client.createDoc(import__.default.class.DirectMessage, import_core47.default.space.Space, {
|
|
85349
85349
|
name: "",
|
|
85350
85350
|
description: "",
|
|
85351
85351
|
private: true,
|
|
@@ -85649,18 +85649,18 @@ var require_cache4 = __commonJS({
|
|
|
85649
85649
|
default: () => ContactCache
|
|
85650
85650
|
});
|
|
85651
85651
|
module2.exports = __toCommonJS2(cache_exports);
|
|
85652
|
-
var
|
|
85652
|
+
var import_core47 = __toESM2(require_lib4());
|
|
85653
85653
|
var import__ = __toESM2(require_lib27());
|
|
85654
85654
|
function isCreateTx(tx) {
|
|
85655
|
-
return tx._class ===
|
|
85655
|
+
return tx._class === import_core47.default.class.TxCreateDoc;
|
|
85656
85656
|
}
|
|
85657
85657
|
__name(isCreateTx, "isCreateTx");
|
|
85658
85658
|
function isUpdateTx(tx) {
|
|
85659
|
-
return tx._class ===
|
|
85659
|
+
return tx._class === import_core47.default.class.TxUpdateDoc;
|
|
85660
85660
|
}
|
|
85661
85661
|
__name(isUpdateTx, "isUpdateTx");
|
|
85662
85662
|
function isMixinTx(tx) {
|
|
85663
|
-
return tx._class ===
|
|
85663
|
+
return tx._class === import_core47.default.class.TxMixin;
|
|
85664
85664
|
}
|
|
85665
85665
|
__name(isMixinTx, "isMixinTx");
|
|
85666
85666
|
function isPersonTx(tx) {
|
|
@@ -85767,7 +85767,7 @@ var require_cache4 = __commonJS({
|
|
|
85767
85767
|
const ref = tx.objectId;
|
|
85768
85768
|
const person = this._personByRef.get(ref);
|
|
85769
85769
|
if (person === void 0) return;
|
|
85770
|
-
const createdPerson =
|
|
85770
|
+
const createdPerson = import_core47.TxProcessor.createDoc2Doc(tx);
|
|
85771
85771
|
this._personByRef.set(ref, createdPerson);
|
|
85772
85772
|
const personIds = Array.from(this._personIdsByPersonRef.get(ref) ?? []);
|
|
85773
85773
|
for (const personId of personIds) {
|
|
@@ -85785,7 +85785,7 @@ var require_cache4 = __commonJS({
|
|
|
85785
85785
|
const newPersonRef = tx.attachedTo;
|
|
85786
85786
|
this._personRefByPersonId.set(personId, newPersonRef);
|
|
85787
85787
|
this.addPersonIdToPersonRef(newPersonRef, personId);
|
|
85788
|
-
const createdSocialId =
|
|
85788
|
+
const createdSocialId = import_core47.TxProcessor.createDoc2Doc(tx);
|
|
85789
85789
|
this._socialIdByPersonId.set(personId, createdSocialId);
|
|
85790
85790
|
this.broadcastChange({
|
|
85791
85791
|
personRef: newPersonRef,
|
|
@@ -85796,7 +85796,7 @@ var require_cache4 = __commonJS({
|
|
|
85796
85796
|
const ref = tx.objectId;
|
|
85797
85797
|
const person = this._personByRef.get(ref);
|
|
85798
85798
|
if (person == null) return;
|
|
85799
|
-
const updatedPerson = isUpdateTx(tx) ?
|
|
85799
|
+
const updatedPerson = isUpdateTx(tx) ? import_core47.TxProcessor.updateDoc2Doc(person, tx) : import_core47.TxProcessor.updateMixin4Doc(person, tx);
|
|
85800
85800
|
this._personByRef.set(ref, updatedPerson);
|
|
85801
85801
|
const personIds = Array.from(this._personIdsByPersonRef.get(ref) ?? []);
|
|
85802
85802
|
for (const personId of personIds) {
|
|
@@ -85911,7 +85911,7 @@ var require_utils13 = __commonJS({
|
|
|
85911
85911
|
setCurrentEmployeeSpace: () => setCurrentEmployeeSpace
|
|
85912
85912
|
});
|
|
85913
85913
|
module2.exports = __toCommonJS2(utils_exports);
|
|
85914
|
-
var
|
|
85914
|
+
var import_core47 = require_lib4();
|
|
85915
85915
|
var import_platform2 = require_lib();
|
|
85916
85916
|
var import__ = __toESM2(require_lib27());
|
|
85917
85917
|
var import_types12 = require_types9();
|
|
@@ -86115,7 +86115,7 @@ var require_utils13 = __commonJS({
|
|
|
86115
86115
|
if (socialIds.length === 0) {
|
|
86116
86116
|
return;
|
|
86117
86117
|
}
|
|
86118
|
-
return (0,
|
|
86118
|
+
return (0, import_core47.pickPrimarySocialId)(socialIds)._id;
|
|
86119
86119
|
}
|
|
86120
86120
|
__name(getPrimarySocialId, "getPrimarySocialId");
|
|
86121
86121
|
async function getAllSocialStringsByPersonId(client, personId) {
|
|
@@ -86154,12 +86154,12 @@ var require_utils13 = __commonJS({
|
|
|
86154
86154
|
__name(getSocialStringsByEmployee, "getSocialStringsByEmployee");
|
|
86155
86155
|
async function getAllAccounts(client) {
|
|
86156
86156
|
const employees = await client.findAll(import__.default.mixin.Employee, { active: true });
|
|
86157
|
-
return employees.map((it) => it.personUuid).filter(
|
|
86157
|
+
return employees.map((it) => it.personUuid).filter(import_core47.notEmpty);
|
|
86158
86158
|
}
|
|
86159
86159
|
__name(getAllAccounts, "getAllAccounts");
|
|
86160
86160
|
async function getAllUserAccounts(client) {
|
|
86161
86161
|
const employees = await client.findAll(import__.default.mixin.Employee, { active: true });
|
|
86162
|
-
return employees.map((it) => it.personUuid).filter(
|
|
86162
|
+
return employees.map((it) => it.personUuid).filter(import_core47.notEmpty);
|
|
86163
86163
|
}
|
|
86164
86164
|
__name(getAllUserAccounts, "getAllUserAccounts");
|
|
86165
86165
|
async function ensureEmployee(ctx, me, client, socialIds, getGlobalPerson) {
|
|
@@ -86168,7 +86168,7 @@ var require_utils13 = __commonJS({
|
|
|
86168
86168
|
}
|
|
86169
86169
|
__name(ensureEmployee, "ensureEmployee");
|
|
86170
86170
|
async function ensureEmployeeForPerson(ctx, me, person, client, socialIds, globalPerson) {
|
|
86171
|
-
const txFactory = new
|
|
86171
|
+
const txFactory = new import_core47.TxFactory(me.primarySocialId);
|
|
86172
86172
|
const personByUuid = await client.findOne(import__.default.class.Person, { personUuid: person.uuid });
|
|
86173
86173
|
let personRef = personByUuid?._id;
|
|
86174
86174
|
if (personRef === void 0) {
|
|
@@ -86189,7 +86189,7 @@ var require_utils13 = __commonJS({
|
|
|
86189
86189
|
city: globalPerson.city,
|
|
86190
86190
|
avatarType: import__.AvatarType.COLOR
|
|
86191
86191
|
};
|
|
86192
|
-
personRef = (0,
|
|
86192
|
+
personRef = (0, import_core47.generateId)();
|
|
86193
86193
|
const createPersonTx = txFactory.createTxCreateDoc(import__.default.class.Person, import__.default.space.Contacts, data, personRef);
|
|
86194
86194
|
await client.tx(createPersonTx);
|
|
86195
86195
|
});
|
|
@@ -86199,7 +86199,7 @@ var require_utils13 = __commonJS({
|
|
|
86199
86199
|
});
|
|
86200
86200
|
await client.tx(updatePersonTx);
|
|
86201
86201
|
}
|
|
86202
|
-
const existingIdentifiers = (0,
|
|
86202
|
+
const existingIdentifiers = (0, import_core47.toIdMap)(
|
|
86203
86203
|
await client.findAll(import__.default.class.SocialIdentity, { _id: { $in: person.socialIds } })
|
|
86204
86204
|
);
|
|
86205
86205
|
for (const socialId of socialIds) {
|
|
@@ -86224,7 +86224,7 @@ var require_utils13 = __commonJS({
|
|
|
86224
86224
|
collection: "socialIds",
|
|
86225
86225
|
type: socialId.type,
|
|
86226
86226
|
value: socialId.value,
|
|
86227
|
-
key: (0,
|
|
86227
|
+
key: (0, import_core47.buildSocialIdString)(socialId),
|
|
86228
86228
|
// TODO: fill it in trigger or on DB level as stored calculated column or smth?
|
|
86229
86229
|
verifiedOn: socialId.verifiedOn,
|
|
86230
86230
|
isDeleted: socialId.isDeleted
|
|
@@ -86265,9 +86265,9 @@ var require_utils13 = __commonJS({
|
|
|
86265
86265
|
}
|
|
86266
86266
|
}
|
|
86267
86267
|
}
|
|
86268
|
-
const employeeRole = person.role ===
|
|
86268
|
+
const employeeRole = person.role === import_core47.AccountRole.Guest || person.role === import_core47.AccountRole.ReadOnlyGuest ? "GUEST" : "USER";
|
|
86269
86269
|
const employee = await client.findOne(import__.default.mixin.Employee, { _id: personRef });
|
|
86270
|
-
if (employee === void 0 || !
|
|
86270
|
+
if (employee === void 0 || !import_core47.Hierarchy.hasMixin(employee, import__.default.mixin.Employee) || !employee.active || employee.role !== employeeRole) {
|
|
86271
86271
|
await ctx.with("create-employee", {}, async () => {
|
|
86272
86272
|
if (personRef === void 0) {
|
|
86273
86273
|
console.error("Person not found");
|
|
@@ -86307,7 +86307,7 @@ var require_utils13 = __commonJS({
|
|
|
86307
86307
|
}
|
|
86308
86308
|
__name(loadCachesForPersonId, "loadCachesForPersonId");
|
|
86309
86309
|
async function loadCachesForPersonIds(client, personIds) {
|
|
86310
|
-
const sidObjsMap = (0,
|
|
86310
|
+
const sidObjsMap = (0, import_core47.toIdMap)(
|
|
86311
86311
|
await client.findAll(
|
|
86312
86312
|
import__.default.class.SocialIdentity,
|
|
86313
86313
|
{
|
|
@@ -86342,7 +86342,7 @@ var require_utils13 = __commonJS({
|
|
|
86342
86342
|
}
|
|
86343
86343
|
__name(loadCachesForPersonRef, "loadCachesForPersonRef");
|
|
86344
86344
|
async function loadCachesForPersonRefs(client, personRefs) {
|
|
86345
|
-
const persons = (0,
|
|
86345
|
+
const persons = (0, import_core47.toIdMap)(
|
|
86346
86346
|
await client.findAll(
|
|
86347
86347
|
import__.default.class.Person,
|
|
86348
86348
|
{
|
|
@@ -86385,7 +86385,7 @@ var require_utils13 = __commonJS({
|
|
|
86385
86385
|
personIds.map((pid) => {
|
|
86386
86386
|
const ref = contactCache.personRefByPersonId.get(pid);
|
|
86387
86387
|
return ref != null ? [pid, ref] : void 0;
|
|
86388
|
-
}).filter(
|
|
86388
|
+
}).filter(import_core47.notEmpty)
|
|
86389
86389
|
);
|
|
86390
86390
|
}
|
|
86391
86391
|
__name(getPersonRefsByPersonIdsFromCache, "getPersonRefsByPersonIdsFromCache");
|
|
@@ -86432,7 +86432,7 @@ var require_utils13 = __commonJS({
|
|
|
86432
86432
|
personIds.map((pid) => {
|
|
86433
86433
|
const person = contactCache.personByPersonId.get(pid);
|
|
86434
86434
|
return person != null ? [pid, person] : void 0;
|
|
86435
|
-
}).filter(
|
|
86435
|
+
}).filter(import_core47.notEmpty)
|
|
86436
86436
|
);
|
|
86437
86437
|
}
|
|
86438
86438
|
__name(getPersonsByPersonIdsFromCache, "getPersonsByPersonIdsFromCache");
|
|
@@ -86479,7 +86479,7 @@ var require_utils13 = __commonJS({
|
|
|
86479
86479
|
personRefs.map((personRef) => {
|
|
86480
86480
|
const person = contactCache.personByRef.get(personRef);
|
|
86481
86481
|
return person != null ? [personRef, person] : void 0;
|
|
86482
|
-
}).filter(
|
|
86482
|
+
}).filter(import_core47.notEmpty)
|
|
86483
86483
|
);
|
|
86484
86484
|
}
|
|
86485
86485
|
__name(getPersonsByPersonRefsFromCache, "getPersonsByPersonRefsFromCache");
|
|
@@ -87084,9 +87084,9 @@ var require_utils14 = __commonJS({
|
|
|
87084
87084
|
getFirstRank: () => getFirstRank
|
|
87085
87085
|
});
|
|
87086
87086
|
module2.exports = __toCommonJS2(utils_exports);
|
|
87087
|
-
var
|
|
87087
|
+
var import_core47 = require_lib4();
|
|
87088
87088
|
var import_plugin = __toESM2(require_plugin2());
|
|
87089
|
-
async function getFirstRank(client, space, parent, sort3 =
|
|
87089
|
+
async function getFirstRank(client, space, parent, sort3 = import_core47.SortingOrder.Descending, extra = {}) {
|
|
87090
87090
|
const doc = await client.findOne(
|
|
87091
87091
|
import_plugin.default.class.Document,
|
|
87092
87092
|
{ space, parent, ...extra },
|
|
@@ -88709,7 +88709,7 @@ var require_utils16 = __commonJS({
|
|
|
88709
88709
|
updateProjectType: () => updateProjectType
|
|
88710
88710
|
});
|
|
88711
88711
|
module2.exports = __toCommonJS2(utils_exports);
|
|
88712
|
-
var
|
|
88712
|
+
var import_core47 = __toESM2(require_lib4());
|
|
88713
88713
|
var import_platform2 = require_lib();
|
|
88714
88714
|
var import__ = __toESM2(require_lib33());
|
|
88715
88715
|
var import_rank4 = require_lib32();
|
|
@@ -88745,7 +88745,7 @@ var require_utils16 = __commonJS({
|
|
|
88745
88745
|
if (exists5 !== void 0) {
|
|
88746
88746
|
return exists5._id;
|
|
88747
88747
|
}
|
|
88748
|
-
const res = await client.createDoc(_class,
|
|
88748
|
+
const res = await client.createDoc(_class, import_core47.default.space.Model, data);
|
|
88749
88749
|
return res;
|
|
88750
88750
|
}
|
|
88751
88751
|
__name(createState, "createState");
|
|
@@ -88775,7 +88775,7 @@ var require_utils16 = __commonJS({
|
|
|
88775
88775
|
function findStatusAttr(h, _class) {
|
|
88776
88776
|
const attrs = h.getAllAttributes(_class);
|
|
88777
88777
|
for (const it of attrs.values()) {
|
|
88778
|
-
if (it.type._class ===
|
|
88778
|
+
if (it.type._class === import_core47.default.class.RefTo && h.isDerived(it.type.to, import_core47.default.class.Status)) {
|
|
88779
88779
|
return it;
|
|
88780
88780
|
}
|
|
88781
88781
|
}
|
|
@@ -88807,7 +88807,7 @@ var require_utils16 = __commonJS({
|
|
|
88807
88807
|
const targetProjectClassId = `${_id}:type:mixin`;
|
|
88808
88808
|
const tmpl = await client.createDoc(
|
|
88809
88809
|
import__.default.class.ProjectType,
|
|
88810
|
-
|
|
88810
|
+
import_core47.default.space.Model,
|
|
88811
88811
|
{
|
|
88812
88812
|
description: data.description,
|
|
88813
88813
|
shortDescription: data.shortDescription,
|
|
@@ -88822,17 +88822,17 @@ var require_utils16 = __commonJS({
|
|
|
88822
88822
|
_id
|
|
88823
88823
|
);
|
|
88824
88824
|
await client.createDoc(
|
|
88825
|
-
|
|
88826
|
-
|
|
88825
|
+
import_core47.default.class.Mixin,
|
|
88826
|
+
import_core47.default.space.Model,
|
|
88827
88827
|
{
|
|
88828
88828
|
extends: categoryObj.baseClass,
|
|
88829
|
-
kind:
|
|
88829
|
+
kind: import_core47.ClassifierKind.MIXIN,
|
|
88830
88830
|
label: (0, import_platform2.getEmbeddedLabel)(data.name),
|
|
88831
88831
|
icon: baseClassClass.icon
|
|
88832
88832
|
},
|
|
88833
88833
|
targetProjectClassId
|
|
88834
88834
|
);
|
|
88835
|
-
await client.createMixin(targetProjectClassId,
|
|
88835
|
+
await client.createMixin(targetProjectClassId, import_core47.default.class.Mixin, import_core47.default.space.Model, import__.default.mixin.ProjectTypeClass, {
|
|
88836
88836
|
projectType: _id
|
|
88837
88837
|
});
|
|
88838
88838
|
return tmpl;
|
|
@@ -88891,22 +88891,22 @@ var require_utils16 = __commonJS({
|
|
|
88891
88891
|
const targetClassId = `${taskId}:type:mixin`;
|
|
88892
88892
|
tdata.targetClass = targetClassId;
|
|
88893
88893
|
await client.createDoc(
|
|
88894
|
-
|
|
88895
|
-
|
|
88894
|
+
import_core47.default.class.Mixin,
|
|
88895
|
+
import_core47.default.space.Model,
|
|
88896
88896
|
{
|
|
88897
88897
|
extends: data.ofClass,
|
|
88898
|
-
kind:
|
|
88898
|
+
kind: import_core47.ClassifierKind.MIXIN,
|
|
88899
88899
|
label: ofClassClass.label,
|
|
88900
88900
|
icon: ofClassClass.icon
|
|
88901
88901
|
},
|
|
88902
88902
|
targetClassId
|
|
88903
88903
|
);
|
|
88904
|
-
await client.createMixin(targetClassId,
|
|
88904
|
+
await client.createMixin(targetClassId, import_core47.default.class.Mixin, import_core47.default.space.Model, import__.default.mixin.TaskTypeClass, {
|
|
88905
88905
|
taskType: taskId,
|
|
88906
88906
|
projectType: _id
|
|
88907
88907
|
});
|
|
88908
88908
|
}
|
|
88909
|
-
await client.createDoc(import__.default.class.TaskType,
|
|
88909
|
+
await client.createDoc(import__.default.class.TaskType, import_core47.default.space.Model, tdata, taskId);
|
|
88910
88910
|
tasksData.set(taskId, tdata);
|
|
88911
88911
|
_tasks.push(taskId);
|
|
88912
88912
|
}
|
|
@@ -151346,6 +151346,7 @@ var path = __toESM(require("node:path"), 1);
|
|
|
151346
151346
|
var import_api_client2 = __toESM(require_lib20(), 1);
|
|
151347
151347
|
|
|
151348
151348
|
// src/huly/operations/shared.ts
|
|
151349
|
+
var import_core3 = __toESM(require_lib4(), 1);
|
|
151349
151350
|
var import_tracker = __toESM(require_lib21(), 1);
|
|
151350
151351
|
|
|
151351
151352
|
// src/domain/schemas/shared.ts
|
|
@@ -151642,7 +151643,23 @@ var stringToPriorityMap = {
|
|
|
151642
151643
|
var stringToPriority = (priority) => stringToPriorityMap[priority];
|
|
151643
151644
|
var DEFAULT_LIMIT = 50;
|
|
151644
151645
|
var clampLimit = (limit) => Math.min(limit ?? DEFAULT_LIMIT, MAX_LIMIT);
|
|
151646
|
+
var findPersonBySocialIdentityEmail = (client, email3) => Effect_exports.gen(function* () {
|
|
151647
|
+
const identity5 = yield* client.findOne(
|
|
151648
|
+
contact.class.SocialIdentity,
|
|
151649
|
+
{
|
|
151650
|
+
type: import_core3.SocialIdType.EMAIL,
|
|
151651
|
+
value: email3
|
|
151652
|
+
}
|
|
151653
|
+
);
|
|
151654
|
+
if (identity5 === void 0) return void 0;
|
|
151655
|
+
return yield* client.findOne(
|
|
151656
|
+
contact.class.Person,
|
|
151657
|
+
{ _id: identity5.attachedTo }
|
|
151658
|
+
);
|
|
151659
|
+
});
|
|
151645
151660
|
var findPersonByEmailOrName = (client, emailOrName) => Effect_exports.gen(function* () {
|
|
151661
|
+
const socialIdentityPerson = yield* findPersonBySocialIdentityEmail(client, emailOrName);
|
|
151662
|
+
if (socialIdentityPerson !== void 0) return socialIdentityPerson;
|
|
151646
151663
|
const exactChannel = yield* client.findOne(
|
|
151647
151664
|
contact.class.Channel,
|
|
151648
151665
|
{
|
|
@@ -171236,7 +171253,7 @@ var PostHog = class extends PostHogBackendClient {
|
|
|
171236
171253
|
};
|
|
171237
171254
|
|
|
171238
171255
|
// src/version.ts
|
|
171239
|
-
var VERSION = true ? "0.6.
|
|
171256
|
+
var VERSION = true ? "0.6.3" : "0.0.0-dev";
|
|
171240
171257
|
|
|
171241
171258
|
// src/telemetry/posthog.ts
|
|
171242
171259
|
var POSTHOG_API_KEY = "phc_TGfFqCGdnF0p68wuFzd5WSw1IsBvOJW0YgoMJDyZPjm";
|
|
@@ -171561,7 +171578,7 @@ var parseListSavedMessagesParams = Schema_exports.decodeUnknown(ListSavedMessage
|
|
|
171561
171578
|
var parseListMentionsParams = Schema_exports.decodeUnknown(ListMentionsParamsSchema);
|
|
171562
171579
|
|
|
171563
171580
|
// src/huly/operations/activity.ts
|
|
171564
|
-
var
|
|
171581
|
+
var import_core20 = __toESM(require_lib4(), 1);
|
|
171565
171582
|
var serverPopulatedCreateBy = "";
|
|
171566
171583
|
var listActivity = (params) => Effect_exports.gen(function* () {
|
|
171567
171584
|
const client = yield* HulyClient;
|
|
@@ -171575,7 +171592,7 @@ var listActivity = (params) => Effect_exports.gen(function* () {
|
|
|
171575
171592
|
{
|
|
171576
171593
|
limit,
|
|
171577
171594
|
sort: {
|
|
171578
|
-
modifiedOn:
|
|
171595
|
+
modifiedOn: import_core20.SortingOrder.Descending
|
|
171579
171596
|
}
|
|
171580
171597
|
}
|
|
171581
171598
|
);
|
|
@@ -171600,7 +171617,7 @@ var addReaction = (params) => Effect_exports.gen(function* () {
|
|
|
171600
171617
|
{ _id: toRef(params.messageId) },
|
|
171601
171618
|
() => new ActivityMessageNotFoundError({ messageId: params.messageId })
|
|
171602
171619
|
);
|
|
171603
|
-
const reactionId = (0,
|
|
171620
|
+
const reactionId = (0, import_core20.generateId)();
|
|
171604
171621
|
const reactionData = {
|
|
171605
171622
|
emoji: params.emoji,
|
|
171606
171623
|
createBy: serverPopulatedCreateBy
|
|
@@ -171669,7 +171686,7 @@ var saveMessage = (params) => Effect_exports.gen(function* () {
|
|
|
171669
171686
|
{ _id: toRef(params.messageId) },
|
|
171670
171687
|
() => new ActivityMessageNotFoundError({ messageId: params.messageId })
|
|
171671
171688
|
);
|
|
171672
|
-
const savedId = (0,
|
|
171689
|
+
const savedId = (0, import_core20.generateId)();
|
|
171673
171690
|
yield* client.createDoc(
|
|
171674
171691
|
activity.class.SavedMessage,
|
|
171675
171692
|
core.space.Workspace,
|
|
@@ -171726,7 +171743,7 @@ var listMentions = (params) => Effect_exports.gen(function* () {
|
|
|
171726
171743
|
{
|
|
171727
171744
|
limit,
|
|
171728
171745
|
sort: {
|
|
171729
|
-
modifiedOn:
|
|
171746
|
+
modifiedOn: import_core20.SortingOrder.Descending
|
|
171730
171747
|
}
|
|
171731
171748
|
}
|
|
171732
171749
|
);
|
|
@@ -172091,10 +172108,10 @@ var parseAddIssueAttachmentParams = Schema_exports.decodeUnknown(AddIssueAttachm
|
|
|
172091
172108
|
var parseAddDocumentAttachmentParams = Schema_exports.decodeUnknown(AddDocumentAttachmentParamsSchema);
|
|
172092
172109
|
|
|
172093
172110
|
// src/huly/operations/attachments.ts
|
|
172094
|
-
var
|
|
172111
|
+
var import_core24 = __toESM(require_lib4(), 1);
|
|
172095
172112
|
|
|
172096
172113
|
// src/huly/operations/documents.ts
|
|
172097
|
-
var
|
|
172114
|
+
var import_core23 = __toESM(require_lib4(), 1);
|
|
172098
172115
|
var import_rank = __toESM(require_lib32(), 1);
|
|
172099
172116
|
|
|
172100
172117
|
// src/huly/operations/documents-edit.ts
|
|
@@ -172184,11 +172201,11 @@ var countOccurrences = (text, search) => {
|
|
|
172184
172201
|
};
|
|
172185
172202
|
|
|
172186
172203
|
// src/huly/operations/documents-inline-comments.ts
|
|
172187
|
-
var
|
|
172204
|
+
var import_core22 = __toESM(require_lib4(), 1);
|
|
172188
172205
|
var import_text3 = __toESM(require_lib9(), 1);
|
|
172189
172206
|
|
|
172190
172207
|
// src/huly/operations/channels.ts
|
|
172191
|
-
var
|
|
172208
|
+
var import_core21 = __toESM(require_lib4(), 1);
|
|
172192
172209
|
|
|
172193
172210
|
// src/huly/operations/markup.ts
|
|
172194
172211
|
var import_text2 = __toESM(require_lib9(), 1);
|
|
@@ -172286,7 +172303,7 @@ var listChannels = (params) => Effect_exports.gen(function* () {
|
|
|
172286
172303
|
{
|
|
172287
172304
|
limit,
|
|
172288
172305
|
sort: {
|
|
172289
|
-
name:
|
|
172306
|
+
name: import_core21.SortingOrder.Ascending
|
|
172290
172307
|
}
|
|
172291
172308
|
}
|
|
172292
172309
|
);
|
|
@@ -172324,7 +172341,7 @@ var getChannel = (params) => Effect_exports.gen(function* () {
|
|
|
172324
172341
|
});
|
|
172325
172342
|
var createChannel = (params) => Effect_exports.gen(function* () {
|
|
172326
172343
|
const client = yield* HulyClient;
|
|
172327
|
-
const channelId = (0,
|
|
172344
|
+
const channelId = (0, import_core21.generateId)();
|
|
172328
172345
|
const channelData = {
|
|
172329
172346
|
name: params.name,
|
|
172330
172347
|
topic: params.topic || "",
|
|
@@ -172382,7 +172399,7 @@ var listChannelMessages = (params) => Effect_exports.gen(function* () {
|
|
|
172382
172399
|
{
|
|
172383
172400
|
limit,
|
|
172384
172401
|
sort: {
|
|
172385
|
-
createdOn:
|
|
172402
|
+
createdOn: import_core21.SortingOrder.Descending
|
|
172386
172403
|
}
|
|
172387
172404
|
}
|
|
172388
172405
|
);
|
|
@@ -172410,7 +172427,7 @@ var listChannelMessages = (params) => Effect_exports.gen(function* () {
|
|
|
172410
172427
|
});
|
|
172411
172428
|
var sendChannelMessage = (params) => Effect_exports.gen(function* () {
|
|
172412
172429
|
const { channel, client } = yield* findChannel(params.channel);
|
|
172413
|
-
const messageId = (0,
|
|
172430
|
+
const messageId = (0, import_core21.generateId)();
|
|
172414
172431
|
const markup = markdownToMarkupString(params.body);
|
|
172415
172432
|
const messageData = {
|
|
172416
172433
|
message: markup,
|
|
@@ -172436,7 +172453,7 @@ var listDirectMessages = (params) => Effect_exports.gen(function* () {
|
|
|
172436
172453
|
{
|
|
172437
172454
|
limit,
|
|
172438
172455
|
sort: {
|
|
172439
|
-
modifiedOn:
|
|
172456
|
+
modifiedOn: import_core21.SortingOrder.Descending
|
|
172440
172457
|
}
|
|
172441
172458
|
}
|
|
172442
172459
|
);
|
|
@@ -172507,7 +172524,7 @@ var listInlineComments = (params) => Effect_exports.gen(function* () {
|
|
|
172507
172524
|
const allReplies = yield* client.findAll(
|
|
172508
172525
|
chunter.class.ThreadMessage,
|
|
172509
172526
|
{ attachedTo: { $in: threadIds } },
|
|
172510
|
-
{ sort: { createdOn:
|
|
172527
|
+
{ sort: { createdOn: import_core22.SortingOrder.Ascending } }
|
|
172511
172528
|
);
|
|
172512
172529
|
for (const r of allReplies) {
|
|
172513
172530
|
const key = r.attachedTo;
|
|
@@ -172592,7 +172609,7 @@ var listTeamspaces = (params) => Effect_exports.gen(function* () {
|
|
|
172592
172609
|
{
|
|
172593
172610
|
limit,
|
|
172594
172611
|
sort: {
|
|
172595
|
-
name:
|
|
172612
|
+
name: import_core23.SortingOrder.Ascending
|
|
172596
172613
|
}
|
|
172597
172614
|
}
|
|
172598
172615
|
);
|
|
@@ -172638,7 +172655,7 @@ var createTeamspace = (params) => Effect_exports.gen(function* () {
|
|
|
172638
172655
|
created: false
|
|
172639
172656
|
};
|
|
172640
172657
|
}
|
|
172641
|
-
const teamspaceId = (0,
|
|
172658
|
+
const teamspaceId = (0, import_core23.generateId)();
|
|
172642
172659
|
const teamspaceData = {
|
|
172643
172660
|
name: params.name,
|
|
172644
172661
|
description: params.description ?? "",
|
|
@@ -172714,7 +172731,7 @@ var listDocuments = (params) => Effect_exports.gen(function* () {
|
|
|
172714
172731
|
{
|
|
172715
172732
|
limit,
|
|
172716
172733
|
sort: {
|
|
172717
|
-
modifiedOn:
|
|
172734
|
+
modifiedOn: import_core23.SortingOrder.Descending
|
|
172718
172735
|
}
|
|
172719
172736
|
}
|
|
172720
172737
|
);
|
|
@@ -172754,11 +172771,11 @@ var getDocument = (params) => Effect_exports.gen(function* () {
|
|
|
172754
172771
|
});
|
|
172755
172772
|
var createDocument = (params) => Effect_exports.gen(function* () {
|
|
172756
172773
|
const { client, teamspace } = yield* findTeamspace(params.teamspace);
|
|
172757
|
-
const documentId = (0,
|
|
172774
|
+
const documentId = (0, import_core23.generateId)();
|
|
172758
172775
|
const lastDoc = yield* client.findOne(
|
|
172759
172776
|
documentPlugin.class.Document,
|
|
172760
172777
|
{ space: teamspace._id },
|
|
172761
|
-
{ sort: { rank:
|
|
172778
|
+
{ sort: { rank: import_core23.SortingOrder.Descending } }
|
|
172762
172779
|
);
|
|
172763
172780
|
const rank = (0, import_rank.makeRank)(lastDoc?.rank, void 0);
|
|
172764
172781
|
const contentMarkupRef = params.content !== void 0 && params.content.trim() !== "" ? yield* client.uploadMarkup(
|
|
@@ -172828,7 +172845,7 @@ var uploadAndAttach = (params, parent) => Effect_exports.gen(function* () {
|
|
|
172828
172845
|
buffer,
|
|
172829
172846
|
params.contentType
|
|
172830
172847
|
);
|
|
172831
|
-
const attachmentId = (0,
|
|
172848
|
+
const attachmentId = (0, import_core24.generateId)();
|
|
172832
172849
|
const now2 = yield* Clock_exports.currentTimeMillis;
|
|
172833
172850
|
const attachmentData = {
|
|
172834
172851
|
name: params.filename,
|
|
@@ -172866,7 +172883,7 @@ var listAttachments = (params) => Effect_exports.gen(function* () {
|
|
|
172866
172883
|
{
|
|
172867
172884
|
limit,
|
|
172868
172885
|
sort: {
|
|
172869
|
-
modifiedOn:
|
|
172886
|
+
modifiedOn: import_core24.SortingOrder.Descending
|
|
172870
172887
|
}
|
|
172871
172888
|
}
|
|
172872
172889
|
);
|
|
@@ -173347,7 +173364,7 @@ var parseListEventInstancesParams = Schema_exports.decodeUnknown(ListEventInstan
|
|
|
173347
173364
|
|
|
173348
173365
|
// src/huly/operations/calendar.ts
|
|
173349
173366
|
var import_calendar2 = __toESM(require_lib24(), 1);
|
|
173350
|
-
var
|
|
173367
|
+
var import_core26 = __toESM(require_lib4(), 1);
|
|
173351
173368
|
|
|
173352
173369
|
// src/huly/operations/calendar-shared.ts
|
|
173353
173370
|
var descriptionAsMarkupRef = (desc) => desc;
|
|
@@ -173405,7 +173422,7 @@ var resolveEventInputs = (client, params, eventClass, eventId) => Effect_exports
|
|
|
173405
173422
|
|
|
173406
173423
|
// src/huly/operations/calendar-recurring.ts
|
|
173407
173424
|
var import_calendar = __toESM(require_lib24(), 1);
|
|
173408
|
-
var
|
|
173425
|
+
var import_core25 = __toESM(require_lib4(), 1);
|
|
173409
173426
|
var hulyRuleToRule = (rule) => ({
|
|
173410
173427
|
freq: rule.freq,
|
|
173411
173428
|
endDate: rule.endDate,
|
|
@@ -173439,7 +173456,7 @@ var listRecurringEvents = (params) => Effect_exports.gen(function* () {
|
|
|
173439
173456
|
{},
|
|
173440
173457
|
{
|
|
173441
173458
|
limit,
|
|
173442
|
-
sort: { modifiedOn:
|
|
173459
|
+
sort: { modifiedOn: import_core25.SortingOrder.Descending }
|
|
173443
173460
|
}
|
|
173444
173461
|
);
|
|
173445
173462
|
const summaries = events.map((event) => ({
|
|
@@ -173525,7 +173542,7 @@ var listEventInstances = (params) => Effect_exports.gen(function* () {
|
|
|
173525
173542
|
query,
|
|
173526
173543
|
{
|
|
173527
173544
|
limit,
|
|
173528
|
-
sort: { date:
|
|
173545
|
+
sort: { date: import_core25.SortingOrder.Ascending }
|
|
173529
173546
|
}
|
|
173530
173547
|
);
|
|
173531
173548
|
const participantMap = /* @__PURE__ */ new Map();
|
|
@@ -173578,7 +173595,7 @@ var listEvents = (params) => Effect_exports.gen(function* () {
|
|
|
173578
173595
|
query,
|
|
173579
173596
|
{
|
|
173580
173597
|
limit,
|
|
173581
|
-
sort: { date:
|
|
173598
|
+
sort: { date: import_core26.SortingOrder.Ascending }
|
|
173582
173599
|
}
|
|
173583
173600
|
);
|
|
173584
173601
|
const summaries = events.map((event) => ({
|
|
@@ -176856,7 +176873,7 @@ var parseDeleteTestResultParams = Schema_exports.decodeUnknown(DeleteTestResultP
|
|
|
176856
176873
|
var parseRunTestPlanParams = Schema_exports.decodeUnknown(RunTestPlanParamsSchema);
|
|
176857
176874
|
|
|
176858
176875
|
// src/huly/operations/cards.ts
|
|
176859
|
-
var
|
|
176876
|
+
var import_core27 = __toESM(require_lib4(), 1);
|
|
176860
176877
|
var import_rank2 = __toESM(require_lib32(), 1);
|
|
176861
176878
|
var findCardSpace = (identifier2) => Effect_exports.gen(function* () {
|
|
176862
176879
|
const client = yield* HulyClient;
|
|
@@ -176921,7 +176938,7 @@ var listCardSpaces = (params) => Effect_exports.gen(function* () {
|
|
|
176921
176938
|
{
|
|
176922
176939
|
limit,
|
|
176923
176940
|
sort: {
|
|
176924
|
-
name:
|
|
176941
|
+
name: import_core27.SortingOrder.Ascending
|
|
176925
176942
|
}
|
|
176926
176943
|
}
|
|
176927
176944
|
);
|
|
@@ -176980,7 +176997,7 @@ var listCards = (params) => Effect_exports.gen(function* () {
|
|
|
176980
176997
|
{
|
|
176981
176998
|
limit,
|
|
176982
176999
|
sort: {
|
|
176983
|
-
modifiedOn:
|
|
177000
|
+
modifiedOn: import_core27.SortingOrder.Descending
|
|
176984
177001
|
}
|
|
176985
177002
|
}
|
|
176986
177003
|
);
|
|
@@ -177022,11 +177039,11 @@ var getCard = (params) => Effect_exports.gen(function* () {
|
|
|
177022
177039
|
var createCard = (params) => Effect_exports.gen(function* () {
|
|
177023
177040
|
const { cardSpace, client } = yield* findCardSpace(params.cardSpace);
|
|
177024
177041
|
const masterTag = yield* findMasterTag(client, cardSpace, params.type);
|
|
177025
|
-
const cardId = (0,
|
|
177042
|
+
const cardId = (0, import_core27.generateId)();
|
|
177026
177043
|
const lastCard = yield* client.findOne(
|
|
177027
177044
|
cardPlugin.class.Card,
|
|
177028
177045
|
{ space: cardSpace._id },
|
|
177029
|
-
{ sort: { rank:
|
|
177046
|
+
{ sort: { rank: import_core27.SortingOrder.Descending } }
|
|
177030
177047
|
);
|
|
177031
177048
|
const rank = (0, import_rank2.makeRank)(lastCard?.rank, void 0);
|
|
177032
177049
|
const contentMarkupRef = yield* client.uploadMarkup(
|
|
@@ -177214,7 +177231,7 @@ var cardTools = [
|
|
|
177214
177231
|
];
|
|
177215
177232
|
|
|
177216
177233
|
// src/huly/operations/threads.ts
|
|
177217
|
-
var
|
|
177234
|
+
var import_core28 = __toESM(require_lib4(), 1);
|
|
177218
177235
|
var findMessage = (channelIdentifier, messageId) => Effect_exports.gen(function* () {
|
|
177219
177236
|
const { channel, client } = yield* findChannel(channelIdentifier);
|
|
177220
177237
|
const message = yield* client.findOne(
|
|
@@ -177258,7 +177275,7 @@ var listThreadReplies = (params) => Effect_exports.gen(function* () {
|
|
|
177258
177275
|
{
|
|
177259
177276
|
limit,
|
|
177260
177277
|
sort: {
|
|
177261
|
-
createdOn:
|
|
177278
|
+
createdOn: import_core28.SortingOrder.Ascending
|
|
177262
177279
|
}
|
|
177263
177280
|
}
|
|
177264
177281
|
);
|
|
@@ -177285,7 +177302,7 @@ var listThreadReplies = (params) => Effect_exports.gen(function* () {
|
|
|
177285
177302
|
});
|
|
177286
177303
|
var addThreadReply = (params) => Effect_exports.gen(function* () {
|
|
177287
177304
|
const { channel, client, message } = yield* findMessage(params.channel, params.messageId);
|
|
177288
|
-
const replyId = (0,
|
|
177305
|
+
const replyId = (0, import_core28.generateId)();
|
|
177289
177306
|
const markup = markdownToMarkupString(params.body);
|
|
177290
177307
|
const replyData = {
|
|
177291
177308
|
message: markup,
|
|
@@ -177474,7 +177491,7 @@ var channelTools = [
|
|
|
177474
177491
|
];
|
|
177475
177492
|
|
|
177476
177493
|
// src/huly/operations/comments.ts
|
|
177477
|
-
var
|
|
177494
|
+
var import_core29 = __toESM(require_lib4(), 1);
|
|
177478
177495
|
var findProjectAndIssue2 = (params) => findProjectAndIssue({ project: params.project, identifier: params.issueIdentifier });
|
|
177479
177496
|
var findComment = (params) => Effect_exports.gen(function* () {
|
|
177480
177497
|
const { client, issue: issue2, project: project3 } = yield* findProjectAndIssue2({
|
|
@@ -177512,7 +177529,7 @@ var listComments = (params) => Effect_exports.gen(function* () {
|
|
|
177512
177529
|
{
|
|
177513
177530
|
limit,
|
|
177514
177531
|
sort: {
|
|
177515
|
-
createdOn:
|
|
177532
|
+
createdOn: import_core29.SortingOrder.Ascending
|
|
177516
177533
|
}
|
|
177517
177534
|
}
|
|
177518
177535
|
);
|
|
@@ -177540,7 +177557,7 @@ var addComment = (params) => Effect_exports.gen(function* () {
|
|
|
177540
177557
|
project: params.project,
|
|
177541
177558
|
issueIdentifier: params.issueIdentifier
|
|
177542
177559
|
});
|
|
177543
|
-
const commentId = (0,
|
|
177560
|
+
const commentId = (0, import_core29.generateId)();
|
|
177544
177561
|
const commentData = {
|
|
177545
177562
|
message: markdownToMarkupString(params.body)
|
|
177546
177563
|
};
|
|
@@ -177650,7 +177667,7 @@ var commentTools = [
|
|
|
177650
177667
|
|
|
177651
177668
|
// src/huly/operations/contacts.ts
|
|
177652
177669
|
var import_contact = __toESM(require_lib27(), 1);
|
|
177653
|
-
var
|
|
177670
|
+
var import_core30 = __toESM(require_lib4(), 1);
|
|
177654
177671
|
var formatName = (firstName, lastName) => `${lastName},${firstName}`;
|
|
177655
177672
|
var parseName = (name) => {
|
|
177656
177673
|
const parts2 = name.split(",");
|
|
@@ -177712,7 +177729,7 @@ var listPersons = (params) => Effect_exports.gen(function* () {
|
|
|
177712
177729
|
query,
|
|
177713
177730
|
{
|
|
177714
177731
|
limit,
|
|
177715
|
-
sort: { modifiedOn:
|
|
177732
|
+
sort: { modifiedOn: import_core30.SortingOrder.Descending }
|
|
177716
177733
|
}
|
|
177717
177734
|
);
|
|
177718
177735
|
const personIds = persons.map((p) => p._id);
|
|
@@ -177782,7 +177799,7 @@ var getPerson = (params) => Effect_exports.gen(function* () {
|
|
|
177782
177799
|
});
|
|
177783
177800
|
var createPerson = (params) => Effect_exports.gen(function* () {
|
|
177784
177801
|
const client = yield* HulyClient;
|
|
177785
|
-
const personId = (0,
|
|
177802
|
+
const personId = (0, import_core30.generateId)();
|
|
177786
177803
|
const personData = {
|
|
177787
177804
|
name: formatName(params.firstName, params.lastName),
|
|
177788
177805
|
// Huly API requires city field to be set, even if empty
|
|
@@ -177858,7 +177875,7 @@ var listEmployees = (params) => Effect_exports.gen(function* () {
|
|
|
177858
177875
|
{},
|
|
177859
177876
|
{
|
|
177860
177877
|
limit,
|
|
177861
|
-
sort: { modifiedOn:
|
|
177878
|
+
sort: { modifiedOn: import_core30.SortingOrder.Descending }
|
|
177862
177879
|
}
|
|
177863
177880
|
);
|
|
177864
177881
|
const employeeIds = employees.map((e) => e._id);
|
|
@@ -177883,7 +177900,7 @@ var listOrganizations = (params) => Effect_exports.gen(function* () {
|
|
|
177883
177900
|
{},
|
|
177884
177901
|
{
|
|
177885
177902
|
limit,
|
|
177886
|
-
sort: { modifiedOn:
|
|
177903
|
+
sort: { modifiedOn: import_core30.SortingOrder.Descending }
|
|
177887
177904
|
}
|
|
177888
177905
|
);
|
|
177889
177906
|
return orgs.map((org) => ({
|
|
@@ -177896,7 +177913,7 @@ var listOrganizations = (params) => Effect_exports.gen(function* () {
|
|
|
177896
177913
|
});
|
|
177897
177914
|
var createOrganization = (params) => Effect_exports.gen(function* () {
|
|
177898
177915
|
const client = yield* HulyClient;
|
|
177899
|
-
const orgId = (0,
|
|
177916
|
+
const orgId = (0, import_core30.generateId)();
|
|
177900
177917
|
const orgData = {
|
|
177901
177918
|
name: params.name,
|
|
177902
177919
|
city: "",
|
|
@@ -178022,7 +178039,7 @@ var contactTools = [
|
|
|
178022
178039
|
];
|
|
178023
178040
|
|
|
178024
178041
|
// src/huly/operations/custom-fields.ts
|
|
178025
|
-
var
|
|
178042
|
+
var import_core31 = __toESM(require_lib4(), 1);
|
|
178026
178043
|
var DEFAULT_LIMIT2 = 200;
|
|
178027
178044
|
var classRef = core.class.Class;
|
|
178028
178045
|
var extractLabel = (label) => {
|
|
@@ -178057,7 +178074,7 @@ var decodeCustomFieldAttribute = (attr) => ({
|
|
|
178057
178074
|
});
|
|
178058
178075
|
var decodeClassInfo = (value3) => {
|
|
178059
178076
|
const record4 = decodeSdkRecord(value3);
|
|
178060
|
-
const kind = typeof record4.kind === "number" ? record4.kind :
|
|
178077
|
+
const kind = typeof record4.kind === "number" ? record4.kind : import_core31.ClassifierKind.CLASS;
|
|
178061
178078
|
return {
|
|
178062
178079
|
label: extractLabel(record4.label),
|
|
178063
178080
|
kind
|
|
@@ -178072,7 +178089,7 @@ var resolveClassInfo = (client, classId) => Effect_exports.gen(function* () {
|
|
|
178072
178089
|
classRef,
|
|
178073
178090
|
{ _id: toRef(classId) }
|
|
178074
178091
|
);
|
|
178075
|
-
return cls !== void 0 ? decodeClassInfo(cls) : { label: classId, kind:
|
|
178092
|
+
return cls !== void 0 ? decodeClassInfo(cls) : { label: classId, kind: import_core31.ClassifierKind.CLASS };
|
|
178076
178093
|
});
|
|
178077
178094
|
var batchResolveClassLabels = (client, classIds) => Effect_exports.gen(function* () {
|
|
178078
178095
|
if (classIds.length === 0) return /* @__PURE__ */ new Map();
|
|
@@ -178114,7 +178131,7 @@ var listCustomFields = (params) => Effect_exports.gen(function* () {
|
|
|
178114
178131
|
const customAttrs = yield* client.findAll(
|
|
178115
178132
|
core.class.Attribute,
|
|
178116
178133
|
query,
|
|
178117
|
-
{ limit, sort: { modifiedOn:
|
|
178134
|
+
{ limit, sort: { modifiedOn: import_core31.SortingOrder.Descending } }
|
|
178118
178135
|
);
|
|
178119
178136
|
const decodedAttrs = customAttrs.map(decodeCustomFieldAttribute);
|
|
178120
178137
|
const ownerLabels = yield* batchResolveClassLabels(
|
|
@@ -178178,7 +178195,7 @@ var setCustomField = (params) => Effect_exports.gen(function* () {
|
|
|
178178
178195
|
const parsedValue = parseValueForType(params.value, decodedAttr.typeDescriptor.typeName);
|
|
178179
178196
|
const decodedDoc = decodeCustomFieldDocument(doc);
|
|
178180
178197
|
const ownerInfo = yield* resolveClassInfo(client, decodedAttr.ownerClassId);
|
|
178181
|
-
if (ownerInfo.kind ===
|
|
178198
|
+
if (ownerInfo.kind === import_core31.ClassifierKind.MIXIN) {
|
|
178182
178199
|
const mixinRef = toRef(decodedAttr.ownerClassId);
|
|
178183
178200
|
yield* client.updateMixin(
|
|
178184
178201
|
objectRef,
|
|
@@ -178248,7 +178265,7 @@ var customFieldTools = [
|
|
|
178248
178265
|
];
|
|
178249
178266
|
|
|
178250
178267
|
// src/huly/operations/components.ts
|
|
178251
|
-
var
|
|
178268
|
+
var import_core32 = __toESM(require_lib4(), 1);
|
|
178252
178269
|
|
|
178253
178270
|
// src/utils/assertions.ts
|
|
178254
178271
|
var AssertionError = class extends Error {
|
|
@@ -178302,7 +178319,7 @@ var listComponents = (params) => Effect_exports.gen(function* () {
|
|
|
178302
178319
|
{ space: project3._id },
|
|
178303
178320
|
{
|
|
178304
178321
|
limit,
|
|
178305
|
-
sort: { modifiedOn:
|
|
178322
|
+
sort: { modifiedOn: import_core32.SortingOrder.Descending }
|
|
178306
178323
|
}
|
|
178307
178324
|
);
|
|
178308
178325
|
const leadIds = [
|
|
@@ -178342,7 +178359,7 @@ var getComponent = (params) => Effect_exports.gen(function* () {
|
|
|
178342
178359
|
});
|
|
178343
178360
|
var createComponent = (params) => Effect_exports.gen(function* () {
|
|
178344
178361
|
const { client, project: project3 } = yield* findProject(params.project);
|
|
178345
|
-
const componentId = (0,
|
|
178362
|
+
const componentId = (0, import_core32.generateId)();
|
|
178346
178363
|
const leadParam = params.lead;
|
|
178347
178364
|
const leadRef = leadParam !== void 0 ? yield* Effect_exports.gen(function* () {
|
|
178348
178365
|
const person = yield* findPersonByEmailOrName(client, leadParam);
|
|
@@ -178997,10 +179014,10 @@ var unlinkDocumentFromIssue = (params) => Effect_exports.gen(function* () {
|
|
|
178997
179014
|
});
|
|
178998
179015
|
|
|
178999
179016
|
// src/huly/operations/issue-templates.ts
|
|
179000
|
-
var
|
|
179017
|
+
var import_core36 = __toESM(require_lib4(), 1);
|
|
179001
179018
|
|
|
179002
179019
|
// src/huly/operations/issues-move.ts
|
|
179003
|
-
var
|
|
179020
|
+
var import_core33 = __toESM(require_lib4(), 1);
|
|
179004
179021
|
var import_tracker2 = __toESM(require_lib21(), 1);
|
|
179005
179022
|
var addLabel = (params) => Effect_exports.gen(function* () {
|
|
179006
179023
|
const { client, issue: issue2, project: project3 } = yield* findProjectAndIssue(params);
|
|
@@ -179027,7 +179044,7 @@ var addLabel = (params) => Effect_exports.gen(function* () {
|
|
|
179027
179044
|
}
|
|
179028
179045
|
);
|
|
179029
179046
|
if (tagElement === void 0) {
|
|
179030
|
-
const tagElementId = (0,
|
|
179047
|
+
const tagElementId = (0, import_core33.generateId)();
|
|
179031
179048
|
const tagElementData = {
|
|
179032
179049
|
title: labelTitle,
|
|
179033
179050
|
description: "",
|
|
@@ -179160,7 +179177,7 @@ var updateDescendantParents = (client, spaceId, parentIssue, parentNewParents) =
|
|
|
179160
179177
|
});
|
|
179161
179178
|
|
|
179162
179179
|
// src/huly/operations/issues-read.ts
|
|
179163
|
-
var
|
|
179180
|
+
var import_core34 = __toESM(require_lib4(), 1);
|
|
179164
179181
|
var import_tracker3 = __toESM(require_lib21(), 1);
|
|
179165
179182
|
var resolveStatusName = (statuses, statusId) => {
|
|
179166
179183
|
const statusDoc = statuses.find((s) => s._id === statusId);
|
|
@@ -179251,7 +179268,7 @@ var listIssues = (params) => Effect_exports.gen(function* () {
|
|
|
179251
179268
|
{
|
|
179252
179269
|
limit,
|
|
179253
179270
|
sort: {
|
|
179254
|
-
modifiedOn:
|
|
179271
|
+
modifiedOn: import_core34.SortingOrder.Descending
|
|
179255
179272
|
}
|
|
179256
179273
|
},
|
|
179257
179274
|
{ assignee: contact.class.Person }
|
|
@@ -179331,7 +179348,7 @@ var getIssue = (params) => Effect_exports.gen(function* () {
|
|
|
179331
179348
|
});
|
|
179332
179349
|
|
|
179333
179350
|
// src/huly/operations/issues-write.ts
|
|
179334
|
-
var
|
|
179351
|
+
var import_core35 = __toESM(require_lib4(), 1);
|
|
179335
179352
|
var import_rank3 = __toESM(require_lib32(), 1);
|
|
179336
179353
|
var import_tracker4 = __toESM(require_lib21(), 1);
|
|
179337
179354
|
var TxIncResult = Schema_exports.Struct({
|
|
@@ -179352,7 +179369,7 @@ var resolveAssignee = (client, assigneeIdentifier) => Effect_exports.gen(functio
|
|
|
179352
179369
|
});
|
|
179353
179370
|
var createIssue = (params) => Effect_exports.gen(function* () {
|
|
179354
179371
|
const { client, defaultStatusId, project: project3, statuses } = yield* findProjectWithStatuses(params.project);
|
|
179355
|
-
const issueId = (0,
|
|
179372
|
+
const issueId = (0, import_core35.generateId)();
|
|
179356
179373
|
const incOps = { $inc: { sequence: 1 } };
|
|
179357
179374
|
const incResult = yield* client.updateDoc(
|
|
179358
179375
|
tracker.class.Project,
|
|
@@ -179367,7 +179384,7 @@ var createIssue = (params) => Effect_exports.gen(function* () {
|
|
|
179367
179384
|
const lastIssue = yield* client.findOne(
|
|
179368
179385
|
tracker.class.Issue,
|
|
179369
179386
|
{ space: project3._id },
|
|
179370
|
-
{ sort: { rank:
|
|
179387
|
+
{ sort: { rank: import_core35.SortingOrder.Descending } }
|
|
179371
179388
|
);
|
|
179372
179389
|
const rank = (0, import_rank3.makeRank)(lastIssue?.rank, void 0);
|
|
179373
179390
|
const descriptionMarkupRef = params.description !== void 0 && params.description.trim() !== "" ? yield* client.uploadMarkup(
|
|
@@ -179571,7 +179588,7 @@ var buildTemplateChild = (client, projectId, projectIdentifier, input) => Effect
|
|
|
179571
179588
|
return component._id;
|
|
179572
179589
|
}) : null;
|
|
179573
179590
|
return {
|
|
179574
|
-
id: (0,
|
|
179591
|
+
id: (0, import_core36.generateId)(),
|
|
179575
179592
|
title: input.title,
|
|
179576
179593
|
description: optionalMarkdownToMarkup(input.description),
|
|
179577
179594
|
priority: stringToPriority(input.priority || "no-priority"),
|
|
@@ -179588,7 +179605,7 @@ var listIssueTemplates = (params) => Effect_exports.gen(function* () {
|
|
|
179588
179605
|
{ space: project3._id },
|
|
179589
179606
|
{
|
|
179590
179607
|
limit,
|
|
179591
|
-
sort: { modifiedOn:
|
|
179608
|
+
sort: { modifiedOn: import_core36.SortingOrder.Descending }
|
|
179592
179609
|
}
|
|
179593
179610
|
);
|
|
179594
179611
|
const summaries = templates.map((t) => {
|
|
@@ -179632,7 +179649,7 @@ var getIssueTemplate = (params) => Effect_exports.gen(function* () {
|
|
|
179632
179649
|
});
|
|
179633
179650
|
var createIssueTemplate = (params) => Effect_exports.gen(function* () {
|
|
179634
179651
|
const { client, project: project3 } = yield* findProject(params.project);
|
|
179635
|
-
const templateId = (0,
|
|
179652
|
+
const templateId = (0, import_core36.generateId)();
|
|
179636
179653
|
const assigneeParam = params.assignee;
|
|
179637
179654
|
const assigneeRef = assigneeParam !== void 0 ? yield* Effect_exports.gen(function* () {
|
|
179638
179655
|
const person = yield* findPersonByEmailOrName(client, assigneeParam);
|
|
@@ -179866,10 +179883,10 @@ var removeTemplateChild = (params) => Effect_exports.gen(function* () {
|
|
|
179866
179883
|
});
|
|
179867
179884
|
|
|
179868
179885
|
// src/huly/operations/labels.ts
|
|
179869
|
-
var
|
|
179886
|
+
var import_core38 = __toESM(require_lib4(), 1);
|
|
179870
179887
|
|
|
179871
179888
|
// src/huly/operations/tag-categories.ts
|
|
179872
|
-
var
|
|
179889
|
+
var import_core37 = __toESM(require_lib4(), 1);
|
|
179873
179890
|
var issueClassRef = toRef(tracker.class.Issue);
|
|
179874
179891
|
var findCategoryByIdOrLabel = (client, idOrLabel) => Effect_exports.gen(function* () {
|
|
179875
179892
|
const cat = (yield* client.findOne(
|
|
@@ -179907,7 +179924,7 @@ var listTagCategories = (params) => Effect_exports.gen(function* () {
|
|
|
179907
179924
|
query,
|
|
179908
179925
|
{
|
|
179909
179926
|
limit,
|
|
179910
|
-
sort: { modifiedOn:
|
|
179927
|
+
sort: { modifiedOn: import_core37.SortingOrder.Descending }
|
|
179911
179928
|
}
|
|
179912
179929
|
);
|
|
179913
179930
|
return categories.map(toSummary);
|
|
@@ -179922,7 +179939,7 @@ var createTagCategory = (params) => Effect_exports.gen(function* () {
|
|
|
179922
179939
|
if (existing !== void 0) {
|
|
179923
179940
|
return { id: TagCategoryId.make(existing._id), label: existing.label, created: false };
|
|
179924
179941
|
}
|
|
179925
|
-
const catId = (0,
|
|
179942
|
+
const catId = (0, import_core37.generateId)();
|
|
179926
179943
|
const catData = {
|
|
179927
179944
|
// Asset is a branded string type (Metadata<URL>) with no runtime constructor.
|
|
179928
179945
|
// Empty string is the "no icon" sentinel; Huly UI renders a default icon.
|
|
@@ -180024,7 +180041,7 @@ var listLabels = (params) => Effect_exports.gen(function* () {
|
|
|
180024
180041
|
query,
|
|
180025
180042
|
{
|
|
180026
180043
|
limit,
|
|
180027
|
-
sort: { modifiedOn:
|
|
180044
|
+
sort: { modifiedOn: import_core38.SortingOrder.Descending }
|
|
180028
180045
|
}
|
|
180029
180046
|
);
|
|
180030
180047
|
return elements.map((e) => ({
|
|
@@ -180049,7 +180066,7 @@ var createLabel = (params) => Effect_exports.gen(function* () {
|
|
|
180049
180066
|
return { id: TagElementId.make(existing._id), title: existing.title, created: false };
|
|
180050
180067
|
}
|
|
180051
180068
|
const categoryRef = yield* resolveCategoryRef(client, params.category);
|
|
180052
|
-
const tagId = (0,
|
|
180069
|
+
const tagId = (0, import_core38.generateId)();
|
|
180053
180070
|
const color = params.color ?? 0;
|
|
180054
180071
|
const tagData = {
|
|
180055
180072
|
title: params.title,
|
|
@@ -180479,7 +180496,7 @@ var labelTools = [
|
|
|
180479
180496
|
];
|
|
180480
180497
|
|
|
180481
180498
|
// src/huly/operations/milestones.ts
|
|
180482
|
-
var
|
|
180499
|
+
var import_core39 = __toESM(require_lib4(), 1);
|
|
180483
180500
|
var import_tracker5 = __toESM(require_lib21(), 1);
|
|
180484
180501
|
var milestoneStatusToStringMap = {
|
|
180485
180502
|
[import_tracker5.MilestoneStatus.Planned]: "planned",
|
|
@@ -180523,7 +180540,7 @@ var listMilestones = (params) => Effect_exports.gen(function* () {
|
|
|
180523
180540
|
{ space: project3._id },
|
|
180524
180541
|
{
|
|
180525
180542
|
limit,
|
|
180526
|
-
sort: { modifiedOn:
|
|
180543
|
+
sort: { modifiedOn: import_core39.SortingOrder.Descending }
|
|
180527
180544
|
}
|
|
180528
180545
|
);
|
|
180529
180546
|
const summaries = milestones.map((m) => ({
|
|
@@ -180551,7 +180568,7 @@ var getMilestone = (params) => Effect_exports.gen(function* () {
|
|
|
180551
180568
|
});
|
|
180552
180569
|
var createMilestone = (params) => Effect_exports.gen(function* () {
|
|
180553
180570
|
const { client, project: project3 } = yield* findProject(params.project);
|
|
180554
|
-
const milestoneId = (0,
|
|
180571
|
+
const milestoneId = (0, import_core39.generateId)();
|
|
180555
180572
|
const milestoneData = {
|
|
180556
180573
|
label: params.label,
|
|
180557
180574
|
description: optionalMarkdownToMarkup(params.description),
|
|
@@ -180704,7 +180721,7 @@ var milestoneTools = [
|
|
|
180704
180721
|
];
|
|
180705
180722
|
|
|
180706
180723
|
// src/huly/operations/notifications.ts
|
|
180707
|
-
var
|
|
180724
|
+
var import_core40 = __toESM(require_lib4(), 1);
|
|
180708
180725
|
var toDocNotifyContextSummary = (ctx) => ({
|
|
180709
180726
|
id: NotificationContextId.make(ctx._id),
|
|
180710
180727
|
objectId: ctx.objectId,
|
|
@@ -180750,7 +180767,7 @@ var listNotifications = (params) => Effect_exports.gen(function* () {
|
|
|
180750
180767
|
{
|
|
180751
180768
|
limit,
|
|
180752
180769
|
sort: {
|
|
180753
|
-
modifiedOn:
|
|
180770
|
+
modifiedOn: import_core40.SortingOrder.Descending
|
|
180754
180771
|
}
|
|
180755
180772
|
}
|
|
180756
180773
|
);
|
|
@@ -180892,7 +180909,7 @@ var listNotificationContexts = (params) => Effect_exports.gen(function* () {
|
|
|
180892
180909
|
{
|
|
180893
180910
|
limit,
|
|
180894
180911
|
sort: {
|
|
180895
|
-
lastUpdateTimestamp:
|
|
180912
|
+
lastUpdateTimestamp: import_core40.SortingOrder.Descending
|
|
180896
180913
|
}
|
|
180897
180914
|
}
|
|
180898
180915
|
);
|
|
@@ -181109,7 +181126,7 @@ var notificationTools = [
|
|
|
181109
181126
|
];
|
|
181110
181127
|
|
|
181111
181128
|
// src/huly/operations/projects.ts
|
|
181112
|
-
var
|
|
181129
|
+
var import_core41 = __toESM(require_lib4(), 1);
|
|
181113
181130
|
var import_tracker6 = __toESM(require_lib21(), 1);
|
|
181114
181131
|
var listProjects = (params) => Effect_exports.gen(function* () {
|
|
181115
181132
|
const client = yield* HulyClient;
|
|
@@ -181124,7 +181141,7 @@ var listProjects = (params) => Effect_exports.gen(function* () {
|
|
|
181124
181141
|
{
|
|
181125
181142
|
limit,
|
|
181126
181143
|
sort: {
|
|
181127
|
-
name:
|
|
181144
|
+
name: import_core41.SortingOrder.Ascending
|
|
181128
181145
|
}
|
|
181129
181146
|
}
|
|
181130
181147
|
);
|
|
@@ -181193,7 +181210,7 @@ var createProject = (params) => Effect_exports.gen(function* () {
|
|
|
181193
181210
|
created: false
|
|
181194
181211
|
};
|
|
181195
181212
|
}
|
|
181196
|
-
const projectId = (0,
|
|
181213
|
+
const projectId = (0, import_core41.generateId)();
|
|
181197
181214
|
const projectData = {
|
|
181198
181215
|
name: params.name,
|
|
181199
181216
|
description: params.description ?? "",
|
|
@@ -181451,7 +181468,7 @@ var tagCategoryTools = [
|
|
|
181451
181468
|
];
|
|
181452
181469
|
|
|
181453
181470
|
// src/huly/operations/test-management-core.ts
|
|
181454
|
-
var
|
|
181471
|
+
var import_core42 = __toESM(require_lib4(), 1);
|
|
181455
181472
|
|
|
181456
181473
|
// src/huly/test-management-classes.ts
|
|
181457
181474
|
var testManagement = {
|
|
@@ -181605,7 +181622,7 @@ var listTestProjects = (params) => Effect_exports.gen(function* () {
|
|
|
181605
181622
|
{},
|
|
181606
181623
|
{
|
|
181607
181624
|
limit,
|
|
181608
|
-
sort: { name:
|
|
181625
|
+
sort: { name: import_core42.SortingOrder.Ascending }
|
|
181609
181626
|
}
|
|
181610
181627
|
);
|
|
181611
181628
|
return {
|
|
@@ -181627,7 +181644,7 @@ var listTestSuites = (params) => Effect_exports.gen(function* () {
|
|
|
181627
181644
|
query,
|
|
181628
181645
|
{
|
|
181629
181646
|
limit,
|
|
181630
|
-
sort: { modifiedOn:
|
|
181647
|
+
sort: { modifiedOn: import_core42.SortingOrder.Descending }
|
|
181631
181648
|
}
|
|
181632
181649
|
);
|
|
181633
181650
|
return {
|
|
@@ -181660,7 +181677,7 @@ var createTestSuite = (params) => Effect_exports.gen(function* () {
|
|
|
181660
181677
|
if (existing !== void 0) {
|
|
181661
181678
|
return { id: TestSuiteId.make(existing._id), name: existing.name, created: false };
|
|
181662
181679
|
}
|
|
181663
|
-
const suiteId = (0,
|
|
181680
|
+
const suiteId = (0, import_core42.generateId)();
|
|
181664
181681
|
const suiteData = {
|
|
181665
181682
|
name: params.name,
|
|
181666
181683
|
description: params.description ?? "",
|
|
@@ -181730,7 +181747,7 @@ var listTestCases = (params) => Effect_exports.gen(function* () {
|
|
|
181730
181747
|
query,
|
|
181731
181748
|
{
|
|
181732
181749
|
limit,
|
|
181733
|
-
sort: { modifiedOn:
|
|
181750
|
+
sort: { modifiedOn: import_core42.SortingOrder.Descending }
|
|
181734
181751
|
}
|
|
181735
181752
|
);
|
|
181736
181753
|
return {
|
|
@@ -181758,7 +181775,7 @@ var createTestCase = (params) => Effect_exports.gen(function* () {
|
|
|
181758
181775
|
const client = yield* HulyClient;
|
|
181759
181776
|
const project3 = yield* findTestProject(client, params.project);
|
|
181760
181777
|
const suite = yield* findTestSuite(client, project3, params.suite);
|
|
181761
|
-
const caseId = (0,
|
|
181778
|
+
const caseId = (0, import_core42.generateId)();
|
|
181762
181779
|
const assigneeRef = params.assignee !== void 0 ? toRef((yield* resolveAssignee2(params.assignee))._id) : null;
|
|
181763
181780
|
const typeEnum = params.type !== void 0 ? stringToTestCaseType(params.type) ?? 0 /* Functional */ : 0 /* Functional */;
|
|
181764
181781
|
const priorityEnum = params.priority !== void 0 ? stringToTestCasePriority(params.priority) ?? 1 /* Medium */ : 1 /* Medium */;
|
|
@@ -181988,7 +182005,7 @@ var testManagementCoreTools = [
|
|
|
181988
182005
|
];
|
|
181989
182006
|
|
|
181990
182007
|
// src/huly/operations/test-management-plans.ts
|
|
181991
|
-
var
|
|
182008
|
+
var import_core43 = __toESM(require_lib4(), 1);
|
|
181992
182009
|
var toPlanSummary = (p) => ({
|
|
181993
182010
|
id: TestPlanId.make(p._id),
|
|
181994
182011
|
name: p.name
|
|
@@ -182006,7 +182023,7 @@ var listTestPlans = (params) => Effect_exports.gen(function* () {
|
|
|
182006
182023
|
const plans = yield* client.findAll(
|
|
182007
182024
|
testManagement.class.TestPlan,
|
|
182008
182025
|
{ space: project3._id },
|
|
182009
|
-
{ limit, sort: { modifiedOn:
|
|
182026
|
+
{ limit, sort: { modifiedOn: import_core43.SortingOrder.Descending } }
|
|
182010
182027
|
);
|
|
182011
182028
|
return { plans: plans.map(toPlanSummary), total: plans.total };
|
|
182012
182029
|
});
|
|
@@ -182041,7 +182058,7 @@ var createTestPlan = (params) => Effect_exports.gen(function* () {
|
|
|
182041
182058
|
if (existing !== void 0) {
|
|
182042
182059
|
return { id: TestPlanId.make(existing._id), name: existing.name, created: false };
|
|
182043
182060
|
}
|
|
182044
|
-
const planId = (0,
|
|
182061
|
+
const planId = (0, import_core43.generateId)();
|
|
182045
182062
|
const descRef = params.description !== void 0 && params.description.trim() !== "" ? yield* client.uploadMarkup(
|
|
182046
182063
|
testManagement.class.TestPlan,
|
|
182047
182064
|
planId,
|
|
@@ -182123,7 +182140,7 @@ var removeTestPlanItem = (params) => Effect_exports.gen(function* () {
|
|
|
182123
182140
|
});
|
|
182124
182141
|
|
|
182125
182142
|
// src/huly/operations/test-management-runs.ts
|
|
182126
|
-
var
|
|
182143
|
+
var import_core44 = __toESM(require_lib4(), 1);
|
|
182127
182144
|
var BATCH_CONCURRENCY = 10;
|
|
182128
182145
|
var toRunSummary = (r) => ({
|
|
182129
182146
|
id: TestRunId.make(r._id),
|
|
@@ -182144,7 +182161,7 @@ var listTestRuns = (params) => Effect_exports.gen(function* () {
|
|
|
182144
182161
|
const runs = yield* client.findAll(
|
|
182145
182162
|
testManagement.class.TestRun,
|
|
182146
182163
|
{ space: project3._id },
|
|
182147
|
-
{ limit, sort: { modifiedOn:
|
|
182164
|
+
{ limit, sort: { modifiedOn: import_core44.SortingOrder.Descending } }
|
|
182148
182165
|
);
|
|
182149
182166
|
return { runs: runs.map(toRunSummary), total: runs.total };
|
|
182150
182167
|
});
|
|
@@ -182173,7 +182190,7 @@ var getTestRun = (params) => Effect_exports.gen(function* () {
|
|
|
182173
182190
|
var createTestRun = (params) => Effect_exports.gen(function* () {
|
|
182174
182191
|
const client = yield* HulyClient;
|
|
182175
182192
|
const project3 = yield* findTestProject(client, params.project);
|
|
182176
|
-
const runId = (0,
|
|
182193
|
+
const runId = (0, import_core44.generateId)();
|
|
182177
182194
|
const descRef = params.description !== void 0 && params.description.trim() !== "" ? yield* client.uploadMarkup(
|
|
182178
182195
|
testManagement.class.TestRun,
|
|
182179
182196
|
runId,
|
|
@@ -182230,7 +182247,7 @@ var listTestResults = (params) => Effect_exports.gen(function* () {
|
|
|
182230
182247
|
const results = yield* client.findAll(
|
|
182231
182248
|
testManagement.class.TestResult,
|
|
182232
182249
|
{ attachedTo: run3._id },
|
|
182233
|
-
{ limit, sort: { modifiedOn:
|
|
182250
|
+
{ limit, sort: { modifiedOn: import_core44.SortingOrder.Descending } }
|
|
182234
182251
|
);
|
|
182235
182252
|
return { results: results.map(toResultSummary), total: results.total };
|
|
182236
182253
|
});
|
|
@@ -182331,7 +182348,7 @@ var runTestPlan = (params) => Effect_exports.gen(function* () {
|
|
|
182331
182348
|
}
|
|
182332
182349
|
return { item, tc };
|
|
182333
182350
|
}), { concurrency: BATCH_CONCURRENCY });
|
|
182334
|
-
const runId = (0,
|
|
182351
|
+
const runId = (0, import_core44.generateId)();
|
|
182335
182352
|
const runName = params.runName ?? `${plan.name} - Run`;
|
|
182336
182353
|
yield* client.createDoc(testManagement.class.TestRun, project3._id, {
|
|
182337
182354
|
name: runName,
|
|
@@ -182505,7 +182522,7 @@ var testManagementPlansTools = [
|
|
|
182505
182522
|
|
|
182506
182523
|
// src/huly/operations/time.ts
|
|
182507
182524
|
var import_calendar6 = __toESM(require_lib24(), 1);
|
|
182508
|
-
var
|
|
182525
|
+
var import_core45 = __toESM(require_lib4(), 1);
|
|
182509
182526
|
var import_tracker7 = __toESM(require_lib21(), 1);
|
|
182510
182527
|
var serverPopulatedCalendar = toRef("");
|
|
182511
182528
|
var serverPopulatedPersonId = "";
|
|
@@ -182515,7 +182532,7 @@ var logTime = (params) => Effect_exports.gen(function* () {
|
|
|
182515
182532
|
project: params.project,
|
|
182516
182533
|
identifier: params.identifier
|
|
182517
182534
|
});
|
|
182518
|
-
const reportId = (0,
|
|
182535
|
+
const reportId = (0, import_core45.generateId)();
|
|
182519
182536
|
const now2 = yield* Clock_exports.currentTimeMillis;
|
|
182520
182537
|
const reportData = {
|
|
182521
182538
|
employee: null,
|
|
@@ -182555,7 +182572,7 @@ var getTimeReport = (params) => Effect_exports.gen(function* () {
|
|
|
182555
182572
|
const reports = yield* client.findAll(
|
|
182556
182573
|
tracker.class.TimeSpendReport,
|
|
182557
182574
|
{ attachedTo: issue2._id },
|
|
182558
|
-
{ sort: { date:
|
|
182575
|
+
{ sort: { date: import_core45.SortingOrder.Descending } }
|
|
182559
182576
|
);
|
|
182560
182577
|
const employeeIds = [
|
|
182561
182578
|
...new Set(
|
|
@@ -182607,7 +182624,7 @@ var listTimeSpendReports = (params) => Effect_exports.gen(function* () {
|
|
|
182607
182624
|
tracker.class.TimeSpendReport,
|
|
182608
182625
|
query,
|
|
182609
182626
|
withLookup(
|
|
182610
|
-
{ limit, sort: { date:
|
|
182627
|
+
{ limit, sort: { date: import_core45.SortingOrder.Descending } },
|
|
182611
182628
|
{
|
|
182612
182629
|
attachedTo: tracker.class.Issue,
|
|
182613
182630
|
employee: contact.class.Person
|
|
@@ -182636,7 +182653,7 @@ var getDetailedTimeReport = (params) => Effect_exports.gen(function* () {
|
|
|
182636
182653
|
tracker.class.TimeSpendReport,
|
|
182637
182654
|
query,
|
|
182638
182655
|
withLookup(
|
|
182639
|
-
{ sort: { date:
|
|
182656
|
+
{ sort: { date: import_core45.SortingOrder.Descending } },
|
|
182640
182657
|
{
|
|
182641
182658
|
attachedTo: tracker.class.Issue,
|
|
182642
182659
|
employee: contact.class.Person
|
|
@@ -182714,7 +182731,7 @@ var listWorkSlots = (params) => Effect_exports.gen(function* () {
|
|
|
182714
182731
|
const slots = yield* client.findAll(
|
|
182715
182732
|
time.class.WorkSlot,
|
|
182716
182733
|
query,
|
|
182717
|
-
{ limit, sort: { date:
|
|
182734
|
+
{ limit, sort: { date: import_core45.SortingOrder.Descending } }
|
|
182718
182735
|
);
|
|
182719
182736
|
return slots.map((s) => ({
|
|
182720
182737
|
id: WorkSlotId.make(s._id),
|
|
@@ -182726,7 +182743,7 @@ var listWorkSlots = (params) => Effect_exports.gen(function* () {
|
|
|
182726
182743
|
});
|
|
182727
182744
|
var createWorkSlot = (params) => Effect_exports.gen(function* () {
|
|
182728
182745
|
const client = yield* HulyClient;
|
|
182729
|
-
const slotId = (0,
|
|
182746
|
+
const slotId = (0, import_core45.generateId)();
|
|
182730
182747
|
const slotData = {
|
|
182731
182748
|
date: params.date,
|
|
182732
182749
|
dueDate: params.dueDate,
|
|
@@ -182878,15 +182895,15 @@ var timeTools = [
|
|
|
182878
182895
|
];
|
|
182879
182896
|
|
|
182880
182897
|
// src/huly/operations/workspace.ts
|
|
182881
|
-
var
|
|
182898
|
+
var import_core46 = __toESM(require_lib4(), 1);
|
|
182882
182899
|
var accountRoleMap = {
|
|
182883
|
-
READONLYGUEST:
|
|
182884
|
-
DocGuest:
|
|
182885
|
-
GUEST:
|
|
182886
|
-
USER:
|
|
182887
|
-
MAINTAINER:
|
|
182888
|
-
OWNER:
|
|
182889
|
-
ADMIN:
|
|
182900
|
+
READONLYGUEST: import_core46.AccountRole.ReadOnlyGuest,
|
|
182901
|
+
DocGuest: import_core46.AccountRole.DocGuest,
|
|
182902
|
+
GUEST: import_core46.AccountRole.Guest,
|
|
182903
|
+
USER: import_core46.AccountRole.User,
|
|
182904
|
+
MAINTAINER: import_core46.AccountRole.Maintainer,
|
|
182905
|
+
OWNER: import_core46.AccountRole.Owner,
|
|
182906
|
+
ADMIN: import_core46.AccountRole.Admin
|
|
182890
182907
|
};
|
|
182891
182908
|
var toHulyAccountRole = (role) => accountRoleMap[role];
|
|
182892
182909
|
var formatVersion = (info) => `${info.versionMajor}.${info.versionMinor}.${info.versionPatch}`;
|