@scalar/api-client 0.5.0 → 0.5.2
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/components/ApiClient/Request/RequestHeaders.vue.d.ts +0 -2
- package/dist/components/ApiClient/Request/RequestHeaders.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestQuery.vue.d.ts +0 -2
- package/dist/components/ApiClient/Request/RequestQuery.vue.d.ts.map +1 -1
- package/dist/components/ApiClient/Request/RequestVariables.vue.d.ts +2 -4
- package/dist/components/ApiClient/Request/RequestVariables.vue.d.ts.map +1 -1
- package/dist/helpers/concatenateUrlAndPath.d.ts +5 -0
- package/dist/helpers/concatenateUrlAndPath.d.ts.map +1 -0
- package/dist/helpers/index.d.ts +6 -1
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/normalizePath.d.ts +5 -0
- package/dist/helpers/normalizePath.d.ts.map +1 -0
- package/dist/helpers/normalizeRequestMethod.d.ts +5 -0
- package/dist/helpers/normalizeRequestMethod.d.ts.map +1 -0
- package/dist/helpers/normalizeUrl.d.ts +5 -0
- package/dist/helpers/normalizeUrl.d.ts.map +1 -0
- package/dist/helpers/replaceVariables.d.ts +5 -0
- package/dist/helpers/replaceVariables.d.ts.map +1 -0
- package/dist/helpers/sendRequest.d.ts +2 -2
- package/dist/helpers/sendRequest.d.ts.map +1 -1
- package/dist/index.js +140 -56
- package/dist/stores/apiClientRequestStore.d.ts +8 -8
- package/dist/types.d.ts +7 -5
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -10
- package/src/components/ApiClient/AddressBar.vue +0 -462
- package/src/components/ApiClient/ApiClient.vue +0 -266
- package/src/components/ApiClient/Request/Request.vue +0 -271
- package/src/components/ApiClient/Request/RequestAuth.vue +0 -221
- package/src/components/ApiClient/Request/RequestBody.vue +0 -40
- package/src/components/ApiClient/Request/RequestHeaders.vue +0 -24
- package/src/components/ApiClient/Request/RequestQuery.vue +0 -25
- package/src/components/ApiClient/Request/RequestVariables.vue +0 -25
- package/src/components/ApiClient/Request/index.ts +0 -1
- package/src/components/ApiClient/RequestHistory.vue +0 -114
- package/src/components/ApiClient/RequestHistoryItem.vue +0 -59
- package/src/components/ApiClient/Response/Copilot.vue.bak +0 -385
- package/src/components/ApiClient/Response/Response.vue +0 -120
- package/src/components/ApiClient/Response/ResponseBody.vue +0 -24
- package/src/components/ApiClient/Response/ResponseHeaders.vue +0 -52
- package/src/components/ApiClient/Response/ResponseMetaInformation.vue +0 -58
- package/src/components/ApiClient/Response/index.ts +0 -1
- package/src/components/ApiClient/index.ts +0 -1
- package/src/components/CollapsibleSection/CollapsibleSection.vue +0 -149
- package/src/components/CollapsibleSection/index.ts +0 -1
- package/src/components/FlowModal.vue +0 -133
- package/src/components/Grid/Grid.vue +0 -511
- package/src/components/Grid/SimpleGrid.vue +0 -33
- package/src/components/Grid/index.ts +0 -2
- package/src/components/HelpfulLink.vue +0 -19
- package/src/components/SimpleTable/SimpleCell.vue +0 -47
- package/src/components/SimpleTable/SimpleHeader.vue +0 -17
- package/src/components/SimpleTable/SimpleRow.vue +0 -14
- package/src/components/SimpleTable/SimpleTable.vue +0 -13
- package/src/components/SimpleTable/index.ts +0 -4
- package/src/fixtures/httpHeaders.ts +0 -530
- package/src/fixtures/httpStatusCodes.ts +0 -259
- package/src/fixtures/index.ts +0 -6
- package/src/helpers/createPlaceholderRequest.ts +0 -16
- package/src/helpers/generateParameters.ts +0 -19
- package/src/helpers/generateRequest.ts +0 -26
- package/src/helpers/index.ts +0 -5
- package/src/helpers/mapFromArray.ts +0 -16
- package/src/helpers/sendRequest.ts +0 -94
- package/src/hooks/index.ts +0 -2
- package/src/hooks/useCopilot.ts +0 -64
- package/src/hooks/useOperation.test.ts +0 -7
- package/src/hooks/useOperation.ts +0 -43
- package/src/index.ts +0 -8
- package/src/stores/apiClientRequestStore.ts +0 -103
- package/src/stores/apiClientStore.ts +0 -57
- package/src/stores/index.ts +0 -5
- package/src/types.ts +0 -181
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
2
|
headers: {
|
|
3
3
|
type: import("vue").PropType<any[]>;
|
|
4
|
-
required: true;
|
|
5
4
|
};
|
|
6
5
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7
6
|
headers: {
|
|
8
7
|
type: import("vue").PropType<any[]>;
|
|
9
|
-
required: true;
|
|
10
8
|
};
|
|
11
9
|
}>>, {}, {}>;
|
|
12
10
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ApiClient/Request/RequestHeaders.vue.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ApiClient/Request/RequestHeaders.vue.ts"],"names":[],"mappings":";;;;;;;;;AAyFA,wBAAkD"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
2
|
queries: {
|
|
3
3
|
type: import("vue").PropType<import("../../../types").BaseParameter[]>;
|
|
4
|
-
required: true;
|
|
5
4
|
};
|
|
6
5
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7
6
|
queries: {
|
|
8
7
|
type: import("vue").PropType<import("../../../types").BaseParameter[]>;
|
|
9
|
-
required: true;
|
|
10
8
|
};
|
|
11
9
|
}>>, {}, {}>;
|
|
12
10
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestQuery.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ApiClient/Request/RequestQuery.vue.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestQuery.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ApiClient/Request/RequestQuery.vue.ts"],"names":[],"mappings":";;;;;;;;;AA0FA,wBAAkD"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import type { BaseParameter } from '../../../types';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
|
3
|
-
|
|
3
|
+
variables: {
|
|
4
4
|
type: import("vue").PropType<BaseParameter[]>;
|
|
5
|
-
required: true;
|
|
6
5
|
};
|
|
7
6
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
8
|
-
|
|
7
|
+
variables: {
|
|
9
8
|
type: import("vue").PropType<BaseParameter[]>;
|
|
10
|
-
required: true;
|
|
11
9
|
};
|
|
12
10
|
}>>, {}, {}>;
|
|
13
11
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestVariables.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ApiClient/Request/RequestVariables.vue.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA
|
|
1
|
+
{"version":3,"file":"RequestVariables.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ApiClient/Request/RequestVariables.vue.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;;;;;;;;;;AAwFnD,wBAAkD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"concatenateUrlAndPath.d.ts","sourceRoot":"","sources":["../../src/helpers/concatenateUrlAndPath.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,qBAAqB,QAAS,MAAM,SAAS,MAAM,WAS/D,CAAA"}
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
export { concatenateUrlAndPath } from './concatenateUrlAndPath';
|
|
1
2
|
export { createPlaceholderRequest } from './createPlaceholderRequest';
|
|
2
|
-
export { generateRequest } from './generateRequest';
|
|
3
3
|
export { generateParameters } from './generateParameters';
|
|
4
|
+
export { generateRequest } from './generateRequest';
|
|
4
5
|
export { mapFromArray } from './mapFromArray';
|
|
6
|
+
export { normalizePath } from './normalizePath';
|
|
7
|
+
export { normalizeRequestMethod } from './normalizeRequestMethod';
|
|
8
|
+
export { normalizeUrl } from './normalizeUrl';
|
|
9
|
+
export { replaceVariables } from './replaceVariables';
|
|
5
10
|
export { sendRequest } from './sendRequest';
|
|
6
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizePath.d.ts","sourceRoot":"","sources":["../../src/helpers/normalizePath.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,aAAa,UAAW,MAAM,WAY1C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeRequestMethod.d.ts","sourceRoot":"","sources":["../../src/helpers/normalizeRequestMethod.ts"],"names":[],"mappings":"AAcA;;GAEG;AACH,eAAO,MAAM,sBAAsB,YAAa,MAAM,WAyBrD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeUrl.d.ts","sourceRoot":"","sources":["../../src/helpers/normalizeUrl.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,YAAY,SAAU,MAAM,WAoBxC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replaceVariables.d.ts","sourceRoot":"","sources":["../../src/helpers/replaceVariables.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,gBAAgB,QACtB,MAAM,aACA,OAAO,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,WAK3C,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RequestResult, SendRequestConfig } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Send a request via the proxy
|
|
4
4
|
*/
|
|
5
|
-
export declare function sendRequest(request:
|
|
5
|
+
export declare function sendRequest(request: SendRequestConfig, proxyUrl?: string): Promise<RequestResult | null>;
|
|
6
6
|
//# sourceMappingURL=sendRequest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendRequest.d.ts","sourceRoot":"","sources":["../../src/helpers/sendRequest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sendRequest.d.ts","sourceRoot":"","sources":["../../src/helpers/sendRequest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,aAAa,EACb,iBAAiB,EAClB,MAAM,UAAU,CAAA;AAcjB;;GAEG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CA4E/B"}
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
})();
|
|
13
13
|
import { cloneVNode, h as h$2, Fragment, inject, provide, ref, onMounted, watchEffect, computed, defineComponent, onUnmounted, watch, Teleport, reactive, unref, shallowRef, nextTick, getCurrentScope, onScopeDispose, toRef as toRef$1, readonly, customRef, getCurrentInstance, openBlock, createBlock, withCtx, createElementVNode, createVNode, normalizeClass, normalizeStyle, createTextVNode, toDisplayString, createCommentVNode, renderSlot, createElementBlock, renderList, createStaticVNode, withDirectives, withModifiers, vShow, vModelSelect, vModelText, vModelCheckbox, withKeys } from "vue";
|
|
14
14
|
import { CodeMirror } from "@scalar/use-codemirror";
|
|
15
|
-
import nunjucks from "nunjucks";
|
|
16
15
|
function u$3(r2, n2, ...a2) {
|
|
17
16
|
if (r2 in n2) {
|
|
18
17
|
let e2 = n2[r2];
|
|
@@ -5890,6 +5889,41 @@ let nanoid = (size = 21) => crypto.getRandomValues(new Uint8Array(size)).reduce(
|
|
|
5890
5889
|
}
|
|
5891
5890
|
return id;
|
|
5892
5891
|
}, "");
|
|
5892
|
+
const concatenateUrlAndPath = (url, path) => {
|
|
5893
|
+
if (typeof path !== "string" || !path.length) {
|
|
5894
|
+
return url;
|
|
5895
|
+
}
|
|
5896
|
+
const urlWithSlash = url.endsWith("/") ? url : `${url}/`;
|
|
5897
|
+
const pathWithoutSlash = path.startsWith("/") ? path.slice(1) : path;
|
|
5898
|
+
return [urlWithSlash, pathWithoutSlash].join("");
|
|
5899
|
+
};
|
|
5900
|
+
function generateParameters(parameters) {
|
|
5901
|
+
const params = [];
|
|
5902
|
+
parameters.forEach((parameter) => {
|
|
5903
|
+
const param = {
|
|
5904
|
+
name: parameter.name,
|
|
5905
|
+
value: "",
|
|
5906
|
+
customClass: parameter.required ? "required-parameter" : ""
|
|
5907
|
+
};
|
|
5908
|
+
param.value = "";
|
|
5909
|
+
params.push(param);
|
|
5910
|
+
});
|
|
5911
|
+
return params;
|
|
5912
|
+
}
|
|
5913
|
+
function generateRequest(operation, parameterMap, server) {
|
|
5914
|
+
const item = {
|
|
5915
|
+
id: operation.operationId,
|
|
5916
|
+
name: operation.name,
|
|
5917
|
+
type: operation.httpVerb,
|
|
5918
|
+
path: operation.path,
|
|
5919
|
+
parameters: generateParameters(parameterMap.path),
|
|
5920
|
+
query: generateParameters(parameterMap.query),
|
|
5921
|
+
headers: generateParameters(parameterMap.header),
|
|
5922
|
+
url: server.url,
|
|
5923
|
+
body: ""
|
|
5924
|
+
};
|
|
5925
|
+
return item;
|
|
5926
|
+
}
|
|
5893
5927
|
function mapFromArray(arr, key, valueKey) {
|
|
5894
5928
|
const obj = {};
|
|
5895
5929
|
arr.forEach((entry) => {
|
|
@@ -5897,27 +5931,85 @@ function mapFromArray(arr, key, valueKey) {
|
|
|
5897
5931
|
});
|
|
5898
5932
|
return obj;
|
|
5899
5933
|
}
|
|
5900
|
-
const
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
variableEnd: "}"
|
|
5934
|
+
const normalizePath = (path) => {
|
|
5935
|
+
if (typeof path !== "string") {
|
|
5936
|
+
return "";
|
|
5904
5937
|
}
|
|
5905
|
-
|
|
5938
|
+
let normalizedPath = path.trim();
|
|
5939
|
+
if (normalizedPath.startsWith("/")) {
|
|
5940
|
+
normalizedPath = normalizedPath.slice(1);
|
|
5941
|
+
}
|
|
5942
|
+
return normalizedPath;
|
|
5943
|
+
};
|
|
5944
|
+
const defaultRequestMethod = "GET";
|
|
5945
|
+
const validRequestMethods = [
|
|
5946
|
+
"GET",
|
|
5947
|
+
"POST",
|
|
5948
|
+
"PUT",
|
|
5949
|
+
"HEAD",
|
|
5950
|
+
"DELETE",
|
|
5951
|
+
"PATCH",
|
|
5952
|
+
"OPTIONS",
|
|
5953
|
+
"CONNECT",
|
|
5954
|
+
"TRACE"
|
|
5955
|
+
];
|
|
5956
|
+
const normalizeRequestMethod = (method) => {
|
|
5957
|
+
if (typeof method !== "string") {
|
|
5958
|
+
console.warn(
|
|
5959
|
+
`[sendRequest] Request method is not a string. Using ${defaultRequestMethod} as the default.`
|
|
5960
|
+
);
|
|
5961
|
+
return defaultRequestMethod;
|
|
5962
|
+
}
|
|
5963
|
+
const normalizedMethod = method.trim().toUpperCase();
|
|
5964
|
+
const isValidRequestMethod = validRequestMethods.includes(normalizedMethod);
|
|
5965
|
+
if (!isValidRequestMethod) {
|
|
5966
|
+
console.warn(
|
|
5967
|
+
`[sendRequest] ${method} is not a valid request method. Using ${defaultRequestMethod} as the default.`
|
|
5968
|
+
);
|
|
5969
|
+
return defaultRequestMethod;
|
|
5970
|
+
}
|
|
5971
|
+
return normalizedMethod;
|
|
5972
|
+
};
|
|
5973
|
+
const normalizeUrl = (url) => {
|
|
5974
|
+
if (typeof url !== "string") {
|
|
5975
|
+
console.warn(
|
|
5976
|
+
`[sendRequest] URL is not a string. Using an empty string as the default.`
|
|
5977
|
+
);
|
|
5978
|
+
return "";
|
|
5979
|
+
}
|
|
5980
|
+
let normalizedUrl = url.trim().toLowerCase();
|
|
5981
|
+
if (!normalizedUrl.startsWith("http")) {
|
|
5982
|
+
console.warn(
|
|
5983
|
+
`[sendRequest] URL does not start with http. Adding http:// as the default prefix.`
|
|
5984
|
+
);
|
|
5985
|
+
normalizedUrl = `http://${normalizedUrl}`;
|
|
5986
|
+
}
|
|
5987
|
+
return normalizedUrl;
|
|
5988
|
+
};
|
|
5989
|
+
const replaceVariables = (url, variables) => {
|
|
5990
|
+
return Object.entries(variables).reduce((acc, [key, value]) => {
|
|
5991
|
+
return acc.replace(`{${key}}`, value.toString());
|
|
5992
|
+
}, url);
|
|
5993
|
+
};
|
|
5906
5994
|
const defaultHeaders = {
|
|
5907
5995
|
"User-Agent": "Scalar API Client"
|
|
5908
5996
|
};
|
|
5909
5997
|
async function sendRequest(request, proxyUrl) {
|
|
5910
|
-
const method = request.type
|
|
5911
|
-
const fullUrl = `${request.url}${request.path}`;
|
|
5998
|
+
const method = normalizeRequestMethod(request.type);
|
|
5912
5999
|
const headers = {
|
|
5913
6000
|
...defaultHeaders,
|
|
5914
|
-
...mapFromArray(request.headers, "name", "value")
|
|
6001
|
+
...mapFromArray(request.headers ?? [], "name", "value")
|
|
5915
6002
|
};
|
|
6003
|
+
const url = normalizeUrl(request.url);
|
|
6004
|
+
const path = normalizePath(request.path);
|
|
6005
|
+
const urlWithPath = concatenateUrlAndPath(url, path);
|
|
6006
|
+
const renderedURL = replaceVariables(
|
|
6007
|
+
urlWithPath,
|
|
6008
|
+
mapFromArray(request.parameters ?? [], "name", "value")
|
|
6009
|
+
);
|
|
5916
6010
|
const auth = {
|
|
5917
6011
|
type: "none"
|
|
5918
6012
|
};
|
|
5919
|
-
const variables = mapFromArray(request.parameters, "name", "value");
|
|
5920
|
-
const renderedURL = templateEngine.renderString(fullUrl, variables);
|
|
5921
6013
|
const startTime = Date.now();
|
|
5922
6014
|
const requestOptions = {
|
|
5923
6015
|
method,
|
|
@@ -5926,31 +6018,45 @@ async function sendRequest(request, proxyUrl) {
|
|
|
5926
6018
|
headers,
|
|
5927
6019
|
data: request.body
|
|
5928
6020
|
};
|
|
5929
|
-
const config = {
|
|
6021
|
+
const config = proxyUrl ? {
|
|
5930
6022
|
method: "POST",
|
|
5931
6023
|
url: proxyUrl,
|
|
5932
6024
|
data: requestOptions
|
|
6025
|
+
} : {
|
|
6026
|
+
method: requestOptions.method,
|
|
6027
|
+
url: requestOptions.url,
|
|
6028
|
+
headers: requestOptions.headers,
|
|
6029
|
+
data: requestOptions.data
|
|
5933
6030
|
};
|
|
5934
6031
|
console.info(`${requestOptions.method} ${requestOptions.url}`);
|
|
5935
6032
|
const response = (
|
|
5936
6033
|
// @ts-ignore
|
|
5937
|
-
await axios$1(config).then((res) =>
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
6034
|
+
await axios$1(config).then((res) => {
|
|
6035
|
+
return {
|
|
6036
|
+
...res.data,
|
|
6037
|
+
error: false
|
|
6038
|
+
};
|
|
6039
|
+
}).catch((err) => {
|
|
6040
|
+
return {
|
|
6041
|
+
error: true,
|
|
6042
|
+
...err == null ? void 0 : err.response
|
|
6043
|
+
};
|
|
6044
|
+
})
|
|
5944
6045
|
);
|
|
5945
|
-
return
|
|
6046
|
+
return response.error ? null : {
|
|
5946
6047
|
sentTime: Date.now(),
|
|
5947
|
-
request
|
|
6048
|
+
request: {
|
|
6049
|
+
...request,
|
|
6050
|
+
type: method,
|
|
6051
|
+
url,
|
|
6052
|
+
path
|
|
6053
|
+
},
|
|
5948
6054
|
response: {
|
|
5949
6055
|
...response,
|
|
5950
6056
|
duration: Date.now() - startTime
|
|
5951
6057
|
},
|
|
5952
6058
|
responseId: nanoid()
|
|
5953
|
-
}
|
|
6059
|
+
};
|
|
5954
6060
|
}
|
|
5955
6061
|
const _hoisted_1$k = { class: "modal-layout" };
|
|
5956
6062
|
const useModalState = () => reactive({
|
|
@@ -7021,7 +7127,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
7021
7127
|
return (_ctx, _cache) => {
|
|
7022
7128
|
return openBlock(), createBlock(unref(_sfc_main$i), { title: "Headers" }, {
|
|
7023
7129
|
default: withCtx(() => [
|
|
7024
|
-
_ctx.headers.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_1$b, "No Headers")) : (openBlock(), createBlock(unref(_sfc_main$g), {
|
|
7130
|
+
!_ctx.headers || _ctx.headers.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_1$b, "No Headers")) : (openBlock(), createBlock(unref(_sfc_main$g), {
|
|
7025
7131
|
key: 1,
|
|
7026
7132
|
items: _ctx.headers
|
|
7027
7133
|
}, null, 8, ["items"]))
|
|
@@ -7044,7 +7150,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
7044
7150
|
return (_ctx, _cache) => {
|
|
7045
7151
|
return openBlock(), createBlock(unref(_sfc_main$i), { title: "Query Parameters" }, {
|
|
7046
7152
|
default: withCtx(() => [
|
|
7047
|
-
_ctx.queries.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_1$a, "No Query Parameters")) : (openBlock(), createBlock(unref(_sfc_main$g), {
|
|
7153
|
+
!_ctx.queries || _ctx.queries.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_1$a, "No Query Parameters")) : (openBlock(), createBlock(unref(_sfc_main$g), {
|
|
7048
7154
|
key: 1,
|
|
7049
7155
|
items: _ctx.queries
|
|
7050
7156
|
}, null, 8, ["items"]))
|
|
@@ -7061,15 +7167,15 @@ const _hoisted_1$9 = {
|
|
|
7061
7167
|
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
7062
7168
|
__name: "RequestVariables",
|
|
7063
7169
|
props: {
|
|
7064
|
-
|
|
7170
|
+
variables: {}
|
|
7065
7171
|
},
|
|
7066
7172
|
setup(__props) {
|
|
7067
7173
|
return (_ctx, _cache) => {
|
|
7068
7174
|
return openBlock(), createBlock(unref(_sfc_main$i), { title: "Variables" }, {
|
|
7069
7175
|
default: withCtx(() => [
|
|
7070
|
-
_ctx.
|
|
7176
|
+
!_ctx.variables || _ctx.variables.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_1$9, "No variables")) : (openBlock(), createBlock(unref(_sfc_main$g), {
|
|
7071
7177
|
key: 1,
|
|
7072
|
-
items: _ctx.
|
|
7178
|
+
items: _ctx.variables
|
|
7073
7179
|
}, null, 8, ["items"]))
|
|
7074
7180
|
]),
|
|
7075
7181
|
_: 1
|
|
@@ -7109,8 +7215,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
7109
7215
|
createElementVNode("div", null, [
|
|
7110
7216
|
createVNode(_sfc_main$h),
|
|
7111
7217
|
createVNode(_sfc_main$b, {
|
|
7112
|
-
|
|
7113
|
-
}, null, 8, ["
|
|
7218
|
+
variables: unref(activeRequest2).parameters
|
|
7219
|
+
}, null, 8, ["variables"]),
|
|
7114
7220
|
createVNode(_sfc_main$c, {
|
|
7115
7221
|
queries: unref(activeRequest2).query
|
|
7116
7222
|
}, null, 8, ["queries"]),
|
|
@@ -8331,33 +8437,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
8331
8437
|
}
|
|
8332
8438
|
});
|
|
8333
8439
|
const ApiClient_vue_vue_type_style_index_0_lang = "";
|
|
8334
|
-
function generateParameters(parameters) {
|
|
8335
|
-
const params = [];
|
|
8336
|
-
parameters.forEach((parameter) => {
|
|
8337
|
-
const param = {
|
|
8338
|
-
name: parameter.name,
|
|
8339
|
-
value: "",
|
|
8340
|
-
customClass: parameter.required ? "required-parameter" : ""
|
|
8341
|
-
};
|
|
8342
|
-
param.value = "";
|
|
8343
|
-
params.push(param);
|
|
8344
|
-
});
|
|
8345
|
-
return params;
|
|
8346
|
-
}
|
|
8347
|
-
function generateRequest(operation, parameterMap, server) {
|
|
8348
|
-
const item = {
|
|
8349
|
-
id: operation.operationId,
|
|
8350
|
-
name: operation.name,
|
|
8351
|
-
type: operation.httpVerb,
|
|
8352
|
-
path: operation.path,
|
|
8353
|
-
parameters: generateParameters(parameterMap.path),
|
|
8354
|
-
query: generateParameters(parameterMap.query),
|
|
8355
|
-
headers: generateParameters(parameterMap.header),
|
|
8356
|
-
url: server.url,
|
|
8357
|
-
body: ""
|
|
8358
|
-
};
|
|
8359
|
-
return item;
|
|
8360
|
-
}
|
|
8361
8440
|
function useOperation(props) {
|
|
8362
8441
|
const parameterMap = computed(() => {
|
|
8363
8442
|
const { parameters } = props.operation.information;
|
|
@@ -8385,6 +8464,7 @@ function useOperation(props) {
|
|
|
8385
8464
|
}
|
|
8386
8465
|
export {
|
|
8387
8466
|
_sfc_main as ApiClient,
|
|
8467
|
+
concatenateUrlAndPath,
|
|
8388
8468
|
createEmptyAuthState,
|
|
8389
8469
|
createPlaceholderRequest,
|
|
8390
8470
|
generateParameters,
|
|
@@ -8392,6 +8472,10 @@ export {
|
|
|
8392
8472
|
httpHeaders,
|
|
8393
8473
|
httpStatusCodes,
|
|
8394
8474
|
mapFromArray,
|
|
8475
|
+
normalizePath,
|
|
8476
|
+
normalizeRequestMethod,
|
|
8477
|
+
normalizeUrl,
|
|
8478
|
+
replaceVariables,
|
|
8395
8479
|
sendRequest,
|
|
8396
8480
|
useApiClientRequestStore,
|
|
8397
8481
|
useApiClientStore,
|
|
@@ -32,26 +32,26 @@ export declare const useApiClientRequestStore: () => {
|
|
|
32
32
|
readOnly: import("vue").Ref<boolean>;
|
|
33
33
|
activeRequest: {
|
|
34
34
|
id?: string | undefined;
|
|
35
|
-
name
|
|
35
|
+
name?: string | undefined;
|
|
36
36
|
url: string;
|
|
37
37
|
type: string;
|
|
38
38
|
path: string;
|
|
39
|
-
parameters
|
|
39
|
+
parameters?: {
|
|
40
40
|
name: string;
|
|
41
41
|
value: string | number;
|
|
42
42
|
customClass?: string | undefined;
|
|
43
|
-
}[];
|
|
44
|
-
query
|
|
43
|
+
}[] | undefined;
|
|
44
|
+
query?: {
|
|
45
45
|
name: string;
|
|
46
46
|
value: string | number;
|
|
47
47
|
customClass?: string | undefined;
|
|
48
|
-
}[];
|
|
49
|
-
headers
|
|
48
|
+
}[] | undefined;
|
|
49
|
+
headers?: {
|
|
50
50
|
name: string;
|
|
51
51
|
value: string | number;
|
|
52
52
|
customClass?: string | undefined;
|
|
53
|
-
}[];
|
|
54
|
-
body
|
|
53
|
+
}[] | undefined;
|
|
54
|
+
body?: string | undefined;
|
|
55
55
|
formData?: {
|
|
56
56
|
name: string;
|
|
57
57
|
value: string | number;
|
package/dist/types.d.ts
CHANGED
|
@@ -41,20 +41,21 @@ export type FormDataItem = BaseParameter;
|
|
|
41
41
|
/** Complete request state for a client request */
|
|
42
42
|
export type ClientRequestConfig = {
|
|
43
43
|
id?: string;
|
|
44
|
-
name
|
|
44
|
+
name?: string;
|
|
45
45
|
url: string;
|
|
46
46
|
/** HTTP Request Method */
|
|
47
47
|
type: string;
|
|
48
48
|
/** Request path */
|
|
49
49
|
path: string;
|
|
50
|
+
/** TODO: Rename to variables? */
|
|
50
51
|
/** Path parameters */
|
|
51
|
-
parameters
|
|
52
|
+
parameters?: BaseParameter[];
|
|
52
53
|
/** Query parameters */
|
|
53
|
-
query
|
|
54
|
+
query?: Query[];
|
|
54
55
|
/** Request headers */
|
|
55
|
-
headers
|
|
56
|
+
headers?: Header[];
|
|
56
57
|
/** Content type matched body */
|
|
57
|
-
body
|
|
58
|
+
body?: string;
|
|
58
59
|
/** Optional form data body */
|
|
59
60
|
formData?: FormDataItem[];
|
|
60
61
|
};
|
|
@@ -76,6 +77,7 @@ export type ClientResponse = {
|
|
|
76
77
|
data: string;
|
|
77
78
|
duration: number;
|
|
78
79
|
};
|
|
80
|
+
export type SendRequestConfig = Partial<ClientRequestConfig> & Required<Pick<ClientRequestConfig, 'url'>>;
|
|
79
81
|
export type RequestResult = {
|
|
80
82
|
request: ClientRequestConfig;
|
|
81
83
|
response: ClientResponse;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,cAAc,EAAE,MAAM,CAA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AM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,GAAG,CAAA;CACb,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,UAAU,EAAE,CAAA;IACxB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IACnC,QAAQ,EAAE,QAAQ,EAAE,CAAA;IACpB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,EAAE,CAAA;CACf,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,WAAW,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,MAAM,GAAG;IACnB,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA"}
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"graphql",
|
|
10
10
|
"postman alternative"
|
|
11
11
|
],
|
|
12
|
-
"version": "0.5.
|
|
12
|
+
"version": "0.5.2",
|
|
13
13
|
"author": "Scalar (https://github.com/scalar)",
|
|
14
14
|
"homepage": "https://github.com/scalar/scalar",
|
|
15
15
|
"repository": {
|
|
@@ -26,13 +26,11 @@
|
|
|
26
26
|
},
|
|
27
27
|
"type": "module",
|
|
28
28
|
"files": [
|
|
29
|
-
"src",
|
|
30
29
|
"dist"
|
|
31
30
|
],
|
|
32
31
|
"main": "./dist/index.js",
|
|
33
32
|
"module": "./dist/index.js",
|
|
34
33
|
"exports": {
|
|
35
|
-
"development": "./src/index.ts",
|
|
36
34
|
"import": "./dist/index.js"
|
|
37
35
|
},
|
|
38
36
|
"types": "dist/index.d.ts",
|
|
@@ -42,25 +40,25 @@
|
|
|
42
40
|
"axios": "1.4.0",
|
|
43
41
|
"javascript-time-ago": "2.5.9",
|
|
44
42
|
"nanoid": "4.0.2",
|
|
45
|
-
"nunjucks": "3.2.3",
|
|
46
43
|
"pretty-bytes": "6.1.0",
|
|
47
44
|
"pretty-ms": "8.0.0",
|
|
48
45
|
"tippy.js": "6.3.7",
|
|
49
46
|
"@scalar/default-theme": "0.2.1",
|
|
50
|
-
"@scalar/use-codemirror": "0.5.
|
|
51
|
-
"@scalar/use-keyboard-event": "0.4.
|
|
47
|
+
"@scalar/use-codemirror": "0.5.1",
|
|
48
|
+
"@scalar/use-keyboard-event": "0.4.2"
|
|
52
49
|
},
|
|
53
50
|
"devDependencies": {
|
|
54
51
|
"@vitejs/plugin-vue": "4.2.3",
|
|
52
|
+
"vitest": "0.34.1",
|
|
53
|
+
"@vitest/coverage-v8": "^0.34.4",
|
|
55
54
|
"tsc-alias": "1.8.6",
|
|
56
55
|
"vite": "4.4.8",
|
|
57
56
|
"vite-plugin-css-injected-by-js": "^3.3.0",
|
|
58
|
-
"
|
|
59
|
-
"
|
|
57
|
+
"vue-tsc": "1.8.8",
|
|
58
|
+
"@scalar/echo-server": "0.4.2"
|
|
60
59
|
},
|
|
61
60
|
"peerDependencies": {
|
|
62
|
-
"vue": "3.3.4"
|
|
63
|
-
"@types/nunjucks": "3.2.2"
|
|
61
|
+
"vue": "3.3.4"
|
|
64
62
|
},
|
|
65
63
|
"scripts": {
|
|
66
64
|
"build": "vite build && pnpm types:build && tsc-alias -p tsconfig.build.json",
|