EdgeAIG/opencode / .opencode /node_modules /@opencode-ai /plugin /dist /v2 /effect /integration.d.ts
| import type { ConnectionInfo, CredentialOAuth, CredentialValue, IntegrationEnvMethod, IntegrationInputs, IntegrationKeyMethod, IntegrationMethod, IntegrationOAuthMethod, IntegrationRef } from "@opencode-ai/sdk/v2/types"; | |
| import type { Effect, Scope } from "effect"; | |
| import type { Hooks } from "./registration.js"; | |
| export type IntegrationOAuthAuthorization = { | |
| readonly url: string; | |
| readonly instructions: string; | |
| } & ({ | |
| readonly mode: "auto"; | |
| readonly callback: Effect.Effect<CredentialOAuth, unknown>; | |
| } | { | |
| readonly mode: "code"; | |
| readonly callback: (code: string) => Effect.Effect<CredentialOAuth, unknown>; | |
| }); | |
| export type IntegrationOAuthMethodRegistration = { | |
| readonly integrationID: string; | |
| readonly method: IntegrationOAuthMethod; | |
| readonly authorize: (inputs: IntegrationInputs) => Effect.Effect<IntegrationOAuthAuthorization, unknown, Scope.Scope>; | |
| readonly refresh?: (credential: CredentialOAuth) => Effect.Effect<CredentialOAuth, unknown>; | |
| readonly label?: (credential: CredentialOAuth) => string | undefined; | |
| }; | |
| export type IntegrationMethodRegistration = IntegrationOAuthMethodRegistration | { | |
| readonly integrationID: string; | |
| readonly method: IntegrationKeyMethod; | |
| } | { | |
| readonly integrationID: string; | |
| readonly method: IntegrationEnvMethod; | |
| }; | |
| export interface IntegrationDraft { | |
| list(): readonly IntegrationRef[]; | |
| get(id: string): IntegrationRef | undefined; | |
| update(id: string, update: (integration: IntegrationRef) => void): void; | |
| remove(id: string): void; | |
| readonly method: { | |
| list(integrationID: string): readonly IntegrationMethod[]; | |
| update(input: IntegrationMethodRegistration): void; | |
| remove(integrationID: string, method: IntegrationMethod): void; | |
| }; | |
| } | |
| export interface IntegrationHooks extends Hooks<{ | |
| transform: IntegrationDraft; | |
| }> { | |
| readonly connection: { | |
| readonly active: (integrationID: string) => Effect.Effect<ConnectionInfo | undefined>; | |
| readonly resolve: (connection: ConnectionInfo) => Effect.Effect<CredentialValue | undefined, unknown>; | |
| }; | |
| } | |
Xet Storage Details
- Size:
- 2.11 kB
- Xet hash:
- 579182e57c27ef98d99d4ee15c4bf6f2bb58cd68e471e67e47e96546ec0f46b8
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.