@scalar/types 0.2.10 → 0.2.12
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 +16 -0
- package/dist/api-reference/api-reference-configuration.d.ts +60 -10
- package/dist/api-reference/api-reference-configuration.d.ts.map +1 -1
- package/dist/api-reference/api-reference-configuration.js +21 -2
- package/dist/api-reference/api-reference-configuration.js.map +2 -2
- package/dist/entities/security-scheme.d.ts +69 -0
- package/dist/entities/security-scheme.d.ts.map +1 -1
- package/dist/entities/security-scheme.js +7 -3
- package/dist/entities/security-scheme.js.map +2 -2
- package/dist/legacy/reference-config.d.ts +0 -6
- package/dist/legacy/reference-config.d.ts.map +1 -1
- package/dist/legacy/reference-config.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @scalar/types
|
|
2
2
|
|
|
3
|
+
## 0.2.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6a88108: feat: add option to expandAllResponses and expandAllModelSections
|
|
8
|
+
- @scalar/openapi-types@0.3.7
|
|
9
|
+
|
|
10
|
+
## 0.2.11
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- ccf875a: feat: support x-scalar-credentials-location extension
|
|
15
|
+
- 94d6d0c: fix: remove old ssr state and update nuxt for workspace store
|
|
16
|
+
- Updated dependencies [ccf875a]
|
|
17
|
+
- @scalar/openapi-types@0.3.7
|
|
18
|
+
|
|
3
19
|
## 0.2.10
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -970,8 +970,27 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
970
970
|
* @default true
|
|
971
971
|
*/
|
|
972
972
|
withDefaultFonts: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
973
|
-
/**
|
|
974
|
-
|
|
973
|
+
/**
|
|
974
|
+
* Whether to expand all tags by default
|
|
975
|
+
*
|
|
976
|
+
* Warning this can cause performance issues on big documents
|
|
977
|
+
* @default false
|
|
978
|
+
*/
|
|
979
|
+
defaultOpenAllTags: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
980
|
+
/**
|
|
981
|
+
* Whether to expand all models by default
|
|
982
|
+
*
|
|
983
|
+
* Warning this can cause performance issues on big documents
|
|
984
|
+
* @default false
|
|
985
|
+
*/
|
|
986
|
+
expandAllModelSections: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
987
|
+
/**
|
|
988
|
+
* Whether to expand all responses by default
|
|
989
|
+
*
|
|
990
|
+
* Warning this can cause performance issues on big documents
|
|
991
|
+
* @default false
|
|
992
|
+
*/
|
|
993
|
+
expandAllResponses: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
975
994
|
/**
|
|
976
995
|
* Function to sort tags
|
|
977
996
|
* @default 'alpha' for alphabetical sorting
|
|
@@ -996,6 +1015,9 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
996
1015
|
hideSearch: boolean;
|
|
997
1016
|
hideDarkModeToggle: boolean;
|
|
998
1017
|
withDefaultFonts: boolean;
|
|
1018
|
+
defaultOpenAllTags: boolean;
|
|
1019
|
+
expandAllModelSections: boolean;
|
|
1020
|
+
expandAllResponses: boolean;
|
|
999
1021
|
title?: string | undefined;
|
|
1000
1022
|
onBeforeRequest?: ((args_0: {
|
|
1001
1023
|
request: Request;
|
|
@@ -1065,7 +1087,6 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
1065
1087
|
method?: string | undefined;
|
|
1066
1088
|
}, ...args: unknown[]) => string) | undefined;
|
|
1067
1089
|
redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
|
|
1068
|
-
defaultOpenAllTags?: boolean | undefined;
|
|
1069
1090
|
tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
1070
1091
|
operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
1071
1092
|
}, {
|
|
@@ -1151,7 +1172,9 @@ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendS
|
|
|
1151
1172
|
}, ...args: unknown[]) => string) | undefined;
|
|
1152
1173
|
redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
|
|
1153
1174
|
withDefaultFonts?: unknown;
|
|
1154
|
-
defaultOpenAllTags?:
|
|
1175
|
+
defaultOpenAllTags?: unknown;
|
|
1176
|
+
expandAllModelSections?: unknown;
|
|
1177
|
+
expandAllResponses?: unknown;
|
|
1155
1178
|
tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
1156
1179
|
operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
1157
1180
|
}>;
|
|
@@ -1686,8 +1709,27 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1686
1709
|
* @default true
|
|
1687
1710
|
*/
|
|
1688
1711
|
withDefaultFonts: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1689
|
-
/**
|
|
1690
|
-
|
|
1712
|
+
/**
|
|
1713
|
+
* Whether to expand all tags by default
|
|
1714
|
+
*
|
|
1715
|
+
* Warning this can cause performance issues on big documents
|
|
1716
|
+
* @default false
|
|
1717
|
+
*/
|
|
1718
|
+
defaultOpenAllTags: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1719
|
+
/**
|
|
1720
|
+
* Whether to expand all models by default
|
|
1721
|
+
*
|
|
1722
|
+
* Warning this can cause performance issues on big documents
|
|
1723
|
+
* @default false
|
|
1724
|
+
*/
|
|
1725
|
+
expandAllModelSections: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1726
|
+
/**
|
|
1727
|
+
* Whether to expand all responses by default
|
|
1728
|
+
*
|
|
1729
|
+
* Warning this can cause performance issues on big documents
|
|
1730
|
+
* @default false
|
|
1731
|
+
*/
|
|
1732
|
+
expandAllResponses: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1691
1733
|
/**
|
|
1692
1734
|
* Function to sort tags
|
|
1693
1735
|
* @default 'alpha' for alphabetical sorting
|
|
@@ -1712,6 +1754,9 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1712
1754
|
hideSearch: boolean;
|
|
1713
1755
|
hideDarkModeToggle: boolean;
|
|
1714
1756
|
withDefaultFonts: boolean;
|
|
1757
|
+
defaultOpenAllTags: boolean;
|
|
1758
|
+
expandAllModelSections: boolean;
|
|
1759
|
+
expandAllResponses: boolean;
|
|
1715
1760
|
title?: string | undefined;
|
|
1716
1761
|
onBeforeRequest?: ((args_0: {
|
|
1717
1762
|
request: Request;
|
|
@@ -1781,7 +1826,6 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1781
1826
|
method?: string | undefined;
|
|
1782
1827
|
}, ...args: unknown[]) => string) | undefined;
|
|
1783
1828
|
redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
|
|
1784
|
-
defaultOpenAllTags?: boolean | undefined;
|
|
1785
1829
|
tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
1786
1830
|
operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
1787
1831
|
}, {
|
|
@@ -1867,7 +1911,9 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1867
1911
|
}, ...args: unknown[]) => string) | undefined;
|
|
1868
1912
|
redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
|
|
1869
1913
|
withDefaultFonts?: unknown;
|
|
1870
|
-
defaultOpenAllTags?:
|
|
1914
|
+
defaultOpenAllTags?: unknown;
|
|
1915
|
+
expandAllModelSections?: unknown;
|
|
1916
|
+
expandAllResponses?: unknown;
|
|
1871
1917
|
tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
1872
1918
|
operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
1873
1919
|
}>, {
|
|
@@ -1884,6 +1930,9 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1884
1930
|
hideSearch: boolean;
|
|
1885
1931
|
hideDarkModeToggle: boolean;
|
|
1886
1932
|
withDefaultFonts: boolean;
|
|
1933
|
+
defaultOpenAllTags: boolean;
|
|
1934
|
+
expandAllModelSections: boolean;
|
|
1935
|
+
expandAllResponses: boolean;
|
|
1887
1936
|
title?: string | undefined;
|
|
1888
1937
|
onBeforeRequest?: ((args_0: {
|
|
1889
1938
|
request: Request;
|
|
@@ -1953,7 +2002,6 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
1953
2002
|
method?: string | undefined;
|
|
1954
2003
|
}, ...args: unknown[]) => string) | undefined;
|
|
1955
2004
|
redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
|
|
1956
|
-
defaultOpenAllTags?: boolean | undefined;
|
|
1957
2005
|
tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
1958
2006
|
operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
1959
2007
|
}, {
|
|
@@ -2039,7 +2087,9 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
|
|
|
2039
2087
|
}, ...args: unknown[]) => string) | undefined;
|
|
2040
2088
|
redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
|
|
2041
2089
|
withDefaultFonts?: unknown;
|
|
2042
|
-
defaultOpenAllTags?:
|
|
2090
|
+
defaultOpenAllTags?: unknown;
|
|
2091
|
+
expandAllModelSections?: unknown;
|
|
2092
|
+
expandAllResponses?: unknown;
|
|
2043
2093
|
tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
2044
2094
|
operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
|
|
2045
2095
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-reference-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/api-reference-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAA;AA6EjF,0DAA0D;AAC1D,eAAO,MAAM,uBAAuB;IAClC;;;;;;;;;;;;;;;;;QAiBI;;IAEJ;;;;;;;;;;;;;;;;;;;;QAoBI;;IAEJ;;;;;;OAMG;;IAEH;;;;;;;;;;OAUG;;;;;;;;;;;;EAEH,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAQvE,uCAAuC;AACvC,eAAO,MAAM,4BAA4B;IACvC;;QAEI;;IAEJ;;;;;QAKI;;IAEJ;;;;OAIG;;IAEH;;;;;;;;OAQG;;IAEH;;;;QAII;;QAvGJ;;;;;;;;;;;;;;;;;YAiBI;;QAEJ;;;;;;;;;;;;;;;;;;;;YAoBI;;QAEJ;;;;;;WAMG;;QAEH;;;;;;;;;;WAUG;;;;;;;;;;;;;IA8CH,6BAA6B;;IAE7B,kCAAkC;;IAElC;;;OAGG;;IAEH,gDAAgD;;IAEhD,mFAAmF;;IAEnF,qCA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,27 @@ const _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(
|
|
|
399
399
|
* @default true
|
|
400
400
|
*/
|
|
401
401
|
withDefaultFonts: z.boolean().optional().default(true).catch(true),
|
|
402
|
-
/**
|
|
403
|
-
|
|
402
|
+
/**
|
|
403
|
+
* Whether to expand all tags by default
|
|
404
|
+
*
|
|
405
|
+
* Warning this can cause performance issues on big documents
|
|
406
|
+
* @default false
|
|
407
|
+
*/
|
|
408
|
+
defaultOpenAllTags: z.boolean().optional().default(false).catch(false),
|
|
409
|
+
/**
|
|
410
|
+
* Whether to expand all models by default
|
|
411
|
+
*
|
|
412
|
+
* Warning this can cause performance issues on big documents
|
|
413
|
+
* @default false
|
|
414
|
+
*/
|
|
415
|
+
expandAllModelSections: z.boolean().optional().default(false).catch(false),
|
|
416
|
+
/**
|
|
417
|
+
* Whether to expand all responses by default
|
|
418
|
+
*
|
|
419
|
+
* Warning this can cause performance issues on big documents
|
|
420
|
+
* @default false
|
|
421
|
+
*/
|
|
422
|
+
expandAllResponses: z.boolean().optional().default(false).catch(false),
|
|
404
423
|
/**
|
|
405
424
|
* Function to sort tags
|
|
406
425
|
* @default 'alpha' for alphabetical sorting
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/api-reference/api-reference-configuration.ts"],
|
|
4
|
-
"sourcesContent": ["import { z } from 'zod'\n\nimport { ApiClientPluginSchema } from '../api-client'\nimport type { TargetId } from '../snippetz'\nimport { ApiReferencePluginSchema } from './api-reference-plugin'\nimport type { AuthenticationConfiguration } from './authentication-configuration'\n\n/** Available theme presets for the API reference */\nconst themeIdEnum = z.enum([\n 'alternate',\n 'default',\n 'moon',\n 'purple',\n 'solarized',\n 'bluePlanet',\n 'deepSpace',\n 'saturn',\n 'kepler',\n 'elysiajs',\n 'fastify',\n 'mars',\n 'laserwave',\n 'none',\n])\n\n/** Valid keys that can be used with CTRL/CMD to open the search modal */\nconst searchHotKeyEnum = z.enum([\n 'a',\n 'b',\n 'c',\n 'd',\n 'e',\n 'f',\n 'g',\n 'h',\n 'i',\n 'j',\n 'k',\n 'l',\n 'm',\n 'n',\n 'o',\n 'p',\n 'q',\n 'r',\n 's',\n 't',\n 'u',\n 'v',\n 'w',\n 'x',\n 'y',\n 'z',\n])\n\n/** Supported integration types */\nconst integrationEnum = z\n .enum([\n 'adonisjs',\n 'docusaurus',\n 'dotnet',\n 'elysiajs',\n 'express',\n 'fastapi',\n 'fastify',\n 'go',\n 'hono',\n 'html',\n 'laravel',\n 'litestar',\n 'nestjs',\n 'nextjs',\n 'nitro',\n 'nuxt',\n 'platformatic',\n 'react',\n 'rust',\n 'svelte',\n 'vue',\n ])\n .nullable()\n\n/** Configuration for the OpenAPI/Swagger specification */\nexport const specConfigurationSchema = z.object({\n /**\n * URL to an OpenAPI/Swagger document\n *\n * @deprecated Please move `url` to the top level and remove the `spec` prefix.\n *\n * @example\n * ```ts\n * const oldConfiguration = {\n * spec: {\n * url: 'https://example.com/openapi.json',\n * },\n * }\n *\n * const newConfiguration = {\n * url: 'https://example.com/openapi.json',\n * }\n * ```\n **/\n url: z.string().optional(),\n /**\n * Directly embed the OpenAPI document.\n * Can be a string, object, function returning an object, or null.\n *\n * @remarks It's recommended to pass a URL instead of content.\n *\n * @deprecated Please move `content` to the top level and remove the `spec` prefix.\n *\n * @example\n * ```ts\n * const oldConfiguration = {\n * spec: {\n * content: '\u2026',\n * },\n * }\n *\n * const newConfiguration = {\n * content: '\u2026',\n * }\n * ```\n **/\n content: z.union([z.string(), z.record(z.any()), z.function().returns(z.record(z.any())), z.null()]).optional(),\n /**\n * The title of the OpenAPI document.\n *\n * @example 'Scalar Galaxy'\n *\n * @deprecated Please move `title` to the top level and remove the `spec` prefix.\n */\n title: z.string().optional(),\n /**\n * The slug of the OpenAPI document used in the URL.\n *\n * If none is passed, the title will be used.\n *\n * If no title is used, it'll just use the index.\n *\n * @example 'scalar-galaxy'\n *\n * @deprecated Please move `slug` to the top level and remove the `spec` prefix.\n */\n slug: z.string().optional(),\n})\nexport type SpecConfiguration = z.infer<typeof specConfigurationSchema>\n\n/** Configuration for path-based routing */\nconst pathRoutingSchema = z.object({\n /** Base path for the API reference */\n basePath: z.string(),\n})\n\n/** Configuration for the Api Client */\nexport const apiClientConfigurationSchema = z.object({\n /**\n * URL to an OpenAPI/Swagger document\n **/\n url: z.string().optional(),\n /**\n * Directly embed the OpenAPI document.\n * Can be a string, object, function returning an object, or null.\n *\n * @remarks It's recommended to pass a URL instead of content.\n **/\n content: z.union([z.string(), z.record(z.any()), z.function().returns(z.record(z.any())), z.null()]).optional(),\n /**\n * The title of the OpenAPI document.\n *\n * @example 'Scalar Galaxy'\n */\n title: z.string().optional(),\n /**\n * The slug of the OpenAPI document used in the URL.\n *\n * If none is passed, the title will be used.\n *\n * If no title is used, it'll just use the index.\n *\n * @example 'scalar-galaxy'\n */\n slug: z.string().optional(),\n /**\n * The OpenAPI/Swagger document to render\n *\n * @deprecated Use `url` and `content` on the top level instead.\n **/\n spec: specConfigurationSchema.optional(),\n /** Prefill authentication */\n authentication: z.any().optional(), // Temp until we bring in the new auth\n /** Base URL for the API server */\n baseServerURL: z.string().optional(),\n /**\n * Whether to hide the client button\n * @default false\n */\n hideClientButton: z.boolean().optional().default(false).catch(false),\n /** URL to a request proxy for the API client */\n proxyUrl: z.string().optional(),\n /** Key used with CTRL/CMD to open the search modal (defaults to 'k' e.g. CMD+k) */\n searchHotKey: searchHotKeyEnum.optional(),\n /** List of OpenAPI server objects */\n servers: z.array(z.any()).optional(), // Using any for OpenAPIV3_1.ServerObject\n /**\n * Whether to show the sidebar\n * @default true\n */\n showSidebar: z.boolean().optional().default(true).catch(true),\n /** A string to use one of the color presets */\n theme: themeIdEnum.optional().default('default').catch('default'),\n /** Integration type identifier */\n _integration: integrationEnum.optional(),\n /** onRequestSent is fired when a request is sent */\n onRequestSent: z.function().args(z.string()).returns(z.void()).optional(),\n /** Whether to persist auth to local storage */\n persistAuth: z.boolean().optional().default(false).catch(false),\n /** Plugins for the API client */\n plugins: z.array(ApiClientPluginSchema).optional(),\n})\n\nexport type ApiClientConfiguration = z.infer<typeof apiClientConfigurationSchema>\n\n/** Configuration for the Api Client without the transform since it cannot be merged */\nconst _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(\n z.object({\n /**\n * The layout to use for the references\n * @default 'modern'\n */\n layout: z.enum(['modern', 'classic']).optional().default('modern').catch('modern'),\n /**\n * URL to a request proxy for the API client\n * @deprecated Use proxyUrl instead\n */\n proxy: z.string().optional(),\n /**\n * Plugins for the API reference\n */\n plugins: z.array(ApiReferencePluginSchema).optional(),\n /**\n * Allows the user to inject an editor for the spec\n * @default false\n */\n isEditable: z.boolean().optional().default(false).catch(false),\n /**\n * Controls whether the references show a loading state in the intro\n * @default false\n */\n isLoading: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to show models in the sidebar, search, and content.\n * @default false\n */\n hideModels: z.boolean().optional().default(false).catch(false),\n /**\n * Sets the file type of the document to download, set to `none` to hide the download button\n * @default 'both'\n */\n documentDownloadType: z.enum(['yaml', 'json', 'both', 'none']).optional().default('both').catch('both'),\n /**\n * Whether to show the \"Download OpenAPI Document\" button\n * @default false\n * @deprecated Use `documentDownloadType: 'none'` instead\n */\n hideDownloadButton: z.boolean().optional(),\n /**\n * Whether to show the \"Test Request\" button\n * @default false\n */\n hideTestRequestButton: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to show the sidebar search bar\n * @default false\n */\n hideSearch: z.boolean().optional().default(false).catch(false),\n /** Whether dark mode is on or off initially (light mode) */\n darkMode: z.boolean().optional(),\n /** forceDarkModeState makes it always this state no matter what */\n forceDarkModeState: z.enum(['dark', 'light']).optional(),\n /**\n * Whether to show the dark mode toggle\n * @default false\n */\n hideDarkModeToggle: z.boolean().optional().default(false).catch(false),\n /**\n * If used, passed data will be added to the HTML header\n * @see https://unhead.unjs.io/usage/composables/use-seo-meta\n */\n metaData: z.any().optional(), // Using any for UseSeoMetaInput since it's an external type\n /**\n * Path to a favicon image\n * @default undefined\n * @example '/favicon.svg'\n */\n favicon: z.string().optional(),\n /**\n * List of httpsnippet clients to hide from the clients menu\n * By default hides Unirest, pass `[]` to show all clients\n */\n hiddenClients: z\n .union([z.record(z.union([z.boolean(), z.array(z.string())])), z.array(z.string()), z.literal(true)])\n .optional(),\n /** Determine the HTTP client that's selected by default */\n defaultHttpClient: z\n .object({\n targetKey: z.custom<TargetId>(),\n clientKey: z.string(),\n })\n .optional(),\n /** Custom CSS to be added to the page */\n customCss: z.string().optional(),\n /** onSpecUpdate is fired on spec/swagger content change */\n onSpecUpdate: z.function().args(z.string()).returns(z.void()).optional(),\n /** onServerChange is fired on selected server change */\n onServerChange: z.function().args(z.string()).returns(z.void()).optional(),\n /** onDocumentSelect is fired when the config is selected */\n onDocumentSelect: z.function().returns(z.void().or(z.void().promise())).optional(),\n /** Callback fired when the reference is fully loaded */\n onLoaded: z.function().returns(z.void().or(z.void().promise())).optional(),\n /** onBeforeRequest is fired before the request is sent. You can modify the request here. */\n onBeforeRequest: z\n .function()\n .args(z.object({ request: z.instanceof(Request) }))\n .returns(z.void().or(z.void().promise()))\n .optional(),\n /**\n * onShowMore is fired when the user clicks the \"Show more\" button on the references\n * @param tagId - The ID of the tag that was clicked\n */\n onShowMore: z.function().args(z.string()).returns(z.void().or(z.void().promise())).optional(),\n /**\n * onSidebarClick is fired when the user clicks on a sidebar item\n * @param href - The href of the sidebar item that was clicked\n */\n onSidebarClick: z.function().args(z.string()).returns(z.void().or(z.void().promise())).optional(),\n /**\n * Route using paths instead of hashes, your server MUST support this\n * @example '/standalone-api-reference/:custom(.*)?'\n * @experimental\n * @default undefined\n */\n pathRouting: pathRoutingSchema.optional(),\n /**\n * Customize the heading portion of the hash\n * @param heading - The heading object\n * @returns A string ID used to generate the URL hash\n * @default (heading) => `#description/${heading.slug}`\n */\n generateHeadingSlug: z\n .function()\n .args(\n z.object({\n slug: z.string().default('headingSlug'),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * Customize the model portion of the hash\n * @param model - The model object with a name property\n * @returns A string ID used to generate the URL hash\n * @default (model) => slug(model.name)\n */\n generateModelSlug: z\n .function()\n .args(\n z.object({\n name: z.string().default('modelName'),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * Customize the tag portion of the hash\n * @param tag - The tag object\n * @returns A string ID used to generate the URL hash\n * @default (tag) => slug(tag.name)\n */\n generateTagSlug: z\n .function()\n .args(\n z.object({\n name: z.string().default('tagName'),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * Customize the operation portion of the hash\n * @param operation - The operation object\n * @returns A string ID used to generate the URL hash\n * @default (operation) => `${operation.method}${operation.path}`\n */\n generateOperationSlug: z\n .function()\n .args(\n z.object({\n path: z.string(),\n operationId: z.string().optional(),\n method: z.string(),\n summary: z.string().optional(),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * Customize the webhook portion of the hash\n * @param webhook - The webhook object\n * @returns A string ID used to generate the URL hash\n * @default (webhook) => slug(webhook.name)\n */\n generateWebhookSlug: z\n .function()\n .args(\n z.object({\n name: z.string(),\n method: z.string().optional(),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * To handle redirects, pass a function that will recieve:\n * - The current path with hash if pathRouting is enabled\n * - The current hash if hashRouting (default)\n * And then passes that to history.replaceState\n *\n * @example hashRouting (default)\n * ```ts\n * redirect: (hash: string) => hash.replace('#v1/old-path', '#v2/new-path')\n * ```\n * @example pathRouting\n * ```ts\n * redirect: (pathWithHash: string) => {\n * if (pathWithHash.includes('#')) {\n * return pathWithHash.replace('/v1/tags/user#operation/get-user', '/v1/tags/user/operation/get-user')\n * }\n * return null\n * }\n * ```\n */\n redirect: z.function().args(z.string()).returns(z.string().nullable().optional()).optional(),\n /**\n * Whether to include default fonts\n * @default true\n */\n withDefaultFonts: z.boolean().optional().default(true).catch(true),\n /** Whether to expand all tags by default */\n defaultOpenAllTags: z.boolean().optional(),\n /**\n * Function to sort tags\n * @default 'alpha' for alphabetical sorting\n */\n tagsSorter: z.union([z.literal('alpha'), z.function().args(z.any(), z.any()).returns(z.number())]).optional(),\n /**\n * Function to sort operations\n * @default 'alpha' for alphabetical sorting\n */\n operationsSorter: z\n .union([z.literal('alpha'), z.literal('method'), z.function().args(z.any(), z.any()).returns(z.number())])\n .optional(),\n }),\n)\n\nconst OLD_PROXY_URL = 'https://api.scalar.com/request-proxy'\nconst NEW_PROXY_URL = 'https://proxy.scalar.com'\n\n/** Migrate the configuration through a transform */\nconst migrateConfiguration = <T extends z.infer<typeof _apiReferenceConfigurationSchema>>(_configuration: T): T => {\n const configuration = { ..._configuration }\n\n // Migrate hideDownloadButton to documentDownloadType\n if (configuration.hideDownloadButton) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'hideDownloadButton' attribute. Use 'documentDownloadType: 'none'' instead.`,\n )\n\n configuration.documentDownloadType = 'none'\n }\n\n // Remove the spec prefix\n if (configuration.spec?.url) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'spec.url' attribute. Remove the spec prefix and move the 'url' attribute to the top level.`,\n )\n\n configuration.url = configuration.spec.url\n delete configuration.spec\n }\n\n if (configuration.spec?.content) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'spec.content' attribute. Remove the spec prefix and move the 'content' attribute to the top level.`,\n )\n\n configuration.content = configuration.spec.content\n delete configuration.spec\n }\n\n // Migrate proxy URL\n if (configuration.proxy) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'proxy' attribute, rename it to 'proxyUrl' or update the package.`,\n )\n\n if (!configuration.proxyUrl) {\n configuration.proxyUrl = configuration.proxy\n }\n\n delete configuration.proxy\n }\n\n if (configuration.proxyUrl === OLD_PROXY_URL) {\n console.warn(`[DEPRECATED] Warning: configuration.proxyUrl points to our old proxy (${OLD_PROXY_URL}).`)\n console.warn(`[DEPRECATED] We are overwriting the value and use the new proxy URL (${NEW_PROXY_URL}) instead.`)\n console.warn(\n `[DEPRECATED] Action Required: You should manually update your configuration to use the new URL (${NEW_PROXY_URL}). Read more: https://github.com/scalar/scalar`,\n )\n\n configuration.proxyUrl = NEW_PROXY_URL\n }\n\n return configuration\n}\n\n/** Configuration for the Api Reference */\nexport const apiReferenceConfigurationSchema = _apiReferenceConfigurationSchema.transform(migrateConfiguration)\n\n/** Configuration after parsing, this is the main type */\nexport type ApiReferenceConfiguration = Omit<\n z.infer<typeof _apiReferenceConfigurationSchema>,\n // Remove deprecated attributes\n 'proxy' | 'spec' | 'authentication'\n> & {\n authentication?: AuthenticationConfiguration\n}\n\n/** Api Config which includes the default config */\ntype ApiReferenceConfigurationWithDefault = ApiReferenceConfiguration & {\n /** Whether to use this config as the default one */\n default?: boolean\n}\n\n/** Configuration for a single config with sources */\nexport type ApiReferenceConfigurationWithSources = Omit<ApiReferenceConfigurationWithDefault, 'default'> & {\n sources: (SpecConfiguration & { default?: boolean })[]\n}\n\n/** Configuration for multiple Api References */\nexport type AnyApiReferenceConfiguration =\n | Partial<ApiReferenceConfiguration>\n | Partial<ApiReferenceConfigurationWithSources>\n | Partial<ApiReferenceConfigurationWithDefault>[]\n | Partial<ApiReferenceConfigurationWithSources>[]\n\n/** Typeguard to check to narrow the configs to the one with sources */\nexport const isConfigurationWithSources = (\n config: AnyApiReferenceConfiguration,\n): config is Partial<ApiReferenceConfigurationWithSources> =>\n Boolean(!Array.isArray(config) && config && 'sources' in config && Array.isArray(config.sources))\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,SAAS;AAElB,SAAS,6BAA6B;AAEtC,SAAS,gCAAgC;AAIzC,MAAM,cAAc,EAAE,KAAK;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAGD,MAAM,mBAAmB,EAAE,KAAK;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,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import { ApiReferencePluginSchema } from './api-reference-plugin'\nimport type { AuthenticationConfiguration } from './authentication-configuration'\n\n/** Available theme presets for the API reference */\nconst themeIdEnum = z.enum([\n 'alternate',\n 'default',\n 'moon',\n 'purple',\n 'solarized',\n 'bluePlanet',\n 'deepSpace',\n 'saturn',\n 'kepler',\n 'elysiajs',\n 'fastify',\n 'mars',\n 'laserwave',\n 'none',\n])\n\n/** Valid keys that can be used with CTRL/CMD to open the search modal */\nconst searchHotKeyEnum = z.enum([\n 'a',\n 'b',\n 'c',\n 'd',\n 'e',\n 'f',\n 'g',\n 'h',\n 'i',\n 'j',\n 'k',\n 'l',\n 'm',\n 'n',\n 'o',\n 'p',\n 'q',\n 'r',\n 's',\n 't',\n 'u',\n 'v',\n 'w',\n 'x',\n 'y',\n 'z',\n])\n\n/** Supported integration types */\nconst integrationEnum = z\n .enum([\n 'adonisjs',\n 'docusaurus',\n 'dotnet',\n 'elysiajs',\n 'express',\n 'fastapi',\n 'fastify',\n 'go',\n 'hono',\n 'html',\n 'laravel',\n 'litestar',\n 'nestjs',\n 'nextjs',\n 'nitro',\n 'nuxt',\n 'platformatic',\n 'react',\n 'rust',\n 'svelte',\n 'vue',\n ])\n .nullable()\n\n/** Configuration for the OpenAPI/Swagger specification */\nexport const specConfigurationSchema = z.object({\n /**\n * URL to an OpenAPI/Swagger document\n *\n * @deprecated Please move `url` to the top level and remove the `spec` prefix.\n *\n * @example\n * ```ts\n * const oldConfiguration = {\n * spec: {\n * url: 'https://example.com/openapi.json',\n * },\n * }\n *\n * const newConfiguration = {\n * url: 'https://example.com/openapi.json',\n * }\n * ```\n **/\n url: z.string().optional(),\n /**\n * Directly embed the OpenAPI document.\n * Can be a string, object, function returning an object, or null.\n *\n * @remarks It's recommended to pass a URL instead of content.\n *\n * @deprecated Please move `content` to the top level and remove the `spec` prefix.\n *\n * @example\n * ```ts\n * const oldConfiguration = {\n * spec: {\n * content: '\u2026',\n * },\n * }\n *\n * const newConfiguration = {\n * content: '\u2026',\n * }\n * ```\n **/\n content: z.union([z.string(), z.record(z.any()), z.function().returns(z.record(z.any())), z.null()]).optional(),\n /**\n * The title of the OpenAPI document.\n *\n * @example 'Scalar Galaxy'\n *\n * @deprecated Please move `title` to the top level and remove the `spec` prefix.\n */\n title: z.string().optional(),\n /**\n * The slug of the OpenAPI document used in the URL.\n *\n * If none is passed, the title will be used.\n *\n * If no title is used, it'll just use the index.\n *\n * @example 'scalar-galaxy'\n *\n * @deprecated Please move `slug` to the top level and remove the `spec` prefix.\n */\n slug: z.string().optional(),\n})\nexport type SpecConfiguration = z.infer<typeof specConfigurationSchema>\n\n/** Configuration for path-based routing */\nconst pathRoutingSchema = z.object({\n /** Base path for the API reference */\n basePath: z.string(),\n})\n\n/** Configuration for the Api Client */\nexport const apiClientConfigurationSchema = z.object({\n /**\n * URL to an OpenAPI/Swagger document\n **/\n url: z.string().optional(),\n /**\n * Directly embed the OpenAPI document.\n * Can be a string, object, function returning an object, or null.\n *\n * @remarks It's recommended to pass a URL instead of content.\n **/\n content: z.union([z.string(), z.record(z.any()), z.function().returns(z.record(z.any())), z.null()]).optional(),\n /**\n * The title of the OpenAPI document.\n *\n * @example 'Scalar Galaxy'\n */\n title: z.string().optional(),\n /**\n * The slug of the OpenAPI document used in the URL.\n *\n * If none is passed, the title will be used.\n *\n * If no title is used, it'll just use the index.\n *\n * @example 'scalar-galaxy'\n */\n slug: z.string().optional(),\n /**\n * The OpenAPI/Swagger document to render\n *\n * @deprecated Use `url` and `content` on the top level instead.\n **/\n spec: specConfigurationSchema.optional(),\n /** Prefill authentication */\n authentication: z.any().optional(), // Temp until we bring in the new auth\n /** Base URL for the API server */\n baseServerURL: z.string().optional(),\n /**\n * Whether to hide the client button\n * @default false\n */\n hideClientButton: z.boolean().optional().default(false).catch(false),\n /** URL to a request proxy for the API client */\n proxyUrl: z.string().optional(),\n /** Key used with CTRL/CMD to open the search modal (defaults to 'k' e.g. CMD+k) */\n searchHotKey: searchHotKeyEnum.optional(),\n /** List of OpenAPI server objects */\n servers: z.array(z.any()).optional(), // Using any for OpenAPIV3_1.ServerObject\n /**\n * Whether to show the sidebar\n * @default true\n */\n showSidebar: z.boolean().optional().default(true).catch(true),\n /** A string to use one of the color presets */\n theme: themeIdEnum.optional().default('default').catch('default'),\n /** Integration type identifier */\n _integration: integrationEnum.optional(),\n /** onRequestSent is fired when a request is sent */\n onRequestSent: z.function().args(z.string()).returns(z.void()).optional(),\n /** Whether to persist auth to local storage */\n persistAuth: z.boolean().optional().default(false).catch(false),\n /** Plugins for the API client */\n plugins: z.array(ApiClientPluginSchema).optional(),\n})\n\nexport type ApiClientConfiguration = z.infer<typeof apiClientConfigurationSchema>\n\n/** Configuration for the Api Client without the transform since it cannot be merged */\nconst _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(\n z.object({\n /**\n * The layout to use for the references\n * @default 'modern'\n */\n layout: z.enum(['modern', 'classic']).optional().default('modern').catch('modern'),\n /**\n * URL to a request proxy for the API client\n * @deprecated Use proxyUrl instead\n */\n proxy: z.string().optional(),\n /**\n * Plugins for the API reference\n */\n plugins: z.array(ApiReferencePluginSchema).optional(),\n /**\n * Allows the user to inject an editor for the spec\n * @default false\n */\n isEditable: z.boolean().optional().default(false).catch(false),\n /**\n * Controls whether the references show a loading state in the intro\n * @default false\n */\n isLoading: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to show models in the sidebar, search, and content.\n * @default false\n */\n hideModels: z.boolean().optional().default(false).catch(false),\n /**\n * Sets the file type of the document to download, set to `none` to hide the download button\n * @default 'both'\n */\n documentDownloadType: z.enum(['yaml', 'json', 'both', 'none']).optional().default('both').catch('both'),\n /**\n * Whether to show the \"Download OpenAPI Document\" button\n * @default false\n * @deprecated Use `documentDownloadType: 'none'` instead\n */\n hideDownloadButton: z.boolean().optional(),\n /**\n * Whether to show the \"Test Request\" button\n * @default false\n */\n hideTestRequestButton: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to show the sidebar search bar\n * @default false\n */\n hideSearch: z.boolean().optional().default(false).catch(false),\n /** Whether dark mode is on or off initially (light mode) */\n darkMode: z.boolean().optional(),\n /** forceDarkModeState makes it always this state no matter what */\n forceDarkModeState: z.enum(['dark', 'light']).optional(),\n /**\n * Whether to show the dark mode toggle\n * @default false\n */\n hideDarkModeToggle: z.boolean().optional().default(false).catch(false),\n /**\n * If used, passed data will be added to the HTML header\n * @see https://unhead.unjs.io/usage/composables/use-seo-meta\n */\n metaData: z.any().optional(), // Using any for UseSeoMetaInput since it's an external type\n /**\n * Path to a favicon image\n * @default undefined\n * @example '/favicon.svg'\n */\n favicon: z.string().optional(),\n /**\n * List of httpsnippet clients to hide from the clients menu\n * By default hides Unirest, pass `[]` to show all clients\n */\n hiddenClients: z\n .union([z.record(z.union([z.boolean(), z.array(z.string())])), z.array(z.string()), z.literal(true)])\n .optional(),\n /** Determine the HTTP client that's selected by default */\n defaultHttpClient: z\n .object({\n targetKey: z.custom<TargetId>(),\n clientKey: z.string(),\n })\n .optional(),\n /** Custom CSS to be added to the page */\n customCss: z.string().optional(),\n /** onSpecUpdate is fired on spec/swagger content change */\n onSpecUpdate: z.function().args(z.string()).returns(z.void()).optional(),\n /** onServerChange is fired on selected server change */\n onServerChange: z.function().args(z.string()).returns(z.void()).optional(),\n /** onDocumentSelect is fired when the config is selected */\n onDocumentSelect: z.function().returns(z.void().or(z.void().promise())).optional(),\n /** Callback fired when the reference is fully loaded */\n onLoaded: z.function().returns(z.void().or(z.void().promise())).optional(),\n /** onBeforeRequest is fired before the request is sent. You can modify the request here. */\n onBeforeRequest: z\n .function()\n .args(z.object({ request: z.instanceof(Request) }))\n .returns(z.void().or(z.void().promise()))\n .optional(),\n /**\n * onShowMore is fired when the user clicks the \"Show more\" button on the references\n * @param tagId - The ID of the tag that was clicked\n */\n onShowMore: z.function().args(z.string()).returns(z.void().or(z.void().promise())).optional(),\n /**\n * onSidebarClick is fired when the user clicks on a sidebar item\n * @param href - The href of the sidebar item that was clicked\n */\n onSidebarClick: z.function().args(z.string()).returns(z.void().or(z.void().promise())).optional(),\n /**\n * Route using paths instead of hashes, your server MUST support this\n * @example '/standalone-api-reference/:custom(.*)?'\n * @experimental\n * @default undefined\n */\n pathRouting: pathRoutingSchema.optional(),\n /**\n * Customize the heading portion of the hash\n * @param heading - The heading object\n * @returns A string ID used to generate the URL hash\n * @default (heading) => `#description/${heading.slug}`\n */\n generateHeadingSlug: z\n .function()\n .args(\n z.object({\n slug: z.string().default('headingSlug'),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * Customize the model portion of the hash\n * @param model - The model object with a name property\n * @returns A string ID used to generate the URL hash\n * @default (model) => slug(model.name)\n */\n generateModelSlug: z\n .function()\n .args(\n z.object({\n name: z.string().default('modelName'),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * Customize the tag portion of the hash\n * @param tag - The tag object\n * @returns A string ID used to generate the URL hash\n * @default (tag) => slug(tag.name)\n */\n generateTagSlug: z\n .function()\n .args(\n z.object({\n name: z.string().default('tagName'),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * Customize the operation portion of the hash\n * @param operation - The operation object\n * @returns A string ID used to generate the URL hash\n * @default (operation) => `${operation.method}${operation.path}`\n */\n generateOperationSlug: z\n .function()\n .args(\n z.object({\n path: z.string(),\n operationId: z.string().optional(),\n method: z.string(),\n summary: z.string().optional(),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * Customize the webhook portion of the hash\n * @param webhook - The webhook object\n * @returns A string ID used to generate the URL hash\n * @default (webhook) => slug(webhook.name)\n */\n generateWebhookSlug: z\n .function()\n .args(\n z.object({\n name: z.string(),\n method: z.string().optional(),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * To handle redirects, pass a function that will recieve:\n * - The current path with hash if pathRouting is enabled\n * - The current hash if hashRouting (default)\n * And then passes that to history.replaceState\n *\n * @example hashRouting (default)\n * ```ts\n * redirect: (hash: string) => hash.replace('#v1/old-path', '#v2/new-path')\n * ```\n * @example pathRouting\n * ```ts\n * redirect: (pathWithHash: string) => {\n * if (pathWithHash.includes('#')) {\n * return pathWithHash.replace('/v1/tags/user#operation/get-user', '/v1/tags/user/operation/get-user')\n * }\n * return null\n * }\n * ```\n */\n redirect: z.function().args(z.string()).returns(z.string().nullable().optional()).optional(),\n /**\n * Whether to include default fonts\n * @default true\n */\n withDefaultFonts: z.boolean().optional().default(true).catch(true),\n /**\n * Whether to expand all tags by default\n *\n * Warning this can cause performance issues on big documents\n * @default false\n */\n defaultOpenAllTags: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to expand all models by default\n *\n * Warning this can cause performance issues on big documents\n * @default false\n */\n expandAllModelSections: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to expand all responses by default\n *\n * Warning this can cause performance issues on big documents\n * @default false\n */\n expandAllResponses: z.boolean().optional().default(false).catch(false),\n /**\n * Function to sort tags\n * @default 'alpha' for alphabetical sorting\n */\n tagsSorter: z.union([z.literal('alpha'), z.function().args(z.any(), z.any()).returns(z.number())]).optional(),\n /**\n * Function to sort operations\n * @default 'alpha' for alphabetical sorting\n */\n operationsSorter: z\n .union([z.literal('alpha'), z.literal('method'), z.function().args(z.any(), z.any()).returns(z.number())])\n .optional(),\n }),\n)\n\nconst OLD_PROXY_URL = 'https://api.scalar.com/request-proxy'\nconst NEW_PROXY_URL = 'https://proxy.scalar.com'\n\n/** Migrate the configuration through a transform */\nconst migrateConfiguration = <T extends z.infer<typeof _apiReferenceConfigurationSchema>>(_configuration: T): T => {\n const configuration = { ..._configuration }\n\n // Migrate hideDownloadButton to documentDownloadType\n if (configuration.hideDownloadButton) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'hideDownloadButton' attribute. Use 'documentDownloadType: 'none'' instead.`,\n )\n\n configuration.documentDownloadType = 'none'\n }\n\n // Remove the spec prefix\n if (configuration.spec?.url) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'spec.url' attribute. Remove the spec prefix and move the 'url' attribute to the top level.`,\n )\n\n configuration.url = configuration.spec.url\n delete configuration.spec\n }\n\n if (configuration.spec?.content) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'spec.content' attribute. Remove the spec prefix and move the 'content' attribute to the top level.`,\n )\n\n configuration.content = configuration.spec.content\n delete configuration.spec\n }\n\n // Migrate proxy URL\n if (configuration.proxy) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'proxy' attribute, rename it to 'proxyUrl' or update the package.`,\n )\n\n if (!configuration.proxyUrl) {\n configuration.proxyUrl = configuration.proxy\n }\n\n delete configuration.proxy\n }\n\n if (configuration.proxyUrl === OLD_PROXY_URL) {\n console.warn(`[DEPRECATED] Warning: configuration.proxyUrl points to our old proxy (${OLD_PROXY_URL}).`)\n console.warn(`[DEPRECATED] We are overwriting the value and use the new proxy URL (${NEW_PROXY_URL}) instead.`)\n console.warn(\n `[DEPRECATED] Action Required: You should manually update your configuration to use the new URL (${NEW_PROXY_URL}). Read more: https://github.com/scalar/scalar`,\n )\n\n configuration.proxyUrl = NEW_PROXY_URL\n }\n\n return configuration\n}\n\n/** Configuration for the Api Reference */\nexport const apiReferenceConfigurationSchema = _apiReferenceConfigurationSchema.transform(migrateConfiguration)\n\n/** Configuration after parsing, this is the main type */\nexport type ApiReferenceConfiguration = Omit<\n z.infer<typeof _apiReferenceConfigurationSchema>,\n // Remove deprecated attributes\n 'proxy' | 'spec' | 'authentication'\n> & {\n authentication?: AuthenticationConfiguration\n}\n\n/** Api Config which includes the default config */\ntype ApiReferenceConfigurationWithDefault = ApiReferenceConfiguration & {\n /** Whether to use this config as the default one */\n default?: boolean\n}\n\n/** Configuration for a single config with sources */\nexport type ApiReferenceConfigurationWithSources = Omit<ApiReferenceConfigurationWithDefault, 'default'> & {\n sources: (SpecConfiguration & { default?: boolean })[]\n}\n\n/** Configuration for multiple Api References */\nexport type AnyApiReferenceConfiguration =\n | Partial<ApiReferenceConfiguration>\n | Partial<ApiReferenceConfigurationWithSources>\n | Partial<ApiReferenceConfigurationWithDefault>[]\n | Partial<ApiReferenceConfigurationWithSources>[]\n\n/** Typeguard to check to narrow the configs to the one with sources */\nexport const isConfigurationWithSources = (\n config: AnyApiReferenceConfiguration,\n): config is Partial<ApiReferenceConfigurationWithSources> =>\n Boolean(!Array.isArray(config) && config && 'sources' in config && Array.isArray(config.sources))\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,SAAS;AAElB,SAAS,6BAA6B;AAEtC,SAAS,gCAAgC;AAIzC,MAAM,cAAc,EAAE,KAAK;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAGD,MAAM,mBAAmB,EAAE,KAAK;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAGD,MAAM,kBAAkB,EACrB,KAAK;AAAA,EACJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,EACA,SAAS;AAGL,MAAM,0BAA0B,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmB9C,KAAK,EAAE,OAAO,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AEA,MAAM,gBAAgB;AACtB,MAAM,gBAAgB;AAGtB,MAAM,uBAAuB,CAA6D,mBAAyB;AACjH,QAAM,gBAAgB,EAAE,GAAG,eAAe;AAG1C,MAAI,cAAc,oBAAoB;AACpC,YAAQ;AAAA,MACN;AAAA,IACF;AAEA,kBAAc,uBAAuB;AAAA,EACvC;AAGA,MAAI,cAAc,MAAM,KAAK;AAC3B,YAAQ;AAAA,MACN;AAAA,IACF;AAEA,kBAAc,MAAM,cAAc,KAAK;AACvC,WAAO,cAAc;AAAA,EACvB;AAEA,MAAI,cAAc,MAAM,SAAS;AAC/B,YAAQ;AAAA,MACN;AAAA,IACF;AAEA,kBAAc,UAAU,cAAc,KAAK;AAC3C,WAAO,cAAc;AAAA,EACvB;AAGA,MAAI,cAAc,OAAO;AACvB,YAAQ;AAAA,MACN;AAAA,IACF;AAEA,QAAI,CAAC,cAAc,UAAU;AAC3B,oBAAc,WAAW,cAAc;AAAA,IACzC;AAEA,WAAO,cAAc;AAAA,EACvB;AAEA,MAAI,cAAc,aAAa,eAAe;AAC5C,YAAQ,KAAK,yEAAyE,aAAa,IAAI;AACvG,YAAQ,KAAK,wEAAwE,aAAa,YAAY;AAC9G,YAAQ;AAAA,MACN,mGAAmG,aAAa;AAAA,IAClH;AAEA,kBAAc,WAAW;AAAA,EAC3B;AAEA,SAAO;AACT;AAGO,MAAM,kCAAkC,iCAAiC,UAAU,oBAAoB;AA8BvG,MAAM,6BAA6B,CACxC,WAEA,QAAQ,CAAC,MAAM,QAAQ,MAAM,KAAK,UAAU,aAAa,UAAU,MAAM,QAAQ,OAAO,OAAO,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -193,6 +193,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
193
193
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
194
194
|
username: z.ZodDefault<z.ZodString>;
|
|
195
195
|
password: z.ZodDefault<z.ZodString>;
|
|
196
|
+
'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
|
|
196
197
|
}>, "strip", z.ZodTypeAny, {
|
|
197
198
|
type: "password";
|
|
198
199
|
username: string;
|
|
@@ -207,6 +208,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
207
208
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
208
209
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
209
210
|
'x-tokenName'?: string | undefined;
|
|
211
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
210
212
|
}, {
|
|
211
213
|
type?: "password" | undefined;
|
|
212
214
|
username?: string | undefined;
|
|
@@ -221,6 +223,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
221
223
|
'x-tokenName'?: string | undefined;
|
|
222
224
|
tokenUrl?: string | undefined;
|
|
223
225
|
clientSecret?: string | undefined;
|
|
226
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
224
227
|
}>>;
|
|
225
228
|
clientCredentials: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
226
229
|
/**
|
|
@@ -248,6 +251,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
248
251
|
type: z.ZodDefault<z.ZodLiteral<"clientCredentials">>;
|
|
249
252
|
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
250
253
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
254
|
+
'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
|
|
251
255
|
}>, "strip", z.ZodTypeAny, {
|
|
252
256
|
type: "clientCredentials";
|
|
253
257
|
token: string;
|
|
@@ -260,6 +264,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
260
264
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
261
265
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
262
266
|
'x-tokenName'?: string | undefined;
|
|
267
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
263
268
|
}, {
|
|
264
269
|
type?: "clientCredentials" | undefined;
|
|
265
270
|
token?: string | undefined;
|
|
@@ -272,6 +277,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
272
277
|
'x-tokenName'?: string | undefined;
|
|
273
278
|
tokenUrl?: string | undefined;
|
|
274
279
|
clientSecret?: string | undefined;
|
|
280
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
275
281
|
}>>;
|
|
276
282
|
authorizationCode: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
277
283
|
/**
|
|
@@ -302,6 +308,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
302
308
|
'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
303
309
|
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
304
310
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
311
|
+
'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
|
|
305
312
|
}>, "strip", z.ZodTypeAny, {
|
|
306
313
|
type: "authorizationCode";
|
|
307
314
|
token: string;
|
|
@@ -317,6 +324,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
317
324
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
318
325
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
319
326
|
'x-tokenName'?: string | undefined;
|
|
327
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
320
328
|
}, {
|
|
321
329
|
type?: "authorizationCode" | undefined;
|
|
322
330
|
token?: string | undefined;
|
|
@@ -331,6 +339,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
331
339
|
'x-scalar-redirect-uri'?: string | undefined;
|
|
332
340
|
tokenUrl?: string | undefined;
|
|
333
341
|
clientSecret?: string | undefined;
|
|
342
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
334
343
|
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
335
344
|
}>>;
|
|
336
345
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -348,6 +357,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
348
357
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
349
358
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
350
359
|
'x-tokenName'?: string | undefined;
|
|
360
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
351
361
|
} | undefined;
|
|
352
362
|
implicit?: {
|
|
353
363
|
type: "implicit";
|
|
@@ -374,6 +384,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
374
384
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
375
385
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
376
386
|
'x-tokenName'?: string | undefined;
|
|
387
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
377
388
|
} | undefined;
|
|
378
389
|
authorizationCode?: {
|
|
379
390
|
type: "authorizationCode";
|
|
@@ -390,6 +401,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
390
401
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
391
402
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
392
403
|
'x-tokenName'?: string | undefined;
|
|
404
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
393
405
|
} | undefined;
|
|
394
406
|
}, {
|
|
395
407
|
password?: {
|
|
@@ -406,6 +418,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
406
418
|
'x-tokenName'?: string | undefined;
|
|
407
419
|
tokenUrl?: string | undefined;
|
|
408
420
|
clientSecret?: string | undefined;
|
|
421
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
409
422
|
} | undefined;
|
|
410
423
|
implicit?: {
|
|
411
424
|
type?: "implicit" | undefined;
|
|
@@ -432,6 +445,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
432
445
|
'x-tokenName'?: string | undefined;
|
|
433
446
|
tokenUrl?: string | undefined;
|
|
434
447
|
clientSecret?: string | undefined;
|
|
448
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
435
449
|
} | undefined;
|
|
436
450
|
authorizationCode?: {
|
|
437
451
|
type?: "authorizationCode" | undefined;
|
|
@@ -447,6 +461,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
447
461
|
'x-scalar-redirect-uri'?: string | undefined;
|
|
448
462
|
tokenUrl?: string | undefined;
|
|
449
463
|
clientSecret?: string | undefined;
|
|
464
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
450
465
|
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
451
466
|
} | undefined;
|
|
452
467
|
}>>;
|
|
@@ -473,6 +488,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
473
488
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
474
489
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
475
490
|
'x-tokenName'?: string | undefined;
|
|
491
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
476
492
|
} | undefined;
|
|
477
493
|
implicit?: {
|
|
478
494
|
type: "implicit";
|
|
@@ -499,6 +515,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
499
515
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
500
516
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
501
517
|
'x-tokenName'?: string | undefined;
|
|
518
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
502
519
|
} | undefined;
|
|
503
520
|
authorizationCode?: {
|
|
504
521
|
type: "authorizationCode";
|
|
@@ -515,6 +532,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
515
532
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
516
533
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
517
534
|
'x-tokenName'?: string | undefined;
|
|
535
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
518
536
|
} | undefined;
|
|
519
537
|
};
|
|
520
538
|
description?: string | undefined;
|
|
@@ -540,6 +558,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
540
558
|
'x-tokenName'?: string | undefined;
|
|
541
559
|
tokenUrl?: string | undefined;
|
|
542
560
|
clientSecret?: string | undefined;
|
|
561
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
543
562
|
} | undefined;
|
|
544
563
|
implicit?: {
|
|
545
564
|
type?: "implicit" | undefined;
|
|
@@ -566,6 +585,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
566
585
|
'x-tokenName'?: string | undefined;
|
|
567
586
|
tokenUrl?: string | undefined;
|
|
568
587
|
clientSecret?: string | undefined;
|
|
588
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
569
589
|
} | undefined;
|
|
570
590
|
authorizationCode?: {
|
|
571
591
|
type?: "authorizationCode" | undefined;
|
|
@@ -581,6 +601,7 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
581
601
|
'x-scalar-redirect-uri'?: string | undefined;
|
|
582
602
|
tokenUrl?: string | undefined;
|
|
583
603
|
clientSecret?: string | undefined;
|
|
604
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
584
605
|
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
585
606
|
} | undefined;
|
|
586
607
|
} | undefined;
|
|
@@ -732,6 +753,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
732
753
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
733
754
|
username: z.ZodDefault<z.ZodString>;
|
|
734
755
|
password: z.ZodDefault<z.ZodString>;
|
|
756
|
+
'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
|
|
735
757
|
}>, "strip", z.ZodTypeAny, {
|
|
736
758
|
type: "password";
|
|
737
759
|
username: string;
|
|
@@ -746,6 +768,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
746
768
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
747
769
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
748
770
|
'x-tokenName'?: string | undefined;
|
|
771
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
749
772
|
}, {
|
|
750
773
|
type?: "password" | undefined;
|
|
751
774
|
username?: string | undefined;
|
|
@@ -760,6 +783,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
760
783
|
'x-tokenName'?: string | undefined;
|
|
761
784
|
tokenUrl?: string | undefined;
|
|
762
785
|
clientSecret?: string | undefined;
|
|
786
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
763
787
|
}>>;
|
|
764
788
|
clientCredentials: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
765
789
|
/**
|
|
@@ -787,6 +811,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
787
811
|
type: z.ZodDefault<z.ZodLiteral<"clientCredentials">>;
|
|
788
812
|
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
789
813
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
814
|
+
'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
|
|
790
815
|
}>, "strip", z.ZodTypeAny, {
|
|
791
816
|
type: "clientCredentials";
|
|
792
817
|
token: string;
|
|
@@ -799,6 +824,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
799
824
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
800
825
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
801
826
|
'x-tokenName'?: string | undefined;
|
|
827
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
802
828
|
}, {
|
|
803
829
|
type?: "clientCredentials" | undefined;
|
|
804
830
|
token?: string | undefined;
|
|
@@ -811,6 +837,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
811
837
|
'x-tokenName'?: string | undefined;
|
|
812
838
|
tokenUrl?: string | undefined;
|
|
813
839
|
clientSecret?: string | undefined;
|
|
840
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
814
841
|
}>>;
|
|
815
842
|
authorizationCode: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
816
843
|
/**
|
|
@@ -841,6 +868,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
841
868
|
'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
842
869
|
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
843
870
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
871
|
+
'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
|
|
844
872
|
}>, "strip", z.ZodTypeAny, {
|
|
845
873
|
type: "authorizationCode";
|
|
846
874
|
token: string;
|
|
@@ -856,6 +884,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
856
884
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
857
885
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
858
886
|
'x-tokenName'?: string | undefined;
|
|
887
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
859
888
|
}, {
|
|
860
889
|
type?: "authorizationCode" | undefined;
|
|
861
890
|
token?: string | undefined;
|
|
@@ -870,6 +899,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
870
899
|
'x-scalar-redirect-uri'?: string | undefined;
|
|
871
900
|
tokenUrl?: string | undefined;
|
|
872
901
|
clientSecret?: string | undefined;
|
|
902
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
873
903
|
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
874
904
|
}>>;
|
|
875
905
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -887,6 +917,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
887
917
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
888
918
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
889
919
|
'x-tokenName'?: string | undefined;
|
|
920
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
890
921
|
} | undefined;
|
|
891
922
|
implicit?: {
|
|
892
923
|
type: "implicit";
|
|
@@ -913,6 +944,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
913
944
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
914
945
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
915
946
|
'x-tokenName'?: string | undefined;
|
|
947
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
916
948
|
} | undefined;
|
|
917
949
|
authorizationCode?: {
|
|
918
950
|
type: "authorizationCode";
|
|
@@ -929,6 +961,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
929
961
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
930
962
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
931
963
|
'x-tokenName'?: string | undefined;
|
|
964
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
932
965
|
} | undefined;
|
|
933
966
|
}, {
|
|
934
967
|
password?: {
|
|
@@ -945,6 +978,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
945
978
|
'x-tokenName'?: string | undefined;
|
|
946
979
|
tokenUrl?: string | undefined;
|
|
947
980
|
clientSecret?: string | undefined;
|
|
981
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
948
982
|
} | undefined;
|
|
949
983
|
implicit?: {
|
|
950
984
|
type?: "implicit" | undefined;
|
|
@@ -971,6 +1005,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
971
1005
|
'x-tokenName'?: string | undefined;
|
|
972
1006
|
tokenUrl?: string | undefined;
|
|
973
1007
|
clientSecret?: string | undefined;
|
|
1008
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
974
1009
|
} | undefined;
|
|
975
1010
|
authorizationCode?: {
|
|
976
1011
|
type?: "authorizationCode" | undefined;
|
|
@@ -986,6 +1021,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
986
1021
|
'x-scalar-redirect-uri'?: string | undefined;
|
|
987
1022
|
tokenUrl?: string | undefined;
|
|
988
1023
|
clientSecret?: string | undefined;
|
|
1024
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
989
1025
|
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
990
1026
|
} | undefined;
|
|
991
1027
|
}>>;
|
|
@@ -1006,6 +1042,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
1006
1042
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1007
1043
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1008
1044
|
'x-tokenName'?: string | undefined;
|
|
1045
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1009
1046
|
} | undefined;
|
|
1010
1047
|
implicit?: {
|
|
1011
1048
|
type: "implicit";
|
|
@@ -1032,6 +1069,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
1032
1069
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1033
1070
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1034
1071
|
'x-tokenName'?: string | undefined;
|
|
1072
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1035
1073
|
} | undefined;
|
|
1036
1074
|
authorizationCode?: {
|
|
1037
1075
|
type: "authorizationCode";
|
|
@@ -1048,6 +1086,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
1048
1086
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1049
1087
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1050
1088
|
'x-tokenName'?: string | undefined;
|
|
1089
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1051
1090
|
} | undefined;
|
|
1052
1091
|
};
|
|
1053
1092
|
description?: string | undefined;
|
|
@@ -1071,6 +1110,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
1071
1110
|
'x-tokenName'?: string | undefined;
|
|
1072
1111
|
tokenUrl?: string | undefined;
|
|
1073
1112
|
clientSecret?: string | undefined;
|
|
1113
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1074
1114
|
} | undefined;
|
|
1075
1115
|
implicit?: {
|
|
1076
1116
|
type?: "implicit" | undefined;
|
|
@@ -1097,6 +1137,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
1097
1137
|
'x-tokenName'?: string | undefined;
|
|
1098
1138
|
tokenUrl?: string | undefined;
|
|
1099
1139
|
clientSecret?: string | undefined;
|
|
1140
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1100
1141
|
} | undefined;
|
|
1101
1142
|
authorizationCode?: {
|
|
1102
1143
|
type?: "authorizationCode" | undefined;
|
|
@@ -1112,6 +1153,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
1112
1153
|
'x-scalar-redirect-uri'?: string | undefined;
|
|
1113
1154
|
tokenUrl?: string | undefined;
|
|
1114
1155
|
clientSecret?: string | undefined;
|
|
1156
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1115
1157
|
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
1116
1158
|
} | undefined;
|
|
1117
1159
|
} | undefined;
|
|
@@ -1319,6 +1361,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1319
1361
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
1320
1362
|
username: z.ZodDefault<z.ZodString>;
|
|
1321
1363
|
password: z.ZodDefault<z.ZodString>;
|
|
1364
|
+
'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
|
|
1322
1365
|
}>, "strip", z.ZodTypeAny, {
|
|
1323
1366
|
type: "password";
|
|
1324
1367
|
username: string;
|
|
@@ -1333,6 +1376,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1333
1376
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1334
1377
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1335
1378
|
'x-tokenName'?: string | undefined;
|
|
1379
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1336
1380
|
}, {
|
|
1337
1381
|
type?: "password" | undefined;
|
|
1338
1382
|
username?: string | undefined;
|
|
@@ -1347,6 +1391,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1347
1391
|
'x-tokenName'?: string | undefined;
|
|
1348
1392
|
tokenUrl?: string | undefined;
|
|
1349
1393
|
clientSecret?: string | undefined;
|
|
1394
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1350
1395
|
}>>;
|
|
1351
1396
|
clientCredentials: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
1352
1397
|
/**
|
|
@@ -1374,6 +1419,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1374
1419
|
type: z.ZodDefault<z.ZodLiteral<"clientCredentials">>;
|
|
1375
1420
|
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
1376
1421
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
1422
|
+
'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
|
|
1377
1423
|
}>, "strip", z.ZodTypeAny, {
|
|
1378
1424
|
type: "clientCredentials";
|
|
1379
1425
|
token: string;
|
|
@@ -1386,6 +1432,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1386
1432
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1387
1433
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1388
1434
|
'x-tokenName'?: string | undefined;
|
|
1435
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1389
1436
|
}, {
|
|
1390
1437
|
type?: "clientCredentials" | undefined;
|
|
1391
1438
|
token?: string | undefined;
|
|
@@ -1398,6 +1445,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1398
1445
|
'x-tokenName'?: string | undefined;
|
|
1399
1446
|
tokenUrl?: string | undefined;
|
|
1400
1447
|
clientSecret?: string | undefined;
|
|
1448
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1401
1449
|
}>>;
|
|
1402
1450
|
authorizationCode: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
1403
1451
|
/**
|
|
@@ -1428,6 +1476,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1428
1476
|
'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1429
1477
|
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
1430
1478
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
1479
|
+
'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
|
|
1431
1480
|
}>, "strip", z.ZodTypeAny, {
|
|
1432
1481
|
type: "authorizationCode";
|
|
1433
1482
|
token: string;
|
|
@@ -1443,6 +1492,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1443
1492
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1444
1493
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1445
1494
|
'x-tokenName'?: string | undefined;
|
|
1495
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1446
1496
|
}, {
|
|
1447
1497
|
type?: "authorizationCode" | undefined;
|
|
1448
1498
|
token?: string | undefined;
|
|
@@ -1457,6 +1507,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1457
1507
|
'x-scalar-redirect-uri'?: string | undefined;
|
|
1458
1508
|
tokenUrl?: string | undefined;
|
|
1459
1509
|
clientSecret?: string | undefined;
|
|
1510
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1460
1511
|
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
1461
1512
|
}>>;
|
|
1462
1513
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1474,6 +1525,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1474
1525
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1475
1526
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1476
1527
|
'x-tokenName'?: string | undefined;
|
|
1528
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1477
1529
|
} | undefined;
|
|
1478
1530
|
implicit?: {
|
|
1479
1531
|
type: "implicit";
|
|
@@ -1500,6 +1552,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1500
1552
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1501
1553
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1502
1554
|
'x-tokenName'?: string | undefined;
|
|
1555
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1503
1556
|
} | undefined;
|
|
1504
1557
|
authorizationCode?: {
|
|
1505
1558
|
type: "authorizationCode";
|
|
@@ -1516,6 +1569,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1516
1569
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1517
1570
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1518
1571
|
'x-tokenName'?: string | undefined;
|
|
1572
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1519
1573
|
} | undefined;
|
|
1520
1574
|
}, {
|
|
1521
1575
|
password?: {
|
|
@@ -1532,6 +1586,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1532
1586
|
'x-tokenName'?: string | undefined;
|
|
1533
1587
|
tokenUrl?: string | undefined;
|
|
1534
1588
|
clientSecret?: string | undefined;
|
|
1589
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1535
1590
|
} | undefined;
|
|
1536
1591
|
implicit?: {
|
|
1537
1592
|
type?: "implicit" | undefined;
|
|
@@ -1558,6 +1613,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1558
1613
|
'x-tokenName'?: string | undefined;
|
|
1559
1614
|
tokenUrl?: string | undefined;
|
|
1560
1615
|
clientSecret?: string | undefined;
|
|
1616
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1561
1617
|
} | undefined;
|
|
1562
1618
|
authorizationCode?: {
|
|
1563
1619
|
type?: "authorizationCode" | undefined;
|
|
@@ -1573,6 +1629,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1573
1629
|
'x-scalar-redirect-uri'?: string | undefined;
|
|
1574
1630
|
tokenUrl?: string | undefined;
|
|
1575
1631
|
clientSecret?: string | undefined;
|
|
1632
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1576
1633
|
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
1577
1634
|
} | undefined;
|
|
1578
1635
|
}>>;
|
|
@@ -1599,6 +1656,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1599
1656
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1600
1657
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1601
1658
|
'x-tokenName'?: string | undefined;
|
|
1659
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1602
1660
|
} | undefined;
|
|
1603
1661
|
implicit?: {
|
|
1604
1662
|
type: "implicit";
|
|
@@ -1625,6 +1683,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1625
1683
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1626
1684
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1627
1685
|
'x-tokenName'?: string | undefined;
|
|
1686
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1628
1687
|
} | undefined;
|
|
1629
1688
|
authorizationCode?: {
|
|
1630
1689
|
type: "authorizationCode";
|
|
@@ -1641,6 +1700,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1641
1700
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1642
1701
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1643
1702
|
'x-tokenName'?: string | undefined;
|
|
1703
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1644
1704
|
} | undefined;
|
|
1645
1705
|
};
|
|
1646
1706
|
description?: string | undefined;
|
|
@@ -1666,6 +1726,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1666
1726
|
'x-tokenName'?: string | undefined;
|
|
1667
1727
|
tokenUrl?: string | undefined;
|
|
1668
1728
|
clientSecret?: string | undefined;
|
|
1729
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1669
1730
|
} | undefined;
|
|
1670
1731
|
implicit?: {
|
|
1671
1732
|
type?: "implicit" | undefined;
|
|
@@ -1692,6 +1753,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1692
1753
|
'x-tokenName'?: string | undefined;
|
|
1693
1754
|
tokenUrl?: string | undefined;
|
|
1694
1755
|
clientSecret?: string | undefined;
|
|
1756
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1695
1757
|
} | undefined;
|
|
1696
1758
|
authorizationCode?: {
|
|
1697
1759
|
type?: "authorizationCode" | undefined;
|
|
@@ -1707,6 +1769,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1707
1769
|
'x-scalar-redirect-uri'?: string | undefined;
|
|
1708
1770
|
tokenUrl?: string | undefined;
|
|
1709
1771
|
clientSecret?: string | undefined;
|
|
1772
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1710
1773
|
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
1711
1774
|
} | undefined;
|
|
1712
1775
|
} | undefined;
|
|
@@ -1753,6 +1816,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1753
1816
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1754
1817
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1755
1818
|
'x-tokenName'?: string | undefined;
|
|
1819
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1756
1820
|
} | undefined;
|
|
1757
1821
|
implicit?: {
|
|
1758
1822
|
type: "implicit";
|
|
@@ -1779,6 +1843,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1779
1843
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1780
1844
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1781
1845
|
'x-tokenName'?: string | undefined;
|
|
1846
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1782
1847
|
} | undefined;
|
|
1783
1848
|
authorizationCode?: {
|
|
1784
1849
|
type: "authorizationCode";
|
|
@@ -1795,6 +1860,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1795
1860
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
1796
1861
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
1797
1862
|
'x-tokenName'?: string | undefined;
|
|
1863
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1798
1864
|
} | undefined;
|
|
1799
1865
|
};
|
|
1800
1866
|
description?: string | undefined;
|
|
@@ -1844,6 +1910,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1844
1910
|
'x-tokenName'?: string | undefined;
|
|
1845
1911
|
tokenUrl?: string | undefined;
|
|
1846
1912
|
clientSecret?: string | undefined;
|
|
1913
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1847
1914
|
} | undefined;
|
|
1848
1915
|
implicit?: {
|
|
1849
1916
|
type?: "implicit" | undefined;
|
|
@@ -1870,6 +1937,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1870
1937
|
'x-tokenName'?: string | undefined;
|
|
1871
1938
|
tokenUrl?: string | undefined;
|
|
1872
1939
|
clientSecret?: string | undefined;
|
|
1940
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1873
1941
|
} | undefined;
|
|
1874
1942
|
authorizationCode?: {
|
|
1875
1943
|
type?: "authorizationCode" | undefined;
|
|
@@ -1885,6 +1953,7 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
1885
1953
|
'x-scalar-redirect-uri'?: string | undefined;
|
|
1886
1954
|
tokenUrl?: string | undefined;
|
|
1887
1955
|
clientSecret?: string | undefined;
|
|
1956
|
+
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
1888
1957
|
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
1889
1958
|
} | undefined;
|
|
1890
1959
|
} | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"security-scheme.d.ts","sourceRoot":"","sources":["../../src/entities/security-scheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAsBvB,eAAO,MAAM,sBAAsB,wCAAyC,CAAA;AAc5E,eAAO,MAAM,oBAAoB;;;;IAV/B,8EAA8E;;IAE9E,6FAA6F;;;;IAb7F,0EAA0E;;;;;;;;;;;;;;;;;;;;EAqBsC,CAAA;AAClH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAkCvE,eAAO,MAAM,kBAAkB;;;;IA3B7B;;;OAGG;;IAOH;;;;OAIG;;;;IA3CH,0EAA0E;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDgC,CAAA;AAC5G,MAAM,MAAM,kBAAkB,GAAG,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA5G1F,0EAA0E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2NxE,CAAA;AAEJ;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AACjE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA"}
|
|
@@ -77,6 +77,7 @@ const flowsCommon = z.object({
|
|
|
77
77
|
});
|
|
78
78
|
const defaultRedirectUri = typeof window !== "undefined" ? window.location.origin + window.location.pathname : "";
|
|
79
79
|
const pkceOptions = ["SHA-256", "plain", "no"];
|
|
80
|
+
const credentialsLocationExtension = z.enum(["header", "body"]).optional();
|
|
80
81
|
const oasSecuritySchemeOauth2 = commonProps.extend({
|
|
81
82
|
type: z.literal("oauth2"),
|
|
82
83
|
/** The default scopes for the oauth flow */
|
|
@@ -95,13 +96,15 @@ const oasSecuritySchemeOauth2 = commonProps.extend({
|
|
|
95
96
|
tokenUrl,
|
|
96
97
|
clientSecret: z.string().default(""),
|
|
97
98
|
username: z.string().default(""),
|
|
98
|
-
password: z.string().default("")
|
|
99
|
+
password: z.string().default(""),
|
|
100
|
+
"x-scalar-credentials-location": credentialsLocationExtension
|
|
99
101
|
}),
|
|
100
102
|
/** Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0. */
|
|
101
103
|
clientCredentials: flowsCommon.extend({
|
|
102
104
|
type: z.literal("clientCredentials").default("clientCredentials"),
|
|
103
105
|
tokenUrl,
|
|
104
|
-
clientSecret: z.string().default("")
|
|
106
|
+
clientSecret: z.string().default(""),
|
|
107
|
+
"x-scalar-credentials-location": credentialsLocationExtension
|
|
105
108
|
}),
|
|
106
109
|
/** Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0.*/
|
|
107
110
|
authorizationCode: flowsCommon.extend({
|
|
@@ -110,7 +113,8 @@ const oasSecuritySchemeOauth2 = commonProps.extend({
|
|
|
110
113
|
"x-usePkce": z.enum(pkceOptions).optional().default("no"),
|
|
111
114
|
"x-scalar-redirect-uri": z.string().optional().default(defaultRedirectUri),
|
|
112
115
|
tokenUrl,
|
|
113
|
-
|
|
116
|
+
clientSecret: z.string().default(""),
|
|
117
|
+
"x-scalar-credentials-location": credentialsLocationExtension
|
|
114
118
|
})
|
|
115
119
|
}).partial().default({
|
|
116
120
|
implicit: { type: "implicit", authorizationUrl: "http://localhost:8080" }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/entities/security-scheme.ts"],
|
|
4
|
-
"sourcesContent": ["import { z } from 'zod'\n\nimport { type ENTITY_BRANDS, nanoidSchema } from '../utils/nanoid'\n\n// ---------------------------------------------------------------------------\n// COMMON PROPS FOR ALL SECURITY SCHEMES\n\n/** Some common properties used in all security schemes */\nconst commonProps = z.object({\n /* A description for security scheme. CommonMark syntax MAY be used for rich text representation. */\n description: z.string().optional(),\n})\n\nconst extendedSecuritySchema = z.object({\n uid: nanoidSchema.brand<ENTITY_BRANDS['SECURITY_SCHEME']>(),\n /** The name key that links a security requirement to a security object */\n nameKey: z.string().optional().default(''),\n})\n\n// ---------------------------------------------------------------------------\n// API KEY\n\nexport const securitySchemeApiKeyIn = ['query', 'header', 'cookie'] as const\n\nconst oasSecuritySchemeApiKey = commonProps.extend({\n type: z.literal('apiKey'),\n /** REQUIRED. The name of the header, query or cookie parameter to be used. */\n name: z.string().optional().default(''),\n /** REQUIRED. The location of the API key. Valid values are \"query\", \"header\" or \"cookie\". */\n in: z.enum(securitySchemeApiKeyIn).optional().default('header').catch('header'),\n})\n\nconst apiKeyValueSchema = z.object({\n value: z.string().default(''),\n})\n\nexport const securityApiKeySchema = oasSecuritySchemeApiKey.merge(extendedSecuritySchema).merge(apiKeyValueSchema)\nexport type SecuritySchemeApiKey = z.infer<typeof securityApiKeySchema>\n\n// ---------------------------------------------------------------------------\n// HTTP\n\nconst oasSecuritySchemeHttp = commonProps.extend({\n type: z.literal('http'),\n /**\n * REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in\n * [RFC7235]. The values used SHOULD be registered in the IANA Authentication Scheme registry.\n */\n scheme: z\n .string()\n .toLowerCase()\n .pipe(z.enum(['basic', 'bearer']))\n .optional()\n .default('basic'),\n /**\n * A hint to the client to identify how the bearer token is formatted.\n * Bearer tokens are usually generated by an authorization server, so\n * this information is primarily for documentation purposes.\n */\n bearerFormat: z\n .union([z.literal('JWT'), z.string()])\n .optional()\n .default('JWT'),\n})\n\nconst httpValueSchema = z.object({\n username: z.string().default(''),\n password: z.string().default(''),\n token: z.string().default(''),\n})\n\nexport const securityHttpSchema = oasSecuritySchemeHttp.merge(extendedSecuritySchema).merge(httpValueSchema)\nexport type SecuritySchemaHttp = z.infer<typeof securityHttpSchema>\n\n// ---------------------------------------------------------------------------\n// OPENID CONNECT\nconst oasSecuritySchemeOpenId = commonProps.extend({\n type: z.literal('openIdConnect'),\n /**\n * REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the\n * form of a URL. The OpenID Connect standard requires the use of TLS.\n */\n openIdConnectUrl: z.string().optional().default(''),\n})\n\nexport const securityOpenIdSchema = oasSecuritySchemeOpenId.merge(extendedSecuritySchema)\nexport type SecuritySchemaOpenId = z.infer<typeof securityOpenIdSchema>\n\n// ---------------------------------------------------------------------------\n\n/**\n * REQUIRED. The authorization URL to be used for this flow. This MUST be in\n * the form of a URL. The OAuth2 standard requires the use of TLS.\n */\nconst authorizationUrl = z.string().default('')\n\n/**\n * REQUIRED. The token URL to be used for this flow. This MUST be in the\n * form of a URL. The OAuth2 standard requires the use of TLS.\n */\nconst tokenUrl = z.string().default('')\n\n/** Common properties used across all oauth2 flows */\nconst flowsCommon = z.object({\n /**\n * The URL to be used for obtaining refresh tokens. This MUST be in the form of a\n * URL. The OAuth2 standard requires the use of TLS.\n */\n 'refreshUrl': z.string().optional().default(''),\n /**\n * REQUIRED. The available scopes for the OAuth2 security scheme. A map\n * between the scope name and a short description for it. The map MAY be empty.\n */\n 'scopes': z.record(z.string(), z.string().optional().default('')).optional().default({}).catch({}),\n 'selectedScopes': z.array(z.string()).optional().default([]),\n /** Extension to save the client Id associated with an oauth flow */\n 'x-scalar-client-id': z.string().optional().default(''),\n /** The auth token */\n 'token': z.string().default(''),\n /** Additional query parameters for the OAuth authorization request. Example: { prompt: 'consent', audience: 'scalar' }. */\n 'x-scalar-security-query': z.record(z.string(), z.string()).optional(),\n /** Additional body parameters for the OAuth token request. Example: { audience: 'foo' }. */\n 'x-scalar-security-body': z.record(z.string(), z.string()).optional(),\n /** Extension to specify custom token name in the response (defaults to 'access_token') */\n 'x-tokenName': z.string().optional(),\n})\n\n/** Setup a default redirect uri if we can */\nconst defaultRedirectUri = typeof window !== 'undefined' ? window.location.origin + window.location.pathname : ''\n\n/** Options for the x-usePkce extension */\nexport const pkceOptions = ['SHA-256', 'plain', 'no'] as const\n\n/** Oauth2 security scheme */\nconst oasSecuritySchemeOauth2 = commonProps.extend({\n type: z.literal('oauth2'),\n /** The default scopes for the oauth flow */\n 'x-default-scopes': z.string().or(z.array(z.string())).optional(),\n /** REQUIRED. An object containing configuration information for the flow types supported. */\n flows: z\n .object({\n /** Configuration for the OAuth Implicit flow */\n implicit: flowsCommon.extend({\n 'type': z.literal('implicit').default('implicit'),\n authorizationUrl,\n 'x-scalar-redirect-uri': z.string().optional().default(defaultRedirectUri),\n }),\n /** Configuration for the OAuth Resource Owner Password flow */\n password: flowsCommon.extend({\n type: z.literal('password').default('password'),\n tokenUrl,\n clientSecret: z.string().default(''),\n username: z.string().default(''),\n password: z.string().default(''),\n }),\n /** Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0. */\n clientCredentials: flowsCommon.extend({\n type: z.literal('clientCredentials').default('clientCredentials'),\n tokenUrl,\n clientSecret: z.string().default(''),\n }),\n /** Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0.*/\n authorizationCode: flowsCommon.extend({\n 'type': z.literal('authorizationCode').default('authorizationCode'),\n authorizationUrl,\n 'x-usePkce': z.enum(pkceOptions).optional().default('no'),\n 'x-scalar-redirect-uri': z.string().optional().default(defaultRedirectUri),\n tokenUrl,\n 'clientSecret': z.string().default(''),\n }),\n })\n .partial()\n .default({\n implicit: { type: 'implicit', authorizationUrl: 'http://localhost:8080' },\n }),\n})\n\nexport const securityOauthSchema = oasSecuritySchemeOauth2.merge(extendedSecuritySchema)\n\nexport type SecuritySchemeOauth2 = z.infer<typeof securityOauthSchema>\nexport type SecuritySchemeOauth2Payload = z.input<typeof securityOauthSchema>\nexport type Oauth2Flow = NonNullable<\n SecuritySchemeOauth2['flows']['authorizationCode' | 'clientCredentials' | 'implicit' | 'password']\n>\n/** Payload for the oauth 2 flows + extensions */\nexport type Oauth2FlowPayload = NonNullable<SecuritySchemeOauth2Payload['flows']>[\n | 'authorizationCode'\n | 'clientCredentials'\n | 'implicit'\n | 'password'] &\n Record<`x-${string}`, string>\n\n// ---------------------------------------------------------------------------\n// Final Types\n\n/**\n * Security Requirement\n * Lists the required security schemes to execute this operation OR the whole collection/spec.\n * The name used for each property MUST correspond to a security scheme declared in the Security\n * Schemes under the Components Object.\n *\n * The key (name) here will be matched to the key of the securityScheme for linking\n *\n * @see https://spec.openapis.org/oas/latest.html#security-requirement-object\n */\nexport const oasSecurityRequirementSchema = z.record(z.string(), z.array(z.string()).optional().default([]))\n\n/** OAS Compliant security schemes */\nexport const oasSecuritySchemeSchema = z.union([\n oasSecuritySchemeApiKey,\n oasSecuritySchemeHttp,\n oasSecuritySchemeOauth2,\n oasSecuritySchemeOpenId,\n])\n\n/** Extended security schemes for workspace usage */\nexport const securitySchemeSchema = z\n .discriminatedUnion('type', [securityApiKeySchema, securityHttpSchema, securityOpenIdSchema, securityOauthSchema])\n .transform((data) => {\n // Set selected scopes from x-default-scopes\n if (data.type === 'oauth2' && data['x-default-scopes']?.length) {\n const keys = Object.keys(data.flows) as Array<keyof typeof data.flows>\n keys.forEach((key) => {\n if (data.flows[key]?.selectedScopes && data['x-default-scopes']) {\n data.flows[key].selectedScopes = [data['x-default-scopes']].flat()\n }\n })\n }\n return data\n })\n\n/**\n * Security Scheme Object\n *\n * @see https://spec.openapis.org/oas/latest.html#security-scheme-object\n */\nexport type SecurityScheme = z.infer<typeof securitySchemeSchema>\nexport type SecuritySchemePayload = z.input<typeof securitySchemeSchema>\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,SAAS;AAElB,SAA6B,oBAAoB;AAMjD,MAAM,cAAc,EAAE,OAAO;AAAA;AAAA,EAE3B,aAAa,EAAE,OAAO,EAAE,SAAS;AACnC,CAAC;AAED,MAAM,yBAAyB,EAAE,OAAO;AAAA,EACtC,KAAK,aAAa,MAAwC;AAAA;AAAA,EAE1D,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE;AAC3C,CAAC;AAKM,MAAM,yBAAyB,CAAC,SAAS,UAAU,QAAQ;AAElE,MAAM,0BAA0B,YAAY,OAAO;AAAA,EACjD,MAAM,EAAE,QAAQ,QAAQ;AAAA;AAAA,EAExB,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE;AAAA;AAAA,EAEtC,IAAI,EAAE,KAAK,sBAAsB,E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AAAA,EAK3B,cAAc,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA,EAK9C,UAAU,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AAAA,EACjG,kBAAkB,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;AAAA;AAAA,EAE3D,sBAAsB,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE;AAAA;AAAA,EAEtD,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE;AAAA;AAAA,EAE9B,2BAA2B,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,EAAE,SAAS;AAAA;AAAA,EAErE,0BAA0B,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,EAAE,SAAS;AAAA;AAAA,EAEpE,eAAe,EAAE,OAAO,EAAE,SAAS;AACrC,CAAC;AAGD,MAAM,qBAAqB,OAAO,WAAW,cAAc,OAAO,SAAS,SAAS,OAAO,SAAS,WAAW;AAGxG,MAAM,cAAc,CAAC,WAAW,SAAS,IAAI;
|
|
4
|
+
"sourcesContent": ["import { z } from 'zod'\n\nimport { type ENTITY_BRANDS, nanoidSchema } from '../utils/nanoid'\n\n// ---------------------------------------------------------------------------\n// COMMON PROPS FOR ALL SECURITY SCHEMES\n\n/** Some common properties used in all security schemes */\nconst commonProps = z.object({\n /* A description for security scheme. CommonMark syntax MAY be used for rich text representation. */\n description: z.string().optional(),\n})\n\nconst extendedSecuritySchema = z.object({\n uid: nanoidSchema.brand<ENTITY_BRANDS['SECURITY_SCHEME']>(),\n /** The name key that links a security requirement to a security object */\n nameKey: z.string().optional().default(''),\n})\n\n// ---------------------------------------------------------------------------\n// API KEY\n\nexport const securitySchemeApiKeyIn = ['query', 'header', 'cookie'] as const\n\nconst oasSecuritySchemeApiKey = commonProps.extend({\n type: z.literal('apiKey'),\n /** REQUIRED. The name of the header, query or cookie parameter to be used. */\n name: z.string().optional().default(''),\n /** REQUIRED. The location of the API key. Valid values are \"query\", \"header\" or \"cookie\". */\n in: z.enum(securitySchemeApiKeyIn).optional().default('header').catch('header'),\n})\n\nconst apiKeyValueSchema = z.object({\n value: z.string().default(''),\n})\n\nexport const securityApiKeySchema = oasSecuritySchemeApiKey.merge(extendedSecuritySchema).merge(apiKeyValueSchema)\nexport type SecuritySchemeApiKey = z.infer<typeof securityApiKeySchema>\n\n// ---------------------------------------------------------------------------\n// HTTP\n\nconst oasSecuritySchemeHttp = commonProps.extend({\n type: z.literal('http'),\n /**\n * REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in\n * [RFC7235]. The values used SHOULD be registered in the IANA Authentication Scheme registry.\n */\n scheme: z\n .string()\n .toLowerCase()\n .pipe(z.enum(['basic', 'bearer']))\n .optional()\n .default('basic'),\n /**\n * A hint to the client to identify how the bearer token is formatted.\n * Bearer tokens are usually generated by an authorization server, so\n * this information is primarily for documentation purposes.\n */\n bearerFormat: z\n .union([z.literal('JWT'), z.string()])\n .optional()\n .default('JWT'),\n})\n\nconst httpValueSchema = z.object({\n username: z.string().default(''),\n password: z.string().default(''),\n token: z.string().default(''),\n})\n\nexport const securityHttpSchema = oasSecuritySchemeHttp.merge(extendedSecuritySchema).merge(httpValueSchema)\nexport type SecuritySchemaHttp = z.infer<typeof securityHttpSchema>\n\n// ---------------------------------------------------------------------------\n// OPENID CONNECT\nconst oasSecuritySchemeOpenId = commonProps.extend({\n type: z.literal('openIdConnect'),\n /**\n * REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the\n * form of a URL. The OpenID Connect standard requires the use of TLS.\n */\n openIdConnectUrl: z.string().optional().default(''),\n})\n\nexport const securityOpenIdSchema = oasSecuritySchemeOpenId.merge(extendedSecuritySchema)\nexport type SecuritySchemaOpenId = z.infer<typeof securityOpenIdSchema>\n\n// ---------------------------------------------------------------------------\n\n/**\n * REQUIRED. The authorization URL to be used for this flow. This MUST be in\n * the form of a URL. The OAuth2 standard requires the use of TLS.\n */\nconst authorizationUrl = z.string().default('')\n\n/**\n * REQUIRED. The token URL to be used for this flow. This MUST be in the\n * form of a URL. The OAuth2 standard requires the use of TLS.\n */\nconst tokenUrl = z.string().default('')\n\n/** Common properties used across all oauth2 flows */\nconst flowsCommon = z.object({\n /**\n * The URL to be used for obtaining refresh tokens. This MUST be in the form of a\n * URL. The OAuth2 standard requires the use of TLS.\n */\n 'refreshUrl': z.string().optional().default(''),\n /**\n * REQUIRED. The available scopes for the OAuth2 security scheme. A map\n * between the scope name and a short description for it. The map MAY be empty.\n */\n 'scopes': z.record(z.string(), z.string().optional().default('')).optional().default({}).catch({}),\n 'selectedScopes': z.array(z.string()).optional().default([]),\n /** Extension to save the client Id associated with an oauth flow */\n 'x-scalar-client-id': z.string().optional().default(''),\n /** The auth token */\n 'token': z.string().default(''),\n /** Additional query parameters for the OAuth authorization request. Example: { prompt: 'consent', audience: 'scalar' }. */\n 'x-scalar-security-query': z.record(z.string(), z.string()).optional(),\n /** Additional body parameters for the OAuth token request. Example: { audience: 'foo' }. */\n 'x-scalar-security-body': z.record(z.string(), z.string()).optional(),\n /** Extension to specify custom token name in the response (defaults to 'access_token') */\n 'x-tokenName': z.string().optional(),\n})\n\n/** Setup a default redirect uri if we can */\nconst defaultRedirectUri = typeof window !== 'undefined' ? window.location.origin + window.location.pathname : ''\n\n/** Options for the x-usePkce extension */\nexport const pkceOptions = ['SHA-256', 'plain', 'no'] as const\n\nconst credentialsLocationExtension = z.enum(['header', 'body']).optional()\n\n/** Oauth2 security scheme */\nconst oasSecuritySchemeOauth2 = commonProps.extend({\n type: z.literal('oauth2'),\n /** The default scopes for the oauth flow */\n 'x-default-scopes': z.string().or(z.array(z.string())).optional(),\n /** REQUIRED. An object containing configuration information for the flow types supported. */\n flows: z\n .object({\n /** Configuration for the OAuth Implicit flow */\n implicit: flowsCommon.extend({\n 'type': z.literal('implicit').default('implicit'),\n authorizationUrl,\n 'x-scalar-redirect-uri': z.string().optional().default(defaultRedirectUri),\n }),\n /** Configuration for the OAuth Resource Owner Password flow */\n password: flowsCommon.extend({\n type: z.literal('password').default('password'),\n tokenUrl,\n clientSecret: z.string().default(''),\n username: z.string().default(''),\n password: z.string().default(''),\n 'x-scalar-credentials-location': credentialsLocationExtension,\n }),\n /** Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0. */\n clientCredentials: flowsCommon.extend({\n type: z.literal('clientCredentials').default('clientCredentials'),\n tokenUrl,\n clientSecret: z.string().default(''),\n 'x-scalar-credentials-location': credentialsLocationExtension,\n }),\n /** Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0.*/\n authorizationCode: flowsCommon.extend({\n 'type': z.literal('authorizationCode').default('authorizationCode'),\n authorizationUrl,\n 'x-usePkce': z.enum(pkceOptions).optional().default('no'),\n 'x-scalar-redirect-uri': z.string().optional().default(defaultRedirectUri),\n tokenUrl,\n clientSecret: z.string().default(''),\n 'x-scalar-credentials-location': credentialsLocationExtension,\n }),\n })\n .partial()\n .default({\n implicit: { type: 'implicit', authorizationUrl: 'http://localhost:8080' },\n }),\n})\n\nexport const securityOauthSchema = oasSecuritySchemeOauth2.merge(extendedSecuritySchema)\n\nexport type SecuritySchemeOauth2 = z.infer<typeof securityOauthSchema>\nexport type SecuritySchemeOauth2Payload = z.input<typeof securityOauthSchema>\nexport type Oauth2Flow = NonNullable<\n SecuritySchemeOauth2['flows']['authorizationCode' | 'clientCredentials' | 'implicit' | 'password']\n>\n/** Payload for the oauth 2 flows + extensions */\nexport type Oauth2FlowPayload = NonNullable<SecuritySchemeOauth2Payload['flows']>[\n | 'authorizationCode'\n | 'clientCredentials'\n | 'implicit'\n | 'password'] &\n Record<`x-${string}`, string>\n\n// ---------------------------------------------------------------------------\n// Final Types\n\n/**\n * Security Requirement\n * Lists the required security schemes to execute this operation OR the whole collection/spec.\n * The name used for each property MUST correspond to a security scheme declared in the Security\n * Schemes under the Components Object.\n *\n * The key (name) here will be matched to the key of the securityScheme for linking\n *\n * @see https://spec.openapis.org/oas/latest.html#security-requirement-object\n */\nexport const oasSecurityRequirementSchema = z.record(z.string(), z.array(z.string()).optional().default([]))\n\n/** OAS Compliant security schemes */\nexport const oasSecuritySchemeSchema = z.union([\n oasSecuritySchemeApiKey,\n oasSecuritySchemeHttp,\n oasSecuritySchemeOauth2,\n oasSecuritySchemeOpenId,\n])\n\n/** Extended security schemes for workspace usage */\nexport const securitySchemeSchema = z\n .discriminatedUnion('type', [securityApiKeySchema, securityHttpSchema, securityOpenIdSchema, securityOauthSchema])\n .transform((data) => {\n // Set selected scopes from x-default-scopes\n if (data.type === 'oauth2' && data['x-default-scopes']?.length) {\n const keys = Object.keys(data.flows) as Array<keyof typeof data.flows>\n keys.forEach((key) => {\n if (data.flows[key]?.selectedScopes && data['x-default-scopes']) {\n data.flows[key].selectedScopes = [data['x-default-scopes']].flat()\n }\n })\n }\n return data\n })\n\n/**\n * Security Scheme Object\n *\n * @see https://spec.openapis.org/oas/latest.html#security-scheme-object\n */\nexport type SecurityScheme = z.infer<typeof securitySchemeSchema>\nexport type SecuritySchemePayload = z.input<typeof securitySchemeSchema>\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,SAAS;AAElB,SAA6B,oBAAoB;AAMjD,MAAM,cAAc,EAAE,OAAO;AAAA;AAAA,EAE3B,aAAa,EAAE,OAAO,EAAE,SAAS;AACnC,CAAC;AAED,MAAM,yBAAyB,EAAE,OAAO;AAAA,EACtC,KAAK,aAAa,MAAwC;AAAA;AAAA,EAE1D,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE;AAC3C,CAAC;AAKM,MAAM,yBAAyB,CAAC,SAAS,UAAU,QAAQ;AAElE,MAAM,0BAA0B,YAAY,OAAO;AAAA,EACjD,MAAM,EAAE,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AG,WAAW,CAAC,gBAAgB,CAAA;IACxE,UAAU,CAAC,EAAE,oBAAoB,EAAE,CAAA;IACnC,aAAa,CAAC,EAAE,WAAW,CAAA;IAC3B,SAAS,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;IACzC,SAAS,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;IAC3E,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAA;IAC1B,UAAU,CAAC,EAAE,SAAS,CAAC,yBAAyB,EAAE,CAAA;CACnD,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/legacy/reference-config.ts"],
|
|
4
|
-
"sourcesContent": ["import type { OpenAPI, OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types'\n\nimport type { ApiReferenceConfiguration } from '../api-reference/index'\nimport type { TargetId } from '../snippetz/index'\n\n/**\n * This re-export is needed due to a typescript issue\n * @see https://github.com/microsoft/TypeScript/issues/42873\n */\nexport type {\n OpenAPI,\n OpenAPIV2,\n OpenAPIV3,\n OpenAPIV3_1,\n} from '@scalar/openapi-types'\n\nexport type ClientInfo = {\n key: string\n title: string\n link: string\n description: string\n}\n\n/**\n * Alias for the OpenAPI 3.1 ServerObject type\n *\n * @deprecated Use OpenAPIV3_1.ServerObject instead\n */\nexport type Server = OpenAPIV3_1.ServerObject\n\nexport type TargetInfo = {\n key: TargetId\n title: string\n extname: `.${string}` | null\n default: string\n}\n\nexport type HiddenClients =\n // Just hide all\n | true\n // Exclude whole targets or just specific clients\n | Partial<Record<TargetInfo['key'], boolean | ClientInfo['key'][]>>\n // Backwards compatibility with the previous behavior ['fetch', 'xhr']\n | ClientInfo['key'][]\n\nexport type PathRouting = {\n basePath: string\n}\n\n/**\n * @deprecated Use ApiReferenceConfiguration instead\n *\n * @example import type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\n */\nexport type ReferenceConfiguration = Partial<ApiReferenceConfiguration>\n\nexport type BaseParameter = {\n name: string\n description?: string | null\n value: string | number | Record<string, any>\n required?: boolean\n enabled: boolean\n}\n\ntype OptionalCharset = string | null\n\nexport type ContentType =\n | `application/json${OptionalCharset}`\n | `application/xml${OptionalCharset}`\n | `text/plain${OptionalCharset}`\n | `text/html${OptionalCharset}`\n | `application/octet-stream${OptionalCharset}`\n | `application/x-www-form-urlencoded${OptionalCharset}`\n | `multipart/form-data${OptionalCharset}`\n | `*/*${OptionalCharset}`\n | `application/vnd.${string}+json${OptionalCharset}`\n\nexport type Cookie = {\n name: string\n value: string\n}\n\nexport type CustomRequestExample = {\n lang: string\n label: string\n source: string\n}\n\nexport type Header = {\n name: string\n value: string\n}\n\nexport enum XScalarStability {\n Deprecated = 'deprecated',\n Experimental = 'experimental',\n Stable = 'stable',\n}\n\nexport type Operation = {\n id: string\n httpVerb: OpenAPIV3_1.HttpMethods\n path: string\n name: string\n isWebhook: boolean\n description?: string\n information: OpenAPIV3_1.OperationObject\n servers?: OpenAPIV3_1.ServerObject[]\n pathParameters?: OpenAPIV3_1.ParameterObject[]\n}\n\n/**\n * @deprecated Use Parameter instead\n */\nexport type Parameters = Parameter\n\nexport type Parameter = {\n // Fixed Fields\n name: string\n in?: string\n description?: string\n required?: boolean\n deprecated?: boolean\n allowEmptyValue?: boolean\n // Other\n style?: 'form' | 'simple'\n explode?: boolean\n allowReserved?: boolean\n schema?: Schema\n example?: any\n examples?: Map<string, any>\n content?: RequestBodyMimeTypes\n headers?: { [key: string]: OpenAPI.HeaderObject }\n}\n\nexport type Query = {\n name: string\n value: string\n}\n\n// Create a mapped type to ensure keys are a subset of ContentType\nexport type RequestBodyMimeTypes = {\n [K in ContentType]?: {\n schema?: any\n example?: any\n examples?: any\n }\n}\n\nexport type RequestBody = {\n description?: string\n required?: boolean\n content?: RequestBodyMimeTypes\n}\n\nexport type Schema = {\n type: string\n name?: string\n example?: any\n default?: any\n format?: string\n description?: string\n properties?: Record<string, Schema>\n}\n\n/**\n * This is a very strange and custom way to represent the operation object.\n * It's the outcome of the `parse` helper.\n *\n * @deprecated This is evil. Stop using it. We'll transition to use the new store.\n */\nexport type TransformedOperation = Operation & {\n pathParameters?: Parameter[]\n}\n\nexport type CollapsedSidebarItems = Record<string, boolean>\n\nexport type AuthenticationState = {\n customSecurity?: boolean\n /** You can pre-select a single security scheme, multiple, or complex security using an array of arrays */\n preferredSecurityScheme?: string | (string | string[])[] | null\n securitySchemes?:\n | OpenAPIV2.SecurityDefinitionsObject\n | OpenAPIV3.ComponentsObject['securitySchemes']\n | OpenAPIV3_1.ComponentsObject['securitySchemes']\n http?: {\n basic?: {\n username?: string\n password?: string\n }\n bearer?: {\n token?: string\n }\n }\n apiKey?: {\n token?: string\n }\n oAuth2?: {\n clientId?: string\n scopes?: string[]\n accessToken?: string\n state?: string\n username?: string\n password?: string\n }\n}\n\nexport type Heading = {\n depth: number\n value: string\n slug?: string\n}\n\nexport type CodeBlockSSRKey = `components-scalar-code-block${number}`\nexport type DescriptionSectionSSRKey = `components-Content-Introduction-Description-sections${number}`\n\nexport type ScalarState = {\n 'hash'?: string\n 'useGlobalStore-authentication'?: AuthenticationState\n 'useSidebarContent-collapsedSidebarItems'?: CollapsedSidebarItems\n [key: CodeBlockSSRKey]: string\n [key: DescriptionSectionSSRKey]: {\n heading: Heading\n content: string\n }[]\n}\n\nexport type
|
|
4
|
+
"sourcesContent": ["import type { OpenAPI, OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types'\n\nimport type { ApiReferenceConfiguration } from '../api-reference/index'\nimport type { TargetId } from '../snippetz/index'\n\n/**\n * This re-export is needed due to a typescript issue\n * @see https://github.com/microsoft/TypeScript/issues/42873\n */\nexport type {\n OpenAPI,\n OpenAPIV2,\n OpenAPIV3,\n OpenAPIV3_1,\n} from '@scalar/openapi-types'\n\nexport type ClientInfo = {\n key: string\n title: string\n link: string\n description: string\n}\n\n/**\n * Alias for the OpenAPI 3.1 ServerObject type\n *\n * @deprecated Use OpenAPIV3_1.ServerObject instead\n */\nexport type Server = OpenAPIV3_1.ServerObject\n\nexport type TargetInfo = {\n key: TargetId\n title: string\n extname: `.${string}` | null\n default: string\n}\n\nexport type HiddenClients =\n // Just hide all\n | true\n // Exclude whole targets or just specific clients\n | Partial<Record<TargetInfo['key'], boolean | ClientInfo['key'][]>>\n // Backwards compatibility with the previous behavior ['fetch', 'xhr']\n | ClientInfo['key'][]\n\nexport type PathRouting = {\n basePath: string\n}\n\n/**\n * @deprecated Use ApiReferenceConfiguration instead\n *\n * @example import type { ApiReferenceConfiguration } from '@scalar/types/api-reference'\n */\nexport type ReferenceConfiguration = Partial<ApiReferenceConfiguration>\n\nexport type BaseParameter = {\n name: string\n description?: string | null\n value: string | number | Record<string, any>\n required?: boolean\n enabled: boolean\n}\n\ntype OptionalCharset = string | null\n\nexport type ContentType =\n | `application/json${OptionalCharset}`\n | `application/xml${OptionalCharset}`\n | `text/plain${OptionalCharset}`\n | `text/html${OptionalCharset}`\n | `application/octet-stream${OptionalCharset}`\n | `application/x-www-form-urlencoded${OptionalCharset}`\n | `multipart/form-data${OptionalCharset}`\n | `*/*${OptionalCharset}`\n | `application/vnd.${string}+json${OptionalCharset}`\n\nexport type Cookie = {\n name: string\n value: string\n}\n\nexport type CustomRequestExample = {\n lang: string\n label: string\n source: string\n}\n\nexport type Header = {\n name: string\n value: string\n}\n\nexport enum XScalarStability {\n Deprecated = 'deprecated',\n Experimental = 'experimental',\n Stable = 'stable',\n}\n\nexport type Operation = {\n id: string\n httpVerb: OpenAPIV3_1.HttpMethods\n path: string\n name: string\n isWebhook: boolean\n description?: string\n information: OpenAPIV3_1.OperationObject\n servers?: OpenAPIV3_1.ServerObject[]\n pathParameters?: OpenAPIV3_1.ParameterObject[]\n}\n\n/**\n * @deprecated Use Parameter instead\n */\nexport type Parameters = Parameter\n\nexport type Parameter = {\n // Fixed Fields\n name: string\n in?: string\n description?: string\n required?: boolean\n deprecated?: boolean\n allowEmptyValue?: boolean\n // Other\n style?: 'form' | 'simple'\n explode?: boolean\n allowReserved?: boolean\n schema?: Schema\n example?: any\n examples?: Map<string, any>\n content?: RequestBodyMimeTypes\n headers?: { [key: string]: OpenAPI.HeaderObject }\n}\n\nexport type Query = {\n name: string\n value: string\n}\n\n// Create a mapped type to ensure keys are a subset of ContentType\nexport type RequestBodyMimeTypes = {\n [K in ContentType]?: {\n schema?: any\n example?: any\n examples?: any\n }\n}\n\nexport type RequestBody = {\n description?: string\n required?: boolean\n content?: RequestBodyMimeTypes\n}\n\nexport type Schema = {\n type: string\n name?: string\n example?: any\n default?: any\n format?: string\n description?: string\n properties?: Record<string, Schema>\n}\n\n/**\n * This is a very strange and custom way to represent the operation object.\n * It's the outcome of the `parse` helper.\n *\n * @deprecated This is evil. Stop using it. We'll transition to use the new store.\n */\nexport type TransformedOperation = Operation & {\n pathParameters?: Parameter[]\n}\n\nexport type CollapsedSidebarItems = Record<string, boolean>\n\nexport type AuthenticationState = {\n customSecurity?: boolean\n /** You can pre-select a single security scheme, multiple, or complex security using an array of arrays */\n preferredSecurityScheme?: string | (string | string[])[] | null\n securitySchemes?:\n | OpenAPIV2.SecurityDefinitionsObject\n | OpenAPIV3.ComponentsObject['securitySchemes']\n | OpenAPIV3_1.ComponentsObject['securitySchemes']\n http?: {\n basic?: {\n username?: string\n password?: string\n }\n bearer?: {\n token?: string\n }\n }\n apiKey?: {\n token?: string\n }\n oAuth2?: {\n clientId?: string\n scopes?: string[]\n accessToken?: string\n state?: string\n username?: string\n password?: string\n }\n}\n\nexport type Heading = {\n depth: number\n value: string\n slug?: string\n}\n\nexport type CodeBlockSSRKey = `components-scalar-code-block${number}`\nexport type DescriptionSectionSSRKey = `components-Content-Introduction-Description-sections${number}`\n\nexport type ScalarState = {\n 'hash'?: string\n 'useGlobalStore-authentication'?: AuthenticationState\n 'useSidebarContent-collapsedSidebarItems'?: CollapsedSidebarItems\n [key: CodeBlockSSRKey]: string\n [key: DescriptionSectionSSRKey]: {\n heading: Heading\n content: string\n }[]\n}\n\nexport type Tag = {\n 'name': string\n 'description': string\n 'operations': TransformedOperation[]\n 'x-displayName'?: string\n 'externalDocs'?: OpenAPIV3_1.ExternalDocumentationObject\n}\n\nexport type TagGroup = {\n name: string\n tags: string[]\n}\n\nexport type Definitions = OpenAPIV2.DefinitionsObject\n\n/**\n * Webhook (after our super custom transformation process)\n *\n * @deprecated Let's get rid of those super custom transformed entities and use the store instead.\n */\nexport type Webhooks = Record<\n string,\n Record<\n OpenAPIV3_1.HttpMethods,\n TransformedOperation & {\n 'x-internal'?: boolean\n }\n >\n>\n\n/**\n * The native OpenAPI Webhook object, but with the x-internal and x-scalar-ignore properties\n */\nexport type Webhook = (OpenAPIV3.OperationObject | OpenAPIV3_1.OperationObject) & {\n 'x-internal'?: boolean\n 'x-scalar-ignore'?: boolean\n}\n\n/**\n * @deprecated Use `@scalar/openapi-types` instead\n */\nexport type Spec = {\n 'tags'?: Tag[]\n 'info':\n | Partial<OpenAPIV2.Document['info']>\n | Partial<OpenAPIV3.Document['info']>\n | Partial<OpenAPIV3_1.Document['info']>\n 'host'?: OpenAPIV2.Document['host']\n 'basePath'?: OpenAPIV2.Document['basePath']\n 'schemes'?: OpenAPIV2.Document['schemes']\n 'externalDocs'?: {\n url: string\n description?: string\n }\n 'servers'?: OpenAPIV3.Document['servers'] | OpenAPIV3_1.Document['servers']\n 'components'?: OpenAPIV3.ComponentsObject | OpenAPIV3_1.ComponentsObject\n 'webhooks'?: TransformedOperation[]\n 'definitions'?: Definitions\n 'swagger'?: OpenAPIV2.Document['swagger']\n 'openapi'?: OpenAPIV3.Document['openapi'] | OpenAPIV3_1.Document['openapi']\n 'x-tagGroups'?: TagGroup[]\n 'security'?: OpenAPIV3.SecurityRequirementObject[]\n}\n"],
|
|
5
5
|
"mappings": "AA6FO,IAAK,mBAAL,kBAAKA,sBAAL;AACL,EAAAA,kBAAA,gBAAa;AACb,EAAAA,kBAAA,kBAAe;AACf,EAAAA,kBAAA,YAAS;AAHC,SAAAA;AAAA,GAAA;",
|
|
6
6
|
"names": ["XScalarStability"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"scalar",
|
|
17
17
|
"references"
|
|
18
18
|
],
|
|
19
|
-
"version": "0.2.
|
|
19
|
+
"version": "0.2.12",
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">=20"
|
|
22
22
|
},
|
|
@@ -66,13 +66,13 @@
|
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"nanoid": "5.1.5",
|
|
68
68
|
"zod": "3.24.1",
|
|
69
|
-
"@scalar/openapi-types": "0.3.
|
|
69
|
+
"@scalar/openapi-types": "0.3.7"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/har-format": "^1.2.15",
|
|
73
73
|
"type-fest": "4.41.0",
|
|
74
|
-
"vite": "
|
|
75
|
-
"@scalar/build-tooling": "0.2.
|
|
74
|
+
"vite": "6.1.6",
|
|
75
|
+
"@scalar/build-tooling": "0.2.6"
|
|
76
76
|
},
|
|
77
77
|
"scripts": {
|
|
78
78
|
"build": "scalar-build-esbuild",
|