@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.
Files changed (75) hide show
  1. package/dist/actions/actions.d.ts +113 -113
  2. package/dist/actions/actions.js +21 -21
  3. package/dist/apps/apps.d.ts +8 -8
  4. package/dist/apps/apps.js +6 -6
  5. package/dist/archive/archive.d.ts +2 -2
  6. package/dist/archive/archive.js +2 -2
  7. package/dist/boards/boards.d.ts +60 -60
  8. package/dist/boards/boards.js +19 -19
  9. package/dist/columns/columns.d.ts +1 -1
  10. package/dist/columns/columns.js +1 -1
  11. package/dist/connections/connections.d.ts +15 -15
  12. package/dist/connections/connections.js +6 -6
  13. package/dist/connectors/connectors.d.ts +14 -14
  14. package/dist/connectors/connectors.js +7 -7
  15. package/dist/dashboards/dashboards.d.ts +3 -3
  16. package/dist/dashboards/dashboards.js +3 -3
  17. package/dist/directory/directory.d.ts +1 -1
  18. package/dist/directory/directory.js +1 -1
  19. package/dist/documents/documents.d.ts +6 -6
  20. package/dist/documents/documents.js +1 -1
  21. package/dist/events/events.d.ts +7 -7
  22. package/dist/events/events.js +4 -4
  23. package/dist/files/files.d.ts +19 -5
  24. package/dist/files/files.js +12 -6
  25. package/dist/functions/functions.d.ts +1 -1
  26. package/dist/functions/functions.js +1 -1
  27. package/dist/grammar/grammar.d.ts +1 -0
  28. package/dist/grammar/grammar.js +5 -1
  29. package/dist/grants/grants.d.ts +7 -7
  30. package/dist/grants/grants.js +5 -5
  31. package/dist/instructions/instructions.d.ts +3 -3
  32. package/dist/instructions/instructions.js +2 -2
  33. package/dist/interfaces/interfaces.d.ts +1 -1
  34. package/dist/interfaces/interfaces.js +1 -1
  35. package/dist/invitations/invitations.d.ts +8 -8
  36. package/dist/invitations/invitations.js +4 -4
  37. package/dist/links/links.d.ts +3 -3
  38. package/dist/links/links.js +2 -2
  39. package/dist/machines/machines.d.ts +5 -5
  40. package/dist/machines/machines.js +2 -2
  41. package/dist/messages/messages.d.ts +12 -12
  42. package/dist/messages/messages.js +5 -5
  43. package/dist/nodes/nodes.d.ts +58 -58
  44. package/dist/nodes/nodes.js +19 -19
  45. package/dist/operators/operators.d.ts +136 -46
  46. package/dist/operators/operators.js +80 -20
  47. package/dist/pages/pages.d.ts +22 -22
  48. package/dist/pages/pages.js +8 -6
  49. package/dist/profile/profile.d.ts +1 -1
  50. package/dist/profile/profile.js +1 -1
  51. package/dist/roles/roles.d.ts +12 -12
  52. package/dist/roles/roles.js +7 -7
  53. package/dist/runs/runs.d.ts +23 -23
  54. package/dist/runs/runs.js +9 -9
  55. package/dist/runtime-config.d.ts +1 -1
  56. package/dist/runtime-config.js +1 -1
  57. package/dist/sdk.d.ts +2 -2
  58. package/dist/sdk.js +2 -2
  59. package/dist/secrets/secrets.d.ts +5 -5
  60. package/dist/secrets/secrets.js +2 -2
  61. package/dist/services/services.d.ts +15 -15
  62. package/dist/services/services.js +6 -6
  63. package/dist/sso/sso.d.ts +4 -4
  64. package/dist/sso/sso.js +3 -3
  65. package/dist/tables/tables.d.ts +4 -4
  66. package/dist/tables/tables.js +4 -4
  67. package/dist/user-settings/user-settings.d.ts +1 -1
  68. package/dist/user-settings/user-settings.js +1 -1
  69. package/dist/users/users.d.ts +23 -23
  70. package/dist/users/users.js +9 -9
  71. package/dist/validation/validation.d.ts +11 -11
  72. package/dist/validation/validation.js +4 -4
  73. package/dist/versions/versions.d.ts +7 -7
  74. package/dist/versions/versions.js +2 -2
  75. package/package.json +1 -1
@@ -30,15 +30,15 @@ export const McpUrl = z
30
30
  return (url !== null &&
31
31
  (url.protocol === "https:" || (url.protocol === "http:" && localHosts.has(url.hostname))));
32
32
  }, "An MCP address starts with https:// (on this computer also http://localhost)");
33
- export const ServiceFunction = z.strictObject({ functionId: FunctionId, name: z.string() });
34
- export const ServiceInterface = z.strictObject({
33
+ export const ServiceFunction = z.object({ functionId: FunctionId, name: z.string() });
34
+ export const ServiceInterface = z.object({
35
35
  interfaceId: InterfaceId,
36
36
  name: z.string(),
37
37
  functions: z.array(ServiceFunction),
38
38
  });
39
39
  // A service with its interfaces and functions as a tree. ⚠️ Never its key or the key's hash, and no
40
40
  // "last seen" (Einstellungen › Services).
41
- export const Service = z.strictObject({
41
+ export const Service = z.object({
42
42
  serviceId: ServiceId,
43
43
  name: z.string(),
44
44
  oauthResource: z.string().nullable(),
@@ -54,7 +54,7 @@ export const ServiceListInput = z.strictObject({
54
54
  cursor: ServiceId.optional(),
55
55
  limit: Limit.optional(),
56
56
  });
57
- export const ServiceList = z.strictObject({
57
+ export const ServiceList = z.object({
58
58
  items: z.array(Service),
59
59
  nextCursor: ServiceId.nullable(),
60
60
  });
@@ -65,7 +65,7 @@ export const ServiceCreateInput = z.strictObject({
65
65
  });
66
66
  // The answer of create and rotate: the key, shown this once. Only its hash is stored, so nobody can
67
67
  // show it again; a lost key is rotated.
68
- export const ServiceKeyIssued = z.strictObject({ service: Service, serviceKey: z.string() });
68
+ export const ServiceKeyIssued = z.object({ service: Service, serviceKey: z.string() });
69
69
  // Renaming a service renames its rights in every role (the only way that keeps them). The OAuth
70
70
  // resource is bound once: set while it is empty, never changed after. The MCP address changes freely;
71
71
  // `null` takes it away.
@@ -82,7 +82,7 @@ export const ServiceArchiveInput = z.strictObject({ serviceId: ServiceId });
82
82
  export const ServiceRestoreInput = z.strictObject({ serviceId: ServiceId });
83
83
  export const ServicePurgeInput = z.strictObject({ serviceId: ServiceId });
84
84
  // What fell with a purged service: its name (the row is gone) and how many rights the roles lost.
85
- export const ServicePurged = z.strictObject({
85
+ export const ServicePurged = z.object({
86
86
  serviceId: ServiceId,
87
87
  name: z.string(),
88
88
  grants: z.number().int(),
package/dist/sso/sso.d.ts CHANGED
@@ -41,7 +41,7 @@ export declare const Sso: z.ZodObject<{
41
41
  environment: "environment";
42
42
  }>>;
43
43
  redirectUrl: z.ZodURL;
44
- }, z.core.$strict>;
44
+ }, z.core.$strip>;
45
45
  export type Sso = z.infer<typeof Sso>;
46
46
  export declare const SsoList: z.ZodObject<{
47
47
  items: z.ZodArray<z.ZodObject<{
@@ -57,9 +57,9 @@ export declare const SsoList: z.ZodObject<{
57
57
  environment: "environment";
58
58
  }>>;
59
59
  redirectUrl: z.ZodURL;
60
- }, z.core.$strict>>;
60
+ }, z.core.$strip>>;
61
61
  nextCursor: z.ZodNull;
62
- }, z.core.$strict>;
62
+ }, z.core.$strip>;
63
63
  export type SsoList = z.infer<typeof SsoList>;
64
64
  export declare const SignInProviders: z.ZodObject<{
65
65
  providers: z.ZodArray<z.ZodEnum<{
@@ -67,5 +67,5 @@ export declare const SignInProviders: z.ZodObject<{
67
67
  microsoft: "microsoft";
68
68
  }>>;
69
69
  signUp: z.ZodBoolean;
70
- }, z.core.$strict>;
70
+ }, z.core.$strip>;
71
71
  export type SignInProviders = z.infer<typeof SignInProviders>;
package/dist/sso/sso.js CHANGED
@@ -34,7 +34,7 @@ export const SsoUpdateInput = z.strictObject({
34
34
  export const SsoRemoveInput = z.strictObject({
35
35
  ssoId: SsoId.describe("The provider: google or microsoft."),
36
36
  });
37
- export const Sso = z.strictObject({
37
+ export const Sso = z.object({
38
38
  ssoId: SsoId,
39
39
  // Set up here: the client id, when and by whom. Null while it is not set up here.
40
40
  clientId: z.string().nullable(),
@@ -44,7 +44,7 @@ export const Sso = z.strictObject({
44
44
  // The address to enter at the provider as the redirect URI ("Weiterleitungs-Adresse").
45
45
  redirectUrl: z.url(),
46
46
  });
47
- export const SsoList = z.strictObject({
47
+ export const SsoList = z.object({
48
48
  items: z.array(Sso),
49
49
  // Two rows at most: never a further page.
50
50
  nextCursor: z.null(),
@@ -52,7 +52,7 @@ export const SsoList = z.strictObject({
52
52
  // `GET /auth/providers`, public: which buttons the sign-in page shows, in their order. Nothing else
53
53
  // of a provider travels here. `signUp` is true only while no person exists: the first one signs up
54
54
  // on the page and becomes the main admin (E9, #539); after that it says nothing about anybody.
55
- export const SignInProviders = z.strictObject({
55
+ export const SignInProviders = z.object({
56
56
  providers: z.array(SsoId),
57
57
  signUp: z.boolean(),
58
58
  });
@@ -105,9 +105,9 @@ export declare const TableDetail: z.ZodObject<{
105
105
  rev: z.ZodNumber;
106
106
  rights: z.ZodObject<{
107
107
  write: z.ZodBoolean;
108
- }, z.core.$strict>;
108
+ }, z.core.$strip>;
109
109
  updatedAt: z.ZodISODateTime;
110
- }, z.core.$strict>;
110
+ }, z.core.$strip>;
111
111
  export type TableDetail = z.infer<typeof TableDetail>;
112
112
  export declare const TableSaved: z.ZodObject<{
113
113
  tableId: z.ZodTemplateLiteral<`node_${string}`>;
@@ -128,6 +128,6 @@ export declare const TableSaved: z.ZodObject<{
128
128
  removedColumns: z.ZodOptional<z.ZodArray<z.ZodObject<{
129
129
  name: z.ZodString;
130
130
  rows: z.ZodArray<z.ZodNumber>;
131
- }, z.core.$strict>>>;
132
- }, z.core.$strict>;
131
+ }, z.core.$strip>>>;
132
+ }, z.core.$strip>;
133
133
  export type TableSaved = z.infer<typeof TableSaved>;
@@ -95,7 +95,7 @@ export const TableUpdateInput = z.strictObject({
95
95
  .optional()
96
96
  .describe("Positions of the rows to remove, each counted in the state of the rev you send, so they do not shift while the call runs. Applied after replace and before append."),
97
97
  });
98
- export const TableDetail = z.strictObject({
98
+ export const TableDetail = z.object({
99
99
  tableId: TableId,
100
100
  name: z.string(),
101
101
  columns: z.array(TableColumn),
@@ -107,7 +107,7 @@ export const TableDetail = z.strictObject({
107
107
  version: z.number().int(),
108
108
  // The state the next save sends (E70).
109
109
  rev: z.number().int(),
110
- rights: z.strictObject({ write: z.boolean() }),
110
+ rights: z.object({ write: z.boolean() }),
111
111
  updatedAt: z.iso.datetime(),
112
112
  // A secret table (#357): no columns and no rows (an empty csv) while it is `locked` for this
113
113
  // caller.
@@ -115,7 +115,7 @@ export const TableDetail = z.strictObject({
115
115
  });
116
116
  // The answer of a create and an update: the state after it, without the rows, so appending one row
117
117
  // to a large table does not send the table back.
118
- export const TableSaved = z.strictObject({
118
+ export const TableSaved = z.object({
119
119
  tableId: TableId,
120
120
  name: z.string(),
121
121
  columns: z.array(TableColumn),
@@ -126,6 +126,6 @@ export const TableSaved = z.strictObject({
126
126
  // Only after a change of the columns: every removed column and the positions (in the new state)
127
127
  // of the rows whose content in it now stands only in the history.
128
128
  removedColumns: z
129
- .array(z.strictObject({ name: z.string(), rows: z.array(z.number().int()) }))
129
+ .array(z.object({ name: z.string(), rows: z.array(z.number().int()) }))
130
130
  .optional(),
131
131
  });
@@ -40,5 +40,5 @@ export declare const UserSettings: z.ZodObject<{
40
40
  de: "de";
41
41
  }>;
42
42
  updatedAt: z.ZodNullable<z.ZodISODateTime>;
43
- }, z.core.$strict>;
43
+ }, z.core.$strip>;
44
44
  export type UserSettings = z.infer<typeof UserSettings>;
@@ -32,7 +32,7 @@ export const IntelligenceUserUpdateInput = z.strictObject({
32
32
  .describe("The updatedAt your last read returned, null when it was null (nothing saved yet). If someone saved in between, the call answers conflict and changes nothing: read again and decide."),
33
33
  });
34
34
  // The answer of both: the values that apply now, stored or the defaults.
35
- export const UserSettings = z.strictObject({
35
+ export const UserSettings = z.object({
36
36
  userId: UserId,
37
37
  // A machine is always `never`: it fetches its tasks and messages over MCP itself.
38
38
  notify: NotifyMode,
@@ -33,7 +33,7 @@ export declare const MessageMachine: z.ZodObject<{
33
33
  codex: "codex";
34
34
  gemini: "gemini";
35
35
  }>>;
36
- }, z.core.$strict>;
36
+ }, z.core.$strip>;
37
37
  export type MessageMachine = z.infer<typeof MessageMachine>;
38
38
  export declare const MachineFacts: z.ZodObject<{
39
39
  kind: z.ZodEnum<{
@@ -41,7 +41,7 @@ export declare const MachineFacts: z.ZodObject<{
41
41
  external: "external";
42
42
  }>;
43
43
  responsibleId: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
44
- }, z.core.$strict>;
44
+ }, z.core.$strip>;
45
45
  export type MachineFacts = z.infer<typeof MachineFacts>;
46
46
  export declare const UserListInput: z.ZodObject<{
47
47
  kind: z.ZodOptional<z.ZodEnum<{
@@ -66,7 +66,7 @@ export declare const UserListItem: z.ZodObject<{
66
66
  roles: z.ZodArray<z.ZodObject<{
67
67
  roleId: z.ZodTemplateLiteral<`role_${string}`>;
68
68
  name: z.ZodString;
69
- }, z.core.$strict>>;
69
+ }, z.core.$strip>>;
70
70
  status: z.ZodNullable<z.ZodEnum<{
71
71
  archived: "archived";
72
72
  invited: "invited";
@@ -79,10 +79,10 @@ export declare const UserListItem: z.ZodObject<{
79
79
  external: "external";
80
80
  }>;
81
81
  responsibleId: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
82
- }, z.core.$strict>>;
82
+ }, z.core.$strip>>;
83
83
  statusAt: z.ZodNullable<z.ZodISODateTime>;
84
84
  createdAt: z.ZodISODateTime;
85
- }, z.core.$strict>;
85
+ }, z.core.$strip>;
86
86
  export type UserListItem = z.infer<typeof UserListItem>;
87
87
  export declare const UserList: z.ZodObject<{
88
88
  items: z.ZodArray<z.ZodObject<{
@@ -97,7 +97,7 @@ export declare const UserList: z.ZodObject<{
97
97
  roles: z.ZodArray<z.ZodObject<{
98
98
  roleId: z.ZodTemplateLiteral<`role_${string}`>;
99
99
  name: z.ZodString;
100
- }, z.core.$strict>>;
100
+ }, z.core.$strip>>;
101
101
  status: z.ZodNullable<z.ZodEnum<{
102
102
  archived: "archived";
103
103
  invited: "invited";
@@ -110,19 +110,19 @@ export declare const UserList: z.ZodObject<{
110
110
  external: "external";
111
111
  }>;
112
112
  responsibleId: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
113
- }, z.core.$strict>>;
113
+ }, z.core.$strip>>;
114
114
  statusAt: z.ZodNullable<z.ZodISODateTime>;
115
115
  createdAt: z.ZodISODateTime;
116
- }, z.core.$strict>>;
116
+ }, z.core.$strip>>;
117
117
  nextCursor: z.ZodNullable<z.ZodUnion<readonly [z.ZodTemplateLiteral<`user_${string}`>, z.ZodTemplateLiteral<`invitation_${string}`>]>>;
118
- }, z.core.$strict>;
118
+ }, z.core.$strip>;
119
119
  export type UserList = z.infer<typeof UserList>;
120
120
  export declare const OwnRoleList: z.ZodObject<{
121
121
  items: z.ZodArray<z.ZodObject<{
122
122
  roleId: z.ZodTemplateLiteral<`role_${string}`>;
123
123
  name: z.ZodString;
124
- }, z.core.$strict>>;
125
- }, z.core.$strict>;
124
+ }, z.core.$strip>>;
125
+ }, z.core.$strip>;
126
126
  export type OwnRoleList = z.infer<typeof OwnRoleList>;
127
127
  export declare const UserGetInput: z.ZodObject<{
128
128
  userId: z.ZodTemplateLiteral<`user_${string}`>;
@@ -147,7 +147,7 @@ export declare const User: z.ZodObject<{
147
147
  roles: z.ZodArray<z.ZodObject<{
148
148
  roleId: z.ZodTemplateLiteral<`role_${string}`>;
149
149
  name: z.ZodString;
150
- }, z.core.$strict>>;
150
+ }, z.core.$strip>>;
151
151
  status: z.ZodNullable<z.ZodEnum<{
152
152
  archived: "archived";
153
153
  invited: "invited";
@@ -160,10 +160,10 @@ export declare const User: z.ZodObject<{
160
160
  external: "external";
161
161
  }>;
162
162
  responsibleId: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
163
- }, z.core.$strict>>;
163
+ }, z.core.$strip>>;
164
164
  createdAt: z.ZodISODateTime;
165
165
  updatedAt: z.ZodISODateTime;
166
- }, z.core.$strict>;
166
+ }, z.core.$strip>;
167
167
  export type User = z.infer<typeof User>;
168
168
  export declare const MachineKeyFacts: z.ZodObject<{
169
169
  start: z.ZodString;
@@ -172,9 +172,9 @@ export declare const MachineKeyFacts: z.ZodObject<{
172
172
  createdBy: z.ZodNullable<z.ZodObject<{
173
173
  userId: z.ZodTemplateLiteral<`user_${string}`>;
174
174
  name: z.ZodString;
175
- }, z.core.$strict>>;
175
+ }, z.core.$strip>>;
176
176
  lastUsedAt: z.ZodNullable<z.ZodISODateTime>;
177
- }, z.core.$strict>;
177
+ }, z.core.$strip>;
178
178
  export type MachineKeyFacts = z.infer<typeof MachineKeyFacts>;
179
179
  export declare const UserDetail: z.ZodObject<{
180
180
  userId: z.ZodTemplateLiteral<`user_${string}`>;
@@ -187,7 +187,7 @@ export declare const UserDetail: z.ZodObject<{
187
187
  roles: z.ZodArray<z.ZodObject<{
188
188
  roleId: z.ZodTemplateLiteral<`role_${string}`>;
189
189
  name: z.ZodString;
190
- }, z.core.$strict>>;
190
+ }, z.core.$strip>>;
191
191
  status: z.ZodNullable<z.ZodEnum<{
192
192
  archived: "archived";
193
193
  invited: "invited";
@@ -200,7 +200,7 @@ export declare const UserDetail: z.ZodObject<{
200
200
  external: "external";
201
201
  }>;
202
202
  responsibleId: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
203
- }, z.core.$strict>>;
203
+ }, z.core.$strip>>;
204
204
  createdAt: z.ZodISODateTime;
205
205
  updatedAt: z.ZodISODateTime;
206
206
  signIn: z.ZodArray<z.ZodEnum<{
@@ -215,7 +215,7 @@ export declare const UserDetail: z.ZodObject<{
215
215
  roles: z.ZodNumber;
216
216
  apps: z.ZodNumber;
217
217
  events: z.ZodNumber;
218
- }, z.core.$strict>;
218
+ }, z.core.$strip>;
219
219
  keyFacts: z.ZodNullable<z.ZodObject<{
220
220
  start: z.ZodString;
221
221
  end: z.ZodNullable<z.ZodString>;
@@ -223,10 +223,10 @@ export declare const UserDetail: z.ZodObject<{
223
223
  createdBy: z.ZodNullable<z.ZodObject<{
224
224
  userId: z.ZodTemplateLiteral<`user_${string}`>;
225
225
  name: z.ZodString;
226
- }, z.core.$strict>>;
226
+ }, z.core.$strip>>;
227
227
  lastUsedAt: z.ZodNullable<z.ZodISODateTime>;
228
- }, z.core.$strict>>;
229
- }, z.core.$strict>;
228
+ }, z.core.$strip>>;
229
+ }, z.core.$strip>;
230
230
  export type UserDetail = z.infer<typeof UserDetail>;
231
231
  export declare const UserUpdateInput: z.ZodObject<{
232
232
  userId: z.ZodTemplateLiteral<`user_${string}`>;
@@ -250,5 +250,5 @@ export declare const UserTestResult: z.ZodObject<{
250
250
  accepted: z.ZodBoolean;
251
251
  cause: z.ZodOptional<z.ZodString>;
252
252
  to: z.ZodString;
253
- }, z.core.$strict>;
253
+ }, z.core.$strip>;
254
254
  export type UserTestResult = z.infer<typeof UserTestResult>;
@@ -23,12 +23,12 @@ export const OperatorProvider = z.enum(["claude", "codex", "gemini"]);
23
23
  // What a machine is beside its name (#348, #403, E77, E80, E85): its kind from `access`, and for an
24
24
  // Operator the provider it runs at from `operator`; null for one whose row is gone there. A chat
25
25
  // message's author and a person in the user list carry it.
26
- export const MessageMachine = z.strictObject({
26
+ export const MessageMachine = z.object({
27
27
  kind: MachineKind,
28
28
  provider: OperatorProvider.nullable(),
29
29
  });
30
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({
31
+ export const MachineFacts = z.object({
32
32
  kind: MachineKind,
33
33
  // At first whoever created it; null for one whose responsible person is unknown.
34
34
  responsibleId: UserId.nullable(),
@@ -46,7 +46,7 @@ export const UserListInput = z.strictObject({
46
46
  });
47
47
  // One row of the list: a person, a machine, or an open invitation (then `invitationId` is set and
48
48
  // `userId` is null; the name stays empty until the person chooses one).
49
- export const UserListItem = z.strictObject({
49
+ export const UserListItem = z.object({
50
50
  userId: UserId.nullable(),
51
51
  invitationId: InvitationId.nullable(),
52
52
  kind: UserKind,
@@ -61,19 +61,19 @@ export const UserListItem = z.strictObject({
61
61
  statusAt: z.iso.datetime().nullable(),
62
62
  createdAt: z.iso.datetime(),
63
63
  });
64
- export const UserList = z.strictObject({
64
+ export const UserList = z.object({
65
65
  items: z.array(UserListItem),
66
66
  nextCursor: z.union([UserId, InvitationId]).nullable(),
67
67
  });
68
68
  // The person's own roles at `GET /auth/roles` (Einstellungen › Profil, #30): only to look at, so no
69
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) });
70
+ export const OwnRoleList = z.object({ items: z.array(RoleChip) });
71
71
  export const UserGetInput = z.strictObject({ userId: UserId });
72
72
  // How an account signs in: a password, a provider, a passkey, or a machine's key.
73
73
  export const SignInMethod = z.enum(["password", "google", "microsoft", "passkey", "key"]);
74
74
  // One user with what the detail page shows: Art, Anmeldung, Zuletzt aktiv, Dabei seit, and the counts
75
75
  // of the tabs Rollen, Apps and Protokoll.
76
- export const User = z.strictObject({
76
+ export const User = z.object({
77
77
  userId: UserId,
78
78
  kind: UserKind,
79
79
  name: z.string(),
@@ -87,17 +87,17 @@ export const User = z.strictObject({
87
87
  // The key of an external machine as the tab Schlüssel shows it (#367, E84): never the key and never
88
88
  // its hash, only its first six and last four letters. `end` is null for a key made before #367, which
89
89
  // stored no end; `createdBy` is null when that is unknown or the account is gone.
90
- export const MachineKeyFacts = z.strictObject({
90
+ export const MachineKeyFacts = z.object({
91
91
  start: z.string(),
92
92
  end: z.string().nullable(),
93
93
  createdAt: z.iso.datetime(),
94
- createdBy: z.strictObject({ userId: UserId, name: z.string() }).nullable(),
94
+ createdBy: z.object({ userId: UserId, name: z.string() }).nullable(),
95
95
  lastUsedAt: z.iso.datetime().nullable(),
96
96
  });
97
97
  export const UserDetail = User.extend({
98
98
  signIn: z.array(SignInMethod),
99
99
  lastActiveAt: z.iso.datetime().nullable(),
100
- counts: z.strictObject({
100
+ counts: z.object({
101
101
  roles: z.number().int(),
102
102
  apps: z.number().int(),
103
103
  events: z.number().int(),
@@ -14,7 +14,7 @@ export declare const TicketColumn: z.ZodObject<{
14
14
  blocked: "blocked";
15
15
  archive: "archive";
16
16
  }>>;
17
- }, z.core.$strict>;
17
+ }, z.core.$strip>;
18
18
  export type TicketColumn = z.infer<typeof TicketColumn>;
19
19
  export declare const TicketMove: z.ZodObject<{
20
20
  from: z.ZodNullable<z.ZodObject<{
@@ -29,7 +29,7 @@ export declare const TicketMove: z.ZodObject<{
29
29
  blocked: "blocked";
30
30
  archive: "archive";
31
31
  }>>;
32
- }, z.core.$strict>>;
32
+ }, z.core.$strip>>;
33
33
  to: z.ZodObject<{
34
34
  columnId: z.ZodTemplateLiteral<`column_${string}`>;
35
35
  name: z.ZodNullable<z.ZodString>;
@@ -42,7 +42,7 @@ export declare const TicketMove: z.ZodObject<{
42
42
  blocked: "blocked";
43
43
  archive: "archive";
44
44
  }>>;
45
- }, z.core.$strict>;
45
+ }, z.core.$strip>;
46
46
  movedBy: z.ZodObject<{
47
47
  userId: z.ZodString;
48
48
  name: z.ZodNullable<z.ZodString>;
@@ -50,10 +50,10 @@ export declare const TicketMove: z.ZodObject<{
50
50
  machine: "machine";
51
51
  human: "human";
52
52
  }>>;
53
- }, z.core.$strict>;
53
+ }, z.core.$strip>;
54
54
  movedAt: z.ZodISODateTime;
55
55
  comment: z.ZodNullable<z.ZodString>;
56
- }, z.core.$strict>;
56
+ }, z.core.$strip>;
57
57
  export type TicketMove = z.infer<typeof TicketMove>;
58
58
  export declare const TicketSubject: z.ZodObject<{
59
59
  nodeId: z.ZodTemplateLiteral<`node_${string}`>;
@@ -76,9 +76,9 @@ export declare const TicketSubject: z.ZodObject<{
76
76
  items: z.ZodArray<z.ZodObject<{
77
77
  nodeId: z.ZodTemplateLiteral<`node_${string}`>;
78
78
  name: z.ZodString;
79
- }, z.core.$strict>>;
80
- }, z.core.$strict>;
81
- }, z.core.$strict>;
79
+ }, z.core.$strip>>;
80
+ }, z.core.$strip>;
81
+ }, z.core.$strip>;
82
82
  export type TicketSubject = z.infer<typeof TicketSubject>;
83
83
  export declare const TicketSubjectRef: z.ZodObject<{
84
84
  nodeId: z.ZodTemplateLiteral<`node_${string}`>;
@@ -100,7 +100,7 @@ export declare const TicketSubjectRef: z.ZodObject<{
100
100
  items: z.ZodArray<z.ZodObject<{
101
101
  nodeId: z.ZodTemplateLiteral<`node_${string}`>;
102
102
  name: z.ZodString;
103
- }, z.core.$strict>>;
104
- }, z.core.$strict>;
105
- }, z.core.$strict>;
103
+ }, z.core.$strip>>;
104
+ }, z.core.$strip>;
105
+ }, z.core.$strip>;
106
106
  export type TicketSubjectRef = z.infer<typeof TicketSubjectRef>;
@@ -13,13 +13,13 @@ export const ValidationBoardId = z
13
13
  .describe("The validation board, the same id in every Colab.");
14
14
  // A column a ticket left or entered. Its name and type as they stand now; both null when the
15
15
  // company has removed the column since.
16
- export const TicketColumn = z.strictObject({
16
+ export const TicketColumn = z.object({
17
17
  columnId: ColumnId,
18
18
  name: z.string().nullable(),
19
19
  type: ColumnType.nullable(),
20
20
  });
21
21
  // One line of a ticket's history ("Verlauf"): every move, by Colab's bookkeeping or by hand.
22
- export const TicketMove = z.strictObject({
22
+ export const TicketMove = z.object({
23
23
  // Null for the line that opened the ticket.
24
24
  from: TicketColumn.nullable(),
25
25
  to: TicketColumn,
@@ -30,7 +30,7 @@ export const TicketMove = z.strictObject({
30
30
  comment: z.string().nullable(),
31
31
  });
32
32
  // The node a ticket validates, as the caller can read it.
33
- export const TicketSubject = z.strictObject({
33
+ export const TicketSubject = z.object({
34
34
  nodeId: NodeId,
35
35
  kind: NodeKind,
36
36
  name: z.string(),
@@ -38,4 +38,4 @@ export const TicketSubject = z.strictObject({
38
38
  });
39
39
  // A ticket on a card: which node it validates, and where it stands as the caller reads it (#209:
40
40
  // three `.INSTRUCTIONS` on one board are told apart by their place).
41
- export const TicketSubjectRef = z.strictObject({ nodeId: NodeId, kind: NodeKind, path: NodePath });
41
+ export const TicketSubjectRef = z.object({ nodeId: NodeId, kind: NodeKind, path: NodePath });
@@ -32,12 +32,12 @@ export declare const NodeVersion: z.ZodObject<{
32
32
  machine: "machine";
33
33
  human: "human";
34
34
  }>>;
35
- }, z.core.$strict>;
35
+ }, z.core.$strip>;
36
36
  appHandle: z.ZodNullable<z.ZodString>;
37
37
  restoredFrom: z.ZodNullable<z.ZodNumber>;
38
38
  current: z.ZodBoolean;
39
39
  size: z.ZodNumber;
40
- }, z.core.$strict>;
40
+ }, z.core.$strip>;
41
41
  export type NodeVersion = z.infer<typeof NodeVersion>;
42
42
  export declare const NodeVersionList: z.ZodObject<{
43
43
  items: z.ZodArray<z.ZodObject<{
@@ -53,15 +53,15 @@ export declare const NodeVersionList: z.ZodObject<{
53
53
  machine: "machine";
54
54
  human: "human";
55
55
  }>>;
56
- }, z.core.$strict>;
56
+ }, z.core.$strip>;
57
57
  appHandle: z.ZodNullable<z.ZodString>;
58
58
  restoredFrom: z.ZodNullable<z.ZodNumber>;
59
59
  current: z.ZodBoolean;
60
60
  size: z.ZodNumber;
61
- }, z.core.$strict>>;
61
+ }, z.core.$strip>>;
62
62
  nextCursor: z.ZodNullable<z.ZodString>;
63
63
  rev: z.ZodNumber;
64
- }, z.core.$strict>;
64
+ }, z.core.$strip>;
65
65
  export type NodeVersionList = z.infer<typeof NodeVersionList>;
66
66
  export declare const NodeVersionDetail: z.ZodObject<{
67
67
  versionId: z.ZodTemplateLiteral<`version_${string}`>;
@@ -76,7 +76,7 @@ export declare const NodeVersionDetail: z.ZodObject<{
76
76
  machine: "machine";
77
77
  human: "human";
78
78
  }>>;
79
- }, z.core.$strict>;
79
+ }, z.core.$strip>;
80
80
  appHandle: z.ZodNullable<z.ZodString>;
81
81
  restoredFrom: z.ZodNullable<z.ZodNumber>;
82
82
  current: z.ZodBoolean;
@@ -96,5 +96,5 @@ export declare const NodeVersionDetail: z.ZodObject<{
96
96
  }>;
97
97
  }, z.core.$strict>>>;
98
98
  rev: z.ZodNumber;
99
- }, z.core.$strict>;
99
+ }, z.core.$strip>;
100
100
  export type NodeVersionDetail = z.infer<typeof NodeVersionDetail>;
@@ -31,7 +31,7 @@ export const NodeVersionCreateInput = z.strictObject({
31
31
  rev: Rev,
32
32
  });
33
33
  // One entry of the history.
34
- export const NodeVersion = z.strictObject({
34
+ export const NodeVersion = z.object({
35
35
  versionId: VersionId,
36
36
  nodeId: NodeId,
37
37
  // Counts from 1 per node; what people read ("Version 6").
@@ -49,7 +49,7 @@ export const NodeVersion = z.strictObject({
49
49
  // Bytes of the content (UTF-8 for text, the object for a file).
50
50
  size: z.number().int(),
51
51
  });
52
- export const NodeVersionList = z.strictObject({
52
+ export const NodeVersionList = z.object({
53
53
  items: z.array(NodeVersion),
54
54
  nextCursor: z.string().nullable(),
55
55
  // The node's revision now, to send with a restore.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anchrd/colab-sdk",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Types, Zod schemas and the service client of Colab, the contract between its UI, backends and outside services.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",