aimeat 1.20.3 → 1.20.4
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/locales/en.json +50 -1
- package/dist/locales/fi.json +50 -1
- package/dist/public/css/views/profile.css +9 -0
- package/dist/public/css/views/public-workspace-viewer.css +23 -3
- package/dist/public/js/services/organisms.js +77 -6
- package/dist/public/views/profile/organisms-tab.js +308 -54
- package/dist/public/views/public-workspace-viewer.js +74 -11
- package/dist/src/cli/connect/mcp/tools/index.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/index.js +2 -0
- package/dist/src/cli/connect/mcp/tools/index.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/organisms.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/organisms.js +57 -0
- package/dist/src/cli/connect/mcp/tools/organisms.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/schedules.d.ts +15 -0
- package/dist/src/cli/connect/mcp/tools/schedules.d.ts.map +1 -0
- package/dist/src/cli/connect/mcp/tools/schedules.js +66 -0
- package/dist/src/cli/connect/mcp/tools/schedules.js.map +1 -0
- package/dist/src/cli/connect/tool-call.d.ts.map +1 -1
- package/dist/src/cli/connect/tool-call.js +79 -0
- package/dist/src/cli/connect/tool-call.js.map +1 -1
- package/dist/src/cli/init-wizard.d.ts.map +1 -1
- package/dist/src/cli/init-wizard.js +11 -3
- package/dist/src/cli/init-wizard.js.map +1 -1
- package/dist/src/generated/api-types.d.ts +499 -1
- package/dist/src/generated/api-types.d.ts.map +1 -1
- package/dist/src/mcp/annotations.d.ts.map +1 -1
- package/dist/src/mcp/annotations.js +6 -0
- package/dist/src/mcp/annotations.js.map +1 -1
- package/dist/src/mcp/catalog/definitions.d.ts.map +1 -1
- package/dist/src/mcp/catalog/definitions.js +65 -0
- package/dist/src/mcp/catalog/definitions.js.map +1 -1
- package/dist/src/mcp/catalog/surfaces.js +6 -6
- package/dist/src/mcp/catalog/surfaces.js.map +1 -1
- package/dist/src/mcp/organisms.d.ts.map +1 -1
- package/dist/src/mcp/organisms.js +145 -0
- package/dist/src/mcp/organisms.js.map +1 -1
- package/dist/src/routes/organisms.d.ts.map +1 -1
- package/dist/src/routes/organisms.js +406 -5
- package/dist/src/routes/organisms.js.map +1 -1
- package/dist/src/services/organism-comments.d.ts +30 -0
- package/dist/src/services/organism-comments.d.ts.map +1 -0
- package/dist/src/services/organism-comments.js +74 -0
- package/dist/src/services/organism-comments.js.map +1 -0
- package/dist/src/services/organism-search.d.ts +27 -0
- package/dist/src/services/organism-search.d.ts.map +1 -0
- package/dist/src/services/organism-search.js +84 -0
- package/dist/src/services/organism-search.js.map +1 -0
- package/dist/src/storage/interface.d.ts +7 -1
- package/dist/src/storage/interface.d.ts.map +1 -1
- package/dist/src/storage/interface.js.map +1 -1
- package/package.json +1 -1
package/dist/locales/en.json
CHANGED
|
@@ -2894,6 +2894,7 @@
|
|
|
2894
2894
|
"useCaseCustomDesc": "Skip to full configuration",
|
|
2895
2895
|
"nodeId": "Node ID",
|
|
2896
2896
|
"nodeIdHint": "Unique name for this node on the network",
|
|
2897
|
+
"nodeIdInvalid": "Node ID must match format: aimeat-{region}-{number}-{name} (e.g. aimeat-fi-001-home)",
|
|
2897
2898
|
"port": "Port",
|
|
2898
2899
|
"portHint": "HTTP port the server listens on",
|
|
2899
2900
|
"portInvalid": "Port must be between 1 and 65535",
|
|
@@ -5505,7 +5506,8 @@
|
|
|
5505
5506
|
"approved": "approved",
|
|
5506
5507
|
"revoke": "Revoke",
|
|
5507
5508
|
"manageMembers": "Manage members",
|
|
5508
|
-
"manageMembersDesc": "
|
|
5509
|
+
"manageMembersDesc": "Invite, approve, block and revoke member access.",
|
|
5510
|
+
"membersRoster": "Members",
|
|
5509
5511
|
"pendingRequests": "Pending join requests",
|
|
5510
5512
|
"noPendingRequests": "No pending requests.",
|
|
5511
5513
|
"confirmRemoveMember": "Revoke {member}’s access to this organism?",
|
|
@@ -5514,6 +5516,51 @@
|
|
|
5514
5516
|
"reviewFailed": "Could not update request",
|
|
5515
5517
|
"joinApproved": "Request approved",
|
|
5516
5518
|
"joinRejected": "Request declined",
|
|
5519
|
+
"inviteMember": "Invite a member",
|
|
5520
|
+
"inviteePlaceholder": "owner name",
|
|
5521
|
+
"invite": "Invite",
|
|
5522
|
+
"outstandingInvites": "Awaiting acceptance",
|
|
5523
|
+
"invitationSent": "Invitation sent",
|
|
5524
|
+
"inviteFailed": "Could not send invitation",
|
|
5525
|
+
"makeCreator": "Make creator",
|
|
5526
|
+
"block": "Block",
|
|
5527
|
+
"blockedMembers": "Blocked",
|
|
5528
|
+
"unblock": "Unblock",
|
|
5529
|
+
"confirmBlockMember": "Block {member} and remove them from this organism?",
|
|
5530
|
+
"memberBlocked": "Member blocked",
|
|
5531
|
+
"banLifted": "Block lifted",
|
|
5532
|
+
"confirmTransfer": "Make {member} the creator? You will become an admin.",
|
|
5533
|
+
"ownershipTransferred": "Ownership transferred",
|
|
5534
|
+
"transferFailed": "Could not transfer ownership",
|
|
5535
|
+
"attachedAgents": "Attached agents",
|
|
5536
|
+
"noAgents": "No agents attached.",
|
|
5537
|
+
"detach": "Detach",
|
|
5538
|
+
"agentGaiiPlaceholder": "agent#you@node",
|
|
5539
|
+
"attachAgent": "Attach agent",
|
|
5540
|
+
"agentAttached": "Agent attached",
|
|
5541
|
+
"agentDetached": "Agent detached",
|
|
5542
|
+
"agentFailed": "Agent action failed",
|
|
5543
|
+
"youAreInvited": "You’re invited",
|
|
5544
|
+
"invitedByLabel": "invited by {who}",
|
|
5545
|
+
"acceptInvite": "Accept",
|
|
5546
|
+
"declineInvite": "Decline",
|
|
5547
|
+
"invitationAccepted": "Joined",
|
|
5548
|
+
"invitationDeclined": "Declined",
|
|
5549
|
+
"inviteActionFailed": "Could not update invitation",
|
|
5550
|
+
"searchContent": "Search content",
|
|
5551
|
+
"searchPlaceholder": "Find records & documents…",
|
|
5552
|
+
"search": "Search",
|
|
5553
|
+
"searchNoResults": "No matches.",
|
|
5554
|
+
"commentsHeading": "Comments",
|
|
5555
|
+
"noComments": "No comments yet.",
|
|
5556
|
+
"commentPlaceholder": "Add a comment…",
|
|
5557
|
+
"anchorQuotePlaceholder": "Optional: quote a passage to anchor the comment",
|
|
5558
|
+
"postComment": "Comment",
|
|
5559
|
+
"reply": "Reply",
|
|
5560
|
+
"replyingTo": "Replying to",
|
|
5561
|
+
"inReply": "reply",
|
|
5562
|
+
"commentFailed": "Could not post comment",
|
|
5563
|
+
"commentDeleteFailed": "Could not delete comment",
|
|
5517
5564
|
"editFlow": "How editing works here",
|
|
5518
5565
|
"activity": "Activity",
|
|
5519
5566
|
"draftEdit": "Draft edit",
|
|
@@ -6241,6 +6288,8 @@
|
|
|
6241
6288
|
"sharedDocuments": "Shared documents",
|
|
6242
6289
|
"publicBadge": "Public document",
|
|
6243
6290
|
"print": "Print / Save as PDF",
|
|
6291
|
+
"copyAiLink": "Copy AI link (Markdown)",
|
|
6292
|
+
"copied": "Copied!",
|
|
6244
6293
|
"selectDocument": "Select a document.",
|
|
6245
6294
|
"unavailableTitle": "Nothing to show here",
|
|
6246
6295
|
"unavailableDesc": "This workspace has no publicly shared documents, or the link is incomplete."
|
package/dist/locales/fi.json
CHANGED
|
@@ -2894,6 +2894,7 @@
|
|
|
2894
2894
|
"useCaseCustomDesc": "Siirry suoraan kaikkiin asetuksiin",
|
|
2895
2895
|
"nodeId": "Solmun tunnus",
|
|
2896
2896
|
"nodeIdHint": "Uniikki nimi tälle solmulle verkossa",
|
|
2897
|
+
"nodeIdInvalid": "Solmun tunnuksen täytyy olla muotoa: aimeat-{alue}-{numero}-{nimi} (esim. aimeat-fi-001-home)",
|
|
2897
2898
|
"port": "Portti",
|
|
2898
2899
|
"portHint": "HTTP-portti jota palvelin kuuntelee",
|
|
2899
2900
|
"portInvalid": "Portin pitää olla välillä 1–65535",
|
|
@@ -5505,7 +5506,8 @@
|
|
|
5505
5506
|
"approved": "hyväksytty",
|
|
5506
5507
|
"revoke": "Peru",
|
|
5507
5508
|
"manageMembers": "Hallitse jäseniä",
|
|
5508
|
-
"manageMembersDesc": "
|
|
5509
|
+
"manageMembersDesc": "Kutsu, hyväksy, estä ja peru jäsenten pääsy.",
|
|
5510
|
+
"membersRoster": "Jäsenet",
|
|
5509
5511
|
"pendingRequests": "Odottavat liittymispyynnöt",
|
|
5510
5512
|
"noPendingRequests": "Ei odottavia pyyntöjä.",
|
|
5511
5513
|
"confirmRemoveMember": "Peru käyttäjän {member} pääsy tähän organismiin?",
|
|
@@ -5514,6 +5516,51 @@
|
|
|
5514
5516
|
"reviewFailed": "Pyynnön päivitys epäonnistui",
|
|
5515
5517
|
"joinApproved": "Pyyntö hyväksytty",
|
|
5516
5518
|
"joinRejected": "Pyyntö hylätty",
|
|
5519
|
+
"inviteMember": "Kutsu jäsen",
|
|
5520
|
+
"inviteePlaceholder": "omistajan nimi",
|
|
5521
|
+
"invite": "Kutsu",
|
|
5522
|
+
"outstandingInvites": "Odottaa hyväksyntää",
|
|
5523
|
+
"invitationSent": "Kutsu lähetetty",
|
|
5524
|
+
"inviteFailed": "Kutsun lähetys epäonnistui",
|
|
5525
|
+
"makeCreator": "Tee luojaksi",
|
|
5526
|
+
"block": "Estä",
|
|
5527
|
+
"blockedMembers": "Estetyt",
|
|
5528
|
+
"unblock": "Poista esto",
|
|
5529
|
+
"confirmBlockMember": "Estä {member} ja poista hänet tästä organismista?",
|
|
5530
|
+
"memberBlocked": "Jäsen estetty",
|
|
5531
|
+
"banLifted": "Esto poistettu",
|
|
5532
|
+
"confirmTransfer": "Tee käyttäjästä {member} luoja? Sinusta tulee ylläpitäjä.",
|
|
5533
|
+
"ownershipTransferred": "Omistajuus siirretty",
|
|
5534
|
+
"transferFailed": "Omistajuuden siirto epäonnistui",
|
|
5535
|
+
"attachedAgents": "Liitetyt agentit",
|
|
5536
|
+
"noAgents": "Ei liitettyjä agentteja.",
|
|
5537
|
+
"detach": "Irrota",
|
|
5538
|
+
"agentGaiiPlaceholder": "agentti#sinä@node",
|
|
5539
|
+
"attachAgent": "Liitä agentti",
|
|
5540
|
+
"agentAttached": "Agentti liitetty",
|
|
5541
|
+
"agentDetached": "Agentti irrotettu",
|
|
5542
|
+
"agentFailed": "Agenttitoiminto epäonnistui",
|
|
5543
|
+
"youAreInvited": "Sinut on kutsuttu",
|
|
5544
|
+
"invitedByLabel": "kutsui {who}",
|
|
5545
|
+
"acceptInvite": "Hyväksy",
|
|
5546
|
+
"declineInvite": "Hylkää",
|
|
5547
|
+
"invitationAccepted": "Liityit",
|
|
5548
|
+
"invitationDeclined": "Hylätty",
|
|
5549
|
+
"inviteActionFailed": "Kutsun päivitys epäonnistui",
|
|
5550
|
+
"searchContent": "Hae sisältöä",
|
|
5551
|
+
"searchPlaceholder": "Etsi tietueita ja dokumentteja…",
|
|
5552
|
+
"search": "Hae",
|
|
5553
|
+
"searchNoResults": "Ei osumia.",
|
|
5554
|
+
"commentsHeading": "Kommentit",
|
|
5555
|
+
"noComments": "Ei vielä kommentteja.",
|
|
5556
|
+
"commentPlaceholder": "Lisää kommentti…",
|
|
5557
|
+
"anchorQuotePlaceholder": "Valinnainen: lainaa kohta, johon kommentti ankkuroidaan",
|
|
5558
|
+
"postComment": "Kommentoi",
|
|
5559
|
+
"reply": "Vastaa",
|
|
5560
|
+
"replyingTo": "Vastataan",
|
|
5561
|
+
"inReply": "vastaus",
|
|
5562
|
+
"commentFailed": "Kommentin lähetys epäonnistui",
|
|
5563
|
+
"commentDeleteFailed": "Kommentin poisto epäonnistui",
|
|
5517
5564
|
"editFlow": "Miten muokkaus toimii täällä",
|
|
5518
5565
|
"activity": "Aktiivisuus",
|
|
5519
5566
|
"draftEdit": "Luonnoksen muokkaus",
|
|
@@ -6243,6 +6290,8 @@
|
|
|
6243
6290
|
"sharedDocuments": "Jaetut dokumentit",
|
|
6244
6291
|
"publicBadge": "Julkinen dokumentti",
|
|
6245
6292
|
"print": "Tulosta / Tallenna PDF:nä",
|
|
6293
|
+
"copyAiLink": "Kopioi AI-linkki (Markdown)",
|
|
6294
|
+
"copied": "Kopioitu!",
|
|
6246
6295
|
"selectDocument": "Valitse dokumentti.",
|
|
6247
6296
|
"unavailableTitle": "Ei näytettävää",
|
|
6248
6297
|
"unavailableDesc": "Tällä työtilalla ei ole julkisesti jaettuja dokumentteja, tai linkki on puutteellinen."
|
|
@@ -2079,6 +2079,15 @@
|
|
|
2079
2079
|
.pj-rec-title { flex: 1; text-align: left; background: none; border: none; cursor: pointer; font-size: 0.9rem; color: var(--text); padding: 0; }
|
|
2080
2080
|
.pj-rec-title:hover { color: var(--accent); }
|
|
2081
2081
|
.pj-rec-fields { margin: 0.1rem 0 0.4rem 0.6rem; padding: 0.2rem 0.6rem; border-left: 2px solid var(--border); background: var(--bg-dim); border-radius: 0 6px 6px 0; }
|
|
2082
|
+
/* Comment thread on a workspace object (record/document) */
|
|
2083
|
+
.pj-comments { margin: 0.5rem 0 0.25rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }
|
|
2084
|
+
.pj-comment { padding: 0.4rem 0.5rem; margin: 0.3rem 0; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
|
|
2085
|
+
.pj-comment-reply { margin-left: 1.2rem; border-left: 2px solid var(--accent, var(--border)); }
|
|
2086
|
+
.pj-comment-head { font-size: 0.85rem; color: var(--muted); }
|
|
2087
|
+
.pj-comment-body { white-space: pre-wrap; margin: 0.2rem 0; }
|
|
2088
|
+
.pj-comment-actions { display: flex; gap: 0.3rem; }
|
|
2089
|
+
.pj-comment-compose { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.5rem; }
|
|
2090
|
+
.pj-comment-compose textarea { resize: vertical; }
|
|
2082
2091
|
/* Dotted leader between each field label and its value — ties the two ends of a
|
|
2083
2092
|
long row together so you can follow which value belongs to which key. */
|
|
2084
2093
|
.pj-rec-fields .kv-row { align-items: baseline; gap: 0; }
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* All colors/spacing come from theme.css variables (no dark-only rgba, no hardcoded hex).
|
|
7
7
|
* @version-history
|
|
8
8
|
* v1.0.0 — 2026-06-09 — Initial: slice 2 of the workspace public-sharing plan.
|
|
9
|
+
* v1.1.0 — 2026-06-09 — Continuous stacked-page layout (scroll-margin + per-page spacing so every
|
|
10
|
+
* shared page prints in one go); action-button group for "Copy AI link" + "Print".
|
|
9
11
|
*/
|
|
10
12
|
|
|
11
13
|
.pwv-container {
|
|
@@ -92,17 +94,29 @@
|
|
|
92
94
|
padding: 0.2rem 0.7rem;
|
|
93
95
|
}
|
|
94
96
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
.pwv-bar-actions {
|
|
98
|
+
display: flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
gap: 0.5rem;
|
|
101
|
+
flex-wrap: wrap;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* Card fill + shadow so the action buttons stand out against the page (matches the in-app toolbar). */
|
|
105
|
+
.pwv-action { background: var(--card); box-shadow: var(--shadow-sm); }
|
|
106
|
+
.pwv-action:hover { background: var(--bg-surface); border-color: var(--text-muted); }
|
|
98
107
|
|
|
99
108
|
.pwv-doc {
|
|
100
109
|
background: var(--card);
|
|
101
110
|
border: 1px solid var(--border);
|
|
102
111
|
border-radius: 10px;
|
|
103
112
|
padding: 1.75rem 2rem;
|
|
113
|
+
/* Offset for the sticky-free window scroll so a scrolled-to page isn't hidden under the top nav. */
|
|
114
|
+
scroll-margin-top: 1.5rem;
|
|
104
115
|
}
|
|
105
116
|
|
|
117
|
+
/* Stacked pages in the continuous whole-space view: space them out so the seam between pages reads. */
|
|
118
|
+
.pwv-doc + .pwv-doc { margin-top: 1.5rem; }
|
|
119
|
+
|
|
106
120
|
/* ── Markdown typography (scoped to the viewer; mirrors the in-app document view) ── */
|
|
107
121
|
.pwv-doc .md-body { font-size: 0.95rem; line-height: 1.7; color: var(--text); max-width: 78ch; overflow-wrap: break-word; }
|
|
108
122
|
.pwv-doc .md-body > :first-child { margin-top: 0; }
|
|
@@ -203,4 +217,10 @@
|
|
|
203
217
|
padding: 0;
|
|
204
218
|
}
|
|
205
219
|
body.pwv-active .pwv-doc .md-body { max-width: none; }
|
|
220
|
+
/* Continuous whole-space print: start each shared page on a fresh sheet, and don't split a page's
|
|
221
|
+
* heading off from its body across a sheet boundary. */
|
|
222
|
+
body.pwv-active .pwv-doc + .pwv-doc { margin-top: 0; padding-top: 0; break-before: page; }
|
|
223
|
+
body.pwv-active .pwv-doc .md-body h1,
|
|
224
|
+
body.pwv-active .pwv-doc .md-body h2,
|
|
225
|
+
body.pwv-active .pwv-doc .md-body h3 { break-after: avoid; }
|
|
206
226
|
}
|
|
@@ -50,9 +50,10 @@ export async function leaveOrganism(id) {
|
|
|
50
50
|
return apiPost(`/v1/organisms/${encodeURIComponent(id)}/leave`, {});
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
/** List members. */
|
|
54
|
-
export async function listMembers(id) {
|
|
55
|
-
|
|
53
|
+
/** List members. Optional status filter ('active' | 'banned' | 'invited' | 'pending'). */
|
|
54
|
+
export async function listMembers(id, status) {
|
|
55
|
+
const q = status ? `?status=${encodeURIComponent(status)}` : '';
|
|
56
|
+
return apiGet(`/v1/organisms/${encodeURIComponent(id)}/members${q}`);
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
/** List join requests (admin only). */
|
|
@@ -65,9 +66,79 @@ export async function reviewJoinRequest(organismId, requestId, decision) {
|
|
|
65
66
|
return apiPost(`/v1/organisms/${encodeURIComponent(organismId)}/join-requests/${encodeURIComponent(requestId)}/review`, { decision });
|
|
66
67
|
}
|
|
67
68
|
|
|
68
|
-
/**
|
|
69
|
-
export async function
|
|
70
|
-
|
|
69
|
+
/** List the comment thread on a workspace object (record or document). */
|
|
70
|
+
export async function listComments(orgId, ws, space, instanceId) {
|
|
71
|
+
const params = new URLSearchParams({ ws, space, instance_id: instanceId });
|
|
72
|
+
return apiGet(`/v1/organisms/${encodeURIComponent(orgId)}/comments?${params.toString()}`);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** Add a comment to a workspace object. anchor: { section?|quote? }; parentId for a threaded reply. */
|
|
76
|
+
export async function addComment(orgId, { ws, space, instanceId, body, anchor, parentId }) {
|
|
77
|
+
return apiPost(`/v1/organisms/${encodeURIComponent(orgId)}/comments`, { ws, space, instance_id: instanceId, body, anchor, parent_id: parentId });
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** Delete a comment (author or creator/admin). */
|
|
81
|
+
export async function deleteComment(orgId, commentId, ws, space, instanceId) {
|
|
82
|
+
const params = new URLSearchParams({ ws, space, instance_id: instanceId });
|
|
83
|
+
return apiDelete(`/v1/organisms/${encodeURIComponent(orgId)}/comments/${encodeURIComponent(commentId)}?${params.toString()}`);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** Search records + documents across the organism's readable workspaces. Optional ws filter. */
|
|
87
|
+
export async function searchOrganism(id, q, ws) {
|
|
88
|
+
const params = new URLSearchParams({ q });
|
|
89
|
+
if (ws) params.set('ws', ws);
|
|
90
|
+
return apiGet(`/v1/organisms/${encodeURIComponent(id)}/search?${params.toString()}`);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** Remove (revoke) a member's organism access. Creator/admin only. Pass ban=true to block re-join. */
|
|
94
|
+
export async function removeMember(id, memberGhii, ban = false) {
|
|
95
|
+
const suffix = ban ? '?ban=1' : '';
|
|
96
|
+
return apiDelete(`/v1/organisms/${encodeURIComponent(id)}/members/${encodeURIComponent(memberGhii)}${suffix}`);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** Lift a ban on a previously-blocked owner. Creator/admin only. */
|
|
100
|
+
export async function unbanMember(id, memberGhii) {
|
|
101
|
+
return apiPost(`/v1/organisms/${encodeURIComponent(id)}/members/${encodeURIComponent(memberGhii)}/unban`, {});
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** Transfer ownership to an existing active member. Creator only. */
|
|
105
|
+
export async function transferOwnership(id, toGhii) {
|
|
106
|
+
return apiPost(`/v1/organisms/${encodeURIComponent(id)}/transfer`, { to: toGhii });
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/** Invite an owner by bare name. Creator/admin only. */
|
|
110
|
+
export async function inviteMember(id, invitee) {
|
|
111
|
+
return apiPost(`/v1/organisms/${encodeURIComponent(id)}/invitations`, { invitee });
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** List outstanding (pending) invitations for an organism. Creator/admin only. */
|
|
115
|
+
export async function listInvitations(id) {
|
|
116
|
+
return apiGet(`/v1/organisms/${encodeURIComponent(id)}/invitations`);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/** The caller's own pending invitations across all organisms. */
|
|
120
|
+
export async function listMyInvitations() {
|
|
121
|
+
return apiGet('/v1/organisms/invitations/mine');
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** Accept an invitation to an organism. */
|
|
125
|
+
export async function acceptInvitation(id) {
|
|
126
|
+
return apiPost(`/v1/organisms/${encodeURIComponent(id)}/invitations/accept`, {});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/** Decline an invitation to an organism. */
|
|
130
|
+
export async function declineInvitation(id) {
|
|
131
|
+
return apiPost(`/v1/organisms/${encodeURIComponent(id)}/invitations/decline`, {});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/** Attach one of your own agents (GAII) to an organism you belong to. */
|
|
135
|
+
export async function attachAgent(id, agentGaii) {
|
|
136
|
+
return apiPost(`/v1/organisms/${encodeURIComponent(id)}/agents`, { agent_gaii: agentGaii });
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/** Detach an agent from an organism. Agent owner or organism admin. */
|
|
140
|
+
export async function detachAgent(id, agentGaii) {
|
|
141
|
+
return apiDelete(`/v1/organisms/${encodeURIComponent(id)}/agents/${encodeURIComponent(agentGaii)}`);
|
|
71
142
|
}
|
|
72
143
|
|
|
73
144
|
/** Add admin. */
|