@perstack/api-client 0.0.35 → 0.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +438 -0
- package/dist/index.js +957 -0
- package/dist/index.js.map +1 -0
- package/package.json +6 -7
- package/dist/v1/index.d.ts +0 -4043
- package/dist/v1/index.js +0 -1701
- package/dist/v1/index.js.map +0 -1
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
import { ZodType, z } from 'zod';
|
|
2
|
+
import { Skill } from '@perstack/core';
|
|
3
|
+
|
|
4
|
+
type ApiResult<T> = {
|
|
5
|
+
ok: true;
|
|
6
|
+
data: T;
|
|
7
|
+
} | {
|
|
8
|
+
ok: false;
|
|
9
|
+
error: ApiError;
|
|
10
|
+
};
|
|
11
|
+
interface ApiError {
|
|
12
|
+
code: number;
|
|
13
|
+
message: string;
|
|
14
|
+
reason?: unknown;
|
|
15
|
+
aborted?: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface ApiClientConfig {
|
|
18
|
+
apiKey?: string;
|
|
19
|
+
baseUrl?: string;
|
|
20
|
+
timeout?: number;
|
|
21
|
+
}
|
|
22
|
+
interface RequestOptions {
|
|
23
|
+
signal?: AbortSignal;
|
|
24
|
+
}
|
|
25
|
+
interface PaginationParams {
|
|
26
|
+
take?: number;
|
|
27
|
+
skip?: number;
|
|
28
|
+
sort?: string;
|
|
29
|
+
order?: "asc" | "desc";
|
|
30
|
+
filter?: string;
|
|
31
|
+
}
|
|
32
|
+
interface PaginatedResult<T> {
|
|
33
|
+
data: T[];
|
|
34
|
+
meta: {
|
|
35
|
+
total: number;
|
|
36
|
+
take: number;
|
|
37
|
+
skip: number;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
interface Fetcher {
|
|
42
|
+
get<T>(path: string, schema: ZodType<T>, options?: RequestOptions): Promise<ApiResult<T>>;
|
|
43
|
+
post<T>(path: string, body: unknown, schema: ZodType<T>, options?: RequestOptions): Promise<ApiResult<T>>;
|
|
44
|
+
delete<T>(path: string, schema: ZodType<T>, options?: RequestOptions): Promise<ApiResult<T>>;
|
|
45
|
+
getBlob(path: string, options?: RequestOptions): Promise<ApiResult<Blob>>;
|
|
46
|
+
}
|
|
47
|
+
declare function createFetcher(config?: ApiClientConfig): Fetcher;
|
|
48
|
+
|
|
49
|
+
declare const registryExpertStatusSchema: z.ZodEnum<{
|
|
50
|
+
deprecated: "deprecated";
|
|
51
|
+
available: "available";
|
|
52
|
+
disabled: "disabled";
|
|
53
|
+
}>;
|
|
54
|
+
type RegistryExpertStatus = z.infer<typeof registryExpertStatusSchema>;
|
|
55
|
+
declare const ownerSchema$1: z.ZodObject<{
|
|
56
|
+
name: z.ZodOptional<z.ZodString>;
|
|
57
|
+
organizationId: z.ZodString;
|
|
58
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
type Owner$1 = z.infer<typeof ownerSchema$1>;
|
|
61
|
+
declare const registryExpertSchema: z.ZodObject<{
|
|
62
|
+
type: z.ZodLiteral<"registryExpert">;
|
|
63
|
+
id: z.ZodString;
|
|
64
|
+
key: z.ZodString;
|
|
65
|
+
name: z.ZodString;
|
|
66
|
+
minRuntimeVersion: z.ZodLiteral<"v1.0">;
|
|
67
|
+
description: z.ZodString;
|
|
68
|
+
owner: z.ZodObject<{
|
|
69
|
+
name: z.ZodOptional<z.ZodString>;
|
|
70
|
+
organizationId: z.ZodString;
|
|
71
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
74
|
+
updatedAt: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
75
|
+
version: z.ZodString;
|
|
76
|
+
status: z.ZodEnum<{
|
|
77
|
+
deprecated: "deprecated";
|
|
78
|
+
available: "available";
|
|
79
|
+
disabled: "disabled";
|
|
80
|
+
}>;
|
|
81
|
+
instruction: z.ZodString;
|
|
82
|
+
skills: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodTransform<Record<string, Skill>, Record<string, unknown>>>;
|
|
83
|
+
delegates: z.ZodArray<z.ZodString>;
|
|
84
|
+
tags: z.ZodArray<z.ZodString>;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
type RegistryExpert = z.infer<typeof registryExpertSchema>;
|
|
87
|
+
declare const expertDigestSchema$1: z.ZodObject<{
|
|
88
|
+
type: z.ZodLiteral<"expertDigest">;
|
|
89
|
+
id: z.ZodString;
|
|
90
|
+
key: z.ZodString;
|
|
91
|
+
name: z.ZodString;
|
|
92
|
+
minRuntimeVersion: z.ZodLiteral<"v1.0">;
|
|
93
|
+
description: z.ZodString;
|
|
94
|
+
owner: z.ZodObject<{
|
|
95
|
+
name: z.ZodOptional<z.ZodString>;
|
|
96
|
+
organizationId: z.ZodString;
|
|
97
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
98
|
+
}, z.core.$strip>;
|
|
99
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
100
|
+
updatedAt: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
101
|
+
version: z.ZodOptional<z.ZodString>;
|
|
102
|
+
tags: z.ZodArray<z.ZodString>;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
type ExpertDigest$1 = z.infer<typeof expertDigestSchema$1>;
|
|
105
|
+
interface CreateExpertInput {
|
|
106
|
+
name: string;
|
|
107
|
+
version: string;
|
|
108
|
+
minRuntimeVersion: "v1.0";
|
|
109
|
+
description: string;
|
|
110
|
+
instruction: string;
|
|
111
|
+
skills: Record<string, unknown>;
|
|
112
|
+
delegates?: string[];
|
|
113
|
+
tags?: string[];
|
|
114
|
+
}
|
|
115
|
+
interface UpdateExpertInput {
|
|
116
|
+
status?: RegistryExpertStatus;
|
|
117
|
+
tags?: string[];
|
|
118
|
+
}
|
|
119
|
+
interface ListExpertsParams {
|
|
120
|
+
organizationId?: string;
|
|
121
|
+
filter?: string;
|
|
122
|
+
sort?: "name" | "version" | "createdAt" | "updatedAt";
|
|
123
|
+
order?: "asc" | "desc";
|
|
124
|
+
take?: number;
|
|
125
|
+
skip?: number;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Registry Experts API
|
|
130
|
+
*
|
|
131
|
+
* @see docs/api-reference/registry-v1/experts.md
|
|
132
|
+
*/
|
|
133
|
+
|
|
134
|
+
interface RegistryExpertsApi {
|
|
135
|
+
get(key: string, options?: RequestOptions): Promise<ApiResult<RegistryExpert>>;
|
|
136
|
+
list(params?: ListExpertsParams, options?: RequestOptions): Promise<ApiResult<PaginatedResult<RegistryExpert>>>;
|
|
137
|
+
create(input: CreateExpertInput, options?: RequestOptions): Promise<ApiResult<RegistryExpert>>;
|
|
138
|
+
update(key: string, input: UpdateExpertInput, options?: RequestOptions): Promise<ApiResult<RegistryExpert>>;
|
|
139
|
+
delete(key: string, options?: RequestOptions): Promise<ApiResult<void>>;
|
|
140
|
+
getVersions(key: string, options?: RequestOptions): Promise<ApiResult<{
|
|
141
|
+
versions: ExpertDigest$1[];
|
|
142
|
+
latest: string;
|
|
143
|
+
total: number;
|
|
144
|
+
}>>;
|
|
145
|
+
}
|
|
146
|
+
declare function createRegistryExpertsApi(fetcher: Fetcher): RegistryExpertsApi;
|
|
147
|
+
|
|
148
|
+
declare const applicationSchema: z.ZodObject<{
|
|
149
|
+
id: z.ZodString;
|
|
150
|
+
name: z.ZodString;
|
|
151
|
+
}, z.core.$strip>;
|
|
152
|
+
type Application = z.infer<typeof applicationSchema>;
|
|
153
|
+
declare const ownerSchema: z.ZodObject<{
|
|
154
|
+
name: z.ZodOptional<z.ZodString>;
|
|
155
|
+
organizationId: z.ZodString;
|
|
156
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
157
|
+
}, z.core.$strip>;
|
|
158
|
+
type Owner = z.infer<typeof ownerSchema>;
|
|
159
|
+
declare const studioExpertSchema: z.ZodObject<{
|
|
160
|
+
type: z.ZodLiteral<"studioExpert">;
|
|
161
|
+
id: z.ZodString;
|
|
162
|
+
key: z.ZodString;
|
|
163
|
+
name: z.ZodString;
|
|
164
|
+
minRuntimeVersion: z.ZodLiteral<"v1.0">;
|
|
165
|
+
description: z.ZodString;
|
|
166
|
+
owner: z.ZodObject<{
|
|
167
|
+
name: z.ZodOptional<z.ZodString>;
|
|
168
|
+
organizationId: z.ZodString;
|
|
169
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
170
|
+
}, z.core.$strip>;
|
|
171
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
172
|
+
updatedAt: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
173
|
+
instruction: z.ZodString;
|
|
174
|
+
skills: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodTransform<Record<string, Skill>, Record<string, unknown>>>;
|
|
175
|
+
delegates: z.ZodArray<z.ZodString>;
|
|
176
|
+
forkFrom: z.ZodOptional<z.ZodString>;
|
|
177
|
+
application: z.ZodObject<{
|
|
178
|
+
id: z.ZodString;
|
|
179
|
+
name: z.ZodString;
|
|
180
|
+
}, z.core.$strip>;
|
|
181
|
+
}, z.core.$strip>;
|
|
182
|
+
type StudioExpert = z.infer<typeof studioExpertSchema>;
|
|
183
|
+
declare const expertDigestSchema: z.ZodObject<{
|
|
184
|
+
type: z.ZodLiteral<"expertDigest">;
|
|
185
|
+
id: z.ZodString;
|
|
186
|
+
key: z.ZodString;
|
|
187
|
+
name: z.ZodString;
|
|
188
|
+
minRuntimeVersion: z.ZodLiteral<"v1.0">;
|
|
189
|
+
description: z.ZodString;
|
|
190
|
+
owner: z.ZodObject<{
|
|
191
|
+
name: z.ZodOptional<z.ZodString>;
|
|
192
|
+
organizationId: z.ZodString;
|
|
193
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
194
|
+
}, z.core.$strip>;
|
|
195
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
196
|
+
updatedAt: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
197
|
+
version: z.ZodOptional<z.ZodString>;
|
|
198
|
+
tags: z.ZodArray<z.ZodString>;
|
|
199
|
+
}, z.core.$strip>;
|
|
200
|
+
type ExpertDigest = z.infer<typeof expertDigestSchema>;
|
|
201
|
+
interface CreateStudioExpertInput {
|
|
202
|
+
name: string;
|
|
203
|
+
minRuntimeVersion: "v1.0";
|
|
204
|
+
description: string;
|
|
205
|
+
instruction: string;
|
|
206
|
+
skills: Record<string, unknown>;
|
|
207
|
+
delegates: string[];
|
|
208
|
+
forkFrom?: string;
|
|
209
|
+
}
|
|
210
|
+
interface UpdateStudioExpertInput {
|
|
211
|
+
minRuntimeVersion?: "v1.0";
|
|
212
|
+
description?: string;
|
|
213
|
+
instruction?: string;
|
|
214
|
+
skills?: Record<string, unknown>;
|
|
215
|
+
delegates?: string[];
|
|
216
|
+
forkFrom?: string;
|
|
217
|
+
}
|
|
218
|
+
interface ListStudioExpertsParams {
|
|
219
|
+
applicationId: string;
|
|
220
|
+
filter?: string;
|
|
221
|
+
sort?: "name" | "version" | "createdAt" | "updatedAt";
|
|
222
|
+
order?: "asc" | "desc";
|
|
223
|
+
take?: number;
|
|
224
|
+
skip?: number;
|
|
225
|
+
}
|
|
226
|
+
declare const expertJobStatusSchema: z.ZodEnum<{
|
|
227
|
+
completed: "completed";
|
|
228
|
+
queued: "queued";
|
|
229
|
+
processing: "processing";
|
|
230
|
+
requestInteractiveToolResult: "requestInteractiveToolResult";
|
|
231
|
+
requestDelegateResult: "requestDelegateResult";
|
|
232
|
+
exceededMaxSteps: "exceededMaxSteps";
|
|
233
|
+
failed: "failed";
|
|
234
|
+
canceling: "canceling";
|
|
235
|
+
canceled: "canceled";
|
|
236
|
+
expired: "expired";
|
|
237
|
+
}>;
|
|
238
|
+
type ExpertJobStatus = z.infer<typeof expertJobStatusSchema>;
|
|
239
|
+
declare const expertJobSchema: z.ZodObject<{
|
|
240
|
+
id: z.ZodString;
|
|
241
|
+
expertKey: z.ZodString;
|
|
242
|
+
status: z.ZodEnum<{
|
|
243
|
+
completed: "completed";
|
|
244
|
+
queued: "queued";
|
|
245
|
+
processing: "processing";
|
|
246
|
+
requestInteractiveToolResult: "requestInteractiveToolResult";
|
|
247
|
+
requestDelegateResult: "requestDelegateResult";
|
|
248
|
+
exceededMaxSteps: "exceededMaxSteps";
|
|
249
|
+
failed: "failed";
|
|
250
|
+
canceling: "canceling";
|
|
251
|
+
canceled: "canceled";
|
|
252
|
+
expired: "expired";
|
|
253
|
+
}>;
|
|
254
|
+
query: z.ZodOptional<z.ZodString>;
|
|
255
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
256
|
+
updatedAt: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
257
|
+
startedAt: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>>;
|
|
258
|
+
completedAt: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>>;
|
|
259
|
+
}, z.core.$strip>;
|
|
260
|
+
type ExpertJob = z.infer<typeof expertJobSchema>;
|
|
261
|
+
interface StartExpertJobInput {
|
|
262
|
+
expertKey: string;
|
|
263
|
+
query: string;
|
|
264
|
+
workspaceInstanceId?: string;
|
|
265
|
+
}
|
|
266
|
+
interface ContinueExpertJobInput {
|
|
267
|
+
response: string;
|
|
268
|
+
}
|
|
269
|
+
interface UpdateExpertJobInput {
|
|
270
|
+
status?: ExpertJobStatus;
|
|
271
|
+
}
|
|
272
|
+
interface ListExpertJobsParams {
|
|
273
|
+
applicationId: string;
|
|
274
|
+
filter?: string;
|
|
275
|
+
sort?: "createdAt" | "updatedAt" | "status";
|
|
276
|
+
order?: "asc" | "desc";
|
|
277
|
+
take?: number;
|
|
278
|
+
skip?: number;
|
|
279
|
+
}
|
|
280
|
+
declare const checkpointSchema: z.ZodObject<{
|
|
281
|
+
id: z.ZodString;
|
|
282
|
+
expertJobId: z.ZodString;
|
|
283
|
+
sequence: z.ZodNumber;
|
|
284
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
285
|
+
}, z.core.$strip>;
|
|
286
|
+
type Checkpoint = z.infer<typeof checkpointSchema>;
|
|
287
|
+
interface ListCheckpointsParams {
|
|
288
|
+
take?: number;
|
|
289
|
+
skip?: number;
|
|
290
|
+
sort?: "sequence" | "createdAt";
|
|
291
|
+
order?: "asc" | "desc";
|
|
292
|
+
}
|
|
293
|
+
declare const workspaceInstanceSchema: z.ZodObject<{
|
|
294
|
+
id: z.ZodString;
|
|
295
|
+
expertJobId: z.ZodString;
|
|
296
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
297
|
+
}, z.core.$strip>;
|
|
298
|
+
type WorkspaceInstance = z.infer<typeof workspaceInstanceSchema>;
|
|
299
|
+
declare const workspaceItemSchema: z.ZodObject<{
|
|
300
|
+
id: z.ZodString;
|
|
301
|
+
path: z.ZodString;
|
|
302
|
+
type: z.ZodEnum<{
|
|
303
|
+
file: "file";
|
|
304
|
+
directory: "directory";
|
|
305
|
+
}>;
|
|
306
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
307
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
308
|
+
updatedAt: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
309
|
+
}, z.core.$strip>;
|
|
310
|
+
type WorkspaceItem = z.infer<typeof workspaceItemSchema>;
|
|
311
|
+
interface ListWorkspaceItemsParams {
|
|
312
|
+
take?: number;
|
|
313
|
+
skip?: number;
|
|
314
|
+
path?: string;
|
|
315
|
+
}
|
|
316
|
+
declare const workspaceSchema: z.ZodObject<{
|
|
317
|
+
id: z.ZodString;
|
|
318
|
+
applicationId: z.ZodString;
|
|
319
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
320
|
+
updatedAt: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
|
|
321
|
+
}, z.core.$strip>;
|
|
322
|
+
type Workspace = z.infer<typeof workspaceSchema>;
|
|
323
|
+
declare const workspaceVariableSchema: z.ZodObject<{
|
|
324
|
+
name: z.ZodString;
|
|
325
|
+
value: z.ZodString;
|
|
326
|
+
}, z.core.$strip>;
|
|
327
|
+
type WorkspaceVariable = z.infer<typeof workspaceVariableSchema>;
|
|
328
|
+
declare const workspaceSecretSchema: z.ZodObject<{
|
|
329
|
+
name: z.ZodString;
|
|
330
|
+
}, z.core.$strip>;
|
|
331
|
+
type WorkspaceSecret = z.infer<typeof workspaceSecretSchema>;
|
|
332
|
+
interface CreateWorkspaceVariableInput {
|
|
333
|
+
name: string;
|
|
334
|
+
value: string;
|
|
335
|
+
}
|
|
336
|
+
interface UpdateWorkspaceVariableInput {
|
|
337
|
+
value: string;
|
|
338
|
+
}
|
|
339
|
+
interface CreateWorkspaceSecretInput {
|
|
340
|
+
name: string;
|
|
341
|
+
value: string;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Studio Expert Jobs API
|
|
346
|
+
*
|
|
347
|
+
* @see docs/api-reference/studio-v1/expert-jobs.md
|
|
348
|
+
*/
|
|
349
|
+
|
|
350
|
+
interface StudioExpertJobsApi {
|
|
351
|
+
get(id: string, options?: RequestOptions): Promise<ApiResult<ExpertJob>>;
|
|
352
|
+
list(params: ListExpertJobsParams, options?: RequestOptions): Promise<ApiResult<PaginatedResult<ExpertJob>>>;
|
|
353
|
+
start(input: StartExpertJobInput, options?: RequestOptions): Promise<ApiResult<ExpertJob>>;
|
|
354
|
+
continue(id: string, input: ContinueExpertJobInput, options?: RequestOptions): Promise<ApiResult<ExpertJob>>;
|
|
355
|
+
update(id: string, input: UpdateExpertJobInput, options?: RequestOptions): Promise<ApiResult<ExpertJob>>;
|
|
356
|
+
checkpoints: CheckpointsApi;
|
|
357
|
+
workspaceInstance: WorkspaceInstanceApi;
|
|
358
|
+
}
|
|
359
|
+
interface CheckpointsApi {
|
|
360
|
+
get(jobId: string, checkpointId: string, options?: RequestOptions): Promise<ApiResult<Checkpoint>>;
|
|
361
|
+
list(jobId: string, params?: ListCheckpointsParams, options?: RequestOptions): Promise<ApiResult<PaginatedResult<Checkpoint>>>;
|
|
362
|
+
create(jobId: string, options?: RequestOptions): Promise<ApiResult<Checkpoint>>;
|
|
363
|
+
}
|
|
364
|
+
interface WorkspaceInstanceApi {
|
|
365
|
+
get(jobId: string, options?: RequestOptions): Promise<ApiResult<WorkspaceInstance>>;
|
|
366
|
+
items: WorkspaceInstanceItemsApi;
|
|
367
|
+
}
|
|
368
|
+
interface WorkspaceInstanceItemsApi {
|
|
369
|
+
get(jobId: string, itemId: string, options?: RequestOptions): Promise<ApiResult<WorkspaceItem>>;
|
|
370
|
+
list(jobId: string, params?: ListWorkspaceItemsParams, options?: RequestOptions): Promise<ApiResult<PaginatedResult<WorkspaceItem>>>;
|
|
371
|
+
create(jobId: string, path: string, content: Blob, options?: RequestOptions): Promise<ApiResult<WorkspaceItem>>;
|
|
372
|
+
update(jobId: string, itemId: string, content: Blob, options?: RequestOptions): Promise<ApiResult<WorkspaceItem>>;
|
|
373
|
+
delete(jobId: string, itemId: string, options?: RequestOptions): Promise<ApiResult<void>>;
|
|
374
|
+
download(jobId: string, itemId: string, options?: RequestOptions): Promise<ApiResult<Blob>>;
|
|
375
|
+
find(jobId: string, pattern: string, options?: RequestOptions): Promise<ApiResult<WorkspaceItem[]>>;
|
|
376
|
+
}
|
|
377
|
+
declare function createStudioExpertJobsApi(fetcher: Fetcher): StudioExpertJobsApi;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Studio Experts API
|
|
381
|
+
*
|
|
382
|
+
* @see docs/api-reference/studio-v1/experts.md
|
|
383
|
+
*/
|
|
384
|
+
|
|
385
|
+
interface StudioExpertsApi {
|
|
386
|
+
get(key: string, options?: RequestOptions): Promise<ApiResult<StudioExpert>>;
|
|
387
|
+
list(params: ListStudioExpertsParams, options?: RequestOptions): Promise<ApiResult<PaginatedResult<ExpertDigest>>>;
|
|
388
|
+
create(input: CreateStudioExpertInput, options?: RequestOptions): Promise<ApiResult<StudioExpert>>;
|
|
389
|
+
update(key: string, input: UpdateStudioExpertInput, options?: RequestOptions): Promise<ApiResult<StudioExpert>>;
|
|
390
|
+
delete(key: string, options?: RequestOptions): Promise<ApiResult<void>>;
|
|
391
|
+
}
|
|
392
|
+
declare function createStudioExpertsApi(fetcher: Fetcher): StudioExpertsApi;
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Studio Workspace API
|
|
396
|
+
*
|
|
397
|
+
* @see docs/api-reference/studio-v1/workspace.md
|
|
398
|
+
*/
|
|
399
|
+
|
|
400
|
+
interface StudioWorkspaceApi {
|
|
401
|
+
get(options?: RequestOptions): Promise<ApiResult<Workspace>>;
|
|
402
|
+
items: WorkspaceItemsApi;
|
|
403
|
+
variables: WorkspaceVariablesApi;
|
|
404
|
+
secrets: WorkspaceSecretsApi;
|
|
405
|
+
}
|
|
406
|
+
interface WorkspaceItemsApi {
|
|
407
|
+
get(itemId: string, options?: RequestOptions): Promise<ApiResult<WorkspaceItem>>;
|
|
408
|
+
list(params?: ListWorkspaceItemsParams, options?: RequestOptions): Promise<ApiResult<PaginatedResult<WorkspaceItem>>>;
|
|
409
|
+
create(path: string, content: Blob, options?: RequestOptions): Promise<ApiResult<WorkspaceItem>>;
|
|
410
|
+
update(itemId: string, content: Blob, options?: RequestOptions): Promise<ApiResult<WorkspaceItem>>;
|
|
411
|
+
delete(itemId: string, options?: RequestOptions): Promise<ApiResult<void>>;
|
|
412
|
+
download(itemId: string, options?: RequestOptions): Promise<ApiResult<Blob>>;
|
|
413
|
+
find(pattern: string, options?: RequestOptions): Promise<ApiResult<WorkspaceItem[]>>;
|
|
414
|
+
}
|
|
415
|
+
interface WorkspaceVariablesApi {
|
|
416
|
+
create(input: CreateWorkspaceVariableInput, options?: RequestOptions): Promise<ApiResult<WorkspaceVariable>>;
|
|
417
|
+
update(name: string, input: UpdateWorkspaceVariableInput, options?: RequestOptions): Promise<ApiResult<WorkspaceVariable>>;
|
|
418
|
+
delete(name: string, options?: RequestOptions): Promise<ApiResult<void>>;
|
|
419
|
+
}
|
|
420
|
+
interface WorkspaceSecretsApi {
|
|
421
|
+
create(input: CreateWorkspaceSecretInput, options?: RequestOptions): Promise<ApiResult<WorkspaceSecret>>;
|
|
422
|
+
delete(name: string, options?: RequestOptions): Promise<ApiResult<void>>;
|
|
423
|
+
}
|
|
424
|
+
declare function createStudioWorkspaceApi(fetcher: Fetcher): StudioWorkspaceApi;
|
|
425
|
+
|
|
426
|
+
interface ApiClient {
|
|
427
|
+
registry: {
|
|
428
|
+
experts: RegistryExpertsApi;
|
|
429
|
+
};
|
|
430
|
+
studio: {
|
|
431
|
+
experts: StudioExpertsApi;
|
|
432
|
+
expertJobs: StudioExpertJobsApi;
|
|
433
|
+
workspace: StudioWorkspaceApi;
|
|
434
|
+
};
|
|
435
|
+
}
|
|
436
|
+
declare function createApiClient(config?: ApiClientConfig): ApiClient;
|
|
437
|
+
|
|
438
|
+
export { type ApiClient, type ApiClientConfig, type ApiError, type ApiResult, type Application, type Checkpoint, type CheckpointsApi, type ContinueExpertJobInput, type CreateExpertInput, type CreateStudioExpertInput, type CreateWorkspaceSecretInput, type CreateWorkspaceVariableInput, type ExpertDigest, type ExpertJob, type ExpertJobStatus, type Fetcher, type ListCheckpointsParams, type ListExpertJobsParams, type ListExpertsParams, type ListStudioExpertsParams, type ListWorkspaceItemsParams, type Owner, type PaginatedResult, type PaginationParams, type RegistryExpert, type ExpertDigest$1 as RegistryExpertDigest, type RegistryExpertStatus, type RegistryExpertsApi, type Owner$1 as RegistryOwner, type RequestOptions, type StartExpertJobInput, type StudioExpert, type StudioExpertJobsApi, type StudioExpertsApi, type StudioWorkspaceApi, type UpdateExpertInput, type UpdateExpertJobInput, type UpdateStudioExpertInput, type UpdateWorkspaceVariableInput, type Workspace, type WorkspaceInstance, type WorkspaceInstanceApi, type WorkspaceInstanceItemsApi, type WorkspaceItem, type WorkspaceItemsApi, type WorkspaceSecret, type WorkspaceSecretsApi, type WorkspaceVariable, type WorkspaceVariablesApi, createApiClient, createFetcher, createRegistryExpertsApi, createStudioExpertJobsApi, createStudioExpertsApi, createStudioWorkspaceApi };
|