@rpldy/shared
Advanced tools
Comparing version 0.1.7 to 0.1.9
// @flow | ||
import { BATCH_STATES, FILE_STATES } from "./consts"; | ||
import type { UploaderEnhancer } from "@rpldy/uploader"; | ||
@@ -9,3 +8,3 @@ export type NonMaybeTypeFunc = <T>(param: T) => $NonMaybeType<T>; | ||
//upload URL | ||
url: ?string, | ||
url?: ?string, | ||
//The name of the param in the upload request (default: input element's name) | ||
@@ -39,21 +38,4 @@ filesParamName?: ?string, | ||
export type SendResult = { | ||
request: Promise<UploadData>, | ||
abort: () => boolean, | ||
}; | ||
export type SenderProgressEvent = { total: number, loaded: number }; | ||
export type FormatParamGroupNameMethod = (number, string) => string; | ||
export type SendOptions = { | ||
method: string, | ||
paramName: string, | ||
params: Object, | ||
headers?: Object, | ||
forceJsonResponse: ?boolean, | ||
withCredentials: ?boolean, | ||
formatGroupParamName: ?FormatParamGroupNameMethod, | ||
}; | ||
type BatchItemBase = {| | ||
@@ -89,4 +71,2 @@ id: string, | ||
export type OnProgress = (e: SenderProgressEvent, Object[]) => void; | ||
export type Batch = { | ||
@@ -103,4 +83,2 @@ id: string, | ||
export type SendMethod = (item: BatchItem[], url: string, options: SendOptions, onProgress: OnProgress) => SendResult; | ||
export type FileFilterMethod = (mixed) => boolean; | ||
@@ -133,14 +111,2 @@ | ||
export type CreateOptions = {| | ||
...UploadOptions, | ||
//uploader enhancer function | ||
enhancer?: UploaderEnhancer, | ||
//whether multiple upload requests can be issued simultaneously (default: false) | ||
concurrent?: boolean, | ||
//the maximum allowed for simultaneous requests (default: 2) | ||
maxConcurrent?: number, | ||
//the send method to use. Allows overriding the method used to send files to the server for example using a mock (default: @rpldy/sender) | ||
send?: ?SendMethod, | ||
|}; | ||
export type Trigger<T> = (string, ...args: mixed[]) => Promise<?T>[]; | ||
@@ -147,0 +113,0 @@ |
{ | ||
"version": "0.1.7", | ||
"version": "0.1.9", | ||
"name": "@rpldy/shared", | ||
@@ -8,2 +8,3 @@ "description": "", | ||
"module": "src/index.js", | ||
"types": "types/index.d.ts", | ||
"license": "MIT", | ||
@@ -20,3 +21,3 @@ "repository": { | ||
"devDependencies": { | ||
"flow-bin": "^0.121.0" | ||
"flow-bin": "^0.123.0" | ||
}, | ||
@@ -30,3 +31,3 @@ "dependencies": { | ||
}, | ||
"gitHead": "0ac67a2893ef3a684b8cf1834590035065340366" | ||
"gitHead": "f1a40b9335abc19d904be186e43ae72b9d366e32" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
49953
44
638
0
26