@anchrd/colab-sdk 0.1.7 → 0.1.8
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 +113 -113
- package/dist/actions/actions.js +21 -21
- package/dist/apps/apps.d.ts +8 -8
- package/dist/apps/apps.js +6 -6
- package/dist/archive/archive.d.ts +2 -2
- package/dist/archive/archive.js +2 -2
- package/dist/boards/boards.d.ts +60 -60
- package/dist/boards/boards.js +19 -19
- package/dist/columns/columns.d.ts +1 -1
- package/dist/columns/columns.js +1 -1
- package/dist/connections/connections.d.ts +15 -15
- package/dist/connections/connections.js +6 -6
- package/dist/connectors/connectors.d.ts +14 -14
- package/dist/connectors/connectors.js +7 -7
- package/dist/dashboards/dashboards.d.ts +3 -3
- package/dist/dashboards/dashboards.js +3 -3
- package/dist/directory/directory.d.ts +1 -1
- package/dist/directory/directory.js +1 -1
- package/dist/documents/documents.d.ts +6 -6
- package/dist/documents/documents.js +1 -1
- package/dist/events/events.d.ts +7 -7
- package/dist/events/events.js +4 -4
- package/dist/files/files.d.ts +19 -5
- package/dist/files/files.js +12 -6
- package/dist/functions/functions.d.ts +1 -1
- package/dist/functions/functions.js +1 -1
- package/dist/grammar/grammar.d.ts +1 -0
- package/dist/grammar/grammar.js +5 -1
- package/dist/grants/grants.d.ts +7 -7
- package/dist/grants/grants.js +5 -5
- package/dist/instructions/instructions.d.ts +3 -3
- package/dist/instructions/instructions.js +2 -2
- package/dist/interfaces/interfaces.d.ts +1 -1
- package/dist/interfaces/interfaces.js +1 -1
- package/dist/invitations/invitations.d.ts +8 -8
- package/dist/invitations/invitations.js +4 -4
- package/dist/links/links.d.ts +3 -3
- package/dist/links/links.js +2 -2
- package/dist/machines/machines.d.ts +5 -5
- package/dist/machines/machines.js +2 -2
- package/dist/messages/messages.d.ts +12 -12
- package/dist/messages/messages.js +5 -5
- package/dist/nodes/nodes.d.ts +58 -58
- package/dist/nodes/nodes.js +19 -19
- package/dist/operators/operators.d.ts +136 -46
- package/dist/operators/operators.js +80 -20
- package/dist/pages/pages.d.ts +22 -22
- package/dist/pages/pages.js +8 -6
- package/dist/profile/profile.d.ts +1 -1
- package/dist/profile/profile.js +1 -1
- package/dist/roles/roles.d.ts +12 -12
- package/dist/roles/roles.js +7 -7
- package/dist/runs/runs.d.ts +23 -23
- package/dist/runs/runs.js +9 -9
- package/dist/runtime-config.d.ts +1 -1
- package/dist/runtime-config.js +1 -1
- package/dist/sdk.d.ts +2 -2
- package/dist/sdk.js +2 -2
- package/dist/secrets/secrets.d.ts +5 -5
- package/dist/secrets/secrets.js +2 -2
- package/dist/services/services.d.ts +15 -15
- package/dist/services/services.js +6 -6
- package/dist/sso/sso.d.ts +4 -4
- package/dist/sso/sso.js +3 -3
- package/dist/tables/tables.d.ts +4 -4
- package/dist/tables/tables.js +4 -4
- package/dist/user-settings/user-settings.d.ts +1 -1
- package/dist/user-settings/user-settings.js +1 -1
- package/dist/users/users.d.ts +23 -23
- package/dist/users/users.js +9 -9
- package/dist/validation/validation.d.ts +11 -11
- package/dist/validation/validation.js +4 -4
- package/dist/versions/versions.d.ts +7 -7
- package/dist/versions/versions.js +2 -2
- package/package.json +1 -1
|
@@ -22,5 +22,5 @@ export declare const FunctionRemoved: z.ZodObject<{
|
|
|
22
22
|
functionId: z.ZodTemplateLiteral<`function_${string}`>;
|
|
23
23
|
name: z.ZodString;
|
|
24
24
|
permissions: z.ZodArray<z.ZodString>;
|
|
25
|
-
}, z.core.$
|
|
25
|
+
}, z.core.$strip>;
|
|
26
26
|
export type FunctionRemoved = z.infer<typeof FunctionRemoved>;
|
|
@@ -21,7 +21,7 @@ export const ServiceInterfaceFunctionRemoveInput = z.strictObject({
|
|
|
21
21
|
functionId: FunctionId,
|
|
22
22
|
});
|
|
23
23
|
// What fell with a removed function: the rights the roles held on it.
|
|
24
|
-
export const FunctionRemoved = z.
|
|
24
|
+
export const FunctionRemoved = z.object({
|
|
25
25
|
functionId: FunctionId,
|
|
26
26
|
name: z.string(),
|
|
27
27
|
permissions: z.array(z.string()),
|
|
@@ -32,6 +32,7 @@ export declare const resources: {
|
|
|
32
32
|
readonly credential: "credentials";
|
|
33
33
|
readonly sso: "sso";
|
|
34
34
|
readonly secret: "secrets";
|
|
35
|
+
readonly step: "steps";
|
|
35
36
|
};
|
|
36
37
|
export declare const actions: readonly ["list", "get", "create", "update", "archive", "restore", "purge"];
|
|
37
38
|
export declare const verbs: readonly ["invite", "resend", "disable", "enable", "rotate", "share", "move", "start", "complete", "test", "revoke", "remove", "unlock", "publish", "schedule", "unpublish", "cancel"];
|
package/dist/grammar/grammar.js
CHANGED
|
@@ -56,6 +56,9 @@ export const resources = {
|
|
|
56
56
|
// password, `_get` shows it to an admin in admin mode, `_remove` makes the node public again. One
|
|
57
57
|
// per node, with an id of its own like every sub-resource (`secret_…`).
|
|
58
58
|
secret: "secrets",
|
|
59
|
+
// One step of an Operator run as its CLI's output showed it (E112), a sub-resource of the run:
|
|
60
|
+
// `operator_run_step_list`. Not `event`, the protocol's resource, and not `message`, a chat's.
|
|
61
|
+
step: "steps",
|
|
59
62
|
};
|
|
60
63
|
// The closed list of actions with a route of their own shape.
|
|
61
64
|
export const actions = ["list", "get", "create", "update", "archive", "restore", "purge"];
|
|
@@ -86,7 +89,8 @@ export const verbs = [
|
|
|
86
89
|
"unpublish",
|
|
87
90
|
// A connector's run at the provider is ended before it completes (#567, E108):
|
|
88
91
|
// `fal_request_cancel`. Not `revoke`, which ends an access in Colab, and not `archive`: nothing
|
|
89
|
-
// stays to restore, and a cancelled run may still be billed.
|
|
92
|
+
// stays to restore, and a cancelled run may still be billed. An Operator run stopped by hand is
|
|
93
|
+
// the same (E112): `operator_run_cancel`.
|
|
90
94
|
"cancel",
|
|
91
95
|
];
|
|
92
96
|
export function isPackage(word) {
|
package/dist/grants/grants.d.ts
CHANGED
|
@@ -31,8 +31,8 @@ export declare const NodeGrant: z.ZodObject<{
|
|
|
31
31
|
inheritedFrom: z.ZodNullable<z.ZodObject<{
|
|
32
32
|
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
33
33
|
name: z.ZodString;
|
|
34
|
-
}, z.core.$
|
|
35
|
-
}, z.core.$
|
|
34
|
+
}, z.core.$strip>>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
36
|
export type NodeGrant = z.infer<typeof NodeGrant>;
|
|
37
37
|
export declare const NodeGrantList: z.ZodObject<{
|
|
38
38
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -53,10 +53,10 @@ export declare const NodeGrantList: z.ZodObject<{
|
|
|
53
53
|
inheritedFrom: z.ZodNullable<z.ZodObject<{
|
|
54
54
|
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
55
55
|
name: z.ZodString;
|
|
56
|
-
}, z.core.$
|
|
57
|
-
}, z.core.$
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
}, z.core.$strip>>;
|
|
58
58
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
59
|
-
}, z.core.$
|
|
59
|
+
}, z.core.$strip>;
|
|
60
60
|
export type NodeGrantList = z.infer<typeof NodeGrantList>;
|
|
61
61
|
export declare const NodeShareInput: z.ZodObject<{
|
|
62
62
|
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
@@ -78,7 +78,7 @@ export declare const NodeShared: z.ZodObject<{
|
|
|
78
78
|
read: "read";
|
|
79
79
|
}>;
|
|
80
80
|
parentId: z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>;
|
|
81
|
-
}, z.core.$
|
|
81
|
+
}, z.core.$strip>;
|
|
82
82
|
export type NodeShared = z.infer<typeof NodeShared>;
|
|
83
83
|
export declare const NodeGrantRevokeInput: z.ZodObject<{
|
|
84
84
|
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
@@ -89,5 +89,5 @@ export declare const NodeGrantRevoked: z.ZodObject<{
|
|
|
89
89
|
nodeId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
90
90
|
grantId: z.ZodTemplateLiteral<`grant_${string}`>;
|
|
91
91
|
parentId: z.ZodNullable<z.ZodTemplateLiteral<`node_${string}`>>;
|
|
92
|
-
}, z.core.$
|
|
92
|
+
}, z.core.$strip>;
|
|
93
93
|
export type NodeGrantRevoked = z.infer<typeof NodeGrantRevoked>;
|
package/dist/grants/grants.js
CHANGED
|
@@ -19,7 +19,7 @@ export const NodeGrantListInput = z.strictObject({
|
|
|
19
19
|
limit: PageSize.optional().describe("How many people one page holds, 1 to 100. Leaving it out gives 100."),
|
|
20
20
|
});
|
|
21
21
|
// One person who reaches the node, with the strongest right they hold and where it comes from.
|
|
22
|
-
export const NodeGrant = z.
|
|
22
|
+
export const NodeGrant = z.object({
|
|
23
23
|
// The grant to revoke: on this node, or on the folder `inheritedFrom`. Null for the creator of the
|
|
24
24
|
// node or of a folder above it, whose right is no grant.
|
|
25
25
|
grantId: GrantId.nullable(),
|
|
@@ -34,9 +34,9 @@ export const NodeGrant = z.strictObject({
|
|
|
34
34
|
// Made this node: holds every right, and nobody takes it.
|
|
35
35
|
creator: z.boolean(),
|
|
36
36
|
// The folder the right comes from; null when it stands on this node.
|
|
37
|
-
inheritedFrom: z.
|
|
37
|
+
inheritedFrom: z.object({ nodeId: NodeId, name: z.string() }).nullable(),
|
|
38
38
|
});
|
|
39
|
-
export const NodeGrantList = z.
|
|
39
|
+
export const NodeGrantList = z.object({
|
|
40
40
|
items: z.array(NodeGrant),
|
|
41
41
|
nextCursor: z.string().nullable(),
|
|
42
42
|
});
|
|
@@ -45,7 +45,7 @@ export const NodeShareInput = z.strictObject({
|
|
|
45
45
|
userId: idSchema("user").describe("The person or machine to share with, `user_…`, as intelligence_user_list finds them. A locked account cannot be given a right."),
|
|
46
46
|
right: GrantRight.describe("read sees the node, write also changes it, share also shares it further. Sharing again with someone who holds a grant sets their right to this one. A node in its creator's own area moves to the top level of Shared."),
|
|
47
47
|
});
|
|
48
|
-
export const NodeShared = z.
|
|
48
|
+
export const NodeShared = z.object({
|
|
49
49
|
nodeId: NodeId,
|
|
50
50
|
grantId: GrantId,
|
|
51
51
|
userId: z.string(),
|
|
@@ -57,7 +57,7 @@ export const NodeGrantRevokeInput = z.strictObject({
|
|
|
57
57
|
nodeId: NodeId,
|
|
58
58
|
grantId: GrantId.describe("The grant to take back, as intelligence_node_grant_list names it for this node. One on the node itself falls; one on a folder above stays there, and the node moves out of that folder to the top level of Shared with only its own grants."),
|
|
59
59
|
});
|
|
60
|
-
export const NodeGrantRevoked = z.
|
|
60
|
+
export const NodeGrantRevoked = z.object({
|
|
61
61
|
nodeId: NodeId,
|
|
62
62
|
grantId: GrantId,
|
|
63
63
|
// Where the node stands now: null is the top level of Shared; its creator's root folder when its
|
|
@@ -6,14 +6,14 @@ export declare const InstructionsLink: z.ZodObject<{
|
|
|
6
6
|
path: z.ZodString;
|
|
7
7
|
status: z.ZodNullable<z.ZodString>;
|
|
8
8
|
markdown: z.ZodString;
|
|
9
|
-
}, z.core.$
|
|
9
|
+
}, z.core.$strip>;
|
|
10
10
|
export type InstructionsLink = z.infer<typeof InstructionsLink>;
|
|
11
11
|
export declare const Instructions: z.ZodObject<{
|
|
12
12
|
chain: z.ZodArray<z.ZodObject<{
|
|
13
13
|
path: z.ZodString;
|
|
14
14
|
status: z.ZodNullable<z.ZodString>;
|
|
15
15
|
markdown: z.ZodString;
|
|
16
|
-
}, z.core.$
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
17
|
hint: z.ZodOptional<z.ZodString>;
|
|
18
|
-
}, z.core.$
|
|
18
|
+
}, z.core.$strip>;
|
|
19
19
|
export type Instructions = z.infer<typeof Instructions>;
|
|
@@ -16,7 +16,7 @@ export function isInstructionsName(name) {
|
|
|
16
16
|
return instructionsNames.includes(name);
|
|
17
17
|
}
|
|
18
18
|
// One link of the chain, top down.
|
|
19
|
-
export const InstructionsLink = z.
|
|
19
|
+
export const InstructionsLink = z.object({
|
|
20
20
|
// Where it stands, as the caller can read it, from the first readable folder below a root folder
|
|
21
21
|
// down to the document itself: `Vertrieb/Leads/.INSTRUCTIONS`.
|
|
22
22
|
path: z.string(),
|
|
@@ -28,7 +28,7 @@ export const InstructionsLink = z.strictObject({
|
|
|
28
28
|
// `# @name` sections.
|
|
29
29
|
markdown: z.string(),
|
|
30
30
|
});
|
|
31
|
-
export const Instructions = z.
|
|
31
|
+
export const Instructions = z.object({
|
|
32
32
|
chain: z.array(InstructionsLink),
|
|
33
33
|
// Only when the whole chain holds more than 3,000 words (E67): one English sentence.
|
|
34
34
|
hint: z.string().optional(),
|
|
@@ -22,7 +22,7 @@ export declare const InterfaceRemoved: z.ZodObject<{
|
|
|
22
22
|
name: z.ZodString;
|
|
23
23
|
functions: z.ZodArray<z.ZodString>;
|
|
24
24
|
permissions: z.ZodArray<z.ZodString>;
|
|
25
|
-
}, z.core.$
|
|
25
|
+
}, z.core.$strip>;
|
|
26
26
|
export type InterfaceRemoved = z.infer<typeof InterfaceRemoved>;
|
|
27
27
|
export declare const ServiceInterfaceDeclareInput: z.ZodObject<{
|
|
28
28
|
functions: z.ZodArray<z.ZodString>;
|
|
@@ -26,7 +26,7 @@ export const ServiceInterfaceRemoveInput = z.strictObject({
|
|
|
26
26
|
});
|
|
27
27
|
// What fell with a removed interface: its functions and the rights the roles held on them (trap
|
|
28
28
|
// P334: the answer names what fell, so the caller can read it).
|
|
29
|
-
export const InterfaceRemoved = z.
|
|
29
|
+
export const InterfaceRemoved = z.object({
|
|
30
30
|
interfaceId: InterfaceId,
|
|
31
31
|
name: z.string(),
|
|
32
32
|
functions: z.array(z.string()),
|
|
@@ -3,12 +3,12 @@ export declare const InvitationId: z.ZodTemplateLiteral<`invitation_${string}`>;
|
|
|
3
3
|
export declare const RoleChip: z.ZodObject<{
|
|
4
4
|
roleId: z.ZodTemplateLiteral<`role_${string}`>;
|
|
5
5
|
name: z.ZodString;
|
|
6
|
-
}, z.core.$
|
|
6
|
+
}, z.core.$strip>;
|
|
7
7
|
export type RoleChip = z.infer<typeof RoleChip>;
|
|
8
8
|
export declare const Delivery: z.ZodObject<{
|
|
9
9
|
accepted: z.ZodBoolean;
|
|
10
10
|
cause: z.ZodOptional<z.ZodString>;
|
|
11
|
-
}, z.core.$
|
|
11
|
+
}, z.core.$strip>;
|
|
12
12
|
export type Delivery = z.infer<typeof Delivery>;
|
|
13
13
|
export declare const InvitationCreateInput: z.ZodObject<{
|
|
14
14
|
email: z.ZodEmail;
|
|
@@ -36,7 +36,7 @@ export declare const Invitation: z.ZodObject<{
|
|
|
36
36
|
roles: z.ZodArray<z.ZodObject<{
|
|
37
37
|
roleId: z.ZodTemplateLiteral<`role_${string}`>;
|
|
38
38
|
name: z.ZodString;
|
|
39
|
-
}, z.core.$
|
|
39
|
+
}, z.core.$strip>>;
|
|
40
40
|
status: z.ZodEnum<{
|
|
41
41
|
accepted: "accepted";
|
|
42
42
|
invited: "invited";
|
|
@@ -46,7 +46,7 @@ export declare const Invitation: z.ZodObject<{
|
|
|
46
46
|
invitedBy: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
|
|
47
47
|
expiresAt: z.ZodISODateTime;
|
|
48
48
|
createdAt: z.ZodISODateTime;
|
|
49
|
-
}, z.core.$
|
|
49
|
+
}, z.core.$strip>;
|
|
50
50
|
export type Invitation = z.infer<typeof Invitation>;
|
|
51
51
|
export declare const InvitationSent: z.ZodObject<{
|
|
52
52
|
invitationId: z.ZodTemplateLiteral<`invitation_${string}`>;
|
|
@@ -54,7 +54,7 @@ export declare const InvitationSent: z.ZodObject<{
|
|
|
54
54
|
roles: z.ZodArray<z.ZodObject<{
|
|
55
55
|
roleId: z.ZodTemplateLiteral<`role_${string}`>;
|
|
56
56
|
name: z.ZodString;
|
|
57
|
-
}, z.core.$
|
|
57
|
+
}, z.core.$strip>>;
|
|
58
58
|
status: z.ZodEnum<{
|
|
59
59
|
accepted: "accepted";
|
|
60
60
|
invited: "invited";
|
|
@@ -67,8 +67,8 @@ export declare const InvitationSent: z.ZodObject<{
|
|
|
67
67
|
delivery: z.ZodObject<{
|
|
68
68
|
accepted: z.ZodBoolean;
|
|
69
69
|
cause: z.ZodOptional<z.ZodString>;
|
|
70
|
-
}, z.core.$
|
|
71
|
-
}, z.core.$
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
72
|
export type InvitationSent = z.infer<typeof InvitationSent>;
|
|
73
73
|
export declare const InvitationLookupQuery: z.ZodObject<{
|
|
74
74
|
token: z.ZodString;
|
|
@@ -79,7 +79,7 @@ export declare const InvitationLookup: z.ZodObject<{
|
|
|
79
79
|
inviter: z.ZodNullable<z.ZodString>;
|
|
80
80
|
expired: z.ZodBoolean;
|
|
81
81
|
expiresAt: z.ZodISODateTime;
|
|
82
|
-
}, z.core.$
|
|
82
|
+
}, z.core.$strip>;
|
|
83
83
|
export type InvitationLookup = z.infer<typeof InvitationLookup>;
|
|
84
84
|
export declare const InvitationAcceptInput: z.ZodObject<{
|
|
85
85
|
token: z.ZodString;
|
|
@@ -7,9 +7,9 @@ import { RoleId } from "../roles/roles.js";
|
|
|
7
7
|
// days, carries one valid token at a time, and its roles become the person's on acceptance.
|
|
8
8
|
export const InvitationId = idSchema("invitation");
|
|
9
9
|
// A role as the list shows it: its id for the next call, its name for the chip.
|
|
10
|
-
export const RoleChip = z.
|
|
10
|
+
export const RoleChip = z.object({ roleId: RoleId, name: z.string() });
|
|
11
11
|
// What `send` of the package `mail` answered: a failed delivery is an answer, not an exception.
|
|
12
|
-
export const Delivery = z.
|
|
12
|
+
export const Delivery = z.object({ accepted: z.boolean(), cause: z.string().optional() });
|
|
13
13
|
// The roles a new account gets. Without the field, `mitglied` (E9); an empty list invites to no role.
|
|
14
14
|
const RoleIds = z.array(RoleId).max(50);
|
|
15
15
|
export const InvitationCreateInput = z.strictObject({
|
|
@@ -21,7 +21,7 @@ export const InvitationRevokeInput = z.strictObject({ invitationId: InvitationId
|
|
|
21
21
|
// `invited` while the link works, `expired` once its seven days passed (a resend restarts them),
|
|
22
22
|
// `revoked` after a withdrawal and `accepted` once the account exists.
|
|
23
23
|
export const InvitationStatus = z.enum(["invited", "expired", "revoked", "accepted"]);
|
|
24
|
-
export const Invitation = z.
|
|
24
|
+
export const Invitation = z.object({
|
|
25
25
|
invitationId: InvitationId,
|
|
26
26
|
email: z.string(),
|
|
27
27
|
roles: z.array(RoleChip),
|
|
@@ -35,7 +35,7 @@ export const Invitation = z.strictObject({
|
|
|
35
35
|
export const InvitationSent = Invitation.extend({ delivery: Delivery });
|
|
36
36
|
// `GET /auth/invitation?token=…`, read by the page the invitation link opens (auth-invite.png).
|
|
37
37
|
export const InvitationLookupQuery = z.strictObject({ token: z.string().min(1).max(200) });
|
|
38
|
-
export const InvitationLookup = z.
|
|
38
|
+
export const InvitationLookup = z.object({
|
|
39
39
|
email: z.string(),
|
|
40
40
|
// The display name of whoever invited, or null when that account is gone.
|
|
41
41
|
inviter: z.string().nullable(),
|
package/dist/links/links.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export declare const NodeLink: z.ZodObject<{
|
|
|
51
51
|
createdByName: z.ZodNullable<z.ZodString>;
|
|
52
52
|
createdAt: z.ZodISODateTime;
|
|
53
53
|
updatedAt: z.ZodISODateTime;
|
|
54
|
-
}, z.core.$
|
|
54
|
+
}, z.core.$strip>;
|
|
55
55
|
export type NodeLink = z.infer<typeof NodeLink>;
|
|
56
56
|
export declare const NodeLinkList: z.ZodObject<{
|
|
57
57
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -70,7 +70,7 @@ export declare const NodeLinkList: z.ZodObject<{
|
|
|
70
70
|
createdByName: z.ZodNullable<z.ZodString>;
|
|
71
71
|
createdAt: z.ZodISODateTime;
|
|
72
72
|
updatedAt: z.ZodISODateTime;
|
|
73
|
-
}, z.core.$
|
|
73
|
+
}, z.core.$strip>>;
|
|
74
74
|
nextCursor: z.ZodNullable<z.ZodTemplateLiteral<`link_${string}`>>;
|
|
75
|
-
}, z.core.$
|
|
75
|
+
}, z.core.$strip>;
|
|
76
76
|
export type NodeLinkList = z.infer<typeof NodeLinkList>;
|
package/dist/links/links.js
CHANGED
|
@@ -54,7 +54,7 @@ export const NodeLinkRevokeInput = z.strictObject({
|
|
|
54
54
|
export const LinkStatus = z.enum(["active", "expired", "revoked", "inactive"]);
|
|
55
55
|
// One link. `url` is derived from the id every time it is answered and never stored: the table holds
|
|
56
56
|
// only the hash of its token.
|
|
57
|
-
export const NodeLink = z.
|
|
57
|
+
export const NodeLink = z.object({
|
|
58
58
|
linkId: LinkId,
|
|
59
59
|
nodeId: NodeId,
|
|
60
60
|
url: z.url(),
|
|
@@ -67,7 +67,7 @@ export const NodeLink = z.strictObject({
|
|
|
67
67
|
createdAt: z.iso.datetime(),
|
|
68
68
|
updatedAt: z.iso.datetime(),
|
|
69
69
|
});
|
|
70
|
-
export const NodeLinkList = z.
|
|
70
|
+
export const NodeLinkList = z.object({
|
|
71
71
|
items: z.array(NodeLink),
|
|
72
72
|
nextCursor: LinkId.nullable(),
|
|
73
73
|
});
|
|
@@ -38,7 +38,7 @@ export declare const MachineKey: z.ZodObject<{
|
|
|
38
38
|
roles: z.ZodArray<z.ZodObject<{
|
|
39
39
|
roleId: z.ZodTemplateLiteral<`role_${string}`>;
|
|
40
40
|
name: z.ZodString;
|
|
41
|
-
}, z.core.$
|
|
41
|
+
}, z.core.$strip>>;
|
|
42
42
|
status: z.ZodNullable<z.ZodEnum<{
|
|
43
43
|
archived: "archived";
|
|
44
44
|
invited: "invited";
|
|
@@ -51,19 +51,19 @@ export declare const MachineKey: z.ZodObject<{
|
|
|
51
51
|
external: "external";
|
|
52
52
|
}>;
|
|
53
53
|
responsibleId: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
|
|
54
|
-
}, z.core.$
|
|
54
|
+
}, z.core.$strip>>;
|
|
55
55
|
createdAt: z.ZodISODateTime;
|
|
56
56
|
updatedAt: z.ZodISODateTime;
|
|
57
|
-
}, z.core.$
|
|
57
|
+
}, z.core.$strip>;
|
|
58
58
|
key: z.ZodString;
|
|
59
59
|
mcpUrl: z.ZodString;
|
|
60
60
|
tokenUrl: z.ZodString;
|
|
61
61
|
example: z.ZodString;
|
|
62
62
|
docs: z.ZodString;
|
|
63
|
-
}, z.core.$
|
|
63
|
+
}, z.core.$strip>;
|
|
64
64
|
export type MachineKey = z.infer<typeof MachineKey>;
|
|
65
65
|
export declare const MachinePurged: z.ZodObject<{
|
|
66
66
|
machineId: z.ZodTemplateLiteral<`user_${string}`>;
|
|
67
67
|
name: z.ZodString;
|
|
68
|
-
}, z.core.$
|
|
68
|
+
}, z.core.$strip>;
|
|
69
69
|
export type MachinePurged = z.infer<typeof MachinePurged>;
|
|
@@ -24,7 +24,7 @@ export const MachinePurgeInput = z.strictObject({ machineId: MachineId });
|
|
|
24
24
|
// The answer of create and rotate: the key, shown ONCE (it is stored hashed), and how to connect the
|
|
25
25
|
// machine ("So verbindest du sie"). ⚠️ These two tools are the only ones whose result carries a key
|
|
26
26
|
// (`revealsSecret` on the tool).
|
|
27
|
-
export const MachineKey = z.
|
|
27
|
+
export const MachineKey = z.object({
|
|
28
28
|
machine: User,
|
|
29
29
|
key: z.string(),
|
|
30
30
|
// `<origin>/mcp`, the one address every machine talks to.
|
|
@@ -36,4 +36,4 @@ export const MachineKey = z.strictObject({
|
|
|
36
36
|
docs: z.string(),
|
|
37
37
|
});
|
|
38
38
|
// What fell, by name (trap P334): after the purge nothing else can be read about it.
|
|
39
|
-
export const MachinePurged = z.
|
|
39
|
+
export const MachinePurged = z.object({ machineId: MachineId, name: z.string() });
|
|
@@ -38,9 +38,9 @@ export declare const MessageAuthor: z.ZodObject<{
|
|
|
38
38
|
codex: "codex";
|
|
39
39
|
gemini: "gemini";
|
|
40
40
|
}>>;
|
|
41
|
-
}, z.core.$
|
|
41
|
+
}, z.core.$strip>>;
|
|
42
42
|
appHandle: z.ZodNullable<z.ZodString>;
|
|
43
|
-
}, z.core.$
|
|
43
|
+
}, z.core.$strip>;
|
|
44
44
|
export type MessageAuthor = z.infer<typeof MessageAuthor>;
|
|
45
45
|
export declare const Message: z.ZodObject<{
|
|
46
46
|
messageId: z.ZodTemplateLiteral<`message_${string}`>;
|
|
@@ -63,15 +63,15 @@ export declare const Message: z.ZodObject<{
|
|
|
63
63
|
codex: "codex";
|
|
64
64
|
gemini: "gemini";
|
|
65
65
|
}>>;
|
|
66
|
-
}, z.core.$
|
|
66
|
+
}, z.core.$strip>>;
|
|
67
67
|
appHandle: z.ZodNullable<z.ZodString>;
|
|
68
|
-
}, z.core.$
|
|
68
|
+
}, z.core.$strip>;
|
|
69
69
|
mentions: z.ZodArray<z.ZodObject<{
|
|
70
70
|
userId: z.ZodString;
|
|
71
71
|
name: z.ZodNullable<z.ZodString>;
|
|
72
|
-
}, z.core.$
|
|
72
|
+
}, z.core.$strip>>;
|
|
73
73
|
createdAt: z.ZodISODateTime;
|
|
74
|
-
}, z.core.$
|
|
74
|
+
}, z.core.$strip>;
|
|
75
75
|
export type Message = z.infer<typeof Message>;
|
|
76
76
|
export declare const MessageList: z.ZodObject<{
|
|
77
77
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -95,23 +95,23 @@ export declare const MessageList: z.ZodObject<{
|
|
|
95
95
|
codex: "codex";
|
|
96
96
|
gemini: "gemini";
|
|
97
97
|
}>>;
|
|
98
|
-
}, z.core.$
|
|
98
|
+
}, z.core.$strip>>;
|
|
99
99
|
appHandle: z.ZodNullable<z.ZodString>;
|
|
100
|
-
}, z.core.$
|
|
100
|
+
}, z.core.$strip>;
|
|
101
101
|
mentions: z.ZodArray<z.ZodObject<{
|
|
102
102
|
userId: z.ZodString;
|
|
103
103
|
name: z.ZodNullable<z.ZodString>;
|
|
104
|
-
}, z.core.$
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
105
|
createdAt: z.ZodISODateTime;
|
|
106
|
-
}, z.core.$
|
|
106
|
+
}, z.core.$strip>>;
|
|
107
107
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
108
108
|
unreadCount: z.ZodNumber;
|
|
109
109
|
readUntil: z.ZodNullable<z.ZodTemplateLiteral<`message_${string}`>>;
|
|
110
|
-
}, z.core.$
|
|
110
|
+
}, z.core.$strip>;
|
|
111
111
|
export type MessageList = z.infer<typeof MessageList>;
|
|
112
112
|
export declare const ChatRead: z.ZodObject<{
|
|
113
113
|
chatId: z.ZodTemplateLiteral<`node_${string}`>;
|
|
114
114
|
readUntil: z.ZodNullable<z.ZodTemplateLiteral<`message_${string}`>>;
|
|
115
115
|
unreadCount: z.ZodNumber;
|
|
116
|
-
}, z.core.$
|
|
116
|
+
}, z.core.$strip>;
|
|
117
117
|
export type ChatRead = z.infer<typeof ChatRead>;
|
|
@@ -43,7 +43,7 @@ export const ChatUpdateInput = z.strictObject({
|
|
|
43
43
|
// Who wrote a message. A person writing in the browser has no `appHandle`; their AI writing through a
|
|
44
44
|
// connected app carries that app's name. A machine carries its kind and an Operator its provider.
|
|
45
45
|
// The UI makes the sentence of it ("Max Member via Claude Code", "Validierung · Claude", "Lead-Import").
|
|
46
|
-
export const MessageAuthor = z.
|
|
46
|
+
export const MessageAuthor = z.object({
|
|
47
47
|
userId: z.string(),
|
|
48
48
|
// As `access` names them today; null for an account that is gone.
|
|
49
49
|
name: z.string().nullable(),
|
|
@@ -52,15 +52,15 @@ export const MessageAuthor = z.strictObject({
|
|
|
52
52
|
machine: MessageMachine.nullable(),
|
|
53
53
|
appHandle: z.string().nullable(),
|
|
54
54
|
});
|
|
55
|
-
export const Message = z.
|
|
55
|
+
export const Message = z.object({
|
|
56
56
|
messageId: MessageId,
|
|
57
57
|
nodeId: NodeId,
|
|
58
58
|
text: z.string(),
|
|
59
59
|
author: MessageAuthor,
|
|
60
|
-
mentions: z.array(z.
|
|
60
|
+
mentions: z.array(z.object({ userId: z.string(), name: z.string().nullable() })),
|
|
61
61
|
createdAt: z.iso.datetime(),
|
|
62
62
|
});
|
|
63
|
-
export const MessageList = z.
|
|
63
|
+
export const MessageList = z.object({
|
|
64
64
|
// Oldest first, as a chat reads.
|
|
65
65
|
items: z.array(Message),
|
|
66
66
|
// The page before this one; null when there is none, and always with `after`.
|
|
@@ -70,7 +70,7 @@ export const MessageList = z.strictObject({
|
|
|
70
70
|
unreadCount: z.number().int(),
|
|
71
71
|
readUntil: MessageId.nullable(),
|
|
72
72
|
});
|
|
73
|
-
export const ChatRead = z.
|
|
73
|
+
export const ChatRead = z.object({
|
|
74
74
|
chatId: NodeId,
|
|
75
75
|
readUntil: MessageId.nullable(),
|
|
76
76
|
unreadCount: z.number().int(),
|