Comparing version 0.11.1 to 0.11.2
@@ -6,2 +6,7 @@ All notable changes to this project will be documented in this file. | ||
## [0.11.2] - 2021-06-07 | ||
### Fixed | ||
- some typings | ||
- some download params should be optional | ||
## [0.11.1] - 2021-05-30 | ||
@@ -8,0 +13,0 @@ ### Fixed |
import type stream from "stream"; | ||
import type { ApiClient } from "./api-client.js"; | ||
import type { Data, Options, URLArgument } from "./types"; | ||
declare const download: (writableStream: stream.Writable, api: ApiClient, method: string, url: URLArgument, queryParams: Data | null, body: Data | null, options: Options | null) => Promise<unknown>; | ||
import type { Options, URLArgument } from "./types"; | ||
declare const download: (writableStream: stream.Writable, api: ApiClient, method: string, url: URLArgument, queryParams?: object | null | undefined, body?: object | null | undefined, options?: Options | null | undefined) => Promise<import("./response/response.js").PossibleNonErrorResponses>; | ||
export { download, }; | ||
//# sourceMappingURL=utils.d.ts.map |
@@ -17,3 +17,2 @@ "use strict"; | ||
}); | ||
resolve(true); | ||
}); | ||
@@ -20,0 +19,0 @@ }; |
import type stream from "stream"; | ||
import type { ApiClient } from "./api-client.js"; | ||
import type { Data, Options, URLArgument } from "./types"; | ||
declare const download: (writableStream: stream.Writable, api: ApiClient, method: string, url: URLArgument, queryParams: Data | null, body: Data | null, options: Options | null) => Promise<unknown>; | ||
import type { Options, URLArgument } from "./types"; | ||
declare const download: (writableStream: stream.Writable, api: ApiClient, method: string, url: URLArgument, queryParams?: object | null | undefined, body?: object | null | undefined, options?: Options | null | undefined) => Promise<import("./response/response.js").PossibleNonErrorResponses>; | ||
export { download, }; | ||
//# sourceMappingURL=utils.d.ts.map |
@@ -17,3 +17,2 @@ import { DownloadError } from "./errors.js"; | ||
}); | ||
resolve(true); | ||
}); | ||
@@ -20,0 +19,0 @@ }; |
{ | ||
"name": "api-reach", | ||
"version": "0.11.1", | ||
"version": "0.11.2", | ||
"repository": "git@github.com:dzek69/api-reach.git", | ||
@@ -5,0 +5,0 @@ "author": "Jacek Nowacki @dzek69 <git-public@dzek.eu>", |
@@ -307,3 +307,3 @@ /* eslint-disable max-lines */ | ||
* @param {Options} [options] - options that will override defaults and options specified in the constructor | ||
* @returns {Promise<Response>} | ||
* @returns {Promise<PossibleNonErrorResponses>} | ||
* @throws {ClientHttpError} | ||
@@ -310,0 +310,0 @@ * @throws {ServerHttpError} |
@@ -26,5 +26,5 @@ import type stream from "stream"; | ||
url: URLArgument, | ||
queryParams: Data | null, | ||
body: Data | null, | ||
options: Options | null, | ||
queryParams?: Data | null, | ||
body?: Data | null, | ||
options?: Options | null, | ||
) => { | ||
@@ -36,3 +36,3 @@ const res = await api.request(method, url, queryParams, body, { | ||
return new Promise((resolve, reject) => { | ||
return new Promise<typeof res>((resolve, reject) => { | ||
const resBody = (res.body as ResponseDataStream["body"])!; | ||
@@ -46,3 +46,2 @@ resBody.pipe(writableStream); | ||
}); | ||
resolve(true); | ||
}); | ||
@@ -49,0 +48,0 @@ }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
748495
5795