@skillcdn/console 0.1.1 → 0.1.2
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/README.md +11 -9
- package/dist/api.d.ts +5 -5
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +4 -4
- package/dist/api.js.map +1 -1
- package/dist/cli/cli.d.ts +3 -0
- package/dist/cli/cli.d.ts.map +1 -1
- package/dist/cli/cli.js +95 -42
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/directory.d.ts +14 -0
- package/dist/cli/directory.d.ts.map +1 -0
- package/dist/cli/directory.js +46 -0
- package/dist/cli/directory.js.map +1 -0
- package/dist/cli/format.d.ts +6 -3
- package/dist/cli/format.d.ts.map +1 -1
- package/dist/cli/format.js +17 -6
- package/dist/cli/format.js.map +1 -1
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +19 -6
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/main.js +2 -0
- package/dist/cli/main.js.map +1 -1
- package/dist/client.d.ts +39 -10
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +54 -33
- package/dist/client.js.map +1 -1
- package/dist/components/event-feed.d.ts.map +1 -1
- package/dist/components/event-feed.js +34 -14
- package/dist/components/event-feed.js.map +1 -1
- package/dist/components/projects.d.ts +41 -0
- package/dist/components/projects.d.ts.map +1 -0
- package/dist/components/projects.js +81 -0
- package/dist/components/projects.js.map +1 -0
- package/dist/components/runs.d.ts +2 -2
- package/dist/components/runs.d.ts.map +1 -1
- package/dist/components/runs.js +2 -2
- package/dist/components/runs.js.map +1 -1
- package/dist/components/shell.d.ts +5 -0
- package/dist/components/shell.d.ts.map +1 -1
- package/dist/components/shell.js +1 -1
- package/dist/components/shell.js.map +1 -1
- package/dist/components/task-view.d.ts +5 -1
- package/dist/components/task-view.d.ts.map +1 -1
- package/dist/components/task-view.js +2 -1
- package/dist/components/task-view.js.map +1 -1
- package/dist/console.css +91 -1
- package/dist/console.d.ts +3 -0
- package/dist/console.d.ts.map +1 -1
- package/dist/console.js +148 -39
- package/dist/console.js.map +1 -1
- package/dist/data.d.ts +33 -10
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +202 -81
- package/dist/data.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/limits.d.ts +7 -0
- package/dist/limits.d.ts.map +1 -1
- package/dist/limits.js +7 -0
- package/dist/limits.js.map +1 -1
- package/dist/router.d.ts +22 -7
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +36 -22
- package/dist/router.js.map +1 -1
- package/dist/routes.d.ts +14 -12
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +28 -11
- package/dist/routes.js.map +1 -1
- package/dist/schemas.d.ts +163 -28
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +99 -27
- package/dist/schemas.js.map +1 -1
- package/dist/vocabulary.d.ts +7 -1
- package/dist/vocabulary.d.ts.map +1 -1
- package/dist/vocabulary.js +9 -0
- package/dist/vocabulary.js.map +1 -1
- package/package.json +1 -1
package/dist/router.d.ts
CHANGED
|
@@ -1,15 +1,28 @@
|
|
|
1
1
|
import { type SignInFailure } from "./api.js";
|
|
2
2
|
export type Route = {
|
|
3
|
+
readonly name: "projects";
|
|
4
|
+
} | {
|
|
3
5
|
readonly name: "board";
|
|
6
|
+
readonly project: string;
|
|
4
7
|
} | {
|
|
5
8
|
readonly name: "task";
|
|
9
|
+
readonly project: string;
|
|
6
10
|
readonly id: string;
|
|
7
11
|
} | {
|
|
8
12
|
readonly name: "decisions";
|
|
13
|
+
readonly project: string;
|
|
9
14
|
} | {
|
|
10
15
|
readonly name: "feed";
|
|
16
|
+
readonly project: string;
|
|
11
17
|
} | {
|
|
12
18
|
readonly name: "skills";
|
|
19
|
+
readonly project: string;
|
|
20
|
+
} | {
|
|
21
|
+
readonly name: "members";
|
|
22
|
+
readonly project: string;
|
|
23
|
+
} | {
|
|
24
|
+
readonly name: "settings";
|
|
25
|
+
readonly project: string;
|
|
13
26
|
} | {
|
|
14
27
|
readonly name: "tokens";
|
|
15
28
|
} | {
|
|
@@ -17,19 +30,21 @@ export type Route = {
|
|
|
17
30
|
} | {
|
|
18
31
|
readonly name: "not-found";
|
|
19
32
|
};
|
|
33
|
+
/** The pages of a project, after its key. */
|
|
34
|
+
export type ProjectPage = "decisions" | "feed" | "skills" | "members" | "settings";
|
|
20
35
|
export declare const PATHS: {
|
|
21
|
-
|
|
22
|
-
readonly
|
|
23
|
-
|
|
24
|
-
readonly
|
|
25
|
-
/** The organization's skills, as SkillCDN serves them. */
|
|
26
|
-
readonly skills: "/skills";
|
|
36
|
+
/** The projects the person may see: the front page. */
|
|
37
|
+
readonly projects: "/";
|
|
38
|
+
/** Where a project's pages are: `/p/<key>`, then the page. */
|
|
39
|
+
readonly project: "/p";
|
|
27
40
|
/** The tokens of whoever is signed in: their own page. */
|
|
28
41
|
readonly tokens: "/tokens";
|
|
29
42
|
readonly people: "/people";
|
|
30
43
|
};
|
|
31
44
|
export declare function matchRoute(pathname: string): Route;
|
|
32
|
-
|
|
45
|
+
/** Where a project's board is, or one of its pages. */
|
|
46
|
+
export declare function projectHref(key: string, page?: ProjectPage): string;
|
|
47
|
+
export declare function taskHref(key: string, id: string): string;
|
|
33
48
|
/** Why the last sign-in did not complete, as the page's URL says it, or nothing. */
|
|
34
49
|
export declare function signInFailureOf(search: string): SignInFailure | undefined;
|
|
35
50
|
/** The URL without the sign-in parameter, once the page has read it. */
|
package/dist/router.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC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AE,IAAI;IACb,0DAA0D;aAC1D,MAAM,EAAE,SAAS;aACjB,MAAM,EAAE,SAAS;CACT,CAAC;AAYX,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,KAAK,CA4BlD;AAED,uDAAuD;AACvD,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,MAAM,CAGnE;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,oFAAoF;AACpF,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAGzE;AAED,wEAAwE;AACxE,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAK3E"}
|
package/dist/router.js
CHANGED
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
import { isSignInFailure, SIGN_IN_PARAM } from "./api.js";
|
|
2
2
|
export const PATHS = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/** The organization's skills, as SkillCDN serves them. */
|
|
8
|
-
skills: "/skills",
|
|
3
|
+
/** The projects the person may see: the front page. */
|
|
4
|
+
projects: "/",
|
|
5
|
+
/** Where a project's pages are: `/p/<key>`, then the page. */
|
|
6
|
+
project: "/p",
|
|
9
7
|
/** The tokens of whoever is signed in: their own page. */
|
|
10
8
|
tokens: "/tokens",
|
|
11
9
|
people: "/people",
|
|
12
10
|
};
|
|
13
11
|
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
12
|
+
const PROJECT_KEY = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;
|
|
13
|
+
const PROJECT_PAGES = [
|
|
14
|
+
"decisions",
|
|
15
|
+
"feed",
|
|
16
|
+
"skills",
|
|
17
|
+
"members",
|
|
18
|
+
"settings",
|
|
19
|
+
];
|
|
14
20
|
export function matchRoute(pathname) {
|
|
15
21
|
const path = pathname.length > 1 ? pathname.replace(/\/+$/, "") : pathname;
|
|
16
|
-
if (path === PATHS.
|
|
17
|
-
return { name: "
|
|
18
|
-
}
|
|
19
|
-
if (path === PATHS.decisions) {
|
|
20
|
-
return { name: "decisions" };
|
|
21
|
-
}
|
|
22
|
-
if (path === PATHS.feed) {
|
|
23
|
-
return { name: "feed" };
|
|
24
|
-
}
|
|
25
|
-
if (path === PATHS.skills) {
|
|
26
|
-
return { name: "skills" };
|
|
22
|
+
if (path === PATHS.projects) {
|
|
23
|
+
return { name: "projects" };
|
|
27
24
|
}
|
|
28
25
|
if (path === PATHS.tokens) {
|
|
29
26
|
return { name: "tokens" };
|
|
@@ -31,14 +28,31 @@ export function matchRoute(pathname) {
|
|
|
31
28
|
if (path === PATHS.people) {
|
|
32
29
|
return { name: "people" };
|
|
33
30
|
}
|
|
34
|
-
if (path.startsWith(`${PATHS.
|
|
35
|
-
const id = path.slice(PATHS.
|
|
36
|
-
|
|
31
|
+
if (path.startsWith(`${PATHS.project}/`)) {
|
|
32
|
+
const [project, page, id, ...rest] = path.slice(PATHS.project.length + 1).split("/");
|
|
33
|
+
if (project === undefined || !PROJECT_KEY.test(project) || rest.length > 0) {
|
|
34
|
+
return { name: "not-found" };
|
|
35
|
+
}
|
|
36
|
+
if (page === undefined) {
|
|
37
|
+
return { name: "board", project };
|
|
38
|
+
}
|
|
39
|
+
if (page === "tasks" && id !== undefined && UUID.test(id)) {
|
|
40
|
+
return { name: "task", project, id };
|
|
41
|
+
}
|
|
42
|
+
const found = PROJECT_PAGES.find((candidate) => candidate === page);
|
|
43
|
+
return found !== undefined && id === undefined
|
|
44
|
+
? { name: found, project }
|
|
45
|
+
: { name: "not-found" };
|
|
37
46
|
}
|
|
38
47
|
return { name: "not-found" };
|
|
39
48
|
}
|
|
40
|
-
|
|
41
|
-
|
|
49
|
+
/** Where a project's board is, or one of its pages. */
|
|
50
|
+
export function projectHref(key, page) {
|
|
51
|
+
const base = `${PATHS.project}/${key}`;
|
|
52
|
+
return page === undefined ? base : `${base}/${page}`;
|
|
53
|
+
}
|
|
54
|
+
export function taskHref(key, id) {
|
|
55
|
+
return `${PATHS.project}/${key}/tasks/${id}`;
|
|
42
56
|
}
|
|
43
57
|
/** Why the last sign-in did not complete, as the page's URL says it, or nothing. */
|
|
44
58
|
export function signInFailureOf(search) {
|
package/dist/router.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.js","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAsB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"router.js","sourceRoot":"","sources":["../src/router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAsB,MAAM,UAAU,CAAC;AAsB9E,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,uDAAuD;IACvD,QAAQ,EAAE,GAAG;IACb,8DAA8D;IAC9D,OAAO,EAAE,IAAI;IACb,0DAA0D;IAC1D,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;CACT,CAAC;AAEX,MAAM,IAAI,GAAG,iEAAiE,CAAC;AAC/E,MAAM,WAAW,GAAG,mCAAmC,CAAC;AACxD,MAAM,aAAa,GAA2B;IAC5C,WAAW;IACX,MAAM;IACN,QAAQ;IACR,SAAS;IACT,UAAU;CACX,CAAC;AAEF,MAAM,UAAU,UAAU,CAAC,QAAgB;IACzC,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC3E,IAAI,IAAI,KAAK,KAAK,CAAC,QAAQ,EAAE,CAAC;QAC5B,OAAO,EAAE,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Key } from "./vocabulary.js";
|
|
2
|
-
/** One prefix per resource; an id follows where one is needed. */
|
|
2
|
+
/** One prefix per resource of the workspace; an id follows where one is needed. */
|
|
3
3
|
export declare const REST_ROUTES: {
|
|
4
4
|
/** Who is signed in, what the workspace is called, and whether anyone can sign in. */
|
|
5
5
|
readonly me: "/api/v1/me";
|
|
6
6
|
/** The people of the workspace: everyone who has signed in. */
|
|
7
7
|
readonly people: "/api/v1/people";
|
|
8
|
-
|
|
9
|
-
readonly
|
|
10
|
-
/** The
|
|
8
|
+
/** The projects the asker may see; the board of each is under its key. */
|
|
9
|
+
readonly projects: "/api/v1/projects";
|
|
10
|
+
/** The workspace's own events, the ones about no project: who joined, who was made what. */
|
|
11
11
|
readonly events: "/api/v1/events";
|
|
12
12
|
/** The tokens of whoever asks: what their agents, scripts and consoles act as them with. */
|
|
13
13
|
readonly tokens: "/api/v1/tokens";
|
|
14
|
-
/** The runs: agents at work, and what they did. */
|
|
15
|
-
readonly runs: "/api/v1/runs";
|
|
16
|
-
/** The bytes of a file a run handed in: `/api/v1/files/<artifact id>`. */
|
|
17
|
-
readonly files: "/api/v1/files";
|
|
18
|
-
/** The organization's skills, as SkillCDN serves them at the console's address. */
|
|
19
|
-
readonly skills: "/api/v1/skills";
|
|
20
14
|
};
|
|
15
|
+
/** What a project holds, each under `/api/v1/projects/<key>/<collection>`. */
|
|
16
|
+
export declare const PROJECT_COLLECTIONS: readonly ["tasks", "decisions", "runs", "files", "events", "skills", "members"];
|
|
17
|
+
export type ProjectCollection = (typeof PROJECT_COLLECTIONS)[number];
|
|
21
18
|
/** Where a browser signs in and out. Signing in is per provider: `/auth/<provider>/...`. */
|
|
22
19
|
export declare const AUTH_ROUTES: {
|
|
23
20
|
/** Sends the browser to the provider to sign in, and afterwards to `return_to`. */
|
|
@@ -42,6 +39,11 @@ export declare function isSignInFailure(value: string | null | undefined): value
|
|
|
42
39
|
export declare function loginPath(provider: ProviderKey, returnTo: string): string;
|
|
43
40
|
/** A page of this origin, told why the sign-in it was waiting for did not complete. */
|
|
44
41
|
export declare function signInPath(page: string, failure: SignInFailure): string;
|
|
45
|
-
/** The REST path of one
|
|
46
|
-
export declare function restPath(collection: "
|
|
42
|
+
/** The REST path of one person, token or project: the collection, then the id or the key. */
|
|
43
|
+
export declare function restPath(collection: "people" | "tokens" | "projects", id: string): string;
|
|
44
|
+
/**
|
|
45
|
+
* The REST path of a project, of one of its collections, or of one item in it: the tasks of
|
|
46
|
+
* `web` are at `projectPath("web", "tasks")`, task 7 at `projectPath("web", "tasks", "7")`.
|
|
47
|
+
*/
|
|
48
|
+
export declare function projectPath(key: string, collection?: ProjectCollection, id?: string): string;
|
|
47
49
|
//# sourceMappingURL=routes.d.ts.map
|
package/dist/routes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,mFAAmF;AACnF,eAAO,MAAM,WAAW;IACtB,sFAAsF;aACtF,EAAE,EAAE,YAAY;IAChB,+DAA+D;aAC/D,MAAM,EAAE,gBAAgB;IACxB,0EAA0E;aAC1E,QAAQ,EAAE,kBAAkB;IAC5B,4FAA4F;aAC5F,MAAM,EAAE,gBAAgB;IACxB,4FAA4F;aAC5F,MAAM,EAAE,gBAAgB;CAChB,CAAC;AAEX,8EAA8E;AAC9E,eAAO,MAAM,mBAAmB,YAC9B,OAAO,EACP,WAAW,EACX,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,SAAS,CACD,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAErE,4FAA4F;AAC5F,eAAO,MAAM,WAAW;IACtB,mFAAmF;aACnF,KAAK,aAAa,WAAW,KAAG,MAAM;IACtC,oDAAoD;aACpD,QAAQ,aAAa,WAAW,KAAG,MAAM;IACzC,mDAAmD;aACnD,MAAM,EAAE,cAAc;CACd,CAAC;AAEX,+FAA+F;AAC/F,eAAO,MAAM,eAAe,cAAc,CAAC;AAE3C;;;;GAIG;AACH,eAAO,MAAM,aAAa,YAAY,CAAC;AACvC,eAAO,MAAM,gBAAgB,YAAI,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAC;AACpF,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9D,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,IAAI,aAAa,CAExF;AAED,sFAAsF;AACtF,wBAAgB,SAAS,CAAC,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEzE;AAED,uFAAuF;AACvF,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,MAAM,CAEvE;AAED,6FAA6F;AAC7F,wBAAgB,QAAQ,CAAC,UAAU,EAAE,QAAQ,GAAG,QAAQ,GAAG,UAAU,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAEzF;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,iBAAiB,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAQ5F"}
|
package/dist/routes.js
CHANGED
|
@@ -1,22 +1,26 @@
|
|
|
1
|
-
/** One prefix per resource; an id follows where one is needed. */
|
|
1
|
+
/** One prefix per resource of the workspace; an id follows where one is needed. */
|
|
2
2
|
export const REST_ROUTES = {
|
|
3
3
|
/** Who is signed in, what the workspace is called, and whether anyone can sign in. */
|
|
4
4
|
me: "/api/v1/me",
|
|
5
5
|
/** The people of the workspace: everyone who has signed in. */
|
|
6
6
|
people: "/api/v1/people",
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/** The
|
|
7
|
+
/** The projects the asker may see; the board of each is under its key. */
|
|
8
|
+
projects: "/api/v1/projects",
|
|
9
|
+
/** The workspace's own events, the ones about no project: who joined, who was made what. */
|
|
10
10
|
events: "/api/v1/events",
|
|
11
11
|
/** The tokens of whoever asks: what their agents, scripts and consoles act as them with. */
|
|
12
12
|
tokens: "/api/v1/tokens",
|
|
13
|
-
/** The runs: agents at work, and what they did. */
|
|
14
|
-
runs: "/api/v1/runs",
|
|
15
|
-
/** The bytes of a file a run handed in: `/api/v1/files/<artifact id>`. */
|
|
16
|
-
files: "/api/v1/files",
|
|
17
|
-
/** The organization's skills, as SkillCDN serves them at the console's address. */
|
|
18
|
-
skills: "/api/v1/skills",
|
|
19
13
|
};
|
|
14
|
+
/** What a project holds, each under `/api/v1/projects/<key>/<collection>`. */
|
|
15
|
+
export const PROJECT_COLLECTIONS = [
|
|
16
|
+
"tasks",
|
|
17
|
+
"decisions",
|
|
18
|
+
"runs",
|
|
19
|
+
"files",
|
|
20
|
+
"events",
|
|
21
|
+
"skills",
|
|
22
|
+
"members",
|
|
23
|
+
];
|
|
20
24
|
/** Where a browser signs in and out. Signing in is per provider: `/auth/<provider>/...`. */
|
|
21
25
|
export const AUTH_ROUTES = {
|
|
22
26
|
/** Sends the browser to the provider to sign in, and afterwards to `return_to`. */
|
|
@@ -46,8 +50,21 @@ export function loginPath(provider, returnTo) {
|
|
|
46
50
|
export function signInPath(page, failure) {
|
|
47
51
|
return `${page}${page.includes("?") ? "&" : "?"}${SIGN_IN_PARAM}=${failure}`;
|
|
48
52
|
}
|
|
49
|
-
/** The REST path of one
|
|
53
|
+
/** The REST path of one person, token or project: the collection, then the id or the key. */
|
|
50
54
|
export function restPath(collection, id) {
|
|
51
55
|
return `${REST_ROUTES[collection]}/${encodeURIComponent(id)}`;
|
|
52
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* The REST path of a project, of one of its collections, or of one item in it: the tasks of
|
|
59
|
+
* `web` are at `projectPath("web", "tasks")`, task 7 at `projectPath("web", "tasks", "7")`.
|
|
60
|
+
*/
|
|
61
|
+
export function projectPath(key, collection, id) {
|
|
62
|
+
const base = restPath("projects", key);
|
|
63
|
+
if (collection === undefined) {
|
|
64
|
+
return base;
|
|
65
|
+
}
|
|
66
|
+
return id === undefined
|
|
67
|
+
? `${base}/${collection}`
|
|
68
|
+
: `${base}/${collection}/${encodeURIComponent(id)}`;
|
|
69
|
+
}
|
|
53
70
|
//# sourceMappingURL=routes.js.map
|
package/dist/routes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAKA,mFAAmF;AACnF,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,sFAAsF;IACtF,EAAE,EAAE,YAAY;IAChB,+DAA+D;IAC/D,MAAM,EAAE,gBAAgB;IACxB,0EAA0E;IAC1E,QAAQ,EAAE,kBAAkB;IAC5B,4FAA4F;IAC5F,MAAM,EAAE,gBAAgB;IACxB,4FAA4F;IAC5F,MAAM,EAAE,gBAAgB;CAChB,CAAC;AAEX,8EAA8E;AAC9E,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,OAAO;IACP,WAAW;IACX,MAAM;IACN,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,SAAS;CACD,CAAC;AAIX,4FAA4F;AAC5F,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,mFAAmF;IACnF,KAAK,EAAE,CAAC,QAAqB,EAAU,EAAE,CAAC,SAAS,QAAQ,QAAQ;IACnE,oDAAoD;IACpD,QAAQ,EAAE,CAAC,QAAqB,EAAU,EAAE,CAAC,SAAS,QAAQ,WAAW;IACzE,mDAAmD;IACn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,GAAG,IAAI,IAAI,UAAU,EAAE;QACzB,CAAC,CAAC,GAAG,IAAI,IAAI,UAAU,IAAI,kBAAkB,CAAC,EAAE,CAAC,EAAE,CAAC;AACxD,CAAC"}
|
package/dist/schemas.d.ts
CHANGED
|
@@ -69,6 +69,130 @@ export declare const restPersonPatchSchema: z.ZodMiniObject<{
|
|
|
69
69
|
}>;
|
|
70
70
|
}, z.core.$strip>;
|
|
71
71
|
export type RestPersonPatch = z.infer<typeof restPersonPatchSchema>;
|
|
72
|
+
/** A project of the workspace, as the asker sees it: with what they are in it. */
|
|
73
|
+
export declare const restProjectSchema: z.ZodMiniObject<{
|
|
74
|
+
id: z.ZodMiniUUID;
|
|
75
|
+
key: z.ZodMiniString<string>;
|
|
76
|
+
name: z.ZodMiniString<string>;
|
|
77
|
+
description: z.ZodMiniString<string>;
|
|
78
|
+
visibility: z.ZodMiniEnum<{
|
|
79
|
+
private: "private";
|
|
80
|
+
workspace: "workspace";
|
|
81
|
+
}>;
|
|
82
|
+
skillsAddress: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
83
|
+
role: z.ZodMiniEnum<{
|
|
84
|
+
member: "member";
|
|
85
|
+
owner: "owner";
|
|
86
|
+
}>;
|
|
87
|
+
openDecisions: z.ZodMiniInt;
|
|
88
|
+
openRuns: z.ZodMiniInt;
|
|
89
|
+
createdAt: z.ZodMiniISODateTime;
|
|
90
|
+
updatedAt: z.ZodMiniISODateTime;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
export type RestProject = z.infer<typeof restProjectSchema>;
|
|
93
|
+
/** `GET /api/v1/projects`: the projects the asker may see, by name. */
|
|
94
|
+
export declare const restProjectsSchema: z.ZodMiniObject<{
|
|
95
|
+
items: z.ZodMiniArray<z.ZodMiniObject<{
|
|
96
|
+
id: z.ZodMiniUUID;
|
|
97
|
+
key: z.ZodMiniString<string>;
|
|
98
|
+
name: z.ZodMiniString<string>;
|
|
99
|
+
description: z.ZodMiniString<string>;
|
|
100
|
+
visibility: z.ZodMiniEnum<{
|
|
101
|
+
private: "private";
|
|
102
|
+
workspace: "workspace";
|
|
103
|
+
}>;
|
|
104
|
+
skillsAddress: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
105
|
+
role: z.ZodMiniEnum<{
|
|
106
|
+
member: "member";
|
|
107
|
+
owner: "owner";
|
|
108
|
+
}>;
|
|
109
|
+
openDecisions: z.ZodMiniInt;
|
|
110
|
+
openRuns: z.ZodMiniInt;
|
|
111
|
+
createdAt: z.ZodMiniISODateTime;
|
|
112
|
+
updatedAt: z.ZodMiniISODateTime;
|
|
113
|
+
}, z.core.$strip>>;
|
|
114
|
+
}, z.core.$strip>;
|
|
115
|
+
export type RestProjects = z.infer<typeof restProjectsSchema>;
|
|
116
|
+
/** What `POST /api/v1/projects` is sent: the key and the name; the rest has a default. */
|
|
117
|
+
export declare const restProjectInputSchema: z.ZodMiniObject<{
|
|
118
|
+
key: z.ZodMiniString<string>;
|
|
119
|
+
name: z.ZodMiniString<string>;
|
|
120
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
121
|
+
visibility: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
122
|
+
private: "private";
|
|
123
|
+
workspace: "workspace";
|
|
124
|
+
}>>;
|
|
125
|
+
skillsAddress: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
126
|
+
}, z.core.$strip>;
|
|
127
|
+
export type RestProjectInput = z.infer<typeof restProjectInputSchema>;
|
|
128
|
+
/** What `PATCH /api/v1/projects/<key>` is sent: only what changes; the key does not. */
|
|
129
|
+
export declare const restProjectPatchSchema: z.ZodMiniObject<{
|
|
130
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
131
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
132
|
+
visibility: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
133
|
+
private: "private";
|
|
134
|
+
workspace: "workspace";
|
|
135
|
+
}>>;
|
|
136
|
+
skillsAddress: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
137
|
+
}, z.core.$strip>;
|
|
138
|
+
export type RestProjectPatch = z.infer<typeof restProjectPatchSchema>;
|
|
139
|
+
/** A person listed in a project, with what they are in it. */
|
|
140
|
+
export declare const restMemberSchema: z.ZodMiniObject<{
|
|
141
|
+
person: z.ZodMiniObject<{
|
|
142
|
+
id: z.ZodMiniUUID;
|
|
143
|
+
login: z.ZodMiniString<string>;
|
|
144
|
+
name: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
145
|
+
avatar: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
146
|
+
role: z.ZodMiniEnum<{
|
|
147
|
+
admin: "admin";
|
|
148
|
+
member: "member";
|
|
149
|
+
}>;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
role: z.ZodMiniEnum<{
|
|
152
|
+
member: "member";
|
|
153
|
+
owner: "owner";
|
|
154
|
+
}>;
|
|
155
|
+
addedAt: z.ZodMiniISODateTime;
|
|
156
|
+
}, z.core.$strip>;
|
|
157
|
+
export type RestMember = z.infer<typeof restMemberSchema>;
|
|
158
|
+
/** `GET /api/v1/projects/<key>/members`: those listed, by login. */
|
|
159
|
+
export declare const restMembersSchema: z.ZodMiniObject<{
|
|
160
|
+
items: z.ZodMiniArray<z.ZodMiniObject<{
|
|
161
|
+
person: z.ZodMiniObject<{
|
|
162
|
+
id: z.ZodMiniUUID;
|
|
163
|
+
login: z.ZodMiniString<string>;
|
|
164
|
+
name: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
165
|
+
avatar: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
166
|
+
role: z.ZodMiniEnum<{
|
|
167
|
+
admin: "admin";
|
|
168
|
+
member: "member";
|
|
169
|
+
}>;
|
|
170
|
+
}, z.core.$strip>;
|
|
171
|
+
role: z.ZodMiniEnum<{
|
|
172
|
+
member: "member";
|
|
173
|
+
owner: "owner";
|
|
174
|
+
}>;
|
|
175
|
+
addedAt: z.ZodMiniISODateTime;
|
|
176
|
+
}, z.core.$strip>>;
|
|
177
|
+
}, z.core.$strip>;
|
|
178
|
+
export type RestMembers = z.infer<typeof restMembersSchema>;
|
|
179
|
+
/** What `POST /api/v1/projects/<key>/members` is sent: a person of the workspace, and what they are to be. */
|
|
180
|
+
export declare const restMemberInputSchema: z.ZodMiniObject<{
|
|
181
|
+
personId: z.ZodMiniUUID;
|
|
182
|
+
role: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
183
|
+
member: "member";
|
|
184
|
+
owner: "owner";
|
|
185
|
+
}>>;
|
|
186
|
+
}, z.core.$strip>;
|
|
187
|
+
export type RestMemberInput = z.infer<typeof restMemberInputSchema>;
|
|
188
|
+
/** What `PATCH /api/v1/projects/<key>/members/<person id>` is sent. */
|
|
189
|
+
export declare const restMemberPatchSchema: z.ZodMiniObject<{
|
|
190
|
+
role: z.ZodMiniEnum<{
|
|
191
|
+
member: "member";
|
|
192
|
+
owner: "owner";
|
|
193
|
+
}>;
|
|
194
|
+
}, z.core.$strip>;
|
|
195
|
+
export type RestMemberPatch = z.infer<typeof restMemberPatchSchema>;
|
|
72
196
|
export declare const restTaskLinkSchema: z.ZodMiniObject<{
|
|
73
197
|
url: z.ZodMiniString<string>;
|
|
74
198
|
label: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
@@ -124,7 +248,7 @@ export declare const restTaskSchema: z.ZodMiniObject<{
|
|
|
124
248
|
updatedAt: z.ZodMiniISODateTime;
|
|
125
249
|
}, z.core.$strip>;
|
|
126
250
|
export type RestTask = z.infer<typeof restTaskSchema>;
|
|
127
|
-
/** `GET /api/v1/tasks`: the board, newest first. */
|
|
251
|
+
/** `GET /api/v1/projects/<key>/tasks`: the board, newest first. */
|
|
128
252
|
export declare const restTasksSchema: z.ZodMiniObject<{
|
|
129
253
|
items: z.ZodMiniArray<z.ZodMiniObject<{
|
|
130
254
|
id: z.ZodMiniUUID;
|
|
@@ -177,7 +301,7 @@ export declare const restTasksSchema: z.ZodMiniObject<{
|
|
|
177
301
|
}, z.core.$strip>>;
|
|
178
302
|
}, z.core.$strip>;
|
|
179
303
|
export type RestTasks = z.infer<typeof restTasksSchema>;
|
|
180
|
-
/** What `POST /api/v1/tasks` is sent. Everything but the title has a default. */
|
|
304
|
+
/** What `POST /api/v1/projects/<key>/tasks` is sent. Everything but the title has a default. */
|
|
181
305
|
export declare const restTaskInputSchema: z.ZodMiniObject<{
|
|
182
306
|
title: z.ZodMiniString<string>;
|
|
183
307
|
body: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -203,7 +327,7 @@ export declare const restTaskInputSchema: z.ZodMiniObject<{
|
|
|
203
327
|
}, z.core.$strip>>>;
|
|
204
328
|
}, z.core.$strip>;
|
|
205
329
|
export type RestTaskInput = z.infer<typeof restTaskInputSchema>;
|
|
206
|
-
/** What `PATCH /api/v1/tasks/<id>` is sent: only what changes. */
|
|
330
|
+
/** What `PATCH /api/v1/projects/<key>/tasks/<id>` is sent: only what changes. */
|
|
207
331
|
export declare const restTaskPatchSchema: z.ZodMiniObject<{
|
|
208
332
|
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
209
333
|
body: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -277,7 +401,7 @@ export declare const restDecisionSchema: z.ZodMiniObject<{
|
|
|
277
401
|
updatedAt: z.ZodMiniISODateTime;
|
|
278
402
|
}, z.core.$strip>;
|
|
279
403
|
export type RestDecision = z.infer<typeof restDecisionSchema>;
|
|
280
|
-
/** `GET /api/v1/decisions`: the ones that wait first, newest first within each. */
|
|
404
|
+
/** `GET /api/v1/projects/<key>/decisions`: the ones that wait first, newest first within each. */
|
|
281
405
|
export declare const restDecisionsSchema: z.ZodMiniObject<{
|
|
282
406
|
items: z.ZodMiniArray<z.ZodMiniObject<{
|
|
283
407
|
id: z.ZodMiniUUID;
|
|
@@ -323,7 +447,7 @@ export declare const restDecisionsSchema: z.ZodMiniObject<{
|
|
|
323
447
|
}, z.core.$strip>>;
|
|
324
448
|
}, z.core.$strip>;
|
|
325
449
|
export type RestDecisions = z.infer<typeof restDecisionsSchema>;
|
|
326
|
-
/** What `POST /api/v1/decisions` is sent: the question, its context, and the options. */
|
|
450
|
+
/** What `POST /api/v1/projects/<key>/decisions` is sent: the question, its context, and the options. */
|
|
327
451
|
export declare const restDecisionInputSchema: z.ZodMiniObject<{
|
|
328
452
|
question: z.ZodMiniString<string>;
|
|
329
453
|
body: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -334,7 +458,7 @@ export declare const restDecisionInputSchema: z.ZodMiniObject<{
|
|
|
334
458
|
runId: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUUID>>;
|
|
335
459
|
}, z.core.$strip>;
|
|
336
460
|
export type RestDecisionInput = z.infer<typeof restDecisionInputSchema>;
|
|
337
|
-
/** What `POST
|
|
461
|
+
/** What `POST .../decisions/<id>/answer` is sent: an option, and a word about it. */
|
|
338
462
|
export declare const restAnswerInputSchema: z.ZodMiniObject<{
|
|
339
463
|
option: z.ZodMiniString<string>;
|
|
340
464
|
note: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -367,10 +491,9 @@ export declare const restEventDataSchema: z.ZodMiniObject<{
|
|
|
367
491
|
question: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
368
492
|
option: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
369
493
|
login: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
370
|
-
role: z.ZodMiniOptional<z.
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
}>>;
|
|
494
|
+
role: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
495
|
+
key: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
496
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
374
497
|
agent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
375
498
|
status: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
376
499
|
abandoned: "abandoned";
|
|
@@ -390,6 +513,11 @@ export declare const restEventSchema: z.ZodMiniObject<{
|
|
|
390
513
|
"decision.raised": "decision.raised";
|
|
391
514
|
"person.joined": "person.joined";
|
|
392
515
|
"person.role_changed": "person.role_changed";
|
|
516
|
+
"project.created": "project.created";
|
|
517
|
+
"project.member_added": "project.member_added";
|
|
518
|
+
"project.member_changed": "project.member_changed";
|
|
519
|
+
"project.member_removed": "project.member_removed";
|
|
520
|
+
"project.updated": "project.updated";
|
|
393
521
|
"run.ended": "run.ended";
|
|
394
522
|
"run.handed_in": "run.handed_in";
|
|
395
523
|
"run.reported": "run.reported";
|
|
@@ -408,6 +536,8 @@ export declare const restEventSchema: z.ZodMiniObject<{
|
|
|
408
536
|
member: "member";
|
|
409
537
|
}>;
|
|
410
538
|
}, z.core.$strip>>;
|
|
539
|
+
agent: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
540
|
+
projectId: z.ZodMiniNullable<z.ZodMiniUUID>;
|
|
411
541
|
taskId: z.ZodMiniNullable<z.ZodMiniUUID>;
|
|
412
542
|
decisionId: z.ZodMiniNullable<z.ZodMiniUUID>;
|
|
413
543
|
runId: z.ZodMiniNullable<z.ZodMiniUUID>;
|
|
@@ -434,10 +564,9 @@ export declare const restEventSchema: z.ZodMiniObject<{
|
|
|
434
564
|
question: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
435
565
|
option: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
436
566
|
login: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
437
|
-
role: z.ZodMiniOptional<z.
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
}>>;
|
|
567
|
+
role: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
568
|
+
key: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
569
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
441
570
|
agent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
442
571
|
status: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
443
572
|
abandoned: "abandoned";
|
|
@@ -459,7 +588,7 @@ export declare const restReportSchema: z.ZodMiniObject<{
|
|
|
459
588
|
createdAt: z.ZodMiniISODateTime;
|
|
460
589
|
}, z.core.$strip>;
|
|
461
590
|
export type RestReport = z.infer<typeof restReportSchema>;
|
|
462
|
-
/** A file a run handed in, as the console keeps it; its bytes are at `
|
|
591
|
+
/** A file a run handed in, as the console keeps it; its bytes are at `projectPath(key, "files", <artifact id>)`. */
|
|
463
592
|
export declare const restFileSchema: z.ZodMiniObject<{
|
|
464
593
|
name: z.ZodMiniString<string>;
|
|
465
594
|
size: z.ZodMiniInt;
|
|
@@ -535,7 +664,7 @@ export declare const restRunSchema: z.ZodMiniObject<{
|
|
|
535
664
|
waitingFor: z.ZodMiniNullable<z.ZodMiniUUID>;
|
|
536
665
|
}, z.core.$strip>;
|
|
537
666
|
export type RestRun = z.infer<typeof restRunSchema>;
|
|
538
|
-
/** `GET /api/v1/runs
|
|
667
|
+
/** `GET /api/v1/projects/<key>/runs`: the runs, newest first. */
|
|
539
668
|
export declare const restRunsSchema: z.ZodMiniObject<{
|
|
540
669
|
items: z.ZodMiniArray<z.ZodMiniObject<{
|
|
541
670
|
id: z.ZodMiniUUID;
|
|
@@ -587,7 +716,7 @@ export declare const restRunsSchema: z.ZodMiniObject<{
|
|
|
587
716
|
}, z.core.$strip>>;
|
|
588
717
|
}, z.core.$strip>;
|
|
589
718
|
export type RestRuns = z.infer<typeof restRunsSchema>;
|
|
590
|
-
/** `GET
|
|
719
|
+
/** `GET .../events?after=`: what happened after that number, oldest first. */
|
|
591
720
|
export declare const restEventsSchema: z.ZodMiniObject<{
|
|
592
721
|
items: z.ZodMiniArray<z.ZodMiniObject<{
|
|
593
722
|
id: z.ZodMiniInt;
|
|
@@ -596,6 +725,11 @@ export declare const restEventsSchema: z.ZodMiniObject<{
|
|
|
596
725
|
"decision.raised": "decision.raised";
|
|
597
726
|
"person.joined": "person.joined";
|
|
598
727
|
"person.role_changed": "person.role_changed";
|
|
728
|
+
"project.created": "project.created";
|
|
729
|
+
"project.member_added": "project.member_added";
|
|
730
|
+
"project.member_changed": "project.member_changed";
|
|
731
|
+
"project.member_removed": "project.member_removed";
|
|
732
|
+
"project.updated": "project.updated";
|
|
599
733
|
"run.ended": "run.ended";
|
|
600
734
|
"run.handed_in": "run.handed_in";
|
|
601
735
|
"run.reported": "run.reported";
|
|
@@ -614,6 +748,8 @@ export declare const restEventsSchema: z.ZodMiniObject<{
|
|
|
614
748
|
member: "member";
|
|
615
749
|
}>;
|
|
616
750
|
}, z.core.$strip>>;
|
|
751
|
+
agent: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
752
|
+
projectId: z.ZodMiniNullable<z.ZodMiniUUID>;
|
|
617
753
|
taskId: z.ZodMiniNullable<z.ZodMiniUUID>;
|
|
618
754
|
decisionId: z.ZodMiniNullable<z.ZodMiniUUID>;
|
|
619
755
|
runId: z.ZodMiniNullable<z.ZodMiniUUID>;
|
|
@@ -640,10 +776,9 @@ export declare const restEventsSchema: z.ZodMiniObject<{
|
|
|
640
776
|
question: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
641
777
|
option: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
642
778
|
login: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
643
|
-
role: z.ZodMiniOptional<z.
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
}>>;
|
|
779
|
+
role: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
780
|
+
key: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
781
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
647
782
|
agent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
648
783
|
status: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
649
784
|
abandoned: "abandoned";
|
|
@@ -701,7 +836,7 @@ export declare const restTokenCreatedSchema: z.ZodMiniObject<{
|
|
|
701
836
|
secret: z.ZodMiniString<string>;
|
|
702
837
|
}, z.core.$strip>;
|
|
703
838
|
export type RestTokenCreated = z.infer<typeof restTokenCreatedSchema>;
|
|
704
|
-
/** One of the
|
|
839
|
+
/** One of the project's skills, as the SkillCDN deployment lists it at the project's address. */
|
|
705
840
|
export declare const restSkillSchema: z.ZodMiniObject<{
|
|
706
841
|
name: z.ZodMiniString<string>;
|
|
707
842
|
description: z.ZodMiniString<string>;
|
|
@@ -715,7 +850,7 @@ export declare const restSkillSchema: z.ZodMiniObject<{
|
|
|
715
850
|
}, z.core.$strip>>;
|
|
716
851
|
}, z.core.$strip>;
|
|
717
852
|
export type RestSkill = z.infer<typeof restSkillSchema>;
|
|
718
|
-
/** `GET /api/v1/skills`: the
|
|
853
|
+
/** `GET /api/v1/projects/<key>/skills`: the project's skills, read by address through SkillCDN. */
|
|
719
854
|
export declare const restSkillsSchema: z.ZodMiniObject<{
|
|
720
855
|
address: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
721
856
|
source: z.ZodMiniString<string>;
|
|
@@ -749,25 +884,25 @@ export declare const restErrorSchema: z.ZodMiniObject<{
|
|
|
749
884
|
}, z.core.$strip>;
|
|
750
885
|
}, z.core.$strip>;
|
|
751
886
|
export type RestError = z.infer<typeof restErrorSchema>;
|
|
752
|
-
/** What `POST /api/v1/runs` is sent: the task to take, and what the agent calls itself. */
|
|
887
|
+
/** What `POST /api/v1/projects/<key>/runs` is sent: the task to take, and what the agent calls itself. */
|
|
753
888
|
export declare const restRunInputSchema: z.ZodMiniObject<{
|
|
754
889
|
taskId: z.ZodMiniUUID;
|
|
755
890
|
agent: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
756
891
|
}, z.core.$strip>;
|
|
757
892
|
export type RestRunInput = z.infer<typeof restRunInputSchema>;
|
|
758
|
-
/** What `POST
|
|
893
|
+
/** What `POST .../runs/<id>/reports` is sent: how the work goes, in Markdown. */
|
|
759
894
|
export declare const restReportInputSchema: z.ZodMiniObject<{
|
|
760
895
|
body: z.ZodMiniString<string>;
|
|
761
896
|
}, z.core.$strip>;
|
|
762
897
|
export type RestReportInput = z.infer<typeof restReportInputSchema>;
|
|
763
|
-
/** What `POST
|
|
898
|
+
/** What `POST .../runs/<id>/artifacts` is sent: a link to what was made. */
|
|
764
899
|
export declare const restArtifactInputSchema: z.ZodMiniObject<{
|
|
765
900
|
url: z.ZodMiniString<string>;
|
|
766
901
|
label: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
767
902
|
}, z.core.$strip>;
|
|
768
903
|
export type RestArtifactInput = z.infer<typeof restArtifactInputSchema>;
|
|
769
904
|
/**
|
|
770
|
-
* What `POST
|
|
905
|
+
* What `POST .../runs/<id>/files` is sent beside the bytes, as the parts of a form: the
|
|
771
906
|
* file's name and media type come with the `file` part, the `label` is a part of its own.
|
|
772
907
|
*/
|
|
773
908
|
export declare const restFileInputSchema: z.ZodMiniObject<{
|
|
@@ -776,7 +911,7 @@ export declare const restFileInputSchema: z.ZodMiniObject<{
|
|
|
776
911
|
label: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
777
912
|
}, z.core.$strip>;
|
|
778
913
|
export type RestFileInput = z.infer<typeof restFileInputSchema>;
|
|
779
|
-
/** What `POST
|
|
914
|
+
/** What `POST .../runs/<id>/end` is sent: how the run ended, and what was done and left. */
|
|
780
915
|
export declare const restRunEndInputSchema: z.ZodMiniObject<{
|
|
781
916
|
status: z.ZodMiniEnum<{
|
|
782
917
|
abandoned: "abandoned";
|