@firfi/huly-mcp 0.10.3 → 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 +179 -37
- 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,27 +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
|
-
var buildContactUrl = (baseUrl, workspaceUrlSlug, id) => {
|
|
172322
|
-
const trimmedBase = baseUrl.replace(/\/+$/, "");
|
|
172323
|
-
return UrlString.make(`${trimmedBase}/workbench/${workspaceUrlSlug}/contact/${id}`);
|
|
172324
|
-
};
|
|
172325
|
-
var buildContactUrlFromConfig = (config3, id) => buildContactUrl(config3.baseUrl, config3.workspaceUrlSlug, id);
|
|
172326
|
-
|
|
172327
172346
|
// src/huly/operations/documents-edit.ts
|
|
172328
172347
|
var editDocument = (params) => Effect_exports.gen(function* () {
|
|
172329
172348
|
const { client, doc, teamspace } = yield* findTeamspaceAndDocument(params);
|
|
@@ -172388,7 +172407,7 @@ var editDocument = (params) => Effect_exports.gen(function* () {
|
|
|
172388
172407
|
contentUpdatedInPlace = true;
|
|
172389
172408
|
}
|
|
172390
172409
|
const finalTitle = updateOps.title ?? doc.title;
|
|
172391
|
-
const url4 = buildDocumentUrlFromConfig(client.
|
|
172410
|
+
const url4 = buildDocumentUrlFromConfig(client.workbenchUrlConfig, finalTitle, DocumentId.make(doc._id));
|
|
172392
172411
|
if (Object.keys(updateOps).length === 0 && !contentUpdatedInPlace) {
|
|
172393
172412
|
return { id: DocumentId.make(doc._id), updated: false, url: url4 };
|
|
172394
172413
|
}
|
|
@@ -172985,7 +173004,7 @@ var listDocuments = (params) => Effect_exports.gen(function* () {
|
|
|
172985
173004
|
id: DocumentId.make(doc._id),
|
|
172986
173005
|
title: doc.title,
|
|
172987
173006
|
teamspace: teamspace.name,
|
|
172988
|
-
url: buildDocumentUrlFromConfig(client.
|
|
173007
|
+
url: buildDocumentUrlFromConfig(client.workbenchUrlConfig, doc.title, DocumentId.make(doc._id)),
|
|
172989
173008
|
modifiedOn: doc.modifiedOn
|
|
172990
173009
|
}));
|
|
172991
173010
|
return {
|
|
@@ -173010,7 +173029,7 @@ var getDocument = (params) => Effect_exports.gen(function* () {
|
|
|
173010
173029
|
title: doc.title,
|
|
173011
173030
|
content,
|
|
173012
173031
|
teamspace: teamspace.name,
|
|
173013
|
-
url: buildDocumentUrlFromConfig(client.
|
|
173032
|
+
url: buildDocumentUrlFromConfig(client.workbenchUrlConfig, doc.title, DocumentId.make(doc._id)),
|
|
173014
173033
|
modifiedOn: doc.modifiedOn,
|
|
173015
173034
|
createdOn: doc.createdOn
|
|
173016
173035
|
};
|
|
@@ -173063,7 +173082,7 @@ var createDocument = (params) => Effect_exports.gen(function* () {
|
|
|
173063
173082
|
return {
|
|
173064
173083
|
id: DocumentId.make(documentId),
|
|
173065
173084
|
title: params.title,
|
|
173066
|
-
url: buildDocumentUrlFromConfig(client.
|
|
173085
|
+
url: buildDocumentUrlFromConfig(client.workbenchUrlConfig, params.title, DocumentId.make(documentId))
|
|
173067
173086
|
};
|
|
173068
173087
|
});
|
|
173069
173088
|
var deleteDocument = (params) => Effect_exports.gen(function* () {
|
|
@@ -177243,6 +177262,87 @@ var UpdateGuestSettingsParamsSchema = Schema_exports.Struct({
|
|
|
177243
177262
|
title: "UpdateGuestSettingsParams",
|
|
177244
177263
|
description: "Parameters for updating guest settings"
|
|
177245
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
|
+
});
|
|
177246
177346
|
var GetRegionsParamsSchema = EmptyParamsSchema;
|
|
177247
177347
|
var listWorkspaceMembersParamsJsonSchema = JSONSchema_exports.make(ListWorkspaceMembersParamsSchema);
|
|
177248
177348
|
var updateMemberRoleParamsJsonSchema = JSONSchema_exports.make(UpdateMemberRoleParamsSchema);
|
|
@@ -177250,6 +177350,7 @@ var listWorkspacesParamsJsonSchema = JSONSchema_exports.make(ListWorkspacesParam
|
|
|
177250
177350
|
var createWorkspaceParamsJsonSchema = JSONSchema_exports.make(CreateWorkspaceParamsSchema);
|
|
177251
177351
|
var updateUserProfileParamsJsonSchema = JSONSchema_exports.make(UpdateUserProfileParamsSchema);
|
|
177252
177352
|
var updateGuestSettingsParamsJsonSchema = JSONSchema_exports.make(UpdateGuestSettingsParamsSchema);
|
|
177353
|
+
var createAccessLinkParamsJsonSchema = JSONSchema_exports.make(CreateAccessLinkParamsSchema);
|
|
177253
177354
|
var getRegionsParamsJsonSchema = JSONSchema_exports.make(GetRegionsParamsSchema);
|
|
177254
177355
|
var parseListWorkspaceMembersParams = Schema_exports.decodeUnknown(ListWorkspaceMembersParamsSchema);
|
|
177255
177356
|
var parseUpdateMemberRoleParams = Schema_exports.decodeUnknown(UpdateMemberRoleParamsSchema);
|
|
@@ -177257,6 +177358,7 @@ var parseListWorkspacesParams = Schema_exports.decodeUnknown(ListWorkspacesParam
|
|
|
177257
177358
|
var parseCreateWorkspaceParams = Schema_exports.decodeUnknown(CreateWorkspaceParamsSchema);
|
|
177258
177359
|
var parseUpdateUserProfileParams = Schema_exports.decodeUnknown(UpdateUserProfileParamsSchema);
|
|
177259
177360
|
var parseUpdateGuestSettingsParams = Schema_exports.decodeUnknown(UpdateGuestSettingsParamsSchema);
|
|
177361
|
+
var parseCreateAccessLinkParams = Schema_exports.decodeUnknown(CreateAccessLinkParamsSchema);
|
|
177260
177362
|
var parseGetRegionsParams = Schema_exports.decodeUnknown(GetRegionsParamsSchema);
|
|
177261
177363
|
var WorkspaceMemberSchema = Schema_exports.Struct({
|
|
177262
177364
|
personId: PersonUuid,
|
|
@@ -177319,6 +177421,12 @@ var UpdateGuestSettingsResultSchema = Schema_exports.Struct({
|
|
|
177319
177421
|
allowReadOnly: Schema_exports.optional(Schema_exports.Boolean),
|
|
177320
177422
|
allowSignUp: Schema_exports.optional(Schema_exports.Boolean)
|
|
177321
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
|
+
});
|
|
177322
177430
|
var ListWorkspaceMembersResultSchema = Schema_exports.Array(WorkspaceMemberSchema);
|
|
177323
177431
|
var ListWorkspacesResultSchema = Schema_exports.Array(WorkspaceSummarySchema);
|
|
177324
177432
|
var GetRegionsResultSchema = Schema_exports.Array(RegionInfoSchema);
|
|
@@ -178900,7 +179008,7 @@ var listOrganizations = (params) => Effect_exports.gen(function* () {
|
|
|
178900
179008
|
name: org.name,
|
|
178901
179009
|
city: org.city,
|
|
178902
179010
|
members: org.members,
|
|
178903
|
-
url: buildContactUrlFromConfig(client.
|
|
179011
|
+
url: buildContactUrlFromConfig(client.workbenchUrlConfig, id),
|
|
178904
179012
|
modifiedOn: org.modifiedOn
|
|
178905
179013
|
};
|
|
178906
179014
|
});
|
|
@@ -178956,7 +179064,7 @@ var getOrganization = (params) => Effect_exports.gen(function* () {
|
|
|
178956
179064
|
city: org.city || void 0,
|
|
178957
179065
|
description: descriptionText,
|
|
178958
179066
|
members: org.members,
|
|
178959
|
-
url: buildContactUrlFromConfig(client.
|
|
179067
|
+
url: buildContactUrlFromConfig(client.workbenchUrlConfig, id),
|
|
178960
179068
|
modifiedOn: org.modifiedOn
|
|
178961
179069
|
};
|
|
178962
179070
|
});
|
|
@@ -179216,7 +179324,7 @@ var listPersons = (params) => Effect_exports.gen(function* () {
|
|
|
179216
179324
|
name: PersonName.make(person.name),
|
|
179217
179325
|
city: person.city,
|
|
179218
179326
|
email: emailValue !== void 0 ? Email.make(emailValue) : void 0,
|
|
179219
|
-
url: buildContactUrlFromConfig(client.
|
|
179327
|
+
url: buildContactUrlFromConfig(client.workbenchUrlConfig, id),
|
|
179220
179328
|
modifiedOn: person.modifiedOn
|
|
179221
179329
|
};
|
|
179222
179330
|
});
|
|
@@ -179251,7 +179359,7 @@ var getPerson = (params) => Effect_exports.gen(function* () {
|
|
|
179251
179359
|
value: c.value
|
|
179252
179360
|
})),
|
|
179253
179361
|
organizations: organizations.length > 0 ? organizations : void 0,
|
|
179254
|
-
url: buildContactUrlFromConfig(client.
|
|
179362
|
+
url: buildContactUrlFromConfig(client.workbenchUrlConfig, id),
|
|
179255
179363
|
modifiedOn: person.modifiedOn,
|
|
179256
179364
|
createdOn: person.createdOn
|
|
179257
179365
|
};
|
|
@@ -179348,7 +179456,7 @@ var listEmployees = (params) => Effect_exports.gen(function* () {
|
|
|
179348
179456
|
email: emailValue !== void 0 ? Email.make(emailValue) : void 0,
|
|
179349
179457
|
position: emp.position ?? void 0,
|
|
179350
179458
|
active: emp.active,
|
|
179351
|
-
url: buildContactUrlFromConfig(client.
|
|
179459
|
+
url: buildContactUrlFromConfig(client.workbenchUrlConfig, id),
|
|
179352
179460
|
modifiedOn: emp.modifiedOn
|
|
179353
179461
|
};
|
|
179354
179462
|
});
|
|
@@ -185132,6 +185240,17 @@ var accountRoleMap = {
|
|
|
185132
185240
|
var toHulyAccountRole = (role) => accountRoleMap[role];
|
|
185133
185241
|
var formatVersion = (info) => `${info.versionMajor}.${info.versionMinor}.${info.versionPatch}`;
|
|
185134
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
|
+
};
|
|
185135
185254
|
var listWorkspaceMembers = (params) => Effect_exports.gen(function* () {
|
|
185136
185255
|
const ops = yield* WorkspaceClient;
|
|
185137
185256
|
const limit = clampLimit(params.limit);
|
|
@@ -185270,6 +185389,17 @@ var updateGuestSettings = (params) => Effect_exports.gen(function* () {
|
|
|
185270
185389
|
allowSignUp: params.allowSignUp
|
|
185271
185390
|
};
|
|
185272
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
|
+
});
|
|
185273
185403
|
var getRegions = () => Effect_exports.gen(function* () {
|
|
185274
185404
|
const ops = yield* WorkspaceClient;
|
|
185275
185405
|
const regions = yield* ops.getRegionInfo();
|
|
@@ -185387,6 +185517,18 @@ var workspaceTools = [
|
|
|
185387
185517
|
UpdateGuestSettingsResultSchema
|
|
185388
185518
|
)
|
|
185389
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
|
+
},
|
|
185390
185532
|
{
|
|
185391
185533
|
name: "get_regions",
|
|
185392
185534
|
description: "Get available regions for workspace creation. Returns region codes and display names.",
|