@scalar/api-client 2.3.16 → 2.3.17

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @scalar/api-client
2
2
 
3
+ ## 2.3.17
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [8720ae7]
8
+ - @scalar/themes@0.9.85
9
+ - @scalar/components@0.13.46
10
+ - @scalar/oas-utils@0.2.129
11
+ - @scalar/use-codemirror@0.11.91
12
+ - @scalar/use-hooks@0.1.39
13
+ - @scalar/import@0.3.12
14
+ - @scalar/postman-to-openapi@0.2.2
15
+
3
16
  ## 2.3.16
4
17
 
5
18
  ### Patch Changes
@@ -1,15 +1,16 @@
1
1
  import MimeType from 'whatwg-mimetype';
2
+ import type { Ref } from 'vue';
2
3
  /**
3
4
  * Processes the response body of an HTTP request.
4
5
  * Extracts MIME type, attachment filename, and generates a data URL.
5
6
  */
6
7
  export declare function useResponseBody(props: {
7
- data: unknown;
8
- headers: {
8
+ data: Ref<unknown>;
9
+ headers: Ref<{
9
10
  name: string;
10
11
  value: string;
11
12
  required: boolean;
12
- }[];
13
+ }[]>;
13
14
  }): {
14
15
  mimeType: import("vue").ComputedRef<MimeType>;
15
16
  attachmentFilename: import("vue").ComputedRef<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"useResponseBody.d.ts","sourceRoot":"","sources":["../../src/hooks/useResponseBody.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,iBAAiB,CAAA;AAEtC;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACrC,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE,CAAA;CAC9D;;;;EA+BA"}
1
+ {"version":3,"file":"useResponseBody.d.ts","sourceRoot":"","sources":["../../src/hooks/useResponseBody.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,iBAAiB,CAAA;AACtC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACrC,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IAClB,OAAO,EAAE,GAAG,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC,CAAA;CACnE;;;;EAmCA"}
@@ -1,22 +1,22 @@
1
- import { extractFilename as m } from "../libs/extractAttachmentFilename.js";
2
- import { computed as o } from "vue";
3
- import u from "whatwg-mimetype";
4
- function y(e) {
5
- const i = (t) => t instanceof Blob, a = o(() => {
1
+ import { extractFilename as v } from "../libs/extractAttachmentFilename.js";
2
+ import { computed as r, isRef as i } from "vue";
3
+ import m from "whatwg-mimetype";
4
+ function b(t) {
5
+ const l = (a) => a instanceof Blob, e = r(() => i(t.data) ? t.data.value : t.data), c = r(() => i(t.headers) ? t.headers.value : t.headers), o = r(() => {
6
6
  var n;
7
- const t = ((n = e.headers.find((r) => r.name.toLowerCase() === "content-type")) == null ? void 0 : n.value) ?? "";
8
- return new u(t);
9
- }), c = o(() => {
7
+ const a = ((n = c.value.find((u) => u.name.toLowerCase() === "content-type")) == null ? void 0 : n.value) ?? "";
8
+ return new m(a);
9
+ }), s = r(() => {
10
10
  var n;
11
- const t = ((n = e.headers.find((r) => r.name.toLowerCase() === "content-disposition")) == null ? void 0 : n.value) ?? "";
12
- return m(t);
13
- }), d = o(() => i(e.data) ? URL.createObjectURL(e.data) : typeof e.data == "string" ? URL.createObjectURL(new Blob([e.data], { type: a.value.toString() })) : e.data instanceof Object && Object.keys(e.data).length ? URL.createObjectURL(
14
- new Blob([JSON.stringify(e.data)], {
15
- type: a.value.toString()
11
+ const a = ((n = c.value.find((u) => u.name.toLowerCase() === "content-disposition")) == null ? void 0 : n.value) ?? "";
12
+ return v(a);
13
+ }), f = r(() => l(e.value) ? URL.createObjectURL(e.value) : typeof e.value == "string" ? URL.createObjectURL(new Blob([e.value], { type: o.value.toString() })) : e.value instanceof Object && Object.keys(e.value).length ? URL.createObjectURL(
14
+ new Blob([JSON.stringify(e.value)], {
15
+ type: o.value.toString()
16
16
  })
17
17
  ) : "");
18
- return { mimeType: a, attachmentFilename: c, dataUrl: d };
18
+ return { mimeType: o, attachmentFilename: s, dataUrl: f };
19
19
  }
20
20
  export {
21
- y as useResponseBody
21
+ b as useResponseBody
22
22
  };