-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathuploads.ts
More file actions
60 lines (44 loc) · 1.31 KB
/
Copy pathuploads.ts
File metadata and controls
60 lines (44 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../core/resource';
import { APIPromise } from '../../core/api-promise';
import { RequestOptions } from '../../internal/request-options';
import { path } from '../../internal/utils/path';
export class Uploads extends APIResource {
/**
* Get the status of a specific job
*
* @example
* ```ts
* const response = await client.models.uploads.status(
* 'job-a15dad11-8d8e-4007-97c5-a211304de284',
* );
* ```
*/
status(jobID: string, options?: RequestOptions): APIPromise<UploadStatusResponse> {
return this._client.get(path`/jobs/${jobID}`, options);
}
}
export interface UploadStatusResponse {
args: UploadStatusResponse.Args;
created_at: string;
job_id: string;
status: 'Queued' | 'Running' | 'Complete' | 'Failed';
status_updates: Array<UploadStatusResponse.StatusUpdate>;
type: string;
updated_at: string;
}
export namespace UploadStatusResponse {
export interface Args {
description?: string;
modelName?: string;
modelSource?: string;
}
export interface StatusUpdate {
message: string;
status: string;
timestamp: string;
}
}
export declare namespace Uploads {
export { type UploadStatusResponse as UploadStatusResponse };
}