diff options
| author | GitHub Action <[email protected]> | 2026-01-28 13:28:52 +0000 |
|---|---|---|
| committer | GitHub Action <[email protected]> | 2026-01-28 13:28:52 +0000 |
| commit | bc4968abbb736a5a736253bdb31fe80cc8d2cd67 (patch) | |
| tree | 9191e63010339808e8e63ea5ba657bc93dcd93c8 /packages/sdk/js/src | |
| parent | acb92fcd34c6a22497817fca00cae49f4d1cccc7 (diff) | |
| download | opencode-bc4968abbb736a5a736253bdb31fe80cc8d2cd67.tar.gz opencode-bc4968abbb736a5a736253bdb31fe80cc8d2cd67.zip | |
chore: generate
Diffstat (limited to 'packages/sdk/js/src')
| -rw-r--r-- | packages/sdk/js/src/v2/gen/sdk.gen.ts | 143 | ||||
| -rw-r--r-- | packages/sdk/js/src/v2/gen/types.gen.ts | 156 |
2 files changed, 141 insertions, 158 deletions
diff --git a/packages/sdk/js/src/v2/gen/sdk.gen.ts b/packages/sdk/js/src/v2/gen/sdk.gen.ts index eee26ceb2..b757b7535 100644 --- a/packages/sdk/js/src/v2/gen/sdk.gen.ts +++ b/packages/sdk/js/src/v2/gen/sdk.gen.ts @@ -299,6 +299,62 @@ export class Global extends HeyApiClient { } } +export class Auth extends HeyApiClient { + /** + * Remove auth credentials + * + * Remove authentication credentials + */ + public remove<ThrowOnError extends boolean = false>( + parameters: { + providerID: string + }, + options?: Options<never, ThrowOnError>, + ) { + const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "providerID" }] }]) + return (options?.client ?? this.client).delete<AuthRemoveResponses, AuthRemoveErrors, ThrowOnError>({ + url: "/auth/{providerID}", + ...options, + ...params, + }) + } + + /** + * Set auth credentials + * + * Set authentication credentials + */ + public set<ThrowOnError extends boolean = false>( + parameters: { + providerID: string + auth?: Auth3 + }, + options?: Options<never, ThrowOnError>, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "path", key: "providerID" }, + { key: "auth", map: "body" }, + ], + }, + ], + ) + return (options?.client ?? this.client).put<AuthSetResponses, AuthSetErrors, ThrowOnError>({ + url: "/auth/{providerID}", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } +} + export class Project extends HeyApiClient { /** * List all projects @@ -2284,7 +2340,7 @@ export class File extends HeyApiClient { } } -export class Auth extends HeyApiClient { +export class Auth2 extends HeyApiClient { /** * Remove MCP OAuth * @@ -2528,9 +2584,9 @@ export class Mcp extends HeyApiClient { }) } - private _auth?: Auth - get auth(): Auth { - return (this._auth ??= new Auth({ client: this.client })) + private _auth?: Auth2 + get auth(): Auth2 { + return (this._auth ??= new Auth2({ client: this.client })) } } @@ -3101,75 +3157,6 @@ export class Formatter extends HeyApiClient { } } -export class Auth2 extends HeyApiClient { - /** - * Remove auth credentials - * - * Remove authentication credentials - */ - public remove<ThrowOnError extends boolean = false>( - parameters: { - providerID: string - directory?: string - }, - options?: Options<never, ThrowOnError>, - ) { - const params = buildClientParams( - [parameters], - [ - { - args: [ - { in: "path", key: "providerID" }, - { in: "query", key: "directory" }, - ], - }, - ], - ) - return (options?.client ?? this.client).delete<AuthRemoveResponses, AuthRemoveErrors, ThrowOnError>({ - url: "/auth/{providerID}", - ...options, - ...params, - }) - } - - /** - * Set auth credentials - * - * Set authentication credentials - */ - public set<ThrowOnError extends boolean = false>( - parameters: { - providerID: string - directory?: string - auth?: Auth3 - }, - options?: Options<never, ThrowOnError>, - ) { - const params = buildClientParams( - [parameters], - [ - { - args: [ - { in: "path", key: "providerID" }, - { in: "query", key: "directory" }, - { key: "auth", map: "body" }, - ], - }, - ], - ) - return (options?.client ?? this.client).put<AuthSetResponses, AuthSetErrors, ThrowOnError>({ - url: "/auth/{providerID}", - ...options, - ...params, - headers: { - "Content-Type": "application/json", - ...options?.headers, - ...params.headers, - }, - }) - } -} - export class Event extends HeyApiClient { /** * Subscribe to events @@ -3204,6 +3191,11 @@ export class OpencodeClient extends HeyApiClient { return (this._global ??= new Global({ client: this.client })) } + private _auth?: Auth + get auth(): Auth { + return (this._auth ??= new Auth({ client: this.client })) + } + private _project?: Project get project(): Project { return (this._project ??= new Project({ client: this.client })) @@ -3314,11 +3306,6 @@ export class OpencodeClient extends HeyApiClient { return (this._formatter ??= new Formatter({ client: this.client })) } - private _auth?: Auth2 - get auth(): Auth2 { - return (this._auth ??= new Auth2({ client: this.client })) - } - private _event?: Event get event(): Event { return (this._event ??= new Event({ client: this.client })) diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts index cfb798806..328e54dd8 100644 --- a/packages/sdk/js/src/v2/gen/types.gen.ts +++ b/packages/sdk/js/src/v2/gen/types.gen.ts @@ -1819,6 +1819,28 @@ export type BadRequestError = { success: false } +export type OAuth = { + type: "oauth" + refresh: string + access: string + expires: number + accountId?: string + enterpriseUrl?: string +} + +export type ApiAuth = { + type: "api" + key: string +} + +export type WellKnownAuth = { + type: "wellknown" + key: string + token: string +} + +export type Auth = OAuth | ApiAuth | WellKnownAuth + export type NotFoundError = { name: "NotFoundError" data: { @@ -2142,28 +2164,6 @@ export type FormatterStatus = { enabled: boolean } -export type OAuth = { - type: "oauth" - refresh: string - access: string - expires: number - accountId?: string - enterpriseUrl?: string -} - -export type ApiAuth = { - type: "api" - key: string -} - -export type WellKnownAuth = { - type: "wellknown" - key: string - token: string -} - -export type Auth = OAuth | ApiAuth | WellKnownAuth - export type GlobalHealthData = { body?: never path?: never @@ -2256,6 +2256,60 @@ export type GlobalDisposeResponses = { export type GlobalDisposeResponse = GlobalDisposeResponses[keyof GlobalDisposeResponses] +export type AuthRemoveData = { + body?: never + path: { + providerID: string + } + query?: never + url: "/auth/{providerID}" +} + +export type AuthRemoveErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type AuthRemoveError = AuthRemoveErrors[keyof AuthRemoveErrors] + +export type AuthRemoveResponses = { + /** + * Successfully removed authentication credentials + */ + 200: boolean +} + +export type AuthRemoveResponse = AuthRemoveResponses[keyof AuthRemoveResponses] + +export type AuthSetData = { + body?: Auth + path: { + providerID: string + } + query?: never + url: "/auth/{providerID}" +} + +export type AuthSetErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type AuthSetError = AuthSetErrors[keyof AuthSetErrors] + +export type AuthSetResponses = { + /** + * Successfully set authentication credentials + */ + 200: boolean +} + +export type AuthSetResponse = AuthSetResponses[keyof AuthSetResponses] + export type ProjectListData = { body?: never path?: never @@ -4908,64 +4962,6 @@ export type FormatterStatusResponses = { export type FormatterStatusResponse = FormatterStatusResponses[keyof FormatterStatusResponses] -export type AuthRemoveData = { - body?: never - path: { - providerID: string - } - query?: { - directory?: string - } - url: "/auth/{providerID}" -} - -export type AuthRemoveErrors = { - /** - * Bad request - */ - 400: BadRequestError -} - -export type AuthRemoveError = AuthRemoveErrors[keyof AuthRemoveErrors] - -export type AuthRemoveResponses = { - /** - * Successfully removed authentication credentials - */ - 200: boolean -} - -export type AuthRemoveResponse = AuthRemoveResponses[keyof AuthRemoveResponses] - -export type AuthSetData = { - body?: Auth - path: { - providerID: string - } - query?: { - directory?: string - } - url: "/auth/{providerID}" -} - -export type AuthSetErrors = { - /** - * Bad request - */ - 400: BadRequestError -} - -export type AuthSetError = AuthSetErrors[keyof AuthSetErrors] - -export type AuthSetResponses = { - /** - * Successfully set authentication credentials - */ - 200: boolean -} - -export type AuthSetResponse = AuthSetResponses[keyof AuthSetResponses] - export type EventSubscribeData = { body?: never path?: never |
