-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfiguration.ts
More file actions
62 lines (53 loc) · 1.83 KB
/
configuration.ts
File metadata and controls
62 lines (53 loc) · 1.83 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
61
62
// 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';
export class Configuration extends APIResource {
/**
* Get configurations for sandbox jobs
*
* @example
* ```ts
* const sandboxJobConfigurations =
* await client.sandbox.jobs.configuration.retrieve();
* ```
*/
retrieve(options?: RequestOptions): APIPromise<ConfigurationRetrieveResponse> {
return this._client.get('/sandbox/jobs/configuration', { ...options, __security: { bearerAuth: true } });
}
/**
* Update configurations for sandbox jobs
*
* @example
* ```ts
* const sandboxJobConfiguration =
* await client.sandbox.jobs.configuration.update({
* completion_status: 'complete',
* type: 'data_sync_all',
* });
* ```
*/
update(body: ConfigurationUpdateParams, options?: RequestOptions): APIPromise<SandboxJobConfiguration> {
return this._client.put('/sandbox/jobs/configuration', {
body,
...options,
__security: { bearerAuth: true },
});
}
}
export interface SandboxJobConfiguration {
completion_status: 'complete' | 'reauth_error' | 'permissions_error' | 'error';
type: 'data_sync_all';
}
export type ConfigurationRetrieveResponse = Array<SandboxJobConfiguration>;
export interface ConfigurationUpdateParams {
completion_status: 'complete' | 'reauth_error' | 'permissions_error' | 'error';
type: 'data_sync_all';
}
export declare namespace Configuration {
export {
type SandboxJobConfiguration as SandboxJobConfiguration,
type ConfigurationRetrieveResponse as ConfigurationRetrieveResponse,
type ConfigurationUpdateParams as ConfigurationUpdateParams,
};
}