-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpresigned-url.ts
48 lines (41 loc) · 1.15 KB
/
presigned-url.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
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../resource';
import * as Core from '../../core';
export class PresignedURL extends APIResource {
/**
* Retrieve a presigned url to post storage artifacts.
*/
create(
params: PresignedURLCreateParams,
options?: Core.RequestOptions,
): Core.APIPromise<PresignedURLCreateResponse> {
const { objectName } = params;
return this._client.post('/storage/presigned-url', { query: { objectName }, ...options });
}
}
export interface PresignedURLCreateResponse {
/**
* The storage URI to send back to the backend after the upload was completed.
*/
storageUri: string;
/**
* The presigned url.
*/
url: string;
/**
* Fields to include in the body of the upload. Only needed by s3
*/
fields?: unknown;
}
export interface PresignedURLCreateParams {
/**
* The name of the object.
*/
objectName: string;
}
export declare namespace PresignedURL {
export {
type PresignedURLCreateResponse as PresignedURLCreateResponse,
type PresignedURLCreateParams as PresignedURLCreateParams,
};
}