@anchrd/colab-sdk 0.0.0-stage → 0.1.1

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.
Files changed (94) hide show
  1. package/README.md +65 -2
  2. package/dist/actions/actions.d.ts +810 -0
  3. package/dist/actions/actions.js +177 -0
  4. package/dist/admin-mode.d.ts +2 -0
  5. package/dist/admin-mode.js +5 -0
  6. package/dist/apps/apps.d.ts +108 -0
  7. package/dist/apps/apps.js +73 -0
  8. package/dist/archive/archive.d.ts +25 -0
  9. package/dist/archive/archive.js +27 -0
  10. package/dist/auth/auth.d.ts +27 -0
  11. package/dist/auth/auth.js +22 -0
  12. package/dist/authorization/authorization.d.ts +36 -0
  13. package/dist/authorization/authorization.js +23 -0
  14. package/dist/boards/boards.d.ts +612 -0
  15. package/dist/boards/boards.js +289 -0
  16. package/dist/columns/columns.d.ts +28 -0
  17. package/dist/columns/columns.js +28 -0
  18. package/dist/connections/connections.d.ts +149 -0
  19. package/dist/connections/connections.js +74 -0
  20. package/dist/connectors/connectors.d.ts +148 -0
  21. package/dist/connectors/connectors.js +83 -0
  22. package/dist/dashboards/dashboards.d.ts +221 -0
  23. package/dist/dashboards/dashboards.js +520 -0
  24. package/dist/directory/directory.d.ts +20 -0
  25. package/dist/directory/directory.js +18 -0
  26. package/dist/documents/documents.d.ts +61 -0
  27. package/dist/documents/documents.js +58 -0
  28. package/dist/error/error.d.ts +34 -0
  29. package/dist/error/error.js +30 -0
  30. package/dist/events/events.d.ts +104 -0
  31. package/dist/events/events.js +69 -0
  32. package/dist/files/files.d.ts +60 -0
  33. package/dist/files/files.js +139 -0
  34. package/dist/functions/functions.d.ts +26 -0
  35. package/dist/functions/functions.js +28 -0
  36. package/dist/grammar/grammar.d.ts +62 -0
  37. package/dist/grammar/grammar.js +197 -0
  38. package/dist/grants/grants.d.ts +93 -0
  39. package/dist/grants/grants.js +66 -0
  40. package/dist/ids/ids.d.ts +5 -0
  41. package/dist/ids/ids.js +12 -0
  42. package/dist/instructions/instructions.d.ts +19 -0
  43. package/dist/instructions/instructions.js +35 -0
  44. package/dist/interfaces/interfaces.d.ts +41 -0
  45. package/dist/interfaces/interfaces.js +52 -0
  46. package/dist/invitations/invitations.d.ts +98 -0
  47. package/dist/invitations/invitations.js +58 -0
  48. package/dist/links/links.d.ts +76 -0
  49. package/dist/links/links.js +73 -0
  50. package/dist/list-input.d.ts +3 -0
  51. package/dist/list-input.js +11 -0
  52. package/dist/machines/machines.d.ts +69 -0
  53. package/dist/machines/machines.js +39 -0
  54. package/dist/messages/messages.d.ts +117 -0
  55. package/dist/messages/messages.js +77 -0
  56. package/dist/nodes/nodes.d.ts +673 -0
  57. package/dist/nodes/nodes.js +354 -0
  58. package/dist/operators/operators.d.ts +898 -0
  59. package/dist/operators/operators.js +398 -0
  60. package/dist/pages/pages.d.ts +89 -0
  61. package/dist/pages/pages.js +62 -0
  62. package/dist/primitives/primitives.d.ts +5 -0
  63. package/dist/primitives/primitives.js +19 -0
  64. package/dist/profile/profile.d.ts +37 -0
  65. package/dist/profile/profile.js +43 -0
  66. package/dist/roles/roles.d.ts +135 -0
  67. package/dist/roles/roles.js +87 -0
  68. package/dist/runs/runs.d.ts +244 -0
  69. package/dist/runs/runs.js +137 -0
  70. package/dist/runtime-config.d.ts +12 -0
  71. package/dist/runtime-config.js +18 -0
  72. package/dist/sdk.d.ts +45 -0
  73. package/dist/sdk.js +48 -0
  74. package/dist/secrets/secrets.d.ts +65 -0
  75. package/dist/secrets/secrets.js +57 -0
  76. package/dist/service-client/service-client.d.ts +35 -0
  77. package/dist/service-client/service-client.js +90 -0
  78. package/dist/services/services.d.ts +122 -0
  79. package/dist/services/services.js +89 -0
  80. package/dist/sso/sso.d.ts +70 -0
  81. package/dist/sso/sso.js +54 -0
  82. package/dist/tables/tables.d.ts +133 -0
  83. package/dist/tables/tables.js +131 -0
  84. package/dist/tool.d.ts +31 -0
  85. package/dist/tool.js +4 -0
  86. package/dist/user-settings/user-settings.d.ts +44 -0
  87. package/dist/user-settings/user-settings.js +44 -0
  88. package/dist/users/users.d.ts +254 -0
  89. package/dist/users/users.js +125 -0
  90. package/dist/validation/validation.d.ts +106 -0
  91. package/dist/validation/validation.js +41 -0
  92. package/dist/versions/versions.d.ts +100 -0
  93. package/dist/versions/versions.js +70 -0
  94. package/package.json +27 -4
@@ -0,0 +1,254 @@
1
+ import { z } from "zod";
2
+ export declare const UserId: z.ZodTemplateLiteral<`user_${string}`>;
3
+ export declare const UserKind: z.ZodEnum<{
4
+ machine: "machine";
5
+ human: "human";
6
+ }>;
7
+ export type UserKind = z.infer<typeof UserKind>;
8
+ export declare const UserStatus: z.ZodEnum<{
9
+ archived: "archived";
10
+ invited: "invited";
11
+ expired: "expired";
12
+ disabled: "disabled";
13
+ }>;
14
+ export type UserStatus = z.infer<typeof UserStatus>;
15
+ export declare const MachineKind: z.ZodEnum<{
16
+ operator: "operator";
17
+ external: "external";
18
+ }>;
19
+ export type MachineKind = z.infer<typeof MachineKind>;
20
+ export declare const OperatorProvider: z.ZodEnum<{
21
+ claude: "claude";
22
+ codex: "codex";
23
+ gemini: "gemini";
24
+ }>;
25
+ export type OperatorProvider = z.infer<typeof OperatorProvider>;
26
+ export declare const MessageMachine: z.ZodObject<{
27
+ kind: z.ZodEnum<{
28
+ operator: "operator";
29
+ external: "external";
30
+ }>;
31
+ provider: z.ZodNullable<z.ZodEnum<{
32
+ claude: "claude";
33
+ codex: "codex";
34
+ gemini: "gemini";
35
+ }>>;
36
+ }, z.core.$strict>;
37
+ export type MessageMachine = z.infer<typeof MessageMachine>;
38
+ export declare const MachineFacts: z.ZodObject<{
39
+ kind: z.ZodEnum<{
40
+ operator: "operator";
41
+ external: "external";
42
+ }>;
43
+ responsibleId: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
44
+ }, z.core.$strict>;
45
+ export type MachineFacts = z.infer<typeof MachineFacts>;
46
+ export declare const UserListInput: z.ZodObject<{
47
+ kind: z.ZodOptional<z.ZodEnum<{
48
+ machine: "machine";
49
+ human: "human";
50
+ }>>;
51
+ archived: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean, unknown>>;
52
+ search: z.ZodOptional<z.ZodString>;
53
+ cursor: z.ZodOptional<z.ZodUnion<readonly [z.ZodTemplateLiteral<`user_${string}`>, z.ZodTemplateLiteral<`invitation_${string}`>]>>;
54
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
55
+ }, z.core.$strict>;
56
+ export type UserListInput = z.infer<typeof UserListInput>;
57
+ export declare const UserListItem: z.ZodObject<{
58
+ userId: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
59
+ invitationId: z.ZodNullable<z.ZodTemplateLiteral<`invitation_${string}`>>;
60
+ kind: z.ZodEnum<{
61
+ machine: "machine";
62
+ human: "human";
63
+ }>;
64
+ name: z.ZodString;
65
+ email: z.ZodNullable<z.ZodString>;
66
+ roles: z.ZodArray<z.ZodObject<{
67
+ roleId: z.ZodTemplateLiteral<`role_${string}`>;
68
+ name: z.ZodString;
69
+ }, z.core.$strict>>;
70
+ status: z.ZodNullable<z.ZodEnum<{
71
+ archived: "archived";
72
+ invited: "invited";
73
+ expired: "expired";
74
+ disabled: "disabled";
75
+ }>>;
76
+ machine: z.ZodNullable<z.ZodObject<{
77
+ kind: z.ZodEnum<{
78
+ operator: "operator";
79
+ external: "external";
80
+ }>;
81
+ responsibleId: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
82
+ }, z.core.$strict>>;
83
+ statusAt: z.ZodNullable<z.ZodISODateTime>;
84
+ createdAt: z.ZodISODateTime;
85
+ }, z.core.$strict>;
86
+ export type UserListItem = z.infer<typeof UserListItem>;
87
+ export declare const UserList: z.ZodObject<{
88
+ items: z.ZodArray<z.ZodObject<{
89
+ userId: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
90
+ invitationId: z.ZodNullable<z.ZodTemplateLiteral<`invitation_${string}`>>;
91
+ kind: z.ZodEnum<{
92
+ machine: "machine";
93
+ human: "human";
94
+ }>;
95
+ name: z.ZodString;
96
+ email: z.ZodNullable<z.ZodString>;
97
+ roles: z.ZodArray<z.ZodObject<{
98
+ roleId: z.ZodTemplateLiteral<`role_${string}`>;
99
+ name: z.ZodString;
100
+ }, z.core.$strict>>;
101
+ status: z.ZodNullable<z.ZodEnum<{
102
+ archived: "archived";
103
+ invited: "invited";
104
+ expired: "expired";
105
+ disabled: "disabled";
106
+ }>>;
107
+ machine: z.ZodNullable<z.ZodObject<{
108
+ kind: z.ZodEnum<{
109
+ operator: "operator";
110
+ external: "external";
111
+ }>;
112
+ responsibleId: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
113
+ }, z.core.$strict>>;
114
+ statusAt: z.ZodNullable<z.ZodISODateTime>;
115
+ createdAt: z.ZodISODateTime;
116
+ }, z.core.$strict>>;
117
+ nextCursor: z.ZodNullable<z.ZodUnion<readonly [z.ZodTemplateLiteral<`user_${string}`>, z.ZodTemplateLiteral<`invitation_${string}`>]>>;
118
+ }, z.core.$strict>;
119
+ export type UserList = z.infer<typeof UserList>;
120
+ export declare const OwnRoleList: z.ZodObject<{
121
+ items: z.ZodArray<z.ZodObject<{
122
+ roleId: z.ZodTemplateLiteral<`role_${string}`>;
123
+ name: z.ZodString;
124
+ }, z.core.$strict>>;
125
+ }, z.core.$strict>;
126
+ export type OwnRoleList = z.infer<typeof OwnRoleList>;
127
+ export declare const UserGetInput: z.ZodObject<{
128
+ userId: z.ZodTemplateLiteral<`user_${string}`>;
129
+ }, z.core.$strict>;
130
+ export type UserGetInput = z.infer<typeof UserGetInput>;
131
+ export declare const SignInMethod: z.ZodEnum<{
132
+ password: "password";
133
+ google: "google";
134
+ microsoft: "microsoft";
135
+ passkey: "passkey";
136
+ key: "key";
137
+ }>;
138
+ export type SignInMethod = z.infer<typeof SignInMethod>;
139
+ export declare const User: z.ZodObject<{
140
+ userId: z.ZodTemplateLiteral<`user_${string}`>;
141
+ kind: z.ZodEnum<{
142
+ machine: "machine";
143
+ human: "human";
144
+ }>;
145
+ name: z.ZodString;
146
+ email: z.ZodNullable<z.ZodString>;
147
+ roles: z.ZodArray<z.ZodObject<{
148
+ roleId: z.ZodTemplateLiteral<`role_${string}`>;
149
+ name: z.ZodString;
150
+ }, z.core.$strict>>;
151
+ status: z.ZodNullable<z.ZodEnum<{
152
+ archived: "archived";
153
+ invited: "invited";
154
+ expired: "expired";
155
+ disabled: "disabled";
156
+ }>>;
157
+ machine: z.ZodNullable<z.ZodObject<{
158
+ kind: z.ZodEnum<{
159
+ operator: "operator";
160
+ external: "external";
161
+ }>;
162
+ responsibleId: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
163
+ }, z.core.$strict>>;
164
+ createdAt: z.ZodISODateTime;
165
+ updatedAt: z.ZodISODateTime;
166
+ }, z.core.$strict>;
167
+ export type User = z.infer<typeof User>;
168
+ export declare const MachineKeyFacts: z.ZodObject<{
169
+ start: z.ZodString;
170
+ end: z.ZodNullable<z.ZodString>;
171
+ createdAt: z.ZodISODateTime;
172
+ createdBy: z.ZodNullable<z.ZodObject<{
173
+ userId: z.ZodTemplateLiteral<`user_${string}`>;
174
+ name: z.ZodString;
175
+ }, z.core.$strict>>;
176
+ lastUsedAt: z.ZodNullable<z.ZodISODateTime>;
177
+ }, z.core.$strict>;
178
+ export type MachineKeyFacts = z.infer<typeof MachineKeyFacts>;
179
+ export declare const UserDetail: z.ZodObject<{
180
+ userId: z.ZodTemplateLiteral<`user_${string}`>;
181
+ kind: z.ZodEnum<{
182
+ machine: "machine";
183
+ human: "human";
184
+ }>;
185
+ name: z.ZodString;
186
+ email: z.ZodNullable<z.ZodString>;
187
+ roles: z.ZodArray<z.ZodObject<{
188
+ roleId: z.ZodTemplateLiteral<`role_${string}`>;
189
+ name: z.ZodString;
190
+ }, z.core.$strict>>;
191
+ status: z.ZodNullable<z.ZodEnum<{
192
+ archived: "archived";
193
+ invited: "invited";
194
+ expired: "expired";
195
+ disabled: "disabled";
196
+ }>>;
197
+ machine: z.ZodNullable<z.ZodObject<{
198
+ kind: z.ZodEnum<{
199
+ operator: "operator";
200
+ external: "external";
201
+ }>;
202
+ responsibleId: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
203
+ }, z.core.$strict>>;
204
+ createdAt: z.ZodISODateTime;
205
+ updatedAt: z.ZodISODateTime;
206
+ signIn: z.ZodArray<z.ZodEnum<{
207
+ password: "password";
208
+ google: "google";
209
+ microsoft: "microsoft";
210
+ passkey: "passkey";
211
+ key: "key";
212
+ }>>;
213
+ lastActiveAt: z.ZodNullable<z.ZodISODateTime>;
214
+ counts: z.ZodObject<{
215
+ roles: z.ZodNumber;
216
+ apps: z.ZodNumber;
217
+ events: z.ZodNumber;
218
+ }, z.core.$strict>;
219
+ keyFacts: z.ZodNullable<z.ZodObject<{
220
+ start: z.ZodString;
221
+ end: z.ZodNullable<z.ZodString>;
222
+ createdAt: z.ZodISODateTime;
223
+ createdBy: z.ZodNullable<z.ZodObject<{
224
+ userId: z.ZodTemplateLiteral<`user_${string}`>;
225
+ name: z.ZodString;
226
+ }, z.core.$strict>>;
227
+ lastUsedAt: z.ZodNullable<z.ZodISODateTime>;
228
+ }, z.core.$strict>>;
229
+ }, z.core.$strict>;
230
+ export type UserDetail = z.infer<typeof UserDetail>;
231
+ export declare const UserUpdateInput: z.ZodObject<{
232
+ userId: z.ZodTemplateLiteral<`user_${string}`>;
233
+ name: z.ZodOptional<z.ZodString>;
234
+ roleIds: z.ZodOptional<z.ZodArray<z.ZodTemplateLiteral<`role_${string}`>>>;
235
+ }, z.core.$strict>;
236
+ export type UserUpdateInput = z.infer<typeof UserUpdateInput>;
237
+ export declare const UserDisableInput: z.ZodObject<{
238
+ userId: z.ZodTemplateLiteral<`user_${string}`>;
239
+ }, z.core.$strict>;
240
+ export type UserDisableInput = z.infer<typeof UserDisableInput>;
241
+ export declare const UserEnableInput: z.ZodObject<{
242
+ userId: z.ZodTemplateLiteral<`user_${string}`>;
243
+ }, z.core.$strict>;
244
+ export type UserEnableInput = z.infer<typeof UserEnableInput>;
245
+ export declare const UserTestInput: z.ZodObject<{
246
+ userId: z.ZodTemplateLiteral<`user_${string}`>;
247
+ }, z.core.$strict>;
248
+ export type UserTestInput = z.infer<typeof UserTestInput>;
249
+ export declare const UserTestResult: z.ZodObject<{
250
+ accepted: z.ZodBoolean;
251
+ cause: z.ZodOptional<z.ZodString>;
252
+ to: z.ZodString;
253
+ }, z.core.$strict>;
254
+ export type UserTestResult = z.infer<typeof UserTestResult>;
@@ -0,0 +1,125 @@
1
+ import { z } from "zod";
2
+ import { idSchema } from "../ids/ids.js";
3
+ import { Delivery, InvitationId, RoleChip } from "../invitations/invitations.js";
4
+ import { Flag, Limit } from "../list-input.js";
5
+ import { Name } from "../profile/profile.js";
6
+ import { RoleId } from "../roles/roles.js";
7
+ // People and machines (Einstellungen › Nutzer, #25): the inputs of the `access_user_*` tools and
8
+ // their answers. A machine is a user with a key instead of a password (Betrieb › Operator und
9
+ // Maschinen); renaming, roles and locking go through these tools for both.
10
+ export const UserId = idSchema("user");
11
+ export const UserKind = z.enum(["human", "machine"]);
12
+ // Only a deviation is a status (Einstellungen › Nutzer): an open invitation, one whose link has
13
+ // expired, a locked account, an archived machine. Everybody else has none.
14
+ export const UserStatus = z.enum(["invited", "expired", "disabled", "archived"]);
15
+ // The two kinds of machine (E84, E85): `operator`, a Claude-Operator Colab runs itself with a token
16
+ // per run and no key ("Operator · Claude"); `external`, one that signs in with its key ("Maschine ·
17
+ // extern").
18
+ export const MachineKind = z.enum(["operator", "external"]);
19
+ // The providers of the catalog (`operatorProviders` in `operators.ts`). Here, beside the kinds, so a
20
+ // schema of `nodes` or `messages` can name it without importing `operators`, which reaches `nodes`
21
+ // through `dashboards`.
22
+ export const OperatorProvider = z.enum(["claude", "codex", "gemini"]);
23
+ // What a machine is beside its name (#348, #403, E77, E80, E85): its kind from `access`, and for an
24
+ // Operator the provider it runs at from `operator`; null for one whose row is gone there. A chat
25
+ // message's author and a person in the user list carry it.
26
+ export const MessageMachine = z.strictObject({
27
+ kind: MachineKind,
28
+ provider: OperatorProvider.nullable(),
29
+ });
30
+ // What only a machine has (E76): its kind and the person its disturbances reach. Null for a person.
31
+ export const MachineFacts = z.strictObject({
32
+ kind: MachineKind,
33
+ // At first whoever created it; null for one whose responsible person is unknown.
34
+ responsibleId: UserId.nullable(),
35
+ });
36
+ export const UserListInput = z.strictObject({
37
+ // An open invitation always goes to a person: it is listed under `human`, never under `machine`.
38
+ kind: UserKind.optional(),
39
+ // The archive instead (#447): only archived people and machines, no invitation. Leaving it out
40
+ // lists everyone who is not archived, locked ones and open invitations included.
41
+ archived: Flag.optional(),
42
+ // Part of the name or the address, case-insensitive.
43
+ search: z.string().trim().min(1).max(200).optional(),
44
+ cursor: z.union([UserId, InvitationId]).optional(),
45
+ limit: Limit.optional(),
46
+ });
47
+ // One row of the list: a person, a machine, or an open invitation (then `invitationId` is set and
48
+ // `userId` is null; the name stays empty until the person chooses one).
49
+ export const UserListItem = z.strictObject({
50
+ userId: UserId.nullable(),
51
+ invitationId: InvitationId.nullable(),
52
+ kind: UserKind,
53
+ name: z.string(),
54
+ // A machine has no address of its own.
55
+ email: z.string().nullable(),
56
+ roles: z.array(RoleChip),
57
+ status: UserStatus.nullable(),
58
+ machine: MachineFacts.nullable(),
59
+ // The date the status names (#240): since when an account is locked ("Gesperrt · seit …"), until
60
+ // when an invitation runs or since when it has run out ("Eingeladen · bis …"). Null without one.
61
+ statusAt: z.iso.datetime().nullable(),
62
+ createdAt: z.iso.datetime(),
63
+ });
64
+ export const UserList = z.strictObject({
65
+ items: z.array(UserListItem),
66
+ nextCursor: z.union([UserId, InvitationId]).nullable(),
67
+ });
68
+ // The person's own roles at `GET /auth/roles` (Einstellungen › Profil, #30): only to look at, so no
69
+ // tool and no parameter that could name somebody else. An archived role gives no rights and is left out.
70
+ export const OwnRoleList = z.strictObject({ items: z.array(RoleChip) });
71
+ export const UserGetInput = z.strictObject({ userId: UserId });
72
+ // How an account signs in: a password, a provider, a passkey, or a machine's key.
73
+ export const SignInMethod = z.enum(["password", "google", "microsoft", "passkey", "key"]);
74
+ // One user with what the detail page shows: Art, Anmeldung, Zuletzt aktiv, Dabei seit, and the counts
75
+ // of the tabs Rollen, Apps and Protokoll.
76
+ export const User = z.strictObject({
77
+ userId: UserId,
78
+ kind: UserKind,
79
+ name: z.string(),
80
+ email: z.string().nullable(),
81
+ roles: z.array(RoleChip),
82
+ status: UserStatus.nullable(),
83
+ machine: MachineFacts.nullable(),
84
+ createdAt: z.iso.datetime(),
85
+ updatedAt: z.iso.datetime(),
86
+ });
87
+ // The key of an external machine as the tab Schlüssel shows it (#367, E84): never the key and never
88
+ // its hash, only its first six and last four letters. `end` is null for a key made before #367, which
89
+ // stored no end; `createdBy` is null when that is unknown or the account is gone.
90
+ export const MachineKeyFacts = z.strictObject({
91
+ start: z.string(),
92
+ end: z.string().nullable(),
93
+ createdAt: z.iso.datetime(),
94
+ createdBy: z.strictObject({ userId: UserId, name: z.string() }).nullable(),
95
+ lastUsedAt: z.iso.datetime().nullable(),
96
+ });
97
+ export const UserDetail = User.extend({
98
+ signIn: z.array(SignInMethod),
99
+ lastActiveAt: z.iso.datetime().nullable(),
100
+ counts: z.strictObject({
101
+ roles: z.number().int(),
102
+ apps: z.number().int(),
103
+ events: z.number().int(),
104
+ }),
105
+ // Null for a person, a Claude-Operator and a machine without a key. ⚠️ Never call it `key`: `/mcp`
106
+ // redacts a field of that name whole (`redactSecrets` in `shared`), and the AI would read
107
+ // "[redacted]" where the UI reads the facts.
108
+ keyFacts: MachineKeyFacts.nullable(),
109
+ });
110
+ // Renames and sets the roles. `roleIds` is the WHOLE set: what is missing is taken away, an empty
111
+ // list takes every role.
112
+ export const UserUpdateInput = z
113
+ .strictObject({
114
+ userId: UserId,
115
+ name: Name.optional(),
116
+ roleIds: z.array(RoleId).max(50).optional(),
117
+ })
118
+ .refine((input) => input.name !== undefined || input.roleIds !== undefined, {
119
+ message: "Name a field to change: name or roleIds.",
120
+ });
121
+ export const UserDisableInput = z.strictObject({ userId: UserId });
122
+ export const UserEnableInput = z.strictObject({ userId: UserId });
123
+ export const UserTestInput = z.strictObject({ userId: UserId });
124
+ // The real result of the delivery, for the one who asked (Funktionen › E-Mails, Testmail).
125
+ export const UserTestResult = Delivery.extend({ to: z.string() });
@@ -0,0 +1,106 @@
1
+ import { z } from "zod";
2
+ export declare const validationBoardId: "node_0000000000000000000000VA1D";
3
+ export declare const ValidationBoardId: z.ZodLiteral<"node_0000000000000000000000VA1D">;
4
+ export type ValidationBoardId = z.infer<typeof ValidationBoardId>;
5
+ export declare const TicketColumn: z.ZodObject<{
6
+ columnId: z.ZodTemplateLiteral<`column_${string}`>;
7
+ name: z.ZodNullable<z.ZodString>;
8
+ type: z.ZodNullable<z.ZodEnum<{
9
+ backlog: "backlog";
10
+ open: "open";
11
+ progress: "progress";
12
+ done: "done";
13
+ discarded: "discarded";
14
+ blocked: "blocked";
15
+ archive: "archive";
16
+ }>>;
17
+ }, z.core.$strict>;
18
+ export type TicketColumn = z.infer<typeof TicketColumn>;
19
+ export declare const TicketMove: z.ZodObject<{
20
+ from: z.ZodNullable<z.ZodObject<{
21
+ columnId: z.ZodTemplateLiteral<`column_${string}`>;
22
+ name: z.ZodNullable<z.ZodString>;
23
+ type: z.ZodNullable<z.ZodEnum<{
24
+ backlog: "backlog";
25
+ open: "open";
26
+ progress: "progress";
27
+ done: "done";
28
+ discarded: "discarded";
29
+ blocked: "blocked";
30
+ archive: "archive";
31
+ }>>;
32
+ }, z.core.$strict>>;
33
+ to: z.ZodObject<{
34
+ columnId: z.ZodTemplateLiteral<`column_${string}`>;
35
+ name: z.ZodNullable<z.ZodString>;
36
+ type: z.ZodNullable<z.ZodEnum<{
37
+ backlog: "backlog";
38
+ open: "open";
39
+ progress: "progress";
40
+ done: "done";
41
+ discarded: "discarded";
42
+ blocked: "blocked";
43
+ archive: "archive";
44
+ }>>;
45
+ }, z.core.$strict>;
46
+ movedBy: z.ZodObject<{
47
+ userId: z.ZodString;
48
+ name: z.ZodNullable<z.ZodString>;
49
+ kind: z.ZodNullable<z.ZodEnum<{
50
+ machine: "machine";
51
+ human: "human";
52
+ }>>;
53
+ }, z.core.$strict>;
54
+ movedAt: z.ZodISODateTime;
55
+ comment: z.ZodNullable<z.ZodString>;
56
+ }, z.core.$strict>;
57
+ export type TicketMove = z.infer<typeof TicketMove>;
58
+ export declare const TicketSubject: z.ZodObject<{
59
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
60
+ kind: z.ZodEnum<{
61
+ file: "file";
62
+ folder: "folder";
63
+ document: "document";
64
+ table: "table";
65
+ board: "board";
66
+ task: "task";
67
+ dashboard: "dashboard";
68
+ }>;
69
+ name: z.ZodString;
70
+ path: z.ZodObject<{
71
+ section: z.ZodEnum<{
72
+ users: "users";
73
+ own: "own";
74
+ shared: "shared";
75
+ }>;
76
+ items: z.ZodArray<z.ZodObject<{
77
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
78
+ name: z.ZodString;
79
+ }, z.core.$strict>>;
80
+ }, z.core.$strict>;
81
+ }, z.core.$strict>;
82
+ export type TicketSubject = z.infer<typeof TicketSubject>;
83
+ export declare const TicketSubjectRef: z.ZodObject<{
84
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
85
+ kind: z.ZodEnum<{
86
+ file: "file";
87
+ folder: "folder";
88
+ document: "document";
89
+ table: "table";
90
+ board: "board";
91
+ task: "task";
92
+ dashboard: "dashboard";
93
+ }>;
94
+ path: z.ZodObject<{
95
+ section: z.ZodEnum<{
96
+ users: "users";
97
+ own: "own";
98
+ shared: "shared";
99
+ }>;
100
+ items: z.ZodArray<z.ZodObject<{
101
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
102
+ name: z.ZodString;
103
+ }, z.core.$strict>>;
104
+ }, z.core.$strict>;
105
+ }, z.core.$strict>;
106
+ export type TicketSubjectRef = z.infer<typeof TicketSubjectRef>;
@@ -0,0 +1,41 @@
1
+ import { z } from "zod";
2
+ import { ColumnId, ColumnType } from "../columns/columns.js";
3
+ import { NodeId, NodeKind, NodePath, NodePerson } from "../nodes/nodes.js";
4
+ // The validation (#47, Seiten › Validierung, E33, E48, E67): one board per Colab, a ticket per
5
+ // document, table and file, and the history of every ticket. The board is a node with a fixed id
6
+ // that stands in no area of the tree; its tickets are tasks whose node is the one they validate. A
7
+ // node's own status is `NodeValidation` in `nodes.ts`, beside the node it describes.
8
+ // ⚠️ The board's fixed id: the same in every Colab, made on its first use (`ensureValidationBoard`
9
+ // in `intelligence`), never in a folder. A ULID of zeros and `VA1D`, so no `createId` makes it.
10
+ export const validationBoardId = "node_0000000000000000000000VA1D";
11
+ export const ValidationBoardId = z
12
+ .literal(validationBoardId)
13
+ .describe("The validation board, the same id in every Colab.");
14
+ // A column a ticket left or entered. Its name and type as they stand now; both null when the
15
+ // company has removed the column since.
16
+ export const TicketColumn = z.strictObject({
17
+ columnId: ColumnId,
18
+ name: z.string().nullable(),
19
+ type: ColumnType.nullable(),
20
+ });
21
+ // One line of a ticket's history ("Verlauf"): every move, by Colab's bookkeeping or by hand.
22
+ export const TicketMove = z.strictObject({
23
+ // Null for the line that opened the ticket.
24
+ from: TicketColumn.nullable(),
25
+ to: TicketColumn,
26
+ // Who moved it; for a move of the bookkeeping, whoever wrote the change that caused it.
27
+ movedBy: NodePerson,
28
+ movedAt: z.iso.datetime(),
29
+ // What the mover wrote with it, null without a word.
30
+ comment: z.string().nullable(),
31
+ });
32
+ // The node a ticket validates, as the caller can read it.
33
+ export const TicketSubject = z.strictObject({
34
+ nodeId: NodeId,
35
+ kind: NodeKind,
36
+ name: z.string(),
37
+ path: NodePath,
38
+ });
39
+ // A ticket on a card: which node it validates, and where it stands as the caller reads it (#209:
40
+ // three `.INSTRUCTIONS` on one board are told apart by their place).
41
+ export const TicketSubjectRef = z.strictObject({ nodeId: NodeId, kind: NodeKind, path: NodePath });
@@ -0,0 +1,100 @@
1
+ import { z } from "zod";
2
+ export declare const VersionId: z.ZodTemplateLiteral<`version_${string}`>;
3
+ export type VersionId = z.infer<typeof VersionId>;
4
+ export declare const versionKinds: readonly ["document", "table", "file"];
5
+ export declare const NodeVersionListInput: z.ZodObject<{
6
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
7
+ cursor: z.ZodOptional<z.ZodString>;
8
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
9
+ }, z.core.$strict>;
10
+ export type NodeVersionListInput = z.infer<typeof NodeVersionListInput>;
11
+ export declare const NodeVersionGetInput: z.ZodObject<{
12
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
13
+ versionId: z.ZodTemplateLiteral<`version_${string}`>;
14
+ }, z.core.$strict>;
15
+ export type NodeVersionGetInput = z.infer<typeof NodeVersionGetInput>;
16
+ export declare const NodeVersionCreateInput: z.ZodObject<{
17
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
18
+ fromVersionId: z.ZodTemplateLiteral<`version_${string}`>;
19
+ rev: z.ZodNumber;
20
+ }, z.core.$strict>;
21
+ export type NodeVersionCreateInput = z.infer<typeof NodeVersionCreateInput>;
22
+ export declare const NodeVersion: z.ZodObject<{
23
+ versionId: z.ZodTemplateLiteral<`version_${string}`>;
24
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
25
+ number: z.ZodNumber;
26
+ createdAt: z.ZodISODateTime;
27
+ updatedAt: z.ZodISODateTime;
28
+ createdBy: z.ZodObject<{
29
+ userId: z.ZodString;
30
+ name: z.ZodNullable<z.ZodString>;
31
+ kind: z.ZodNullable<z.ZodEnum<{
32
+ machine: "machine";
33
+ human: "human";
34
+ }>>;
35
+ }, z.core.$strict>;
36
+ appHandle: z.ZodNullable<z.ZodString>;
37
+ restoredFrom: z.ZodNullable<z.ZodNumber>;
38
+ current: z.ZodBoolean;
39
+ size: z.ZodNumber;
40
+ }, z.core.$strict>;
41
+ export type NodeVersion = z.infer<typeof NodeVersion>;
42
+ export declare const NodeVersionList: z.ZodObject<{
43
+ items: z.ZodArray<z.ZodObject<{
44
+ versionId: z.ZodTemplateLiteral<`version_${string}`>;
45
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
46
+ number: z.ZodNumber;
47
+ createdAt: z.ZodISODateTime;
48
+ updatedAt: z.ZodISODateTime;
49
+ createdBy: z.ZodObject<{
50
+ userId: z.ZodString;
51
+ name: z.ZodNullable<z.ZodString>;
52
+ kind: z.ZodNullable<z.ZodEnum<{
53
+ machine: "machine";
54
+ human: "human";
55
+ }>>;
56
+ }, z.core.$strict>;
57
+ appHandle: z.ZodNullable<z.ZodString>;
58
+ restoredFrom: z.ZodNullable<z.ZodNumber>;
59
+ current: z.ZodBoolean;
60
+ size: z.ZodNumber;
61
+ }, z.core.$strict>>;
62
+ nextCursor: z.ZodNullable<z.ZodString>;
63
+ rev: z.ZodNumber;
64
+ }, z.core.$strict>;
65
+ export type NodeVersionList = z.infer<typeof NodeVersionList>;
66
+ export declare const NodeVersionDetail: z.ZodObject<{
67
+ versionId: z.ZodTemplateLiteral<`version_${string}`>;
68
+ nodeId: z.ZodTemplateLiteral<`node_${string}`>;
69
+ number: z.ZodNumber;
70
+ createdAt: z.ZodISODateTime;
71
+ updatedAt: z.ZodISODateTime;
72
+ createdBy: z.ZodObject<{
73
+ userId: z.ZodString;
74
+ name: z.ZodNullable<z.ZodString>;
75
+ kind: z.ZodNullable<z.ZodEnum<{
76
+ machine: "machine";
77
+ human: "human";
78
+ }>>;
79
+ }, z.core.$strict>;
80
+ appHandle: z.ZodNullable<z.ZodString>;
81
+ restoredFrom: z.ZodNullable<z.ZodNumber>;
82
+ current: z.ZodBoolean;
83
+ size: z.ZodNumber;
84
+ secret: z.ZodOptional<z.ZodLiteral<true>>;
85
+ locked: z.ZodOptional<z.ZodBoolean>;
86
+ content: z.ZodNullable<z.ZodString>;
87
+ mediaType: z.ZodNullable<z.ZodString>;
88
+ columns: z.ZodNullable<z.ZodArray<z.ZodObject<{
89
+ name: z.ZodString;
90
+ type: z.ZodEnum<{
91
+ number: "number";
92
+ date: "date";
93
+ email: "email";
94
+ text: "text";
95
+ chip: "chip";
96
+ }>;
97
+ }, z.core.$strict>>>;
98
+ rev: z.ZodNumber;
99
+ }, z.core.$strict>;
100
+ export type NodeVersionDetail = z.infer<typeof NodeVersionDetail>;