@scalar/types 0.2.15 → 0.3.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"api-reference-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/api-reference-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAA;AAgFjF,0DAA0D;AAC1D,eAAO,MAAM,uBAAuB;IAClC;;;;;;;;;;;;;;;;;QAiBI;;IAEJ;;;;;;;;;;;;;;;;;;;;QAoBI;;IAEJ;;;;;;OAMG;;IAEH;;;;;;;;;;OAUG;;;;;;;;;;;;EAEH,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAQvE,uCAAuC;AACvC,eAAO,MAAM,4BAA4B;IACvC;;QAEI;;IAEJ;;;;;QAKI;;IAEJ;;;;OAIG;;IAEH;;;;;;;;OAQG;;IAEH;;;;QAII;;QAvGJ;;;;;;;;;;;;;;;;;YAiBI;;QAEJ;;;;;;;;;;;;;;;;;;;;YAoBI;;QAEJ;;;;;;WAMG;;QAEH;;;;;;;;;;WAUG;;;;;;;;;;;;;IA8CH,6BAA6B;;IAE7B,kCAAkC;;IAElC;;;OAGG;;IAEH,gDAAgD;;IAEhD,mFAAmF;;IAEnF,qCAAqC;;IAErC;;;OAGG;;IAEH;;;OAGG;;IAEH,+CAA+C;;IAE/C,kCAAkC;;IAElC,oDAAoD;;IAEpD,+CAA+C;;IAE/C,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEjC,kCA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmEwG,CAAA;AAE/G,yDAAyD;AACzD,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC1C,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,EAEhD,OAAO,GAAG,MAAM,GAAG,gBAAgB,CACpC,GAAG;IACF,cAAc,CAAC,EAAE,2BAA2B,CAAA;CAC7C,CAAA;AAED,mDAAmD;AACnD,KAAK,oCAAoC,GAAG,yBAAyB,GAAG;IACtE,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,qDAAqD;AACrD,MAAM,MAAM,oCAAoC,GAAG,IAAI,CAAC,oCAAoC,EAAE,SAAS,CAAC,GAAG;IACzG,OAAO,EAAE,CAAC,iBAAiB,GAAG;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,EAAE,CAAA;CACvD,CAAA;AAED,gDAAgD;AAChD,MAAM,MAAM,4BAA4B,GACpC,OAAO,CAAC,yBAAyB,CAAC,GAClC,OAAO,CAAC,oCAAoC,CAAC,GAC7C,OAAO,CAAC,oCAAoC,CAAC,EAAE,GAC/C,OAAO,CAAC,oCAAoC,CAAC,EAAE,CAAA;AAEnD,uEAAuE;AACvE,eAAO,MAAM,0BAA0B,GACrC,QAAQ,4BAA4B,KACnC,MAAM,IAAI,OAAO,CAAC,oCAAoC,CAC0C,CAAA"}
1
+ {"version":3,"file":"api-reference-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/api-reference-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gC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,CAAA;AAED,mDAAmD;AACnD,KAAK,oCAAoC,GAAG,yBAAyB,GAAG;IACtE,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,qDAAqD;AACrD,MAAM,MAAM,oCAAoC,GAAG,IAAI,CAAC,oCAAoC,EAAE,SAAS,CAAC,GAAG;IACzG,OAAO,EAAE,CAAC,iBAAiB,GAAG;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,EAAE,CAAA;CACvD,CAAA;AAED,gDAAgD;AAChD,MAAM,MAAM,4BAA4B,GACpC,OAAO,CAAC,yBAAyB,CAAC,GAClC,OAAO,CAAC,oCAAoC,CAAC,GAC7C,OAAO,CAAC,oCAAoC,CAAC,EAAE,GAC/C,OAAO,CAAC,oCAAoC,CAAC,EAAE,CAAA;AAEnD,uEAAuE;AACvE,eAAO,MAAM,0BAA0B,GACrC,QAAQ,4BAA4B,KACnC,MAAM,IAAI,OAAO,CAAC,oCAAoC,CAC0C,CAAA"}
@@ -110,7 +110,15 @@ const specConfigurationSchema = z.object({
110
110
  * }
111
111
  * ```
112
112
  **/
113
- content: z.union([z.string(), z.record(z.any()), z.function().returns(z.record(z.any())), z.null()]).optional(),
113
+ content: z.union([
114
+ z.string(),
115
+ z.null(),
116
+ z.record(z.string(), z.any()),
117
+ z.function({
118
+ input: [],
119
+ output: z.record(z.string(), z.any())
120
+ })
121
+ ]).optional(),
114
122
  /**
115
123
  * The title of the OpenAPI document.
116
124
  *
@@ -147,7 +155,15 @@ const apiClientConfigurationSchema = z.object({
147
155
  *
148
156
  * @remarks It's recommended to pass a URL instead of content.
149
157
  **/
150
- content: z.union([z.string(), z.record(z.any()), z.function().returns(z.record(z.any())), z.null()]).optional(),
158
+ content: z.union([
159
+ z.string(),
160
+ z.null(),
161
+ z.record(z.string(), z.any()),
162
+ z.function({
163
+ input: [],
164
+ output: z.record(z.string(), z.any())
165
+ })
166
+ ]).optional(),
151
167
  /**
152
168
  * The title of the OpenAPI document.
153
169
  *
@@ -192,6 +208,11 @@ const apiClientConfigurationSchema = z.object({
192
208
  * @default true
193
209
  */
194
210
  showSidebar: z.boolean().optional().default(true).catch(true),
211
+ /**
212
+ * Sets the visibility of the developer tools
213
+ * @default 'localhost' to only show the toolbar on localhost or similar hosts
214
+ */
215
+ showToolbar: z.enum(["always", "localhost", "never"]).optional().default("localhost").catch("localhost"),
195
216
  /**
196
217
  * Whether to use the operation summary or the operation path for the sidebar and search
197
218
  * @default 'summary'
@@ -202,7 +223,10 @@ const apiClientConfigurationSchema = z.object({
202
223
  /** Integration type identifier */
203
224
  _integration: integrationEnum.optional(),
204
225
  /** onRequestSent is fired when a request is sent */
205
- onRequestSent: z.function().args(z.string()).returns(z.void()).optional(),
226
+ onRequestSent: z.function({
227
+ input: [z.string()],
228
+ output: z.void()
229
+ }).optional(),
206
230
  /** Whether to persist auth to local storage */
207
231
  persistAuth: z.boolean().optional().default(false).catch(false),
208
232
  /** Plugins for the API client */
@@ -210,7 +234,7 @@ const apiClientConfigurationSchema = z.object({
210
234
  /** Enables / disables telemetry*/
211
235
  telemetry: z.boolean().optional().default(true)
212
236
  });
213
- const FetchLike = z.function().args(z.union([z.string(), z.instanceof(URL), z.instanceof(Request)]), z.any().optional()).returns(z.promise(z.instanceof(Response))).optional();
237
+ const FetchLikeSchema = z.custom();
214
238
  const _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(
215
239
  z.object({
216
240
  /**
@@ -228,7 +252,7 @@ const _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(
228
252
  *
229
253
  * Can be used to add custom headers, handle auth, etc.
230
254
  */
231
- fetch: FetchLike,
255
+ fetch: FetchLikeSchema.optional(),
232
256
  /**
233
257
  * Plugins for the API reference
234
258
  */
@@ -252,7 +276,7 @@ const _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(
252
276
  * Sets the file type of the document to download, set to `none` to hide the download button
253
277
  * @default 'both'
254
278
  */
255
- documentDownloadType: z.enum(["yaml", "json", "both", "none"]).optional().default("both").catch("both"),
279
+ documentDownloadType: z.enum(["yaml", "json", "both", "direct", "none"]).optional().default("both").catch("both"),
256
280
  /**
257
281
  * Whether to show the "Download OpenAPI Document" button
258
282
  * @default false
@@ -269,6 +293,12 @@ const _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(
269
293
  * @default false
270
294
  */
271
295
  hideSearch: z.boolean().optional().default(false).catch(false),
296
+ /**
297
+ * Whether to show the operationId
298
+ *
299
+ * @default false
300
+ */
301
+ showOperationId: z.boolean().optional().default(false).catch(false),
272
302
  /** Whether dark mode is on or off initially (light mode) */
273
303
  darkMode: z.boolean().optional(),
274
304
  /** forceDarkModeState makes it always this state no matter what */
@@ -294,7 +324,7 @@ const _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(
294
324
  * List of httpsnippet clients to hide from the clients menu
295
325
  * By default hides Unirest, pass `[]` to show all clients
296
326
  */
297
- hiddenClients: z.union([z.record(z.union([z.boolean(), z.array(z.string())])), z.array(z.string()), z.literal(true)]).optional(),
327
+ hiddenClients: z.union([z.record(z.string(), z.union([z.boolean(), z.array(z.string())])), z.array(z.string()), z.literal(true)]).optional(),
298
328
  /** Determine the HTTP client that's selected by default */
299
329
  defaultHttpClient: z.object({
300
330
  targetKey: z.custom(),
@@ -303,25 +333,37 @@ const _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(
303
333
  /** Custom CSS to be added to the page */
304
334
  customCss: z.string().optional(),
305
335
  /** onSpecUpdate is fired on spec/swagger content change */
306
- onSpecUpdate: z.function().args(z.string()).returns(z.void()).optional(),
336
+ onSpecUpdate: z.function({
337
+ input: [z.string()],
338
+ output: z.void()
339
+ }).optional(),
307
340
  /** onServerChange is fired on selected server change */
308
- onServerChange: z.function().args(z.string()).returns(z.void()).optional(),
341
+ onServerChange: z.function({
342
+ input: [z.string()],
343
+ output: z.void()
344
+ }).optional(),
309
345
  /** onDocumentSelect is fired when the config is selected */
310
- onDocumentSelect: z.function().returns(z.void().or(z.void().promise())).optional(),
346
+ onDocumentSelect: z.function().optional(),
311
347
  /** Callback fired when the reference is fully loaded */
312
- onLoaded: z.function().returns(z.void().or(z.void().promise())).optional(),
348
+ onLoaded: z.function().optional(),
313
349
  /** onBeforeRequest is fired before the request is sent. You can modify the request here. */
314
- onBeforeRequest: z.function().args(z.object({ request: z.instanceof(Request) })).returns(z.void().or(z.void().promise())).optional(),
350
+ onBeforeRequest: z.function({ input: [z.object({ request: z.instanceof(Request) })], output: z.void() }).optional(),
315
351
  /**
316
352
  * onShowMore is fired when the user clicks the "Show more" button on the references
317
353
  * @param tagId - The ID of the tag that was clicked
318
354
  */
319
- onShowMore: z.function().args(z.string()).returns(z.void().or(z.void().promise())).optional(),
355
+ onShowMore: z.function({
356
+ input: [z.string()],
357
+ output: z.void()
358
+ }).optional(),
320
359
  /**
321
360
  * onSidebarClick is fired when the user clicks on a sidebar item
322
361
  * @param href - The href of the sidebar item that was clicked
323
362
  */
324
- onSidebarClick: z.function().args(z.string()).returns(z.void().or(z.void().promise())).optional(),
363
+ onSidebarClick: z.function({
364
+ input: [z.string()],
365
+ output: z.void()
366
+ }).optional(),
325
367
  /**
326
368
  * Route using paths instead of hashes, your server MUST support this
327
369
  * @example '/standalone-api-reference/:custom(.*)?'
@@ -335,59 +377,62 @@ const _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(
335
377
  * @returns A string ID used to generate the URL hash
336
378
  * @default (heading) => `#description/${heading.slug}`
337
379
  */
338
- generateHeadingSlug: z.function().args(
339
- z.object({
340
- slug: z.string().default("headingSlug")
341
- })
342
- ).returns(z.string()).optional(),
380
+ generateHeadingSlug: z.function({
381
+ input: [z.object({ slug: z.string().default("headingSlug") })],
382
+ output: z.string()
383
+ }).optional(),
343
384
  /**
344
385
  * Customize the model portion of the hash
345
386
  * @param model - The model object with a name property
346
387
  * @returns A string ID used to generate the URL hash
347
388
  * @default (model) => slug(model.name)
348
389
  */
349
- generateModelSlug: z.function().args(
350
- z.object({
351
- name: z.string().default("modelName")
352
- })
353
- ).returns(z.string()).optional(),
390
+ generateModelSlug: z.function({
391
+ input: [z.object({ name: z.string().default("modelName") })],
392
+ output: z.string()
393
+ }).optional(),
354
394
  /**
355
395
  * Customize the tag portion of the hash
356
396
  * @param tag - The tag object
357
397
  * @returns A string ID used to generate the URL hash
358
398
  * @default (tag) => slug(tag.name)
359
399
  */
360
- generateTagSlug: z.function().args(
361
- z.object({
362
- name: z.string().default("tagName")
363
- })
364
- ).returns(z.string()).optional(),
400
+ generateTagSlug: z.function({
401
+ input: [z.object({ name: z.string().default("tagName") })],
402
+ output: z.string()
403
+ }).optional(),
365
404
  /**
366
405
  * Customize the operation portion of the hash
367
406
  * @param operation - The operation object
368
407
  * @returns A string ID used to generate the URL hash
369
408
  * @default (operation) => `${operation.method}${operation.path}`
370
409
  */
371
- generateOperationSlug: z.function().args(
372
- z.object({
373
- path: z.string(),
374
- operationId: z.string().optional(),
375
- method: z.string(),
376
- summary: z.string().optional()
377
- })
378
- ).returns(z.string()).optional(),
410
+ generateOperationSlug: z.function({
411
+ input: [
412
+ z.object({
413
+ path: z.string(),
414
+ operationId: z.string().optional(),
415
+ method: z.string(),
416
+ summary: z.string().optional()
417
+ })
418
+ ],
419
+ output: z.string()
420
+ }).optional(),
379
421
  /**
380
422
  * Customize the webhook portion of the hash
381
423
  * @param webhook - The webhook object
382
424
  * @returns A string ID used to generate the URL hash
383
425
  * @default (webhook) => slug(webhook.name)
384
426
  */
385
- generateWebhookSlug: z.function().args(
386
- z.object({
387
- name: z.string(),
388
- method: z.string().optional()
389
- })
390
- ).returns(z.string()).optional(),
427
+ generateWebhookSlug: z.function({
428
+ input: [
429
+ z.object({
430
+ name: z.string(),
431
+ method: z.string().optional()
432
+ })
433
+ ],
434
+ output: z.string()
435
+ }).optional(),
391
436
  /**
392
437
  * To handle redirects, pass a function that will recieve:
393
438
  * - The current path with hash if pathRouting is enabled
@@ -408,7 +453,10 @@ const _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(
408
453
  * }
409
454
  * ```
410
455
  */
411
- redirect: z.function().args(z.string()).returns(z.string().nullable().optional()).optional(),
456
+ redirect: z.function({
457
+ input: [z.string()],
458
+ output: z.string().nullable().optional()
459
+ }).optional(),
412
460
  /**
413
461
  * Whether to include default fonts
414
462
  * @default true
@@ -439,12 +487,25 @@ const _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(
439
487
  * Function to sort tags
440
488
  * @default 'alpha' for alphabetical sorting
441
489
  */
442
- tagsSorter: z.union([z.literal("alpha"), z.function().args(z.any(), z.any()).returns(z.number())]).optional(),
490
+ tagsSorter: z.union([
491
+ z.literal("alpha"),
492
+ z.function({
493
+ input: [z.any(), z.any()],
494
+ output: z.number()
495
+ })
496
+ ]).optional(),
443
497
  /**
444
498
  * Function to sort operations
445
499
  * @default 'alpha' for alphabetical sorting
446
500
  */
447
- operationsSorter: z.union([z.literal("alpha"), z.literal("method"), z.function().args(z.any(), z.any()).returns(z.number())]).optional(),
501
+ operationsSorter: z.union([
502
+ z.literal("alpha"),
503
+ z.literal("method"),
504
+ z.function({
505
+ input: [z.any(), z.any()],
506
+ output: z.number()
507
+ })
508
+ ]).optional(),
448
509
  /**
449
510
  * Order the schema properties by
450
511
  * @default 'alpha' for alphabetical sorting
@@ -503,7 +564,6 @@ const migrateConfiguration = (_configuration) => {
503
564
  const apiReferenceConfigurationSchema = _apiReferenceConfigurationSchema.transform(migrateConfiguration);
504
565
  const isConfigurationWithSources = (config) => Boolean(!Array.isArray(config) && config && "sources" in config && Array.isArray(config.sources));
505
566
  export {
506
- FetchLike,
507
567
  apiClientConfigurationSchema,
508
568
  apiReferenceConfigurationSchema,
509
569
  isConfigurationWithSources,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/api-reference/api-reference-configuration.ts"],
4
- "sourcesContent": ["import { z } from 'zod'\n\nimport { ApiClientPluginSchema } from '../api-client'\nimport type { TargetId } from '../snippetz'\nimport { ApiReferencePluginSchema } from './api-reference-plugin'\nimport type { AuthenticationConfiguration } from './authentication-configuration'\n\n/** Available theme presets for the API reference */\nconst themeIdEnum = z.enum([\n 'alternate',\n 'default',\n 'moon',\n 'purple',\n 'solarized',\n 'bluePlanet',\n 'deepSpace',\n 'saturn',\n 'kepler',\n 'elysiajs',\n 'fastify',\n 'mars',\n 'laserwave',\n 'none',\n])\n\n/** Whether to use the operation summary or the operation path for the sidebar and search */\nconst operationTitleEnum = z.enum(['summary', 'path'])\n\n/** Valid keys that can be used with CTRL/CMD to open the search modal */\nconst searchHotKeyEnum = z.enum([\n 'a',\n 'b',\n 'c',\n 'd',\n 'e',\n 'f',\n 'g',\n 'h',\n 'i',\n 'j',\n 'k',\n 'l',\n 'm',\n 'n',\n 'o',\n 'p',\n 'q',\n 'r',\n 's',\n 't',\n 'u',\n 'v',\n 'w',\n 'x',\n 'y',\n 'z',\n])\n\n/** Supported integration types */\nconst integrationEnum = z\n .enum([\n 'adonisjs',\n 'docusaurus',\n 'dotnet',\n 'elysiajs',\n 'express',\n 'fastapi',\n 'fastify',\n 'go',\n 'hono',\n 'html',\n 'laravel',\n 'litestar',\n 'nestjs',\n 'nextjs',\n 'nitro',\n 'nuxt',\n 'platformatic',\n 'react',\n 'rust',\n 'svelte',\n 'vue',\n ])\n .nullable()\n\n/** Configuration for the OpenAPI/Swagger specification */\nexport const specConfigurationSchema = z.object({\n /**\n * URL to an OpenAPI/Swagger document\n *\n * @deprecated Please move `url` to the top level and remove the `spec` prefix.\n *\n * @example\n * ```ts\n * const oldConfiguration = {\n * spec: {\n * url: 'https://example.com/openapi.json',\n * },\n * }\n *\n * const newConfiguration = {\n * url: 'https://example.com/openapi.json',\n * }\n * ```\n **/\n url: z.string().optional(),\n /**\n * Directly embed the OpenAPI document.\n * Can be a string, object, function returning an object, or null.\n *\n * @remarks It's recommended to pass a URL instead of content.\n *\n * @deprecated Please move `content` to the top level and remove the `spec` prefix.\n *\n * @example\n * ```ts\n * const oldConfiguration = {\n * spec: {\n * content: '\u2026',\n * },\n * }\n *\n * const newConfiguration = {\n * content: '\u2026',\n * }\n * ```\n **/\n content: z.union([z.string(), z.record(z.any()), z.function().returns(z.record(z.any())), z.null()]).optional(),\n /**\n * The title of the OpenAPI document.\n *\n * @example 'Scalar Galaxy'\n *\n * @deprecated Please move `title` to the top level and remove the `spec` prefix.\n */\n title: z.string().optional(),\n /**\n * The slug of the OpenAPI document used in the URL.\n *\n * If none is passed, the title will be used.\n *\n * If no title is used, it'll just use the index.\n *\n * @example 'scalar-galaxy'\n *\n * @deprecated Please move `slug` to the top level and remove the `spec` prefix.\n */\n slug: z.string().optional(),\n})\nexport type SpecConfiguration = z.infer<typeof specConfigurationSchema>\n\n/** Configuration for path-based routing */\nconst pathRoutingSchema = z.object({\n /** Base path for the API reference */\n basePath: z.string(),\n})\n\n/** Configuration for the Api Client */\nexport const apiClientConfigurationSchema = z.object({\n /**\n * URL to an OpenAPI/Swagger document\n **/\n url: z.string().optional(),\n /**\n * Directly embed the OpenAPI document.\n * Can be a string, object, function returning an object, or null.\n *\n * @remarks It's recommended to pass a URL instead of content.\n **/\n content: z.union([z.string(), z.record(z.any()), z.function().returns(z.record(z.any())), z.null()]).optional(),\n /**\n * The title of the OpenAPI document.\n *\n * @example 'Scalar Galaxy'\n */\n title: z.string().optional(),\n /**\n * The slug of the OpenAPI document used in the URL.\n *\n * If none is passed, the title will be used.\n *\n * If no title is used, it'll just use the index.\n *\n * @example 'scalar-galaxy'\n */\n slug: z.string().optional(),\n /**\n * The OpenAPI/Swagger document to render\n *\n * @deprecated Use `url` and `content` on the top level instead.\n **/\n spec: specConfigurationSchema.optional(),\n /** Prefill authentication */\n authentication: z.any().optional(), // Temp until we bring in the new auth\n /** Base URL for the API server */\n baseServerURL: z.string().optional(),\n /**\n * Whether to hide the client button\n * @default false\n */\n hideClientButton: z.boolean().optional().default(false).catch(false),\n /** URL to a request proxy for the API client */\n proxyUrl: z.string().optional(),\n /** Key used with CTRL/CMD to open the search modal (defaults to 'k' e.g. CMD+k) */\n searchHotKey: searchHotKeyEnum.optional(),\n /** List of OpenAPI server objects */\n servers: z.array(z.any()).optional(), // Using any for OpenAPIV3_1.ServerObject\n /**\n * Whether to show the sidebar\n * @default true\n */\n showSidebar: z.boolean().optional().default(true).catch(true),\n /**\n * Whether to use the operation summary or the operation path for the sidebar and search\n * @default 'summary'\n */\n operationTitleSource: operationTitleEnum.optional().default('summary').catch('summary'),\n /** A string to use one of the color presets */\n theme: themeIdEnum.optional().default('default').catch('default'),\n /** Integration type identifier */\n _integration: integrationEnum.optional(),\n /** onRequestSent is fired when a request is sent */\n onRequestSent: z.function().args(z.string()).returns(z.void()).optional(),\n /** Whether to persist auth to local storage */\n persistAuth: z.boolean().optional().default(false).catch(false),\n /** Plugins for the API client */\n plugins: z.array(ApiClientPluginSchema).optional(),\n /** Enables / disables telemetry*/\n telemetry: z.boolean().optional().default(true),\n})\n\nexport type ApiClientConfiguration = z.infer<typeof apiClientConfigurationSchema>\n\nexport const FetchLike = z\n .function()\n .args(z.union([z.string(), z.instanceof(URL), z.instanceof(Request)]), z.any().optional())\n .returns(z.promise(z.instanceof(Response)))\n .optional()\n\n/** Configuration for the Api Client without the transform since it cannot be merged */\nconst _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(\n z.object({\n /**\n * The layout to use for the references\n * @default 'modern'\n */\n layout: z.enum(['modern', 'classic']).optional().default('modern').catch('modern'),\n /**\n * URL to a request proxy for the API client\n * @deprecated Use proxyUrl instead\n */\n proxy: z.string().optional(),\n /**\n * Custom fetch function for custom logic\n *\n * Can be used to add custom headers, handle auth, etc.\n */\n fetch: FetchLike,\n /**\n * Plugins for the API reference\n */\n plugins: z.array(ApiReferencePluginSchema).optional(),\n /**\n * Allows the user to inject an editor for the spec\n * @default false\n */\n isEditable: z.boolean().optional().default(false).catch(false),\n /**\n * Controls whether the references show a loading state in the intro\n * @default false\n */\n isLoading: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to show models in the sidebar, search, and content.\n * @default false\n */\n hideModels: z.boolean().optional().default(false).catch(false),\n /**\n * Sets the file type of the document to download, set to `none` to hide the download button\n * @default 'both'\n */\n documentDownloadType: z.enum(['yaml', 'json', 'both', 'none']).optional().default('both').catch('both'),\n /**\n * Whether to show the \"Download OpenAPI Document\" button\n * @default false\n * @deprecated Use `documentDownloadType: 'none'` instead\n */\n hideDownloadButton: z.boolean().optional(),\n /**\n * Whether to show the \"Test Request\" button\n * @default false\n */\n hideTestRequestButton: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to show the sidebar search bar\n * @default false\n */\n hideSearch: z.boolean().optional().default(false).catch(false),\n /** Whether dark mode is on or off initially (light mode) */\n darkMode: z.boolean().optional(),\n /** forceDarkModeState makes it always this state no matter what */\n forceDarkModeState: z.enum(['dark', 'light']).optional(),\n /**\n * Whether to show the dark mode toggle\n * @default false\n */\n hideDarkModeToggle: z.boolean().optional().default(false).catch(false),\n /**\n * If used, passed data will be added to the HTML header\n * @see https://unhead.unjs.io/usage/composables/use-seo-meta\n */\n metaData: z.any().optional(), // Using any for UseSeoMetaInput since it's an external type\n /**\n * Path to a favicon image\n * @default undefined\n * @example '/favicon.svg'\n */\n favicon: z.string().optional(),\n /**\n * List of httpsnippet clients to hide from the clients menu\n * By default hides Unirest, pass `[]` to show all clients\n */\n hiddenClients: z\n .union([z.record(z.union([z.boolean(), z.array(z.string())])), z.array(z.string()), z.literal(true)])\n .optional(),\n /** Determine the HTTP client that's selected by default */\n defaultHttpClient: z\n .object({\n targetKey: z.custom<TargetId>(),\n clientKey: z.string(),\n })\n .optional(),\n /** Custom CSS to be added to the page */\n customCss: z.string().optional(),\n /** onSpecUpdate is fired on spec/swagger content change */\n onSpecUpdate: z.function().args(z.string()).returns(z.void()).optional(),\n /** onServerChange is fired on selected server change */\n onServerChange: z.function().args(z.string()).returns(z.void()).optional(),\n /** onDocumentSelect is fired when the config is selected */\n onDocumentSelect: z.function().returns(z.void().or(z.void().promise())).optional(),\n /** Callback fired when the reference is fully loaded */\n onLoaded: z.function().returns(z.void().or(z.void().promise())).optional(),\n /** onBeforeRequest is fired before the request is sent. You can modify the request here. */\n onBeforeRequest: z\n .function()\n .args(z.object({ request: z.instanceof(Request) }))\n .returns(z.void().or(z.void().promise()))\n .optional(),\n /**\n * onShowMore is fired when the user clicks the \"Show more\" button on the references\n * @param tagId - The ID of the tag that was clicked\n */\n onShowMore: z.function().args(z.string()).returns(z.void().or(z.void().promise())).optional(),\n /**\n * onSidebarClick is fired when the user clicks on a sidebar item\n * @param href - The href of the sidebar item that was clicked\n */\n onSidebarClick: z.function().args(z.string()).returns(z.void().or(z.void().promise())).optional(),\n /**\n * Route using paths instead of hashes, your server MUST support this\n * @example '/standalone-api-reference/:custom(.*)?'\n * @experimental\n * @default undefined\n */\n pathRouting: pathRoutingSchema.optional(),\n /**\n * Customize the heading portion of the hash\n * @param heading - The heading object\n * @returns A string ID used to generate the URL hash\n * @default (heading) => `#description/${heading.slug}`\n */\n generateHeadingSlug: z\n .function()\n .args(\n z.object({\n slug: z.string().default('headingSlug'),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * Customize the model portion of the hash\n * @param model - The model object with a name property\n * @returns A string ID used to generate the URL hash\n * @default (model) => slug(model.name)\n */\n generateModelSlug: z\n .function()\n .args(\n z.object({\n name: z.string().default('modelName'),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * Customize the tag portion of the hash\n * @param tag - The tag object\n * @returns A string ID used to generate the URL hash\n * @default (tag) => slug(tag.name)\n */\n generateTagSlug: z\n .function()\n .args(\n z.object({\n name: z.string().default('tagName'),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * Customize the operation portion of the hash\n * @param operation - The operation object\n * @returns A string ID used to generate the URL hash\n * @default (operation) => `${operation.method}${operation.path}`\n */\n generateOperationSlug: z\n .function()\n .args(\n z.object({\n path: z.string(),\n operationId: z.string().optional(),\n method: z.string(),\n summary: z.string().optional(),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * Customize the webhook portion of the hash\n * @param webhook - The webhook object\n * @returns A string ID used to generate the URL hash\n * @default (webhook) => slug(webhook.name)\n */\n generateWebhookSlug: z\n .function()\n .args(\n z.object({\n name: z.string(),\n method: z.string().optional(),\n }),\n )\n .returns(z.string())\n .optional(),\n /**\n * To handle redirects, pass a function that will recieve:\n * - The current path with hash if pathRouting is enabled\n * - The current hash if hashRouting (default)\n * And then passes that to history.replaceState\n *\n * @example hashRouting (default)\n * ```ts\n * redirect: (hash: string) => hash.replace('#v1/old-path', '#v2/new-path')\n * ```\n * @example pathRouting\n * ```ts\n * redirect: (pathWithHash: string) => {\n * if (pathWithHash.includes('#')) {\n * return pathWithHash.replace('/v1/tags/user#operation/get-user', '/v1/tags/user/operation/get-user')\n * }\n * return null\n * }\n * ```\n */\n redirect: z.function().args(z.string()).returns(z.string().nullable().optional()).optional(),\n /**\n * Whether to include default fonts\n * @default true\n */\n withDefaultFonts: z.boolean().optional().default(true).catch(true),\n /**\n * Whether to expand all tags by default\n *\n * Warning this can cause performance issues on big documents\n * @default false\n */\n defaultOpenAllTags: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to expand all models by default\n *\n * Warning this can cause performance issues on big documents\n * @default false\n */\n expandAllModelSections: z.boolean().optional().default(false).catch(false),\n /**\n * Whether to expand all responses by default\n *\n * Warning this can cause performance issues on big documents\n * @default false\n */\n expandAllResponses: z.boolean().optional().default(false).catch(false),\n /**\n * Function to sort tags\n * @default 'alpha' for alphabetical sorting\n */\n tagsSorter: z.union([z.literal('alpha'), z.function().args(z.any(), z.any()).returns(z.number())]).optional(),\n /**\n * Function to sort operations\n * @default 'alpha' for alphabetical sorting\n */\n operationsSorter: z\n .union([z.literal('alpha'), z.literal('method'), z.function().args(z.any(), z.any()).returns(z.number())])\n .optional(),\n /**\n * 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\nconst OLD_PROXY_URL = 'https://api.scalar.com/request-proxy'\nconst NEW_PROXY_URL = 'https://proxy.scalar.com'\n\n/** Migrate the configuration through a transform */\nconst migrateConfiguration = <T extends z.infer<typeof _apiReferenceConfigurationSchema>>(_configuration: T): T => {\n const configuration = { ..._configuration }\n\n // Migrate hideDownloadButton to documentDownloadType\n if (configuration.hideDownloadButton) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'hideDownloadButton' attribute. Use 'documentDownloadType: 'none'' instead.`,\n )\n\n configuration.documentDownloadType = 'none'\n }\n\n // Remove the spec prefix\n if (configuration.spec?.url) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'spec.url' attribute. Remove the spec prefix and move the 'url' attribute to the top level.`,\n )\n\n configuration.url = configuration.spec.url\n delete configuration.spec\n }\n\n if (configuration.spec?.content) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'spec.content' attribute. Remove the spec prefix and move the 'content' attribute to the top level.`,\n )\n\n configuration.content = configuration.spec.content\n delete configuration.spec\n }\n\n // Migrate proxy URL\n if (configuration.proxy) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'proxy' attribute, rename it to 'proxyUrl' or update the package.`,\n )\n\n if (!configuration.proxyUrl) {\n configuration.proxyUrl = configuration.proxy\n }\n\n delete configuration.proxy\n }\n\n if (configuration.proxyUrl === OLD_PROXY_URL) {\n console.warn(`[DEPRECATED] Warning: configuration.proxyUrl points to our old proxy (${OLD_PROXY_URL}).`)\n console.warn(`[DEPRECATED] We are overwriting the value and use the new proxy URL (${NEW_PROXY_URL}) instead.`)\n console.warn(\n `[DEPRECATED] Action Required: You should manually update your configuration to use the new URL (${NEW_PROXY_URL}). Read more: https://github.com/scalar/scalar`,\n )\n\n configuration.proxyUrl = NEW_PROXY_URL\n }\n\n return configuration\n}\n\n/** Configuration for the Api Reference */\nexport const apiReferenceConfigurationSchema = _apiReferenceConfigurationSchema.transform(migrateConfiguration)\n\n/** Configuration after parsing, this is the main type */\nexport type ApiReferenceConfiguration = Omit<\n z.infer<typeof _apiReferenceConfigurationSchema>,\n // Remove deprecated attributes\n 'proxy' | 'spec' | 'authentication'\n> & {\n authentication?: AuthenticationConfiguration\n}\n\n/** Api Config which includes the default config */\ntype ApiReferenceConfigurationWithDefault = ApiReferenceConfiguration & {\n /** Whether to use this config as the default one */\n default?: boolean\n}\n\n/** Configuration for a single config with sources */\nexport type ApiReferenceConfigurationWithSources = Omit<ApiReferenceConfigurationWithDefault, 'default'> & {\n sources: (SpecConfiguration & { default?: boolean })[]\n}\n\n/** Configuration for multiple Api References */\nexport type AnyApiReferenceConfiguration =\n | Partial<ApiReferenceConfiguration>\n | Partial<ApiReferenceConfigurationWithSources>\n | Partial<ApiReferenceConfigurationWithDefault>[]\n | Partial<ApiReferenceConfigurationWithSources>[]\n\n/** Typeguard to check to narrow the configs to the one with sources */\nexport const isConfigurationWithSources = (\n config: AnyApiReferenceConfiguration,\n): config is Partial<ApiReferenceConfigurationWithSources> =>\n Boolean(!Array.isArray(config) && config && 'sources' in config && Array.isArray(config.sources))\n"],
5
- "mappings": "AAAA,SAAS,SAAS;AAElB,SAAS,6BAA6B;AAEtC,SAAS,gCAAgC;AAIzC,MAAM,cAAc,EAAE,KAAK;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAGD,MAAM,qBAAqB,EAAE,KAAK,CAAC,WAAW,MAAM,CAAC;AAGrD,MAAM,mBAAmB,EAAE,KAAK;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;A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{ ApiReferencePluginSchema } from './api-reference-plugin'\nimport type { AuthenticationConfiguration } from './authentication-configuration'\n\n/** Available theme presets for the API reference */\nconst themeIdEnum = z.enum([\n 'alternate',\n 'default',\n 'moon',\n 'purple',\n 'solarized',\n 'bluePlanet',\n 'deepSpace',\n 'saturn',\n 'kepler',\n 'elysiajs',\n 'fastify',\n 'mars',\n 'laserwave',\n 'none',\n])\n\n/** Whether to use the operation summary or the operation path for the sidebar and search */\nconst operationTitleEnum = z.enum(['summary', 'path'])\n\n/** Valid keys that can be used with CTRL/CMD to open the search modal */\nconst searchHotKeyEnum = z.enum([\n 'a',\n 'b',\n 'c',\n 'd',\n 'e',\n 'f',\n 'g',\n 'h',\n 'i',\n 'j',\n 'k',\n 'l',\n 'm',\n 'n',\n 'o',\n 'p',\n 'q',\n 'r',\n 's',\n 't',\n 'u',\n 'v',\n 'w',\n 'x',\n 'y',\n 'z',\n])\n\n/** Supported integration types */\nconst integrationEnum = z\n .enum([\n 'adonisjs',\n 'docusaurus',\n 'dotnet',\n 'elysiajs',\n 'express',\n 'fastapi',\n 'fastify',\n 'go',\n 'hono',\n 'html',\n 'laravel',\n 'litestar',\n 'nestjs',\n 'nextjs',\n 'nitro',\n 'nuxt',\n 'platformatic',\n 'react',\n 'rust',\n 'svelte',\n 'vue',\n ])\n .nullable()\n\n/** Configuration for the OpenAPI/Swagger specification */\nexport const specConfigurationSchema = z.object({\n /**\n * URL to an OpenAPI/Swagger document\n *\n * @deprecated Please move `url` to the top level and remove the `spec` prefix.\n *\n * @example\n * ```ts\n * const oldConfiguration = {\n * spec: {\n * url: 'https://example.com/openapi.json',\n * },\n * }\n *\n * const newConfiguration = {\n * url: 'https://example.com/openapi.json',\n * }\n * ```\n **/\n url: z.string().optional(),\n /**\n * Directly embed the OpenAPI document.\n * Can be a string, object, function returning an object, or null.\n *\n * @remarks It's recommended to pass a URL instead of content.\n *\n * @deprecated Please move `content` to the top level and remove the `spec` prefix.\n *\n * @example\n * ```ts\n * const oldConfiguration = {\n * spec: {\n * content: '\u2026',\n * },\n * }\n *\n * const newConfiguration = {\n * content: '\u2026',\n * }\n * ```\n **/\n\n content: z\n .union([\n z.string(),\n z.null(),\n z.record(z.string(), z.any()),\n z.function({\n input: [],\n output: z.record(z.string(), z.any()),\n }),\n ])\n .optional(),\n /**\n * The title of the OpenAPI document.\n *\n * @example 'Scalar Galaxy'\n *\n * @deprecated Please move `title` to the top level and remove the `spec` prefix.\n */\n title: z.string().optional(),\n /**\n * The slug of the OpenAPI document used in the URL.\n *\n * If none is passed, the title will be used.\n *\n * If no title is used, it'll just use the index.\n *\n * @example 'scalar-galaxy'\n *\n * @deprecated Please move `slug` to the top level and remove the `spec` prefix.\n */\n slug: z.string().optional(),\n})\nexport type SpecConfiguration = z.infer<typeof specConfigurationSchema>\n\n/** Configuration for path-based routing */\nconst pathRoutingSchema = z.object({\n /** Base path for the API reference */\n basePath: z.string(),\n})\n\n/** Configuration for the Api Client */\nexport const apiClientConfigurationSchema = z.object({\n /**\n * URL to an OpenAPI/Swagger document\n **/\n url: z.string().optional(),\n /**\n * Directly embed the OpenAPI document.\n * Can be a string, object, function returning an object, or null.\n *\n * @remarks It's recommended to pass a URL instead of content.\n **/\n content: z\n .union([\n z.string(),\n z.null(),\n z.record(z.string(), z.any()),\n z.function({\n input: [],\n output: z.record(z.string(), z.any()),\n }),\n ])\n .optional(),\n /**\n * The title of the OpenAPI document.\n *\n * @example 'Scalar Galaxy'\n */\n title: z.string().optional(),\n /**\n * The slug of the OpenAPI document used in the URL.\n *\n * If none is passed, the title will be used.\n *\n * If no title is used, it'll just use the index.\n *\n * @example 'scalar-galaxy'\n */\n slug: z.string().optional(),\n /**\n * The OpenAPI/Swagger document to render\n *\n * @deprecated Use `url` and `content` on the top level instead.\n **/\n spec: specConfigurationSchema.optional(),\n /** Prefill authentication */\n authentication: z.any().optional(), // Temp until we bring in the new auth\n /** Base URL for the API server */\n baseServerURL: z.string().optional(),\n /**\n * Whether to hide the client button\n * @default false\n */\n hideClientButton: z.boolean().optional().default(false).catch(false),\n /** URL to a request proxy for the API client */\n proxyUrl: z.string().optional(),\n /** Key used with CTRL/CMD to open the search modal (defaults to 'k' e.g. CMD+k) */\n searchHotKey: searchHotKeyEnum.optional(),\n /** List of OpenAPI server objects */\n servers: z.array(z.any()).optional(), // Using any for OpenAPIV3_1.ServerObject\n /**\n * Whether to show the sidebar\n * @default true\n */\n showSidebar: z.boolean().optional().default(true).catch(true),\n /**\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: operationTitleEnum.optional().default('summary').catch('summary'),\n /** A string to use one of the color presets */\n theme: themeIdEnum.optional().default('default').catch('default'),\n /** Integration type identifier */\n _integration: integrationEnum.optional(),\n /** onRequestSent is fired when a request is sent */\n onRequestSent: z\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\nexport type ApiClientConfiguration = z.infer<typeof apiClientConfigurationSchema>\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/** Configuration for the Api Client without the transform since it cannot be merged */\nconst _apiReferenceConfigurationSchema = apiClientConfigurationSchema.merge(\n z.object({\n /**\n * The layout to use for the references\n * @default 'modern'\n */\n layout: z.enum(['modern', 'classic']).optional().default('modern').catch('modern'),\n /**\n * URL to a request proxy for the API client\n * @deprecated Use proxyUrl instead\n */\n proxy: z.string().optional(),\n /**\n * 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.function().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<(() => Promise<void> | void) | undefined>,\n /** onBeforeRequest is fired before the request is sent. You can modify the request here. */\n onBeforeRequest: z\n .function({ input: [z.object({ request: z.instanceof(Request) })], output: z.void() })\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 output: 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 output: 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: pathRoutingSchema.optional(),\n /**\n * Customize the heading portion of the hash\n * @param heading - The heading object\n * @returns A string ID used to generate the URL hash\n * @default (heading) => `#description/${heading.slug}`\n */\n generateHeadingSlug: z\n .function({\n 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 recieve:\n * - The current path with hash if pathRouting is enabled\n * - The current hash if hashRouting (default)\n * And then passes that to history.replaceState\n *\n * @example hashRouting (default)\n * ```ts\n * redirect: (hash: string) => hash.replace('#v1/old-path', '#v2/new-path')\n * ```\n * @example pathRouting\n * ```ts\n * redirect: (pathWithHash: string) => {\n * if (pathWithHash.includes('#')) {\n * return pathWithHash.replace('/v1/tags/user#operation/get-user', '/v1/tags/user/operation/get-user')\n * }\n * return null\n * }\n * ```\n */\n redirect: z\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\nconst OLD_PROXY_URL = 'https://api.scalar.com/request-proxy'\nconst NEW_PROXY_URL = 'https://proxy.scalar.com'\n\n/** Migrate the configuration through a transform */\nconst migrateConfiguration = <T extends z.infer<typeof _apiReferenceConfigurationSchema>>(_configuration: T): T => {\n const configuration = { ..._configuration }\n\n // Migrate hideDownloadButton to documentDownloadType\n if (configuration.hideDownloadButton) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'hideDownloadButton' attribute. Use 'documentDownloadType: 'none'' instead.`,\n )\n\n configuration.documentDownloadType = 'none'\n }\n\n // Remove the spec prefix\n if (configuration.spec?.url) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'spec.url' attribute. Remove the spec prefix and move the 'url' attribute to the top level.`,\n )\n\n configuration.url = configuration.spec.url\n delete configuration.spec\n }\n\n if (configuration.spec?.content) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'spec.content' attribute. Remove the spec prefix and move the 'content' attribute to the top level.`,\n )\n\n configuration.content = configuration.spec.content\n delete configuration.spec\n }\n\n // Migrate proxy URL\n if (configuration.proxy) {\n console.warn(\n `[DEPRECATED] You're using the deprecated 'proxy' attribute, rename it to 'proxyUrl' or update the package.`,\n )\n\n if (!configuration.proxyUrl) {\n configuration.proxyUrl = configuration.proxy\n }\n\n delete configuration.proxy\n }\n\n if (configuration.proxyUrl === OLD_PROXY_URL) {\n console.warn(`[DEPRECATED] Warning: configuration.proxyUrl points to our old proxy (${OLD_PROXY_URL}).`)\n console.warn(`[DEPRECATED] We are overwriting the value and use the new proxy URL (${NEW_PROXY_URL}) instead.`)\n console.warn(\n `[DEPRECATED] Action Required: You should manually update your configuration to use the new URL (${NEW_PROXY_URL}). Read more: https://github.com/scalar/scalar`,\n )\n\n configuration.proxyUrl = NEW_PROXY_URL\n }\n\n return configuration\n}\n\n/** Configuration for the Api Reference */\nexport const apiReferenceConfigurationSchema = _apiReferenceConfigurationSchema.transform(migrateConfiguration)\n\n/** Configuration after parsing, this is the main type */\nexport type ApiReferenceConfiguration = Omit<\n z.infer<typeof _apiReferenceConfigurationSchema>,\n // Remove deprecated attributes\n 'proxy' | 'spec' | 'authentication'\n> & {\n authentication?: AuthenticationConfiguration\n}\n\n/** Api Config which includes the default config */\ntype ApiReferenceConfigurationWithDefault = ApiReferenceConfiguration & {\n /** Whether to use this config as the default one */\n default?: boolean\n}\n\n/** Configuration for a single config with sources */\nexport type ApiReferenceConfigurationWithSources = Omit<ApiReferenceConfigurationWithDefault, 'default'> & {\n sources: (SpecConfiguration & { default?: boolean })[]\n}\n\n/** Configuration for multiple Api References */\nexport type AnyApiReferenceConfiguration =\n | Partial<ApiReferenceConfiguration>\n | Partial<ApiReferenceConfigurationWithSources>\n | Partial<ApiReferenceConfigurationWithDefault>[]\n | Partial<ApiReferenceConfigurationWithSources>[]\n\n/** Typeguard to check to narrow the configs to the one with sources */\nexport const isConfigurationWithSources = (\n config: AnyApiReferenceConfiguration,\n): config is Partial<ApiReferenceConfigurationWithSources> =>\n Boolean(!Array.isArray(config) && config && 'sources' in config && Array.isArray(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;AAAA,MACN;AAAA,IACF;AAEA,kBAAc,MAAM,cAAc,KAAK;AACvC,WAAO,cAAc;AAAA,EACvB;AAEA,MAAI,cAAc,MAAM,SAAS;AAC/B,YAAQ;AAAA,MACN;AAAA,IACF;AAEA,kBAAc,UAAU,cAAc,KAAK;AAC3C,WAAO,cAAc;AAAA,EACvB;AAGA,MAAI,cAAc,OAAO;AACvB,YAAQ;AAAA,MACN;AAAA,IACF;AAEA,QAAI,CAAC,cAAc,UAAU;AAC3B,oBAAc,WAAW,cAAc;AAAA,IACzC;AAEA,WAAO,cAAc;AAAA,EACvB;AAEA,MAAI,cAAc,aAAa,eAAe;AAC5C,YAAQ,KAAK,yEAAyE,aAAa,IAAI;AACvG,YAAQ,KAAK,wEAAwE,aAAa,YAAY;AAC9G,YAAQ;AAAA,MACN,mGAAmG,aAAa;AAAA,IAClH;AAEA,kBAAc,WAAW;AAAA,EAC3B;AAEA,SAAO;AACT;AAGO,MAAM,kCAAkC,iCAAiC,UAAU,oBAAoB;AA8BvG,MAAM,6BAA6B,CACxC,WAEA,QAAQ,CAAC,MAAM,QAAQ,MAAM,KAAK,UAAU,aAAa,UAAU,MAAM,QAAQ,OAAO,OAAO,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1,75 +1,17 @@
1
1
  import { z } from 'zod';
2
2
  export declare const OpenApiExtensionSchema: z.ZodObject<{
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
3
  name: z.ZodString;
12
- /**
13
- * Vue component to render the specification extension
14
- */
15
4
  component: z.ZodUnknown;
16
- /**
17
- * Custom renderer to render the specification extension
18
- */
19
5
  renderer: z.ZodOptional<z.ZodUnknown>;
20
- }, "strip", z.ZodTypeAny, {
21
- name: string;
22
- component?: unknown;
23
- renderer?: unknown;
24
- }, {
25
- name: string;
26
- component?: unknown;
27
- renderer?: unknown;
28
- }>;
29
- export declare const ApiReferencePluginSchema: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodObject<{
6
+ }, z.core.$strip>;
7
+ export declare const ApiReferencePluginSchema: z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodObject<{
30
8
  name: z.ZodString;
31
9
  extensions: z.ZodArray<z.ZodObject<{
32
- /**
33
- * Name of specification extension property. Has to start with `x-`.
34
- *
35
- * @example
36
- * ```yaml
37
- * x-custom-extension: foobar
38
- * ```
39
- */
40
10
  name: z.ZodString;
41
- /**
42
- * Vue component to render the specification extension
43
- */
44
11
  component: z.ZodUnknown;
45
- /**
46
- * Custom renderer to render the specification extension
47
- */
48
12
  renderer: z.ZodOptional<z.ZodUnknown>;
49
- }, "strip", z.ZodTypeAny, {
50
- name: string;
51
- component?: unknown;
52
- renderer?: unknown;
53
- }, {
54
- name: string;
55
- component?: unknown;
56
- renderer?: unknown;
57
- }>, "many">;
58
- }, "strip", z.ZodTypeAny, {
59
- name: string;
60
- extensions: {
61
- name: string;
62
- component?: unknown;
63
- renderer?: unknown;
64
- }[];
65
- }, {
66
- name: string;
67
- extensions: {
68
- name: string;
69
- component?: unknown;
70
- renderer?: unknown;
71
- }[];
72
- }>>;
13
+ }, z.core.$strip>>;
14
+ }, z.core.$strip>>;
73
15
  export type SpecificationExtension = z.infer<typeof OpenApiExtensionSchema>;
74
16
  export type ApiReferencePlugin = z.infer<typeof ApiReferencePluginSchema>;
75
17
  //# sourceMappingURL=api-reference-plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-reference-plugin.d.ts","sourceRoot":"","sources":["../../src/api-reference/api-reference-plugin.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,sBAAsB;IACjC;;;;;;;OAOG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;;;;;;EAEH,CAAA;AAEF,eAAO,MAAM,wBAAwB;;;QAnBnC;;;;;;;WAOG;;QAEH;;WAEG;;QAEH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;GASJ,CAAA;AAGD,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAC3E,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":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,sBAAsB;;;;iBAkBjC,CAAA;AAEF,eAAO,MAAM,wBAAwB;;;;;;;kBAMnC,CAAA;AAGF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAC3E,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
@@ -18,12 +18,13 @@ const OpenApiExtensionSchema = z.object({
18
18
  */
19
19
  renderer: z.unknown().optional()
20
20
  });
21
- const ApiReferencePluginSchema = z.function().returns(
22
- z.object({
21
+ const ApiReferencePluginSchema = z.function({
22
+ input: [],
23
+ output: z.object({
23
24
  name: z.string(),
24
25
  extensions: z.array(OpenApiExtensionSchema)
25
26
  })
26
- );
27
+ });
27
28
  export {
28
29
  ApiReferencePluginSchema,
29
30
  OpenApiExtensionSchema
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/api-reference/api-reference-plugin.ts"],
4
- "sourcesContent": ["// TODO: Oh, do we really want to make this a dependency?\n// import type { Component } from 'vue'\n\nimport { 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\nexport const ApiReferencePluginSchema = z.function().returns(\n z.object({\n name: z.string(),\n extensions: z.array(OpenApiExtensionSchema),\n }),\n)\n\n// Infer the types from the schemas\nexport type SpecificationExtension = z.infer<typeof OpenApiExtensionSchema>\nexport type ApiReferencePlugin = z.infer<typeof ApiReferencePluginSchema>\n"],
5
- "mappings": "AAGA,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;AAEM,MAAM,2BAA2B,EAAE,SAAS,EAAE;AAAA,EACnD,EAAE,OAAO;AAAA,IACP,MAAM,EAAE,OAAO;AAAA,IACf,YAAY,EAAE,MAAM,sBAAsB;AAAA,EAC5C,CAAC;AACH;",
4
+ "sourcesContent": ["// TODO: Oh, do we really want to make this a dependency?\n// import type { Component } from 'vue'\n\nimport { 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\nexport const ApiReferencePluginSchema = z.function({\n input: [],\n output: z.object({\n name: z.string(),\n extensions: z.array(OpenApiExtensionSchema),\n }),\n})\n\n// Infer the types from the schemas\nexport type SpecificationExtension = z.infer<typeof OpenApiExtensionSchema>\nexport type ApiReferencePlugin = z.infer<typeof ApiReferencePluginSchema>\n"],
5
+ "mappings": "AAGA,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;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,EAC5C,CAAC;AACH,CAAC;",
6
6
  "names": []
7
7
  }
@@ -4,27 +4,9 @@ import type { ApiReferenceConfigurationWithSources } from './api-reference-confi
4
4
  * Zod schema for HTML rendering configuration
5
5
  */
6
6
  export declare const htmlRenderingConfigurationSchema: z.ZodObject<{
7
- /**
8
- * The URL to the Scalar API Reference JS CDN.
9
- *
10
- * Use this to pin a specific version of the Scalar API Reference.
11
- *
12
- * @default https://cdn.jsdelivr.net/npm/@scalar/api-reference
13
- *
14
- * @example https://cdn.jsdelivr.net/npm/@scalar/api-reference@1.25.122
15
- */
16
7
  cdn: z.ZodDefault<z.ZodOptional<z.ZodString>>;
17
- /**
18
- * The title of the page.
19
- */
20
8
  pageTitle: z.ZodDefault<z.ZodOptional<z.ZodString>>;
21
- }, "strip", z.ZodTypeAny, {
22
- cdn: string;
23
- pageTitle: string;
24
- }, {
25
- cdn?: string | undefined;
26
- pageTitle?: string | undefined;
27
- }>;
9
+ }, z.core.$strip>;
28
10
  /**
29
11
  * The configuration for the static HTML rendering using the CDN.
30
12
  *
@@ -1 +1 @@
1
- {"version":3,"file":"html-rendering-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/html-rendering-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,+BAA+B,CAAA;AAEzF;;GAEG;AACH,eAAO,MAAM,gCAAgC;IAC3C;;;;;;;;OAQG;;IAEH;;OAEG;;;;;;;;EAEH,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG,OAAO,CAAC,oCAAoC,CAAC,GACpF,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA"}
1
+ {"version":3,"file":"html-rendering-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/html-rendering-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,+BAA+B,CAAA;AAEzF;;GAEG;AACH,eAAO,MAAM,gCAAgC;;;iBAe3C,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG,OAAO,CAAC,oCAAoC,CAAC,GACpF,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA"}