@@ -7,7 +7,7 @@ import type {
77 AppAgentsResponses ,
88 AppLogErrors ,
99 AppLogResponses ,
10- Auth as Auth2 ,
10+ Auth as Auth3 ,
1111 AuthSetErrors ,
1212 AuthSetResponses ,
1313 CommandListResponses ,
@@ -2023,7 +2023,10 @@ export class Provider extends HeyApiClient {
20232023 } )
20242024 }
20252025
2026- oauth = new Oauth ( { client : this . client } )
2026+ private _oauth ?: Oauth
2027+ get oauth ( ) : Oauth {
2028+ return ( this . _oauth ??= new Oauth ( { client : this . client } ) )
2029+ }
20272030}
20282031
20292032export class Find extends HeyApiClient {
@@ -2398,43 +2401,6 @@ export class Auth extends HeyApiClient {
23982401 } ,
23992402 )
24002403 }
2401-
2402- /**
2403- * Set auth credentials
2404- *
2405- * Set authentication credentials
2406- */
2407- public set < ThrowOnError extends boolean = false > (
2408- parameters : {
2409- providerID : string
2410- directory ?: string
2411- auth ?: Auth2
2412- } ,
2413- options ?: Options < never , ThrowOnError > ,
2414- ) {
2415- const params = buildClientParams (
2416- [ parameters ] ,
2417- [
2418- {
2419- args : [
2420- { in : "path" , key : "providerID" } ,
2421- { in : "query" , key : "directory" } ,
2422- { key : "auth" , map : "body" } ,
2423- ] ,
2424- } ,
2425- ] ,
2426- )
2427- return ( options ?. client ?? this . client ) . put < AuthSetResponses , AuthSetErrors , ThrowOnError > ( {
2428- url : "/auth/{providerID}" ,
2429- ...options ,
2430- ...params ,
2431- headers : {
2432- "Content-Type" : "application/json" ,
2433- ...options ?. headers ,
2434- ...params . headers ,
2435- } ,
2436- } )
2437- }
24382404}
24392405
24402406export class Mcp extends HeyApiClient {
@@ -2550,7 +2516,10 @@ export class Mcp extends HeyApiClient {
25502516 } )
25512517 }
25522518
2553- auth = new Auth ( { client : this . client } )
2519+ private _auth ?: Auth
2520+ get auth ( ) : Auth {
2521+ return ( this . _auth ??= new Auth ( { client : this . client } ) )
2522+ }
25542523}
25552524
25562525export class Resource extends HeyApiClient {
@@ -2575,7 +2544,10 @@ export class Resource extends HeyApiClient {
25752544}
25762545
25772546export class Experimental extends HeyApiClient {
2578- resource = new Resource ( { client : this . client } )
2547+ private _resource ?: Resource
2548+ get resource ( ) : Resource {
2549+ return ( this . _resource ??= new Resource ( { client : this . client } ) )
2550+ }
25792551}
25802552
25812553export class Lsp extends HeyApiClient {
@@ -2952,7 +2924,49 @@ export class Tui extends HeyApiClient {
29522924 } )
29532925 }
29542926
2955- control = new Control ( { client : this . client } )
2927+ private _control ?: Control
2928+ get control ( ) : Control {
2929+ return ( this . _control ??= new Control ( { client : this . client } ) )
2930+ }
2931+ }
2932+
2933+ export class Auth2 extends HeyApiClient {
2934+ /**
2935+ * Set auth credentials
2936+ *
2937+ * Set authentication credentials
2938+ */
2939+ public set < ThrowOnError extends boolean = false > (
2940+ parameters : {
2941+ providerID : string
2942+ directory ?: string
2943+ auth ?: Auth3
2944+ } ,
2945+ options ?: Options < never , ThrowOnError > ,
2946+ ) {
2947+ const params = buildClientParams (
2948+ [ parameters ] ,
2949+ [
2950+ {
2951+ args : [
2952+ { in : "path" , key : "providerID" } ,
2953+ { in : "query" , key : "directory" } ,
2954+ { key : "auth" , map : "body" } ,
2955+ ] ,
2956+ } ,
2957+ ] ,
2958+ )
2959+ return ( options ?. client ?? this . client ) . put < AuthSetResponses , AuthSetErrors , ThrowOnError > ( {
2960+ url : "/auth/{providerID}" ,
2961+ ...options ,
2962+ ...params ,
2963+ headers : {
2964+ "Content-Type" : "application/json" ,
2965+ ...options ?. headers ,
2966+ ...params . headers ,
2967+ } ,
2968+ } )
2969+ }
29562970}
29572971
29582972export class Event extends HeyApiClient {
@@ -2984,53 +2998,128 @@ export class OpencodeClient extends HeyApiClient {
29842998 OpencodeClient . __registry . set ( this , args ?. key )
29852999 }
29863000
2987- global = new Global ( { client : this . client } )
3001+ private _global ?: Global
3002+ get global ( ) : Global {
3003+ return ( this . _global ??= new Global ( { client : this . client } ) )
3004+ }
29883005
2989- project = new Project ( { client : this . client } )
3006+ private _project ?: Project
3007+ get project ( ) : Project {
3008+ return ( this . _project ??= new Project ( { client : this . client } ) )
3009+ }
29903010
2991- pty = new Pty ( { client : this . client } )
3011+ private _pty ?: Pty
3012+ get pty ( ) : Pty {
3013+ return ( this . _pty ??= new Pty ( { client : this . client } ) )
3014+ }
29923015
2993- config = new Config ( { client : this . client } )
3016+ private _config ?: Config
3017+ get config ( ) : Config {
3018+ return ( this . _config ??= new Config ( { client : this . client } ) )
3019+ }
29943020
2995- tool = new Tool ( { client : this . client } )
3021+ private _tool ?: Tool
3022+ get tool ( ) : Tool {
3023+ return ( this . _tool ??= new Tool ( { client : this . client } ) )
3024+ }
29963025
2997- instance = new Instance ( { client : this . client } )
3026+ private _instance ?: Instance
3027+ get instance ( ) : Instance {
3028+ return ( this . _instance ??= new Instance ( { client : this . client } ) )
3029+ }
29983030
2999- path = new Path ( { client : this . client } )
3031+ private _path ?: Path
3032+ get path ( ) : Path {
3033+ return ( this . _path ??= new Path ( { client : this . client } ) )
3034+ }
30003035
3001- worktree = new Worktree ( { client : this . client } )
3036+ private _worktree ?: Worktree
3037+ get worktree ( ) : Worktree {
3038+ return ( this . _worktree ??= new Worktree ( { client : this . client } ) )
3039+ }
30023040
3003- vcs = new Vcs ( { client : this . client } )
3041+ private _vcs ?: Vcs
3042+ get vcs ( ) : Vcs {
3043+ return ( this . _vcs ??= new Vcs ( { client : this . client } ) )
3044+ }
30043045
3005- session = new Session ( { client : this . client } )
3046+ private _session ?: Session
3047+ get session ( ) : Session {
3048+ return ( this . _session ??= new Session ( { client : this . client } ) )
3049+ }
30063050
3007- part = new Part ( { client : this . client } )
3051+ private _part ?: Part
3052+ get part ( ) : Part {
3053+ return ( this . _part ??= new Part ( { client : this . client } ) )
3054+ }
30083055
3009- permission = new Permission ( { client : this . client } )
3056+ private _permission ?: Permission
3057+ get permission ( ) : Permission {
3058+ return ( this . _permission ??= new Permission ( { client : this . client } ) )
3059+ }
30103060
3011- question = new Question ( { client : this . client } )
3061+ private _question ?: Question
3062+ get question ( ) : Question {
3063+ return ( this . _question ??= new Question ( { client : this . client } ) )
3064+ }
30123065
3013- command = new Command ( { client : this . client } )
3066+ private _command ?: Command
3067+ get command ( ) : Command {
3068+ return ( this . _command ??= new Command ( { client : this . client } ) )
3069+ }
30143070
3015- provider = new Provider ( { client : this . client } )
3071+ private _provider ?: Provider
3072+ get provider ( ) : Provider {
3073+ return ( this . _provider ??= new Provider ( { client : this . client } ) )
3074+ }
30163075
3017- find = new Find ( { client : this . client } )
3076+ private _find ?: Find
3077+ get find ( ) : Find {
3078+ return ( this . _find ??= new Find ( { client : this . client } ) )
3079+ }
30183080
3019- file = new File ( { client : this . client } )
3081+ private _file ?: File
3082+ get file ( ) : File {
3083+ return ( this . _file ??= new File ( { client : this . client } ) )
3084+ }
30203085
3021- app = new App ( { client : this . client } )
3086+ private _app ?: App
3087+ get app ( ) : App {
3088+ return ( this . _app ??= new App ( { client : this . client } ) )
3089+ }
30223090
3023- mcp = new Mcp ( { client : this . client } )
3091+ private _mcp ?: Mcp
3092+ get mcp ( ) : Mcp {
3093+ return ( this . _mcp ??= new Mcp ( { client : this . client } ) )
3094+ }
30243095
3025- experimental = new Experimental ( { client : this . client } )
3096+ private _experimental ?: Experimental
3097+ get experimental ( ) : Experimental {
3098+ return ( this . _experimental ??= new Experimental ( { client : this . client } ) )
3099+ }
30263100
3027- lsp = new Lsp ( { client : this . client } )
3101+ private _lsp ?: Lsp
3102+ get lsp ( ) : Lsp {
3103+ return ( this . _lsp ??= new Lsp ( { client : this . client } ) )
3104+ }
30283105
3029- formatter = new Formatter ( { client : this . client } )
3106+ private _formatter ?: Formatter
3107+ get formatter ( ) : Formatter {
3108+ return ( this . _formatter ??= new Formatter ( { client : this . client } ) )
3109+ }
30303110
3031- tui = new Tui ( { client : this . client } )
3111+ private _tui ?: Tui
3112+ get tui ( ) : Tui {
3113+ return ( this . _tui ??= new Tui ( { client : this . client } ) )
3114+ }
30323115
3033- auth = new Auth ( { client : this . client } )
3116+ private _auth ?: Auth2
3117+ get auth ( ) : Auth2 {
3118+ return ( this . _auth ??= new Auth2 ( { client : this . client } ) )
3119+ }
30343120
3035- event = new Event ( { client : this . client } )
3121+ private _event ?: Event
3122+ get event ( ) : Event {
3123+ return ( this . _event ??= new Event ( { client : this . client } ) )
3124+ }
30363125}
0 commit comments