@firfi/huly-mcp 0.10.2 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/index.cjs +197 -38
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -371,6 +371,7 @@ MCP_TRANSPORT=http MCP_HTTP_PORT=8080 MCP_HTTP_HOST=0.0.0.0 npx -y @firfi/huly-m
|
|
|
371
371
|
| `get_user_profile` | Get the current user's profile information including bio, location, and social links. |
|
|
372
372
|
| `update_user_profile` | Update the current user's profile. Supports bio, city, country, website, social links, and public visibility. |
|
|
373
373
|
| `update_guest_settings` | Update workspace guest settings. Control read-only guest access and guest sign-up permissions. |
|
|
374
|
+
| `create_access_link` | Create a Huly workspace access link. Defaults to role GUEST. Supports anonymous reusable guest links by setting personalized=false with notBefore and expiration, and can restrict access to specific Huly space IDs via spaces. |
|
|
374
375
|
| `get_regions` | Get available regions for workspace creation. Returns region codes and display names. |
|
|
375
376
|
|
|
376
377
|
### Cards
|
package/dist/index.cjs
CHANGED
|
@@ -151493,6 +151493,31 @@ var HulySdk = class _HulySdk extends Context_exports.Tag("@hulymcp/HulySdk")() {
|
|
|
151493
151493
|
});
|
|
151494
151494
|
};
|
|
151495
151495
|
|
|
151496
|
+
// src/huly/url-builders.ts
|
|
151497
|
+
var testWorkbenchUrlConfig = {
|
|
151498
|
+
baseUrl: UrlString.make("https://test.huly.local"),
|
|
151499
|
+
workspaceUrlSlug: WorkspaceUrlSlug.make("test-workspace")
|
|
151500
|
+
};
|
|
151501
|
+
var slugifyTitle = (title) => {
|
|
151502
|
+
const lowered = title.toLowerCase();
|
|
151503
|
+
const stripped = lowered.replace(/[^a-z0-9.\-\s]/g, "");
|
|
151504
|
+
const hyphenated = stripped.replace(/\s+/g, "-");
|
|
151505
|
+
const collapsed = hyphenated.replace(/-+/g, "-");
|
|
151506
|
+
return collapsed.replace(/^-+|-+$/g, "");
|
|
151507
|
+
};
|
|
151508
|
+
var buildDocumentUrl = (baseUrl, workspaceUrlSlug, title, id) => {
|
|
151509
|
+
const trimmedBase = baseUrl.replace(/\/+$/, "");
|
|
151510
|
+
const slug = slugifyTitle(title);
|
|
151511
|
+
const pathSegment = slug === "" ? id : `${slug}-${id}`;
|
|
151512
|
+
return UrlString.make(`${trimmedBase}/workbench/${workspaceUrlSlug}/document/${pathSegment}`);
|
|
151513
|
+
};
|
|
151514
|
+
var buildDocumentUrlFromConfig = (config3, title, id) => buildDocumentUrl(config3.baseUrl, config3.workspaceUrlSlug, title, id);
|
|
151515
|
+
var buildContactUrl = (baseUrl, workspaceUrlSlug, id) => {
|
|
151516
|
+
const trimmedBase = baseUrl.replace(/\/+$/, "");
|
|
151517
|
+
return UrlString.make(`${trimmedBase}/workbench/${workspaceUrlSlug}/contact/${id}`);
|
|
151518
|
+
};
|
|
151519
|
+
var buildContactUrlFromConfig = (config3, id) => buildContactUrl(config3.baseUrl, config3.workspaceUrlSlug, id);
|
|
151520
|
+
|
|
151496
151521
|
// src/huly/client.ts
|
|
151497
151522
|
var AUTH_STATUS_CODES = /* @__PURE__ */ new Set([
|
|
151498
151523
|
"platform:status:Unauthorized",
|
|
@@ -151581,7 +151606,7 @@ var HulyClient = class _HulyClient extends Context_exports.Tag("@hulymcp/HulyCli
|
|
|
151581
151606
|
refUrl: UrlString.make(refUrl),
|
|
151582
151607
|
imageUrl: UrlString.make(imageUrl)
|
|
151583
151608
|
};
|
|
151584
|
-
const
|
|
151609
|
+
const workbenchUrlConfig = {
|
|
151585
151610
|
baseUrl: UrlString.make(config3.url),
|
|
151586
151611
|
workspaceUrlSlug
|
|
151587
151612
|
};
|
|
@@ -151595,7 +151620,7 @@ var HulyClient = class _HulyClient extends Context_exports.Tag("@hulymcp/HulyCli
|
|
|
151595
151620
|
const operations = {
|
|
151596
151621
|
getAccountUuid: () => accountUuid,
|
|
151597
151622
|
getPrimarySocialId: () => primarySocialId,
|
|
151598
|
-
|
|
151623
|
+
workbenchUrlConfig,
|
|
151599
151624
|
markupUrlConfig,
|
|
151600
151625
|
findAll: (_class, query, options) => withClient(
|
|
151601
151626
|
(client2) => client2.findAll(_class, query, options),
|
|
@@ -151679,11 +151704,8 @@ var HulyClient = class _HulyClient extends Context_exports.Tag("@hulymcp/HulyCli
|
|
|
151679
151704
|
// PersonId is a branded string type with no public constructor
|
|
151680
151705
|
// eslint-disable-next-line no-restricted-syntax -- see above
|
|
151681
151706
|
getPrimarySocialId: () => "test-primary-social-id",
|
|
151682
|
-
documentUrlConfig: {
|
|
151683
|
-
baseUrl: UrlString.make("https://test.huly.local"),
|
|
151684
|
-
workspaceUrlSlug: WorkspaceUrlSlug.make("test-workspace")
|
|
151685
|
-
},
|
|
151686
151707
|
markupUrlConfig: testMarkupUrlConfig,
|
|
151708
|
+
workbenchUrlConfig: testWorkbenchUrlConfig,
|
|
151687
151709
|
findAll: noopFindAll,
|
|
151688
151710
|
findOne: noopFindOne,
|
|
151689
151711
|
createDoc: notImplemented("createDoc"),
|
|
@@ -152010,6 +152032,19 @@ var WorkspaceClient = class _WorkspaceClient extends Context_exports.Tag("@hulym
|
|
|
152010
152032
|
cause: e
|
|
152011
152033
|
})
|
|
152012
152034
|
});
|
|
152035
|
+
const toAccountClientAccessLinkOptions = (options) => {
|
|
152036
|
+
if (options === void 0) return void 0;
|
|
152037
|
+
const result = {
|
|
152038
|
+
...options.firstName !== void 0 ? { firstName: options.firstName } : {},
|
|
152039
|
+
...options.lastName !== void 0 ? { lastName: options.lastName } : {},
|
|
152040
|
+
...options.navigateUrl !== void 0 ? { navigateUrl: options.navigateUrl } : {},
|
|
152041
|
+
...options.spaces !== void 0 ? { spaces: [...options.spaces] } : {},
|
|
152042
|
+
...options.notBefore !== void 0 ? { notBefore: options.notBefore } : {},
|
|
152043
|
+
...options.expiration !== void 0 ? { expiration: options.expiration } : {},
|
|
152044
|
+
...options.personalized !== void 0 ? { personalized: options.personalized } : {}
|
|
152045
|
+
};
|
|
152046
|
+
return result;
|
|
152047
|
+
};
|
|
152013
152048
|
const operations = {
|
|
152014
152049
|
getWorkspaceMembers: () => withClient((c) => c.getWorkspaceMembers(), "Failed to get workspace members"),
|
|
152015
152050
|
getPersonInfo: (account) => withClient((c) => c.getPersonInfo(account), "Failed to get person info"),
|
|
@@ -152020,6 +152055,10 @@ var WorkspaceClient = class _WorkspaceClient extends Context_exports.Tag("@hulym
|
|
|
152020
152055
|
deleteWorkspace: () => withClient((c) => c.deleteWorkspace(), "Failed to delete workspace"),
|
|
152021
152056
|
getUserProfile: (personUuid) => withClient((c) => c.getUserProfile(personUuid), "Failed to get user profile"),
|
|
152022
152057
|
setMyProfile: (profile) => withClient((c) => c.setMyProfile(profile), "Failed to set my profile"),
|
|
152058
|
+
createAccessLink: (role, options) => withClient(
|
|
152059
|
+
(c) => c.createAccessLink(role, toAccountClientAccessLinkOptions(options)),
|
|
152060
|
+
"Failed to create access link"
|
|
152061
|
+
),
|
|
152023
152062
|
updateAllowReadOnlyGuests: (readOnlyGuestsAllowed) => withClient(
|
|
152024
152063
|
(c) => c.updateAllowReadOnlyGuests(readOnlyGuestsAllowed),
|
|
152025
152064
|
"Failed to update read-only guest setting"
|
|
@@ -152043,6 +152082,7 @@ var WorkspaceClient = class _WorkspaceClient extends Context_exports.Tag("@hulym
|
|
|
152043
152082
|
deleteWorkspace: notImplemented("deleteWorkspace"),
|
|
152044
152083
|
getUserProfile: () => Effect_exports.succeed(null),
|
|
152045
152084
|
setMyProfile: notImplemented("setMyProfile"),
|
|
152085
|
+
createAccessLink: notImplemented("createAccessLink"),
|
|
152046
152086
|
updateAllowReadOnlyGuests: notImplemented("updateAllowReadOnlyGuests"),
|
|
152047
152087
|
updateAllowGuestSignUp: notImplemented("updateAllowGuestSignUp"),
|
|
152048
152088
|
getRegionInfo: () => Effect_exports.succeed([])
|
|
@@ -171326,7 +171366,7 @@ var PostHog = class extends PostHogBackendClient {
|
|
|
171326
171366
|
};
|
|
171327
171367
|
|
|
171328
171368
|
// src/version.ts
|
|
171329
|
-
var VERSION = true ? "0.
|
|
171369
|
+
var VERSION = true ? "0.11.0" : "0.0.0-dev";
|
|
171330
171370
|
|
|
171331
171371
|
// src/telemetry/posthog.ts
|
|
171332
171372
|
var POSTHOG_API_KEY = "phc_TGfFqCGdnF0p68wuFzd5WSw1IsBvOJW0YgoMJDyZPjm";
|
|
@@ -172303,22 +172343,6 @@ var import_core23 = __toESM(require_lib4(), 1);
|
|
|
172303
172343
|
var import_core22 = __toESM(require_lib4(), 1);
|
|
172304
172344
|
var import_rank = __toESM(require_lib33(), 1);
|
|
172305
172345
|
|
|
172306
|
-
// src/huly/url-builders.ts
|
|
172307
|
-
var slugifyTitle = (title) => {
|
|
172308
|
-
const lowered = title.toLowerCase();
|
|
172309
|
-
const stripped = lowered.replace(/[^a-z0-9.\-\s]/g, "");
|
|
172310
|
-
const hyphenated = stripped.replace(/\s+/g, "-");
|
|
172311
|
-
const collapsed = hyphenated.replace(/-+/g, "-");
|
|
172312
|
-
return collapsed.replace(/^-+|-+$/g, "");
|
|
172313
|
-
};
|
|
172314
|
-
var buildDocumentUrl = (baseUrl, workspaceUrlSlug, title, id) => {
|
|
172315
|
-
const trimmedBase = baseUrl.replace(/\/+$/, "");
|
|
172316
|
-
const slug = slugifyTitle(title);
|
|
172317
|
-
const pathSegment = slug === "" ? id : `${slug}-${id}`;
|
|
172318
|
-
return UrlString.make(`${trimmedBase}/workbench/${workspaceUrlSlug}/document/${pathSegment}`);
|
|
172319
|
-
};
|
|
172320
|
-
var buildDocumentUrlFromConfig = (config3, title, id) => buildDocumentUrl(config3.baseUrl, config3.workspaceUrlSlug, title, id);
|
|
172321
|
-
|
|
172322
172346
|
// src/huly/operations/documents-edit.ts
|
|
172323
172347
|
var editDocument = (params) => Effect_exports.gen(function* () {
|
|
172324
172348
|
const { client, doc, teamspace } = yield* findTeamspaceAndDocument(params);
|
|
@@ -172383,7 +172407,7 @@ var editDocument = (params) => Effect_exports.gen(function* () {
|
|
|
172383
172407
|
contentUpdatedInPlace = true;
|
|
172384
172408
|
}
|
|
172385
172409
|
const finalTitle = updateOps.title ?? doc.title;
|
|
172386
|
-
const url4 = buildDocumentUrlFromConfig(client.
|
|
172410
|
+
const url4 = buildDocumentUrlFromConfig(client.workbenchUrlConfig, finalTitle, DocumentId.make(doc._id));
|
|
172387
172411
|
if (Object.keys(updateOps).length === 0 && !contentUpdatedInPlace) {
|
|
172388
172412
|
return { id: DocumentId.make(doc._id), updated: false, url: url4 };
|
|
172389
172413
|
}
|
|
@@ -172980,7 +173004,7 @@ var listDocuments = (params) => Effect_exports.gen(function* () {
|
|
|
172980
173004
|
id: DocumentId.make(doc._id),
|
|
172981
173005
|
title: doc.title,
|
|
172982
173006
|
teamspace: teamspace.name,
|
|
172983
|
-
url: buildDocumentUrlFromConfig(client.
|
|
173007
|
+
url: buildDocumentUrlFromConfig(client.workbenchUrlConfig, doc.title, DocumentId.make(doc._id)),
|
|
172984
173008
|
modifiedOn: doc.modifiedOn
|
|
172985
173009
|
}));
|
|
172986
173010
|
return {
|
|
@@ -173005,7 +173029,7 @@ var getDocument = (params) => Effect_exports.gen(function* () {
|
|
|
173005
173029
|
title: doc.title,
|
|
173006
173030
|
content,
|
|
173007
173031
|
teamspace: teamspace.name,
|
|
173008
|
-
url: buildDocumentUrlFromConfig(client.
|
|
173032
|
+
url: buildDocumentUrlFromConfig(client.workbenchUrlConfig, doc.title, DocumentId.make(doc._id)),
|
|
173009
173033
|
modifiedOn: doc.modifiedOn,
|
|
173010
173034
|
createdOn: doc.createdOn
|
|
173011
173035
|
};
|
|
@@ -173058,7 +173082,7 @@ var createDocument = (params) => Effect_exports.gen(function* () {
|
|
|
173058
173082
|
return {
|
|
173059
173083
|
id: DocumentId.make(documentId),
|
|
173060
173084
|
title: params.title,
|
|
173061
|
-
url: buildDocumentUrlFromConfig(client.
|
|
173085
|
+
url: buildDocumentUrlFromConfig(client.workbenchUrlConfig, params.title, DocumentId.make(documentId))
|
|
173062
173086
|
};
|
|
173063
173087
|
});
|
|
173064
173088
|
var deleteDocument = (params) => Effect_exports.gen(function* () {
|
|
@@ -177238,6 +177262,87 @@ var UpdateGuestSettingsParamsSchema = Schema_exports.Struct({
|
|
|
177238
177262
|
title: "UpdateGuestSettingsParams",
|
|
177239
177263
|
description: "Parameters for updating guest settings"
|
|
177240
177264
|
});
|
|
177265
|
+
var MAX_UNIX_SECONDS_TIMESTAMP = 9999999999;
|
|
177266
|
+
var UnixSecondsTimestamp = Schema_exports.Number.pipe(
|
|
177267
|
+
Schema_exports.int(),
|
|
177268
|
+
Schema_exports.nonNegative(),
|
|
177269
|
+
Schema_exports.lessThanOrEqualTo(MAX_UNIX_SECONDS_TIMESTAMP)
|
|
177270
|
+
).annotations({
|
|
177271
|
+
identifier: "UnixSecondsTimestamp",
|
|
177272
|
+
title: "UnixSecondsTimestamp",
|
|
177273
|
+
description: "Unix timestamp in seconds (non-negative integer)"
|
|
177274
|
+
});
|
|
177275
|
+
var AccessLinkCommonParamsSchema = Schema_exports.Struct({
|
|
177276
|
+
role: Schema_exports.optional(
|
|
177277
|
+
AccountRoleSchema.annotations({
|
|
177278
|
+
description: "Workspace role granted by the link. Defaults to GUEST."
|
|
177279
|
+
})
|
|
177280
|
+
),
|
|
177281
|
+
firstName: Schema_exports.optional(
|
|
177282
|
+
NonEmptyString2.annotations({
|
|
177283
|
+
description: "Optional first name for personalized links."
|
|
177284
|
+
})
|
|
177285
|
+
),
|
|
177286
|
+
lastName: Schema_exports.optional(
|
|
177287
|
+
NonEmptyString2.annotations({
|
|
177288
|
+
description: "Optional last name for personalized links."
|
|
177289
|
+
})
|
|
177290
|
+
),
|
|
177291
|
+
navigateUrl: Schema_exports.optional(
|
|
177292
|
+
Schema_exports.String.annotations({
|
|
177293
|
+
description: "Optional URL/path Huly should open after the link is used."
|
|
177294
|
+
})
|
|
177295
|
+
),
|
|
177296
|
+
spaces: Schema_exports.optional(
|
|
177297
|
+
Schema_exports.Array(SpaceId).annotations({
|
|
177298
|
+
description: "Optional Huly space IDs this link should grant access to. Use list_teamspaces, list_card_spaces, or other list tools to discover space IDs."
|
|
177299
|
+
})
|
|
177300
|
+
)
|
|
177301
|
+
});
|
|
177302
|
+
var PersonalizedAccessLinkParamsSchema = Schema_exports.Struct({
|
|
177303
|
+
...AccessLinkCommonParamsSchema.fields,
|
|
177304
|
+
notBefore: Schema_exports.optional(
|
|
177305
|
+
UnixSecondsTimestamp.annotations({
|
|
177306
|
+
description: "Unix timestamp in seconds before which the link is invalid."
|
|
177307
|
+
})
|
|
177308
|
+
),
|
|
177309
|
+
expiration: Schema_exports.optional(
|
|
177310
|
+
UnixSecondsTimestamp.annotations({
|
|
177311
|
+
description: "Unix timestamp in seconds after which the link expires."
|
|
177312
|
+
})
|
|
177313
|
+
),
|
|
177314
|
+
personalized: Schema_exports.optional(
|
|
177315
|
+
Schema_exports.Literal(true).annotations({
|
|
177316
|
+
description: "Whether the link is bound to one person. Defaults to Huly's personalized-link behavior."
|
|
177317
|
+
})
|
|
177318
|
+
)
|
|
177319
|
+
});
|
|
177320
|
+
var AnonymousAccessLinkParamsSchema = Schema_exports.Struct({
|
|
177321
|
+
...AccessLinkCommonParamsSchema.fields,
|
|
177322
|
+
notBefore: UnixSecondsTimestamp.annotations({
|
|
177323
|
+
description: "Unix timestamp in seconds before which a non-personalized link is invalid."
|
|
177324
|
+
}),
|
|
177325
|
+
expiration: UnixSecondsTimestamp.annotations({
|
|
177326
|
+
description: "Unix timestamp in seconds after which the link expires."
|
|
177327
|
+
}),
|
|
177328
|
+
personalized: Schema_exports.Literal(false).annotations({
|
|
177329
|
+
description: "Set false for anonymous reusable guest links. Anonymous links require notBefore and expiration."
|
|
177330
|
+
})
|
|
177331
|
+
});
|
|
177332
|
+
var CreateAccessLinkParamsSchema = Schema_exports.Union(
|
|
177333
|
+
PersonalizedAccessLinkParamsSchema,
|
|
177334
|
+
AnonymousAccessLinkParamsSchema
|
|
177335
|
+
).pipe(
|
|
177336
|
+
Schema_exports.filter((params) => {
|
|
177337
|
+
if (params.notBefore !== void 0 && params.expiration !== void 0 && params.expiration <= params.notBefore) {
|
|
177338
|
+
return "expiration must be greater than notBefore.";
|
|
177339
|
+
}
|
|
177340
|
+
return void 0;
|
|
177341
|
+
})
|
|
177342
|
+
).annotations({
|
|
177343
|
+
title: "CreateAccessLinkParams",
|
|
177344
|
+
description: "Parameters for creating a Huly workspace access link"
|
|
177345
|
+
});
|
|
177241
177346
|
var GetRegionsParamsSchema = EmptyParamsSchema;
|
|
177242
177347
|
var listWorkspaceMembersParamsJsonSchema = JSONSchema_exports.make(ListWorkspaceMembersParamsSchema);
|
|
177243
177348
|
var updateMemberRoleParamsJsonSchema = JSONSchema_exports.make(UpdateMemberRoleParamsSchema);
|
|
@@ -177245,6 +177350,7 @@ var listWorkspacesParamsJsonSchema = JSONSchema_exports.make(ListWorkspacesParam
|
|
|
177245
177350
|
var createWorkspaceParamsJsonSchema = JSONSchema_exports.make(CreateWorkspaceParamsSchema);
|
|
177246
177351
|
var updateUserProfileParamsJsonSchema = JSONSchema_exports.make(UpdateUserProfileParamsSchema);
|
|
177247
177352
|
var updateGuestSettingsParamsJsonSchema = JSONSchema_exports.make(UpdateGuestSettingsParamsSchema);
|
|
177353
|
+
var createAccessLinkParamsJsonSchema = JSONSchema_exports.make(CreateAccessLinkParamsSchema);
|
|
177248
177354
|
var getRegionsParamsJsonSchema = JSONSchema_exports.make(GetRegionsParamsSchema);
|
|
177249
177355
|
var parseListWorkspaceMembersParams = Schema_exports.decodeUnknown(ListWorkspaceMembersParamsSchema);
|
|
177250
177356
|
var parseUpdateMemberRoleParams = Schema_exports.decodeUnknown(UpdateMemberRoleParamsSchema);
|
|
@@ -177252,6 +177358,7 @@ var parseListWorkspacesParams = Schema_exports.decodeUnknown(ListWorkspacesParam
|
|
|
177252
177358
|
var parseCreateWorkspaceParams = Schema_exports.decodeUnknown(CreateWorkspaceParamsSchema);
|
|
177253
177359
|
var parseUpdateUserProfileParams = Schema_exports.decodeUnknown(UpdateUserProfileParamsSchema);
|
|
177254
177360
|
var parseUpdateGuestSettingsParams = Schema_exports.decodeUnknown(UpdateGuestSettingsParamsSchema);
|
|
177361
|
+
var parseCreateAccessLinkParams = Schema_exports.decodeUnknown(CreateAccessLinkParamsSchema);
|
|
177255
177362
|
var parseGetRegionsParams = Schema_exports.decodeUnknown(GetRegionsParamsSchema);
|
|
177256
177363
|
var WorkspaceMemberSchema = Schema_exports.Struct({
|
|
177257
177364
|
personId: PersonUuid,
|
|
@@ -177314,6 +177421,12 @@ var UpdateGuestSettingsResultSchema = Schema_exports.Struct({
|
|
|
177314
177421
|
allowReadOnly: Schema_exports.optional(Schema_exports.Boolean),
|
|
177315
177422
|
allowSignUp: Schema_exports.optional(Schema_exports.Boolean)
|
|
177316
177423
|
});
|
|
177424
|
+
var CreateAccessLinkResultSchema = Schema_exports.Struct({
|
|
177425
|
+
link: UrlString,
|
|
177426
|
+
role: AccountRoleSchema,
|
|
177427
|
+
spaces: Schema_exports.optional(Schema_exports.Array(SpaceId)),
|
|
177428
|
+
personalized: Schema_exports.optional(Schema_exports.Boolean)
|
|
177429
|
+
});
|
|
177317
177430
|
var ListWorkspaceMembersResultSchema = Schema_exports.Array(WorkspaceMemberSchema);
|
|
177318
177431
|
var ListWorkspacesResultSchema = Schema_exports.Array(WorkspaceSummarySchema);
|
|
177319
177432
|
var GetRegionsResultSchema = Schema_exports.Array(RegionInfoSchema);
|
|
@@ -178888,13 +179001,17 @@ var listOrganizations = (params) => Effect_exports.gen(function* () {
|
|
|
178888
179001
|
sort: { modifiedOn: import_core31.SortingOrder.Descending }
|
|
178889
179002
|
}
|
|
178890
179003
|
);
|
|
178891
|
-
return orgs.map((org) =>
|
|
178892
|
-
id
|
|
178893
|
-
|
|
178894
|
-
|
|
178895
|
-
|
|
178896
|
-
|
|
178897
|
-
|
|
179004
|
+
return orgs.map((org) => {
|
|
179005
|
+
const id = OrganizationId.make(org._id);
|
|
179006
|
+
return {
|
|
179007
|
+
id,
|
|
179008
|
+
name: org.name,
|
|
179009
|
+
city: org.city,
|
|
179010
|
+
members: org.members,
|
|
179011
|
+
url: buildContactUrlFromConfig(client.workbenchUrlConfig, id),
|
|
179012
|
+
modifiedOn: org.modifiedOn
|
|
179013
|
+
};
|
|
179014
|
+
});
|
|
178898
179015
|
});
|
|
178899
179016
|
var createOrganization = (params) => Effect_exports.gen(function* () {
|
|
178900
179017
|
const client = yield* HulyClient;
|
|
@@ -178940,12 +179057,14 @@ var getOrganization = (params) => Effect_exports.gen(function* () {
|
|
|
178940
179057
|
org.description,
|
|
178941
179058
|
"markdown"
|
|
178942
179059
|
) : void 0;
|
|
179060
|
+
const id = OrganizationId.make(org._id);
|
|
178943
179061
|
return {
|
|
178944
|
-
id
|
|
179062
|
+
id,
|
|
178945
179063
|
name: org.name,
|
|
178946
179064
|
city: org.city || void 0,
|
|
178947
179065
|
description: descriptionText,
|
|
178948
179066
|
members: org.members,
|
|
179067
|
+
url: buildContactUrlFromConfig(client.workbenchUrlConfig, id),
|
|
178949
179068
|
modifiedOn: org.modifiedOn
|
|
178950
179069
|
};
|
|
178951
179070
|
});
|
|
@@ -179199,11 +179318,13 @@ var listPersons = (params) => Effect_exports.gen(function* () {
|
|
|
179199
179318
|
const emailMap = yield* batchGetEmailsForPersons(client, personIds);
|
|
179200
179319
|
return persons.map((person) => {
|
|
179201
179320
|
const emailValue = emailMap.get(person._id);
|
|
179321
|
+
const id = PersonId.make(person._id);
|
|
179202
179322
|
return {
|
|
179203
|
-
id
|
|
179323
|
+
id,
|
|
179204
179324
|
name: PersonName.make(person.name),
|
|
179205
179325
|
city: person.city,
|
|
179206
179326
|
email: emailValue !== void 0 ? Email.make(emailValue) : void 0,
|
|
179327
|
+
url: buildContactUrlFromConfig(client.workbenchUrlConfig, id),
|
|
179207
179328
|
modifiedOn: person.modifiedOn
|
|
179208
179329
|
};
|
|
179209
179330
|
});
|
|
@@ -179225,8 +179346,9 @@ var getPerson = (params) => Effect_exports.gen(function* () {
|
|
|
179225
179346
|
const organizations = yield* findOrganizationsForPerson(client, person._id);
|
|
179226
179347
|
const { firstName, lastName } = parseName(person.name);
|
|
179227
179348
|
const emailChannel = channels.find((c) => c.provider === contact.channelProvider.Email);
|
|
179349
|
+
const id = PersonId.make(person._id);
|
|
179228
179350
|
return {
|
|
179229
|
-
id
|
|
179351
|
+
id,
|
|
179230
179352
|
name: PersonName.make(person.name),
|
|
179231
179353
|
firstName,
|
|
179232
179354
|
lastName,
|
|
@@ -179237,6 +179359,7 @@ var getPerson = (params) => Effect_exports.gen(function* () {
|
|
|
179237
179359
|
value: c.value
|
|
179238
179360
|
})),
|
|
179239
179361
|
organizations: organizations.length > 0 ? organizations : void 0,
|
|
179362
|
+
url: buildContactUrlFromConfig(client.workbenchUrlConfig, id),
|
|
179240
179363
|
modifiedOn: person.modifiedOn,
|
|
179241
179364
|
createdOn: person.createdOn
|
|
179242
179365
|
};
|
|
@@ -179326,12 +179449,14 @@ var listEmployees = (params) => Effect_exports.gen(function* () {
|
|
|
179326
179449
|
const emailMap = yield* batchGetEmailsForPersons(client, employeeIds);
|
|
179327
179450
|
return employees.map((emp) => {
|
|
179328
179451
|
const emailValue = emailMap.get(emp._id);
|
|
179452
|
+
const id = PersonId.make(emp._id);
|
|
179329
179453
|
return {
|
|
179330
|
-
id
|
|
179454
|
+
id,
|
|
179331
179455
|
name: PersonName.make(emp.name),
|
|
179332
179456
|
email: emailValue !== void 0 ? Email.make(emailValue) : void 0,
|
|
179333
179457
|
position: emp.position ?? void 0,
|
|
179334
179458
|
active: emp.active,
|
|
179459
|
+
url: buildContactUrlFromConfig(client.workbenchUrlConfig, id),
|
|
179335
179460
|
modifiedOn: emp.modifiedOn
|
|
179336
179461
|
};
|
|
179337
179462
|
});
|
|
@@ -185115,6 +185240,17 @@ var accountRoleMap = {
|
|
|
185115
185240
|
var toHulyAccountRole = (role) => accountRoleMap[role];
|
|
185116
185241
|
var formatVersion = (info) => `${info.versionMajor}.${info.versionMinor}.${info.versionPatch}`;
|
|
185117
185242
|
var nullToUndefined = (value3) => value3 ?? void 0;
|
|
185243
|
+
var toCreateAccessLinkOptions = (params) => {
|
|
185244
|
+
return {
|
|
185245
|
+
...params.firstName !== void 0 ? { firstName: params.firstName } : {},
|
|
185246
|
+
...params.lastName !== void 0 ? { lastName: params.lastName } : {},
|
|
185247
|
+
...params.navigateUrl !== void 0 ? { navigateUrl: params.navigateUrl } : {},
|
|
185248
|
+
...params.spaces !== void 0 ? { spaces: params.spaces } : {},
|
|
185249
|
+
...params.notBefore !== void 0 ? { notBefore: params.notBefore } : {},
|
|
185250
|
+
...params.expiration !== void 0 ? { expiration: params.expiration } : {},
|
|
185251
|
+
...params.personalized !== void 0 ? { personalized: params.personalized } : {}
|
|
185252
|
+
};
|
|
185253
|
+
};
|
|
185118
185254
|
var listWorkspaceMembers = (params) => Effect_exports.gen(function* () {
|
|
185119
185255
|
const ops = yield* WorkspaceClient;
|
|
185120
185256
|
const limit = clampLimit(params.limit);
|
|
@@ -185253,6 +185389,17 @@ var updateGuestSettings = (params) => Effect_exports.gen(function* () {
|
|
|
185253
185389
|
allowSignUp: params.allowSignUp
|
|
185254
185390
|
};
|
|
185255
185391
|
});
|
|
185392
|
+
var createAccessLink = (params) => Effect_exports.gen(function* () {
|
|
185393
|
+
const ops = yield* WorkspaceClient;
|
|
185394
|
+
const role = params.role ?? "GUEST";
|
|
185395
|
+
const link = yield* ops.createAccessLink(toHulyAccountRole(role), toCreateAccessLinkOptions(params));
|
|
185396
|
+
return {
|
|
185397
|
+
link: UrlString.make(link),
|
|
185398
|
+
role,
|
|
185399
|
+
spaces: params.spaces,
|
|
185400
|
+
personalized: params.personalized
|
|
185401
|
+
};
|
|
185402
|
+
});
|
|
185256
185403
|
var getRegions = () => Effect_exports.gen(function* () {
|
|
185257
185404
|
const ops = yield* WorkspaceClient;
|
|
185258
185405
|
const regions = yield* ops.getRegionInfo();
|
|
@@ -185370,6 +185517,18 @@ var workspaceTools = [
|
|
|
185370
185517
|
UpdateGuestSettingsResultSchema
|
|
185371
185518
|
)
|
|
185372
185519
|
},
|
|
185520
|
+
{
|
|
185521
|
+
name: "create_access_link",
|
|
185522
|
+
description: "Create a Huly workspace access link. Defaults to role GUEST. Supports anonymous reusable guest links by setting personalized=false with notBefore and expiration, and can restrict access to specific Huly space IDs via spaces.",
|
|
185523
|
+
category: CATEGORY24,
|
|
185524
|
+
inputSchema: createAccessLinkParamsJsonSchema,
|
|
185525
|
+
handler: createEncodedWorkspaceToolHandler(
|
|
185526
|
+
"create_access_link",
|
|
185527
|
+
parseCreateAccessLinkParams,
|
|
185528
|
+
createAccessLink,
|
|
185529
|
+
CreateAccessLinkResultSchema
|
|
185530
|
+
)
|
|
185531
|
+
},
|
|
185373
185532
|
{
|
|
185374
185533
|
name: "get_regions",
|
|
185375
185534
|
description: "Get available regions for workspace creation. Returns region codes and display names.",
|