@scalar/api-client 2.23.0 → 2.23.3
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 +65 -0
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +13 -3
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +68 -68
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +54 -53
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +5 -3
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-security.js +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +3 -2
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/index.d.ts +2 -1
- package/dist/v2/blocks/operation-block/index.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/index.js +7 -4
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +3 -2
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +3 -2
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +78 -78
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +3 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +8 -5
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +2 -2
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +4 -4
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +49 -45
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +63 -51
- package/dist/v2/blocks/request-block/helpers/get-default-headers.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +4 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +18 -181
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +118 -107
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +3 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +30 -33
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +11 -178
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +107 -110
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js +5 -29
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts +6 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +85 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts +9 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +15 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +3 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts +23 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/secret-types.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/index.js +4 -6
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +51 -42
- package/dist/v2/features/app/app-state.d.ts +1 -1
- package/dist/v2/features/app/app-state.d.ts.map +1 -1
- package/dist/v2/features/app/app-state.js +40 -38
- package/dist/v2/features/app/helpers/routes.d.ts +1 -1
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +1 -1
- package/dist/v2/features/collection/components/Authentication.vue2.js +14 -11
- package/dist/v2/features/import-listener/helpers/import-document-to-workspace.d.ts.map +1 -1
- package/dist/v2/features/import-listener/helpers/import-document-to-workspace.js +3 -1
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +1 -1
- package/dist/v2/features/modal/Modal.vue2.js +14 -12
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +44 -35
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts +3 -5
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -1
- package/dist/v2/workspace-events.d.ts.map +1 -1
- package/dist/v2/workspace-events.js +116 -109
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +17 -17
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.bench.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.d.ts +0 -8
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.js +0 -33
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.d.ts +0 -7
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.js +0 -13
package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { SecurityScheme } from '@scalar/oas-utils/entities/spec';
|
|
2
|
-
import { type SecuritySchemeObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
|
-
import type { PartialDeep } from 'type-fest';
|
|
4
|
-
/**
|
|
5
|
-
* Convert the old security scheme to the new one with secret extensions
|
|
6
|
-
*/
|
|
7
|
-
export declare const convertSecuritySchemeSecrets: (scheme: PartialDeep<SecurityScheme & SecuritySchemeObject>) => SecuritySchemeObject;
|
|
8
|
-
//# sourceMappingURL=convert-security-scheme-secrets.d.ts.map
|
package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convert-security-scheme-secrets.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAErE,OAAO,EAEL,KAAK,oBAAoB,EAE1B,MAAM,8DAA8D,CAAA;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAiC5C;;GAEG;AACH,eAAO,MAAM,4BAA4B,GACvC,QAAQ,WAAW,CAAC,cAAc,GAAG,oBAAoB,CAAC,KACzD,oBA+BF,CAAA"}
|
package/dist/v2/blocks/scalar-auth-selector-block/helpers/convert-security-scheme-secrets.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { objectEntries as l } from "@scalar/helpers/object/object-entries";
|
|
2
|
-
import { coerceValue as a } from "@scalar/workspace-store/schemas/typebox-coerce";
|
|
3
|
-
import { SecuritySchemeObjectSchema as n } from "@scalar/workspace-store/schemas/v3.1/strict/openapi-document";
|
|
4
|
-
const S = {
|
|
5
|
-
clientSecret: "x-scalar-secret-client-secret",
|
|
6
|
-
password: "x-scalar-secret-password",
|
|
7
|
-
token: "x-scalar-secret-token",
|
|
8
|
-
username: "x-scalar-secret-username",
|
|
9
|
-
value: "x-scalar-secret-token",
|
|
10
|
-
"x-scalar-client-id": "x-scalar-secret-client-id",
|
|
11
|
-
"x-scalar-redirect-uri": "x-scalar-secret-redirect-uri"
|
|
12
|
-
}, i = (e) => {
|
|
13
|
-
const r = { ...e };
|
|
14
|
-
for (const [t, s] of l(S))
|
|
15
|
-
e[t] && (r[s] ||= e[t]);
|
|
16
|
-
return r;
|
|
17
|
-
}, E = (e) => {
|
|
18
|
-
if (e.type === "oauth2") {
|
|
19
|
-
const r = /* @__PURE__ */ new Set(), t = l(e.flows ?? {}).reduce(
|
|
20
|
-
(o, [d, c]) => (o[d] = c && i(c), c?.selectedScopes?.forEach((u) => r.add(u)), o),
|
|
21
|
-
{}
|
|
22
|
-
), s = r.size > 0 && !e["x-default-scopes"]?.length ? { "x-default-scopes": Array.from(r) } : {};
|
|
23
|
-
return a(n, {
|
|
24
|
-
...e,
|
|
25
|
-
flows: t,
|
|
26
|
-
...s
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
return a(n, i(e));
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
E as convertSecuritySchemeSecrets
|
|
33
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { AuthenticationConfiguration } from '@scalar/types/api-reference';
|
|
2
|
-
import type { ComponentsObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
|
-
/** Document security merged with the config security schemes */
|
|
4
|
-
export type MergedSecuritySchemes = NonNullable<ComponentsObject['securitySchemes']>;
|
|
5
|
-
/** Merge the authentication config with the document security schemes */
|
|
6
|
-
export declare const mergeAuthConfig: (documentSecuritySchemes?: ComponentsObject["securitySchemes"], configSecuritySchemes?: AuthenticationConfiguration["securitySchemes"]) => MergedSecuritySchemes;
|
|
7
|
-
//# sourceMappingURL=merge-auth-config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"merge-auth-config.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/helpers/merge-auth-config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAA;AAE9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAA;AAMpG,gEAAgE;AAChE,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,CAAA;AAEpF,yEAAyE;AACzE,eAAO,MAAM,eAAe,GAC1B,0BAAyB,gBAAgB,CAAC,iBAAiB,CAAM,EACjE,wBAAuB,2BAA2B,CAAC,iBAAiB,CAAM,KACzE,qBAcF,CAAA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { objectEntries as s } from "@scalar/helpers/object/object-entries";
|
|
2
|
-
import { mergeObjects as n } from "@scalar/workspace-store/helpers/merge-object";
|
|
3
|
-
import { convertSecuritySchemeSecrets as i } from "./convert-security-scheme-secrets.js";
|
|
4
|
-
import { getResolvedRefDeep as S } from "../../operation-code-sample/helpers/get-resolved-ref-deep.js";
|
|
5
|
-
const u = (e = {}, r = {}) => {
|
|
6
|
-
const t = S(e), o = n(t, r) ?? {};
|
|
7
|
-
return Object.fromEntries(
|
|
8
|
-
s(o).map(([c, m]) => [c, i(m)])
|
|
9
|
-
);
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
u as mergeAuthConfig
|
|
13
|
-
};
|