@squared-functions/types
Advanced tools
Comparing version 0.7.3 to 0.7.4
@@ -215,8 +215,8 @@ /// <reference path="type.d.ts" /> | ||
interface FunctionData<T = PlainObject> { | ||
credential: T; | ||
interface FunctionData { | ||
service: CloudService; | ||
bucketGroup: string; | ||
} | ||
interface UploadData<T = unknown> extends FunctionData<T> { | ||
interface UploadData extends FunctionData { | ||
upload: CloudServiceUpload; | ||
@@ -226,3 +226,2 @@ buffer: Buffer; | ||
fileGroup: [Buffer | string, string][]; | ||
bucketGroup: string; | ||
filename?: string; | ||
@@ -232,5 +231,4 @@ mimeType?: string; | ||
interface DownloadData<T = unknown> extends FunctionData<T> { | ||
interface DownloadData extends FunctionData { | ||
download: CloudServiceDownload; | ||
bucketGroup: string; | ||
} | ||
@@ -246,6 +244,7 @@ | ||
type UploadHost = (this: IFileManager, service: string, credential: unknown, sdk?: string) => UploadCallback; | ||
type DownloadHost = (this: IFileManager, service: string, credential: unknown, data: DownloadData, success: (value: Null<Buffer | string>) => void, sdk?: string) => void; | ||
type UploadCallback = (data: UploadData, success: (value: string) => void) => void; | ||
type ServiceHost<T> = (this: IFileManager, service: string, credential: unknown, sdk?: string) => T; | ||
type UploadHost = ServiceHost<UploadCallback>; | ||
type DownloadHost = ServiceHost<DownloadCallback>; | ||
type UploadCallback = (data: UploadData, success: (value: string) => void) => Promise<void>; | ||
type DownloadCallback = (data: DownloadData, success: (value: Null<Buffer | string>) => void) => Promise<void>; | ||
} | ||
@@ -252,0 +251,0 @@ |
{ | ||
"name": "@squared-functions/types", | ||
"version": "0.7.3", | ||
"version": "0.7.4", | ||
"description": "Type definitions for squared-functions", | ||
@@ -5,0 +5,0 @@ "types": "lib/index.d.ts", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22112