@oystehr/sdk
Version:
Oystehr SDK
68 lines (67 loc) • 3.71 kB
TypeScript
import { OystehrClientRequest, Z3CreateBucketParams, Z3CreateBucketResponse, Z3DeleteBucketParams, Z3DeleteObjectParams, Z3GetPresignedUrlParams, Z3GetPresignedUrlResponse, Z3ListBucketsResponse, Z3ListObjectsParams, Z3ListObjectsResponse } from '../..';
import { SDKResource } from '../../client/client';
import { OystehrConfig } from '../../config';
import * as ext from './z3-ext';
export declare class Z3 extends SDKResource {
#private;
constructor(config: OystehrConfig);
/**
* Uploads a file to the bucket and key. Files should be Blobs.
* @param params upload file params
*/
uploadFile: typeof ext.uploadFile;
/**
* Downloads an object matching the bucket and key. File content is returned as an ArrayBuffer.
* @param params download file params
*/
downloadFile: typeof ext.downloadFile;
/**
* This helper performs a `getPresignedUrl` request for Z3 URLs of the forms
* `https://projects-api.oystehr.com/v1/z3/<bucket>/<key>` or `z3://<bucket>/<key>`
* instead of the standard SDK `Z3GetPresignedUrlParams`.
* @param params url and action
*/
getPresignedUrlForZ3Url: typeof ext.getPresignedUrlForZ3Url;
/**
* List all Z3 Buckets. [Z3](https://docs.oystehr.com/oystehr/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.
*
* Access Policy Action: `Z3:ListBuckets`
* Access Policy Resource: `Z3:BucketName`
*/
listBuckets(request?: OystehrClientRequest): Promise<Z3ListBucketsResponse>;
/**
* Create a Z3 Bucket with the provided name. [Z3](https://docs.oystehr.com/oystehr/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.
*
* Access Policy Action: `Z3:CreateBucket`
* Access Policy Resource: `Z3:*`
*/
createBucket(params: Z3CreateBucketParams, request?: OystehrClientRequest): Promise<Z3CreateBucketResponse>;
/**
* Delete the Z3 Bucket with the provided name. [Z3](https://docs.oystehr.com/oystehr/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.
*
* Access Policy Action: `Z3:DeleteBucket`
* Access Policy Resource: `Z3:BucketName`
*/
deleteBucket(params: Z3DeleteBucketParams, request?: OystehrClientRequest): Promise<void>;
/**
* List all Z3 Objects at the provided path in the Bucket with the provided name [Z3](https://docs.oystehr.com/oystehr/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.
*
* Access Policy Action: `Z3:ListObjects`
* Access Policy Resource: `Z3:BucketName:ObjectPath`
*/
listObjects(params: Z3ListObjectsParams, request?: OystehrClientRequest): Promise<Z3ListObjectsResponse>;
/**
* Get a link for downloading or uploading a Z3 Object to the provided path in the Bucket with the provided name. [Z3](https://docs.oystehr.com/oystehr/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.
*
* Access Policy Action: `Z3:PutObject` or `Z3:GetObject`
* Access Policy Resource: `Z3:BucketName:ObjectPath`
*/
getPresignedUrl(params: Z3GetPresignedUrlParams, request?: OystehrClientRequest): Promise<Z3GetPresignedUrlResponse>;
/**
* Delete the Z3 Object at the provided path in the Bucket with the provided name. [Z3](https://docs.oystehr.com/oystehr/services/z3/) is Oystehr's built-in and fully integrated solution for file storage.
*
* Access Policy Action: `Z3:DeleteObject`
* Access Policy Resource: `Z3:BucketName:ObjectPath`
*/
deleteObject(params: Z3DeleteObjectParams, request?: OystehrClientRequest): Promise<void>;
}