@eigenpal/sdk 0.25.12 → 1.0.0-rc.1

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.
Files changed (73) hide show
  1. package/README.md +27 -105
  2. package/dist/client.d.ts +164 -0
  3. package/dist/client.js +234 -0
  4. package/dist/core.d.ts +82 -0
  5. package/dist/core.js +311 -0
  6. package/dist/errors.d.ts +64 -0
  7. package/dist/errors.js +132 -0
  8. package/dist/generated/operations.gen.d.ts +336 -0
  9. package/dist/generated/operations.gen.js +135 -0
  10. package/dist/generated/public.gen.d.ts +2 -0
  11. package/dist/generated/public.gen.js +2 -0
  12. package/dist/generated/resources.gen.d.ts +490 -0
  13. package/dist/generated/resources.gen.js +659 -0
  14. package/dist/generated/types.gen.d.ts +2457 -0
  15. package/dist/generated/types.gen.js +2 -0
  16. package/dist/index.d.ts +20 -0
  17. package/dist/index.js +15 -0
  18. package/dist/lib/fetch-body.d.ts +23 -0
  19. package/dist/lib/fetch-body.js +66 -0
  20. package/dist/lib/files.d.ts +134 -0
  21. package/dist/lib/files.js +296 -0
  22. package/dist/lib/upload-app-chunked.d.ts +36 -0
  23. package/dist/lib/upload-app-chunked.js +94 -0
  24. package/dist/lib/upload-limits.d.ts +32 -0
  25. package/dist/lib/upload-limits.js +60 -0
  26. package/dist/lib/upload-presigned-multipart.d.ts +74 -0
  27. package/dist/lib/upload-presigned-multipart.js +212 -0
  28. package/dist/page.d.ts +30 -0
  29. package/dist/page.js +38 -0
  30. package/dist/resources.d.ts +85 -0
  31. package/dist/resources.js +247 -0
  32. package/dist/telemetry.d.ts +20 -0
  33. package/{src/telemetry.ts → dist/telemetry.js} +26 -31
  34. package/dist/upload-file.d.ts +31 -0
  35. package/dist/upload-file.js +286 -0
  36. package/{src/upload.ts → dist/upload.d.ts} +4 -4
  37. package/dist/upload.js +12 -0
  38. package/package.json +19 -15
  39. package/src/client.ts +0 -656
  40. package/src/errors.ts +0 -130
  41. package/src/generated/client/client.gen.ts +0 -277
  42. package/src/generated/client/index.ts +0 -27
  43. package/src/generated/client/types.gen.ts +0 -218
  44. package/src/generated/client/utils.gen.ts +0 -316
  45. package/src/generated/client.gen.ts +0 -18
  46. package/src/generated/core/auth.gen.ts +0 -48
  47. package/src/generated/core/bodySerializer.gen.ts +0 -82
  48. package/src/generated/core/params.gen.ts +0 -178
  49. package/src/generated/core/pathSerializer.gen.ts +0 -171
  50. package/src/generated/core/queryKeySerializer.gen.ts +0 -117
  51. package/src/generated/core/serverSentEvents.gen.ts +0 -242
  52. package/src/generated/core/types.gen.ts +0 -110
  53. package/src/generated/core/utils.gen.ts +0 -140
  54. package/src/generated/index.ts +0 -4
  55. package/src/generated/sdk.gen.ts +0 -1361
  56. package/src/generated/types.gen.ts +0 -9282
  57. package/src/index.ts +0 -120
  58. package/src/lib/fetch-body.ts +0 -92
  59. package/src/lib/files.ts +0 -390
  60. package/src/lib/upload-app-chunked.ts +0 -121
  61. package/src/lib/upload-limits.ts +0 -72
  62. package/src/lib/upload-presigned-multipart.ts +0 -285
  63. package/src/resources/auth.ts +0 -18
  64. package/src/resources/automations.ts +0 -830
  65. package/src/resources/dataset-review-requests.ts +0 -38
  66. package/src/resources/email-servers.ts +0 -95
  67. package/src/resources/files.ts +0 -592
  68. package/src/resources/folders.ts +0 -77
  69. package/src/resources/human-reviews.ts +0 -106
  70. package/src/resources/models.ts +0 -37
  71. package/src/resources/runs.ts +0 -350
  72. package/src/resources/templates.ts +0 -153
  73. package/src/runtime-config.ts +0 -14
@@ -0,0 +1,490 @@
1
+ import type { Core } from '../core.js';
2
+ import type { PagePromise } from '../page.js';
3
+ import type { DatasetsReviews, EmailServers, Experiments, Files, Runs, Templates } from '../resources.js';
4
+ import type { ApiCallOptions, AutomationDetail, AutomationList, AutomationsGetOptions, AutomationsListOptions, AutomationSummary, DatasetReviewDetail, DatasetReviewInboxItem, DatasetReviewInboxList, DatasetsReviewsCreateOptions, DatasetsReviewsListOptions, DeletedVariable, DeleteEmailServerResponse, DeleteFileResponse, DeletePromotionRouteResponse, DeleteTemplateResponse, EmailServer, EmailServerList, EmailServersDeleteOptions, EmailServersGetOptions, EmailServersListOptions, EmailServersTestOptions, Experiment, ExperimentList, ExperimentsListOptions, File, FilesDeleteOptions, FilesDownloadOptions, FilesGetOptions, ModelList, ModelsListOptions, Project, ProjectList, ProjectRelease, ProjectReleaseDetail, ProjectReleaseList, ProjectsListOptions, ProjectStatus, PromotionRoute, PromotionRouteList, PromotionRoutePlan, PublicModel, ReleasesGetOptions, ReleasesListOptions, ReleasesRestoreOptions, ReleasesWithdrawOptions, ReviewList, ReviewsApproveOptions, ReviewsDownloadOptions, ReviewsGetOptions, ReviewsListOptions, ReviewsRejectOptions, ReviewsSetOptions, ReviewTaskDetail, RoutesDeleteOptions, RoutesGetOptions, RoutesListOptions, RoutesSetOptions, Run, RunAccepted, RunCancelResponse, RunList, RunListItem, RunsCancelOptions, RunsGetOptions, RunsListOptions, RunsRerunOptions, StatusOptions, Template, TemplateList, TemplatesDeleteOptions, TemplatesDownloadOptions, TemplatesGetOptions, TemplatesListOptions, TestEmailServerResponse, Variable, VariableList, VariablesDeleteOptions, VariableSetResponse, VariablesListOptions, VariablesSetOptions } from './types.gen.js';
5
+ /** The hand-written classes that fill the custom methods. */
6
+ export interface ResourceImpls {
7
+ RunsResource: new (core: Core, impls: ResourceImpls) => Runs;
8
+ ExperimentsResource: new (core: Core, impls: ResourceImpls) => Experiments;
9
+ DatasetsReviewsResource: new (core: Core, impls: ResourceImpls) => DatasetsReviews;
10
+ TemplatesResource: new (core: Core, impls: ResourceImpls) => Templates;
11
+ EmailServersResource: new (core: Core, impls: ResourceImpls) => EmailServers;
12
+ FilesResource: new (core: Core, impls: ResourceImpls) => Files;
13
+ }
14
+ export declare class AutomationsResource {
15
+ protected readonly core: Core;
16
+ constructor(core: Core, impls: ResourceImpls);
17
+ /**
18
+ * The automations of the project and their state against live.
19
+ *
20
+ * CLI: `eigenpal automations list` · Route: `GET /v1/automations`
21
+ *
22
+ * Answers a page; iterate it (`for await`) for every item.
23
+ */
24
+ list(options?: AutomationsListOptions): PagePromise<AutomationSummary, AutomationList>;
25
+ /**
26
+ * An automation: inputs, output schema, variables, dataset and a ready run command.
27
+ *
28
+ * CLI: `eigenpal automations get <automation>[@live]` · Route: `GET /v1/automations/{id}`
29
+ */
30
+ get(automation: string, options?: AutomationsGetOptions): Promise<AutomationDetail>;
31
+ }
32
+ export declare abstract class RunsResource {
33
+ protected readonly core: Core;
34
+ constructor(core: Core, impls: ResourceImpls);
35
+ /**
36
+ * List runs, newest first.
37
+ *
38
+ * CLI: `eigenpal runs list` · Route: `GET /v1/runs`
39
+ *
40
+ * Answers a page; iterate it (`for await`) for every item.
41
+ */
42
+ list(options?: RunsListOptions): PagePromise<RunListItem, RunList>;
43
+ /**
44
+ * A run: its status, output, error and a step summary.
45
+ *
46
+ * CLI: `eigenpal runs get <run>` · Route: `GET /v1/runs/{id}`
47
+ *
48
+ * Waits with `wait: true` (`timeoutMs`, default 30 minutes).
49
+ */
50
+ get(run: string, options?: RunsGetOptions): Promise<Run>;
51
+ /**
52
+ * Print the log of a run, as text (or JSON lines with --out).
53
+ *
54
+ * CLI: `eigenpal runs logs <run>` · Route: `GET /v1/runs/{id}/events`
55
+ */
56
+ abstract logs(run: never, ...rest: never[]): unknown;
57
+ /**
58
+ * Download the output files of a run (all of them without paths).
59
+ *
60
+ * CLI: `eigenpal runs download <run> [path]...` · Route: `GET /v1/runs/{id}/artifacts`
61
+ */
62
+ abstract download(run: never, ...rest: never[]): unknown;
63
+ /**
64
+ * Cancel a queued, running or waiting run.
65
+ *
66
+ * CLI: `eigenpal runs cancel <run>` · Route: `POST /v1/runs/{id}/cancel`
67
+ */
68
+ cancel(run: string, options?: RunsCancelOptions): Promise<RunCancelResponse>;
69
+ /**
70
+ * Run the same input again, on what is live or another version.
71
+ *
72
+ * CLI: `eigenpal runs rerun <run>[@<version|range|live|original>]` · Route: `POST /v1/runs/{id}/rerun`
73
+ *
74
+ * Waits by default (`timeoutMs`, default 30 minutes).
75
+ */
76
+ rerun(run: string, options?: RunsRerunOptions): Promise<Run | RunAccepted>;
77
+ }
78
+ export declare abstract class ExperimentsResource {
79
+ protected readonly core: Core;
80
+ constructor(core: Core, impls: ResourceImpls);
81
+ /**
82
+ * List experiments (runs of a dataset), newest first.
83
+ *
84
+ * CLI: `eigenpal experiments list` · Route: `GET /v1/automations/{id}/experiments`
85
+ *
86
+ * Answers a page; iterate it (`for await`) for every item.
87
+ */
88
+ list(automation: string, options?: ExperimentsListOptions): PagePromise<Experiment, ExperimentList>;
89
+ /**
90
+ * An experiment: passed and failed examples by field and evaluator.
91
+ *
92
+ * CLI: `eigenpal experiments get <experiment>` · Route: `GET /v1/automations/{id}/experiments/{experimentId}`
93
+ *
94
+ * Waits with `wait: true` (`timeoutMs`, default 30 minutes).
95
+ */
96
+ abstract get(experiment: never, ...rest: never[]): unknown;
97
+ /**
98
+ * Cancel a running experiment.
99
+ *
100
+ * CLI: `eigenpal experiments cancel <experiment>` · Route: `POST /v1/automations/{id}/experiments/{experimentId}/cancel`
101
+ */
102
+ abstract cancel(experiment: never, ...rest: never[]): unknown;
103
+ }
104
+ export declare class ReleasesResource {
105
+ protected readonly core: Core;
106
+ constructor(core: Core, impls: ResourceImpls);
107
+ /**
108
+ * The releases of the project, newest first, with where each is live.
109
+ *
110
+ * CLI: `eigenpal releases list` · Route: `GET /v1/projects/{id}/releases`
111
+ *
112
+ * Answers a page; iterate it (`for await`) for every item.
113
+ */
114
+ list(options?: ReleasesListOptions): PagePromise<ProjectRelease, ProjectReleaseList>;
115
+ /**
116
+ * A release: the commit, build, notes, automations and where it is live.
117
+ *
118
+ * CLI: `eigenpal releases get <version>` · Route: `GET /v1/projects/{id}/releases/{version}`
119
+ */
120
+ get(version: string, options?: ReleasesGetOptions): Promise<ProjectReleaseDetail>;
121
+ /**
122
+ * Withdraw a release so it is no longer promoted; what is live stays live.
123
+ *
124
+ * CLI: `eigenpal releases withdraw <version>` · Route: `POST /v1/projects/{id}/releases/{version}/withdraw`
125
+ */
126
+ withdraw(version: string, options?: ReleasesWithdrawOptions): Promise<ProjectRelease>;
127
+ /**
128
+ * Restore a withdrawn release.
129
+ *
130
+ * CLI: `eigenpal releases restore <version>` · Route: `POST /v1/projects/{id}/releases/{version}/restore`
131
+ */
132
+ restore(version: string, options?: ReleasesRestoreOptions): Promise<ProjectRelease>;
133
+ }
134
+ export declare abstract class DatasetsReviewsResource {
135
+ protected readonly core: Core;
136
+ constructor(core: Core, impls: ResourceImpls);
137
+ /**
138
+ * Ask a person to check the ground truth of dataset examples in Studio. The request covers the whole dataset shape; --focus marks only uncertain fields.
139
+ *
140
+ * CLI: `eigenpal datasets reviews create <automation>` · Route: `POST /v1/automations/{id}/dataset-review-requests`
141
+ */
142
+ create(automation: string, options: DatasetsReviewsCreateOptions): Promise<DatasetReviewDetail>;
143
+ /**
144
+ * List dataset review requests, newest first.
145
+ *
146
+ * CLI: `eigenpal datasets reviews list` · Route: `GET /v1/dataset-review-requests`
147
+ *
148
+ * Answers a page; iterate it (`for await`) for every item.
149
+ */
150
+ list(options?: DatasetsReviewsListOptions): PagePromise<DatasetReviewInboxItem, DatasetReviewInboxList>;
151
+ /**
152
+ * A dataset review: progress, decisions, notes and the corrections commit.
153
+ *
154
+ * CLI: `eigenpal datasets reviews get <review>` · Route: `GET /v1/automations/{id}/dataset-review-requests/{reviewId}`
155
+ *
156
+ * Waits with `wait: true` (`timeoutMs`, default 30 minutes).
157
+ */
158
+ abstract get(review: never, ...rest: never[]): unknown;
159
+ /**
160
+ * Add a comment to an example of a dataset review, or to one field. A comment never changes an expected value.
161
+ *
162
+ * CLI: `eigenpal datasets reviews comment <review> <example>` · Route: `PATCH /v1/automations/{id}/dataset-review-requests/{reviewId}/items/{itemId}`
163
+ */
164
+ abstract comment(review: never, example: never, ...rest: never[]): unknown;
165
+ /**
166
+ * Close a dataset review request; open decisions stay as they are.
167
+ *
168
+ * CLI: `eigenpal datasets reviews close <review>` · Route: `PATCH /v1/automations/{id}/dataset-review-requests/{reviewId}`
169
+ */
170
+ abstract close(review: never, ...rest: never[]): unknown;
171
+ }
172
+ export declare class DatasetsResource {
173
+ protected readonly core: Core;
174
+ readonly reviews: DatasetsReviews;
175
+ constructor(core: Core, impls: ResourceImpls);
176
+ }
177
+ export declare class ReviewsResource {
178
+ protected readonly core: Core;
179
+ constructor(core: Core, impls: ResourceImpls);
180
+ /**
181
+ * Runs that wait for a person to review them, oldest first.
182
+ *
183
+ * CLI: `eigenpal reviews list` · Route: `GET /v1/reviews`
184
+ *
185
+ * Answers a page; iterate it (`for await`) for every item.
186
+ */
187
+ list(options?: ReviewsListOptions): PagePromise<{
188
+ id: string;
189
+ runId: string;
190
+ automationId: string;
191
+ automationName: string;
192
+ project?: {
193
+ id: string;
194
+ slug: string;
195
+ } | null;
196
+ sourceKind: 'workflow_step' | 'agent_tool';
197
+ sourceLabel: string;
198
+ status: 'pending' | 'approved' | 'rejected' | 'cancelled';
199
+ requiredCount: number;
200
+ confirmedCount: number;
201
+ version: number;
202
+ createdAt: string;
203
+ updatedAt: string;
204
+ }, ReviewList>;
205
+ /**
206
+ * A review task: what it asks, its fields and its files.
207
+ *
208
+ * CLI: `eigenpal reviews get <task>` · Route: `GET /v1/reviews/{taskId}`
209
+ */
210
+ get(task: string, options?: ReviewsGetOptions): Promise<ReviewTaskDetail>;
211
+ /**
212
+ * Set one field of a review task. Does not approve it.
213
+ *
214
+ * CLI: `eigenpal reviews set <task> <path> <value>` · Route: `PUT /v1/reviews/{taskId}/fields`
215
+ */
216
+ set(task: string, path: string, value: string | number | boolean | null, options: ReviewsSetOptions): Promise<ReviewTaskDetail>;
217
+ /**
218
+ * Approve a review task so its run continues. A human gate: only when you were asked to.
219
+ *
220
+ * CLI: `eigenpal reviews approve <task>` · Route: `POST /v1/reviews/{taskId}/approve`
221
+ */
222
+ approve(task: string, options: ReviewsApproveOptions): Promise<ReviewTaskDetail>;
223
+ /**
224
+ * Reject a review task; its run ends as failed.
225
+ *
226
+ * CLI: `eigenpal reviews reject <task>` · Route: `POST /v1/reviews/{taskId}/reject`
227
+ */
228
+ reject(task: string, options: ReviewsRejectOptions): Promise<ReviewTaskDetail>;
229
+ /**
230
+ * Download a file of a review task.
231
+ *
232
+ * CLI: `eigenpal reviews download <task> <file>` · Route: `GET /v1/reviews/{taskId}/files/{fileId}/content`
233
+ */
234
+ download(task: string, file: string, options?: ReviewsDownloadOptions): Promise<Blob>;
235
+ }
236
+ export declare class VariablesResource {
237
+ protected readonly core: Core;
238
+ constructor(core: Core, impls: ResourceImpls);
239
+ /**
240
+ * The organization's variables and each project's own. Secret values are never shown.
241
+ *
242
+ * CLI: `eigenpal variables list` · Route: `GET /v1/variables`
243
+ *
244
+ * Answers a page; iterate it (`for await`) for every item.
245
+ */
246
+ list(options?: VariablesListOptions): PagePromise<Variable, VariableList>;
247
+ /**
248
+ * Create or replace a variable. A secret value comes from @file or - (stdin), never from the command line, and is never printed.
249
+ *
250
+ * CLI: `eigenpal variables set <NAME> [value|@file|-]` · Route: `PUT /v1/variables/{name}`
251
+ */
252
+ set(name: string, options: VariablesSetOptions): Promise<VariableSetResponse>;
253
+ /**
254
+ * Delete a variable.
255
+ *
256
+ * CLI: `eigenpal variables delete <NAME>` · Route: `DELETE /v1/variables/{name}`
257
+ */
258
+ delete(name: string, options?: VariablesDeleteOptions): Promise<DeletedVariable>;
259
+ }
260
+ export declare class ProjectsResource {
261
+ protected readonly core: Core;
262
+ constructor(core: Core, impls: ResourceImpls);
263
+ /**
264
+ * The projects you can open.
265
+ *
266
+ * CLI: `eigenpal projects list` · Route: `GET /v1/projects`
267
+ *
268
+ * Answers a page; iterate it (`for await`) for every item.
269
+ */
270
+ list(options?: ProjectsListOptions): PagePromise<Project, ProjectList>;
271
+ }
272
+ export declare class ModelsResource {
273
+ protected readonly core: Core;
274
+ constructor(core: Core, impls: ResourceImpls);
275
+ /**
276
+ * The models this server offers, with their capabilities.
277
+ *
278
+ * CLI: `eigenpal models list` · Route: `GET /v1/models`
279
+ *
280
+ * Answers a page; iterate it (`for await`) for every item.
281
+ */
282
+ list(options?: ModelsListOptions): PagePromise<PublicModel, ModelList>;
283
+ }
284
+ export declare abstract class TemplatesResource {
285
+ protected readonly core: Core;
286
+ constructor(core: Core, impls: ResourceImpls);
287
+ /**
288
+ * The document templates (DOCX, XLSX) of the organization.
289
+ *
290
+ * CLI: `eigenpal templates list` · Route: `GET /v1/templates`
291
+ *
292
+ * Answers a page; iterate it (`for await`) for every item.
293
+ */
294
+ list(options?: TemplatesListOptions): PagePromise<Template, TemplateList>;
295
+ /**
296
+ * A template: its name, format, fields and where it is used.
297
+ *
298
+ * CLI: `eigenpal templates get <template>` · Route: `GET /v1/templates/{id}`
299
+ */
300
+ get(template: string, options?: TemplatesGetOptions): Promise<Template>;
301
+ /**
302
+ * Download a template file.
303
+ *
304
+ * CLI: `eigenpal templates download <template>` · Route: `GET /v1/templates/{id}/content`
305
+ */
306
+ download(template: string, options?: TemplatesDownloadOptions): Promise<Blob>;
307
+ /**
308
+ * Upload a DOCX or XLSX template, or replace one.
309
+ *
310
+ * CLI: `eigenpal templates upload <file>` · Route: `POST /v1/templates`
311
+ */
312
+ abstract upload(file: never, ...rest: never[]): unknown;
313
+ /**
314
+ * Delete a template.
315
+ *
316
+ * CLI: `eigenpal templates delete <template>` · Route: `DELETE /v1/templates/{id}`
317
+ */
318
+ delete(template: string, options?: TemplatesDeleteOptions): Promise<DeleteTemplateResponse>;
319
+ }
320
+ export declare abstract class EmailServersResource {
321
+ protected readonly core: Core;
322
+ constructor(core: Core, impls: ResourceImpls);
323
+ /**
324
+ * The email servers automations can read from and send through.
325
+ *
326
+ * CLI: `eigenpal email-servers list` · Route: `GET /v1/email-servers`
327
+ *
328
+ * Answers a page; iterate it (`for await`) for every item.
329
+ */
330
+ list(options?: EmailServersListOptions): PagePromise<EmailServer, EmailServerList>;
331
+ /**
332
+ * An email server and its settings, without secrets.
333
+ *
334
+ * CLI: `eigenpal email-servers get <server>` · Route: `GET /v1/email-servers/{id}`
335
+ */
336
+ get(server: string, options?: EmailServersGetOptions): Promise<EmailServer>;
337
+ /**
338
+ * Create or replace an email server from one JSON document.
339
+ *
340
+ * CLI: `eigenpal email-servers set <name>` · Route: `POST /v1/email-servers`
341
+ */
342
+ abstract set(name: never, ...rest: never[]): unknown;
343
+ /**
344
+ * Send a test message through an email server to check that it works.
345
+ *
346
+ * CLI: `eigenpal email-servers test <server>` · Route: `POST /v1/email-servers/{id}/test`
347
+ */
348
+ test(server: string, options: EmailServersTestOptions): Promise<TestEmailServerResponse>;
349
+ /**
350
+ * Delete an email server.
351
+ *
352
+ * CLI: `eigenpal email-servers delete <server>` · Route: `DELETE /v1/email-servers/{id}`
353
+ */
354
+ delete(server: string, options?: EmailServersDeleteOptions): Promise<DeleteEmailServerResponse>;
355
+ }
356
+ export declare class RoutesResource {
357
+ protected readonly core: Core;
358
+ constructor(core: Core, impls: ResourceImpls);
359
+ /**
360
+ * Promotion routes: where projects live in each environment.
361
+ *
362
+ * CLI: `eigenpal routes list` · Route: `GET /v1/promotion/routes`
363
+ *
364
+ * Answers a page; iterate it (`for await`) for every item.
365
+ */
366
+ list(options?: RoutesListOptions): PagePromise<PromotionRoute, PromotionRouteList>;
367
+ /**
368
+ * A route: the repository, branch and folder of each environment.
369
+ *
370
+ * CLI: `eigenpal routes get <route>` · Route: `GET /v1/promotion/routes/{name}`
371
+ */
372
+ get(route: string, options?: RoutesGetOptions): Promise<PromotionRoute>;
373
+ /**
374
+ * Create or replace a route from one JSON document.
375
+ *
376
+ * CLI: `eigenpal routes set <name>` · Route: `PUT /v1/promotion/routes/{name}`
377
+ */
378
+ set(name: string, options: RoutesSetOptions): Promise<PromotionRoutePlan>;
379
+ /**
380
+ * Delete a route added in the app.
381
+ *
382
+ * CLI: `eigenpal routes delete <route>` · Route: `DELETE /v1/promotion/routes/{name}`
383
+ */
384
+ delete(route: string, options?: RoutesDeleteOptions): Promise<DeletePromotionRouteResponse>;
385
+ }
386
+ export declare abstract class FilesResource {
387
+ protected readonly core: Core;
388
+ constructor(core: Core, impls: ResourceImpls);
389
+ /**
390
+ * Prepare file upload
391
+ *
392
+ * A backend uploads a file once and passes `$fileId` to many runs; the CLI does this inside `run`.
393
+ *
394
+ * Route: `POST /v1/files/uploads`
395
+ */
396
+ abstract upload(file: never, ...rest: never[]): unknown;
397
+ /**
398
+ * Get file metadata
399
+ *
400
+ * Reads an uploaded file record (size, type, expiry).
401
+ *
402
+ * Route: `GET /v1/files/{id}`
403
+ */
404
+ get(file: string, options?: FilesGetOptions): Promise<File>;
405
+ /**
406
+ * Download file content
407
+ *
408
+ * Reads the bytes of an uploaded file.
409
+ *
410
+ * Route: `GET /v1/files/{id}/content`
411
+ */
412
+ download(file: string, options?: FilesDownloadOptions): Promise<Blob>;
413
+ /**
414
+ * Delete file
415
+ *
416
+ * Removes an uploaded file before it expires.
417
+ *
418
+ * Route: `DELETE /v1/files/{id}`
419
+ */
420
+ delete(file: string, options?: FilesDeleteOptions): Promise<DeleteFileResponse>;
421
+ }
422
+ export declare abstract class EigenPalClientBase {
423
+ protected readonly core: Core;
424
+ readonly automations: AutomationsResource;
425
+ readonly runs: Runs;
426
+ readonly experiments: Experiments;
427
+ readonly releases: ReleasesResource;
428
+ readonly datasets: DatasetsResource;
429
+ readonly reviews: ReviewsResource;
430
+ readonly variables: VariablesResource;
431
+ readonly projects: ProjectsResource;
432
+ readonly models: ModelsResource;
433
+ readonly templates: Templates;
434
+ readonly emailServers: EmailServers;
435
+ readonly routes: RoutesResource;
436
+ readonly files: Files;
437
+ constructor(core: Core, impls: ResourceImpls);
438
+ /**
439
+ * Who and where you are, what differs from live, and each environment.
440
+ *
441
+ * CLI: `eigenpal status` · Route: `GET /v1/projects/{id}/status`
442
+ */
443
+ status(options?: StatusOptions): Promise<ProjectStatus>;
444
+ /**
445
+ * Run an automation and wait for the result. In a project folder the local source runs as a draft; nothing live changes.
446
+ *
447
+ * CLI: `eigenpal run [<project>/]<automation>[@<version|range|live>] [file]` · Route: `POST /v1/runs`
448
+ *
449
+ * Waits by default (`timeoutMs`, default 30 minutes).
450
+ */
451
+ abstract run(automation: never, ...rest: never[]): unknown;
452
+ /**
453
+ * Run the dataset as an experiment; report what failed. Nothing live changes.
454
+ *
455
+ * CLI: `eigenpal eval <automation>[@<version|range|live>]` · Route: `POST /v1/automations/{id}/experiments`
456
+ *
457
+ * Waits by default (`timeoutMs`, default 30 minutes).
458
+ */
459
+ abstract eval(automation: never, ...rest: never[]): unknown;
460
+ /**
461
+ * Release this branch: it is merged, goes live and is tagged; its check is shown.
462
+ *
463
+ * CLI: `eigenpal release <patch|minor|major|X.Y.Z>` · Route: `POST /v1/projects/{id}/releases`
464
+ *
465
+ * Waits by default (`timeoutMs`, default 30 minutes).
466
+ */
467
+ abstract release(...rest: never[]): unknown;
468
+ /**
469
+ * Open the request that moves a release into the next environment. Merging the request is the approval.
470
+ *
471
+ * CLI: `eigenpal promote [version]` · Route: `POST /v1/projects/{id}/promote`
472
+ *
473
+ * Waits with `wait: true` (`timeoutMs`, default 30 minutes).
474
+ */
475
+ abstract promote(...rest: never[]): unknown;
476
+ /**
477
+ * Make the previous live build (or a release) live again here.
478
+ *
479
+ * CLI: `eigenpal rollback [version]` · Route: `POST /v1/projects/{id}/rollback`
480
+ *
481
+ * Waits by default (`timeoutMs`, default 30 minutes).
482
+ */
483
+ abstract rollback(...rest: never[]): unknown;
484
+ /**
485
+ * Call the REST API with your sign-in and print the response body. For everything without a command.
486
+ *
487
+ * CLI: `eigenpal api <METHOD> <path>`
488
+ */
489
+ abstract api(method: string, path: string, options?: ApiCallOptions): Promise<unknown>;
490
+ }