@scalar/types 0.4.0 → 0.5.1

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.
Files changed (47) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/api-reference/api-client-configuration.d.ts +6 -0
  3. package/dist/api-reference/api-client-configuration.d.ts.map +1 -1
  4. package/dist/api-reference/api-reference-configuration.d.ts +8 -2
  5. package/dist/api-reference/api-reference-configuration.d.ts.map +1 -1
  6. package/dist/api-reference/api-reference-configuration.js +5 -0
  7. package/dist/api-reference/api-reference-configuration.js.map +2 -2
  8. package/dist/api-reference/api-reference-plugin.d.ts +1 -1
  9. package/dist/api-reference/api-reference-plugin.d.ts.map +1 -1
  10. package/dist/api-reference/api-reference-plugin.js +1 -2
  11. package/dist/api-reference/api-reference-plugin.js.map +2 -2
  12. package/dist/api-reference/base-configuration.d.ts +6 -0
  13. package/dist/api-reference/base-configuration.d.ts.map +1 -1
  14. package/dist/api-reference/base-configuration.js +8 -0
  15. package/dist/api-reference/base-configuration.js.map +2 -2
  16. package/dist/api-reference/index.d.ts.map +1 -1
  17. package/dist/api-reference/index.js.map +2 -2
  18. package/dist/entities/index.d.ts +1 -0
  19. package/dist/entities/index.d.ts.map +1 -1
  20. package/dist/entities/index.js.map +2 -2
  21. package/dist/entities/security-scheme.d.ts +8 -9
  22. package/dist/entities/security-scheme.d.ts.map +1 -1
  23. package/dist/entities/security-scheme.js +0 -1
  24. package/dist/entities/security-scheme.js.map +2 -2
  25. package/dist/index.d.ts +4 -2
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +4 -1
  28. package/dist/index.js.map +2 -2
  29. package/dist/legacy/index.d.ts +3 -1
  30. package/dist/legacy/index.d.ts.map +1 -1
  31. package/dist/legacy/index.js +4 -1
  32. package/dist/legacy/index.js.map +2 -2
  33. package/dist/legacy/reference-config.d.ts +1 -211
  34. package/dist/legacy/reference-config.d.ts.map +1 -1
  35. package/dist/legacy/reference-config.js.map +2 -2
  36. package/dist/snippetz/index.d.ts +3 -1
  37. package/dist/snippetz/index.d.ts.map +1 -1
  38. package/dist/snippetz/index.js +4 -1
  39. package/dist/snippetz/index.js.map +2 -2
  40. package/dist/utils/index.d.ts +3 -1
  41. package/dist/utils/index.d.ts.map +1 -1
  42. package/dist/utils/index.js.map +2 -2
  43. package/dist/utils/nanoid.d.ts +1 -1
  44. package/dist/utils/nanoid.d.ts.map +1 -1
  45. package/dist/utils/nanoid.js +1 -1
  46. package/dist/utils/nanoid.js.map +2 -2
  47. package/package.json +3 -9
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @scalar/types
2
2
 
3
+ ## 0.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#7387](https://github.com/scalar/scalar/pull/7387) [`bfd814a`](https://github.com/scalar/scalar/commit/bfd814a4219660face190041cc4845182b56ab03) Thanks [@geoffgscott](https://github.com/geoffgscott)! - hotfix: patch exports from build tooling bug
8
+
9
+ ## 0.5.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#7373](https://github.com/scalar/scalar/pull/7373) [`cbedfab`](https://github.com/scalar/scalar/commit/cbedfab576502069be27ceacbea145a917214e47) Thanks [@marcalexiei](https://github.com/marcalexiei)! - feat(types): legacy - remove unused types
14
+
15
+ - [#7373](https://github.com/scalar/scalar/pull/7373) [`cbedfab`](https://github.com/scalar/scalar/commit/cbedfab576502069be27ceacbea145a917214e47) Thanks [@marcalexiei](https://github.com/marcalexiei)! - feat(types): removes `export *` from non-index exports
16
+
17
+ ### Patch Changes
18
+
19
+ - [#7320](https://github.com/scalar/scalar/pull/7320) [`44aeef0`](https://github.com/scalar/scalar/commit/44aeef01073801165e339163462378b7b62ff68d) Thanks [@hanspagel](https://github.com/hanspagel)! - feat: rename showToolbar to showDeveloperTools
20
+
3
21
  ## 0.4.0
4
22
 
5
23
  ### Minor Changes
@@ -34,6 +34,11 @@ export declare const apiClientConfigurationSchema: z.ZodObject<{
34
34
  }>>;
35
35
  servers: z.ZodOptional<z.ZodArray<z.ZodAny>>;
36
36
  showSidebar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
37
+ showDeveloperTools: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
38
+ never: "never";
39
+ always: "always";
40
+ localhost: "localhost";
41
+ }>>>>;
37
42
  showToolbar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
38
43
  never: "never";
39
44
  always: "always";
@@ -63,6 +68,7 @@ export declare const apiClientConfigurationSchema: z.ZodObject<{
63
68
  elysiajs: "elysiajs";
64
69
  fastify: "fastify";
65
70
  adonisjs: "adonisjs";
71
+ astro: "astro";
66
72
  docusaurus: "docusaurus";
67
73
  dotnet: "dotnet";
68
74
  express: "express";
@@ -1 +1 @@
1
- {"version":3,"file":"api-client-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/api-client-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAKxB,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAkE,CAAA;AAE3G,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA"}
1
+ {"version":3,"file":"api-client-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/api-client-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAKxB,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAkE,CAAA;AAE3G,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA"}
@@ -48,6 +48,11 @@ export declare const apiReferenceConfigurationSchema: z.ZodObject<{
48
48
  }>>;
49
49
  servers: z.ZodOptional<z.ZodArray<z.ZodAny>>;
50
50
  showSidebar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
51
+ showDeveloperTools: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
52
+ never: "never";
53
+ always: "always";
54
+ localhost: "localhost";
55
+ }>>>>;
51
56
  showToolbar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
52
57
  never: "never";
53
58
  always: "always";
@@ -77,6 +82,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodObject<{
77
82
  elysiajs: "elysiajs";
78
83
  fastify: "fastify";
79
84
  adonisjs: "adonisjs";
85
+ astro: "astro";
80
86
  docusaurus: "docusaurus";
81
87
  dotnet: "dotnet";
82
88
  express: "express";
@@ -196,7 +202,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodObject<{
196
202
  */
197
203
  export type ApiReferenceConfigurationRaw = Omit<z.infer<typeof apiReferenceConfigurationSchema>, // Remove deprecated attributes
198
204
  // Remove deprecated attributes
199
- 'proxy' | 'spec' | 'authentication'> & {
205
+ 'proxy' | 'spec' | 'authentication' | 'showToolbar'> & {
200
206
  authentication?: AuthenticationConfiguration;
201
207
  };
202
208
  /**
@@ -223,7 +229,7 @@ export declare const apiReferenceConfigurationWithSourceSchema: ZodType<Omit<Api
223
229
  /**
224
230
  * User facing configuration that includes the document source configuration
225
231
  */
226
- export type ApiReferenceConfigurationWithSource = Omit<z.infer<typeof apiReferenceConfigurationWithSourceSchema>, 'proxy' | 'spec' | 'authentication'> & {
232
+ export type ApiReferenceConfigurationWithSource = Omit<z.infer<typeof apiReferenceConfigurationWithSourceSchema>, 'proxy' | 'spec' | 'authentication' | 'showToolbar'> & {
227
233
  authentication?: AuthenticationConfiguration;
228
234
  };
229
235
  /**
@@ -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,KAAK,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIrC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAA;AAEjF,OAAO,EAAE,KAAK,mBAAmB,EAA6B,MAAM,wBAAwB,CAAA;AAK5F;;;;;;;;;GASG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAZH,MAAM,GAAG,GAAG,GAAG,OAAO,SAAS,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,UAAhE,MAAM,GAAG,GAAG,GAAG,OAAO,SAAS,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAoItF,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;cAE/B,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;qBAQnF,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;gBAW1E,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;oBAW5D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;CAC/B,CAAA;AAED,gDAAgD;AAChD,MAAM,MAAM,4BAA4B,GACpC,OAAO,CAAC,mCAAmC,CAAC,GAC5C,OAAO,CAAC,4CAA4C,CAAC,GACrD,OAAO,CAAC,mCAAmC,CAAC,EAAE,GAC9C,OAAO,CAAC,4CAA4C,CAAC,EAAE,CAAA;AAE3D,uEAAuE;AACvE,eAAO,MAAM,0BAA0B,GACrC,QAAQ,4BAA4B,KACnC,MAAM,IAAI,OAAO,CAAC,4CAA4C,CACkC,CAAA"}
@@ -334,6 +334,11 @@ const apiReferenceConfigurationWithSourceSchema = apiReferenceConfigurationSchem
334
334
  );
335
335
  configuration.proxyUrl = NEW_PROXY_URL;
336
336
  }
337
+ if (configuration.showToolbar && configuration.showToolbar !== "localhost") {
338
+ console.warn(`[DEPRECATED] You're using the deprecated 'showToolbar' attribute. Use 'showDeveloperTools' instead.`);
339
+ configuration.showDeveloperTools = configuration.showToolbar;
340
+ delete configuration.showToolbar;
341
+ }
337
342
  return configuration;
338
343
  });
339
344
  const isConfigurationWithSources = (config) => Boolean(!Array.isArray(config) && config && "sources" in config && Array.isArray(config.sources));
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/api-reference/api-reference-configuration.ts"],
4
- "sourcesContent": ["import { type ZodType, z } from 'zod'\n\nimport type { TargetId } from '../snippetz'\nimport { apiReferencePluginSchema } from './api-reference-plugin'\nimport type { AuthenticationConfiguration } from './authentication-configuration'\nimport { NEW_PROXY_URL, OLD_PROXY_URL, baseConfigurationSchema } from './base-configuration'\nimport { type SourceConfiguration, sourceConfigurationSchema } from './source-configuration'\n\n// Zod Schemas don't work well with async functions, so we use a custom type instead.\nconst fetchLikeSchema = z.custom<(input: string | URL | Request, init?: RequestInit) => Promise<Response>>()\n\n/**\n * Standard configuration for the Api Reference.\n *\n * This is used internally to the configure the applications and does not include the sources.\n *\n * Sources should only be specified in the user facing configurations.\n *\n * In the the future it is likely sources will be removed completely from the configuration and instead\n * specified through a separate addDocument interface.\n */\nexport const apiReferenceConfigurationSchema = baseConfigurationSchema.extend({\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 * Custom fetch function for custom logic\n *\n * Can be used to add custom headers, handle auth, etc.\n */\n fetch: fetchLikeSchema.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', 'direct', '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 /**\n * Whether to show the operationId\n *\n * @default false\n */\n showOperationId: 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.string(), 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\n .function({\n input: [z.string()],\n output: z.void(),\n })\n .optional(),\n /** onServerChange is fired on selected server change */\n onServerChange: z\n .function({\n input: [z.string()],\n output: z.void(),\n })\n .optional(),\n /** onDocumentSelect is fired when the config is selected */\n onDocumentSelect: z\n .function({\n input: [],\n // Why no output? https://github.com/scalar/scalar/pull/7047\n // output: z.union([z.void(), z.promise(z.void())]),\n })\n .optional() as z.ZodType<(() => Promise<void> | void) | undefined>,\n /** Callback fired when the reference is fully loaded */\n onLoaded: z.function().optional() as z.ZodType<((slug: string) => Promise<void> | void) | undefined>,\n /** onBeforeRequest is fired before the request is sent. You can modify the request here. */\n onBeforeRequest: z\n .function({\n input: [z.object({ request: z.instanceof(Request) })],\n // Why no output? https://github.com/scalar/scalar/pull/7047\n // output: z.union([z.void(), z.promise(z.void())]),\n })\n .optional() as z.ZodType<((a: { request: Request }) => Promise<void> | void) | undefined>,\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\n .function({\n input: [z.string()],\n // Why no output? https://github.com/scalar/scalar/pull/7047\n // output: z.union([z.void(), z.promise(z.void())]),\n })\n .optional() as z.ZodType<((a: string) => Promise<void> | void) | undefined>,\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\n .function({\n input: [z.string()],\n // Why no output? https://github.com/scalar/scalar/pull/7047\n // output: z.union([z.void(), z.promise(z.void())]),\n })\n .optional() as z.ZodType<((a: string) => Promise<void> | void) | undefined>,\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: z\n .object({\n basePath: z.string(),\n })\n .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 input: [z.object({ slug: z.string().default('headingSlug') })],\n output: z.string(),\n })\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 input: [z.object({ name: z.string().default('modelName') })],\n output: z.string(),\n })\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 input: [z.object({ name: z.string().default('tagName') })],\n output: z.string(),\n })\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 input: [\n z.object({\n path: z.string(),\n operationId: z.string().optional(),\n method: z.string(),\n summary: z.string().optional(),\n }),\n ],\n output: z.string(),\n })\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 input: [\n z.object({\n name: z.string(),\n method: z.string().optional(),\n }),\n ],\n output: z.string(),\n })\n .optional(),\n /**\n * To handle redirects, pass a function that will receive:\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\n .function({\n input: [z.string()],\n output: z.string().nullable().optional(),\n })\n .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\n .union([\n z.literal('alpha'),\n z.function({\n input: [z.any(), z.any()],\n output: z.number(),\n }),\n ])\n .optional(),\n /**\n * Function to sort operations\n * @default 'alpha' for alphabetical sorting\n */\n operationsSorter: z\n .union([\n z.literal('alpha'),\n z.literal('method'),\n z.function({\n input: [z.any(), z.any()],\n output: z.number(),\n }),\n ])\n .optional(),\n /**\n * Order the schema properties by\n * @default 'alpha' for alphabetical sorting\n */\n orderSchemaPropertiesBy: z\n .union([z.literal('alpha'), z.literal('preserve')])\n .optional()\n .default('alpha')\n .catch('alpha'),\n /**\n * Sort the schema properties by required ones first\n * @default true\n */\n orderRequiredPropertiesFirst: z.boolean().optional().default(true).catch(true),\n})\n\n/**\n * Pure configuration without the sources\n *\n * @deprecated Remove this once the types have been fully migrated\n */\nexport type ApiReferenceConfigurationRaw = Omit<\n z.infer<typeof apiReferenceConfigurationSchema>, // Remove deprecated attributes\n 'proxy' | 'spec' | 'authentication'\n> & {\n authentication?: AuthenticationConfiguration\n}\n\n/**\n * Configuration for the Scalar Api Reference integrations\n *\n * See the type `ApiReferenceConfigurationWithSource` or `AnyApiReferenceConfiguration`\\\n * for the configuration that includes the sources for you OpenAPI documents\n */\nexport type ApiReferenceConfiguration = ApiReferenceConfigurationRaw & {\n /** @deprecated\n * This type now refers to the base configuration that does not include the sources.\n * Use the type `ApiReferenceConfigurationWithSource` instead.\n */\n url?: SourceConfiguration['url']\n /** @deprecated\n * This type now refers to the base configuration that does not include the sources.\n * Use the type `ApiReferenceConfigurationWithSource` instead.\n */\n content?: SourceConfiguration['content']\n}\n\n/** Migrate the configuration through a transform */\n// const migrateConfiguration = <T extends z.infer<typeof _apiReferenceConfigurationSchema>>\n\n/** Configuration for the Api Reference */\nexport const apiReferenceConfigurationWithSourceSchema: ZodType<\n Omit<ApiReferenceConfiguration, 'url' | 'content'> & SourceConfiguration\n> = apiReferenceConfigurationSchema.extend(sourceConfigurationSchema.shape).transform((configuration) => {\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/**\n * User facing configuration that includes the document source configuration\n */\nexport type ApiReferenceConfigurationWithSource = Omit<\n z.infer<typeof apiReferenceConfigurationWithSourceSchema>,\n // Remove deprecated attributes\n 'proxy' | 'spec' | 'authentication'\n> & {\n authentication?: AuthenticationConfiguration\n}\n\n/**\n * Configuration for a single config with multiple sources\n * The configuration will be shared between the documents\n */\nexport type ApiReferenceConfigurationWithMultipleSources = ApiReferenceConfigurationWithSource & {\n sources: SourceConfiguration[]\n}\n\n/** Configuration for multiple Api References */\nexport type AnyApiReferenceConfiguration =\n | Partial<ApiReferenceConfigurationWithSource>\n | Partial<ApiReferenceConfigurationWithMultipleSources>\n | Partial<ApiReferenceConfigurationWithSource>[]\n | Partial<ApiReferenceConfigurationWithMultipleSources>[]\n\n/** Typeguard to check to narrow the configs to the one with sources */\nexport const isConfigurationWithSources = (\n config: AnyApiReferenceConfiguration,\n): config is Partial<ApiReferenceConfigurationWithMultipleSources> =>\n Boolean(!Array.isArray(config) && config && 'sources' in config && Array.isArray(config.sources))\n"],
5
- "mappings": "AAAA,SAAuB,SAAS;AAGhC,SAAS,gCAAgC;AAEzC,SAAS,eAAe,eAAe,+BAA+B;AACtE,SAAmC,iCAAiC;AAGpE,MAAM,kBAAkB,EAAE,OAAiF;AAYpG,MAAM,kCAAkC,wBAAwB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,EAK5E,QAAQ,EAAE,KAAK,CAAC,UAAU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;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,CAAC;AA6BM,MAAM,6BAA6B,CACxC,WAEA,QAAQ,CAAC,MAAM,QAAQ,MAAM,KAAK,UAAU,aAAa,UAAU,MAAM,QAAQ,OAAO,OAAO,CAAC;",
4
+ "sourcesContent": ["import { type ZodType, z } from 'zod'\n\nimport type { TargetId } from '../snippetz'\nimport { apiReferencePluginSchema } from './api-reference-plugin'\nimport type { AuthenticationConfiguration } from './authentication-configuration'\nimport { NEW_PROXY_URL, OLD_PROXY_URL, baseConfigurationSchema } from './base-configuration'\nimport { type SourceConfiguration, sourceConfigurationSchema } from './source-configuration'\n\n// Zod Schemas don't work well with async functions, so we use a custom type instead.\nconst fetchLikeSchema = z.custom<(input: string | URL | Request, init?: RequestInit) => Promise<Response>>()\n\n/**\n * Standard configuration for the Api Reference.\n *\n * This is used internally to the configure the applications and does not include the sources.\n *\n * Sources should only be specified in the user facing configurations.\n *\n * In the the future it is likely sources will be removed completely from the configuration and instead\n * specified through a separate addDocument interface.\n */\nexport const apiReferenceConfigurationSchema = baseConfigurationSchema.extend({\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 * Custom fetch function for custom logic\n *\n * Can be used to add custom headers, handle auth, etc.\n */\n fetch: fetchLikeSchema.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', 'direct', '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 /**\n * Whether to show the operationId\n *\n * @default false\n */\n showOperationId: 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.string(), 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\n .function({\n input: [z.string()],\n output: z.void(),\n })\n .optional(),\n /** onServerChange is fired on selected server change */\n onServerChange: z\n .function({\n input: [z.string()],\n output: z.void(),\n })\n .optional(),\n /** onDocumentSelect is fired when the config is selected */\n onDocumentSelect: z\n .function({\n input: [],\n // Why no output? https://github.com/scalar/scalar/pull/7047\n // output: z.union([z.void(), z.promise(z.void())]),\n })\n .optional() as z.ZodType<(() => Promise<void> | void) | undefined>,\n /** Callback fired when the reference is fully loaded */\n onLoaded: z.function().optional() as z.ZodType<((slug: string) => Promise<void> | void) | undefined>,\n /** onBeforeRequest is fired before the request is sent. You can modify the request here. */\n onBeforeRequest: z\n .function({\n input: [z.object({ request: z.instanceof(Request) })],\n // Why no output? https://github.com/scalar/scalar/pull/7047\n // output: z.union([z.void(), z.promise(z.void())]),\n })\n .optional() as z.ZodType<((a: { request: Request }) => Promise<void> | void) | undefined>,\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\n .function({\n input: [z.string()],\n // Why no output? https://github.com/scalar/scalar/pull/7047\n // output: z.union([z.void(), z.promise(z.void())]),\n })\n .optional() as z.ZodType<((a: string) => Promise<void> | void) | undefined>,\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\n .function({\n input: [z.string()],\n // Why no output? https://github.com/scalar/scalar/pull/7047\n // output: z.union([z.void(), z.promise(z.void())]),\n })\n .optional() as z.ZodType<((a: string) => Promise<void> | void) | undefined>,\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: z\n .object({\n basePath: z.string(),\n })\n .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 input: [z.object({ slug: z.string().default('headingSlug') })],\n output: z.string(),\n })\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 input: [z.object({ name: z.string().default('modelName') })],\n output: z.string(),\n })\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 input: [z.object({ name: z.string().default('tagName') })],\n output: z.string(),\n })\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 input: [\n z.object({\n path: z.string(),\n operationId: z.string().optional(),\n method: z.string(),\n summary: z.string().optional(),\n }),\n ],\n output: z.string(),\n })\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 input: [\n z.object({\n name: z.string(),\n method: z.string().optional(),\n }),\n ],\n output: z.string(),\n })\n .optional(),\n /**\n * To handle redirects, pass a function that will receive:\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\n .function({\n input: [z.string()],\n output: z.string().nullable().optional(),\n })\n .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\n .union([\n z.literal('alpha'),\n z.function({\n input: [z.any(), z.any()],\n output: z.number(),\n }),\n ])\n .optional(),\n /**\n * Function to sort operations\n * @default 'alpha' for alphabetical sorting\n */\n operationsSorter: z\n .union([\n z.literal('alpha'),\n z.literal('method'),\n z.function({\n input: [z.any(), z.any()],\n output: z.number(),\n }),\n ])\n .optional(),\n /**\n * Order the schema properties by\n * @default 'alpha' for alphabetical sorting\n */\n orderSchemaPropertiesBy: z\n .union([z.literal('alpha'), z.literal('preserve')])\n .optional()\n .default('alpha')\n .catch('alpha'),\n /**\n * Sort the schema properties by required ones first\n * @default true\n */\n orderRequiredPropertiesFirst: z.boolean().optional().default(true).catch(true),\n})\n\n/**\n * Pure configuration without the sources\n *\n * @deprecated Remove this once the types have been fully migrated\n */\nexport type ApiReferenceConfigurationRaw = Omit<\n z.infer<typeof apiReferenceConfigurationSchema>, // Remove deprecated attributes\n 'proxy' | 'spec' | 'authentication' | 'showToolbar'\n> & {\n authentication?: AuthenticationConfiguration\n}\n\n/**\n * Configuration for the Scalar Api Reference integrations\n *\n * See the type `ApiReferenceConfigurationWithSource` or `AnyApiReferenceConfiguration`\\\n * for the configuration that includes the sources for you OpenAPI documents\n */\nexport type ApiReferenceConfiguration = ApiReferenceConfigurationRaw & {\n /** @deprecated\n * This type now refers to the base configuration that does not include the sources.\n * Use the type `ApiReferenceConfigurationWithSource` instead.\n */\n url?: SourceConfiguration['url']\n /** @deprecated\n * This type now refers to the base configuration that does not include the sources.\n * Use the type `ApiReferenceConfigurationWithSource` instead.\n */\n content?: SourceConfiguration['content']\n}\n\n/** Migrate the configuration through a transform */\n// const migrateConfiguration = <T extends z.infer<typeof _apiReferenceConfigurationSchema>>\n\n/** Configuration for the Api Reference */\nexport const apiReferenceConfigurationWithSourceSchema: ZodType<\n Omit<ApiReferenceConfiguration, 'url' | 'content'> & SourceConfiguration\n> = apiReferenceConfigurationSchema.extend(sourceConfigurationSchema.shape).transform((configuration) => {\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 // Migrate showToolbar to showDeveloperTools\n if (configuration.showToolbar && configuration.showToolbar !== 'localhost') {\n console.warn(`[DEPRECATED] You're using the deprecated 'showToolbar' attribute. Use 'showDeveloperTools' instead.`)\n\n configuration.showDeveloperTools = configuration.showToolbar\n\n // @ts-expect-error - We're deleting the deprecated attribute\n delete configuration.showToolbar\n }\n\n return configuration\n})\n\n/**\n * User facing configuration that includes the document source configuration\n */\nexport type ApiReferenceConfigurationWithSource = Omit<\n z.infer<typeof apiReferenceConfigurationWithSourceSchema>,\n // Remove deprecated attributes\n 'proxy' | 'spec' | 'authentication' | 'showToolbar'\n> & {\n authentication?: AuthenticationConfiguration\n}\n\n/**\n * Configuration for a single config with multiple sources\n * The configuration will be shared between the documents\n */\nexport type ApiReferenceConfigurationWithMultipleSources = ApiReferenceConfigurationWithSource & {\n sources: SourceConfiguration[]\n}\n\n/** Configuration for multiple Api References */\nexport type AnyApiReferenceConfiguration =\n | Partial<ApiReferenceConfigurationWithSource>\n | Partial<ApiReferenceConfigurationWithMultipleSources>\n | Partial<ApiReferenceConfigurationWithSource>[]\n | Partial<ApiReferenceConfigurationWithMultipleSources>[]\n\n/** Typeguard to check to narrow the configs to the one with sources */\nexport const isConfigurationWithSources = (\n config: AnyApiReferenceConfiguration,\n): config is Partial<ApiReferenceConfigurationWithMultipleSources> =>\n Boolean(!Array.isArray(config) && config && 'sources' in config && Array.isArray(config.sources))\n"],
5
+ "mappings": "AAAA,SAAuB,SAAS;AAGhC,SAAS,gCAAgC;AAEzC,SAAS,eAAe,eAAe,+BAA+B;AACtE,SAAmC,iCAAiC;AAGpE,MAAM,kBAAkB,EAAE,OAAiF;AAYpG,MAAM,kCAAkC,wBAAwB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,EAK5E,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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;AAGA,MAAI,cAAc,eAAe,cAAc,gBAAgB,aAAa;AAC1E,YAAQ,KAAK,qGAAqG;AAElH,kBAAc,qBAAqB,cAAc;AAGjD,WAAO,cAAc;AAAA,EACvB;AAEA,SAAO;AACT,CAAC;AA6BM,MAAM,6BAA6B,CACxC,WAEA,QAAQ,CAAC,MAAM,QAAQ,MAAM,KAAK,UAAU,aAAa,UAAU,MAAM,QAAQ,OAAO,OAAO,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- export declare const openApiExtensionSchema: z.ZodObject<{
2
+ declare const openApiExtensionSchema: z.ZodObject<{
3
3
  name: z.ZodString;
4
4
  component: z.ZodUnknown;
5
5
  renderer: z.ZodOptional<z.ZodUnknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"api-reference-plugin.d.ts","sourceRoot":"","sources":["../../src/api-reference/api-reference-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,sBAAsB;;;;iBAkBjC,CAAA;AAEF,QAAA,MAAM,mBAAmB;;;;iBAavB,CAAA;AASF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;kBAUnC,CAAA;AAGF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAC3E,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAC/D,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
1
+ {"version":3,"file":"api-reference-plugin.d.ts","sourceRoot":"","sources":["../../src/api-reference/api-reference-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,QAAA,MAAM,sBAAsB;;;;iBAkB1B,CAAA;AAEF,QAAA,MAAM,mBAAmB;;;;iBAavB,CAAA;AASF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;kBAUnC,CAAA;AAGF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAC3E,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAC/D,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
@@ -50,7 +50,6 @@ const apiReferencePluginSchema = z.function({
50
50
  })
51
51
  });
52
52
  export {
53
- apiReferencePluginSchema,
54
- openApiExtensionSchema
53
+ apiReferencePluginSchema
55
54
  };
56
55
  //# sourceMappingURL=api-reference-plugin.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/api-reference/api-reference-plugin.ts"],
4
- "sourcesContent": ["import { z } from 'zod'\n\nexport const openApiExtensionSchema = z.object({\n /**\n * Name of specification extension property. Has to start with `x-`.\n *\n * @example\n * ```yaml\n * x-custom-extension: foobar\n * ```\n */\n name: z.string().regex(/^x-/),\n /**\n * Vue component to render the specification extension\n */\n component: z.unknown(),\n /**\n * Custom renderer to render the specification extension\n */\n renderer: z.unknown().optional(),\n})\n\nconst viewComponentSchema = z.object({\n /**\n * Vue component to render in the view\n */\n component: z.unknown(),\n /**\n * Custom renderer to render the view component (e.g., ReactRenderer)\n */\n renderer: z.unknown().optional(),\n /**\n * Additional props to pass to the component\n */\n props: z.record(z.string(), z.any()).optional(),\n})\n\nconst viewsSchema = z.object({\n /**\n * Renders after the Models section\n */\n 'content.end': z.array(viewComponentSchema).optional(),\n})\n\nexport const apiReferencePluginSchema = z.function({\n input: [],\n output: z.object({\n name: z.string(),\n extensions: z.array(openApiExtensionSchema),\n /**\n * Components to render at specific views in the API Reference\n */\n views: viewsSchema.optional(),\n }),\n})\n\n// Infer the types from the schemas\nexport type SpecificationExtension = z.infer<typeof openApiExtensionSchema>\nexport type ViewComponent = z.infer<typeof viewComponentSchema>\nexport type ApiReferencePlugin = z.infer<typeof apiReferencePluginSchema>\n"],
5
- "mappings": "AAAA,SAAS,SAAS;AAEX,MAAM,yBAAyB,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAS7C,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA,EAI5B,WAAW,EAAE,QAAQ;AAAA;AAAA;AAAA;AAAA,EAIrB,UAAU,EAAE,QAAQ,EAAE,SAAS;AACjC,CAAC;AAED,MAAM,sBAAsB,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA,EAInC,WAAW,EAAE,QAAQ;AAAA;AAAA;AAAA;AAAA,EAIrB,UAAU,EAAE,QAAQ,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA,EAI/B,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,IAAI,CAAC,EAAE,SAAS;AAChD,CAAC;AAED,MAAM,cAAc,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA,EAI3B,eAAe,EAAE,MAAM,mBAAmB,EAAE,SAAS;AACvD,CAAC;AAEM,MAAM,2BAA2B,EAAE,SAAS;AAAA,EACjD,OAAO,CAAC;AAAA,EACR,QAAQ,EAAE,OAAO;AAAA,IACf,MAAM,EAAE,OAAO;AAAA,IACf,YAAY,EAAE,MAAM,sBAAsB;AAAA;AAAA;AAAA;AAAA,IAI1C,OAAO,YAAY,SAAS;AAAA,EAC9B,CAAC;AACH,CAAC;",
4
+ "sourcesContent": ["import { z } from 'zod'\n\nconst openApiExtensionSchema = z.object({\n /**\n * Name of specification extension property. Has to start with `x-`.\n *\n * @example\n * ```yaml\n * x-custom-extension: foobar\n * ```\n */\n name: z.string().regex(/^x-/),\n /**\n * Vue component to render the specification extension\n */\n component: z.unknown(),\n /**\n * Custom renderer to render the specification extension\n */\n renderer: z.unknown().optional(),\n})\n\nconst viewComponentSchema = z.object({\n /**\n * Vue component to render in the view\n */\n component: z.unknown(),\n /**\n * Custom renderer to render the view component (e.g., ReactRenderer)\n */\n renderer: z.unknown().optional(),\n /**\n * Additional props to pass to the component\n */\n props: z.record(z.string(), z.any()).optional(),\n})\n\nconst viewsSchema = z.object({\n /**\n * Renders after the Models section\n */\n 'content.end': z.array(viewComponentSchema).optional(),\n})\n\nexport const apiReferencePluginSchema = z.function({\n input: [],\n output: z.object({\n name: z.string(),\n extensions: z.array(openApiExtensionSchema),\n /**\n * Components to render at specific views in the API Reference\n */\n views: viewsSchema.optional(),\n }),\n})\n\n// Infer the types from the schemas\nexport type SpecificationExtension = z.infer<typeof openApiExtensionSchema>\nexport type ViewComponent = z.infer<typeof viewComponentSchema>\nexport type ApiReferencePlugin = z.infer<typeof apiReferencePluginSchema>\n"],
5
+ "mappings": "AAAA,SAAS,SAAS;AAElB,MAAM,yBAAyB,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAStC,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK;AAAA;AAAA;AAAA;AAAA,EAI5B,WAAW,EAAE,QAAQ;AAAA;AAAA;AAAA;AAAA,EAIrB,UAAU,EAAE,QAAQ,EAAE,SAAS;AACjC,CAAC;AAED,MAAM,sBAAsB,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA,EAInC,WAAW,EAAE,QAAQ;AAAA;AAAA;AAAA;AAAA,EAIrB,UAAU,EAAE,QAAQ,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA,EAI/B,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,IAAI,CAAC,EAAE,SAAS;AAChD,CAAC;AAED,MAAM,cAAc,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA,EAI3B,eAAe,EAAE,MAAM,mBAAmB,EAAE,SAAS;AACvD,CAAC;AAEM,MAAM,2BAA2B,EAAE,SAAS;AAAA,EACjD,OAAO,CAAC;AAAA,EACR,QAAQ,EAAE,OAAO;AAAA,IACf,MAAM,EAAE,OAAO;AAAA,IACf,YAAY,EAAE,MAAM,sBAAsB;AAAA;AAAA;AAAA;AAAA,IAI1C,OAAO,YAAY,SAAS;AAAA,EAC9B,CAAC;AACH,CAAC;",
6
6
  "names": []
7
7
  }
@@ -39,6 +39,11 @@ export declare const baseConfigurationSchema: z.ZodObject<{
39
39
  }>>;
40
40
  servers: z.ZodOptional<z.ZodArray<z.ZodAny>>;
41
41
  showSidebar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
42
+ showDeveloperTools: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
43
+ never: "never";
44
+ always: "always";
45
+ localhost: "localhost";
46
+ }>>>>;
42
47
  showToolbar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
43
48
  never: "never";
44
49
  always: "always";
@@ -68,6 +73,7 @@ export declare const baseConfigurationSchema: z.ZodObject<{
68
73
  elysiajs: "elysiajs";
69
74
  fastify: "fastify";
70
75
  adonisjs: "adonisjs";
76
+ astro: "astro";
71
77
  docusaurus: "docusaurus";
72
78
  dotnet: "dotnet";
73
79
  express: "express";
@@ -1 +1 @@
1
- {"version":3,"file":"base-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/base-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AAInB,eAAO,MAAM,aAAa,yCAAyC,CAAA;AACnE,eAAO,MAAM,aAAa,6BAA6B,CAAA;AAEvD,gEAAgE;AAChE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyIlC,CAAA"}
1
+ {"version":3,"file":"base-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/base-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AAInB,eAAO,MAAM,aAAa,yCAAyC,CAAA;AACnE,eAAO,MAAM,aAAa,6BAA6B,CAAA;AAEvD,gEAAgE;AAChE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiJlC,CAAA"}
@@ -68,9 +68,16 @@ const baseConfigurationSchema = z.object({
68
68
  * @default true
69
69
  */
70
70
  showSidebar: z.boolean().optional().default(true).catch(true),
71
+ /**
72
+ * Whether and when to show the developer tools.
73
+ *
74
+ * @default 'localhost' to only show the toolbar on localhost or similar hosts
75
+ */
76
+ showDeveloperTools: z.enum(["always", "localhost", "never"]).optional().default("localhost").catch("localhost"),
71
77
  /**
72
78
  * Sets the visibility of the developer tools
73
79
  * @default 'localhost' to only show the toolbar on localhost or similar hosts
80
+ * @deprecated Use showDeveloperTools instead
74
81
  */
75
82
  showToolbar: z.enum(["always", "localhost", "never"]).optional().default("localhost").catch("localhost"),
76
83
  /**
@@ -98,6 +105,7 @@ const baseConfigurationSchema = z.object({
98
105
  /** Integration type identifier */
99
106
  _integration: z.enum([
100
107
  "adonisjs",
108
+ "astro",
101
109
  "docusaurus",
102
110
  "dotnet",
103
111
  "elysiajs",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/api-reference/base-configuration.ts"],
4
- "sourcesContent": ["import z from 'zod'\n\nimport { apiClientPluginSchema } from './api-client-plugin'\n\nexport const OLD_PROXY_URL = 'https://api.scalar.com/request-proxy'\nexport const NEW_PROXY_URL = 'https://proxy.scalar.com'\n\n/** Shared configuration for the Api Reference and Api Client */\nexport const baseConfigurationSchema = z.object({\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 /** 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: z\n .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 .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 /**\n * Sets the visibility of the developer tools\n * @default 'localhost' to only show the toolbar on localhost or similar hosts\n */\n showToolbar: z.enum(['always', 'localhost', 'never']).optional().default('localhost').catch('localhost'),\n /**\n * Whether to use the operation summary or the operation path for the sidebar and search\n * @default 'summary'\n */\n operationTitleSource: z.enum(['summary', 'path']).optional().default('summary').catch('summary'),\n /** A string to use one of the color presets */\n theme: z\n .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 .optional()\n .default('default')\n .catch('default'),\n /** Integration type identifier */\n _integration: 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 .optional(),\n /** onRequestSent is fired when a request is sent */\n onRequestSent: z\n .function({\n input: [z.string()],\n output: z.void(),\n })\n .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 /** Enables / disables telemetry*/\n telemetry: z.boolean().optional().default(true),\n})\n"],
5
- "mappings": "AAAA,OAAO,OAAO;AAEd,SAAS,6BAA6B;AAE/B,MAAM,gBAAgB;AACtB,MAAM,gBAAgB;AAGtB,MAAM,0BAA0B,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM9C,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAU3B,MAAM,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA,EAE1B,gBAAgB,EAAE,IAAI,EAAE,SAAS;AAAA;AAAA;AAAA,EAEjC,eAAe,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA;A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ACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACA,SAAS,EACT,SAAS;AAAA;AAAA,EAEZ,eAAe,EACZ,SAAS;AAAA,IACR,OAAO,CAAC,EAAE,OAAO,CAAC;AAAA,IAClB,QAAQ,EAAE,KAAK;AAAA,EACjB,CAAC,EACA,SAAS;AAAA;AAAA,EAEZ,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,KAAK,EAAE,MAAM,KAAK;AAAA;AAAA,EAE9D,SAAS,EAAE,MAAM,qBAAqB,EAAE,SAAS;AAAA;AAAA,EAEjD,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,IAAI;AAChD,CAAC;",
4
+ "sourcesContent": ["import z from 'zod'\n\nimport { apiClientPluginSchema } from './api-client-plugin'\n\nexport const OLD_PROXY_URL = 'https://api.scalar.com/request-proxy'\nexport const NEW_PROXY_URL = 'https://proxy.scalar.com'\n\n/** Shared configuration for the Api Reference and Api Client */\nexport const baseConfigurationSchema = z.object({\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 /** 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: z\n .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 .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 /**\n * Whether and when to show the developer tools.\n *\n * @default 'localhost' to only show the toolbar on localhost or similar hosts\n */\n showDeveloperTools: z.enum(['always', 'localhost', 'never']).optional().default('localhost').catch('localhost'),\n /**\n * Sets the visibility of the developer tools\n * @default 'localhost' to only show the toolbar on localhost or similar hosts\n * @deprecated Use showDeveloperTools instead\n */\n showToolbar: z.enum(['always', 'localhost', 'never']).optional().default('localhost').catch('localhost'),\n /**\n * Whether to use the operation summary or the operation path for the sidebar and search\n * @default 'summary'\n */\n operationTitleSource: z.enum(['summary', 'path']).optional().default('summary').catch('summary'),\n /** A string to use one of the color presets */\n theme: z\n .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 .optional()\n .default('default')\n .catch('default'),\n /** Integration type identifier */\n _integration: z\n .enum([\n 'adonisjs',\n 'astro',\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 .optional(),\n /** onRequestSent is fired when a request is sent */\n onRequestSent: z\n .function({\n input: [z.string()],\n output: z.void(),\n })\n .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 /** Enables / disables telemetry*/\n telemetry: z.boolean().optional().default(true),\n})\n"],
5
+ "mappings": "AAAA,OAAO,OAAO;AAEd,SAAS,6BAA6B;AAE/B,MAAM,gBAAgB;AACtB,MAAM,gBAAgB;AAGtB,MAAM,0BAA0B,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM9C,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAU3B,MAAM,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA,EAE1B,gBAAgB,EAAE,IAAI,EAAE,SAAS;AAAA;AAAA;AAAA,EAEjC,eAAe,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA,EAKnC,kBAAkB,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,KAAK,EAAE,MAAM,KAAK;AAAA;AAAA,EAEnE,UAAU,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA,EAE9B,cAAc,EACX,KAAK;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACA,SAAS;AAAA;AAAA,EAEZ,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKnC,aAAa,EAAE,QAAQ,EAAE,SAAS,EAA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AM,KAAK;AAAA;AAAA,EAE9D,SAAS,EAAE,MAAM,qBAAqB,EAAE,SAAS;AAAA;AAAA,EAEjD,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,IAAI;AAChD,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api-reference/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,sBAAsB,EAC3B,4BAA4B,GAC7B,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,KAAK,eAAe,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAC9F,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,4CAA4C,EACjD,KAAK,mCAAmC,EACxC,+BAA+B,EAC/B,yCAAyC,EACzC,0BAA0B,GAC3B,MAAM,+BAA+B,CAAA;AACtC,YAAY,EACV,kBAAkB,EAClB,sBAAsB,EACtB,aAAa,GACd,MAAM,wBAAwB,CAAA;AAC/B,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC1E,OAAO,EACL,KAAK,0BAA0B,EAC/B,gCAAgC,GACjC,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,KAAK,mBAAmB,EACxB,yBAAyB,GAC1B,MAAM,wBAAwB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api-reference/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,sBAAsB,EAC3B,4BAA4B,GAC7B,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,KAAK,eAAe,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAC9F,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,4CAA4C,EACjD,KAAK,mCAAmC,EACxC,+BAA+B,EAC/B,yCAAyC,EACzC,0BAA0B,GAC3B,MAAM,+BAA+B,CAAA;AACtC,YAAY,EACV,kBAAkB,EAClB,sBAAsB,EACtB,aAAa,GACd,MAAM,wBAAwB,CAAA;AAC/B,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC1E,OAAO,EACL,KAAK,0BAA0B,EAC/B,gCAAgC,GACjC,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,KAAK,mBAAmB,EACxB,yBAAyB,GAC1B,MAAM,wBAAwB,CAAA"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/api-reference/index.ts"],
4
- "sourcesContent": ["// biome-ignore lint/performance/noBarrelFile: exporting from a block\nexport {\n type ApiClientConfiguration,\n apiClientConfigurationSchema,\n} from './api-client-configuration'\nexport { type ApiClientPlugin, apiClientPluginSchema, hooksSchema } from './api-client-plugin'\nexport {\n type AnyApiReferenceConfiguration,\n type ApiReferenceConfiguration,\n type ApiReferenceConfigurationRaw,\n type ApiReferenceConfigurationWithMultipleSources,\n type ApiReferenceConfigurationWithSource,\n apiReferenceConfigurationSchema,\n apiReferenceConfigurationWithSourceSchema,\n isConfigurationWithSources,\n} from './api-reference-configuration'\nexport type {\n ApiReferencePlugin,\n SpecificationExtension,\n ViewComponent,\n} from './api-reference-plugin'\nexport type { ApiReferenceInstance, CreateApiReference } from './html-api'\nexport {\n type HtmlRenderingConfiguration,\n htmlRenderingConfigurationSchema,\n} from './html-rendering-configuration'\nexport {\n type SourceConfiguration,\n sourceConfigurationSchema,\n} from './source-configuration'\n"],
5
- "mappings": "AACA;AAAA,EAEE;AAAA,OACK;AACP,SAA+B,uBAAuB,mBAAmB;AACzE;AAAA,EAME;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAOP;AAAA,EAEE;AAAA,OACK;AACP;AAAA,EAEE;AAAA,OACK;",
4
+ "sourcesContent": ["export {\n type ApiClientConfiguration,\n apiClientConfigurationSchema,\n} from './api-client-configuration'\nexport { type ApiClientPlugin, apiClientPluginSchema, hooksSchema } from './api-client-plugin'\nexport {\n type AnyApiReferenceConfiguration,\n type ApiReferenceConfiguration,\n type ApiReferenceConfigurationRaw,\n type ApiReferenceConfigurationWithMultipleSources,\n type ApiReferenceConfigurationWithSource,\n apiReferenceConfigurationSchema,\n apiReferenceConfigurationWithSourceSchema,\n isConfigurationWithSources,\n} from './api-reference-configuration'\nexport type {\n ApiReferencePlugin,\n SpecificationExtension,\n ViewComponent,\n} from './api-reference-plugin'\nexport type { ApiReferenceInstance, CreateApiReference } from './html-api'\nexport {\n type HtmlRenderingConfiguration,\n htmlRenderingConfigurationSchema,\n} from './html-rendering-configuration'\nexport {\n type SourceConfiguration,\n sourceConfigurationSchema,\n} from './source-configuration'\n"],
5
+ "mappings": "AAAA;AAAA,EAEE;AAAA,OACK;AACP,SAA+B,uBAAuB,mBAAmB;AACzE;AAAA,EAME;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAOP;AAAA,EAEE;AAAA,OACK;AACP;AAAA,EAEE;AAAA,OACK;",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,3 @@
1
+ /** biome-ignore-all lint/performance/noBarrelFile: entrypoint */
1
2
  export { type Oauth2Flow, type Oauth2FlowPayload, type SecuritySchemaHttp, type SecuritySchemaOpenId, type SecurityScheme, type SecuritySchemeApiKey, type SecuritySchemeOauth2, type SecuritySchemeOauth2Payload, type SecuritySchemePayload, oasSecurityRequirementSchema, oasSecuritySchemeSchema, pkceOptions, securityApiKeySchema, securityHttpSchema, securityOauthSchema, securityOpenIdSchema, securitySchemeSchema, } from './security-scheme.js';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EAChC,KAAK,qBAAqB,EAC1B,4BAA4B,EAC5B,uBAAuB,EACvB,WAAW,EACX,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,OAAO,EACL,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EAChC,KAAK,qBAAqB,EAC1B,4BAA4B,EAC5B,uBAAuB,EACvB,WAAW,EACX,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,mBAAmB,CAAA"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/entities/index.ts"],
4
- "sourcesContent": ["export {\n type Oauth2Flow,\n type Oauth2FlowPayload,\n type SecuritySchemaHttp,\n type SecuritySchemaOpenId,\n type SecurityScheme,\n type SecuritySchemeApiKey,\n type SecuritySchemeOauth2,\n type SecuritySchemeOauth2Payload,\n type SecuritySchemePayload,\n oasSecurityRequirementSchema,\n oasSecuritySchemeSchema,\n pkceOptions,\n securityApiKeySchema,\n securityHttpSchema,\n securityOauthSchema,\n securityOpenIdSchema,\n securitySchemeSchema,\n} from './security-scheme'\n"],
5
- "mappings": "AAAA;AAAA,EAUE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
4
+ "sourcesContent": ["/** biome-ignore-all lint/performance/noBarrelFile: entrypoint */\nexport {\n type Oauth2Flow,\n type Oauth2FlowPayload,\n type SecuritySchemaHttp,\n type SecuritySchemaOpenId,\n type SecurityScheme,\n type SecuritySchemeApiKey,\n type SecuritySchemeOauth2,\n type SecuritySchemeOauth2Payload,\n type SecuritySchemePayload,\n oasSecurityRequirementSchema,\n oasSecuritySchemeSchema,\n pkceOptions,\n securityApiKeySchema,\n securityHttpSchema,\n securityOauthSchema,\n securityOpenIdSchema,\n securitySchemeSchema,\n} from './security-scheme'\n"],
5
+ "mappings": "AACA;AAAA,EAUE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,4 @@
1
1
  import { z } from 'zod';
2
- export declare const securitySchemeApiKeyIn: readonly ["query", "header", "cookie"];
3
2
  export declare const securityApiKeySchema: z.ZodObject<{
4
3
  description: z.ZodOptional<z.ZodString>;
5
4
  type: z.ZodLiteral<"apiKey">;
@@ -9,7 +8,7 @@ export declare const securityApiKeySchema: z.ZodObject<{
9
8
  query: "query";
10
9
  header: "header";
11
10
  }>>>>;
12
- uid: z.core.$ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
11
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme">;
13
12
  nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
14
13
  value: z.ZodDefault<z.ZodString>;
15
14
  }, z.core.$strip>;
@@ -22,7 +21,7 @@ export declare const securityHttpSchema: z.ZodObject<{
22
21
  bearer: "bearer";
23
22
  }>>>>;
24
23
  bearerFormat: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"JWT">, z.ZodString]>>>;
25
- uid: z.core.$ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
24
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme">;
26
25
  nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
27
26
  username: z.ZodDefault<z.ZodString>;
28
27
  password: z.ZodDefault<z.ZodString>;
@@ -33,7 +32,7 @@ export declare const securityOpenIdSchema: z.ZodObject<{
33
32
  description: z.ZodOptional<z.ZodString>;
34
33
  type: z.ZodLiteral<"openIdConnect">;
35
34
  openIdConnectUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
36
- uid: z.core.$ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
35
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme">;
37
36
  nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
38
37
  }, z.core.$strip>;
39
38
  export type SecuritySchemaOpenId = z.infer<typeof securityOpenIdSchema>;
@@ -118,7 +117,7 @@ export declare const securityOauthSchema: z.ZodObject<{
118
117
  }>>;
119
118
  }, z.core.$strip>>;
120
119
  }, z.core.$strip>>;
121
- uid: z.core.$ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
120
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme">;
122
121
  nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
123
122
  }, z.core.$strip>;
124
123
  export type SecuritySchemeOauth2 = z.infer<typeof securityOauthSchema>;
@@ -249,7 +248,7 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
249
248
  query: "query";
250
249
  header: "header";
251
250
  }>>>>;
252
- uid: z.core.$ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
251
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme">;
253
252
  nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
254
253
  value: z.ZodDefault<z.ZodString>;
255
254
  }, z.core.$strip>, z.ZodObject<{
@@ -260,7 +259,7 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
260
259
  bearer: "bearer";
261
260
  }>>>>;
262
261
  bearerFormat: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"JWT">, z.ZodString]>>>;
263
- uid: z.core.$ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
262
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme">;
264
263
  nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
265
264
  username: z.ZodDefault<z.ZodString>;
266
265
  password: z.ZodDefault<z.ZodString>;
@@ -269,7 +268,7 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
269
268
  description: z.ZodOptional<z.ZodString>;
270
269
  type: z.ZodLiteral<"openIdConnect">;
271
270
  openIdConnectUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
272
- uid: z.core.$ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
271
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme">;
273
272
  nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
274
273
  }, z.core.$strip>, z.ZodObject<{
275
274
  description: z.ZodOptional<z.ZodString>;
@@ -350,7 +349,7 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
350
349
  }>>;
351
350
  }, z.core.$strip>>;
352
351
  }, z.core.$strip>>;
353
- uid: z.core.$ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
352
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme">;
354
353
  nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
355
354
  }, z.core.$strip>], "type">, z.ZodTransform<{
356
355
  type: "apiKey";
@@ -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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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAa7B,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"}
@@ -156,7 +156,6 @@ export {
156
156
  securityHttpSchema,
157
157
  securityOauthSchema,
158
158
  securityOpenIdSchema,
159
- securitySchemeApiKeyIn,
160
159
  securitySchemeSchema
161
160
  };
162
161
  //# sourceMappingURL=security-scheme.js.map
@@ -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\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.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: {\n selectedScopes: [],\n scopes: {},\n 'x-scalar-client-id': '',\n refreshUrl: '',\n token: '',\n type: 'implicit',\n authorizationUrl: 'http://localhost:8080',\n 'x-scalar-redirect-uri': defaultRedirectUri,\n },\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,KA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,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;AAGpG,MAAM,0BAA0B,EAAE,MAAM;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAGM,MAAM,uBAAuB,EACjC,mBAAmB,QAAQ,CAAC,sBAAsB,oBAAoB,sBAAsB,mBAAmB,CAAC,EAChH,UAAU,CAAC,SAAS;AAEnB,MAAI,KAAK,SAAS,YAAY,KAAK,kBAAkB,GAAG,QAAQ;AAC9D,UAAM,OAAO,OAAO,KAAK,KAAK,KAAK;AACnC,SAAK,QAAQ,CAAC,QAAQ;AACpB,UAAI,KAAK,MAAM,GAAG,GAAG,kBAAkB,KAAK,kBAAkB,GAAG;AAC/D,aAAK,MAAM,GAAG,EAAE,iBAAiB,CAAC,KAAK,kBAAkB,CAAC,EAAE,KAAK;AAAA,MACnE;AAAA,IACF,CAAC;AAAA,EACH;AACA,SAAO;AACT,CAAC;",
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\nconst 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.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: {\n selectedScopes: [],\n scopes: {},\n 'x-scalar-client-id': '',\n refreshUrl: '',\n token: '',\n type: 'implicit',\n authorizationUrl: 'http://localhost:8080',\n 'x-scalar-redirect-uri': defaultRedirectUri,\n },\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;AAKD,MAAM,yBAAyB,CAAC,SAAS,UAAU,QAAQ;AAE3D,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,sBAA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AAE,OAAO,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;AAGpG,MAAM,0BAA0B,EAAE,MAAM;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAGM,MAAM,uBAAuB,EACjC,mBAAmB,QAAQ,CAAC,sBAAsB,oBAAoB,sBAAsB,mBAAmB,CAAC,EAChH,UAAU,CAAC,SAAS;AAEnB,MAAI,KAAK,SAAS,YAAY,KAAK,kBAAkB,GAAG,QAAQ;AAC9D,UAAM,OAAO,OAAO,KAAK,KAAK,KAAK;AACnC,SAAK,QAAQ,CAAC,QAAQ;AACpB,UAAI,KAAK,MAAM,GAAG,GAAG,kBAAkB,KAAK,kBAAkB,GAAG;AAC/D,aAAK,MAAM,GAAG,EAAE,iBAAiB,CAAC,KAAK,kBAAkB,CAAC,EAAE,KAAK;AAAA,MACnE;AAAA,IACF,CAAC;AAAA,EACH;AACA,SAAO;AACT,CAAC;",
6
6
  "names": []
7
7
  }
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
- /** We should not use these exports anymore, but we need them for commonjs compatibility. */
1
+ /**
2
+ * We should not use these exports anymore, but we need them for commonjs compatibility.
3
+ */
2
4
  export * from './api-reference/index.js';
3
- export * from './legacy/index.js';
5
+ export { XScalarStability } from './legacy/index.js';
4
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAE5F,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,uBAAuB,CAAA;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA"}
package/dist/index.js CHANGED
@@ -1,3 +1,6 @@
1
1
  export * from "./api-reference/index.js";
2
- export * from "./legacy/index.js";
2
+ import { XScalarStability } from "./legacy/index.js";
3
+ export {
4
+ XScalarStability
5
+ };
3
6
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts"],
4
- "sourcesContent": ["/** We should not use these exports anymore, but we need them for commonjs compatibility. */\n\nexport * from './api-reference/index'\nexport * from './legacy/index'\n"],
5
- "mappings": "AAEA,cAAc;AACd,cAAc;",
4
+ "sourcesContent": ["/**\n * We should not use these exports anymore, but we need them for commonjs compatibility.\n */\n\n// biome-ignore lint/performance/noReExportAll: leave this to avoid copy exports\nexport * from './api-reference/index'\nexport { XScalarStability } from './legacy/index'\n"],
5
+ "mappings": "AAKA,cAAc;AACd,SAAS,wBAAwB;",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,4 @@
1
- export * from './reference-config.js';
1
+ /** biome-ignore-all lint/performance/noBarrelFile: entrypoint */
2
+ export type { ContentType, Heading, } from './reference-config.js';
3
+ export { XScalarStability } from './reference-config.js';
2
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/legacy/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/legacy/index.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,YAAY,EACV,WAAW,EACX,OAAO,GACR,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA"}
@@ -1,2 +1,5 @@
1
- export * from "./reference-config.js";
1
+ import { XScalarStability } from "./reference-config.js";
2
+ export {
3
+ XScalarStability
4
+ };
2
5
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/legacy/index.ts"],
4
- "sourcesContent": ["export * from './reference-config'\n"],
5
- "mappings": "AAAA,cAAc;",
4
+ "sourcesContent": ["/** biome-ignore-all lint/performance/noBarrelFile: entrypoint */\nexport type {\n ContentType,\n Heading,\n} from './reference-config'\nexport { XScalarStability } from './reference-config'\n"],
5
+ "mappings": "AAKA,SAAS,wBAAwB;",
6
6
  "names": []
7
7
  }
@@ -1,224 +1,14 @@
1
- import type { OpenAPI, OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types';
2
- import type { ApiReferenceConfiguration } from '../api-reference/index.js';
3
- import type { TargetId } from '../snippetz/index.js';
4
- /**
5
- * This re-export is needed due to a typescript issue
6
- * @see https://github.com/microsoft/TypeScript/issues/42873
7
- */
8
- export type { OpenAPI, OpenAPIV2, OpenAPIV3, OpenAPIV3_1, OpenAPIV3_2, } from '@scalar/openapi-types';
9
- export type ClientInfo = {
10
- key: string;
11
- title: string;
12
- link: string;
13
- description: string;
14
- };
15
- /**
16
- * Alias for the OpenAPI 3.1 ServerObject type
17
- *
18
- * @deprecated Use OpenAPIV3_1.ServerObject instead
19
- */
20
- export type Server = OpenAPIV3_1.ServerObject;
21
- export type TargetInfo = {
22
- key: TargetId;
23
- title: string;
24
- extname: `.${string}` | null;
25
- default: string;
26
- };
27
- export type HiddenClients = true | Partial<Record<TargetInfo['key'], boolean | ClientInfo['key'][]>> | ClientInfo['key'][];
28
- export type PathRouting = {
29
- basePath: string;
30
- };
31
- /**
32
- * @deprecated Use ApiReferenceConfiguration instead
33
- *
34
- * @example import type { ApiReferenceConfiguration } from '@scalar/types/api-reference'
35
- */
36
- export type ReferenceConfiguration = Partial<ApiReferenceConfiguration>;
37
- export type BaseParameter = {
38
- name: string;
39
- description?: string | null;
40
- value: string | number | Record<string, any>;
41
- required?: boolean;
42
- enabled: boolean;
43
- };
44
1
  type OptionalCharset = string | null;
45
2
  export type ContentType = `application/json${OptionalCharset}` | `application/xml${OptionalCharset}` | `text/plain${OptionalCharset}` | `text/html${OptionalCharset}` | `application/octet-stream${OptionalCharset}` | `application/x-www-form-urlencoded${OptionalCharset}` | `multipart/form-data${OptionalCharset}` | `*/*${OptionalCharset}` | `application/vnd.${string}+json${OptionalCharset}`;
46
- export type Cookie = {
47
- name: string;
48
- value: string;
49
- };
50
- export type CustomRequestExample = {
51
- lang: string;
52
- label: string;
53
- source: string;
54
- };
55
- export type Header = {
56
- name: string;
57
- value: string;
58
- };
59
3
  export declare enum XScalarStability {
60
4
  Deprecated = "deprecated",
61
5
  Experimental = "experimental",
62
6
  Stable = "stable"
63
7
  }
64
- export type Operation = {
65
- id: string;
66
- httpVerb: OpenAPIV3_1.HttpMethods;
67
- path: string;
68
- name: string;
69
- isWebhook: boolean;
70
- description?: string;
71
- information: OpenAPIV3_1.OperationObject;
72
- servers?: OpenAPIV3_1.ServerObject[];
73
- pathParameters?: OpenAPIV3_1.ParameterObject[];
74
- };
75
- /**
76
- * @deprecated Use Parameter instead
77
- */
78
- export type Parameters = Parameter;
79
- export type Parameter = {
80
- name: string;
81
- in?: string;
82
- description?: string;
83
- required?: boolean;
84
- deprecated?: boolean;
85
- allowEmptyValue?: boolean;
86
- style?: 'form' | 'simple';
87
- explode?: boolean;
88
- allowReserved?: boolean;
89
- schema?: Schema;
90
- example?: any;
91
- examples?: Map<string, any>;
92
- content?: RequestBodyMimeTypes;
93
- headers?: {
94
- [key: string]: OpenAPI.HeaderObject;
95
- };
96
- };
97
- export type Query = {
98
- name: string;
99
- value: string;
100
- };
101
- export type RequestBodyMimeTypes = {
102
- [K in ContentType]?: {
103
- schema?: any;
104
- example?: any;
105
- examples?: any;
106
- };
107
- };
108
- export type RequestBody = {
109
- description?: string;
110
- required?: boolean;
111
- content?: RequestBodyMimeTypes;
112
- };
113
- export type Schema = {
114
- type: string;
115
- name?: string;
116
- example?: any;
117
- default?: any;
118
- format?: string;
119
- description?: string;
120
- properties?: Record<string, Schema>;
121
- };
122
- /**
123
- * This is a very strange and custom way to represent the operation object.
124
- * It's the outcome of the `parse` helper.
125
- *
126
- * @deprecated This is evil. Stop using it. We'll transition to use the new store.
127
- */
128
- export type TransformedOperation = Operation & {
129
- pathParameters?: Parameter[];
130
- };
131
- export type CollapsedSidebarItems = Record<string, boolean>;
132
- export type AuthenticationState = {
133
- customSecurity?: boolean;
134
- /** You can pre-select a single security scheme, multiple, or complex security using an array of arrays */
135
- preferredSecurityScheme?: string | (string | string[])[] | null;
136
- securitySchemes?: OpenAPIV2.SecurityDefinitionsObject | OpenAPIV3.ComponentsObject['securitySchemes'] | OpenAPIV3_1.ComponentsObject['securitySchemes'];
137
- http?: {
138
- basic?: {
139
- username?: string;
140
- password?: string;
141
- };
142
- bearer?: {
143
- token?: string;
144
- };
145
- };
146
- apiKey?: {
147
- token?: string;
148
- };
149
- oAuth2?: {
150
- clientId?: string;
151
- scopes?: string[];
152
- accessToken?: string;
153
- state?: string;
154
- username?: string;
155
- password?: string;
156
- };
157
- };
158
8
  export type Heading = {
159
9
  depth: number;
160
10
  value: string;
161
11
  slug?: string;
162
12
  };
163
- export type CodeBlockSSRKey = `components-scalar-code-block${number}`;
164
- export type DescriptionSectionSSRKey = `components-Content-Introduction-Description-sections${number}`;
165
- export type ScalarState = {
166
- 'hash'?: string;
167
- 'useGlobalStore-authentication'?: AuthenticationState;
168
- 'useSidebarContent-collapsedSidebarItems'?: CollapsedSidebarItems;
169
- [key: CodeBlockSSRKey]: string;
170
- [key: DescriptionSectionSSRKey]: {
171
- heading: Heading;
172
- content: string;
173
- }[];
174
- };
175
- export type Tag = {
176
- 'name': string;
177
- 'description': string;
178
- 'operations': TransformedOperation[];
179
- 'x-displayName'?: string;
180
- 'externalDocs'?: OpenAPIV3_1.ExternalDocumentationObject;
181
- };
182
- export type TagGroup = {
183
- name: string;
184
- tags: string[];
185
- };
186
- export type Definitions = OpenAPIV2.DefinitionsObject;
187
- /**
188
- * Webhook (after our super custom transformation process)
189
- *
190
- * @deprecated Let's get rid of those super custom transformed entities and use the store instead.
191
- */
192
- export type Webhooks = Record<string, Record<OpenAPIV3_1.HttpMethods, TransformedOperation & {
193
- 'x-internal'?: boolean;
194
- }>>;
195
- /**
196
- * The native OpenAPI Webhook object, but with the x-internal and x-scalar-ignore properties
197
- */
198
- export type Webhook = (OpenAPIV3.OperationObject | OpenAPIV3_1.OperationObject) & {
199
- 'x-internal'?: boolean;
200
- 'x-scalar-ignore'?: boolean;
201
- };
202
- /**
203
- * @deprecated Use `@scalar/openapi-types` instead
204
- */
205
- export type Spec = {
206
- 'tags'?: Tag[];
207
- 'info': Partial<OpenAPIV2.Document['info']> | Partial<OpenAPIV3.Document['info']> | Partial<OpenAPIV3_1.Document['info']>;
208
- 'host'?: OpenAPIV2.Document['host'];
209
- 'basePath'?: OpenAPIV2.Document['basePath'];
210
- 'schemes'?: OpenAPIV2.Document['schemes'];
211
- 'externalDocs'?: {
212
- url: string;
213
- description?: string;
214
- };
215
- 'servers'?: OpenAPIV3.Document['servers'] | OpenAPIV3_1.Document['servers'];
216
- 'components'?: OpenAPIV3.ComponentsObject | OpenAPIV3_1.ComponentsObject;
217
- 'webhooks'?: TransformedOperation[];
218
- 'definitions'?: Definitions;
219
- 'swagger'?: OpenAPIV2.Document['swagger'];
220
- 'openapi'?: OpenAPIV3.Document['openapi'] | OpenAPIV3_1.Document['openapi'];
221
- 'x-tagGroups'?: TagGroup[];
222
- 'security'?: OpenAPIV3.SecurityRequirementObject[];
223
- };
13
+ export {};
224
14
  //# sourceMappingURL=reference-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reference-config.d.ts","sourceRoot":"","sources":["../../src/legacy/reference-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEvF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAA;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAEjD;;;GAGG;AACH,YAAY,EACV,OAAO,EAC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C,MAAM,MAAM,WAAW,GACnB,mBAAmB,eAAe,EAAE,GACpC,kBAAkB,eAAe,EAAE,GACnC,aAAa,eAAe,EAAE,GAC9B,YAAY,eAAe,EAAE,GAC7B,2BAA2B,eAAe,EAAE,GAC5C,oCAAoC,eAAe,EAAE,GACrD,sBAAsB,eAAe,EAAE,GACvC,MAAM,eAAe,EAAE,GACvB,mBAAmB,MAAM,QAAQ,eAAe,EAAE,CAAA;AAEtD,oBAAY,gBAAgB;IAC1B,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAC7B,MAAM,WAAW;CAClB;AAED,MAAM,MAAM,OAAO,GAAG;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,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 OpenAPIV3_2,\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
- "mappings": "AA8FO,IAAK,mBAAL,kBAAKA,sBAAL;AACL,EAAAA,kBAAA,gBAAa;AACb,EAAAA,kBAAA,kBAAe;AACf,EAAAA,kBAAA,YAAS;AAHC,SAAAA;AAAA,GAAA;",
4
+ "sourcesContent": ["type 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 enum XScalarStability {\n Deprecated = 'deprecated',\n Experimental = 'experimental',\n Stable = 'stable',\n}\n\nexport type Heading = {\n depth: number\n value: string\n slug?: string\n}\n"],
5
+ "mappings": "AAaO,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
  }
@@ -1,2 +1,4 @@
1
- export * from './snippetz.js';
1
+ /** biome-ignore-all lint/performance/noBarrelFile: entrypoint */
2
+ export type { AvailableClient, AvailableClients, AvailableClientsArray, ClientId, FormDataParam, HarRequest, Plugin, PluginConfiguration, Target, TargetId, } from './snippetz.js';
3
+ export { AVAILABLE_CLIENTS } from './snippetz.js';
2
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/snippetz/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/snippetz/index.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,QAAQ,EACR,aAAa,EACb,UAAU,EACV,MAAM,EACN,mBAAmB,EACnB,MAAM,EACN,QAAQ,GACT,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA"}
@@ -1,2 +1,5 @@
1
- export * from "./snippetz.js";
1
+ import { AVAILABLE_CLIENTS } from "./snippetz.js";
2
+ export {
3
+ AVAILABLE_CLIENTS
4
+ };
2
5
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/snippetz/index.ts"],
4
- "sourcesContent": ["export * from './snippetz'\n"],
5
- "mappings": "AAAA,cAAc;",
4
+ "sourcesContent": ["/** biome-ignore-all lint/performance/noBarrelFile: entrypoint */\nexport type {\n AvailableClient,\n AvailableClients,\n AvailableClientsArray,\n ClientId,\n FormDataParam,\n HarRequest,\n Plugin,\n PluginConfiguration,\n Target,\n TargetId,\n} from './snippetz'\nexport { AVAILABLE_CLIENTS } from './snippetz'\n"],
5
+ "mappings": "AAaA,SAAS,yBAAyB;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,5 @@
1
+ /** biome-ignore-all lint/performance/noBarrelFile: entrypoint */
2
+ export type { ENTITY_BRANDS } from './nanoid.js';
3
+ export { nanoidSchema } from './nanoid.js';
1
4
  export type { UnknownObject } from './utility-types.js';
2
- export { type ENTITY_BRANDS, nanoidSchema } from './nanoid.js';
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,KAAK,aAAa,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/index.ts"],
4
- "sourcesContent": ["export type { UnknownObject } from './utility-types'\nexport { type ENTITY_BRANDS, nanoidSchema } from './nanoid'\n"],
5
- "mappings": "AACA,SAA6B,oBAAoB;",
4
+ "sourcesContent": ["/** biome-ignore-all lint/performance/noBarrelFile: entrypoint */\nexport type { ENTITY_BRANDS } from './nanoid'\nexport { nanoidSchema } from './nanoid'\nexport type { UnknownObject } from './utility-types'\n"],
5
+ "mappings": "AAEA,SAAS,oBAAoB;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  /** Generates a default value */
3
- export declare const nanoidSchema: z.ZodDefault<z.ZodOptional<z.ZodString>>;
3
+ export declare const nanoidSchema: z.ZodDefault<z.ZodString>;
4
4
  /** UID format for objects */
5
5
  export type Nanoid = z.infer<typeof nanoidSchema>;
6
6
  /** All of our Zod brands for entities, used to brand nanoidSchemas. */
@@ -1 +1 @@
1
- {"version":3,"file":"nanoid.d.ts","sourceRoot":"","sources":["../../src/utils/nanoid.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,gCAAgC;AAChC,eAAO,MAAM,YAAY,0CAIC,CAAA;AAE1B,6BAA6B;AAC7B,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAEjD,uEAAuE;AACvE,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,EAAE,YAAY,CAAA;IACxB,MAAM,EAAE,QAAQ,CAAA;IAChB,WAAW,EAAE,aAAa,CAAA;IAC1B,OAAO,EAAE,SAAS,CAAA;IAClB,SAAS,EAAE,WAAW,CAAA;IACtB,eAAe,EAAE,gBAAgB,CAAA;IACjC,MAAM,EAAE,QAAQ,CAAA;IAChB,GAAG,EAAE,KAAK,CAAA;IACV,SAAS,EAAE,WAAW,CAAA;CACvB,CAAA"}
1
+ {"version":3,"file":"nanoid.d.ts","sourceRoot":"","sources":["../../src/utils/nanoid.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,gCAAgC;AAChC,eAAO,MAAM,YAAY,2BAGC,CAAA;AAE1B,6BAA6B;AAC7B,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAEjD,uEAAuE;AACvE,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,EAAE,YAAY,CAAA;IACxB,MAAM,EAAE,QAAQ,CAAA;IAChB,WAAW,EAAE,aAAa,CAAA;IAC1B,OAAO,EAAE,SAAS,CAAA;IAClB,SAAS,EAAE,WAAW,CAAA;IACtB,eAAe,EAAE,gBAAgB,CAAA;IACjC,MAAM,EAAE,QAAQ,CAAA;IAChB,GAAG,EAAE,KAAK,CAAA;IACV,SAAS,EAAE,WAAW,CAAA;CACvB,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { nanoid } from "nanoid";
2
2
  import { z } from "zod";
3
- const nanoidSchema = z.string().min(7).optional().default(() => nanoid());
3
+ const nanoidSchema = z.string().min(7).default(() => nanoid());
4
4
  export {
5
5
  nanoidSchema
6
6
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/nanoid.ts"],
4
- "sourcesContent": ["import { nanoid } from 'nanoid'\nimport { z } from 'zod'\n\n/** Generates a default value */\nexport const nanoidSchema = z\n .string()\n .min(7)\n .optional()\n .default(() => nanoid())\n\n/** UID format for objects */\nexport type Nanoid = z.infer<typeof nanoidSchema>\n\n/** All of our Zod brands for entities, used to brand nanoidSchemas. */\nexport type ENTITY_BRANDS = {\n COLLECTION: 'collection'\n COOKIE: 'cookie'\n ENVIRONMENT: 'environment'\n EXAMPLE: 'example'\n OPERATION: 'operation'\n SECURITY_SCHEME: 'securityScheme'\n SERVER: 'server'\n TAG: 'tag'\n WORKSPACE: 'workspace'\n}\n"],
5
- "mappings": "AAAA,SAAS,cAAc;AACvB,SAAS,SAAS;AAGX,MAAM,eAAe,EACzB,OAAO,EACP,IAAI,CAAC,EACL,SAAS,EACT,QAAQ,MAAM,OAAO,CAAC;",
4
+ "sourcesContent": ["import { nanoid } from 'nanoid'\nimport { z } from 'zod'\n\n/** Generates a default value */\nexport const nanoidSchema = z\n .string()\n .min(7)\n .default(() => nanoid())\n\n/** UID format for objects */\nexport type Nanoid = z.infer<typeof nanoidSchema>\n\n/** All of our Zod brands for entities, used to brand nanoidSchemas. */\nexport type ENTITY_BRANDS = {\n COLLECTION: 'collection'\n COOKIE: 'cookie'\n ENVIRONMENT: 'environment'\n EXAMPLE: 'example'\n OPERATION: 'operation'\n SECURITY_SCHEME: 'securityScheme'\n SERVER: 'server'\n TAG: 'tag'\n WORKSPACE: 'workspace'\n}\n"],
5
+ "mappings": "AAAA,SAAS,cAAc;AACvB,SAAS,SAAS;AAGX,MAAM,eAAe,EACzB,OAAO,EACP,IAAI,CAAC,EACL,QAAQ,MAAM,OAAO,CAAC;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "scalar",
17
17
  "references"
18
18
  ],
19
- "version": "0.4.0",
19
+ "version": "0.5.1",
20
20
  "engines": {
21
21
  "node": ">=20"
22
22
  },
@@ -28,11 +28,6 @@
28
28
  "types": "./dist/index.d.ts",
29
29
  "default": "./dist/index.js"
30
30
  },
31
- "./api-client": {
32
- "import": "./dist/api-client/index.js",
33
- "types": "./dist/api-client/index.d.ts",
34
- "default": "./dist/api-client/index.js"
35
- },
36
31
  "./api-reference": {
37
32
  "import": "./dist/api-reference/index.js",
38
33
  "types": "./dist/api-reference/index.d.ts",
@@ -66,13 +61,12 @@
66
61
  "dependencies": {
67
62
  "nanoid": "5.1.5",
68
63
  "type-fest": "5.0.0",
69
- "zod": "4.1.11",
70
- "@scalar/openapi-types": "0.5.1"
64
+ "zod": "4.1.11"
71
65
  },
72
66
  "devDependencies": {
73
67
  "@types/har-format": "^1.2.15",
74
68
  "vite": "7.1.11",
75
- "@scalar/build-tooling": "0.2.8"
69
+ "@scalar/build-tooling": "0.3.1"
76
70
  },
77
71
  "scripts": {
78
72
  "build": "scalar-build-esbuild",