1
+ import * as core from "../../core" ;
2
+ import * as TrueFoundry from "../index" ;
3
+ import { Agents } from "./agents/client/Client" ;
1
4
import { AgentVersions } from "./agentVersions/client/Client" ;
2
5
import { Applications } from "./applications/client/Client" ;
6
+ import { Artifacts } from "./artifacts/client/Client" ;
3
7
import { ArtifactVersions } from "./artifactVersions/client/Client" ;
8
+ import { DataDirectories } from "./dataDirectories/client/Client" ;
9
+ import { Models } from "./models/client/Client" ;
4
10
import { ModelVersions } from "./modelVersions/client/Client" ;
11
+ import { Prompts } from "./prompts/client/Client" ;
5
12
import { PromptVersions } from "./promptVersions/client/Client" ;
6
13
import { SecretGroups } from "./secretGroups/client/Client" ;
14
+ import { Tools } from "./tools/client/Client" ;
7
15
import { ToolVersions } from "./toolVersions/client/Client" ;
8
16
import { TracingProjects } from "./tracingProjects/client/Client" ;
9
17
import { Workspaces } from "./workspaces/client/Client" ;
10
- import * as core from "../../core"
11
- import * as TrueFoundry from "../index" ;
12
18
13
19
interface HasAsyncListMethod < T > {
14
20
list ( request : { fqn : string ; limit ?: number } , requestOptions ?: object ) : Promise < core . Page < T > > ;
@@ -30,6 +36,25 @@ async function getByFqn<T>(client: HasAsyncListMethod<T>, fqn: string, requestOp
30
36
return result ;
31
37
}
32
38
39
+ export class WrappedAgents extends Agents {
40
+ /**
41
+ * Get agent API
42
+ *
43
+ * @param {string } fqn
44
+ * @param {Agents.RequestOptions } requestOptions - Request-specific configuration.
45
+ *
46
+ * @throws {@link TrueFoundry.UnprocessableEntityError }
47
+ *
48
+ * @example
49
+ * await client.v1.agents.getByFqn("fqn")
50
+ */
51
+ public async getByFqn (
52
+ fqn : string ,
53
+ requestOptions ?: Agents . RequestOptions ,
54
+ ) : Promise < TrueFoundry . GetAgentResponse > {
55
+ return { data : await getByFqn ( this , fqn , requestOptions ) }
56
+ }
57
+ }
33
58
34
59
export class WrappedAgentVersions extends AgentVersions {
35
60
/**
@@ -71,6 +96,26 @@ export class WrappedApplications extends Applications {
71
96
}
72
97
}
73
98
99
+ export class WrappedArtifacts extends Artifacts {
100
+ /**
101
+ * Get artifact API
102
+ *
103
+ * @param {string } fqn
104
+ * @param {Artifacts.RequestOptions } requestOptions - Request-specific configuration.
105
+ *
106
+ * @throws {@link TrueFoundry.UnprocessableEntityError }
107
+ *
108
+ * @example
109
+ * await client.v1.artifacts.getByFqn("fqn")
110
+ */
111
+ public async getByFqn (
112
+ fqn : string ,
113
+ requestOptions ?: Artifacts . RequestOptions ,
114
+ ) : Promise < TrueFoundry . GetArtifactResponse > {
115
+ return { data : await getByFqn ( this , fqn , requestOptions ) }
116
+ }
117
+ }
118
+
74
119
export class WrappedArtifactVersions extends ArtifactVersions {
75
120
/**
76
121
* Get artifact version API
@@ -91,6 +136,46 @@ export class WrappedArtifactVersions extends ArtifactVersions {
91
136
}
92
137
}
93
138
139
+ export class WrappedDataDirectories extends DataDirectories {
140
+ /**
141
+ * Get data directory API
142
+ *
143
+ * @param {string } fqn
144
+ * @param {DataDirectories.RequestOptions } requestOptions - Request-specific configuration.
145
+ *
146
+ * @throws {@link TrueFoundry.UnprocessableEntityError }
147
+ *
148
+ * @example
149
+ * await client.v1.dataDirectories.getByFqn("fqn")
150
+ */
151
+ public async getByFqn (
152
+ fqn : string ,
153
+ requestOptions ?: DataDirectories . RequestOptions ,
154
+ ) : Promise < TrueFoundry . GetDataDirectoryResponse > {
155
+ return { data : await getByFqn ( this , fqn , requestOptions ) }
156
+ }
157
+ }
158
+
159
+ export class WrappedModels extends Models {
160
+ /**
161
+ * Get model API
162
+ *
163
+ * @param {string } fqn
164
+ * @param {Models.RequestOptions } requestOptions - Request-specific configuration.
165
+ *
166
+ * @throws {@link TrueFoundry.UnprocessableEntityError }
167
+ *
168
+ * @example
169
+ * await client.v1.models.getByFqn("fqn")
170
+ */
171
+ public async getByFqn (
172
+ fqn : string ,
173
+ requestOptions ?: Models . RequestOptions ,
174
+ ) : Promise < TrueFoundry . GetModelResponse > {
175
+ return { data : await getByFqn ( this , fqn , requestOptions ) }
176
+ }
177
+ }
178
+
94
179
export class WrappedModelVersions extends ModelVersions {
95
180
/**
96
181
* Get model version API
@@ -111,6 +196,26 @@ export class WrappedModelVersions extends ModelVersions {
111
196
}
112
197
}
113
198
199
+ export class WrappedPrompts extends Prompts {
200
+ /**
201
+ * Get prompt API
202
+ *
203
+ * @param {string } fqn
204
+ * @param {Prompts.RequestOptions } requestOptions - Request-specific configuration.
205
+ *
206
+ * @throws {@link TrueFoundry.UnprocessableEntityError }
207
+ *
208
+ * @example
209
+ * await client.v1.prompts.getByFqn("fqn")
210
+ */
211
+ public async getByFqn (
212
+ fqn : string ,
213
+ requestOptions ?: Prompts . RequestOptions ,
214
+ ) : Promise < TrueFoundry . GetPromptResponse > {
215
+ return { data : await getByFqn ( this , fqn , requestOptions ) }
216
+ }
217
+ }
218
+
114
219
export class WrappedPromptVersions extends PromptVersions {
115
220
/**
116
221
* Get prompt version API
@@ -151,6 +256,26 @@ export class WrappedSecretGroups extends SecretGroups {
151
256
}
152
257
}
153
258
259
+ export class WrappedTools extends Tools {
260
+ /**
261
+ * Get tool API
262
+ *
263
+ * @param {string } fqn
264
+ * @param {Tools.RequestOptions } requestOptions - Request-specific configuration.
265
+ *
266
+ * @throws {@link TrueFoundry.UnprocessableEntityError }
267
+ *
268
+ * @example
269
+ * await client.v1.tools.getByFqn("fqn")
270
+ */
271
+ public async getByFqn (
272
+ fqn : string ,
273
+ requestOptions ?: Tools . RequestOptions ,
274
+ ) : Promise < TrueFoundry . GetToolResponse > {
275
+ return { data : await getByFqn ( this , fqn , requestOptions ) }
276
+ }
277
+ }
278
+
154
279
export class WrappedToolVersions extends ToolVersions {
155
280
/**
156
281
* Get tool version API
0 commit comments