UNPKG

@cloudbase/lowcode-deployer

Version:

deploy weda app

65 lines (64 loc) 1.83 kB
/// <reference types="node" /> /// <reference types="node" /> import COS from 'cos-nodejs-sdk-v5'; import AWS_S3, { S3Client } from '@aws-sdk/client-s3'; import { ICredentialOptions } from '../../types'; import { Readable } from 'stream'; export declare class Storage { endpoint: string; private _instance; private _cos; private _region; constructor({ endpoint, region, credential, cos, instance, }: { /** * instance or credential 互斥必填 */ instance?: COS | S3Client; credential?: ICredentialOptions; endpoint?: string; region?: string; cos?: boolean; }); getObjectSignedUrl({ Bucket, Key, Expires }: { Bucket: any; Key: any; Expires: any; }): Promise<{ Url: string; }>; putObject({ Bucket, Key, Body, ACL, Headers, }: { Bucket: string; Key: string; Body: Buffer | String | Readable | AWS_S3.PutObjectCommandInput['Body'] | any; ACL?: AWS_S3.PutObjectCommandInput['ACL']; Headers?: Record<string, string>; }): Promise<null>; putObjectSignedUrl({ Bucket, Key, ACL, Expires, ContentType }: { Bucket: any; Key: any; ACL: any; Expires: any; ContentType: any; }): Promise<{ Url: string; }>; putBucketAcl({ ACL, Bucket }: { ACL: any; Bucket: any; }): Promise<null>; putObjectAcl({ ACL, Bucket, Key }: { ACL: any; Bucket: any; Key: any; }): Promise<null>; deleteMultipleObject({ Bucket, Objects }: { Bucket: string; Objects: { Key: string; }[]; }): Promise<unknown>; } export declare function getUploadDirFileList(src: string, cloudPath: string): { src: string; cloudPath: string; }[];