@anchrd/colab-sdk 0.1.32 → 0.1.34

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 (52) hide show
  1. package/README.md +3 -1
  2. package/dist/actions/actions.d.ts +46 -17
  3. package/dist/actions/actions.js +10 -0
  4. package/dist/archive/archive.d.ts +10 -0
  5. package/dist/archive/archive.js +9 -0
  6. package/dist/boards/boards.d.ts +29 -25
  7. package/dist/boards/boards.js +3 -2
  8. package/dist/card-kinds/card-kinds.d.ts +5 -5
  9. package/dist/columns/columns.d.ts +2 -2
  10. package/dist/connectors/connectors.d.ts +121 -3
  11. package/dist/connectors/connectors.js +6 -2
  12. package/dist/crawls/crawls.d.ts +3 -3
  13. package/dist/documents/documents.d.ts +4 -0
  14. package/dist/documents/documents.js +3 -2
  15. package/dist/error/error.d.ts +2 -0
  16. package/dist/error/error.js +35 -2
  17. package/dist/files/files.d.ts +4 -0
  18. package/dist/files/files.js +3 -2
  19. package/dist/gadgets/gadgets.d.ts +143 -12
  20. package/dist/gadgets/gadgets.js +60 -12
  21. package/dist/goals/goals.d.ts +19 -0
  22. package/dist/goals/goals.js +10 -5
  23. package/dist/grammar/grammar.d.ts +2 -1
  24. package/dist/grammar/grammar.js +9 -3
  25. package/dist/mcps/mcps.d.ts +41 -3
  26. package/dist/mcps/mcps.js +53 -3
  27. package/dist/nodes/nodes.d.ts +21 -9
  28. package/dist/nodes/nodes.js +16 -2
  29. package/dist/operators/operators.js +1 -1
  30. package/dist/organisation/organisation.d.ts +45 -0
  31. package/dist/organisation/organisation.js +45 -0
  32. package/dist/profile/profile.d.ts +3 -3
  33. package/dist/profile/profile.js +3 -2
  34. package/dist/providers/providers.d.ts +128 -0
  35. package/dist/providers/providers.js +118 -0
  36. package/dist/runs/runs.d.ts +3 -3
  37. package/dist/runtime-config.d.ts +12 -0
  38. package/dist/runtime-config.js +10 -0
  39. package/dist/sdk.d.ts +5 -4
  40. package/dist/sdk.js +5 -4
  41. package/dist/skills/skills.d.ts +4 -0
  42. package/dist/skills/skills.js +3 -2
  43. package/dist/sources/sources.d.ts +47 -4
  44. package/dist/sources/sources.js +8 -3
  45. package/dist/tables/tables.d.ts +4 -0
  46. package/dist/tables/tables.js +3 -2
  47. package/dist/versions/versions.d.ts +13 -13
  48. package/dist/written/written.d.ts +6 -2
  49. package/dist/written/written.js +2 -2
  50. package/package.json +1 -1
  51. package/dist/sso/sso.d.ts +0 -71
  52. package/dist/sso/sso.js +0 -59
@@ -6,13 +6,13 @@ export declare const MoveColumn: z.ZodObject<{
6
6
  columnId: z.ZodTemplateLiteral<`column_${string}`>;
7
7
  name: z.ZodNullable<z.ZodString>;
8
8
  type: z.ZodNullable<z.ZodEnum<{
9
+ archive: "archive";
9
10
  backlog: "backlog";
10
11
  open: "open";
11
12
  progress: "progress";
12
13
  done: "done";
13
14
  discarded: "discarded";
14
15
  blocked: "blocked";
15
- archive: "archive";
16
16
  }>>;
17
17
  }, z.core.$strip>;
18
18
  export type MoveColumn = z.infer<typeof MoveColumn>;
@@ -21,26 +21,26 @@ export declare const VersionMove: z.ZodObject<{
21
21
  columnId: z.ZodTemplateLiteral<`column_${string}`>;
22
22
  name: z.ZodNullable<z.ZodString>;
23
23
  type: z.ZodNullable<z.ZodEnum<{
24
+ archive: "archive";
24
25
  backlog: "backlog";
25
26
  open: "open";
26
27
  progress: "progress";
27
28
  done: "done";
28
29
  discarded: "discarded";
29
30
  blocked: "blocked";
30
- archive: "archive";
31
31
  }>>;
32
32
  }, z.core.$strip>>;
33
33
  to: z.ZodObject<{
34
34
  columnId: z.ZodTemplateLiteral<`column_${string}`>;
35
35
  name: z.ZodNullable<z.ZodString>;
36
36
  type: z.ZodNullable<z.ZodEnum<{
37
+ archive: "archive";
37
38
  backlog: "backlog";
38
39
  open: "open";
39
40
  progress: "progress";
40
41
  done: "done";
41
42
  discarded: "discarded";
42
43
  blocked: "blocked";
43
- archive: "archive";
44
44
  }>>;
45
45
  }, z.core.$strip>;
46
46
  comment: z.ZodNullable<z.ZodString>;
@@ -64,26 +64,26 @@ export declare const TaskMove: z.ZodObject<{
64
64
  columnId: z.ZodTemplateLiteral<`column_${string}`>;
65
65
  name: z.ZodNullable<z.ZodString>;
66
66
  type: z.ZodNullable<z.ZodEnum<{
67
+ archive: "archive";
67
68
  backlog: "backlog";
68
69
  open: "open";
69
70
  progress: "progress";
70
71
  done: "done";
71
72
  discarded: "discarded";
72
73
  blocked: "blocked";
73
- archive: "archive";
74
74
  }>>;
75
75
  }, z.core.$strip>>;
76
76
  to: z.ZodObject<{
77
77
  columnId: z.ZodTemplateLiteral<`column_${string}`>;
78
78
  name: z.ZodNullable<z.ZodString>;
79
79
  type: z.ZodNullable<z.ZodEnum<{
80
+ archive: "archive";
80
81
  backlog: "backlog";
81
82
  open: "open";
82
83
  progress: "progress";
83
84
  done: "done";
84
85
  discarded: "discarded";
85
86
  blocked: "blocked";
86
- archive: "archive";
87
87
  }>>;
88
88
  }, z.core.$strip>;
89
89
  comment: z.ZodNullable<z.ZodString>;
@@ -139,26 +139,26 @@ export declare const NodeVersion: z.ZodObject<{
139
139
  columnId: z.ZodTemplateLiteral<`column_${string}`>;
140
140
  name: z.ZodNullable<z.ZodString>;
141
141
  type: z.ZodNullable<z.ZodEnum<{
142
+ archive: "archive";
142
143
  backlog: "backlog";
143
144
  open: "open";
144
145
  progress: "progress";
145
146
  done: "done";
146
147
  discarded: "discarded";
147
148
  blocked: "blocked";
148
- archive: "archive";
149
149
  }>>;
150
150
  }, z.core.$strip>>;
151
151
  to: z.ZodObject<{
152
152
  columnId: z.ZodTemplateLiteral<`column_${string}`>;
153
153
  name: z.ZodNullable<z.ZodString>;
154
154
  type: z.ZodNullable<z.ZodEnum<{
155
+ archive: "archive";
155
156
  backlog: "backlog";
156
157
  open: "open";
157
158
  progress: "progress";
158
159
  done: "done";
159
160
  discarded: "discarded";
160
161
  blocked: "blocked";
161
- archive: "archive";
162
162
  }>>;
163
163
  }, z.core.$strip>;
164
164
  comment: z.ZodNullable<z.ZodString>;
@@ -200,26 +200,26 @@ export declare const NodeVersionList: z.ZodObject<{
200
200
  columnId: z.ZodTemplateLiteral<`column_${string}`>;
201
201
  name: z.ZodNullable<z.ZodString>;
202
202
  type: z.ZodNullable<z.ZodEnum<{
203
+ archive: "archive";
203
204
  backlog: "backlog";
204
205
  open: "open";
205
206
  progress: "progress";
206
207
  done: "done";
207
208
  discarded: "discarded";
208
209
  blocked: "blocked";
209
- archive: "archive";
210
210
  }>>;
211
211
  }, z.core.$strip>>;
212
212
  to: z.ZodObject<{
213
213
  columnId: z.ZodTemplateLiteral<`column_${string}`>;
214
214
  name: z.ZodNullable<z.ZodString>;
215
215
  type: z.ZodNullable<z.ZodEnum<{
216
+ archive: "archive";
216
217
  backlog: "backlog";
217
218
  open: "open";
218
219
  progress: "progress";
219
220
  done: "done";
220
221
  discarded: "discarded";
221
222
  blocked: "blocked";
222
- archive: "archive";
223
223
  }>>;
224
224
  }, z.core.$strip>;
225
225
  comment: z.ZodNullable<z.ZodString>;
@@ -263,26 +263,26 @@ export declare const NodeVersionDetail: z.ZodObject<{
263
263
  columnId: z.ZodTemplateLiteral<`column_${string}`>;
264
264
  name: z.ZodNullable<z.ZodString>;
265
265
  type: z.ZodNullable<z.ZodEnum<{
266
+ archive: "archive";
266
267
  backlog: "backlog";
267
268
  open: "open";
268
269
  progress: "progress";
269
270
  done: "done";
270
271
  discarded: "discarded";
271
272
  blocked: "blocked";
272
- archive: "archive";
273
273
  }>>;
274
274
  }, z.core.$strip>>;
275
275
  to: z.ZodObject<{
276
276
  columnId: z.ZodTemplateLiteral<`column_${string}`>;
277
277
  name: z.ZodNullable<z.ZodString>;
278
278
  type: z.ZodNullable<z.ZodEnum<{
279
+ archive: "archive";
279
280
  backlog: "backlog";
280
281
  open: "open";
281
282
  progress: "progress";
282
283
  done: "done";
283
284
  discarded: "discarded";
284
285
  blocked: "blocked";
285
- archive: "archive";
286
286
  }>>;
287
287
  }, z.core.$strip>;
288
288
  comment: z.ZodNullable<z.ZodString>;
@@ -414,26 +414,26 @@ export declare const NodeVersionExcerpt: z.ZodObject<{
414
414
  columnId: z.ZodTemplateLiteral<`column_${string}`>;
415
415
  name: z.ZodNullable<z.ZodString>;
416
416
  type: z.ZodNullable<z.ZodEnum<{
417
+ archive: "archive";
417
418
  backlog: "backlog";
418
419
  open: "open";
419
420
  progress: "progress";
420
421
  done: "done";
421
422
  discarded: "discarded";
422
423
  blocked: "blocked";
423
- archive: "archive";
424
424
  }>>;
425
425
  }, z.core.$strip>>;
426
426
  to: z.ZodObject<{
427
427
  columnId: z.ZodTemplateLiteral<`column_${string}`>;
428
428
  name: z.ZodNullable<z.ZodString>;
429
429
  type: z.ZodNullable<z.ZodEnum<{
430
+ archive: "archive";
430
431
  backlog: "backlog";
431
432
  open: "open";
432
433
  progress: "progress";
433
434
  done: "done";
434
435
  discarded: "discarded";
435
436
  blocked: "blocked";
436
- archive: "archive";
437
437
  }>>;
438
438
  }, z.core.$strip>;
439
439
  comment: z.ZodNullable<z.ZodString>;
@@ -26,9 +26,10 @@ export declare const Changed: z.ZodObject<{
26
26
  functionId: z.ZodOptional<z.ZodTemplateLiteral<`function_${string}`>>;
27
27
  appId: z.ZodOptional<z.ZodTemplateLiteral<`app_${string}`>>;
28
28
  sessionId: z.ZodOptional<z.ZodTemplateLiteral<`session_${string}`>>;
29
- ssoId: z.ZodOptional<z.ZodEnum<{
29
+ providerId: z.ZodOptional<z.ZodEnum<{
30
30
  google: "google";
31
31
  microsoft: "microsoft";
32
+ slack: "slack";
32
33
  }>>;
33
34
  connectorId: z.ZodOptional<z.ZodString>;
34
35
  connectionId: z.ZodOptional<z.ZodTemplateLiteral<`connection_${string}`>>;
@@ -119,9 +120,10 @@ export declare const Written: z.ZodObject<{
119
120
  functionId: z.ZodOptional<z.ZodTemplateLiteral<`function_${string}`>>;
120
121
  appId: z.ZodOptional<z.ZodTemplateLiteral<`app_${string}`>>;
121
122
  sessionId: z.ZodOptional<z.ZodTemplateLiteral<`session_${string}`>>;
122
- ssoId: z.ZodOptional<z.ZodEnum<{
123
+ providerId: z.ZodOptional<z.ZodEnum<{
123
124
  google: "google";
124
125
  microsoft: "microsoft";
126
+ slack: "slack";
125
127
  }>>;
126
128
  connectorId: z.ZodOptional<z.ZodString>;
127
129
  connectionId: z.ZodOptional<z.ZodTemplateLiteral<`connection_${string}`>>;
@@ -207,6 +209,8 @@ export declare const Written: z.ZodObject<{
207
209
  mail_failed: "mail_failed";
208
210
  unused: "unused";
209
211
  too_long: "too_long";
212
+ goal_link: "goal_link";
213
+ unchanged: "unchanged";
210
214
  }>;
211
215
  message: z.ZodString;
212
216
  }, z.core.$strip>>>;
@@ -12,11 +12,11 @@ import { MessageId } from "../messages/messages.js";
12
12
  import { Missing, Reached } from "../missing/missing.js";
13
13
  import { NodeId, NodeReader } from "../nodes/nodes.js";
14
14
  import { CredentialId } from "../operators/operators.js";
15
+ import { ProviderId } from "../providers/providers.js";
15
16
  import { RoleId } from "../roles/roles.js";
16
17
  import { RunId } from "../runs/runs.js";
17
18
  import { FunctionId, InterfaceId, ServiceId } from "../services/services.js";
18
19
  import { QueryId } from "../sources/sources.js";
19
- import { SsoId } from "../sso/sso.js";
20
20
  import { UserId } from "../users/users.js";
21
21
  // What a write answers over `/mcp` (E126, #672): what it changed and what that caused, never the
22
22
  // object it wrote. The AI sent the object itself; echoing it back filled an Operator's context with
@@ -56,7 +56,7 @@ export const Changed = z.object({
56
56
  functionId: FunctionId.optional(),
57
57
  appId: AppId.optional(),
58
58
  sessionId: SessionId.optional(),
59
- ssoId: SsoId.optional(),
59
+ providerId: ProviderId.optional(),
60
60
  connectorId: ConnectorId.optional(),
61
61
  connectionId: ConnectionId.optional(),
62
62
  credentialId: CredentialId.optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anchrd/colab-sdk",
3
- "version": "0.1.32",
3
+ "version": "0.1.34",
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",
package/dist/sso/sso.d.ts DELETED
@@ -1,71 +0,0 @@
1
- import { z } from "zod";
2
- export declare const ssoIds: readonly ["google", "microsoft"];
3
- export declare const SsoId: z.ZodEnum<{
4
- google: "google";
5
- microsoft: "microsoft";
6
- }>;
7
- export type SsoId = z.infer<typeof SsoId>;
8
- export declare const SsoSource: z.ZodEnum<{
9
- settings: "settings";
10
- environment: "environment";
11
- }>;
12
- export type SsoSource = z.infer<typeof SsoSource>;
13
- export declare const SsoListInput: z.ZodObject<{}, z.core.$strict>;
14
- export type SsoListInput = z.infer<typeof SsoListInput>;
15
- export declare const SsoUpdateInput: z.ZodObject<{
16
- ssoId: z.ZodEnum<{
17
- google: "google";
18
- microsoft: "microsoft";
19
- }>;
20
- clientId: z.ZodString;
21
- clientSecret: z.ZodString;
22
- }, z.core.$strict>;
23
- export type SsoUpdateInput = z.infer<typeof SsoUpdateInput>;
24
- export declare const SsoRemoveInput: z.ZodObject<{
25
- ssoId: z.ZodEnum<{
26
- google: "google";
27
- microsoft: "microsoft";
28
- }>;
29
- }, z.core.$strict>;
30
- export type SsoRemoveInput = z.infer<typeof SsoRemoveInput>;
31
- export declare const Sso: z.ZodObject<{
32
- ssoId: z.ZodEnum<{
33
- google: "google";
34
- microsoft: "microsoft";
35
- }>;
36
- clientId: z.ZodNullable<z.ZodString>;
37
- setAt: z.ZodNullable<z.ZodISODateTime>;
38
- setBy: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
39
- source: z.ZodNullable<z.ZodEnum<{
40
- settings: "settings";
41
- environment: "environment";
42
- }>>;
43
- redirectUrl: z.ZodURL;
44
- }, z.core.$strip>;
45
- export type Sso = z.infer<typeof Sso>;
46
- export declare const SsoList: z.ZodObject<{
47
- items: z.ZodArray<z.ZodObject<{
48
- ssoId: z.ZodEnum<{
49
- google: "google";
50
- microsoft: "microsoft";
51
- }>;
52
- clientId: z.ZodNullable<z.ZodString>;
53
- setAt: z.ZodNullable<z.ZodISODateTime>;
54
- setBy: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
55
- source: z.ZodNullable<z.ZodEnum<{
56
- settings: "settings";
57
- environment: "environment";
58
- }>>;
59
- redirectUrl: z.ZodURL;
60
- }, z.core.$strip>>;
61
- nextCursor: z.ZodNull;
62
- }, z.core.$strip>;
63
- export type SsoList = z.infer<typeof SsoList>;
64
- export declare const SignInProviders: z.ZodObject<{
65
- providers: z.ZodArray<z.ZodEnum<{
66
- google: "google";
67
- microsoft: "microsoft";
68
- }>>;
69
- signUp: z.ZodBoolean;
70
- }, z.core.$strip>;
71
- export type SignInProviders = z.infer<typeof SignInProviders>;
package/dist/sso/sso.js DELETED
@@ -1,59 +0,0 @@
1
- import { z } from "zod";
2
- import { UserId } from "../users/users.js";
3
- // Sign-in through Google and Microsoft, set up under Einstellungen › SSO (#358, E90): one row per
4
- // provider, set up or not. The id is the provider's word from the code (`google`), not a ULID, like a
5
- // connector's id: there are exactly these two, and the sign-in page and Better Auth name them so.
6
- //
7
- // ⚠️ The client secret goes in and never comes out: no answer carries it, and no field of an answer
8
- // is called `secret` (`/mcp` would strike it, `redactSecrets`). The input field is `clientSecret`.
9
- export const ssoIds = ["google", "microsoft"];
10
- export const SsoId = z.enum(ssoIds);
11
- // Where the sign-in page gets a provider from right now: `settings` (set up here, in the database of
12
- // `access`), `environment` (the installation's variables; locally `.dev.vars`), or null: not offered.
13
- export const SsoSource = z.enum(["settings", "environment"]);
14
- export const SsoListInput = z.strictObject({});
15
- // "Einrichten": both values every time. A new client id with the old secret would not sign anybody
16
- // in, so the pair is replaced together.
17
- export const SsoUpdateInput = z.strictObject({
18
- ssoId: SsoId.describe("The provider: google or microsoft."),
19
- clientId: z
20
- .string()
21
- .trim()
22
- .min(1)
23
- .max(512)
24
- .describe("The client id of the app registered at the provider."),
25
- clientSecret: z
26
- .string()
27
- .trim()
28
- .min(1)
29
- .max(1024)
30
- .describe("The client secret of that app. Stored sealed; no answer ever shows it again."),
31
- });
32
- // "Entfernen": the provider's settings are deleted at once and without archive. A provider the
33
- // installation's variables name stays offered from there.
34
- export const SsoRemoveInput = z.strictObject({
35
- ssoId: SsoId.describe("The provider: google or microsoft."),
36
- });
37
- export const Sso = z.object({
38
- ssoId: SsoId,
39
- // Set up here: the client id, when and by whom. Null while it is not set up here.
40
- clientId: z.string().nullable(),
41
- setAt: z.iso.datetime().nullable(),
42
- setBy: UserId.nullable(),
43
- source: SsoSource.nullable(),
44
- // The address to enter at the provider as the redirect URI ("Weiterleitungs-Adresse").
45
- redirectUrl: z.url(),
46
- });
47
- export const SsoList = z.object({
48
- items: z.array(Sso),
49
- // Two rows at most: never a further page.
50
- nextCursor: z.null(),
51
- });
52
- // `GET /auth/providers`, public: which buttons the sign-in page shows, in their order. Nothing else
53
- // of a provider travels here. `signUp` is true only while no person exists, or only one whose sign-up
54
- // lapsed unconfirmed (E131): the first one signs up on the page and becomes the main admin (E9,
55
- // #539); after that it says nothing about anybody.
56
- export const SignInProviders = z.object({
57
- providers: z.array(SsoId),
58
- signUp: z.boolean(),
59
- });