chore: generate
This commit is contained in:
parent
cf80b5c470
commit
cfddb2407c
@ -67,8 +67,7 @@ export function fromPromise(plugin: Plugin) {
|
||||
reload: () => run(host.integration.reload()),
|
||||
connection: {
|
||||
active: (id) => Effect.runPromiseWith(context)(host.integration.connection.active(id)),
|
||||
resolve: (connection) =>
|
||||
Effect.runPromiseWith(context)(host.integration.connection.resolve(connection)),
|
||||
resolve: (connection) => Effect.runPromiseWith(context)(host.integration.connection.resolve(connection)),
|
||||
},
|
||||
},
|
||||
plugin: {
|
||||
|
||||
@ -28,9 +28,7 @@ export type IntegrationOAuthAuthorization = {
|
||||
export type IntegrationOAuthMethodRegistration = {
|
||||
readonly integrationID: string
|
||||
readonly method: IntegrationOAuthMethod
|
||||
readonly authorize: (
|
||||
inputs: IntegrationInputs,
|
||||
) => Effect.Effect<IntegrationOAuthAuthorization, unknown, Scope.Scope>
|
||||
readonly authorize: (inputs: IntegrationInputs) => Effect.Effect<IntegrationOAuthAuthorization, unknown, Scope.Scope>
|
||||
readonly refresh?: (credential: CredentialOAuth) => Effect.Effect<CredentialOAuth, unknown>
|
||||
readonly label?: (credential: CredentialOAuth) => string | undefined
|
||||
}
|
||||
|
||||
@ -7,10 +7,6 @@ export type { AgentDraft, AgentHooks } from "./agent.js"
|
||||
export type { AISDKHooks } from "./aisdk.js"
|
||||
export type { CatalogDraft, CatalogHooks, CatalogProviderRecord } from "./catalog.js"
|
||||
export type { CommandDraft, CommandHooks } from "./command.js"
|
||||
export type {
|
||||
IntegrationDraft,
|
||||
IntegrationHooks,
|
||||
IntegrationMethodRegistration,
|
||||
} from "./integration.js"
|
||||
export type { IntegrationDraft, IntegrationHooks, IntegrationMethodRegistration } from "./integration.js"
|
||||
export type { ReferenceDraft, ReferenceHooks } from "./reference.js"
|
||||
export type { SkillDraft, SkillHooks } from "./skill.js"
|
||||
|
||||
@ -1,7 +1,4 @@
|
||||
import type {
|
||||
IntegrationDraft,
|
||||
IntegrationMethodRegistration,
|
||||
} from "../effect/integration.js"
|
||||
import type { IntegrationDraft, IntegrationMethodRegistration } from "../effect/integration.js"
|
||||
import type { CredentialValue } from "@opencode-ai/sdk/v2/types"
|
||||
import type { Hooks } from "./registration.js"
|
||||
|
||||
@ -9,9 +6,7 @@ export type { IntegrationDraft, IntegrationMethodRegistration }
|
||||
|
||||
export interface IntegrationHooks extends Hooks<{ transform: IntegrationDraft }> {
|
||||
readonly connection: {
|
||||
readonly active: (
|
||||
integrationID: string,
|
||||
) => Promise<import("@opencode-ai/sdk/v2/types").ConnectionInfo | undefined>
|
||||
readonly active: (integrationID: string) => Promise<import("@opencode-ai/sdk/v2/types").ConnectionInfo | undefined>
|
||||
readonly resolve: (
|
||||
connection: import("@opencode-ai/sdk/v2/types").ConnectionInfo,
|
||||
) => Promise<CredentialValue | undefined>
|
||||
|
||||
@ -14647,6 +14647,9 @@
|
||||
{
|
||||
"$ref": "#/components/schemas/EventIntegrationUpdated"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/EventIntegrationConnectionUpdated"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/EventCatalogUpdated"
|
||||
},
|
||||
@ -16821,6 +16824,31 @@
|
||||
"required": ["id", "type", "properties"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^evt_"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["integration.connection.updated"]
|
||||
},
|
||||
"properties": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"integrationID": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["integrationID"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "properties"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -22989,6 +23017,9 @@
|
||||
{
|
||||
"$ref": "#/components/schemas/V2EventIntegrationUpdated"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/V2EventIntegrationConnectionUpdated"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/V2EventCatalogUpdated"
|
||||
},
|
||||
@ -23427,6 +23458,61 @@
|
||||
"required": ["id", "type", "properties"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"CredentialValue": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/CredentialOAuth"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/CredentialKey"
|
||||
}
|
||||
]
|
||||
},
|
||||
"IntegrationInputs": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"IntegrationMethod": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/IntegrationOAuthMethod"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/IntegrationKeyMethod"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/IntegrationEnvMethod"
|
||||
}
|
||||
]
|
||||
},
|
||||
"IntegrationRef": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["id", "name"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"SkillV2Source": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/SkillV2DirectorySource"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/SkillV2UrlSource"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/SkillV2EmbeddedSource"
|
||||
}
|
||||
]
|
||||
},
|
||||
"MoveSessionDestination": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -27487,17 +27573,7 @@
|
||||
"methods": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/IntegrationOAuthMethod"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/IntegrationKeyMethod"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/IntegrationEnvMethod"
|
||||
}
|
||||
]
|
||||
"$ref": "#/components/schemas/IntegrationMethod"
|
||||
}
|
||||
},
|
||||
"connections": {
|
||||
@ -27797,6 +27873,53 @@
|
||||
"required": ["id", "type", "data"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"V2EventIntegrationConnectionUpdated": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^evt_"
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object"
|
||||
},
|
||||
"durable": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"aggregateID": {
|
||||
"type": "string"
|
||||
},
|
||||
"seq": {
|
||||
"type": "integer"
|
||||
},
|
||||
"version": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": ["aggregateID", "seq", "version"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"location": {
|
||||
"$ref": "#/components/schemas/LocationRef"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["integration.connection.updated"]
|
||||
},
|
||||
"data": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"integrationID": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["integrationID"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "data"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"V2EventCatalogUpdated": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -32682,6 +32805,31 @@
|
||||
"required": ["id", "type", "properties"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"EventIntegrationConnectionUpdated": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^evt_"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["integration.connection.updated"]
|
||||
},
|
||||
"properties": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"integrationID": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["integrationID"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["id", "type", "properties"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"EventCatalogUpdated": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -35466,6 +35614,92 @@
|
||||
"required": ["id", "type", "properties"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"CredentialOAuth": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["oauth"]
|
||||
},
|
||||
"methodID": {
|
||||
"type": "string"
|
||||
},
|
||||
"refresh": {
|
||||
"type": "string"
|
||||
},
|
||||
"access": {
|
||||
"type": "string"
|
||||
},
|
||||
"expires": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": ["type", "methodID", "refresh", "access", "expires"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"CredentialKey": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["key"]
|
||||
},
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": ["type", "key"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"SkillV2DirectorySource": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["directory"]
|
||||
},
|
||||
"path": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["type", "path"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"SkillV2UrlSource": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["url"]
|
||||
},
|
||||
"url": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["type", "url"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"SkillV2EmbeddedSource": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["embedded"]
|
||||
},
|
||||
"skill": {
|
||||
"$ref": "#/components/schemas/SkillV2Info"
|
||||
}
|
||||
},
|
||||
"required": ["type", "skill"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"BadRequestError": {
|
||||
"type": "object",
|
||||
"required": ["name", "data"],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user