@codebit-programando-solucoes/codebit-web 1.1.10 → 1.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api/api.d.ts CHANGED
@@ -11,7 +11,7 @@ export interface RequestConfig {
11
11
  /** AbortSignal for request cancellation */
12
12
  signal?: AbortSignal;
13
13
  /** Desired response format */
14
- responseType?: 'json' | 'text' | 'blob' | 'arraybuffer';
14
+ responseType?: 'json' | 'text' | 'blob' | 'arraybuffer' | 'stream';
15
15
  }
16
16
 
17
17
  /** API response object. */
package/dist/index.cjs CHANGED
@@ -196,7 +196,7 @@ async function makeRequest(url, options = {}) {
196
196
  inferredResponseType = contentType?.includes('application/json') ? 'json' : isBinaryContent(contentType) ? 'blob' : 'text';
197
197
  const finalResponseType = responseType || inferredResponseType;
198
198
  let data;
199
- data = 'json' === finalResponseType ? await response.json() : 'blob' === finalResponseType ? await response.blob() : 'arraybuffer' === finalResponseType ? await response.arrayBuffer() : await response.text();
199
+ data = 'json' === finalResponseType ? await response.json() : 'blob' === finalResponseType ? await response.blob() : 'arraybuffer' === finalResponseType ? await response.arrayBuffer() : 'stream' === finalResponseType ? response.body : await response.text();
200
200
  return {
201
201
  data,
202
202
  status: response.status,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codebit-programando-solucoes/codebit-web",
3
- "version": "1.1.10",
3
+ "version": "1.1.16",
4
4
  "main": "./dist/index.cjs",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",