File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change
1
+ import * as core from "./core" ;
1
2
import {
2
3
WrappedAgentVersions ,
3
4
WrappedApplications ,
@@ -11,8 +12,13 @@ import {
11
12
} from "./api/resources/_WrappedClients" ;
12
13
import { TrueFoundryClient as BaseTrueFoundryClient } from "./Client" ;
13
14
15
+ export interface TrueFoundryClientOptions extends Omit < BaseTrueFoundryClient . Options , 'environment' > {
16
+ baseUrl : core . Supplier < string > ;
17
+ environment ?: core . Supplier < string > ;
18
+ }
14
19
15
20
export class TrueFoundryClient extends BaseTrueFoundryClient {
21
+ protected readonly _options : BaseTrueFoundryClient . Options ;
16
22
protected _agentVersions : WrappedAgentVersions | undefined ;
17
23
protected _applications : WrappedApplications | undefined ;
18
24
protected _artifactVersions : WrappedArtifactVersions | undefined ;
@@ -23,6 +29,12 @@ export class TrueFoundryClient extends BaseTrueFoundryClient {
23
29
protected _tracingProjects : WrappedTracingProjects | undefined ;
24
30
protected _workspaces : WrappedWorkspaces | undefined ;
25
31
32
+ constructor ( _options : TrueFoundryClientOptions ) {
33
+ const options = { ..._options , environment : _options . environment ?? '' }
34
+ super ( options ) ;
35
+ this . _options = options ;
36
+ }
37
+
26
38
public get agentVersions ( ) : WrappedAgentVersions {
27
39
return ( this . _agentVersions ??= new WrappedAgentVersions ( this . _options ) ) ;
28
40
}
You can’t perform that action at this time.
0 commit comments