@oneblink/sdk
Advanced tools
Comparing version 0.2.7-beta.2 to 0.2.7-beta.3
@@ -1,5 +0,5 @@ | ||
// flow-typed signature: cd165e759d189df883676defc85ce252 | ||
// flow-typed version: efe563fdbd/axios_v0.18.x/flow_>=v0.75.x | ||
// flow-typed signature: c7fc5e55e23fbd64fda47f934043c4f8 | ||
// flow-typed version: 7ffaa2ca07/axios_v0.18.x/flow_>=v0.93.x | ||
declare module "axios" { | ||
declare module 'axios' { | ||
declare interface AxiosTransformer<T> { | ||
@@ -13,3 +13,3 @@ (data: T, headers?: Object): Object; | ||
username: string, | ||
password: string | ||
password: string, | ||
}; | ||
@@ -35,7 +35,7 @@ } | ||
} | ||
declare interface AxiosXHRConfigBase<T,R = T> { | ||
adapter?: <T,R>(config: AxiosXHRConfig<T,R>) => Promise<AxiosXHR<T,R>>; | ||
declare interface AxiosXHRConfigBase<T, R = T> { | ||
adapter?: <T, R>(config: AxiosXHRConfig<T, R>) => Promise<AxiosXHR<T, R>>; | ||
auth?: { | ||
username: string, | ||
password: string | ||
password: string, | ||
}; | ||
@@ -51,11 +51,12 @@ baseURL?: string; | ||
paramsSerializer?: (params: Object) => string; | ||
progress?: (progressEvent: Event) => void | mixed; | ||
onUploadProgress?: (progressEvent: ProgressEvent) => void; | ||
onDownloadProgress?: (progressEvent: ProgressEvent) => void; | ||
proxy?: ProxyConfig | false; | ||
responseType?: | ||
| "arraybuffer" | ||
| "blob" | ||
| "document" | ||
| "json" | ||
| "text" | ||
| "stream"; | ||
| 'arraybuffer' | ||
| 'blob' | ||
| 'document' | ||
| 'json' | ||
| 'text' | ||
| 'stream'; | ||
timeout?: number; | ||
@@ -69,4 +70,4 @@ transformRequest?: AxiosTransformer<T> | Array<AxiosTransformer<T>>; | ||
} | ||
declare type $AxiosXHRConfigBase<T,R = T> = AxiosXHRConfigBase<T,R>; | ||
declare interface AxiosXHRConfig<T,R = T> extends AxiosXHRConfigBase<T,R> { | ||
declare type $AxiosXHRConfigBase<T, R = T> = AxiosXHRConfigBase<T, R>; | ||
declare interface AxiosXHRConfig<T, R = T> extends AxiosXHRConfigBase<T, R> { | ||
data?: T; | ||
@@ -76,5 +77,5 @@ method?: string; | ||
} | ||
declare type $AxiosXHRConfig<T,R = T> = AxiosXHRConfig<T,R>; | ||
declare class AxiosXHR<T,R = T> { | ||
config: AxiosXHRConfig<T,R>; | ||
declare type $AxiosXHRConfig<T, R = T> = AxiosXHRConfig<T, R>; | ||
declare class AxiosXHR<T, R = T> { | ||
config: AxiosXHRConfig<T, R>; | ||
data: R; | ||
@@ -84,11 +85,11 @@ headers?: Object; | ||
statusText: string; | ||
request: http$ClientRequest | XMLHttpRequest; | ||
request: http$ClientRequest<> | XMLHttpRequest; | ||
} | ||
declare type $AxiosXHR<T,R = T> = AxiosXHR<T,R>; | ||
declare type $AxiosXHR<T, R = T> = AxiosXHR<T, R>; | ||
declare type AxiosInterceptorIdent = number; | ||
declare class AxiosRequestInterceptor<T,R = T> { | ||
declare class AxiosRequestInterceptor<T, R = T> { | ||
use( | ||
successHandler: ?( | ||
response: AxiosXHRConfig<T,R> | ||
) => Promise<AxiosXHRConfig<*,*>> | AxiosXHRConfig<*,*>, | ||
response: AxiosXHRConfig<T, R> | ||
) => Promise<AxiosXHRConfig<*, *>> | AxiosXHRConfig<*, *>, | ||
errorHandler: ?(error: mixed) => mixed | ||
@@ -98,5 +99,5 @@ ): AxiosInterceptorIdent; | ||
} | ||
declare class AxiosResponseInterceptor<T,R = T> { | ||
declare class AxiosResponseInterceptor<T, R = T> { | ||
use( | ||
successHandler: ?(response: AxiosXHR<T,R>) => mixed, | ||
successHandler: ?(response: AxiosXHR<T, R>) => mixed, | ||
errorHandler: ?(error: $AxiosError<any>) => mixed | ||
@@ -106,43 +107,58 @@ ): AxiosInterceptorIdent; | ||
} | ||
declare type AxiosPromise<T,R = T> = Promise<AxiosXHR<T,R>>; | ||
declare type AxiosPromise<T, R = T> = Promise<AxiosXHR<T, R>>; | ||
declare class Axios { | ||
constructor<T,R>(config?: AxiosXHRConfigBase<T,R>): void; | ||
[[call]]<T,R>(config: AxiosXHRConfig<T,R> | string, config?: AxiosXHRConfig<T,R>): AxiosPromise<T,R>; | ||
request<T,R>(config: AxiosXHRConfig<T,R>): AxiosPromise<T,R>; | ||
delete<T,R>(url: string, config?: AxiosXHRConfigBase<T,R>): AxiosPromise<T,R>; | ||
get<T,R>(url: string, config?: AxiosXHRConfigBase<T,R>): AxiosPromise<T,R>; | ||
head<T,R>(url: string, config?: AxiosXHRConfigBase<T,R>): AxiosPromise<T,R>; | ||
post<T,R>( | ||
<T, R>( | ||
config: AxiosXHRConfig<T, R> | string, | ||
config?: AxiosXHRConfig<T, R> | ||
): AxiosPromise<T, R>; | ||
constructor<T, R>(config?: AxiosXHRConfigBase<T, R>): void; | ||
request<T, R>(config: AxiosXHRConfig<T, R>): AxiosPromise<T, R>; | ||
delete<T, R>( | ||
url: string, | ||
config?: AxiosXHRConfigBase<T, R> | ||
): AxiosPromise<T, R>; | ||
get<T, R>( | ||
url: string, | ||
config?: AxiosXHRConfigBase<T, R> | ||
): AxiosPromise<T, R>; | ||
head<T, R>( | ||
url: string, | ||
config?: AxiosXHRConfigBase<T, R> | ||
): AxiosPromise<T, R>; | ||
post<T, R>( | ||
url: string, | ||
data?: mixed, | ||
config?: AxiosXHRConfigBase<T,R> | ||
): AxiosPromise<T,R>; | ||
put<T,R>( | ||
config?: AxiosXHRConfigBase<T, R> | ||
): AxiosPromise<T, R>; | ||
put<T, R>( | ||
url: string, | ||
data?: mixed, | ||
config?: AxiosXHRConfigBase<T,R> | ||
): AxiosPromise<T,R>; | ||
patch<T,R>( | ||
config?: AxiosXHRConfigBase<T, R> | ||
): AxiosPromise<T, R>; | ||
patch<T, R>( | ||
url: string, | ||
data?: mixed, | ||
config?: AxiosXHRConfigBase<T,R> | ||
): AxiosPromise<T,R>; | ||
config?: AxiosXHRConfigBase<T, R> | ||
): AxiosPromise<T, R>; | ||
interceptors: { | ||
request: AxiosRequestInterceptor<mixed>, | ||
response: AxiosResponseInterceptor<mixed> | ||
response: AxiosResponseInterceptor<mixed>, | ||
}; | ||
defaults: { headers: Object } & AxiosXHRConfig<*,*>; | ||
defaults: { headers: Object } & AxiosXHRConfig<*, *>; | ||
} | ||
declare class AxiosError<T,R = T> extends Error { | ||
config: AxiosXHRConfig<T,R>; | ||
request?: http$ClientRequest | XMLHttpRequest; | ||
response?: AxiosXHR<T,R>; | ||
declare class AxiosError<T, R = T> extends Error { | ||
config: AxiosXHRConfig<T, R>; | ||
request?: http$ClientRequest<> | XMLHttpRequest; | ||
response?: AxiosXHR<T, R>; | ||
code?: string; | ||
} | ||
declare type $AxiosError<T,R = T> = AxiosError<T,R>; | ||
declare type $AxiosError<T, R = T> = AxiosError<T, R>; | ||
declare interface AxiosExport extends Axios { | ||
[[call]]<T,R>(config: AxiosXHRConfig<T,R> | string, config?: AxiosXHRConfig<T,R>): AxiosPromise<T,R>; | ||
<T, R>( | ||
config: AxiosXHRConfig<T, R> | string, | ||
config?: AxiosXHRConfig<T, R> | ||
): AxiosPromise<T, R>; | ||
Axios: typeof Axios; | ||
@@ -149,0 +165,0 @@ Cancel: Class<Cancel>; |
@@ -23,18 +23,9 @@ // @flow | ||
if (Array.isArray(formElementGenerationData.options)) { | ||
const options = formElementGenerationData.options.map((option, index) => { | ||
if (option && typeof option === 'object') { | ||
option.id = uuid() | ||
if (!option.label) { | ||
option.label = option.value ? option.value : `Option ${index + 1}` | ||
} | ||
if (!option.value) { | ||
option.value = index.toString() | ||
} | ||
return option | ||
} else { | ||
return { | ||
id: uuid(), | ||
label: `Option ${index + 1}`, | ||
value: index.toString() | ||
} | ||
const options = formElementGenerationData.options.map((o, index) => { | ||
const option = o || {} | ||
return { | ||
...option, | ||
id: uuid(), | ||
label: option.label || option.value || `Option ${index + 1}`, | ||
value: option.value || index.toString() | ||
} | ||
@@ -73,3 +64,3 @@ }) | ||
if (typeof formElementGenerationData.conditionallyShow === 'boolean') { | ||
formElement.conditionallyShow = !!formElementGenerationData.conditionallyShow | ||
formElement.conditionallyShow = formElementGenerationData.conditionallyShow | ||
} else { | ||
@@ -76,0 +67,0 @@ formElement.conditionallyShow = false |
@@ -20,3 +20,3 @@ // @flow | ||
Key: preFillMeta.s3.key, | ||
Body: Buffer.from(JSON.stringify(data), 'UTF-8'), | ||
Body: Buffer.from(JSON.stringify(data) || '{}', 'UTF-8'), | ||
Expires: new Date(new Date().setFullYear(new Date().getFullYear() + 1)), // Max 1 year | ||
@@ -23,0 +23,0 @@ CacheControl: 'max-age=31536000' // Max 1 year(365 days) |
{ | ||
"name": "@oneblink/sdk", | ||
"description": "OneBlink SDK to serve as an entry point for all OneBlink Services in NodeJS", | ||
"version": "0.2.7-beta.2", | ||
"version": "0.2.7-beta.3", | ||
"bugs": { | ||
@@ -9,18 +9,18 @@ "url": "https://github.com/blinkmobile/oneblink-sdk-js/issues" | ||
"dependencies": { | ||
"aws-sdk": "2.400.0", | ||
"aws-sdk": "2.447.0", | ||
"axios": "0.18.0", | ||
"joi": "14.3.1", | ||
"jsonwebtoken": "8.4.0", | ||
"jsonwebtoken": "8.5.1", | ||
"uuid": "3.3.2" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^5.13.0", | ||
"eslint": "^5.16.0", | ||
"eslint-config-standard": "^12.0.0", | ||
"eslint-plugin-import": "^2.16.0", | ||
"eslint-plugin-import": "^2.17.2", | ||
"eslint-plugin-node": "^8.0.1", | ||
"eslint-plugin-promise": "^4.0.1", | ||
"eslint-plugin-promise": "^4.1.1", | ||
"eslint-plugin-standard": "^4.0.0", | ||
"fixpack": "^2.3.1", | ||
"flow-bin": "^0.92.1", | ||
"jest": "^24.1.0", | ||
"flow-bin": "^0.98.0", | ||
"jest": "^24.7.1", | ||
"remark-cli": "^6.0.1", | ||
@@ -27,0 +27,0 @@ "remark-lint": "^6.0.4", |
2406
82926
+ Addedaws-sdk@2.447.0(transitive)
+ Addedjsonwebtoken@8.5.1(transitive)
+ Addedsemver@5.7.2(transitive)
- Removedaws-sdk@2.400.0(transitive)
- Removedjsonwebtoken@8.4.0(transitive)
Updatedaws-sdk@2.447.0
Updatedjsonwebtoken@8.5.1