-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathextensions.ts
53 lines (42 loc) · 1.26 KB
/
extensions.ts
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
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../resource';
import * as Core from '../core';
export class Extensions extends APIResource {
/**
* Upload an Extension
*/
create(body: ExtensionCreateParams, options?: Core.RequestOptions): Core.APIPromise<Extension> {
return this._client.post('/v1/extensions', Core.multipartFormRequestOptions({ body, ...options }));
}
/**
* Extension
*/
retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise<Extension> {
return this._client.get(`/v1/extensions/${id}`, options);
}
/**
* Delete Extension
*/
delete(id: string, options?: Core.RequestOptions): Core.APIPromise<void> {
return this._client.delete(`/v1/extensions/${id}`, {
...options,
headers: { Accept: '*/*', ...options?.headers },
});
}
}
export interface Extension {
id: string;
createdAt: string;
fileName: string;
/**
* The Project ID linked to the uploaded Extension.
*/
projectId: string;
updatedAt: string;
}
export interface ExtensionCreateParams {
file: Core.Uploadable;
}
export declare namespace Extensions {
export { type Extension as Extension, type ExtensionCreateParams as ExtensionCreateParams };
}