@opencode/protocol 0.0.0-dev-19565 → 0.0.0-dev-19567
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/errors.d.ts +6 -0
- package/dist/errors.js +5 -0
- package/dist/groups/integration.d.ts +4 -4
- package/dist/groups/integration.js +3 -2
- package/package.json +2 -2
package/dist/errors.d.ts
CHANGED
|
@@ -55,6 +55,12 @@ declare const ProviderNotFoundError_base: Schema.Class<ProviderNotFoundError, Sc
|
|
|
55
55
|
}>, import("effect/Cause").YieldableError>;
|
|
56
56
|
export declare class ProviderNotFoundError extends ProviderNotFoundError_base {
|
|
57
57
|
}
|
|
58
|
+
declare const IntegrationNotFoundError_base: Schema.Class<IntegrationNotFoundError, Schema.TaggedStruct<"IntegrationNotFoundError", {
|
|
59
|
+
readonly integrationID: Schema.String;
|
|
60
|
+
readonly message: Schema.String;
|
|
61
|
+
}>, import("effect/Cause").YieldableError>;
|
|
62
|
+
export declare class IntegrationNotFoundError extends IntegrationNotFoundError_base {
|
|
63
|
+
}
|
|
58
64
|
declare const ProjectNotFoundError_base: Schema.Class<ProjectNotFoundError, Schema.TaggedStruct<"ProjectNotFoundError", {
|
|
59
65
|
readonly projectID: Schema.String;
|
|
60
66
|
readonly message: Schema.String;
|
package/dist/errors.js
CHANGED
|
@@ -45,6 +45,11 @@ export class ProviderNotFoundError extends Schema.TaggedError()("ProviderNotFoun
|
|
|
45
45
|
message: Schema.String,
|
|
46
46
|
}, { httpApiStatus: 404 }) {
|
|
47
47
|
}
|
|
48
|
+
export class IntegrationNotFoundError extends Schema.TaggedError()("IntegrationNotFoundError", {
|
|
49
|
+
integrationID: Schema.String,
|
|
50
|
+
message: Schema.String,
|
|
51
|
+
}, { httpApiStatus: 404 }) {
|
|
52
|
+
}
|
|
48
53
|
export class ProjectNotFoundError extends Schema.TaggedError()("ProjectNotFoundError", {
|
|
49
54
|
projectID: Schema.String,
|
|
50
55
|
message: Schema.String,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Integration } from "@opencode/schema/integration";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/unstable/httpapi";
|
|
4
|
-
import { InvalidRequestError } from "../errors.js";
|
|
4
|
+
import { IntegrationNotFoundError, InvalidRequestError } from "../errors.js";
|
|
5
5
|
export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integration", HttpApiEndpoint.HttpApiEndpoint<"integration.list", "GET", "/api/integration", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
6
6
|
readonly location: Schema.optional<Schema.Struct<{
|
|
7
7
|
readonly directory: Schema.optional<Schema.String>;
|
|
@@ -505,7 +505,7 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
|
|
|
505
505
|
readonly location: Schema.Struct<{
|
|
506
506
|
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
507
507
|
}>;
|
|
508
|
-
readonly data: Schema.
|
|
508
|
+
readonly data: Schema.Struct<{
|
|
509
509
|
readonly id: Schema.brand<Schema.String, "Integration.ID">;
|
|
510
510
|
readonly name: Schema.String;
|
|
511
511
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Any>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Any>>, never, never>;
|
|
@@ -989,8 +989,8 @@ export declare const IntegrationGroup: HttpApiGroup.HttpApiGroup<"server.integra
|
|
|
989
989
|
readonly type: Schema.Literal<"env">;
|
|
990
990
|
readonly name: Schema.String;
|
|
991
991
|
}>]>>;
|
|
992
|
-
}
|
|
993
|
-
}>>,
|
|
992
|
+
}>;
|
|
993
|
+
}>>, Schema.toCodecJson<typeof IntegrationNotFoundError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"integration.wellknown.add", "POST", "/api/experimental/integration/wellknown", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
994
994
|
readonly location: Schema.optional<Schema.Struct<{
|
|
995
995
|
readonly directory: Schema.optional<Schema.String>;
|
|
996
996
|
}>>;
|
|
@@ -3,7 +3,7 @@ import { Location } from "@opencode/schema/location";
|
|
|
3
3
|
import { Form } from "@opencode/schema/form";
|
|
4
4
|
import { Schema } from "effect";
|
|
5
5
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi";
|
|
6
|
-
import { InvalidRequestError } from "../errors.js";
|
|
6
|
+
import { IntegrationNotFoundError, InvalidRequestError } from "../errors.js";
|
|
7
7
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
8
8
|
export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
|
9
9
|
.add(HttpApiEndpoint.get("integration.list", "/api/integration", {
|
|
@@ -19,7 +19,8 @@ export const IntegrationGroup = HttpApiGroup.make("server.integration")
|
|
|
19
19
|
.add(HttpApiEndpoint.get("integration.get", "/api/integration/:integrationID", {
|
|
20
20
|
params: { integrationID: Integration.ID },
|
|
21
21
|
query: LocationQuery,
|
|
22
|
-
success: Location.response(
|
|
22
|
+
success: Location.response(Integration.Info),
|
|
23
|
+
error: IntegrationNotFoundError,
|
|
23
24
|
})
|
|
24
25
|
.annotateMerge(locationQueryOpenApi)
|
|
25
26
|
.annotateMerge(OpenApi.annotations({
|
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-19567",
|
|
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-19567",
|
|
36
36
|
"effect": "4.0.0-rc.112"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|