@anchrd/colab-sdk 0.1.16 → 0.1.18
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/actions/actions.d.ts +151 -2
- package/dist/actions/actions.js +50 -6
- package/dist/boards/boards.d.ts +253 -9
- package/dist/boards/boards.js +63 -12
- package/dist/card-kinds/card-kinds.d.ts +5 -5
- package/dist/documents/documents.d.ts +59 -2
- package/dist/documents/documents.js +18 -4
- package/dist/error/error.d.ts +58 -4
- package/dist/error/error.js +146 -3
- package/dist/events/events.d.ts +15 -0
- package/dist/events/events.js +10 -0
- package/dist/excerpt/excerpt.d.ts +16 -0
- package/dist/excerpt/excerpt.js +33 -0
- package/dist/files/files.d.ts +6 -0
- package/dist/files/files.js +5 -1
- package/dist/grammar/grammar.d.ts +6 -0
- package/dist/grammar/grammar.js +54 -0
- package/dist/instructions/instructions.d.ts +36 -0
- package/dist/instructions/instructions.js +29 -0
- package/dist/missing/missing.d.ts +56 -0
- package/dist/missing/missing.js +66 -0
- package/dist/nodes/nodes.d.ts +21 -5
- package/dist/nodes/nodes.js +10 -7
- package/dist/operators/operators.d.ts +13 -3
- package/dist/operators/operators.js +19 -4
- package/dist/primitives/primitives.js +1 -1
- package/dist/runs/runs.d.ts +1 -1
- package/dist/sdk.d.ts +13 -10
- package/dist/sdk.js +13 -10
- package/dist/sso/sso.js +3 -2
- package/dist/tables/tables.d.ts +32 -0
- package/dist/tables/tables.js +12 -1
- package/dist/tool.d.ts +5 -3
- package/dist/versions/versions.d.ts +102 -0
- package/dist/versions/versions.js +14 -0
- package/dist/written/written.d.ts +206 -0
- package/dist/written/written.js +90 -0
- package/package.json +1 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { AppId, SessionId } from "../apps/apps.js";
|
|
3
|
+
import { ConnectionId } from "../connections/connections.js";
|
|
4
|
+
import { ConnectorId } from "../connectors/connectors.js";
|
|
5
|
+
import { Warning } from "../error/error.js";
|
|
6
|
+
import { GrantId } from "../grants/grants.js";
|
|
7
|
+
import { InvitationId } from "../invitations/invitations.js";
|
|
8
|
+
import { LinkId } from "../links/links.js";
|
|
9
|
+
import { MachineId } from "../machines/machines.js";
|
|
10
|
+
import { MessageId } from "../messages/messages.js";
|
|
11
|
+
import { Missing, Reached } from "../missing/missing.js";
|
|
12
|
+
import { NodeId, NodeReader } from "../nodes/nodes.js";
|
|
13
|
+
import { CredentialId } from "../operators/operators.js";
|
|
14
|
+
import { RoleId } from "../roles/roles.js";
|
|
15
|
+
import { RunId } from "../runs/runs.js";
|
|
16
|
+
import { FunctionId, InterfaceId, ServiceId } from "../services/services.js";
|
|
17
|
+
import { SsoId } from "../sso/sso.js";
|
|
18
|
+
import { UserId } from "../users/users.js";
|
|
19
|
+
// What a write answers over `/mcp` (E126, #672): what it changed and what that caused, never the
|
|
20
|
+
// object it wrote. The AI sent the object itself; echoing it back filled an Operator's context with
|
|
21
|
+
// every card and document it saved (#617). `/api` keeps the whole object for the UI.
|
|
22
|
+
// One thing a write changed: its id under its resource's name, and where the resource has them the
|
|
23
|
+
// `rev` for the next save (E70) and the version number. A folder, and a node of any kind where the
|
|
24
|
+
// tool is about nodes, is `nodeId`.
|
|
25
|
+
export const Changed = z.object({
|
|
26
|
+
nodeId: NodeId.optional(),
|
|
27
|
+
documentId: NodeId.optional(),
|
|
28
|
+
tableId: NodeId.optional(),
|
|
29
|
+
fileId: NodeId.optional(),
|
|
30
|
+
boardId: NodeId.optional(),
|
|
31
|
+
taskId: NodeId.optional(),
|
|
32
|
+
gadgetId: NodeId.optional(),
|
|
33
|
+
runId: RunId.optional(),
|
|
34
|
+
messageId: MessageId.optional(),
|
|
35
|
+
// A chat is its node's (#45).
|
|
36
|
+
chatId: NodeId.optional(),
|
|
37
|
+
grantId: GrantId.optional(),
|
|
38
|
+
linkId: LinkId.optional(),
|
|
39
|
+
// A person or machine in `access`, and the caller's own settings in `intelligence`.
|
|
40
|
+
userId: UserId.optional(),
|
|
41
|
+
// The other packages (#743). A machine is `machineId` in `access` and an Operator in `operator`,
|
|
42
|
+
// its `user_…` id either way.
|
|
43
|
+
machineId: MachineId.optional(),
|
|
44
|
+
roleId: RoleId.optional(),
|
|
45
|
+
// The rights a switch of a role really turned on or off, which a level in the call expands to.
|
|
46
|
+
permissions: z.array(z.string()).optional(),
|
|
47
|
+
invitationId: InvitationId.optional(),
|
|
48
|
+
serviceId: ServiceId.optional(),
|
|
49
|
+
interfaceId: InterfaceId.optional(),
|
|
50
|
+
functionId: FunctionId.optional(),
|
|
51
|
+
appId: AppId.optional(),
|
|
52
|
+
sessionId: SessionId.optional(),
|
|
53
|
+
ssoId: SsoId.optional(),
|
|
54
|
+
connectorId: ConnectorId.optional(),
|
|
55
|
+
connectionId: ConnectionId.optional(),
|
|
56
|
+
credentialId: CredentialId.optional(),
|
|
57
|
+
// The caller's own name for an entry of a create of many (#625).
|
|
58
|
+
ref: z.string().optional(),
|
|
59
|
+
rev: z.number().int().optional(),
|
|
60
|
+
version: z.number().int().optional(),
|
|
61
|
+
});
|
|
62
|
+
// A task that waited only on what this call closed, and now waits on nothing (Nodes › Aufgabe):
|
|
63
|
+
// whoever closed a task moves the next one to Open (E124). `own` marks the caller's: with its `rev`
|
|
64
|
+
// the caller writes it at once, without reading it first.
|
|
65
|
+
export const Unblocked = z.object({
|
|
66
|
+
taskId: NodeId,
|
|
67
|
+
title: z.string(),
|
|
68
|
+
assignee: Reached,
|
|
69
|
+
rev: z.number().int(),
|
|
70
|
+
own: z.literal(true).optional(),
|
|
71
|
+
});
|
|
72
|
+
// What the write caused for others; an empty field is left out.
|
|
73
|
+
export const Effects = z.object({
|
|
74
|
+
// Machines whose Actions changed by it (#334, E124): an Operator among them wakes.
|
|
75
|
+
woken: z.array(Reached).optional(),
|
|
76
|
+
// People it put something in front of in their Actions, by mail as their setting says (#50).
|
|
77
|
+
notified: z.array(Reached).optional(),
|
|
78
|
+
// Tasks ready now, because the last thing they waited on was closed by this call.
|
|
79
|
+
unblocked: z.array(Unblocked).optional(),
|
|
80
|
+
// Nodes whose validation went back to new (#47): their new version is unchecked.
|
|
81
|
+
validationReset: z.array(NodeId).optional(),
|
|
82
|
+
// Who reads a moved node now (#36): a move takes the grants of its new folder.
|
|
83
|
+
readers: z.array(NodeReader).optional(),
|
|
84
|
+
});
|
|
85
|
+
export const Written = z.object({
|
|
86
|
+
changed: z.array(Changed),
|
|
87
|
+
effects: Effects.optional(),
|
|
88
|
+
missing: z.array(Missing).optional(),
|
|
89
|
+
warnings: z.array(Warning).optional(),
|
|
90
|
+
});
|
package/package.json
CHANGED