@opencode/protocol 0.0.0-dev-20810 → 0.0.0-dev-20813
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/groups/event.d.ts
CHANGED
|
@@ -4760,6 +4760,7 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
4760
4760
|
readonly created: Schema.Int;
|
|
4761
4761
|
readonly updated: Schema.Int;
|
|
4762
4762
|
readonly active: Schema.Int;
|
|
4763
|
+
readonly archived: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
4763
4764
|
}>;
|
|
4764
4765
|
readonly sandboxes: Schema.$Array<Schema.String>;
|
|
4765
4766
|
}>;
|
|
@@ -4792,6 +4793,7 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
4792
4793
|
readonly created: Schema.Int;
|
|
4793
4794
|
readonly updated: Schema.Int;
|
|
4794
4795
|
readonly active: Schema.Int;
|
|
4796
|
+
readonly archived: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
4795
4797
|
}>;
|
|
4796
4798
|
readonly sandboxes: Schema.$Array<Schema.String>;
|
|
4797
4799
|
}>;
|
|
@@ -6778,8 +6780,9 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
6778
6780
|
readonly canonical: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
6779
6781
|
readonly time: {
|
|
6780
6782
|
readonly created: number;
|
|
6781
|
-
readonly updated: number;
|
|
6782
6783
|
readonly active: number;
|
|
6784
|
+
readonly updated: number;
|
|
6785
|
+
readonly archived?: number | undefined;
|
|
6783
6786
|
};
|
|
6784
6787
|
readonly sandboxes: readonly string[];
|
|
6785
6788
|
readonly name?: string | undefined;
|
|
@@ -13394,6 +13397,7 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
13394
13397
|
readonly created: Schema.Int;
|
|
13395
13398
|
readonly updated: Schema.Int;
|
|
13396
13399
|
readonly active: Schema.Int;
|
|
13400
|
+
readonly archived: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
13397
13401
|
}>;
|
|
13398
13402
|
readonly sandboxes: Schema.$Array<Schema.String>;
|
|
13399
13403
|
}>;
|
|
@@ -13426,6 +13430,7 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
13426
13430
|
readonly created: Schema.Int;
|
|
13427
13431
|
readonly updated: Schema.Int;
|
|
13428
13432
|
readonly active: Schema.Int;
|
|
13433
|
+
readonly archived: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
13429
13434
|
}>;
|
|
13430
13435
|
readonly sandboxes: Schema.$Array<Schema.String>;
|
|
13431
13436
|
}>;
|
package/dist/groups/project.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
import { ProjectNotFoundError } from "../errors.js";
|
|
4
|
-
export declare const ProjectGroup: HttpApiGroup.HttpApiGroup<"server.project", HttpApiEndpoint.HttpApiEndpoint<"project.list", "GET", "/api/project", never,
|
|
4
|
+
export declare const ProjectGroup: HttpApiGroup.HttpApiGroup<"server.project", HttpApiEndpoint.HttpApiEndpoint<"project.list", "GET", "/api/project", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
5
|
+
readonly archived: Schema.optional<Schema.decodeTo<Schema.Boolean, Schema.Literals<readonly ["true", "false"]>, never, never>>;
|
|
6
|
+
}>>, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
|
|
5
7
|
readonly id: Schema.brand<Schema.String, "Project.ID"> & {
|
|
6
8
|
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
7
9
|
};
|
|
@@ -26,6 +28,7 @@ export declare const ProjectGroup: HttpApiGroup.HttpApiGroup<"server.project", H
|
|
|
26
28
|
readonly created: Schema.Int;
|
|
27
29
|
readonly updated: Schema.Int;
|
|
28
30
|
readonly active: Schema.Int;
|
|
31
|
+
readonly archived: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
29
32
|
}>;
|
|
30
33
|
readonly sandboxes: Schema.$Array<Schema.String>;
|
|
31
34
|
}>>>, never, never, never> | HttpApiEndpoint.HttpApiEndpoint<"project.update", "PATCH", "/api/project/:projectID", Schema.toCodecStringTree<Schema.Struct<{
|
|
@@ -74,6 +77,7 @@ export declare const ProjectGroup: HttpApiGroup.HttpApiGroup<"server.project", H
|
|
|
74
77
|
readonly created: Schema.Int;
|
|
75
78
|
readonly updated: Schema.Int;
|
|
76
79
|
readonly active: Schema.Int;
|
|
80
|
+
readonly archived: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
77
81
|
}>;
|
|
78
82
|
readonly sandboxes: Schema.$Array<Schema.String>;
|
|
79
83
|
}>>, Schema.toCodecJson<typeof ProjectNotFoundError>, never, never>, false>;
|
package/dist/groups/project.js
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { Project } from "@opencode/schema/project";
|
|
2
|
-
import { Schema, Struct } from "effect";
|
|
2
|
+
import { Schema, SchemaGetter, Struct } from "effect";
|
|
3
3
|
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
|
|
4
4
|
import { ProjectNotFoundError } from "../errors.js";
|
|
5
5
|
const root = "/api/project";
|
|
6
6
|
const UpdatePayload = Schema.Struct(Struct.omit(Project.UpdateInput.fields, ["projectID"]));
|
|
7
|
+
const BooleanFromString = Schema.Literals(["true", "false"]).pipe(Schema.decodeTo(Schema.Boolean, {
|
|
8
|
+
decode: SchemaGetter.transform((value) => value === "true"),
|
|
9
|
+
encode: SchemaGetter.transform((value) => (value ? "true" : "false")),
|
|
10
|
+
}));
|
|
7
11
|
export const ProjectGroup = HttpApiGroup.make("server.project")
|
|
8
12
|
.add(HttpApiEndpoint.get("project.list", root, {
|
|
13
|
+
query: Schema.Struct({ archived: BooleanFromString.pipe(Schema.optional) }),
|
|
9
14
|
success: Schema.Array(Project.Info),
|
|
10
15
|
}).annotateMerge(OpenApi.annotations({
|
|
11
16
|
identifier: "project.list",
|
|
12
17
|
summary: "List projects",
|
|
13
|
-
description: "List known projects.",
|
|
18
|
+
description: "List known projects. Archived projects are excluded unless archived=true.",
|
|
14
19
|
})))
|
|
15
20
|
.add(HttpApiEndpoint.patch("project.update", `${root}/:projectID`, {
|
|
16
21
|
params: { projectID: Project.ID },
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@opencode/protocol",
|
|
4
|
-
"version": "0.0.0-dev-
|
|
4
|
+
"version": "0.0.0-dev-20813",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"typecheck": "tsgo --noEmit"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@opencode/schema": "0.0.0-dev-
|
|
35
|
+
"@opencode/schema": "0.0.0-dev-20813",
|
|
36
36
|
"effect": "4.0.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|