-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathjob.ts
More file actions
47 lines (40 loc) · 1.21 KB
/
job.ts
File metadata and controls
47 lines (40 loc) · 1.21 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
// 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 Job extends APIResource {
/**
* This API returns the status of a bulk job like copy and move folder operations.
*
* @example
* ```ts
* const job = await client.folders.job.get('jobId');
* ```
*/
get(jobID: string, options?: RequestOptions): APIPromise<JobGetResponse> {
return this._client.get(path`/v1/bulkJobs/${jobID}`, options);
}
}
export interface JobGetResponse {
/**
* Unique identifier of the bulk job.
*/
jobId?: string;
/**
* Unique identifier of the purge request. This will be present only if
* `purgeCache` is set to `true` in the rename folder API request.
*/
purgeRequestId?: string;
/**
* Status of the bulk job.
*/
status?: 'Pending' | 'Completed';
/**
* Type of the bulk job.
*/
type?: 'COPY_FOLDER' | 'MOVE_FOLDER' | 'RENAME_FOLDER';
}
export declare namespace Job {
export { type JobGetResponse as JobGetResponse };
}