@scalar/types 0.1.5 → 0.1.7

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,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import type { AuthenticationConfiguration } from '../api-reference/authentication-configuration.ts';
2
+ import type { AuthenticationConfiguration } from './authentication-configuration.ts';
3
3
  /** Configuration for the OpenAPI/Swagger specification */
4
4
  export declare const specConfigurationSchema: z.ZodObject<{
5
5
  /**
@@ -56,7 +56,7 @@ export declare const specConfigurationSchema: z.ZodObject<{
56
56
  *
57
57
  * If none is passed, the title will be used.
58
58
  *
59
- * If no title is used, itll just use the index.
59
+ * If no title is used, it'll just use the index.
60
60
  *
61
61
  * @example 'scalar-galaxy'
62
62
  *
@@ -85,7 +85,7 @@ export declare const apiClientConfigurationSchema: z.ZodObject<{
85
85
  * Directly embed the OpenAPI document.
86
86
  * Can be a string, object, function returning an object, or null.
87
87
  *
88
- * @remarks Its recommended to pass a URL instead of content.
88
+ * @remarks It's recommended to pass a URL instead of content.
89
89
  **/
90
90
  content: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>, z.ZodNull]>>;
91
91
  /**
@@ -99,7 +99,7 @@ export declare const apiClientConfigurationSchema: z.ZodObject<{
99
99
  *
100
100
  * If none is passed, the title will be used.
101
101
  *
102
- * If no title is used, itll just use the index.
102
+ * If no title is used, it'll just use the index.
103
103
  *
104
104
  * @example 'scalar-galaxy'
105
105
  */
@@ -164,7 +164,7 @@ export declare const apiClientConfigurationSchema: z.ZodObject<{
164
164
  *
165
165
  * If none is passed, the title will be used.
166
166
  *
167
- * If no title is used, itll just use the index.
167
+ * If no title is used, it'll just use the index.
168
168
  *
169
169
  * @example 'scalar-galaxy'
170
170
  *
@@ -206,6 +206,8 @@ export declare const apiClientConfigurationSchema: z.ZodObject<{
206
206
  theme: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["alternate", "default", "moon", "purple", "solarized", "bluePlanet", "deepSpace", "saturn", "kepler", "elysiajs", "fastify", "mars", "none"]>>>>;
207
207
  /** Integration type identifier */
208
208
  _integration: z.ZodOptional<z.ZodNullable<z.ZodEnum<["adonisjs", "docusaurus", "dotnet", "elysiajs", "express", "fastapi", "fastify", "go", "hono", "html", "laravel", "litestar", "nestjs", "nextjs", "nitro", "nuxt", "platformatic", "react", "rust", "vue"]>>>;
209
+ /** onRequestSent is fired when a request is sent */
210
+ onRequestSent: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
209
211
  }, "strip", z.ZodTypeAny, {
210
212
  hideClientButton: boolean;
211
213
  showSidebar: boolean;
@@ -223,9 +225,10 @@ export declare const apiClientConfigurationSchema: z.ZodObject<{
223
225
  authentication?: any;
224
226
  baseServerURL?: string | undefined;
225
227
  proxyUrl?: string | undefined;
226
- searchHotKey?: "o" | "n" | "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
228
+ searchHotKey?: "c" | "r" | "o" | "n" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
227
229
  servers?: any[] | undefined;
228
230
  _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
231
+ onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
229
232
  }, {
230
233
  url?: string | undefined;
231
234
  content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
@@ -241,13 +244,562 @@ export declare const apiClientConfigurationSchema: z.ZodObject<{
241
244
  baseServerURL?: string | undefined;
242
245
  hideClientButton?: unknown;
243
246
  proxyUrl?: string | undefined;
244
- searchHotKey?: "o" | "n" | "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
247
+ searchHotKey?: "c" | "r" | "o" | "n" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
245
248
  servers?: any[] | undefined;
246
249
  showSidebar?: unknown;
247
250
  theme?: unknown;
248
251
  _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
252
+ onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
249
253
  }>;
250
254
  export type ApiClientConfiguration = z.infer<typeof apiClientConfigurationSchema>;
255
+ /** Configuration for the Api Client without the transform since it cannot be merged */
256
+ declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendShape<{
257
+ /**
258
+ * URL to an OpenAPI/Swagger document
259
+ **/
260
+ url: z.ZodOptional<z.ZodString>;
261
+ /**
262
+ * Directly embed the OpenAPI document.
263
+ * Can be a string, object, function returning an object, or null.
264
+ *
265
+ * @remarks It's recommended to pass a URL instead of content.
266
+ **/
267
+ content: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>, z.ZodNull]>>;
268
+ /**
269
+ * The title of the OpenAPI document.
270
+ *
271
+ * @example 'Scalar Galaxy'
272
+ */
273
+ title: z.ZodOptional<z.ZodString>;
274
+ /**
275
+ * The slug of the OpenAPI document used in the URL.
276
+ *
277
+ * If none is passed, the title will be used.
278
+ *
279
+ * If no title is used, it'll just use the index.
280
+ *
281
+ * @example 'scalar-galaxy'
282
+ */
283
+ slug: z.ZodOptional<z.ZodString>;
284
+ /**
285
+ * The OpenAPI/Swagger document to render
286
+ *
287
+ * @deprecated Use `url` and `content` on the top level instead.
288
+ **/
289
+ spec: z.ZodOptional<z.ZodObject<{
290
+ /**
291
+ * URL to an OpenAPI/Swagger document
292
+ *
293
+ * @deprecated Please move `url` to the top level and remove the `spec` prefix.
294
+ *
295
+ * @example
296
+ * ```ts
297
+ * const oldConfiguration = {
298
+ * spec: {
299
+ * url: 'https://example.com/openapi.json',
300
+ * },
301
+ * }
302
+ *
303
+ * const newConfiguration = {
304
+ * url: 'https://example.com/openapi.json',
305
+ * }
306
+ * ```
307
+ **/
308
+ url: z.ZodOptional<z.ZodString>;
309
+ /**
310
+ * Directly embed the OpenAPI document.
311
+ * Can be a string, object, function returning an object, or null.
312
+ *
313
+ * @remarks It's recommended to pass a URL instead of content.
314
+ *
315
+ * @deprecated Please move `content` to the top level and remove the `spec` prefix.
316
+ *
317
+ * @example
318
+ * ```ts
319
+ * const oldConfiguration = {
320
+ * spec: {
321
+ * content: '…',
322
+ * },
323
+ * }
324
+ *
325
+ * const newConfiguration = {
326
+ * content: '…',
327
+ * }
328
+ * ```
329
+ **/
330
+ content: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>, z.ZodNull]>>;
331
+ /**
332
+ * The title of the OpenAPI document.
333
+ *
334
+ * @example 'Scalar Galaxy'
335
+ *
336
+ * @deprecated Please move `title` to the top level and remove the `spec` prefix.
337
+ */
338
+ title: z.ZodOptional<z.ZodString>;
339
+ /**
340
+ * The slug of the OpenAPI document used in the URL.
341
+ *
342
+ * If none is passed, the title will be used.
343
+ *
344
+ * If no title is used, it'll just use the index.
345
+ *
346
+ * @example 'scalar-galaxy'
347
+ *
348
+ * @deprecated Please move `slug` to the top level and remove the `spec` prefix.
349
+ */
350
+ slug: z.ZodOptional<z.ZodString>;
351
+ }, "strip", z.ZodTypeAny, {
352
+ url?: string | undefined;
353
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
354
+ title?: string | undefined;
355
+ slug?: string | undefined;
356
+ }, {
357
+ url?: string | undefined;
358
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
359
+ title?: string | undefined;
360
+ slug?: string | undefined;
361
+ }>>;
362
+ /** Prefill authentication */
363
+ authentication: z.ZodOptional<z.ZodAny>;
364
+ /** Base URL for the API server */
365
+ baseServerURL: z.ZodOptional<z.ZodString>;
366
+ /**
367
+ * Whether to hide the client button
368
+ * @default false
369
+ */
370
+ hideClientButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
371
+ /** URL to a request proxy for the API client */
372
+ proxyUrl: z.ZodOptional<z.ZodString>;
373
+ /** Key used with CTRL/CMD to open the search modal (defaults to 'k' e.g. CMD+k) */
374
+ searchHotKey: z.ZodOptional<z.ZodEnum<["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]>>;
375
+ /** List of OpenAPI server objects */
376
+ servers: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
377
+ /**
378
+ * Whether to show the sidebar
379
+ * @default true
380
+ */
381
+ showSidebar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
382
+ /** A string to use one of the color presets */
383
+ theme: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["alternate", "default", "moon", "purple", "solarized", "bluePlanet", "deepSpace", "saturn", "kepler", "elysiajs", "fastify", "mars", "none"]>>>>;
384
+ /** Integration type identifier */
385
+ _integration: z.ZodOptional<z.ZodNullable<z.ZodEnum<["adonisjs", "docusaurus", "dotnet", "elysiajs", "express", "fastapi", "fastify", "go", "hono", "html", "laravel", "litestar", "nestjs", "nextjs", "nitro", "nuxt", "platformatic", "react", "rust", "vue"]>>>;
386
+ /** onRequestSent is fired when a request is sent */
387
+ onRequestSent: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
388
+ }, {
389
+ /**
390
+ * The layout to use for the references
391
+ * @default 'modern'
392
+ */
393
+ layout: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["modern", "classic"]>>>>;
394
+ /**
395
+ * URL to a request proxy for the API client
396
+ * @deprecated Use proxyUrl instead
397
+ */
398
+ proxy: z.ZodOptional<z.ZodString>;
399
+ /**
400
+ * Plugins for the API reference
401
+ */
402
+ plugins: z.ZodOptional<z.ZodArray<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodObject<{
403
+ name: z.ZodString;
404
+ extensions: z.ZodArray<z.ZodObject<{
405
+ name: z.ZodString;
406
+ component: z.ZodUnknown;
407
+ }, "strip", z.ZodTypeAny, {
408
+ name: string;
409
+ component?: unknown;
410
+ }, {
411
+ name: string;
412
+ component?: unknown;
413
+ }>, "many">;
414
+ }, "strip", z.ZodTypeAny, {
415
+ name: string;
416
+ extensions: {
417
+ name: string;
418
+ component?: unknown;
419
+ }[];
420
+ }, {
421
+ name: string;
422
+ extensions: {
423
+ name: string;
424
+ component?: unknown;
425
+ }[];
426
+ }>>, "many">>;
427
+ /**
428
+ * Whether the spec input should show
429
+ * @default false
430
+ */
431
+ isEditable: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
432
+ /**
433
+ * Controls whether the references show a loading state in the intro
434
+ * @default false
435
+ */
436
+ isLoading: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
437
+ /**
438
+ * Whether to show models in the sidebar, search, and content.
439
+ * @default false
440
+ */
441
+ hideModels: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
442
+ /**
443
+ * Whether to show the "Download OpenAPI Document" button
444
+ * @default false
445
+ */
446
+ hideDownloadButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
447
+ /**
448
+ * Whether to show the "Test Request" button
449
+ * @default false
450
+ */
451
+ hideTestRequestButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
452
+ /**
453
+ * Whether to show the sidebar search bar
454
+ * @default false
455
+ */
456
+ hideSearch: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
457
+ /** Whether dark mode is on or off initially (light mode) */
458
+ darkMode: z.ZodOptional<z.ZodBoolean>;
459
+ /** forceDarkModeState makes it always this state no matter what */
460
+ forceDarkModeState: z.ZodOptional<z.ZodEnum<["dark", "light"]>>;
461
+ /**
462
+ * Whether to show the dark mode toggle
463
+ * @default false
464
+ */
465
+ hideDarkModeToggle: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
466
+ /**
467
+ * If used, passed data will be added to the HTML header
468
+ * @see https://unhead.unjs.io/usage/composables/use-seo-meta
469
+ */
470
+ metaData: z.ZodOptional<z.ZodAny>;
471
+ /**
472
+ * Path to a favicon image
473
+ * @default undefined
474
+ * @example '/favicon.svg'
475
+ */
476
+ favicon: z.ZodOptional<z.ZodString>;
477
+ /**
478
+ * List of httpsnippet clients to hide from the clients menu
479
+ * By default hides Unirest, pass `[]` to show all clients
480
+ */
481
+ hiddenClients: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>, z.ZodArray<z.ZodString, "many">, z.ZodLiteral<true>]>>;
482
+ /** Determine the HTTP client that's selected by default */
483
+ defaultHttpClient: z.ZodOptional<z.ZodObject<{
484
+ targetKey: z.ZodType<"c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart", z.ZodTypeDef, "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart">;
485
+ clientKey: z.ZodString;
486
+ }, "strip", z.ZodTypeAny, {
487
+ targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
488
+ clientKey: string;
489
+ }, {
490
+ targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
491
+ clientKey: string;
492
+ }>>;
493
+ /** Custom CSS to be added to the page */
494
+ customCss: z.ZodOptional<z.ZodString>;
495
+ /** onSpecUpdate is fired on spec/swagger content change */
496
+ onSpecUpdate: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
497
+ /** onServerChange is fired on selected server change */
498
+ onServerChange: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
499
+ /** onDocumentSelect is fired when the config is selected */
500
+ onDocumentSelect: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
501
+ /** Callback fired when the reference is fully loaded */
502
+ onLoaded: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
503
+ /**
504
+ * onShowMore is fired when the user clicks the "Show more" button on the references
505
+ * @param tagId - The ID of the tag that was clicked
506
+ */
507
+ onShowMore: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
508
+ /**
509
+ * onSidebarClick is fired when the user clicks on a sidebar item
510
+ * @param href - The href of the sidebar item that was clicked
511
+ */
512
+ onSidebarClick: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
513
+ /**
514
+ * Route using paths instead of hashes, your server MUST support this
515
+ * @example '/standalone-api-reference/:custom(.*)?'
516
+ * @experimental
517
+ * @default undefined
518
+ */
519
+ pathRouting: z.ZodOptional<z.ZodObject<{
520
+ /** Base path for the API reference */
521
+ basePath: z.ZodString;
522
+ }, "strip", z.ZodTypeAny, {
523
+ basePath: string;
524
+ }, {
525
+ basePath: string;
526
+ }>>;
527
+ /**
528
+ * Customize the heading portion of the hash
529
+ * @param heading - The heading object
530
+ * @returns A string ID used to generate the URL hash
531
+ * @default (heading) => `#description/${heading.slug}`
532
+ */
533
+ generateHeadingSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
534
+ slug: z.ZodDefault<z.ZodString>;
535
+ }, "strip", z.ZodTypeAny, {
536
+ slug: string;
537
+ }, {
538
+ slug?: string | undefined;
539
+ }>], z.ZodUnknown>, z.ZodString>>;
540
+ /**
541
+ * Customize the model portion of the hash
542
+ * @param model - The model object with a name property
543
+ * @returns A string ID used to generate the URL hash
544
+ * @default (model) => slug(model.name)
545
+ */
546
+ generateModelSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
547
+ name: z.ZodDefault<z.ZodString>;
548
+ }, "strip", z.ZodTypeAny, {
549
+ name: string;
550
+ }, {
551
+ name?: string | undefined;
552
+ }>], z.ZodUnknown>, z.ZodString>>;
553
+ /**
554
+ * Customize the tag portion of the hash
555
+ * @param tag - The tag object
556
+ * @returns A string ID used to generate the URL hash
557
+ * @default (tag) => slug(tag.name)
558
+ */
559
+ generateTagSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
560
+ name: z.ZodDefault<z.ZodString>;
561
+ }, "strip", z.ZodTypeAny, {
562
+ name: string;
563
+ }, {
564
+ name?: string | undefined;
565
+ }>], z.ZodUnknown>, z.ZodString>>;
566
+ /**
567
+ * Customize the operation portion of the hash
568
+ * @param operation - The operation object
569
+ * @returns A string ID used to generate the URL hash
570
+ * @default (operation) => `${operation.method}${operation.path}`
571
+ */
572
+ generateOperationSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
573
+ path: z.ZodString;
574
+ operationId: z.ZodOptional<z.ZodString>;
575
+ method: z.ZodString;
576
+ summary: z.ZodOptional<z.ZodString>;
577
+ }, "strip", z.ZodTypeAny, {
578
+ path: string;
579
+ method: string;
580
+ operationId?: string | undefined;
581
+ summary?: string | undefined;
582
+ }, {
583
+ path: string;
584
+ method: string;
585
+ operationId?: string | undefined;
586
+ summary?: string | undefined;
587
+ }>], z.ZodUnknown>, z.ZodString>>;
588
+ /**
589
+ * Customize the webhook portion of the hash
590
+ * @param webhook - The webhook object
591
+ * @returns A string ID used to generate the URL hash
592
+ * @default (webhook) => slug(webhook.name)
593
+ */
594
+ generateWebhookSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
595
+ name: z.ZodString;
596
+ method: z.ZodOptional<z.ZodString>;
597
+ }, "strip", z.ZodTypeAny, {
598
+ name: string;
599
+ method?: string | undefined;
600
+ }, {
601
+ name: string;
602
+ method?: string | undefined;
603
+ }>], z.ZodUnknown>, z.ZodString>>;
604
+ /**
605
+ * To handle redirects, pass a function that will recieve:
606
+ * - The current path with hash if pathRouting is enabled
607
+ * - The current hash if hashRouting (default)
608
+ * And then passes that to history.replaceState
609
+ *
610
+ * @example hashRouting (default)
611
+ * ```ts
612
+ * redirect: (hash: string) => hash.replace('#v1/old-path', '#v2/new-path')
613
+ * ```
614
+ * @example pathRouting
615
+ * ```ts
616
+ * redirect: (pathWithHash: string) => {
617
+ * if (pathWithHash.includes('#')) {
618
+ * return pathWithHash.replace('/v1/tags/user#operation/get-user', '/v1/tags/user/operation/get-user')
619
+ * }
620
+ * return null
621
+ * }
622
+ * ```
623
+ */
624
+ redirect: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
625
+ /**
626
+ * Whether to include default fonts
627
+ * @default true
628
+ */
629
+ withDefaultFonts: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
630
+ /** Whether to expand all tags by default */
631
+ defaultOpenAllTags: z.ZodOptional<z.ZodBoolean>;
632
+ /**
633
+ * Function to sort tags
634
+ * @default 'alpha' for alphabetical sorting
635
+ */
636
+ tagsSorter: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"alpha">, z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodAny], z.ZodUnknown>, z.ZodNumber>]>>;
637
+ /**
638
+ * Function to sort operations
639
+ * @default 'alpha' for alphabetical sorting
640
+ */
641
+ operationsSorter: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"alpha">, z.ZodLiteral<"method">, z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodAny], z.ZodUnknown>, z.ZodNumber>]>>;
642
+ }>, "strip", z.ZodTypeAny, {
643
+ hideClientButton: boolean;
644
+ showSidebar: boolean;
645
+ theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "none";
646
+ layout: "modern" | "classic";
647
+ isEditable: boolean;
648
+ isLoading: boolean;
649
+ hideModels: boolean;
650
+ hideDownloadButton: boolean;
651
+ hideTestRequestButton: boolean;
652
+ hideSearch: boolean;
653
+ hideDarkModeToggle: boolean;
654
+ withDefaultFonts: boolean;
655
+ url?: string | undefined;
656
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
657
+ title?: string | undefined;
658
+ slug?: string | undefined;
659
+ spec?: {
660
+ url?: string | undefined;
661
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
662
+ title?: string | undefined;
663
+ slug?: string | undefined;
664
+ } | undefined;
665
+ authentication?: any;
666
+ baseServerURL?: string | undefined;
667
+ proxyUrl?: string | undefined;
668
+ searchHotKey?: "c" | "r" | "o" | "n" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
669
+ servers?: any[] | undefined;
670
+ _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
671
+ onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
672
+ proxy?: string | undefined;
673
+ plugins?: ((...args: unknown[]) => {
674
+ name: string;
675
+ extensions: {
676
+ name: string;
677
+ component?: unknown;
678
+ }[];
679
+ })[] | undefined;
680
+ darkMode?: boolean | undefined;
681
+ forceDarkModeState?: "dark" | "light" | undefined;
682
+ metaData?: any;
683
+ favicon?: string | undefined;
684
+ hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
685
+ defaultHttpClient?: {
686
+ targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
687
+ clientKey: string;
688
+ } | undefined;
689
+ customCss?: string | undefined;
690
+ onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
691
+ onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
692
+ onDocumentSelect?: ((...args: unknown[]) => void | Promise<void>) | undefined;
693
+ onLoaded?: ((...args: unknown[]) => void | Promise<void>) | undefined;
694
+ onShowMore?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
695
+ onSidebarClick?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
696
+ pathRouting?: {
697
+ basePath: string;
698
+ } | undefined;
699
+ generateHeadingSlug?: ((args_0: {
700
+ slug?: string | undefined;
701
+ }, ...args: unknown[]) => string) | undefined;
702
+ generateModelSlug?: ((args_0: {
703
+ name?: string | undefined;
704
+ }, ...args: unknown[]) => string) | undefined;
705
+ generateTagSlug?: ((args_0: {
706
+ name?: string | undefined;
707
+ }, ...args: unknown[]) => string) | undefined;
708
+ generateOperationSlug?: ((args_0: {
709
+ path: string;
710
+ method: string;
711
+ operationId?: string | undefined;
712
+ summary?: string | undefined;
713
+ }, ...args: unknown[]) => string) | undefined;
714
+ generateWebhookSlug?: ((args_0: {
715
+ name: string;
716
+ method?: string | undefined;
717
+ }, ...args: unknown[]) => string) | undefined;
718
+ redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
719
+ defaultOpenAllTags?: boolean | undefined;
720
+ tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
721
+ operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
722
+ }, {
723
+ url?: string | undefined;
724
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
725
+ title?: string | undefined;
726
+ slug?: string | undefined;
727
+ spec?: {
728
+ url?: string | undefined;
729
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
730
+ title?: string | undefined;
731
+ slug?: string | undefined;
732
+ } | undefined;
733
+ authentication?: any;
734
+ baseServerURL?: string | undefined;
735
+ hideClientButton?: unknown;
736
+ proxyUrl?: string | undefined;
737
+ searchHotKey?: "c" | "r" | "o" | "n" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
738
+ servers?: any[] | undefined;
739
+ showSidebar?: unknown;
740
+ theme?: unknown;
741
+ _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
742
+ onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
743
+ layout?: unknown;
744
+ proxy?: string | undefined;
745
+ plugins?: ((...args: unknown[]) => {
746
+ name: string;
747
+ extensions: {
748
+ name: string;
749
+ component?: unknown;
750
+ }[];
751
+ })[] | undefined;
752
+ isEditable?: unknown;
753
+ isLoading?: unknown;
754
+ hideModels?: unknown;
755
+ hideDownloadButton?: unknown;
756
+ hideTestRequestButton?: unknown;
757
+ hideSearch?: unknown;
758
+ darkMode?: boolean | undefined;
759
+ forceDarkModeState?: "dark" | "light" | undefined;
760
+ hideDarkModeToggle?: unknown;
761
+ metaData?: any;
762
+ favicon?: string | undefined;
763
+ hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
764
+ defaultHttpClient?: {
765
+ targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
766
+ clientKey: string;
767
+ } | undefined;
768
+ customCss?: string | undefined;
769
+ onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
770
+ onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
771
+ onDocumentSelect?: ((...args: unknown[]) => void | Promise<void>) | undefined;
772
+ onLoaded?: ((...args: unknown[]) => void | Promise<void>) | undefined;
773
+ onShowMore?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
774
+ onSidebarClick?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
775
+ pathRouting?: {
776
+ basePath: string;
777
+ } | undefined;
778
+ generateHeadingSlug?: ((args_0: {
779
+ slug: string;
780
+ }, ...args: unknown[]) => string) | undefined;
781
+ generateModelSlug?: ((args_0: {
782
+ name: string;
783
+ }, ...args: unknown[]) => string) | undefined;
784
+ generateTagSlug?: ((args_0: {
785
+ name: string;
786
+ }, ...args: unknown[]) => string) | undefined;
787
+ generateOperationSlug?: ((args_0: {
788
+ path: string;
789
+ method: string;
790
+ operationId?: string | undefined;
791
+ summary?: string | undefined;
792
+ }, ...args: unknown[]) => string) | undefined;
793
+ generateWebhookSlug?: ((args_0: {
794
+ name: string;
795
+ method?: string | undefined;
796
+ }, ...args: unknown[]) => string) | undefined;
797
+ redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
798
+ withDefaultFonts?: unknown;
799
+ defaultOpenAllTags?: boolean | undefined;
800
+ tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
801
+ operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
802
+ }>;
251
803
  /** Configuration for the Api Reference */
252
804
  export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z.objectUtil.extendShape<{
253
805
  /**
@@ -258,7 +810,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
258
810
  * Directly embed the OpenAPI document.
259
811
  * Can be a string, object, function returning an object, or null.
260
812
  *
261
- * @remarks Its recommended to pass a URL instead of content.
813
+ * @remarks It's recommended to pass a URL instead of content.
262
814
  **/
263
815
  content: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>, z.ZodNull]>>;
264
816
  /**
@@ -272,7 +824,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
272
824
  *
273
825
  * If none is passed, the title will be used.
274
826
  *
275
- * If no title is used, itll just use the index.
827
+ * If no title is used, it'll just use the index.
276
828
  *
277
829
  * @example 'scalar-galaxy'
278
830
  */
@@ -337,7 +889,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
337
889
  *
338
890
  * If none is passed, the title will be used.
339
891
  *
340
- * If no title is used, itll just use the index.
892
+ * If no title is used, it'll just use the index.
341
893
  *
342
894
  * @example 'scalar-galaxy'
343
895
  *
@@ -379,6 +931,8 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
379
931
  theme: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["alternate", "default", "moon", "purple", "solarized", "bluePlanet", "deepSpace", "saturn", "kepler", "elysiajs", "fastify", "mars", "none"]>>>>;
380
932
  /** Integration type identifier */
381
933
  _integration: z.ZodOptional<z.ZodNullable<z.ZodEnum<["adonisjs", "docusaurus", "dotnet", "elysiajs", "express", "fastapi", "fastify", "go", "hono", "html", "laravel", "litestar", "nestjs", "nextjs", "nitro", "nuxt", "platformatic", "react", "rust", "vue"]>>>;
934
+ /** onRequestSent is fired when a request is sent */
935
+ onRequestSent: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
382
936
  }, {
383
937
  /**
384
938
  * The layout to use for the references
@@ -390,6 +944,34 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
390
944
  * @deprecated Use proxyUrl instead
391
945
  */
392
946
  proxy: z.ZodOptional<z.ZodString>;
947
+ /**
948
+ * Plugins for the API reference
949
+ */
950
+ plugins: z.ZodOptional<z.ZodArray<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodObject<{
951
+ name: z.ZodString;
952
+ extensions: z.ZodArray<z.ZodObject<{
953
+ name: z.ZodString;
954
+ component: z.ZodUnknown;
955
+ }, "strip", z.ZodTypeAny, {
956
+ name: string;
957
+ component?: unknown;
958
+ }, {
959
+ name: string;
960
+ component?: unknown;
961
+ }>, "many">;
962
+ }, "strip", z.ZodTypeAny, {
963
+ name: string;
964
+ extensions: {
965
+ name: string;
966
+ component?: unknown;
967
+ }[];
968
+ }, {
969
+ name: string;
970
+ extensions: {
971
+ name: string;
972
+ component?: unknown;
973
+ }[];
974
+ }>>, "many">>;
393
975
  /**
394
976
  * Whether the spec input should show
395
977
  * @default false
@@ -447,13 +1029,13 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
447
1029
  hiddenClients: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>, z.ZodArray<z.ZodString, "many">, z.ZodLiteral<true>]>>;
448
1030
  /** Determine the HTTP client that's selected by default */
449
1031
  defaultHttpClient: z.ZodOptional<z.ZodObject<{
450
- targetKey: z.ZodType<"http" | "c" | "clojure" | "csharp" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart", z.ZodTypeDef, "http" | "c" | "clojure" | "csharp" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart">;
1032
+ targetKey: z.ZodType<"c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart", z.ZodTypeDef, "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart">;
451
1033
  clientKey: z.ZodString;
452
1034
  }, "strip", z.ZodTypeAny, {
453
- targetKey: "http" | "c" | "clojure" | "csharp" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
1035
+ targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
454
1036
  clientKey: string;
455
1037
  }, {
456
- targetKey: "http" | "c" | "clojure" | "csharp" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
1038
+ targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
457
1039
  clientKey: string;
458
1040
  }>>;
459
1041
  /** Custom CSS to be added to the page */
@@ -464,6 +1046,18 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
464
1046
  onServerChange: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
465
1047
  /** onDocumentSelect is fired when the config is selected */
466
1048
  onDocumentSelect: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
1049
+ /** Callback fired when the reference is fully loaded */
1050
+ onLoaded: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
1051
+ /**
1052
+ * onShowMore is fired when the user clicks the "Show more" button on the references
1053
+ * @param tagId - The ID of the tag that was clicked
1054
+ */
1055
+ onShowMore: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
1056
+ /**
1057
+ * onSidebarClick is fired when the user clicks on a sidebar item
1058
+ * @param href - The href of the sidebar item that was clicked
1059
+ */
1060
+ onSidebarClick: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
467
1061
  /**
468
1062
  * Route using paths instead of hashes, your server MUST support this
469
1063
  * @example '/standalone-api-reference/:custom(.*)?'
@@ -555,8 +1149,6 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
555
1149
  name: string;
556
1150
  method?: string | undefined;
557
1151
  }>], z.ZodUnknown>, z.ZodString>>;
558
- /** Callback fired when the reference is fully loaded */
559
- onLoaded: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodVoid>>;
560
1152
  /**
561
1153
  * To handle redirects, pass a function that will recieve:
562
1154
  * - The current path with hash if pathRouting is enabled
@@ -621,23 +1213,34 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
621
1213
  authentication?: any;
622
1214
  baseServerURL?: string | undefined;
623
1215
  proxyUrl?: string | undefined;
624
- searchHotKey?: "o" | "n" | "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
1216
+ searchHotKey?: "c" | "r" | "o" | "n" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
625
1217
  servers?: any[] | undefined;
626
1218
  _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
1219
+ onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
627
1220
  proxy?: string | undefined;
1221
+ plugins?: ((...args: unknown[]) => {
1222
+ name: string;
1223
+ extensions: {
1224
+ name: string;
1225
+ component?: unknown;
1226
+ }[];
1227
+ })[] | undefined;
628
1228
  darkMode?: boolean | undefined;
629
1229
  forceDarkModeState?: "dark" | "light" | undefined;
630
1230
  metaData?: any;
631
1231
  favicon?: string | undefined;
632
1232
  hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
633
1233
  defaultHttpClient?: {
634
- targetKey: "http" | "c" | "clojure" | "csharp" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
1234
+ targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
635
1235
  clientKey: string;
636
1236
  } | undefined;
637
1237
  customCss?: string | undefined;
638
1238
  onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
639
1239
  onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
640
1240
  onDocumentSelect?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1241
+ onLoaded?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1242
+ onShowMore?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
1243
+ onSidebarClick?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
641
1244
  pathRouting?: {
642
1245
  basePath: string;
643
1246
  } | undefined;
@@ -660,7 +1263,6 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
660
1263
  name: string;
661
1264
  method?: string | undefined;
662
1265
  }, ...args: unknown[]) => string) | undefined;
663
- onLoaded?: ((...args: unknown[]) => void) | undefined;
664
1266
  redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
665
1267
  defaultOpenAllTags?: boolean | undefined;
666
1268
  tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
@@ -680,13 +1282,21 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
680
1282
  baseServerURL?: string | undefined;
681
1283
  hideClientButton?: unknown;
682
1284
  proxyUrl?: string | undefined;
683
- searchHotKey?: "o" | "n" | "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
1285
+ searchHotKey?: "c" | "r" | "o" | "n" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
684
1286
  servers?: any[] | undefined;
685
1287
  showSidebar?: unknown;
686
1288
  theme?: unknown;
687
1289
  _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
1290
+ onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
688
1291
  layout?: unknown;
689
1292
  proxy?: string | undefined;
1293
+ plugins?: ((...args: unknown[]) => {
1294
+ name: string;
1295
+ extensions: {
1296
+ name: string;
1297
+ component?: unknown;
1298
+ }[];
1299
+ })[] | undefined;
690
1300
  isEditable?: unknown;
691
1301
  isLoading?: unknown;
692
1302
  hideModels?: unknown;
@@ -700,13 +1310,16 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
700
1310
  favicon?: string | undefined;
701
1311
  hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
702
1312
  defaultHttpClient?: {
703
- targetKey: "http" | "c" | "clojure" | "csharp" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
1313
+ targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
704
1314
  clientKey: string;
705
1315
  } | undefined;
706
1316
  customCss?: string | undefined;
707
1317
  onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
708
1318
  onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
709
1319
  onDocumentSelect?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1320
+ onLoaded?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1321
+ onShowMore?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
1322
+ onSidebarClick?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
710
1323
  pathRouting?: {
711
1324
  basePath: string;
712
1325
  } | undefined;
@@ -729,7 +1342,6 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
729
1342
  name: string;
730
1343
  method?: string | undefined;
731
1344
  }, ...args: unknown[]) => string) | undefined;
732
- onLoaded?: ((...args: unknown[]) => void) | undefined;
733
1345
  redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
734
1346
  withDefaultFonts?: unknown;
735
1347
  defaultOpenAllTags?: boolean | undefined;
@@ -761,23 +1373,34 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
761
1373
  authentication?: any;
762
1374
  baseServerURL?: string | undefined;
763
1375
  proxyUrl?: string | undefined;
764
- searchHotKey?: "o" | "n" | "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
1376
+ searchHotKey?: "c" | "r" | "o" | "n" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
765
1377
  servers?: any[] | undefined;
766
1378
  _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
1379
+ onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
767
1380
  proxy?: string | undefined;
1381
+ plugins?: ((...args: unknown[]) => {
1382
+ name: string;
1383
+ extensions: {
1384
+ name: string;
1385
+ component?: unknown;
1386
+ }[];
1387
+ })[] | undefined;
768
1388
  darkMode?: boolean | undefined;
769
1389
  forceDarkModeState?: "dark" | "light" | undefined;
770
1390
  metaData?: any;
771
1391
  favicon?: string | undefined;
772
1392
  hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
773
1393
  defaultHttpClient?: {
774
- targetKey: "http" | "c" | "clojure" | "csharp" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
1394
+ targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
775
1395
  clientKey: string;
776
1396
  } | undefined;
777
1397
  customCss?: string | undefined;
778
1398
  onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
779
1399
  onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
780
1400
  onDocumentSelect?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1401
+ onLoaded?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1402
+ onShowMore?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
1403
+ onSidebarClick?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
781
1404
  pathRouting?: {
782
1405
  basePath: string;
783
1406
  } | undefined;
@@ -800,7 +1423,6 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
800
1423
  name: string;
801
1424
  method?: string | undefined;
802
1425
  }, ...args: unknown[]) => string) | undefined;
803
- onLoaded?: ((...args: unknown[]) => void) | undefined;
804
1426
  redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
805
1427
  defaultOpenAllTags?: boolean | undefined;
806
1428
  tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
@@ -820,13 +1442,21 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
820
1442
  baseServerURL?: string | undefined;
821
1443
  hideClientButton?: unknown;
822
1444
  proxyUrl?: string | undefined;
823
- searchHotKey?: "o" | "n" | "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
1445
+ searchHotKey?: "c" | "r" | "o" | "n" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
824
1446
  servers?: any[] | undefined;
825
1447
  showSidebar?: unknown;
826
1448
  theme?: unknown;
827
1449
  _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
1450
+ onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
828
1451
  layout?: unknown;
829
1452
  proxy?: string | undefined;
1453
+ plugins?: ((...args: unknown[]) => {
1454
+ name: string;
1455
+ extensions: {
1456
+ name: string;
1457
+ component?: unknown;
1458
+ }[];
1459
+ })[] | undefined;
830
1460
  isEditable?: unknown;
831
1461
  isLoading?: unknown;
832
1462
  hideModels?: unknown;
@@ -840,13 +1470,16 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
840
1470
  favicon?: string | undefined;
841
1471
  hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
842
1472
  defaultHttpClient?: {
843
- targetKey: "http" | "c" | "clojure" | "csharp" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
1473
+ targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
844
1474
  clientKey: string;
845
1475
  } | undefined;
846
1476
  customCss?: string | undefined;
847
1477
  onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
848
1478
  onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
849
1479
  onDocumentSelect?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1480
+ onLoaded?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1481
+ onShowMore?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
1482
+ onSidebarClick?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
850
1483
  pathRouting?: {
851
1484
  basePath: string;
852
1485
  } | undefined;
@@ -869,7 +1502,6 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
869
1502
  name: string;
870
1503
  method?: string | undefined;
871
1504
  }, ...args: unknown[]) => string) | undefined;
872
- onLoaded?: ((...args: unknown[]) => void) | undefined;
873
1505
  redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
874
1506
  withDefaultFonts?: unknown;
875
1507
  defaultOpenAllTags?: boolean | undefined;
@@ -877,7 +1509,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
877
1509
  operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
878
1510
  }>;
879
1511
  /** Configuration after parsing, this is the main type */
880
- export type ApiReferenceConfiguration = Omit<z.infer<typeof apiReferenceConfigurationSchema>, 'proxy' | 'spec'> & {
1512
+ export type ApiReferenceConfiguration = Omit<z.infer<typeof _apiReferenceConfigurationSchema>, 'proxy' | 'spec'> & {
881
1513
  authentication?: AuthenticationConfiguration;
882
1514
  };
883
1515
  /** Api Config which includes the default config */