@opencode/schema 0.0.0-dev-20672 → 0.0.0-dev-20673

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.
@@ -19,8 +19,8 @@ export declare const CredentialInfo: Schema.Struct<{
19
19
  create: () => string & import("effect/Brand").Brand<"Credential.ID">;
20
20
  };
21
21
  readonly label: Schema.String;
22
- /** How the credential was obtained: a stored key or an OAuth grant. */
23
- readonly method: Schema.Literals<readonly ["key", "oauth"]>;
22
+ /** Whether the connection stores a key, an OAuth grant, or an external credential-source reference. */
23
+ readonly method: Schema.Literals<readonly ["key", "oauth", "external"]>;
24
24
  readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
25
25
  readonly status: Schema.Literals<readonly ["needs_auth"]>;
26
26
  readonly message: Schema.String;
@@ -52,8 +52,8 @@ export declare const Info: Schema.Union<readonly [Schema.Struct<{
52
52
  create: () => string & import("effect/Brand").Brand<"Credential.ID">;
53
53
  };
54
54
  readonly label: Schema.String;
55
- /** How the credential was obtained: a stored key or an OAuth grant. */
56
- readonly method: Schema.Literals<readonly ["key", "oauth"]>;
55
+ /** Whether the connection stores a key, an OAuth grant, or an external credential-source reference. */
56
+ readonly method: Schema.Literals<readonly ["key", "oauth", "external"]>;
57
57
  readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
58
58
  readonly status: Schema.Literals<readonly ["needs_auth"]>;
59
59
  readonly message: Schema.String;
@@ -11,8 +11,8 @@ export const CredentialInfo = Schema.Struct({
11
11
  type: Schema.Literal("credential"),
12
12
  id: Credential.ID,
13
13
  label: Schema.String,
14
- /** How the credential was obtained: a stored key or an OAuth grant. */
15
- method: Schema.Literals(["key", "oauth"]),
14
+ /** Whether the connection stores a key, an OAuth grant, or an external credential-source reference. */
15
+ method: Schema.Literals(["key", "oauth", "external"]),
16
16
  status: optional(Status),
17
17
  }).annotate({ identifier: "Connection.CredentialInfo" });
18
18
  export const EnvInfo = Schema.Struct({
@@ -175,6 +175,14 @@ export declare const Key: Schema.Struct<{
175
175
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
176
176
  readonly configuration: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>>, never, never>;
177
177
  }>;
178
+ /** References a credential source whose secrets and renewal are managed outside the credential store. */
179
+ export interface External extends Schema.Schema.Type<typeof External> {
180
+ }
181
+ export declare const External: Schema.Struct<{
182
+ readonly type: Schema.Literal<"external">;
183
+ readonly methodID: Schema.brand<Schema.String, "Integration.MethodID">;
184
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
185
+ }>;
178
186
  export declare const Value: Schema.Union<readonly [Schema.Struct<{
179
187
  readonly type: Schema.Literal<"oauth">;
180
188
  readonly methodID: Schema.brand<Schema.String, "Integration.MethodID">;
@@ -187,6 +195,10 @@ export declare const Value: Schema.Union<readonly [Schema.Struct<{
187
195
  readonly key: Schema.String;
188
196
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
189
197
  readonly configuration: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>>, never, never>;
198
+ }>, Schema.Struct<{
199
+ readonly type: Schema.Literal<"external">;
200
+ readonly methodID: Schema.brand<Schema.String, "Integration.MethodID">;
201
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
190
202
  }>]>;
191
203
  export type Value = Schema.Schema.Type<typeof Value>;
192
204
  export interface Entry extends Schema.Schema.Type<typeof Entry> {
@@ -210,6 +222,10 @@ export declare const Entry: Schema.Struct<{
210
222
  readonly key: Schema.String;
211
223
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
212
224
  readonly configuration: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>>, never, never>;
225
+ }>, Schema.Struct<{
226
+ readonly type: Schema.Literal<"external">;
227
+ readonly methodID: Schema.brand<Schema.String, "Integration.MethodID">;
228
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
213
229
  }>]>;
214
230
  }>;
215
231
  export interface CreateInput extends Schema.Schema.Type<typeof CreateInput> {
@@ -234,6 +250,10 @@ export declare const CreateInput: Schema.Struct<{
234
250
  readonly key: Schema.String;
235
251
  readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
236
252
  readonly configuration: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>>, never, never>;
253
+ }>, Schema.Struct<{
254
+ readonly type: Schema.Literal<"external">;
255
+ readonly methodID: Schema.brand<Schema.String, "Integration.MethodID">;
256
+ readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
237
257
  }>]>;
238
258
  readonly activate: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
239
259
  }>;
@@ -34,7 +34,12 @@ export const Key = Schema.Struct({
34
34
  metadata: optional(Schema.Record(Schema.String, Schema.Unknown)),
35
35
  configuration: optional(Form.Answer),
36
36
  }).annotate({ identifier: "Credential.Key" });
37
- export const Value = Schema.Union([OAuth, Key])
37
+ export const External = Schema.Struct({
38
+ type: Schema.Literal("external"),
39
+ methodID: IntegrationMethodID,
40
+ metadata: optional(Schema.Record(Schema.String, Schema.Unknown)),
41
+ }).annotate({ identifier: "Credential.External" });
42
+ export const Value = Schema.Union([OAuth, Key, External])
38
43
  .pipe(Schema.toTaggedUnion("type"))
39
44
  .annotate({ identifier: "Credential.Value" });
40
45
  export const Entry = Schema.Struct({
@@ -1571,7 +1571,7 @@ export declare const Info: Schema.Struct<{
1571
1571
  create: () => string & import("effect/Brand").Brand<"Credential.ID">;
1572
1572
  };
1573
1573
  readonly label: Schema.String;
1574
- readonly method: Schema.Literals<readonly ["key", "oauth"]>;
1574
+ readonly method: Schema.Literals<readonly ["key", "oauth", "external"]>;
1575
1575
  readonly status: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
1576
1576
  readonly status: Schema.Literals<readonly ["needs_auth"]>;
1577
1577
  readonly message: Schema.String;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode/schema",
4
- "version": "0.0.0-dev-20672",
4
+ "version": "0.0.0-dev-20673",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {