@scalar/types 0.7.3 → 0.7.5

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 (54) hide show
  1. package/CHANGELOG.md +12 -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-client-configuration.js +3 -7
  5. package/dist/api-reference/api-client-plugin.js +32 -30
  6. package/dist/api-reference/api-reference-configuration.d.ts +6 -0
  7. package/dist/api-reference/api-reference-configuration.d.ts.map +1 -1
  8. package/dist/api-reference/api-reference-configuration.js +404 -361
  9. package/dist/api-reference/api-reference-plugin.js +43 -47
  10. package/dist/api-reference/authentication-configuration.js +1 -1
  11. package/dist/api-reference/authentication-configuration.test-d.js +41 -42
  12. package/dist/api-reference/base-configuration.d.ts +15 -0
  13. package/dist/api-reference/base-configuration.d.ts.map +1 -1
  14. package/dist/api-reference/base-configuration.js +158 -146
  15. package/dist/api-reference/html-api.js +1 -1
  16. package/dist/api-reference/html-rendering-configuration.js +19 -20
  17. package/dist/api-reference/index.d.ts +1 -0
  18. package/dist/api-reference/index.d.ts.map +1 -1
  19. package/dist/api-reference/index.js +5 -26
  20. package/dist/api-reference/source-configuration.js +105 -96
  21. package/dist/entities/index.js +1 -21
  22. package/dist/entities/security-scheme.js +179 -140
  23. package/dist/index.js +6 -6
  24. package/dist/legacy/index.js +1 -5
  25. package/dist/legacy/reference-config.js +6 -10
  26. package/dist/snippetz/index.js +1 -6
  27. package/dist/snippetz/snippetz.js +35 -31
  28. package/dist/snippetz/snippetz.test-d.js +30 -27
  29. package/dist/utils/index.js +1 -5
  30. package/dist/utils/nanoid.js +7 -7
  31. package/dist/utils/utility-types.js +1 -1
  32. package/package.json +5 -9
  33. package/dist/api-reference/api-client-configuration.js.map +0 -7
  34. package/dist/api-reference/api-client-plugin.js.map +0 -7
  35. package/dist/api-reference/api-reference-configuration.js.map +0 -7
  36. package/dist/api-reference/api-reference-plugin.js.map +0 -7
  37. package/dist/api-reference/authentication-configuration.js.map +0 -7
  38. package/dist/api-reference/authentication-configuration.test-d.js.map +0 -7
  39. package/dist/api-reference/base-configuration.js.map +0 -7
  40. package/dist/api-reference/html-api.js.map +0 -7
  41. package/dist/api-reference/html-rendering-configuration.js.map +0 -7
  42. package/dist/api-reference/index.js.map +0 -7
  43. package/dist/api-reference/source-configuration.js.map +0 -7
  44. package/dist/entities/index.js.map +0 -7
  45. package/dist/entities/security-scheme.js.map +0 -7
  46. package/dist/index.js.map +0 -7
  47. package/dist/legacy/index.js.map +0 -7
  48. package/dist/legacy/reference-config.js.map +0 -7
  49. package/dist/snippetz/index.js.map +0 -7
  50. package/dist/snippetz/snippetz.js.map +0 -7
  51. package/dist/snippetz/snippetz.test-d.js.map +0 -7
  52. package/dist/utils/index.js.map +0 -7
  53. package/dist/utils/nanoid.js.map +0 -7
  54. package/dist/utils/utility-types.js.map +0 -7
@@ -1,55 +1,51 @@
1
- import { z } from "zod";
1
+ import { z } from 'zod';
2
2
  const openApiExtensionSchema = z.object({
3
- /**
4
- * Name of specification extension property. Has to start with `x-`.
5
- *
6
- * @example
7
- * ```yaml
8
- * x-custom-extension: foobar
9
- * ```
10
- */
11
- name: z.string().regex(/^x-/),
12
- /**
13
- * Vue component to render the specification extension
14
- */
15
- component: z.unknown(),
16
- /**
17
- * Custom renderer to render the specification extension
18
- */
19
- renderer: z.unknown().optional()
3
+ /**
4
+ * Name of specification extension property. Has to start with `x-`.
5
+ *
6
+ * @example
7
+ * ```yaml
8
+ * x-custom-extension: foobar
9
+ * ```
10
+ */
11
+ name: z.string().regex(/^x-/),
12
+ /**
13
+ * Vue component to render the specification extension
14
+ */
15
+ component: z.unknown(),
16
+ /**
17
+ * Custom renderer to render the specification extension
18
+ */
19
+ renderer: z.unknown().optional(),
20
20
  });
21
21
  const viewComponentSchema = z.object({
22
- /**
23
- * Vue component to render in the view
24
- */
25
- component: z.unknown(),
26
- /**
27
- * Custom renderer to render the view component (e.g., ReactRenderer)
28
- */
29
- renderer: z.unknown().optional(),
30
- /**
31
- * Additional props to pass to the component
32
- */
33
- props: z.record(z.string(), z.any()).optional()
22
+ /**
23
+ * Vue component to render in the view
24
+ */
25
+ component: z.unknown(),
26
+ /**
27
+ * Custom renderer to render the view component (e.g., ReactRenderer)
28
+ */
29
+ renderer: z.unknown().optional(),
30
+ /**
31
+ * Additional props to pass to the component
32
+ */
33
+ props: z.record(z.string(), z.any()).optional(),
34
34
  });
35
35
  const viewsSchema = z.object({
36
- /**
37
- * Renders after the Models section
38
- */
39
- "content.end": z.array(viewComponentSchema).optional()
40
- });
41
- const apiReferencePluginSchema = z.function({
42
- input: [],
43
- output: z.object({
44
- name: z.string(),
45
- extensions: z.array(openApiExtensionSchema),
46
36
  /**
47
- * Components to render at specific views in the API Reference
37
+ * Renders after the Models section
48
38
  */
49
- views: viewsSchema.optional()
50
- })
39
+ 'content.end': z.array(viewComponentSchema).optional(),
40
+ });
41
+ export const apiReferencePluginSchema = z.function({
42
+ input: [],
43
+ output: z.object({
44
+ name: z.string(),
45
+ extensions: z.array(openApiExtensionSchema),
46
+ /**
47
+ * Components to render at specific views in the API Reference
48
+ */
49
+ views: viewsSchema.optional(),
50
+ }),
51
51
  });
52
- export {
53
- apiReferencePluginSchema
54
- };
55
- //# sourceMappingURL=api-reference-plugin.js.map
@@ -1 +1 @@
1
- //# sourceMappingURL=authentication-configuration.js.map
1
+ export {};
@@ -1,45 +1,44 @@
1
- import { assertType, describe, it } from "vitest";
2
- describe("ApiReferenceConfiguration", () => {
3
- it("ensure we are generating correct types for preferredSecurityScheme", () => {
4
- assertType({ preferredSecurityScheme: "apiKey" });
5
- assertType({ preferredSecurityScheme: ["apiKey", "bearerAuth"] });
6
- assertType({
7
- preferredSecurityScheme: ["apiKey", ["basic", "oauth2"], ["apiKey", "bearerAuth", "oauth2"]]
1
+ import { assertType, describe, it } from 'vitest';
2
+ describe('ApiReferenceConfiguration', () => {
3
+ it('ensure we are generating correct types for preferredSecurityScheme', () => {
4
+ assertType({ preferredSecurityScheme: 'apiKey' });
5
+ assertType({ preferredSecurityScheme: ['apiKey', 'bearerAuth'] });
6
+ assertType({
7
+ preferredSecurityScheme: ['apiKey', ['basic', 'oauth2'], ['apiKey', 'bearerAuth', 'oauth2']],
8
+ });
9
+ assertType({
10
+ // @ts-expect-error incorrect type
11
+ preferredSecurityScheme: 47,
12
+ });
13
+ assertType({
14
+ // @ts-expect-error incorrect type
15
+ preferredSecurityScheme: [22, null],
16
+ });
8
17
  });
9
- assertType({
10
- // @ts-expect-error incorrect type
11
- preferredSecurityScheme: 47
18
+ it('ensure we are generating correct types for securitySchemes', () => {
19
+ assertType({
20
+ securitySchemes: {
21
+ apiKey: { type: 'apiKey', name: 'api_key', in: 'header' },
22
+ },
23
+ });
24
+ assertType({
25
+ securitySchemes: {
26
+ bearerAuth: { type: 'http', scheme: 'bearer', bearerFormat: 'JWT' },
27
+ },
28
+ });
29
+ assertType({
30
+ securitySchemes: {
31
+ oauth2: {
32
+ type: 'oauth2',
33
+ flows: {
34
+ implicit: { scopes: { 'read:items': 'Read access to items' } },
35
+ password: {
36
+ username: 'username',
37
+ password: 'password',
38
+ },
39
+ },
40
+ },
41
+ },
42
+ });
12
43
  });
13
- assertType({
14
- // @ts-expect-error incorrect type
15
- preferredSecurityScheme: [22, null]
16
- });
17
- });
18
- it("ensure we are generating correct types for securitySchemes", () => {
19
- assertType({
20
- securitySchemes: {
21
- apiKey: { type: "apiKey", name: "api_key", in: "header" }
22
- }
23
- });
24
- assertType({
25
- securitySchemes: {
26
- bearerAuth: { type: "http", scheme: "bearer", bearerFormat: "JWT" }
27
- }
28
- });
29
- assertType({
30
- securitySchemes: {
31
- oauth2: {
32
- type: "oauth2",
33
- flows: {
34
- implicit: { scopes: { "read:items": "Read access to items" } },
35
- password: {
36
- username: "username",
37
- password: "password"
38
- }
39
- }
40
- }
41
- }
42
- });
43
- });
44
44
  });
45
- //# sourceMappingURL=authentication-configuration.test-d.js.map
@@ -1,4 +1,12 @@
1
1
  import z from 'zod';
2
+ declare const externalUrlsSchema: z.ZodObject<{
3
+ dashboardUrl: z.ZodPrefault<z.ZodString>;
4
+ registryUrl: z.ZodPrefault<z.ZodString>;
5
+ proxyUrl: z.ZodPrefault<z.ZodString>;
6
+ apiBaseUrl: z.ZodPrefault<z.ZodString>;
7
+ }, z.core.$strip>;
8
+ /** External service URLs used by Scalar packages */
9
+ export type ExternalUrls = z.output<typeof externalUrlsSchema>;
2
10
  export declare const OLD_PROXY_URL = "https://api.scalar.com/request-proxy";
3
11
  export declare const NEW_PROXY_URL = "https://proxy.scalar.com";
4
12
  /** Shared configuration for the Api Reference and Api Client */
@@ -120,5 +128,12 @@ export declare const baseConfigurationSchema: z.ZodObject<{
120
128
  }, z.core.$strip>>;
121
129
  }, z.core.$strip>>>>;
122
130
  telemetry: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
131
+ externalUrls: z.ZodPrefault<z.ZodObject<{
132
+ dashboardUrl: z.ZodPrefault<z.ZodString>;
133
+ registryUrl: z.ZodPrefault<z.ZodString>;
134
+ proxyUrl: z.ZodPrefault<z.ZodString>;
135
+ apiBaseUrl: z.ZodPrefault<z.ZodString>;
136
+ }, z.core.$strip>>;
123
137
  }, z.core.$strip>;
138
+ export {};
124
139
  //# sourceMappingURL=base-configuration.d.ts.map
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiJlC,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,QAAA,MAAM,kBAAkB;;;;;iBAKtB,CAAA;AAEF,oDAAoD;AACpD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE9D,eAAO,MAAM,aAAa,yCAAyC,CAAA;AACnE,eAAO,MAAM,aAAa,6BAA6B,CAAA;AAEvD,gEAAgE;AAChE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmJlC,CAAA"}
@@ -1,147 +1,159 @@
1
- import z from "zod";
2
- import { apiClientPluginSchema } from "./api-client-plugin.js";
3
- const OLD_PROXY_URL = "https://api.scalar.com/request-proxy";
4
- const NEW_PROXY_URL = "https://proxy.scalar.com";
5
- const baseConfigurationSchema = z.object({
6
- /**
7
- * The title of the OpenAPI document.
8
- *
9
- * @example 'Scalar Galaxy'
10
- */
11
- title: z.string().optional(),
12
- /**
13
- * The slug of the OpenAPI document used in the URL.
14
- *
15
- * If none is passed, the title will be used.
16
- *
17
- * If no title is used, it'll just use the index.
18
- *
19
- * @example 'scalar-galaxy'
20
- */
21
- slug: z.string().optional(),
22
- /** Prefill authentication */
23
- authentication: z.any().optional(),
24
- // Temp until we bring in the new auth
25
- /** Base URL for the API server */
26
- baseServerURL: z.string().optional(),
27
- /**
28
- * Whether to hide the client button
29
- * @default false
30
- */
31
- hideClientButton: z.boolean().optional().default(false).catch(false),
32
- /** URL to a request proxy for the API client */
33
- proxyUrl: z.string().optional(),
34
- /** Key used with CTRL/CMD to open the search modal (defaults to 'k' e.g. CMD+k) */
35
- searchHotKey: z.enum([
36
- "a",
37
- "b",
38
- "c",
39
- "d",
40
- "e",
41
- "f",
42
- "g",
43
- "h",
44
- "i",
45
- "j",
46
- "k",
47
- "l",
48
- "m",
49
- "n",
50
- "o",
51
- "p",
52
- "q",
53
- "r",
54
- "s",
55
- "t",
56
- "u",
57
- "v",
58
- "w",
59
- "x",
60
- "y",
61
- "z"
62
- ]).optional(),
63
- /** List of OpenAPI server objects */
64
- servers: z.array(z.any()).optional(),
65
- // Using any for OpenAPIV3_1.ServerObject
66
- /**
67
- * Whether to show the sidebar
68
- * @default true
69
- */
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"),
77
- /**
78
- * Sets the visibility of the developer tools
79
- * @default 'localhost' to only show the toolbar on localhost or similar hosts
80
- * @deprecated Use showDeveloperTools instead
81
- */
82
- showToolbar: z.enum(["always", "localhost", "never"]).optional().default("localhost").catch("localhost"),
83
- /**
84
- * Whether to use the operation summary or the operation path for the sidebar and search
85
- * @default 'summary'
86
- */
87
- operationTitleSource: z.enum(["summary", "path"]).optional().default("summary").catch("summary"),
88
- /** A string to use one of the color presets */
89
- theme: z.enum([
90
- "alternate",
91
- "default",
92
- "moon",
93
- "purple",
94
- "solarized",
95
- "bluePlanet",
96
- "deepSpace",
97
- "saturn",
98
- "kepler",
99
- "elysiajs",
100
- "fastify",
101
- "mars",
102
- "laserwave",
103
- "none"
104
- ]).optional().default("default").catch("default"),
105
- /** Integration type identifier */
106
- _integration: z.enum([
107
- "adonisjs",
108
- "astro",
109
- "docusaurus",
110
- "dotnet",
111
- "elysiajs",
112
- "express",
113
- "fastapi",
114
- "fastify",
115
- "go",
116
- "hono",
117
- "html",
118
- "laravel",
119
- "litestar",
120
- "nestjs",
121
- "nextjs",
122
- "nitro",
123
- "nuxt",
124
- "platformatic",
125
- "react",
126
- "rust",
127
- "svelte",
128
- "vue"
129
- ]).nullable().optional(),
130
- /** onRequestSent is fired when a request is sent */
131
- onRequestSent: z.function({
132
- input: [z.string()],
133
- output: z.void()
134
- }).optional(),
135
- /** Whether to persist auth to local storage */
136
- persistAuth: z.boolean().optional().default(false).catch(false),
137
- /** Plugins for the API client */
138
- plugins: z.array(apiClientPluginSchema).optional(),
139
- /** Enables / disables telemetry*/
140
- telemetry: z.boolean().optional().default(true)
1
+ import z from 'zod';
2
+ import { apiClientPluginSchema } from './api-client-plugin.js';
3
+ const externalUrlsSchema = z.object({
4
+ dashboardUrl: z.string().prefault('https://dashboard.scalar.com'),
5
+ registryUrl: z.string().prefault('https://registry.scalar.com'),
6
+ proxyUrl: z.string().prefault('https://proxy.scalar.com'),
7
+ apiBaseUrl: z.string().prefault('https://api.scalar.com'),
8
+ });
9
+ export const OLD_PROXY_URL = 'https://api.scalar.com/request-proxy';
10
+ export const NEW_PROXY_URL = 'https://proxy.scalar.com';
11
+ /** Shared configuration for the Api Reference and Api Client */
12
+ export const baseConfigurationSchema = z.object({
13
+ /**
14
+ * The title of the OpenAPI document.
15
+ *
16
+ * @example 'Scalar Galaxy'
17
+ */
18
+ title: z.string().optional(),
19
+ /**
20
+ * The slug of the OpenAPI document used in the URL.
21
+ *
22
+ * If none is passed, the title will be used.
23
+ *
24
+ * If no title is used, it'll just use the index.
25
+ *
26
+ * @example 'scalar-galaxy'
27
+ */
28
+ slug: z.string().optional(),
29
+ /** Prefill authentication */
30
+ authentication: z.any().optional(), // Temp until we bring in the new auth
31
+ /** Base URL for the API server */
32
+ baseServerURL: z.string().optional(),
33
+ /**
34
+ * Whether to hide the client button
35
+ * @default false
36
+ */
37
+ hideClientButton: z.boolean().optional().default(false).catch(false),
38
+ /** URL to a request proxy for the API client */
39
+ proxyUrl: z.string().optional(),
40
+ /** Key used with CTRL/CMD to open the search modal (defaults to 'k' e.g. CMD+k) */
41
+ searchHotKey: z
42
+ .enum([
43
+ 'a',
44
+ 'b',
45
+ 'c',
46
+ 'd',
47
+ 'e',
48
+ 'f',
49
+ 'g',
50
+ 'h',
51
+ 'i',
52
+ 'j',
53
+ 'k',
54
+ 'l',
55
+ 'm',
56
+ 'n',
57
+ 'o',
58
+ 'p',
59
+ 'q',
60
+ 'r',
61
+ 's',
62
+ 't',
63
+ 'u',
64
+ 'v',
65
+ 'w',
66
+ 'x',
67
+ 'y',
68
+ 'z',
69
+ ])
70
+ .optional(),
71
+ /** List of OpenAPI server objects */
72
+ servers: z.array(z.any()).optional(), // Using any for OpenAPIV3_1.ServerObject
73
+ /**
74
+ * Whether to show the sidebar
75
+ * @default true
76
+ */
77
+ showSidebar: z.boolean().optional().default(true).catch(true),
78
+ /**
79
+ * Whether and when to show the developer tools.
80
+ *
81
+ * @default 'localhost' to only show the toolbar on localhost or similar hosts
82
+ */
83
+ showDeveloperTools: z.enum(['always', 'localhost', 'never']).optional().default('localhost').catch('localhost'),
84
+ /**
85
+ * Sets the visibility of the developer tools
86
+ * @default 'localhost' to only show the toolbar on localhost or similar hosts
87
+ * @deprecated Use showDeveloperTools instead
88
+ */
89
+ showToolbar: z.enum(['always', 'localhost', 'never']).optional().default('localhost').catch('localhost'),
90
+ /**
91
+ * Whether to use the operation summary or the operation path for the sidebar and search
92
+ * @default 'summary'
93
+ */
94
+ operationTitleSource: z.enum(['summary', 'path']).optional().default('summary').catch('summary'),
95
+ /** A string to use one of the color presets */
96
+ theme: z
97
+ .enum([
98
+ 'alternate',
99
+ 'default',
100
+ 'moon',
101
+ 'purple',
102
+ 'solarized',
103
+ 'bluePlanet',
104
+ 'deepSpace',
105
+ 'saturn',
106
+ 'kepler',
107
+ 'elysiajs',
108
+ 'fastify',
109
+ 'mars',
110
+ 'laserwave',
111
+ 'none',
112
+ ])
113
+ .optional()
114
+ .default('default')
115
+ .catch('default'),
116
+ /** Integration type identifier */
117
+ _integration: z
118
+ .enum([
119
+ 'adonisjs',
120
+ 'astro',
121
+ 'docusaurus',
122
+ 'dotnet',
123
+ 'elysiajs',
124
+ 'express',
125
+ 'fastapi',
126
+ 'fastify',
127
+ 'go',
128
+ 'hono',
129
+ 'html',
130
+ 'laravel',
131
+ 'litestar',
132
+ 'nestjs',
133
+ 'nextjs',
134
+ 'nitro',
135
+ 'nuxt',
136
+ 'platformatic',
137
+ 'react',
138
+ 'rust',
139
+ 'svelte',
140
+ 'vue',
141
+ ])
142
+ .nullable()
143
+ .optional(),
144
+ /** onRequestSent is fired when a request is sent */
145
+ onRequestSent: z
146
+ .function({
147
+ input: [z.string()],
148
+ output: z.void(),
149
+ })
150
+ .optional(),
151
+ /** Whether to persist auth to local storage */
152
+ persistAuth: z.boolean().optional().default(false).catch(false),
153
+ /** Plugins for the API client */
154
+ plugins: z.array(apiClientPluginSchema).optional(),
155
+ /** Enables / disables telemetry*/
156
+ telemetry: z.boolean().optional().default(true),
157
+ /** A bunch of external URLs to Scalar's services. */
158
+ externalUrls: externalUrlsSchema.prefault({}),
141
159
  });
142
- export {
143
- NEW_PROXY_URL,
144
- OLD_PROXY_URL,
145
- baseConfigurationSchema
146
- };
147
- //# sourceMappingURL=base-configuration.js.map
@@ -1 +1 @@
1
- //# sourceMappingURL=html-api.js.map
1
+ export {};
@@ -1,21 +1,20 @@
1
- import { z } from "zod";
2
- const htmlRenderingConfigurationSchema = z.object({
3
- /**
4
- * The URL to the Scalar API Reference JS CDN.
5
- *
6
- * Use this to pin a specific version of the Scalar API Reference.
7
- *
8
- * @default https://cdn.jsdelivr.net/npm/@scalar/api-reference
9
- *
10
- * @example https://cdn.jsdelivr.net/npm/@scalar/api-reference@1.25.122
11
- */
12
- cdn: z.string().optional().default("https://cdn.jsdelivr.net/npm/@scalar/api-reference"),
13
- /**
14
- * The title of the page.
15
- */
16
- pageTitle: z.string().optional().default("Scalar API Reference")
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schema for HTML rendering configuration
4
+ */
5
+ export const htmlRenderingConfigurationSchema = z.object({
6
+ /**
7
+ * The URL to the Scalar API Reference JS CDN.
8
+ *
9
+ * Use this to pin a specific version of the Scalar API Reference.
10
+ *
11
+ * @default https://cdn.jsdelivr.net/npm/@scalar/api-reference
12
+ *
13
+ * @example https://cdn.jsdelivr.net/npm/@scalar/api-reference@1.25.122
14
+ */
15
+ cdn: z.string().optional().default('https://cdn.jsdelivr.net/npm/@scalar/api-reference'),
16
+ /**
17
+ * The title of the page.
18
+ */
19
+ pageTitle: z.string().optional().default('Scalar API Reference'),
17
20
  });
18
- export {
19
- htmlRenderingConfigurationSchema
20
- };
21
- //# sourceMappingURL=html-rendering-configuration.js.map
@@ -3,6 +3,7 @@ export { type ApiClientPlugin, apiClientPluginSchema, hooksSchema } from './api-
3
3
  export { type AnyApiReferenceConfiguration, type ApiReferenceConfiguration, type ApiReferenceConfigurationRaw, type ApiReferenceConfigurationWithMultipleSources, type ApiReferenceConfigurationWithSource, apiReferenceConfigurationSchema, apiReferenceConfigurationWithSourceSchema, isConfigurationWithSources, } from './api-reference-configuration.js';
4
4
  export type { ApiReferencePlugin, SpecificationExtension, ViewComponent, } from './api-reference-plugin.js';
5
5
  export type { AuthenticationConfiguration } from './authentication-configuration.js';
6
+ export type { ExternalUrls } from './base-configuration.js';
6
7
  export type { ApiReferenceInstance, CreateApiReference } from './html-api.js';
7
8
  export { type HtmlRenderingConfiguration, htmlRenderingConfigurationSchema, } from './html-rendering-configuration.js';
8
9
  export { type SourceConfiguration, sourceConfigurationSchema, } from './source-configuration.js';
@@ -1 +1 @@
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,2BAA2B,EAAE,MAAM,gCAAgC,CAAA;AACjF,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,2BAA2B,EAAE,MAAM,gCAAgC,CAAA;AACjF,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,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,26 +1,5 @@
1
- import {
2
- apiClientConfigurationSchema
3
- } from "./api-client-configuration.js";
4
- import { apiClientPluginSchema, hooksSchema } from "./api-client-plugin.js";
5
- import {
6
- apiReferenceConfigurationSchema,
7
- apiReferenceConfigurationWithSourceSchema,
8
- isConfigurationWithSources
9
- } from "./api-reference-configuration.js";
10
- import {
11
- htmlRenderingConfigurationSchema
12
- } from "./html-rendering-configuration.js";
13
- import {
14
- sourceConfigurationSchema
15
- } from "./source-configuration.js";
16
- export {
17
- apiClientConfigurationSchema,
18
- apiClientPluginSchema,
19
- apiReferenceConfigurationSchema,
20
- apiReferenceConfigurationWithSourceSchema,
21
- hooksSchema,
22
- htmlRenderingConfigurationSchema,
23
- isConfigurationWithSources,
24
- sourceConfigurationSchema
25
- };
26
- //# sourceMappingURL=index.js.map
1
+ export { apiClientConfigurationSchema, } from './api-client-configuration.js';
2
+ export { apiClientPluginSchema, hooksSchema } from './api-client-plugin.js';
3
+ export { apiReferenceConfigurationSchema, apiReferenceConfigurationWithSourceSchema, isConfigurationWithSources, } from './api-reference-configuration.js';
4
+ export { htmlRenderingConfigurationSchema, } from './html-rendering-configuration.js';
5
+ export { sourceConfigurationSchema, } from './source-configuration.js';