@scalar/types 0.0.37 → 0.0.40

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,4 +1,42 @@
1
1
  import { z } from 'zod';
2
+ /** Configuration for the OpenAPI/Swagger specification */
3
+ export declare const specConfigurationSchema: z.ZodObject<{
4
+ /** URL to an OpenAPI/Swagger document */
5
+ url: z.ZodOptional<z.ZodString>;
6
+ /**
7
+ * Directly embed the OpenAPI document.
8
+ * Can be a string, object, function returning an object, or null.
9
+ * @remarks It's recommended to pass a URL instead of content.
10
+ */
11
+ 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]>>;
12
+ /**
13
+ * The title of the OpenAPI document.
14
+ *
15
+ * @example 'Scalar Galaxy'
16
+ */
17
+ title: z.ZodOptional<z.ZodString>;
18
+ /**
19
+ * The slug of the OpenAPI document used in the URL.
20
+ *
21
+ * If none is passed, the title will be used.
22
+ *
23
+ * If no title is used, it’ll just use the index.
24
+ *
25
+ * @example 'scalar-galaxy'
26
+ */
27
+ slug: z.ZodOptional<z.ZodString>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ url?: string | undefined;
30
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
31
+ title?: string | undefined;
32
+ slug?: string | undefined;
33
+ }, {
34
+ url?: string | undefined;
35
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
36
+ title?: string | undefined;
37
+ slug?: string | undefined;
38
+ }>;
39
+ export type SpecConfiguration = z.infer<typeof specConfigurationSchema>;
2
40
  /** Configuration for the Api Client */
3
41
  export declare const apiClientConfigurationSchema: z.ZodObject<{
4
42
  /** Prefill authentication */
@@ -31,12 +69,32 @@ export declare const apiClientConfigurationSchema: z.ZodObject<{
31
69
  * @remarks It's recommended to pass a URL instead of content.
32
70
  */
33
71
  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]>>;
72
+ /**
73
+ * The title of the OpenAPI document.
74
+ *
75
+ * @example 'Scalar Galaxy'
76
+ */
77
+ title: z.ZodOptional<z.ZodString>;
78
+ /**
79
+ * The slug of the OpenAPI document used in the URL.
80
+ *
81
+ * If none is passed, the title will be used.
82
+ *
83
+ * If no title is used, it’ll just use the index.
84
+ *
85
+ * @example 'scalar-galaxy'
86
+ */
87
+ slug: z.ZodOptional<z.ZodString>;
34
88
  }, "strip", z.ZodTypeAny, {
35
89
  url?: string | undefined;
36
90
  content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
91
+ title?: string | undefined;
92
+ slug?: string | undefined;
37
93
  }, {
38
94
  url?: string | undefined;
39
95
  content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
96
+ title?: string | undefined;
97
+ slug?: string | undefined;
40
98
  }>>;
41
99
  /** A string to use one of the color presets */
42
100
  theme: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["alternate", "default", "moon", "purple", "solarized", "bluePlanet", "deepSpace", "saturn", "kepler", "elysiajs", "fastify", "mars", "none"]>>>>;
@@ -46,27 +104,31 @@ export declare const apiClientConfigurationSchema: z.ZodObject<{
46
104
  hideClientButton: boolean;
47
105
  showSidebar: boolean;
48
106
  theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "none";
49
- servers?: any[] | undefined;
50
107
  authentication?: any;
51
108
  baseServerURL?: string | undefined;
52
109
  proxyUrl?: string | undefined;
53
- searchHotKey?: "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
110
+ 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;
111
+ servers?: any[] | undefined;
54
112
  spec?: {
55
113
  url?: string | undefined;
56
114
  content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
115
+ title?: string | undefined;
116
+ slug?: string | undefined;
57
117
  } | undefined;
58
118
  _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
59
119
  }, {
60
- servers?: any[] | undefined;
61
120
  authentication?: any;
62
121
  baseServerURL?: string | undefined;
63
122
  hideClientButton?: unknown;
64
123
  proxyUrl?: string | undefined;
65
- searchHotKey?: "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
124
+ 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;
125
+ servers?: any[] | undefined;
66
126
  showSidebar?: unknown;
67
127
  spec?: {
68
128
  url?: string | undefined;
69
129
  content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
130
+ title?: string | undefined;
131
+ slug?: string | undefined;
70
132
  } | undefined;
71
133
  theme?: unknown;
72
134
  _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
@@ -104,12 +166,32 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
104
166
  * @remarks It's recommended to pass a URL instead of content.
105
167
  */
106
168
  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]>>;
169
+ /**
170
+ * The title of the OpenAPI document.
171
+ *
172
+ * @example 'Scalar Galaxy'
173
+ */
174
+ title: z.ZodOptional<z.ZodString>;
175
+ /**
176
+ * The slug of the OpenAPI document used in the URL.
177
+ *
178
+ * If none is passed, the title will be used.
179
+ *
180
+ * If no title is used, it’ll just use the index.
181
+ *
182
+ * @example 'scalar-galaxy'
183
+ */
184
+ slug: z.ZodOptional<z.ZodString>;
107
185
  }, "strip", z.ZodTypeAny, {
108
186
  url?: string | undefined;
109
187
  content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
188
+ title?: string | undefined;
189
+ slug?: string | undefined;
110
190
  }, {
111
191
  url?: string | undefined;
112
192
  content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
193
+ title?: string | undefined;
194
+ slug?: string | undefined;
113
195
  }>>;
114
196
  /** A string to use one of the color presets */
115
197
  theme: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["alternate", "default", "moon", "purple", "solarized", "bluePlanet", "deepSpace", "saturn", "kepler", "elysiajs", "fastify", "mars", "none"]>>>>;
@@ -175,7 +257,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
175
257
  * List of httpsnippet clients to hide from the clients menu
176
258
  * By default hides Unirest, pass `[]` to show all clients
177
259
  */
178
- hiddenClients: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>, z.ZodArray<z.ZodString, "many">]>>;
260
+ 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>]>>;
179
261
  /** Determine the HTTP client that's selected by default */
180
262
  defaultHttpClient: z.ZodOptional<z.ZodObject<{
181
263
  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">;
@@ -258,15 +340,15 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
258
340
  method: z.ZodString;
259
341
  summary: z.ZodOptional<z.ZodString>;
260
342
  }, "strip", z.ZodTypeAny, {
261
- method: string;
262
343
  path: string;
263
- summary?: string | undefined;
344
+ method: string;
264
345
  operationId?: string | undefined;
346
+ summary?: string | undefined;
265
347
  }, {
266
- method: string;
267
348
  path: string;
268
- summary?: string | undefined;
349
+ method: string;
269
350
  operationId?: string | undefined;
351
+ summary?: string | undefined;
270
352
  }>], z.ZodUnknown>, z.ZodString>>;
271
353
  /**
272
354
  * Customize the webhook portion of the hash
@@ -285,7 +367,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
285
367
  method?: string | undefined;
286
368
  }>], z.ZodUnknown>, z.ZodString>>;
287
369
  /** Callback fired when the reference is fully loaded */
288
- onLoaded: z.ZodOptional<z.ZodUnion<[z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodVoid>, z.ZodUndefined]>>;
370
+ onLoaded: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodVoid>>;
289
371
  /**
290
372
  * To handle redirects, pass a function that will recieve:
291
373
  * - The current path with hash if pathRouting is enabled
@@ -336,14 +418,16 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
336
418
  hideSearch: boolean;
337
419
  hideDarkModeToggle: boolean;
338
420
  withDefaultFonts: boolean;
339
- servers?: any[] | undefined;
340
421
  authentication?: any;
341
422
  baseServerURL?: string | undefined;
342
423
  proxyUrl?: string | undefined;
343
- searchHotKey?: "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
424
+ 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;
425
+ servers?: any[] | undefined;
344
426
  spec?: {
345
427
  url?: string | undefined;
346
428
  content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
429
+ title?: string | undefined;
430
+ slug?: string | undefined;
347
431
  } | undefined;
348
432
  _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
349
433
  proxy?: string | undefined;
@@ -351,7 +435,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
351
435
  forceDarkModeState?: "dark" | "light" | undefined;
352
436
  metaData?: any;
353
437
  favicon?: string | undefined;
354
- hiddenClients?: string[] | Record<string, boolean | string[]> | undefined;
438
+ hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
355
439
  defaultHttpClient?: {
356
440
  targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
357
441
  clientKey: string;
@@ -372,10 +456,10 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
372
456
  name?: string | undefined;
373
457
  }, ...args: unknown[]) => string) | undefined;
374
458
  generateOperationSlug?: ((args_0: {
375
- method: string;
376
459
  path: string;
377
- summary?: string | undefined;
460
+ method: string;
378
461
  operationId?: string | undefined;
462
+ summary?: string | undefined;
379
463
  }, ...args: unknown[]) => string) | undefined;
380
464
  generateWebhookSlug?: ((args_0: {
381
465
  name: string;
@@ -385,18 +469,20 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
385
469
  redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
386
470
  defaultOpenAllTags?: boolean | undefined;
387
471
  tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
388
- operationsSorter?: "alpha" | "method" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
472
+ operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
389
473
  }, {
390
- servers?: any[] | undefined;
391
474
  authentication?: any;
392
475
  baseServerURL?: string | undefined;
393
476
  hideClientButton?: unknown;
394
477
  proxyUrl?: string | undefined;
395
- searchHotKey?: "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
478
+ 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;
479
+ servers?: any[] | undefined;
396
480
  showSidebar?: unknown;
397
481
  spec?: {
398
482
  url?: string | undefined;
399
483
  content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
484
+ title?: string | undefined;
485
+ slug?: string | undefined;
400
486
  } | undefined;
401
487
  theme?: unknown;
402
488
  _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
@@ -412,7 +498,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
412
498
  hideDarkModeToggle?: unknown;
413
499
  metaData?: any;
414
500
  favicon?: string | undefined;
415
- hiddenClients?: string[] | Record<string, boolean | string[]> | undefined;
501
+ hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
416
502
  defaultHttpClient?: {
417
503
  targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
418
504
  clientKey: string;
@@ -433,10 +519,10 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
433
519
  name: string;
434
520
  }, ...args: unknown[]) => string) | undefined;
435
521
  generateOperationSlug?: ((args_0: {
436
- method: string;
437
522
  path: string;
438
- summary?: string | undefined;
523
+ method: string;
439
524
  operationId?: string | undefined;
525
+ summary?: string | undefined;
440
526
  }, ...args: unknown[]) => string) | undefined;
441
527
  generateWebhookSlug?: ((args_0: {
442
528
  name: string;
@@ -447,7 +533,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
447
533
  withDefaultFonts?: unknown;
448
534
  defaultOpenAllTags?: boolean | undefined;
449
535
  tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
450
- operationsSorter?: "alpha" | "method" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
536
+ operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
451
537
  }>, {
452
538
  hideClientButton: boolean;
453
539
  showSidebar: boolean;
@@ -460,14 +546,16 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
460
546
  hideSearch: boolean;
461
547
  hideDarkModeToggle: boolean;
462
548
  withDefaultFonts: boolean;
463
- servers?: any[] | undefined;
464
549
  authentication?: any;
465
550
  baseServerURL?: string | undefined;
466
551
  proxyUrl?: string | undefined;
467
- searchHotKey?: "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
552
+ 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;
553
+ servers?: any[] | undefined;
468
554
  spec?: {
469
555
  url?: string | undefined;
470
556
  content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
557
+ title?: string | undefined;
558
+ slug?: string | undefined;
471
559
  } | undefined;
472
560
  _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
473
561
  proxy?: string | undefined;
@@ -475,7 +563,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
475
563
  forceDarkModeState?: "dark" | "light" | undefined;
476
564
  metaData?: any;
477
565
  favicon?: string | undefined;
478
- hiddenClients?: string[] | Record<string, boolean | string[]> | undefined;
566
+ hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
479
567
  defaultHttpClient?: {
480
568
  targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
481
569
  clientKey: string;
@@ -496,10 +584,10 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
496
584
  name?: string | undefined;
497
585
  }, ...args: unknown[]) => string) | undefined;
498
586
  generateOperationSlug?: ((args_0: {
499
- method: string;
500
587
  path: string;
501
- summary?: string | undefined;
588
+ method: string;
502
589
  operationId?: string | undefined;
590
+ summary?: string | undefined;
503
591
  }, ...args: unknown[]) => string) | undefined;
504
592
  generateWebhookSlug?: ((args_0: {
505
593
  name: string;
@@ -509,18 +597,20 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
509
597
  redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
510
598
  defaultOpenAllTags?: boolean | undefined;
511
599
  tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
512
- operationsSorter?: "alpha" | "method" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
600
+ operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
513
601
  }, {
514
- servers?: any[] | undefined;
515
602
  authentication?: any;
516
603
  baseServerURL?: string | undefined;
517
604
  hideClientButton?: unknown;
518
605
  proxyUrl?: string | undefined;
519
- searchHotKey?: "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
606
+ 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;
607
+ servers?: any[] | undefined;
520
608
  showSidebar?: unknown;
521
609
  spec?: {
522
610
  url?: string | undefined;
523
611
  content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
612
+ title?: string | undefined;
613
+ slug?: string | undefined;
524
614
  } | undefined;
525
615
  theme?: unknown;
526
616
  _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
@@ -536,7 +626,7 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
536
626
  hideDarkModeToggle?: unknown;
537
627
  metaData?: any;
538
628
  favicon?: string | undefined;
539
- hiddenClients?: string[] | Record<string, boolean | string[]> | undefined;
629
+ hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
540
630
  defaultHttpClient?: {
541
631
  targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
542
632
  clientKey: string;
@@ -557,10 +647,10 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
557
647
  name: string;
558
648
  }, ...args: unknown[]) => string) | undefined;
559
649
  generateOperationSlug?: ((args_0: {
560
- method: string;
561
650
  path: string;
562
- summary?: string | undefined;
651
+ method: string;
563
652
  operationId?: string | undefined;
653
+ summary?: string | undefined;
564
654
  }, ...args: unknown[]) => string) | undefined;
565
655
  generateWebhookSlug?: ((args_0: {
566
656
  name: string;
@@ -571,8 +661,601 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
571
661
  withDefaultFonts?: unknown;
572
662
  defaultOpenAllTags?: boolean | undefined;
573
663
  tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
574
- operationsSorter?: "alpha" | "method" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
664
+ operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
575
665
  }>;
576
666
  /** Configuration after parsing, this is the main type */
577
667
  export type ApiReferenceConfiguration = Omit<z.infer<typeof apiReferenceConfigurationSchema>, 'proxy'>;
668
+ /** Props for the ApiReference components, coming from user input */
669
+ export declare const apiReferenceConfigurationWithSourcesSchema: z.ZodEffects<z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
670
+ /** Prefill authentication */
671
+ authentication: z.ZodOptional<z.ZodAny>;
672
+ /** Base URL for the API server */
673
+ baseServerURL: z.ZodOptional<z.ZodString>;
674
+ /**
675
+ * Whether to hide the client button
676
+ * @default false
677
+ */
678
+ hideClientButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
679
+ /** URL to a request proxy for the API client */
680
+ proxyUrl: z.ZodOptional<z.ZodString>;
681
+ /** Key used with CTRL/CMD to open the search modal (defaults to 'k' e.g. CMD+k) */
682
+ 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"]>>;
683
+ /** List of OpenAPI server objects */
684
+ servers: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
685
+ /**
686
+ * Whether to show the sidebar
687
+ * @default true
688
+ */
689
+ showSidebar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
690
+ /** The Swagger/OpenAPI spec to render */
691
+ spec: z.ZodOptional<z.ZodObject<{
692
+ /** URL to an OpenAPI/Swagger document */
693
+ url: z.ZodOptional<z.ZodString>;
694
+ /**
695
+ * Directly embed the OpenAPI document.
696
+ * Can be a string, object, function returning an object, or null.
697
+ * @remarks It's recommended to pass a URL instead of content.
698
+ */
699
+ 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]>>;
700
+ /**
701
+ * The title of the OpenAPI document.
702
+ *
703
+ * @example 'Scalar Galaxy'
704
+ */
705
+ title: z.ZodOptional<z.ZodString>;
706
+ /**
707
+ * The slug of the OpenAPI document used in the URL.
708
+ *
709
+ * If none is passed, the title will be used.
710
+ *
711
+ * If no title is used, it’ll just use the index.
712
+ *
713
+ * @example 'scalar-galaxy'
714
+ */
715
+ slug: z.ZodOptional<z.ZodString>;
716
+ }, "strip", z.ZodTypeAny, {
717
+ url?: string | undefined;
718
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
719
+ title?: string | undefined;
720
+ slug?: string | undefined;
721
+ }, {
722
+ url?: string | undefined;
723
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
724
+ title?: string | undefined;
725
+ slug?: string | undefined;
726
+ }>>;
727
+ /** A string to use one of the color presets */
728
+ theme: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["alternate", "default", "moon", "purple", "solarized", "bluePlanet", "deepSpace", "saturn", "kepler", "elysiajs", "fastify", "mars", "none"]>>>>;
729
+ /** Integration type identifier */
730
+ _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"]>>>;
731
+ }, {
732
+ /**
733
+ * The layout to use for the references
734
+ * @default 'modern'
735
+ */
736
+ layout: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["modern", "classic"]>>>>;
737
+ /**
738
+ * URL to a request proxy for the API client
739
+ * @deprecated Use proxyUrl instead
740
+ */
741
+ proxy: z.ZodOptional<z.ZodString>;
742
+ /**
743
+ * Whether the spec input should show
744
+ * @default false
745
+ */
746
+ isEditable: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
747
+ /**
748
+ * Whether to show models in the sidebar, search, and content.
749
+ * @default false
750
+ */
751
+ hideModels: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
752
+ /**
753
+ * Whether to show the "Download OpenAPI Document" button
754
+ * @default false
755
+ */
756
+ hideDownloadButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
757
+ /**
758
+ * Whether to show the "Test Request" button
759
+ * @default false
760
+ */
761
+ hideTestRequestButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
762
+ /**
763
+ * Whether to show the sidebar search bar
764
+ * @default false
765
+ */
766
+ hideSearch: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
767
+ /** Whether dark mode is on or off initially (light mode) */
768
+ darkMode: z.ZodOptional<z.ZodBoolean>;
769
+ /** forceDarkModeState makes it always this state no matter what */
770
+ forceDarkModeState: z.ZodOptional<z.ZodEnum<["dark", "light"]>>;
771
+ /**
772
+ * Whether to show the dark mode toggle
773
+ * @default false
774
+ */
775
+ hideDarkModeToggle: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
776
+ /**
777
+ * If used, passed data will be added to the HTML header
778
+ * @see https://unhead.unjs.io/usage/composables/use-seo-meta
779
+ */
780
+ metaData: z.ZodOptional<z.ZodAny>;
781
+ /**
782
+ * Path to a favicon image
783
+ * @default undefined
784
+ * @example '/favicon.svg'
785
+ */
786
+ favicon: z.ZodOptional<z.ZodString>;
787
+ /**
788
+ * List of httpsnippet clients to hide from the clients menu
789
+ * By default hides Unirest, pass `[]` to show all clients
790
+ */
791
+ 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>]>>;
792
+ /** Determine the HTTP client that's selected by default */
793
+ defaultHttpClient: z.ZodOptional<z.ZodObject<{
794
+ 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">;
795
+ clientKey: z.ZodString;
796
+ }, "strip", z.ZodTypeAny, {
797
+ targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
798
+ clientKey: string;
799
+ }, {
800
+ targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
801
+ clientKey: string;
802
+ }>>;
803
+ /** Custom CSS to be added to the page */
804
+ customCss: z.ZodOptional<z.ZodString>;
805
+ /** onSpecUpdate is fired on spec/swagger content change */
806
+ onSpecUpdate: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
807
+ /** onServerChange is fired on selected server change */
808
+ onServerChange: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
809
+ /**
810
+ * Route using paths instead of hashes, your server MUST support this
811
+ * @example '/standalone-api-reference/:custom(.*)?'
812
+ * @experimental
813
+ * @default undefined
814
+ */
815
+ pathRouting: z.ZodOptional<z.ZodObject<{
816
+ /** Base path for the API reference */
817
+ basePath: z.ZodString;
818
+ }, "strip", z.ZodTypeAny, {
819
+ basePath: string;
820
+ }, {
821
+ basePath: string;
822
+ }>>;
823
+ /**
824
+ * Customize the heading portion of the hash
825
+ * @param heading - The heading object
826
+ * @returns A string ID used to generate the URL hash
827
+ * @default (heading) => `#description/${heading.slug}`
828
+ */
829
+ generateHeadingSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
830
+ slug: z.ZodDefault<z.ZodString>;
831
+ }, "strip", z.ZodTypeAny, {
832
+ slug: string;
833
+ }, {
834
+ slug?: string | undefined;
835
+ }>], z.ZodUnknown>, z.ZodString>>;
836
+ /**
837
+ * Customize the model portion of the hash
838
+ * @param model - The model object with a name property
839
+ * @returns A string ID used to generate the URL hash
840
+ * @default (model) => slug(model.name)
841
+ */
842
+ generateModelSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
843
+ name: z.ZodDefault<z.ZodString>;
844
+ }, "strip", z.ZodTypeAny, {
845
+ name: string;
846
+ }, {
847
+ name?: string | undefined;
848
+ }>], z.ZodUnknown>, z.ZodString>>;
849
+ /**
850
+ * Customize the tag portion of the hash
851
+ * @param tag - The tag object
852
+ * @returns A string ID used to generate the URL hash
853
+ * @default (tag) => slug(tag.name)
854
+ */
855
+ generateTagSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
856
+ name: z.ZodDefault<z.ZodString>;
857
+ }, "strip", z.ZodTypeAny, {
858
+ name: string;
859
+ }, {
860
+ name?: string | undefined;
861
+ }>], z.ZodUnknown>, z.ZodString>>;
862
+ /**
863
+ * Customize the operation portion of the hash
864
+ * @param operation - The operation object
865
+ * @returns A string ID used to generate the URL hash
866
+ * @default (operation) => `${operation.method}${operation.path}`
867
+ */
868
+ generateOperationSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
869
+ path: z.ZodString;
870
+ operationId: z.ZodOptional<z.ZodString>;
871
+ method: z.ZodString;
872
+ summary: z.ZodOptional<z.ZodString>;
873
+ }, "strip", z.ZodTypeAny, {
874
+ path: string;
875
+ method: string;
876
+ operationId?: string | undefined;
877
+ summary?: string | undefined;
878
+ }, {
879
+ path: string;
880
+ method: string;
881
+ operationId?: string | undefined;
882
+ summary?: string | undefined;
883
+ }>], z.ZodUnknown>, z.ZodString>>;
884
+ /**
885
+ * Customize the webhook portion of the hash
886
+ * @param webhook - The webhook object
887
+ * @returns A string ID used to generate the URL hash
888
+ * @default (webhook) => slug(webhook.name)
889
+ */
890
+ generateWebhookSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
891
+ name: z.ZodString;
892
+ method: z.ZodOptional<z.ZodString>;
893
+ }, "strip", z.ZodTypeAny, {
894
+ name: string;
895
+ method?: string | undefined;
896
+ }, {
897
+ name: string;
898
+ method?: string | undefined;
899
+ }>], z.ZodUnknown>, z.ZodString>>;
900
+ /** Callback fired when the reference is fully loaded */
901
+ onLoaded: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodVoid>>;
902
+ /**
903
+ * To handle redirects, pass a function that will recieve:
904
+ * - The current path with hash if pathRouting is enabled
905
+ * - The current hash if hashRouting (default)
906
+ * And then passes that to history.replaceState
907
+ *
908
+ * @example hashRouting (default)
909
+ * ```ts
910
+ * redirect: (hash: string) => hash.replace('#v1/old-path', '#v2/new-path')
911
+ * ```
912
+ * @example pathRouting
913
+ * ```ts
914
+ * redirect: (pathWithHash: string) => {
915
+ * if (pathWithHash.includes('#')) {
916
+ * return pathWithHash.replace('/v1/tags/user#operation/get-user', '/v1/tags/user/operation/get-user')
917
+ * }
918
+ * return null
919
+ * }
920
+ * ```
921
+ */
922
+ redirect: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
923
+ /**
924
+ * Whether to include default fonts
925
+ * @default true
926
+ */
927
+ withDefaultFonts: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
928
+ /** Whether to expand all tags by default */
929
+ defaultOpenAllTags: z.ZodOptional<z.ZodBoolean>;
930
+ /**
931
+ * Function to sort tags
932
+ * @default 'alpha' for alphabetical sorting
933
+ */
934
+ tagsSorter: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"alpha">, z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodAny], z.ZodUnknown>, z.ZodNumber>]>>;
935
+ /**
936
+ * Function to sort operations
937
+ * @default 'alpha' for alphabetical sorting
938
+ */
939
+ operationsSorter: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"alpha">, z.ZodLiteral<"method">, z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodAny], z.ZodUnknown>, z.ZodNumber>]>>;
940
+ }>, {
941
+ spec: z.ZodObject<{
942
+ sources: z.ZodArray<z.ZodObject<{
943
+ /** URL to an OpenAPI/Swagger document */
944
+ url: z.ZodOptional<z.ZodString>;
945
+ /**
946
+ * Directly embed the OpenAPI document.
947
+ * Can be a string, object, function returning an object, or null.
948
+ * @remarks It's recommended to pass a URL instead of content.
949
+ */
950
+ 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]>>;
951
+ /**
952
+ * The title of the OpenAPI document.
953
+ *
954
+ * @example 'Scalar Galaxy'
955
+ */
956
+ title: z.ZodOptional<z.ZodString>;
957
+ /**
958
+ * The slug of the OpenAPI document used in the URL.
959
+ *
960
+ * If none is passed, the title will be used.
961
+ *
962
+ * If no title is used, it’ll just use the index.
963
+ *
964
+ * @example 'scalar-galaxy'
965
+ */
966
+ slug: z.ZodOptional<z.ZodString>;
967
+ }, "strip", z.ZodTypeAny, {
968
+ url?: string | undefined;
969
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
970
+ title?: string | undefined;
971
+ slug?: string | undefined;
972
+ }, {
973
+ url?: string | undefined;
974
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
975
+ title?: string | undefined;
976
+ slug?: string | undefined;
977
+ }>, "many">;
978
+ }, "strip", z.ZodTypeAny, {
979
+ sources: {
980
+ url?: string | undefined;
981
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
982
+ title?: string | undefined;
983
+ slug?: string | undefined;
984
+ }[];
985
+ }, {
986
+ sources: {
987
+ url?: string | undefined;
988
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
989
+ title?: string | undefined;
990
+ slug?: string | undefined;
991
+ }[];
992
+ }>;
993
+ }>, "strip", z.ZodTypeAny, {
994
+ hideClientButton: boolean;
995
+ showSidebar: boolean;
996
+ spec: {
997
+ sources: {
998
+ url?: string | undefined;
999
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
1000
+ title?: string | undefined;
1001
+ slug?: string | undefined;
1002
+ }[];
1003
+ };
1004
+ theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "none";
1005
+ layout: "modern" | "classic";
1006
+ isEditable: boolean;
1007
+ hideModels: boolean;
1008
+ hideDownloadButton: boolean;
1009
+ hideTestRequestButton: boolean;
1010
+ hideSearch: boolean;
1011
+ hideDarkModeToggle: boolean;
1012
+ withDefaultFonts: boolean;
1013
+ authentication?: any;
1014
+ baseServerURL?: string | undefined;
1015
+ proxyUrl?: string | undefined;
1016
+ 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;
1017
+ servers?: any[] | undefined;
1018
+ _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
1019
+ proxy?: string | undefined;
1020
+ darkMode?: boolean | undefined;
1021
+ forceDarkModeState?: "dark" | "light" | undefined;
1022
+ metaData?: any;
1023
+ favicon?: string | undefined;
1024
+ hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
1025
+ defaultHttpClient?: {
1026
+ targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
1027
+ clientKey: string;
1028
+ } | undefined;
1029
+ customCss?: string | undefined;
1030
+ onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
1031
+ onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
1032
+ pathRouting?: {
1033
+ basePath: string;
1034
+ } | undefined;
1035
+ generateHeadingSlug?: ((args_0: {
1036
+ slug?: string | undefined;
1037
+ }, ...args: unknown[]) => string) | undefined;
1038
+ generateModelSlug?: ((args_0: {
1039
+ name?: string | undefined;
1040
+ }, ...args: unknown[]) => string) | undefined;
1041
+ generateTagSlug?: ((args_0: {
1042
+ name?: string | undefined;
1043
+ }, ...args: unknown[]) => string) | undefined;
1044
+ generateOperationSlug?: ((args_0: {
1045
+ path: string;
1046
+ method: string;
1047
+ operationId?: string | undefined;
1048
+ summary?: string | undefined;
1049
+ }, ...args: unknown[]) => string) | undefined;
1050
+ generateWebhookSlug?: ((args_0: {
1051
+ name: string;
1052
+ method?: string | undefined;
1053
+ }, ...args: unknown[]) => string) | undefined;
1054
+ onLoaded?: ((...args: unknown[]) => void) | undefined;
1055
+ redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
1056
+ defaultOpenAllTags?: boolean | undefined;
1057
+ tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
1058
+ operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
1059
+ }, {
1060
+ spec: {
1061
+ sources: {
1062
+ url?: string | undefined;
1063
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
1064
+ title?: string | undefined;
1065
+ slug?: string | undefined;
1066
+ }[];
1067
+ };
1068
+ authentication?: any;
1069
+ baseServerURL?: string | undefined;
1070
+ hideClientButton?: unknown;
1071
+ proxyUrl?: string | undefined;
1072
+ 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;
1073
+ servers?: any[] | undefined;
1074
+ showSidebar?: unknown;
1075
+ theme?: unknown;
1076
+ _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
1077
+ layout?: unknown;
1078
+ proxy?: string | undefined;
1079
+ isEditable?: unknown;
1080
+ hideModels?: unknown;
1081
+ hideDownloadButton?: unknown;
1082
+ hideTestRequestButton?: unknown;
1083
+ hideSearch?: unknown;
1084
+ darkMode?: boolean | undefined;
1085
+ forceDarkModeState?: "dark" | "light" | undefined;
1086
+ hideDarkModeToggle?: unknown;
1087
+ metaData?: any;
1088
+ favicon?: string | undefined;
1089
+ hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
1090
+ defaultHttpClient?: {
1091
+ targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
1092
+ clientKey: string;
1093
+ } | undefined;
1094
+ customCss?: string | undefined;
1095
+ onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
1096
+ onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
1097
+ pathRouting?: {
1098
+ basePath: string;
1099
+ } | undefined;
1100
+ generateHeadingSlug?: ((args_0: {
1101
+ slug: string;
1102
+ }, ...args: unknown[]) => string) | undefined;
1103
+ generateModelSlug?: ((args_0: {
1104
+ name: string;
1105
+ }, ...args: unknown[]) => string) | undefined;
1106
+ generateTagSlug?: ((args_0: {
1107
+ name: string;
1108
+ }, ...args: unknown[]) => string) | undefined;
1109
+ generateOperationSlug?: ((args_0: {
1110
+ path: string;
1111
+ method: string;
1112
+ operationId?: string | undefined;
1113
+ summary?: string | undefined;
1114
+ }, ...args: unknown[]) => string) | undefined;
1115
+ generateWebhookSlug?: ((args_0: {
1116
+ name: string;
1117
+ method?: string | undefined;
1118
+ }, ...args: unknown[]) => string) | undefined;
1119
+ onLoaded?: ((...args: unknown[]) => void) | undefined;
1120
+ redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
1121
+ withDefaultFonts?: unknown;
1122
+ defaultOpenAllTags?: boolean | undefined;
1123
+ tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
1124
+ operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
1125
+ }>, {
1126
+ hideClientButton: boolean;
1127
+ showSidebar: boolean;
1128
+ spec: {
1129
+ sources: {
1130
+ url?: string | undefined;
1131
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
1132
+ title?: string | undefined;
1133
+ slug?: string | undefined;
1134
+ }[];
1135
+ };
1136
+ theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "none";
1137
+ layout: "modern" | "classic";
1138
+ isEditable: boolean;
1139
+ hideModels: boolean;
1140
+ hideDownloadButton: boolean;
1141
+ hideTestRequestButton: boolean;
1142
+ hideSearch: boolean;
1143
+ hideDarkModeToggle: boolean;
1144
+ withDefaultFonts: boolean;
1145
+ authentication?: any;
1146
+ baseServerURL?: string | undefined;
1147
+ proxyUrl?: string | undefined;
1148
+ 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;
1149
+ servers?: any[] | undefined;
1150
+ _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
1151
+ proxy?: string | undefined;
1152
+ darkMode?: boolean | undefined;
1153
+ forceDarkModeState?: "dark" | "light" | undefined;
1154
+ metaData?: any;
1155
+ favicon?: string | undefined;
1156
+ hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
1157
+ defaultHttpClient?: {
1158
+ targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
1159
+ clientKey: string;
1160
+ } | undefined;
1161
+ customCss?: string | undefined;
1162
+ onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
1163
+ onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
1164
+ pathRouting?: {
1165
+ basePath: string;
1166
+ } | undefined;
1167
+ generateHeadingSlug?: ((args_0: {
1168
+ slug?: string | undefined;
1169
+ }, ...args: unknown[]) => string) | undefined;
1170
+ generateModelSlug?: ((args_0: {
1171
+ name?: string | undefined;
1172
+ }, ...args: unknown[]) => string) | undefined;
1173
+ generateTagSlug?: ((args_0: {
1174
+ name?: string | undefined;
1175
+ }, ...args: unknown[]) => string) | undefined;
1176
+ generateOperationSlug?: ((args_0: {
1177
+ path: string;
1178
+ method: string;
1179
+ operationId?: string | undefined;
1180
+ summary?: string | undefined;
1181
+ }, ...args: unknown[]) => string) | undefined;
1182
+ generateWebhookSlug?: ((args_0: {
1183
+ name: string;
1184
+ method?: string | undefined;
1185
+ }, ...args: unknown[]) => string) | undefined;
1186
+ onLoaded?: ((...args: unknown[]) => void) | undefined;
1187
+ redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
1188
+ defaultOpenAllTags?: boolean | undefined;
1189
+ tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
1190
+ operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
1191
+ }, {
1192
+ spec: {
1193
+ sources: {
1194
+ url?: string | undefined;
1195
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
1196
+ title?: string | undefined;
1197
+ slug?: string | undefined;
1198
+ }[];
1199
+ };
1200
+ authentication?: any;
1201
+ baseServerURL?: string | undefined;
1202
+ hideClientButton?: unknown;
1203
+ proxyUrl?: string | undefined;
1204
+ 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;
1205
+ servers?: any[] | undefined;
1206
+ showSidebar?: unknown;
1207
+ theme?: unknown;
1208
+ _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
1209
+ layout?: unknown;
1210
+ proxy?: string | undefined;
1211
+ isEditable?: unknown;
1212
+ hideModels?: unknown;
1213
+ hideDownloadButton?: unknown;
1214
+ hideTestRequestButton?: unknown;
1215
+ hideSearch?: unknown;
1216
+ darkMode?: boolean | undefined;
1217
+ forceDarkModeState?: "dark" | "light" | undefined;
1218
+ hideDarkModeToggle?: unknown;
1219
+ metaData?: any;
1220
+ favicon?: string | undefined;
1221
+ hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
1222
+ defaultHttpClient?: {
1223
+ targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
1224
+ clientKey: string;
1225
+ } | undefined;
1226
+ customCss?: string | undefined;
1227
+ onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
1228
+ onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
1229
+ pathRouting?: {
1230
+ basePath: string;
1231
+ } | undefined;
1232
+ generateHeadingSlug?: ((args_0: {
1233
+ slug: string;
1234
+ }, ...args: unknown[]) => string) | undefined;
1235
+ generateModelSlug?: ((args_0: {
1236
+ name: string;
1237
+ }, ...args: unknown[]) => string) | undefined;
1238
+ generateTagSlug?: ((args_0: {
1239
+ name: string;
1240
+ }, ...args: unknown[]) => string) | undefined;
1241
+ generateOperationSlug?: ((args_0: {
1242
+ path: string;
1243
+ method: string;
1244
+ operationId?: string | undefined;
1245
+ summary?: string | undefined;
1246
+ }, ...args: unknown[]) => string) | undefined;
1247
+ generateWebhookSlug?: ((args_0: {
1248
+ name: string;
1249
+ method?: string | undefined;
1250
+ }, ...args: unknown[]) => string) | undefined;
1251
+ onLoaded?: ((...args: unknown[]) => void) | undefined;
1252
+ redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
1253
+ withDefaultFonts?: unknown;
1254
+ defaultOpenAllTags?: boolean | undefined;
1255
+ tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
1256
+ operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
1257
+ }>;
1258
+ export type ApiReferenceConfigurationWithSources = Omit<z.infer<typeof apiReferenceConfigurationWithSourcesSchema>, 'proxy'>;
1259
+ /** Typeguard to check to narrow the configs to the one with sources */
1260
+ export declare const isConfigurationWithSources: (config: Partial<ApiReferenceConfiguration> | Partial<ApiReferenceConfiguration>[] | Partial<ApiReferenceConfigurationWithSources>) => config is Partial<ApiReferenceConfigurationWithSources>;
578
1261
  //# sourceMappingURL=api-reference-configuration.d.ts.map