@sealant/api-contracts-next 0.39.0-next.749 → 0.39.0-next.751

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.
@@ -8,7 +8,7 @@
8
8
  * the scopes is DOWNSTREAM enforcement (a leaked read-stream token cannot send input or exec).
9
9
  */
10
10
  import { Schema } from "effect";
11
- import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
11
+ import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
12
12
  export declare const accessTokenScopeSchema: Schema.Literals<readonly ["session:read", "session:input", "workspace:exec"]>;
13
13
  export type AccessTokenScopeWire = typeof accessTokenScopeSchema.Type;
14
14
  export declare const createAccessTokenRequestSchema: Schema.Struct<{
@@ -77,7 +77,7 @@ declare const AccessTokenInternalServerError_base: Schema.Class<AccessTokenInter
77
77
  }>, import("effect/Cause").YieldableError>;
78
78
  export declare class AccessTokenInternalServerError extends AccessTokenInternalServerError_base {
79
79
  }
80
- export declare const AccessTokensGroup: HttpApiGroup.HttpApiGroup<"accessTokens", HttpApiEndpoint.HttpApiEndpoint<"createAccessToken", "POST", "/", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
80
+ export declare const AccessTokensGroup: HttpApiGroup.HttpApiGroup<"accessTokens", HttpApiEndpoint.HttpApiEndpoint<"createAccessToken", "POST", "/", never, never, Schema.toCodecJson<Schema.Struct<{
81
81
  readonly ownerUserId: Schema.String;
82
82
  readonly scopes: Schema.$Array<Schema.Literals<readonly ["session:read", "session:input", "workspace:exec"]>>;
83
83
  readonly name: Schema.optional<Schema.String>;
@@ -85,7 +85,7 @@ export declare const AccessTokensGroup: HttpApiGroup.HttpApiGroup<"accessTokens"
85
85
  readonly workspaceId: Schema.optional<Schema.String>;
86
86
  /** Seconds until the token expires; omitted = no expiry. */
87
87
  readonly ttlSeconds: Schema.optional<Schema.Int>;
88
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
88
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
89
89
  readonly tokenId: Schema.String;
90
90
  readonly ownerUserId: Schema.String;
91
91
  readonly name: Schema.optional<Schema.String>;
@@ -96,9 +96,9 @@ export declare const AccessTokensGroup: HttpApiGroup.HttpApiGroup<"accessTokens"
96
96
  readonly createdAt: Schema.String;
97
97
  /** The bearer secret (`slt_...`). Shown exactly once — it is never stored or retrievable. */
98
98
  readonly token: Schema.String;
99
- }>>, HttpApiEndpoint.Json<typeof AccessTokenBadRequestError | typeof AccessTokenNotFoundError | typeof AccessTokenInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listAccessTokens", "GET", "/", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
99
+ }>>, Schema.toCodecJson<typeof AccessTokenBadRequestError | typeof AccessTokenNotFoundError | typeof AccessTokenInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listAccessTokens", "GET", "/", never, Schema.toCodecStringTree<Schema.Struct<{
100
100
  readonly ownerUserId: Schema.String;
101
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
101
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
102
102
  readonly items: Schema.$Array<Schema.Struct<{
103
103
  readonly tokenId: Schema.String;
104
104
  readonly ownerUserId: Schema.String;
@@ -109,11 +109,11 @@ export declare const AccessTokensGroup: HttpApiGroup.HttpApiGroup<"accessTokens"
109
109
  readonly revokedAt: Schema.optional<Schema.String>;
110
110
  readonly createdAt: Schema.String;
111
111
  }>>;
112
- }>>, HttpApiEndpoint.Json<typeof AccessTokenBadRequestError | typeof AccessTokenInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"revokeAccessToken", "POST", "/:tokenId/revoke", HttpApiEndpoint.StringTree<Schema.Struct<{
112
+ }>>, Schema.toCodecJson<typeof AccessTokenBadRequestError | typeof AccessTokenInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"revokeAccessToken", "POST", "/:tokenId/revoke", Schema.toCodecStringTree<Schema.Struct<{
113
113
  readonly tokenId: Schema.String;
114
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
114
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
115
115
  readonly ownerUserId: Schema.String;
116
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
116
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
117
117
  readonly tokenId: Schema.String;
118
118
  readonly ownerUserId: Schema.String;
119
119
  readonly name: Schema.optional<Schema.String>;
@@ -122,5 +122,5 @@ export declare const AccessTokensGroup: HttpApiGroup.HttpApiGroup<"accessTokens"
122
122
  readonly expiresAt: Schema.optional<Schema.String>;
123
123
  readonly revokedAt: Schema.optional<Schema.String>;
124
124
  readonly createdAt: Schema.String;
125
- }>>, HttpApiEndpoint.Json<typeof AccessTokenBadRequestError | typeof AccessTokenNotFoundError | typeof AccessTokenInternalServerError>, never, never>, false>;
125
+ }>>, Schema.toCodecJson<typeof AccessTokenBadRequestError | typeof AccessTokenNotFoundError | typeof AccessTokenInternalServerError>, never, never>, false>;
126
126
  export {};
@@ -8,7 +8,7 @@
8
8
  * the scopes is DOWNSTREAM enforcement (a leaked read-stream token cannot send input or exec).
9
9
  */
10
10
  import { Schema } from "effect";
11
- import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi";
11
+ import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
12
12
  const NonEmptyString = Schema.String.check(Schema.isNonEmpty(), Schema.isTrimmed());
13
13
  export const accessTokenScopeSchema = Schema.Literals([
14
14
  "session:read",
@@ -45,11 +45,11 @@ export const listAccessTokensQuerySchema = Schema.Struct({
45
45
  export const listAccessTokensResponseSchema = Schema.Struct({
46
46
  items: Schema.Array(accessTokenSchema),
47
47
  });
48
- export class AccessTokenBadRequestError extends Schema.TaggedErrorClass()("AccessTokenBadRequestError", { message: Schema.String }, { httpApiStatus: 400 }) {
48
+ export class AccessTokenBadRequestError extends Schema.TaggedError()("AccessTokenBadRequestError", { message: Schema.String }, { httpApiStatus: 400 }) {
49
49
  }
50
- export class AccessTokenNotFoundError extends Schema.TaggedErrorClass()("AccessTokenNotFoundError", { message: Schema.String }, { httpApiStatus: 404 }) {
50
+ export class AccessTokenNotFoundError extends Schema.TaggedError()("AccessTokenNotFoundError", { message: Schema.String }, { httpApiStatus: 404 }) {
51
51
  }
52
- export class AccessTokenInternalServerError extends Schema.TaggedErrorClass()("AccessTokenInternalServerError", { message: Schema.String }, { httpApiStatus: 500 }) {
52
+ export class AccessTokenInternalServerError extends Schema.TaggedError()("AccessTokenInternalServerError", { message: Schema.String }, { httpApiStatus: 500 }) {
53
53
  }
54
54
  const tokenIdParams = Schema.Struct({ tokenId: NonEmptyString });
55
55
  export const AccessTokensGroup = HttpApiGroup.make("accessTokens")
@@ -4,7 +4,7 @@ import { Schema } from "effect";
4
4
  * limit, `retryAfterSeconds` when there is room again: the rest of a rate window, or an estimate
5
5
  * for a concurrency ceiling that only frees when the owner's own work settles.
6
6
  */
7
- export class BudgetExceededError extends Schema.TaggedErrorClass()("BudgetExceededError", {
7
+ export class BudgetExceededError extends Schema.TaggedError()("BudgetExceededError", {
8
8
  message: Schema.String,
9
9
  budget: Schema.String,
10
10
  limit: Schema.Number,
@@ -1,5 +1,5 @@
1
1
  import { Schema } from "effect";
2
- import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
2
+ import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
3
3
  export declare const connectedAccountProviderSchema: Schema.Literals<readonly ["claude", "codex", "github"]>;
4
4
  export type ConnectedAccountProvider = typeof connectedAccountProviderSchema.Type;
5
5
  export declare const connectedAccountStatusSchema: Schema.Literals<readonly ["active", "invalid", "archived"]>;
@@ -113,11 +113,11 @@ declare const ConnectedAccountInternalServerError_base: Schema.Class<ConnectedAc
113
113
  }>, import("effect/Cause").YieldableError>;
114
114
  export declare class ConnectedAccountInternalServerError extends ConnectedAccountInternalServerError_base {
115
115
  }
116
- export declare const ConnectedAccountsGroup: HttpApiGroup.HttpApiGroup<"connectedAccounts", HttpApiEndpoint.HttpApiEndpoint<"archiveConnectedAccount", "DELETE", "/:connectedAccountId", HttpApiEndpoint.StringTree<Schema.Struct<{
116
+ export declare const ConnectedAccountsGroup: HttpApiGroup.HttpApiGroup<"connectedAccounts", HttpApiEndpoint.HttpApiEndpoint<"archiveConnectedAccount", "DELETE", "/:connectedAccountId", Schema.toCodecStringTree<Schema.Struct<{
117
117
  readonly connectedAccountId: Schema.String;
118
- }>>, HttpApiEndpoint.StringTree<Schema.Struct<{
118
+ }>>, Schema.toCodecStringTree<Schema.Struct<{
119
119
  readonly ownerUserId: Schema.String;
120
- }>>, HttpApiEndpoint.Json<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
120
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
121
121
  readonly connectedAccountId: Schema.String;
122
122
  readonly ownerUserId: Schema.String;
123
123
  readonly provider: Schema.Literals<readonly ["claude", "codex", "github"]>;
@@ -140,12 +140,12 @@ export declare const ConnectedAccountsGroup: HttpApiGroup.HttpApiGroup<"connecte
140
140
  /** What that attempt did: `refreshed`, `fresh` (nothing to do), or `failed`. */
141
141
  readonly lastRefreshOutcome: Schema.NullOr<Schema.Literals<readonly ["refreshed", "fresh", "failed"]>>;
142
142
  }>;
143
- }>>, HttpApiEndpoint.Json<typeof ConnectedAccountNotFoundError | typeof ConnectedAccountInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"createConnectedAccount", "POST", "/", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
143
+ }>>, Schema.toCodecJson<typeof ConnectedAccountNotFoundError | typeof ConnectedAccountInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"createConnectedAccount", "POST", "/", never, never, Schema.toCodecJson<Schema.Struct<{
144
144
  readonly ownerUserId: Schema.String;
145
145
  readonly provider: Schema.Literals<readonly ["claude", "codex", "github"]>;
146
146
  readonly name: Schema.optional<Schema.String>;
147
147
  readonly secret: Schema.String;
148
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
148
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
149
149
  readonly connectedAccountId: Schema.String;
150
150
  readonly ownerUserId: Schema.String;
151
151
  readonly provider: Schema.Literals<readonly ["claude", "codex", "github"]>;
@@ -168,9 +168,9 @@ export declare const ConnectedAccountsGroup: HttpApiGroup.HttpApiGroup<"connecte
168
168
  /** What that attempt did: `refreshed`, `fresh` (nothing to do), or `failed`. */
169
169
  readonly lastRefreshOutcome: Schema.NullOr<Schema.Literals<readonly ["refreshed", "fresh", "failed"]>>;
170
170
  }>;
171
- }>>, HttpApiEndpoint.Json<typeof ConnectedAccountBadRequestError | typeof ConnectedAccountNotFoundError | typeof ConnectedAccountConflictError | typeof ConnectedAccountServiceUnavailableError | typeof ConnectedAccountInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listConnectedAccounts", "GET", "/", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
171
+ }>>, Schema.toCodecJson<typeof ConnectedAccountBadRequestError | typeof ConnectedAccountNotFoundError | typeof ConnectedAccountConflictError | typeof ConnectedAccountServiceUnavailableError | typeof ConnectedAccountInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listConnectedAccounts", "GET", "/", never, Schema.toCodecStringTree<Schema.Struct<{
172
172
  readonly ownerUserId: Schema.String;
173
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
173
+ }>>, never, never, Schema.toCodecJson<Schema.Struct<{
174
174
  readonly items: Schema.$Array<Schema.Struct<{
175
175
  readonly connectedAccountId: Schema.String;
176
176
  readonly ownerUserId: Schema.String;
@@ -195,11 +195,11 @@ export declare const ConnectedAccountsGroup: HttpApiGroup.HttpApiGroup<"connecte
195
195
  readonly lastRefreshOutcome: Schema.NullOr<Schema.Literals<readonly ["refreshed", "fresh", "failed"]>>;
196
196
  }>;
197
197
  }>>;
198
- }>>, HttpApiEndpoint.Json<typeof ConnectedAccountInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"markConnectedAccountInvalid", "POST", "/:connectedAccountId/mark-invalid", HttpApiEndpoint.StringTree<Schema.Struct<{
198
+ }>>, Schema.toCodecJson<typeof ConnectedAccountInternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"markConnectedAccountInvalid", "POST", "/:connectedAccountId/mark-invalid", Schema.toCodecStringTree<Schema.Struct<{
199
199
  readonly connectedAccountId: Schema.String;
200
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
200
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
201
201
  readonly ownerUserId: Schema.String;
202
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
202
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
203
203
  readonly connectedAccountId: Schema.String;
204
204
  readonly ownerUserId: Schema.String;
205
205
  readonly provider: Schema.Literals<readonly ["claude", "codex", "github"]>;
@@ -222,5 +222,5 @@ export declare const ConnectedAccountsGroup: HttpApiGroup.HttpApiGroup<"connecte
222
222
  /** What that attempt did: `refreshed`, `fresh` (nothing to do), or `failed`. */
223
223
  readonly lastRefreshOutcome: Schema.NullOr<Schema.Literals<readonly ["refreshed", "fresh", "failed"]>>;
224
224
  }>;
225
- }>>, HttpApiEndpoint.Json<typeof ConnectedAccountNotFoundError | typeof ConnectedAccountInternalServerError>, never, never>, false>;
225
+ }>>, Schema.toCodecJson<typeof ConnectedAccountNotFoundError | typeof ConnectedAccountInternalServerError>, never, never>, false>;
226
226
  export {};
@@ -1,5 +1,5 @@
1
1
  import { Schema } from "effect";
2
- import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi";
2
+ import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
3
3
  const NonEmptyString = Schema.String.check(Schema.isNonEmpty(), Schema.isTrimmed());
4
4
  /*
5
5
  Connected provider accounts (Claude / Codex / GitHub credentials). Same trust model as ssh-keys:
@@ -67,23 +67,23 @@ export const listConnectedAccountsResponseSchema = Schema.Struct({
67
67
  export const markConnectedAccountInvalidRequestSchema = Schema.Struct({
68
68
  ownerUserId: NonEmptyString,
69
69
  });
70
- export class ConnectedAccountBadRequestError extends Schema.TaggedErrorClass()("ConnectedAccountBadRequestError", {
70
+ export class ConnectedAccountBadRequestError extends Schema.TaggedError()("ConnectedAccountBadRequestError", {
71
71
  message: Schema.String,
72
72
  }, { httpApiStatus: 400 }) {
73
73
  }
74
- export class ConnectedAccountNotFoundError extends Schema.TaggedErrorClass()("ConnectedAccountNotFoundError", {
74
+ export class ConnectedAccountNotFoundError extends Schema.TaggedError()("ConnectedAccountNotFoundError", {
75
75
  message: Schema.String,
76
76
  }, { httpApiStatus: 404 }) {
77
77
  }
78
- export class ConnectedAccountConflictError extends Schema.TaggedErrorClass()("ConnectedAccountConflictError", {
78
+ export class ConnectedAccountConflictError extends Schema.TaggedError()("ConnectedAccountConflictError", {
79
79
  message: Schema.String,
80
80
  }, { httpApiStatus: 409 }) {
81
81
  }
82
- export class ConnectedAccountServiceUnavailableError extends Schema.TaggedErrorClass()("ConnectedAccountServiceUnavailableError", {
82
+ export class ConnectedAccountServiceUnavailableError extends Schema.TaggedError()("ConnectedAccountServiceUnavailableError", {
83
83
  message: Schema.String,
84
84
  }, { httpApiStatus: 503 }) {
85
85
  }
86
- export class ConnectedAccountInternalServerError extends Schema.TaggedErrorClass()("ConnectedAccountInternalServerError", {
86
+ export class ConnectedAccountInternalServerError extends Schema.TaggedError()("ConnectedAccountInternalServerError", {
87
87
  message: Schema.String,
88
88
  }, { httpApiStatus: 500 }) {
89
89
  }