@scalar/types 0.2.15 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,1953 +2,554 @@ import { z } from 'zod';
2
2
  import type { AuthenticationConfiguration } from './authentication-configuration.js';
3
3
  /** Configuration for the OpenAPI/Swagger specification */
4
4
  export declare const specConfigurationSchema: z.ZodObject<{
5
- /**
6
- * URL to an OpenAPI/Swagger document
7
- *
8
- * @deprecated Please move `url` to the top level and remove the `spec` prefix.
9
- *
10
- * @example
11
- * ```ts
12
- * const oldConfiguration = {
13
- * spec: {
14
- * url: 'https://example.com/openapi.json',
15
- * },
16
- * }
17
- *
18
- * const newConfiguration = {
19
- * url: 'https://example.com/openapi.json',
20
- * }
21
- * ```
22
- **/
23
5
  url: z.ZodOptional<z.ZodString>;
24
- /**
25
- * Directly embed the OpenAPI document.
26
- * Can be a string, object, function returning an object, or null.
27
- *
28
- * @remarks It's recommended to pass a URL instead of content.
29
- *
30
- * @deprecated Please move `content` to the top level and remove the `spec` prefix.
31
- *
32
- * @example
33
- * ```ts
34
- * const oldConfiguration = {
35
- * spec: {
36
- * content: '…',
37
- * },
38
- * }
39
- *
40
- * const newConfiguration = {
41
- * content: '…',
42
- * }
43
- * ```
44
- **/
45
- 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]>>;
46
- /**
47
- * The title of the OpenAPI document.
48
- *
49
- * @example 'Scalar Galaxy'
50
- *
51
- * @deprecated Please move `title` to the top level and remove the `spec` prefix.
52
- */
6
+ content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>]>>;
53
7
  title: z.ZodOptional<z.ZodString>;
54
- /**
55
- * The slug of the OpenAPI document used in the URL.
56
- *
57
- * If none is passed, the title will be used.
58
- *
59
- * If no title is used, it'll just use the index.
60
- *
61
- * @example 'scalar-galaxy'
62
- *
63
- * @deprecated Please move `slug` to the top level and remove the `spec` prefix.
64
- */
65
8
  slug: z.ZodOptional<z.ZodString>;
66
- }, "strip", z.ZodTypeAny, {
67
- title?: string | undefined;
68
- url?: string | undefined;
69
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
70
- slug?: string | undefined;
71
- }, {
72
- title?: string | undefined;
73
- url?: string | undefined;
74
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
75
- slug?: string | undefined;
76
- }>;
9
+ }, z.core.$strip>;
77
10
  export type SpecConfiguration = z.infer<typeof specConfigurationSchema>;
78
11
  /** Configuration for the Api Client */
79
12
  export declare const apiClientConfigurationSchema: z.ZodObject<{
80
- /**
81
- * URL to an OpenAPI/Swagger document
82
- **/
83
13
  url: z.ZodOptional<z.ZodString>;
84
- /**
85
- * Directly embed the OpenAPI document.
86
- * Can be a string, object, function returning an object, or null.
87
- *
88
- * @remarks It's recommended to pass a URL instead of content.
89
- **/
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
- /**
92
- * The title of the OpenAPI document.
93
- *
94
- * @example 'Scalar Galaxy'
95
- */
14
+ content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>]>>;
96
15
  title: z.ZodOptional<z.ZodString>;
97
- /**
98
- * The slug of the OpenAPI document used in the URL.
99
- *
100
- * If none is passed, the title will be used.
101
- *
102
- * If no title is used, it'll just use the index.
103
- *
104
- * @example 'scalar-galaxy'
105
- */
106
16
  slug: z.ZodOptional<z.ZodString>;
107
- /**
108
- * The OpenAPI/Swagger document to render
109
- *
110
- * @deprecated Use `url` and `content` on the top level instead.
111
- **/
112
17
  spec: z.ZodOptional<z.ZodObject<{
113
- /**
114
- * URL to an OpenAPI/Swagger document
115
- *
116
- * @deprecated Please move `url` to the top level and remove the `spec` prefix.
117
- *
118
- * @example
119
- * ```ts
120
- * const oldConfiguration = {
121
- * spec: {
122
- * url: 'https://example.com/openapi.json',
123
- * },
124
- * }
125
- *
126
- * const newConfiguration = {
127
- * url: 'https://example.com/openapi.json',
128
- * }
129
- * ```
130
- **/
131
18
  url: z.ZodOptional<z.ZodString>;
132
- /**
133
- * Directly embed the OpenAPI document.
134
- * Can be a string, object, function returning an object, or null.
135
- *
136
- * @remarks It's recommended to pass a URL instead of content.
137
- *
138
- * @deprecated Please move `content` to the top level and remove the `spec` prefix.
139
- *
140
- * @example
141
- * ```ts
142
- * const oldConfiguration = {
143
- * spec: {
144
- * content: '…',
145
- * },
146
- * }
147
- *
148
- * const newConfiguration = {
149
- * content: '…',
150
- * }
151
- * ```
152
- **/
153
- 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]>>;
154
- /**
155
- * The title of the OpenAPI document.
156
- *
157
- * @example 'Scalar Galaxy'
158
- *
159
- * @deprecated Please move `title` to the top level and remove the `spec` prefix.
160
- */
19
+ content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>]>>;
161
20
  title: z.ZodOptional<z.ZodString>;
162
- /**
163
- * The slug of the OpenAPI document used in the URL.
164
- *
165
- * If none is passed, the title will be used.
166
- *
167
- * If no title is used, it'll just use the index.
168
- *
169
- * @example 'scalar-galaxy'
170
- *
171
- * @deprecated Please move `slug` to the top level and remove the `spec` prefix.
172
- */
173
21
  slug: z.ZodOptional<z.ZodString>;
174
- }, "strip", z.ZodTypeAny, {
175
- title?: string | undefined;
176
- url?: string | undefined;
177
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
178
- slug?: string | undefined;
179
- }, {
180
- title?: string | undefined;
181
- url?: string | undefined;
182
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
183
- slug?: string | undefined;
184
- }>>;
185
- /** Prefill authentication */
22
+ }, z.core.$strip>>;
186
23
  authentication: z.ZodOptional<z.ZodAny>;
187
- /** Base URL for the API server */
188
24
  baseServerURL: z.ZodOptional<z.ZodString>;
189
- /**
190
- * Whether to hide the client button
191
- * @default false
192
- */
193
25
  hideClientButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
194
- /** URL to a request proxy for the API client */
195
26
  proxyUrl: z.ZodOptional<z.ZodString>;
196
- /** Key used with CTRL/CMD to open the search modal (defaults to 'k' e.g. CMD+k) */
197
- 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"]>>;
198
- /** List of OpenAPI server objects */
199
- servers: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
200
- /**
201
- * Whether to show the sidebar
202
- * @default true
203
- */
27
+ searchHotKey: z.ZodOptional<z.ZodEnum<{
28
+ c: "c";
29
+ r: "r";
30
+ a: "a";
31
+ b: "b";
32
+ d: "d";
33
+ e: "e";
34
+ f: "f";
35
+ g: "g";
36
+ h: "h";
37
+ i: "i";
38
+ j: "j";
39
+ k: "k";
40
+ l: "l";
41
+ m: "m";
42
+ n: "n";
43
+ o: "o";
44
+ p: "p";
45
+ q: "q";
46
+ s: "s";
47
+ t: "t";
48
+ u: "u";
49
+ v: "v";
50
+ w: "w";
51
+ x: "x";
52
+ y: "y";
53
+ z: "z";
54
+ }>>;
55
+ servers: z.ZodOptional<z.ZodArray<z.ZodAny>>;
204
56
  showSidebar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
205
- /**
206
- * Whether to use the operation summary or the operation path for the sidebar and search
207
- * @default 'summary'
208
- */
209
- operationTitleSource: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["summary", "path"]>>>>;
210
- /** A string to use one of the color presets */
211
- theme: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["alternate", "default", "moon", "purple", "solarized", "bluePlanet", "deepSpace", "saturn", "kepler", "elysiajs", "fastify", "mars", "laserwave", "none"]>>>>;
212
- /** Integration type identifier */
213
- _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", "svelte", "vue"]>>>;
214
- /** onRequestSent is fired when a request is sent */
215
- onRequestSent: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
216
- /** Whether to persist auth to local storage */
57
+ showToolbar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
58
+ never: "never";
59
+ always: "always";
60
+ localhost: "localhost";
61
+ }>>>>;
62
+ operationTitleSource: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
63
+ summary: "summary";
64
+ path: "path";
65
+ }>>>>;
66
+ theme: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
67
+ default: "default";
68
+ alternate: "alternate";
69
+ moon: "moon";
70
+ purple: "purple";
71
+ solarized: "solarized";
72
+ bluePlanet: "bluePlanet";
73
+ deepSpace: "deepSpace";
74
+ saturn: "saturn";
75
+ kepler: "kepler";
76
+ elysiajs: "elysiajs";
77
+ fastify: "fastify";
78
+ mars: "mars";
79
+ laserwave: "laserwave";
80
+ none: "none";
81
+ }>>>>;
82
+ _integration: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
83
+ go: "go";
84
+ rust: "rust";
85
+ elysiajs: "elysiajs";
86
+ fastify: "fastify";
87
+ adonisjs: "adonisjs";
88
+ docusaurus: "docusaurus";
89
+ dotnet: "dotnet";
90
+ express: "express";
91
+ fastapi: "fastapi";
92
+ hono: "hono";
93
+ html: "html";
94
+ laravel: "laravel";
95
+ litestar: "litestar";
96
+ nestjs: "nestjs";
97
+ nextjs: "nextjs";
98
+ nitro: "nitro";
99
+ nuxt: "nuxt";
100
+ platformatic: "platformatic";
101
+ react: "react";
102
+ svelte: "svelte";
103
+ vue: "vue";
104
+ }>>>;
105
+ onRequestSent: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodString], null>, z.ZodVoid>>;
217
106
  persistAuth: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
218
- /** Plugins for the API client */
219
- plugins: z.ZodOptional<z.ZodArray<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodObject<{
107
+ plugins: z.ZodOptional<z.ZodArray<z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodObject<{
220
108
  name: z.ZodString;
221
109
  views: z.ZodOptional<z.ZodObject<{
222
110
  'request.section': z.ZodOptional<z.ZodArray<z.ZodObject<{
223
111
  title: z.ZodOptional<z.ZodString>;
224
112
  component: z.ZodUnknown;
225
113
  props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
226
- }, "strip", z.ZodTypeAny, {
227
- title?: string | undefined;
228
- component?: unknown;
229
- props?: Record<string, any> | undefined;
230
- }, {
231
- title?: string | undefined;
232
- component?: unknown;
233
- props?: Record<string, any> | undefined;
234
- }>, "many">>;
114
+ }, z.core.$strip>>>;
235
115
  'response.section': z.ZodOptional<z.ZodArray<z.ZodObject<{
236
116
  title: z.ZodOptional<z.ZodString>;
237
117
  component: z.ZodUnknown;
238
118
  props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
239
- }, "strip", z.ZodTypeAny, {
240
- title?: string | undefined;
241
- component?: unknown;
242
- props?: Record<string, any> | undefined;
243
- }, {
244
- title?: string | undefined;
245
- component?: unknown;
246
- props?: Record<string, any> | undefined;
247
- }>, "many">>;
248
- }, "strip", z.ZodTypeAny, {
249
- 'request.section'?: {
250
- title?: string | undefined;
251
- component?: unknown;
252
- props?: Record<string, any> | undefined;
253
- }[] | undefined;
254
- 'response.section'?: {
255
- title?: string | undefined;
256
- component?: unknown;
257
- props?: Record<string, any> | undefined;
258
- }[] | undefined;
259
- }, {
260
- 'request.section'?: {
261
- title?: string | undefined;
262
- component?: unknown;
263
- props?: Record<string, any> | undefined;
264
- }[] | undefined;
265
- 'response.section'?: {
266
- title?: string | undefined;
267
- component?: unknown;
268
- props?: Record<string, any> | undefined;
269
- }[] | undefined;
270
- }>>;
119
+ }, z.core.$strip>>>;
120
+ }, z.core.$strip>>;
271
121
  hooks: z.ZodOptional<z.ZodObject<{
272
- onBeforeRequest: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
273
- request: z.ZodType<Request, z.ZodTypeDef, Request>;
274
- }, "strip", z.ZodTypeAny, {
275
- request: Request;
276
- }, {
277
- request: Request;
278
- }>], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
279
- onResponseReceived: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
280
- response: z.ZodType<Response, z.ZodTypeDef, Response>;
122
+ onBeforeRequest: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodObject<{
123
+ request: z.ZodCustom<Request, Request>;
124
+ }, z.core.$strip>], null>, z.ZodUnion<readonly [z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
125
+ onResponseReceived: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodObject<{
126
+ response: z.ZodCustom<Response, Response>;
281
127
  operation: z.ZodRecord<z.ZodString, z.ZodAny>;
282
- }, "strip", z.ZodTypeAny, {
283
- response: Response;
284
- operation: Record<string, any>;
285
- }, {
286
- response: Response;
287
- operation: Record<string, any>;
288
- }>], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
289
- }, "strip", z.ZodTypeAny, {
290
- onBeforeRequest?: ((args_0: {
291
- request: Request;
292
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
293
- onResponseReceived?: ((args_0: {
294
- response: Response;
295
- operation: Record<string, any>;
296
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
297
- }, {
298
- onBeforeRequest?: ((args_0: {
299
- request: Request;
300
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
301
- onResponseReceived?: ((args_0: {
302
- response: Response;
303
- operation: Record<string, any>;
304
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
305
- }>>;
306
- }, "strip", z.ZodTypeAny, {
307
- name: string;
308
- views?: {
309
- 'request.section'?: {
310
- title?: string | undefined;
311
- component?: unknown;
312
- props?: Record<string, any> | undefined;
313
- }[] | undefined;
314
- 'response.section'?: {
315
- title?: string | undefined;
316
- component?: unknown;
317
- props?: Record<string, any> | undefined;
318
- }[] | undefined;
319
- } | undefined;
320
- hooks?: {
321
- onBeforeRequest?: ((args_0: {
322
- request: Request;
323
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
324
- onResponseReceived?: ((args_0: {
325
- response: Response;
326
- operation: Record<string, any>;
327
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
328
- } | undefined;
329
- }, {
330
- name: string;
331
- views?: {
332
- 'request.section'?: {
333
- title?: string | undefined;
334
- component?: unknown;
335
- props?: Record<string, any> | undefined;
336
- }[] | undefined;
337
- 'response.section'?: {
338
- title?: string | undefined;
339
- component?: unknown;
340
- props?: Record<string, any> | undefined;
341
- }[] | undefined;
342
- } | undefined;
343
- hooks?: {
344
- onBeforeRequest?: ((args_0: {
345
- request: Request;
346
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
347
- onResponseReceived?: ((args_0: {
348
- response: Response;
349
- operation: Record<string, any>;
350
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
351
- } | undefined;
352
- }>>, "many">>;
353
- /** Enables / disables telemetry*/
128
+ }, z.core.$strip>], null>, z.ZodUnion<readonly [z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
129
+ }, z.core.$strip>>;
130
+ }, z.core.$strip>>>>;
354
131
  telemetry: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
355
- }, "strip", z.ZodTypeAny, {
356
- hideClientButton: boolean;
357
- showSidebar: boolean;
358
- operationTitleSource: "path" | "summary";
359
- theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none";
360
- persistAuth: boolean;
361
- telemetry: boolean;
362
- title?: string | undefined;
363
- url?: string | undefined;
364
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
365
- slug?: string | undefined;
366
- spec?: {
367
- title?: string | undefined;
368
- url?: string | undefined;
369
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
370
- slug?: string | undefined;
371
- } | undefined;
372
- authentication?: any;
373
- baseServerURL?: string | undefined;
374
- proxyUrl?: string | undefined;
375
- 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;
376
- servers?: any[] | undefined;
377
- _integration?: "go" | "rust" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "svelte" | "vue" | null | undefined;
378
- onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
379
- plugins?: ((...args: unknown[]) => {
380
- name: string;
381
- views?: {
382
- 'request.section'?: {
383
- title?: string | undefined;
384
- component?: unknown;
385
- props?: Record<string, any> | undefined;
386
- }[] | undefined;
387
- 'response.section'?: {
388
- title?: string | undefined;
389
- component?: unknown;
390
- props?: Record<string, any> | undefined;
391
- }[] | undefined;
392
- } | undefined;
393
- hooks?: {
394
- onBeforeRequest?: ((args_0: {
395
- request: Request;
396
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
397
- onResponseReceived?: ((args_0: {
398
- response: Response;
399
- operation: Record<string, any>;
400
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
401
- } | undefined;
402
- })[] | undefined;
403
- }, {
404
- title?: string | undefined;
405
- url?: string | undefined;
406
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
407
- slug?: string | undefined;
408
- spec?: {
409
- title?: string | undefined;
410
- url?: string | undefined;
411
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
412
- slug?: string | undefined;
413
- } | undefined;
414
- authentication?: any;
415
- baseServerURL?: string | undefined;
416
- hideClientButton?: unknown;
417
- proxyUrl?: string | undefined;
418
- 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;
419
- servers?: any[] | undefined;
420
- showSidebar?: unknown;
421
- operationTitleSource?: unknown;
422
- theme?: unknown;
423
- _integration?: "go" | "rust" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "svelte" | "vue" | null | undefined;
424
- onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
425
- persistAuth?: unknown;
426
- plugins?: ((...args: unknown[]) => {
427
- name: string;
428
- views?: {
429
- 'request.section'?: {
430
- title?: string | undefined;
431
- component?: unknown;
432
- props?: Record<string, any> | undefined;
433
- }[] | undefined;
434
- 'response.section'?: {
435
- title?: string | undefined;
436
- component?: unknown;
437
- props?: Record<string, any> | undefined;
438
- }[] | undefined;
439
- } | undefined;
440
- hooks?: {
441
- onBeforeRequest?: ((args_0: {
442
- request: Request;
443
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
444
- onResponseReceived?: ((args_0: {
445
- response: Response;
446
- operation: Record<string, any>;
447
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
448
- } | undefined;
449
- })[] | undefined;
450
- telemetry?: boolean | undefined;
451
- }>;
132
+ }, z.core.$strip>;
452
133
  export type ApiClientConfiguration = z.infer<typeof apiClientConfigurationSchema>;
453
- export declare const FetchLike: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodType<URL, z.ZodTypeDef, URL>, z.ZodType<Request, z.ZodTypeDef, Request>]>, z.ZodOptional<z.ZodAny>], z.ZodUnknown>, z.ZodPromise<z.ZodType<Response, z.ZodTypeDef, Response>>>>;
454
134
  /** Configuration for the Api Client without the transform since it cannot be merged */
455
- declare const _apiReferenceConfigurationSchema: z.ZodObject<z.objectUtil.extendShape<{
456
- /**
457
- * URL to an OpenAPI/Swagger document
458
- **/
135
+ declare const _apiReferenceConfigurationSchema: z.ZodObject<{
459
136
  url: z.ZodOptional<z.ZodString>;
460
- /**
461
- * Directly embed the OpenAPI document.
462
- * Can be a string, object, function returning an object, or null.
463
- *
464
- * @remarks It's recommended to pass a URL instead of content.
465
- **/
466
- 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]>>;
467
- /**
468
- * The title of the OpenAPI document.
469
- *
470
- * @example 'Scalar Galaxy'
471
- */
137
+ content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>]>>;
472
138
  title: z.ZodOptional<z.ZodString>;
473
- /**
474
- * The slug of the OpenAPI document used in the URL.
475
- *
476
- * If none is passed, the title will be used.
477
- *
478
- * If no title is used, it'll just use the index.
479
- *
480
- * @example 'scalar-galaxy'
481
- */
482
139
  slug: z.ZodOptional<z.ZodString>;
483
- /**
484
- * The OpenAPI/Swagger document to render
485
- *
486
- * @deprecated Use `url` and `content` on the top level instead.
487
- **/
488
140
  spec: z.ZodOptional<z.ZodObject<{
489
- /**
490
- * URL to an OpenAPI/Swagger document
491
- *
492
- * @deprecated Please move `url` to the top level and remove the `spec` prefix.
493
- *
494
- * @example
495
- * ```ts
496
- * const oldConfiguration = {
497
- * spec: {
498
- * url: 'https://example.com/openapi.json',
499
- * },
500
- * }
501
- *
502
- * const newConfiguration = {
503
- * url: 'https://example.com/openapi.json',
504
- * }
505
- * ```
506
- **/
507
141
  url: z.ZodOptional<z.ZodString>;
508
- /**
509
- * Directly embed the OpenAPI document.
510
- * Can be a string, object, function returning an object, or null.
511
- *
512
- * @remarks It's recommended to pass a URL instead of content.
513
- *
514
- * @deprecated Please move `content` to the top level and remove the `spec` prefix.
515
- *
516
- * @example
517
- * ```ts
518
- * const oldConfiguration = {
519
- * spec: {
520
- * content: '…',
521
- * },
522
- * }
523
- *
524
- * const newConfiguration = {
525
- * content: '…',
526
- * }
527
- * ```
528
- **/
529
- 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]>>;
530
- /**
531
- * The title of the OpenAPI document.
532
- *
533
- * @example 'Scalar Galaxy'
534
- *
535
- * @deprecated Please move `title` to the top level and remove the `spec` prefix.
536
- */
142
+ content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>]>>;
537
143
  title: z.ZodOptional<z.ZodString>;
538
- /**
539
- * The slug of the OpenAPI document used in the URL.
540
- *
541
- * If none is passed, the title will be used.
542
- *
543
- * If no title is used, it'll just use the index.
544
- *
545
- * @example 'scalar-galaxy'
546
- *
547
- * @deprecated Please move `slug` to the top level and remove the `spec` prefix.
548
- */
549
144
  slug: z.ZodOptional<z.ZodString>;
550
- }, "strip", z.ZodTypeAny, {
551
- title?: string | undefined;
552
- url?: string | undefined;
553
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
554
- slug?: string | undefined;
555
- }, {
556
- title?: string | undefined;
557
- url?: string | undefined;
558
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
559
- slug?: string | undefined;
560
- }>>;
561
- /** Prefill authentication */
145
+ }, z.core.$strip>>;
562
146
  authentication: z.ZodOptional<z.ZodAny>;
563
- /** Base URL for the API server */
564
147
  baseServerURL: z.ZodOptional<z.ZodString>;
565
- /**
566
- * Whether to hide the client button
567
- * @default false
568
- */
569
148
  hideClientButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
570
- /** URL to a request proxy for the API client */
571
149
  proxyUrl: z.ZodOptional<z.ZodString>;
572
- /** Key used with CTRL/CMD to open the search modal (defaults to 'k' e.g. CMD+k) */
573
- 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"]>>;
574
- /** List of OpenAPI server objects */
575
- servers: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
576
- /**
577
- * Whether to show the sidebar
578
- * @default true
579
- */
150
+ searchHotKey: z.ZodOptional<z.ZodEnum<{
151
+ c: "c";
152
+ r: "r";
153
+ a: "a";
154
+ b: "b";
155
+ d: "d";
156
+ e: "e";
157
+ f: "f";
158
+ g: "g";
159
+ h: "h";
160
+ i: "i";
161
+ j: "j";
162
+ k: "k";
163
+ l: "l";
164
+ m: "m";
165
+ n: "n";
166
+ o: "o";
167
+ p: "p";
168
+ q: "q";
169
+ s: "s";
170
+ t: "t";
171
+ u: "u";
172
+ v: "v";
173
+ w: "w";
174
+ x: "x";
175
+ y: "y";
176
+ z: "z";
177
+ }>>;
178
+ servers: z.ZodOptional<z.ZodArray<z.ZodAny>>;
580
179
  showSidebar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
581
- /**
582
- * Whether to use the operation summary or the operation path for the sidebar and search
583
- * @default 'summary'
584
- */
585
- operationTitleSource: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["summary", "path"]>>>>;
586
- /** A string to use one of the color presets */
587
- theme: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["alternate", "default", "moon", "purple", "solarized", "bluePlanet", "deepSpace", "saturn", "kepler", "elysiajs", "fastify", "mars", "laserwave", "none"]>>>>;
588
- /** Integration type identifier */
589
- _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", "svelte", "vue"]>>>;
590
- /** onRequestSent is fired when a request is sent */
591
- onRequestSent: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
592
- /** Whether to persist auth to local storage */
180
+ showToolbar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
181
+ never: "never";
182
+ always: "always";
183
+ localhost: "localhost";
184
+ }>>>>;
185
+ operationTitleSource: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
186
+ summary: "summary";
187
+ path: "path";
188
+ }>>>>;
189
+ theme: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
190
+ default: "default";
191
+ alternate: "alternate";
192
+ moon: "moon";
193
+ purple: "purple";
194
+ solarized: "solarized";
195
+ bluePlanet: "bluePlanet";
196
+ deepSpace: "deepSpace";
197
+ saturn: "saturn";
198
+ kepler: "kepler";
199
+ elysiajs: "elysiajs";
200
+ fastify: "fastify";
201
+ mars: "mars";
202
+ laserwave: "laserwave";
203
+ none: "none";
204
+ }>>>>;
205
+ _integration: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
206
+ go: "go";
207
+ rust: "rust";
208
+ elysiajs: "elysiajs";
209
+ fastify: "fastify";
210
+ adonisjs: "adonisjs";
211
+ docusaurus: "docusaurus";
212
+ dotnet: "dotnet";
213
+ express: "express";
214
+ fastapi: "fastapi";
215
+ hono: "hono";
216
+ html: "html";
217
+ laravel: "laravel";
218
+ litestar: "litestar";
219
+ nestjs: "nestjs";
220
+ nextjs: "nextjs";
221
+ nitro: "nitro";
222
+ nuxt: "nuxt";
223
+ platformatic: "platformatic";
224
+ react: "react";
225
+ svelte: "svelte";
226
+ vue: "vue";
227
+ }>>>;
228
+ onRequestSent: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodString], null>, z.ZodVoid>>;
593
229
  persistAuth: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
594
- /** Plugins for the API client */
595
- plugins: z.ZodOptional<z.ZodArray<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodObject<{
596
- name: z.ZodString;
597
- views: z.ZodOptional<z.ZodObject<{
598
- 'request.section': z.ZodOptional<z.ZodArray<z.ZodObject<{
599
- title: z.ZodOptional<z.ZodString>;
600
- component: z.ZodUnknown;
601
- props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
602
- }, "strip", z.ZodTypeAny, {
603
- title?: string | undefined;
604
- component?: unknown;
605
- props?: Record<string, any> | undefined;
606
- }, {
607
- title?: string | undefined;
608
- component?: unknown;
609
- props?: Record<string, any> | undefined;
610
- }>, "many">>;
611
- 'response.section': z.ZodOptional<z.ZodArray<z.ZodObject<{
612
- title: z.ZodOptional<z.ZodString>;
613
- component: z.ZodUnknown;
614
- props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
615
- }, "strip", z.ZodTypeAny, {
616
- title?: string | undefined;
617
- component?: unknown;
618
- props?: Record<string, any> | undefined;
619
- }, {
620
- title?: string | undefined;
621
- component?: unknown;
622
- props?: Record<string, any> | undefined;
623
- }>, "many">>;
624
- }, "strip", z.ZodTypeAny, {
625
- 'request.section'?: {
626
- title?: string | undefined;
627
- component?: unknown;
628
- props?: Record<string, any> | undefined;
629
- }[] | undefined;
630
- 'response.section'?: {
631
- title?: string | undefined;
632
- component?: unknown;
633
- props?: Record<string, any> | undefined;
634
- }[] | undefined;
635
- }, {
636
- 'request.section'?: {
637
- title?: string | undefined;
638
- component?: unknown;
639
- props?: Record<string, any> | undefined;
640
- }[] | undefined;
641
- 'response.section'?: {
642
- title?: string | undefined;
643
- component?: unknown;
644
- props?: Record<string, any> | undefined;
645
- }[] | undefined;
646
- }>>;
647
- hooks: z.ZodOptional<z.ZodObject<{
648
- onBeforeRequest: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
649
- request: z.ZodType<Request, z.ZodTypeDef, Request>;
650
- }, "strip", z.ZodTypeAny, {
651
- request: Request;
652
- }, {
653
- request: Request;
654
- }>], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
655
- onResponseReceived: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
656
- response: z.ZodType<Response, z.ZodTypeDef, Response>;
657
- operation: z.ZodRecord<z.ZodString, z.ZodAny>;
658
- }, "strip", z.ZodTypeAny, {
659
- response: Response;
660
- operation: Record<string, any>;
661
- }, {
662
- response: Response;
663
- operation: Record<string, any>;
664
- }>], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
665
- }, "strip", z.ZodTypeAny, {
666
- onBeforeRequest?: ((args_0: {
667
- request: Request;
668
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
669
- onResponseReceived?: ((args_0: {
670
- response: Response;
671
- operation: Record<string, any>;
672
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
673
- }, {
674
- onBeforeRequest?: ((args_0: {
675
- request: Request;
676
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
677
- onResponseReceived?: ((args_0: {
678
- response: Response;
679
- operation: Record<string, any>;
680
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
681
- }>>;
682
- }, "strip", z.ZodTypeAny, {
683
- name: string;
684
- views?: {
685
- 'request.section'?: {
686
- title?: string | undefined;
687
- component?: unknown;
688
- props?: Record<string, any> | undefined;
689
- }[] | undefined;
690
- 'response.section'?: {
691
- title?: string | undefined;
692
- component?: unknown;
693
- props?: Record<string, any> | undefined;
694
- }[] | undefined;
695
- } | undefined;
696
- hooks?: {
697
- onBeforeRequest?: ((args_0: {
698
- request: Request;
699
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
700
- onResponseReceived?: ((args_0: {
701
- response: Response;
702
- operation: Record<string, any>;
703
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
704
- } | undefined;
705
- }, {
706
- name: string;
707
- views?: {
708
- 'request.section'?: {
709
- title?: string | undefined;
710
- component?: unknown;
711
- props?: Record<string, any> | undefined;
712
- }[] | undefined;
713
- 'response.section'?: {
714
- title?: string | undefined;
715
- component?: unknown;
716
- props?: Record<string, any> | undefined;
717
- }[] | undefined;
718
- } | undefined;
719
- hooks?: {
720
- onBeforeRequest?: ((args_0: {
721
- request: Request;
722
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
723
- onResponseReceived?: ((args_0: {
724
- response: Response;
725
- operation: Record<string, any>;
726
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
727
- } | undefined;
728
- }>>, "many">>;
729
- /** Enables / disables telemetry*/
730
230
  telemetry: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
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
- */
231
+ layout: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
232
+ modern: "modern";
233
+ classic: "classic";
234
+ }>>>>;
741
235
  proxy: z.ZodOptional<z.ZodString>;
742
- /**
743
- * Custom fetch function for custom logic
744
- *
745
- * Can be used to add custom headers, handle auth, etc.
746
- */
747
- fetch: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodType<URL, z.ZodTypeDef, URL>, z.ZodType<Request, z.ZodTypeDef, Request>]>, z.ZodOptional<z.ZodAny>], z.ZodUnknown>, z.ZodPromise<z.ZodType<Response, z.ZodTypeDef, Response>>>>;
748
- /**
749
- * Plugins for the API reference
750
- */
751
- plugins: z.ZodOptional<z.ZodArray<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodObject<{
236
+ fetch: z.ZodOptional<z.ZodCustom<(input: string | URL | Request, init?: RequestInit) => Promise<Response>, (input: string | URL | Request, init?: RequestInit) => Promise<Response>>>;
237
+ plugins: z.ZodOptional<z.ZodArray<z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodObject<{
752
238
  name: z.ZodString;
753
239
  extensions: z.ZodArray<z.ZodObject<{
754
240
  name: z.ZodString;
755
241
  component: z.ZodUnknown;
756
242
  renderer: z.ZodOptional<z.ZodUnknown>;
757
- }, "strip", z.ZodTypeAny, {
758
- name: string;
759
- component?: unknown;
760
- renderer?: unknown;
761
- }, {
762
- name: string;
763
- component?: unknown;
764
- renderer?: unknown;
765
- }>, "many">;
766
- }, "strip", z.ZodTypeAny, {
767
- name: string;
768
- extensions: {
769
- name: string;
770
- component?: unknown;
771
- renderer?: unknown;
772
- }[];
773
- }, {
774
- name: string;
775
- extensions: {
776
- name: string;
777
- component?: unknown;
778
- renderer?: unknown;
779
- }[];
780
- }>>, "many">>;
781
- /**
782
- * Allows the user to inject an editor for the spec
783
- * @default false
784
- */
243
+ }, z.core.$strip>>;
244
+ }, z.core.$strip>>>>;
785
245
  isEditable: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
786
- /**
787
- * Controls whether the references show a loading state in the intro
788
- * @default false
789
- */
790
246
  isLoading: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
791
- /**
792
- * Whether to show models in the sidebar, search, and content.
793
- * @default false
794
- */
795
247
  hideModels: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
796
- /**
797
- * Sets the file type of the document to download, set to `none` to hide the download button
798
- * @default 'both'
799
- */
800
- documentDownloadType: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["yaml", "json", "both", "none"]>>>>;
801
- /**
802
- * Whether to show the "Download OpenAPI Document" button
803
- * @default false
804
- * @deprecated Use `documentDownloadType: 'none'` instead
805
- */
248
+ documentDownloadType: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
249
+ none: "none";
250
+ yaml: "yaml";
251
+ json: "json";
252
+ both: "both";
253
+ direct: "direct";
254
+ }>>>>;
806
255
  hideDownloadButton: z.ZodOptional<z.ZodBoolean>;
807
- /**
808
- * Whether to show the "Test Request" button
809
- * @default false
810
- */
811
256
  hideTestRequestButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
812
- /**
813
- * Whether to show the sidebar search bar
814
- * @default false
815
- */
816
257
  hideSearch: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
817
- /** Whether dark mode is on or off initially (light mode) */
258
+ showOperationId: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
818
259
  darkMode: z.ZodOptional<z.ZodBoolean>;
819
- /** forceDarkModeState makes it always this state no matter what */
820
- forceDarkModeState: z.ZodOptional<z.ZodEnum<["dark", "light"]>>;
821
- /**
822
- * Whether to show the dark mode toggle
823
- * @default false
824
- */
260
+ forceDarkModeState: z.ZodOptional<z.ZodEnum<{
261
+ dark: "dark";
262
+ light: "light";
263
+ }>>;
825
264
  hideDarkModeToggle: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
826
- /**
827
- * If used, passed data will be added to the HTML header
828
- * @see https://unhead.unjs.io/usage/composables/use-seo-meta
829
- */
830
265
  metaData: z.ZodOptional<z.ZodAny>;
831
- /**
832
- * Path to a favicon image
833
- * @default undefined
834
- * @example '/favicon.svg'
835
- */
836
266
  favicon: z.ZodOptional<z.ZodString>;
837
- /**
838
- * List of httpsnippet clients to hide from the clients menu
839
- * By default hides Unirest, pass `[]` to show all clients
840
- */
841
- 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>]>>;
842
- /** Determine the HTTP client that's selected by default */
267
+ hiddenClients: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodArray<z.ZodString>]>>, z.ZodArray<z.ZodString>, z.ZodLiteral<true>]>>;
843
268
  defaultHttpClient: z.ZodOptional<z.ZodObject<{
844
- targetKey: z.ZodType<"c" | "clojure" | "csharp" | "dart" | "http" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "rust" | "shell" | "swift", z.ZodTypeDef, "c" | "clojure" | "csharp" | "dart" | "http" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "rust" | "shell" | "swift">;
269
+ targetKey: z.ZodCustom<"c" | "clojure" | "csharp" | "dart" | "http" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "rust" | "shell" | "swift", "c" | "clojure" | "csharp" | "dart" | "http" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "rust" | "shell" | "swift">;
845
270
  clientKey: z.ZodString;
846
- }, "strip", z.ZodTypeAny, {
847
- targetKey: "c" | "clojure" | "csharp" | "dart" | "http" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "rust" | "shell" | "swift";
848
- clientKey: string;
849
- }, {
850
- targetKey: "c" | "clojure" | "csharp" | "dart" | "http" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "rust" | "shell" | "swift";
851
- clientKey: string;
852
- }>>;
853
- /** Custom CSS to be added to the page */
271
+ }, z.core.$strip>>;
854
272
  customCss: z.ZodOptional<z.ZodString>;
855
- /** onSpecUpdate is fired on spec/swagger content change */
856
- onSpecUpdate: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
857
- /** onServerChange is fired on selected server change */
858
- onServerChange: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
859
- /** onDocumentSelect is fired when the config is selected */
860
- onDocumentSelect: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
861
- /** Callback fired when the reference is fully loaded */
862
- onLoaded: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
863
- /** onBeforeRequest is fired before the request is sent. You can modify the request here. */
864
- onBeforeRequest: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
865
- request: z.ZodType<Request, z.ZodTypeDef, Request>;
866
- }, "strip", z.ZodTypeAny, {
867
- request: Request;
868
- }, {
273
+ onSpecUpdate: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodString], null>, z.ZodVoid>>;
274
+ onServerChange: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodString], null>, z.ZodVoid>>;
275
+ onDocumentSelect: z.ZodType<(() => Promise<void> | void) | undefined>;
276
+ onLoaded: z.ZodType<(() => Promise<void> | void) | undefined>;
277
+ onBeforeRequest: z.ZodType<((a: {
869
278
  request: Request;
870
- }>], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
871
- /**
872
- * onShowMore is fired when the user clicks the "Show more" button on the references
873
- * @param tagId - The ID of the tag that was clicked
874
- */
875
- onShowMore: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
876
- /**
877
- * onSidebarClick is fired when the user clicks on a sidebar item
878
- * @param href - The href of the sidebar item that was clicked
879
- */
880
- onSidebarClick: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
881
- /**
882
- * Route using paths instead of hashes, your server MUST support this
883
- * @example '/standalone-api-reference/:custom(.*)?'
884
- * @experimental
885
- * @default undefined
886
- */
279
+ }) => Promise<void> | void) | undefined>;
280
+ onShowMore: z.ZodType<((a: string) => Promise<void> | void) | undefined>;
281
+ onSidebarClick: z.ZodType<((a: string) => Promise<void> | void) | undefined>;
887
282
  pathRouting: z.ZodOptional<z.ZodObject<{
888
- /** Base path for the API reference */
889
283
  basePath: z.ZodString;
890
- }, "strip", z.ZodTypeAny, {
891
- basePath: string;
892
- }, {
893
- basePath: string;
894
- }>>;
895
- /**
896
- * Customize the heading portion of the hash
897
- * @param heading - The heading object
898
- * @returns A string ID used to generate the URL hash
899
- * @default (heading) => `#description/${heading.slug}`
900
- */
901
- generateHeadingSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
284
+ }, z.core.$strip>>;
285
+ generateHeadingSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodObject<{
902
286
  slug: z.ZodDefault<z.ZodString>;
903
- }, "strip", z.ZodTypeAny, {
904
- slug: string;
905
- }, {
906
- slug?: string | undefined;
907
- }>], z.ZodUnknown>, z.ZodString>>;
908
- /**
909
- * Customize the model portion of the hash
910
- * @param model - The model object with a name property
911
- * @returns A string ID used to generate the URL hash
912
- * @default (model) => slug(model.name)
913
- */
914
- generateModelSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
287
+ }, z.core.$strip>], null>, z.ZodString>>;
288
+ generateModelSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodObject<{
915
289
  name: z.ZodDefault<z.ZodString>;
916
- }, "strip", z.ZodTypeAny, {
917
- name: string;
918
- }, {
919
- name?: string | undefined;
920
- }>], z.ZodUnknown>, z.ZodString>>;
921
- /**
922
- * Customize the tag portion of the hash
923
- * @param tag - The tag object
924
- * @returns A string ID used to generate the URL hash
925
- * @default (tag) => slug(tag.name)
926
- */
927
- generateTagSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
290
+ }, z.core.$strip>], null>, z.ZodString>>;
291
+ generateTagSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodObject<{
928
292
  name: z.ZodDefault<z.ZodString>;
929
- }, "strip", z.ZodTypeAny, {
930
- name: string;
931
- }, {
932
- name?: string | undefined;
933
- }>], z.ZodUnknown>, z.ZodString>>;
934
- /**
935
- * Customize the operation portion of the hash
936
- * @param operation - The operation object
937
- * @returns A string ID used to generate the URL hash
938
- * @default (operation) => `${operation.method}${operation.path}`
939
- */
940
- generateOperationSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
293
+ }, z.core.$strip>], null>, z.ZodString>>;
294
+ generateOperationSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodObject<{
941
295
  path: z.ZodString;
942
296
  operationId: z.ZodOptional<z.ZodString>;
943
297
  method: z.ZodString;
944
298
  summary: z.ZodOptional<z.ZodString>;
945
- }, "strip", z.ZodTypeAny, {
946
- path: string;
947
- method: string;
948
- summary?: string | undefined;
949
- operationId?: string | undefined;
950
- }, {
951
- path: string;
952
- method: string;
953
- summary?: string | undefined;
954
- operationId?: string | undefined;
955
- }>], z.ZodUnknown>, z.ZodString>>;
956
- /**
957
- * Customize the webhook portion of the hash
958
- * @param webhook - The webhook object
959
- * @returns A string ID used to generate the URL hash
960
- * @default (webhook) => slug(webhook.name)
961
- */
962
- generateWebhookSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
299
+ }, z.core.$strip>], null>, z.ZodString>>;
300
+ generateWebhookSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodObject<{
963
301
  name: z.ZodString;
964
302
  method: z.ZodOptional<z.ZodString>;
965
- }, "strip", z.ZodTypeAny, {
966
- name: string;
967
- method?: string | undefined;
968
- }, {
969
- name: string;
970
- method?: string | undefined;
971
- }>], z.ZodUnknown>, z.ZodString>>;
972
- /**
973
- * To handle redirects, pass a function that will recieve:
974
- * - The current path with hash if pathRouting is enabled
975
- * - The current hash if hashRouting (default)
976
- * And then passes that to history.replaceState
977
- *
978
- * @example hashRouting (default)
979
- * ```ts
980
- * redirect: (hash: string) => hash.replace('#v1/old-path', '#v2/new-path')
981
- * ```
982
- * @example pathRouting
983
- * ```ts
984
- * redirect: (pathWithHash: string) => {
985
- * if (pathWithHash.includes('#')) {
986
- * return pathWithHash.replace('/v1/tags/user#operation/get-user', '/v1/tags/user/operation/get-user')
987
- * }
988
- * return null
989
- * }
990
- * ```
991
- */
992
- redirect: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
993
- /**
994
- * Whether to include default fonts
995
- * @default true
996
- */
303
+ }, z.core.$strip>], null>, z.ZodString>>;
304
+ redirect: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodString], null>, z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
997
305
  withDefaultFonts: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
998
- /**
999
- * Whether to expand all tags by default
1000
- *
1001
- * Warning this can cause performance issues on big documents
1002
- * @default false
1003
- */
1004
306
  defaultOpenAllTags: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1005
- /**
1006
- * Whether to expand all models by default
1007
- *
1008
- * Warning this can cause performance issues on big documents
1009
- * @default false
1010
- */
1011
307
  expandAllModelSections: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1012
- /**
1013
- * Whether to expand all responses by default
1014
- *
1015
- * Warning this can cause performance issues on big documents
1016
- * @default false
1017
- */
1018
308
  expandAllResponses: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1019
- /**
1020
- * Function to sort tags
1021
- * @default 'alpha' for alphabetical sorting
1022
- */
1023
- tagsSorter: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"alpha">, z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodAny], z.ZodUnknown>, z.ZodNumber>]>>;
1024
- /**
1025
- * Function to sort operations
1026
- * @default 'alpha' for alphabetical sorting
1027
- */
1028
- operationsSorter: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"alpha">, z.ZodLiteral<"method">, z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodAny], z.ZodUnknown>, z.ZodNumber>]>>;
1029
- /**
1030
- * Order the schema properties by
1031
- * @default 'alpha' for alphabetical sorting
1032
- */
1033
- orderSchemaPropertiesBy: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"alpha">, z.ZodLiteral<"preserve">]>>>>;
1034
- /**
1035
- * Sort the schema properties by required ones first
1036
- * @default true
1037
- */
309
+ tagsSorter: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"alpha">, z.ZodFunction<z.ZodTuple<readonly [z.ZodAny, z.ZodAny], null>, z.ZodNumber>]>>;
310
+ operationsSorter: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"alpha">, z.ZodLiteral<"method">, z.ZodFunction<z.ZodTuple<readonly [z.ZodAny, z.ZodAny], null>, z.ZodNumber>]>>;
311
+ orderSchemaPropertiesBy: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"alpha">, z.ZodLiteral<"preserve">]>>>>;
1038
312
  orderRequiredPropertiesFirst: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1039
- }>, "strip", z.ZodTypeAny, {
1040
- hideClientButton: boolean;
1041
- showSidebar: boolean;
1042
- operationTitleSource: "path" | "summary";
1043
- theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none";
1044
- persistAuth: boolean;
1045
- telemetry: boolean;
1046
- layout: "modern" | "classic";
1047
- isEditable: boolean;
1048
- isLoading: boolean;
1049
- hideModels: boolean;
1050
- documentDownloadType: "none" | "yaml" | "json" | "both";
1051
- hideTestRequestButton: boolean;
1052
- hideSearch: boolean;
1053
- hideDarkModeToggle: boolean;
1054
- withDefaultFonts: boolean;
1055
- defaultOpenAllTags: boolean;
1056
- expandAllModelSections: boolean;
1057
- expandAllResponses: boolean;
1058
- orderSchemaPropertiesBy: "alpha" | "preserve";
1059
- orderRequiredPropertiesFirst: boolean;
1060
- title?: string | undefined;
1061
- onBeforeRequest?: ((args_0: {
1062
- request: Request;
1063
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
1064
- fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
1065
- url?: string | undefined;
1066
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
1067
- slug?: string | undefined;
1068
- spec?: {
1069
- title?: string | undefined;
1070
- url?: string | undefined;
1071
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
1072
- slug?: string | undefined;
1073
- } | undefined;
1074
- authentication?: any;
1075
- baseServerURL?: string | undefined;
1076
- proxyUrl?: string | undefined;
1077
- 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;
1078
- servers?: any[] | undefined;
1079
- _integration?: "go" | "rust" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "svelte" | "vue" | null | undefined;
1080
- onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
1081
- plugins?: ((...args: unknown[]) => {
1082
- name: string;
1083
- extensions: {
1084
- name: string;
1085
- component?: unknown;
1086
- renderer?: unknown;
1087
- }[];
1088
- })[] | undefined;
1089
- proxy?: string | undefined;
1090
- hideDownloadButton?: boolean | undefined;
1091
- darkMode?: boolean | undefined;
1092
- forceDarkModeState?: "dark" | "light" | undefined;
1093
- metaData?: any;
1094
- favicon?: string | undefined;
1095
- hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
1096
- defaultHttpClient?: {
1097
- targetKey: "c" | "clojure" | "csharp" | "dart" | "http" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "rust" | "shell" | "swift";
1098
- clientKey: string;
1099
- } | undefined;
1100
- customCss?: string | undefined;
1101
- onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
1102
- onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
1103
- onDocumentSelect?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1104
- onLoaded?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1105
- onShowMore?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
1106
- onSidebarClick?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
1107
- pathRouting?: {
1108
- basePath: string;
1109
- } | undefined;
1110
- generateHeadingSlug?: ((args_0: {
1111
- slug?: string | undefined;
1112
- }, ...args: unknown[]) => string) | undefined;
1113
- generateModelSlug?: ((args_0: {
1114
- name?: string | undefined;
1115
- }, ...args: unknown[]) => string) | undefined;
1116
- generateTagSlug?: ((args_0: {
1117
- name?: string | undefined;
1118
- }, ...args: unknown[]) => string) | undefined;
1119
- generateOperationSlug?: ((args_0: {
1120
- path: string;
1121
- method: string;
1122
- summary?: string | undefined;
1123
- operationId?: string | undefined;
1124
- }, ...args: unknown[]) => string) | undefined;
1125
- generateWebhookSlug?: ((args_0: {
1126
- name: string;
1127
- method?: string | undefined;
1128
- }, ...args: unknown[]) => string) | undefined;
1129
- redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
1130
- tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
1131
- operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
1132
- }, {
1133
- title?: string | undefined;
1134
- onBeforeRequest?: ((args_0: {
1135
- request: Request;
1136
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
1137
- fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
1138
- url?: string | undefined;
1139
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
1140
- slug?: string | undefined;
1141
- spec?: {
1142
- title?: string | undefined;
1143
- url?: string | undefined;
1144
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
1145
- slug?: string | undefined;
1146
- } | undefined;
1147
- authentication?: any;
1148
- baseServerURL?: string | undefined;
1149
- hideClientButton?: unknown;
1150
- proxyUrl?: string | undefined;
1151
- 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;
1152
- servers?: any[] | undefined;
1153
- showSidebar?: unknown;
1154
- operationTitleSource?: unknown;
1155
- theme?: unknown;
1156
- _integration?: "go" | "rust" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "svelte" | "vue" | null | undefined;
1157
- onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
1158
- persistAuth?: unknown;
1159
- plugins?: ((...args: unknown[]) => {
1160
- name: string;
1161
- extensions: {
1162
- name: string;
1163
- component?: unknown;
1164
- renderer?: unknown;
1165
- }[];
1166
- })[] | undefined;
1167
- telemetry?: boolean | undefined;
1168
- layout?: unknown;
1169
- proxy?: string | undefined;
1170
- isEditable?: unknown;
1171
- isLoading?: unknown;
1172
- hideModels?: unknown;
1173
- documentDownloadType?: unknown;
1174
- hideDownloadButton?: boolean | undefined;
1175
- hideTestRequestButton?: unknown;
1176
- hideSearch?: unknown;
1177
- darkMode?: boolean | undefined;
1178
- forceDarkModeState?: "dark" | "light" | undefined;
1179
- hideDarkModeToggle?: unknown;
1180
- metaData?: any;
1181
- favicon?: string | undefined;
1182
- hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
1183
- defaultHttpClient?: {
1184
- targetKey: "c" | "clojure" | "csharp" | "dart" | "http" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "rust" | "shell" | "swift";
1185
- clientKey: string;
1186
- } | undefined;
1187
- customCss?: string | undefined;
1188
- onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
1189
- onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
1190
- onDocumentSelect?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1191
- onLoaded?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1192
- onShowMore?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
1193
- onSidebarClick?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
1194
- pathRouting?: {
1195
- basePath: string;
1196
- } | undefined;
1197
- generateHeadingSlug?: ((args_0: {
1198
- slug: string;
1199
- }, ...args: unknown[]) => string) | undefined;
1200
- generateModelSlug?: ((args_0: {
1201
- name: string;
1202
- }, ...args: unknown[]) => string) | undefined;
1203
- generateTagSlug?: ((args_0: {
1204
- name: string;
1205
- }, ...args: unknown[]) => string) | undefined;
1206
- generateOperationSlug?: ((args_0: {
1207
- path: string;
1208
- method: string;
1209
- summary?: string | undefined;
1210
- operationId?: string | undefined;
1211
- }, ...args: unknown[]) => string) | undefined;
1212
- generateWebhookSlug?: ((args_0: {
1213
- name: string;
1214
- method?: string | undefined;
1215
- }, ...args: unknown[]) => string) | undefined;
1216
- redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
1217
- withDefaultFonts?: unknown;
1218
- defaultOpenAllTags?: unknown;
1219
- expandAllModelSections?: unknown;
1220
- expandAllResponses?: unknown;
1221
- tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
1222
- operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
1223
- orderSchemaPropertiesBy?: unknown;
1224
- orderRequiredPropertiesFirst?: unknown;
1225
- }>;
313
+ }, z.core.$strip>;
1226
314
  /** Configuration for the Api Reference */
1227
- export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z.objectUtil.extendShape<{
1228
- /**
1229
- * URL to an OpenAPI/Swagger document
1230
- **/
315
+ export declare const apiReferenceConfigurationSchema: z.ZodPipe<z.ZodObject<{
1231
316
  url: z.ZodOptional<z.ZodString>;
1232
- /**
1233
- * Directly embed the OpenAPI document.
1234
- * Can be a string, object, function returning an object, or null.
1235
- *
1236
- * @remarks It's recommended to pass a URL instead of content.
1237
- **/
1238
- 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]>>;
1239
- /**
1240
- * The title of the OpenAPI document.
1241
- *
1242
- * @example 'Scalar Galaxy'
1243
- */
317
+ content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>]>>;
1244
318
  title: z.ZodOptional<z.ZodString>;
1245
- /**
1246
- * The slug of the OpenAPI document used in the URL.
1247
- *
1248
- * If none is passed, the title will be used.
1249
- *
1250
- * If no title is used, it'll just use the index.
1251
- *
1252
- * @example 'scalar-galaxy'
1253
- */
1254
319
  slug: z.ZodOptional<z.ZodString>;
1255
- /**
1256
- * The OpenAPI/Swagger document to render
1257
- *
1258
- * @deprecated Use `url` and `content` on the top level instead.
1259
- **/
1260
320
  spec: z.ZodOptional<z.ZodObject<{
1261
- /**
1262
- * URL to an OpenAPI/Swagger document
1263
- *
1264
- * @deprecated Please move `url` to the top level and remove the `spec` prefix.
1265
- *
1266
- * @example
1267
- * ```ts
1268
- * const oldConfiguration = {
1269
- * spec: {
1270
- * url: 'https://example.com/openapi.json',
1271
- * },
1272
- * }
1273
- *
1274
- * const newConfiguration = {
1275
- * url: 'https://example.com/openapi.json',
1276
- * }
1277
- * ```
1278
- **/
1279
321
  url: z.ZodOptional<z.ZodString>;
1280
- /**
1281
- * Directly embed the OpenAPI document.
1282
- * Can be a string, object, function returning an object, or null.
1283
- *
1284
- * @remarks It's recommended to pass a URL instead of content.
1285
- *
1286
- * @deprecated Please move `content` to the top level and remove the `spec` prefix.
1287
- *
1288
- * @example
1289
- * ```ts
1290
- * const oldConfiguration = {
1291
- * spec: {
1292
- * content: '…',
1293
- * },
1294
- * }
1295
- *
1296
- * const newConfiguration = {
1297
- * content: '…',
1298
- * }
1299
- * ```
1300
- **/
1301
- 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]>>;
1302
- /**
1303
- * The title of the OpenAPI document.
1304
- *
1305
- * @example 'Scalar Galaxy'
1306
- *
1307
- * @deprecated Please move `title` to the top level and remove the `spec` prefix.
1308
- */
322
+ content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>]>>;
1309
323
  title: z.ZodOptional<z.ZodString>;
1310
- /**
1311
- * The slug of the OpenAPI document used in the URL.
1312
- *
1313
- * If none is passed, the title will be used.
1314
- *
1315
- * If no title is used, it'll just use the index.
1316
- *
1317
- * @example 'scalar-galaxy'
1318
- *
1319
- * @deprecated Please move `slug` to the top level and remove the `spec` prefix.
1320
- */
1321
324
  slug: z.ZodOptional<z.ZodString>;
1322
- }, "strip", z.ZodTypeAny, {
1323
- title?: string | undefined;
1324
- url?: string | undefined;
1325
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
1326
- slug?: string | undefined;
1327
- }, {
1328
- title?: string | undefined;
1329
- url?: string | undefined;
1330
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
1331
- slug?: string | undefined;
1332
- }>>;
1333
- /** Prefill authentication */
325
+ }, z.core.$strip>>;
1334
326
  authentication: z.ZodOptional<z.ZodAny>;
1335
- /** Base URL for the API server */
1336
327
  baseServerURL: z.ZodOptional<z.ZodString>;
1337
- /**
1338
- * Whether to hide the client button
1339
- * @default false
1340
- */
1341
328
  hideClientButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1342
- /** URL to a request proxy for the API client */
1343
329
  proxyUrl: z.ZodOptional<z.ZodString>;
1344
- /** Key used with CTRL/CMD to open the search modal (defaults to 'k' e.g. CMD+k) */
1345
- 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"]>>;
1346
- /** List of OpenAPI server objects */
1347
- servers: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
1348
- /**
1349
- * Whether to show the sidebar
1350
- * @default true
1351
- */
330
+ searchHotKey: z.ZodOptional<z.ZodEnum<{
331
+ c: "c";
332
+ r: "r";
333
+ a: "a";
334
+ b: "b";
335
+ d: "d";
336
+ e: "e";
337
+ f: "f";
338
+ g: "g";
339
+ h: "h";
340
+ i: "i";
341
+ j: "j";
342
+ k: "k";
343
+ l: "l";
344
+ m: "m";
345
+ n: "n";
346
+ o: "o";
347
+ p: "p";
348
+ q: "q";
349
+ s: "s";
350
+ t: "t";
351
+ u: "u";
352
+ v: "v";
353
+ w: "w";
354
+ x: "x";
355
+ y: "y";
356
+ z: "z";
357
+ }>>;
358
+ servers: z.ZodOptional<z.ZodArray<z.ZodAny>>;
1352
359
  showSidebar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1353
- /**
1354
- * Whether to use the operation summary or the operation path for the sidebar and search
1355
- * @default 'summary'
1356
- */
1357
- operationTitleSource: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["summary", "path"]>>>>;
1358
- /** A string to use one of the color presets */
1359
- theme: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["alternate", "default", "moon", "purple", "solarized", "bluePlanet", "deepSpace", "saturn", "kepler", "elysiajs", "fastify", "mars", "laserwave", "none"]>>>>;
1360
- /** Integration type identifier */
1361
- _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", "svelte", "vue"]>>>;
1362
- /** onRequestSent is fired when a request is sent */
1363
- onRequestSent: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
1364
- /** Whether to persist auth to local storage */
360
+ showToolbar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
361
+ never: "never";
362
+ always: "always";
363
+ localhost: "localhost";
364
+ }>>>>;
365
+ operationTitleSource: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
366
+ summary: "summary";
367
+ path: "path";
368
+ }>>>>;
369
+ theme: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
370
+ default: "default";
371
+ alternate: "alternate";
372
+ moon: "moon";
373
+ purple: "purple";
374
+ solarized: "solarized";
375
+ bluePlanet: "bluePlanet";
376
+ deepSpace: "deepSpace";
377
+ saturn: "saturn";
378
+ kepler: "kepler";
379
+ elysiajs: "elysiajs";
380
+ fastify: "fastify";
381
+ mars: "mars";
382
+ laserwave: "laserwave";
383
+ none: "none";
384
+ }>>>>;
385
+ _integration: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
386
+ go: "go";
387
+ rust: "rust";
388
+ elysiajs: "elysiajs";
389
+ fastify: "fastify";
390
+ adonisjs: "adonisjs";
391
+ docusaurus: "docusaurus";
392
+ dotnet: "dotnet";
393
+ express: "express";
394
+ fastapi: "fastapi";
395
+ hono: "hono";
396
+ html: "html";
397
+ laravel: "laravel";
398
+ litestar: "litestar";
399
+ nestjs: "nestjs";
400
+ nextjs: "nextjs";
401
+ nitro: "nitro";
402
+ nuxt: "nuxt";
403
+ platformatic: "platformatic";
404
+ react: "react";
405
+ svelte: "svelte";
406
+ vue: "vue";
407
+ }>>>;
408
+ onRequestSent: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodString], null>, z.ZodVoid>>;
1365
409
  persistAuth: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1366
- /** Plugins for the API client */
1367
- plugins: z.ZodOptional<z.ZodArray<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodObject<{
1368
- name: z.ZodString;
1369
- views: z.ZodOptional<z.ZodObject<{
1370
- 'request.section': z.ZodOptional<z.ZodArray<z.ZodObject<{
1371
- title: z.ZodOptional<z.ZodString>;
1372
- component: z.ZodUnknown;
1373
- props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1374
- }, "strip", z.ZodTypeAny, {
1375
- title?: string | undefined;
1376
- component?: unknown;
1377
- props?: Record<string, any> | undefined;
1378
- }, {
1379
- title?: string | undefined;
1380
- component?: unknown;
1381
- props?: Record<string, any> | undefined;
1382
- }>, "many">>;
1383
- 'response.section': z.ZodOptional<z.ZodArray<z.ZodObject<{
1384
- title: z.ZodOptional<z.ZodString>;
1385
- component: z.ZodUnknown;
1386
- props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1387
- }, "strip", z.ZodTypeAny, {
1388
- title?: string | undefined;
1389
- component?: unknown;
1390
- props?: Record<string, any> | undefined;
1391
- }, {
1392
- title?: string | undefined;
1393
- component?: unknown;
1394
- props?: Record<string, any> | undefined;
1395
- }>, "many">>;
1396
- }, "strip", z.ZodTypeAny, {
1397
- 'request.section'?: {
1398
- title?: string | undefined;
1399
- component?: unknown;
1400
- props?: Record<string, any> | undefined;
1401
- }[] | undefined;
1402
- 'response.section'?: {
1403
- title?: string | undefined;
1404
- component?: unknown;
1405
- props?: Record<string, any> | undefined;
1406
- }[] | undefined;
1407
- }, {
1408
- 'request.section'?: {
1409
- title?: string | undefined;
1410
- component?: unknown;
1411
- props?: Record<string, any> | undefined;
1412
- }[] | undefined;
1413
- 'response.section'?: {
1414
- title?: string | undefined;
1415
- component?: unknown;
1416
- props?: Record<string, any> | undefined;
1417
- }[] | undefined;
1418
- }>>;
1419
- hooks: z.ZodOptional<z.ZodObject<{
1420
- onBeforeRequest: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
1421
- request: z.ZodType<Request, z.ZodTypeDef, Request>;
1422
- }, "strip", z.ZodTypeAny, {
1423
- request: Request;
1424
- }, {
1425
- request: Request;
1426
- }>], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
1427
- onResponseReceived: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
1428
- response: z.ZodType<Response, z.ZodTypeDef, Response>;
1429
- operation: z.ZodRecord<z.ZodString, z.ZodAny>;
1430
- }, "strip", z.ZodTypeAny, {
1431
- response: Response;
1432
- operation: Record<string, any>;
1433
- }, {
1434
- response: Response;
1435
- operation: Record<string, any>;
1436
- }>], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
1437
- }, "strip", z.ZodTypeAny, {
1438
- onBeforeRequest?: ((args_0: {
1439
- request: Request;
1440
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
1441
- onResponseReceived?: ((args_0: {
1442
- response: Response;
1443
- operation: Record<string, any>;
1444
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
1445
- }, {
1446
- onBeforeRequest?: ((args_0: {
1447
- request: Request;
1448
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
1449
- onResponseReceived?: ((args_0: {
1450
- response: Response;
1451
- operation: Record<string, any>;
1452
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
1453
- }>>;
1454
- }, "strip", z.ZodTypeAny, {
1455
- name: string;
1456
- views?: {
1457
- 'request.section'?: {
1458
- title?: string | undefined;
1459
- component?: unknown;
1460
- props?: Record<string, any> | undefined;
1461
- }[] | undefined;
1462
- 'response.section'?: {
1463
- title?: string | undefined;
1464
- component?: unknown;
1465
- props?: Record<string, any> | undefined;
1466
- }[] | undefined;
1467
- } | undefined;
1468
- hooks?: {
1469
- onBeforeRequest?: ((args_0: {
1470
- request: Request;
1471
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
1472
- onResponseReceived?: ((args_0: {
1473
- response: Response;
1474
- operation: Record<string, any>;
1475
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
1476
- } | undefined;
1477
- }, {
1478
- name: string;
1479
- views?: {
1480
- 'request.section'?: {
1481
- title?: string | undefined;
1482
- component?: unknown;
1483
- props?: Record<string, any> | undefined;
1484
- }[] | undefined;
1485
- 'response.section'?: {
1486
- title?: string | undefined;
1487
- component?: unknown;
1488
- props?: Record<string, any> | undefined;
1489
- }[] | undefined;
1490
- } | undefined;
1491
- hooks?: {
1492
- onBeforeRequest?: ((args_0: {
1493
- request: Request;
1494
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
1495
- onResponseReceived?: ((args_0: {
1496
- response: Response;
1497
- operation: Record<string, any>;
1498
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
1499
- } | undefined;
1500
- }>>, "many">>;
1501
- /** Enables / disables telemetry*/
1502
410
  telemetry: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1503
- }, {
1504
- /**
1505
- * The layout to use for the references
1506
- * @default 'modern'
1507
- */
1508
- layout: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["modern", "classic"]>>>>;
1509
- /**
1510
- * URL to a request proxy for the API client
1511
- * @deprecated Use proxyUrl instead
1512
- */
411
+ layout: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
412
+ modern: "modern";
413
+ classic: "classic";
414
+ }>>>>;
1513
415
  proxy: z.ZodOptional<z.ZodString>;
1514
- /**
1515
- * Custom fetch function for custom logic
1516
- *
1517
- * Can be used to add custom headers, handle auth, etc.
1518
- */
1519
- fetch: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodType<URL, z.ZodTypeDef, URL>, z.ZodType<Request, z.ZodTypeDef, Request>]>, z.ZodOptional<z.ZodAny>], z.ZodUnknown>, z.ZodPromise<z.ZodType<Response, z.ZodTypeDef, Response>>>>;
1520
- /**
1521
- * Plugins for the API reference
1522
- */
1523
- plugins: z.ZodOptional<z.ZodArray<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodObject<{
416
+ fetch: z.ZodOptional<z.ZodCustom<(input: string | URL | Request, init?: RequestInit) => Promise<Response>, (input: string | URL | Request, init?: RequestInit) => Promise<Response>>>;
417
+ plugins: z.ZodOptional<z.ZodArray<z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodObject<{
1524
418
  name: z.ZodString;
1525
419
  extensions: z.ZodArray<z.ZodObject<{
1526
420
  name: z.ZodString;
1527
421
  component: z.ZodUnknown;
1528
422
  renderer: z.ZodOptional<z.ZodUnknown>;
1529
- }, "strip", z.ZodTypeAny, {
1530
- name: string;
1531
- component?: unknown;
1532
- renderer?: unknown;
1533
- }, {
1534
- name: string;
1535
- component?: unknown;
1536
- renderer?: unknown;
1537
- }>, "many">;
1538
- }, "strip", z.ZodTypeAny, {
1539
- name: string;
1540
- extensions: {
1541
- name: string;
1542
- component?: unknown;
1543
- renderer?: unknown;
1544
- }[];
1545
- }, {
1546
- name: string;
1547
- extensions: {
1548
- name: string;
1549
- component?: unknown;
1550
- renderer?: unknown;
1551
- }[];
1552
- }>>, "many">>;
1553
- /**
1554
- * Allows the user to inject an editor for the spec
1555
- * @default false
1556
- */
423
+ }, z.core.$strip>>;
424
+ }, z.core.$strip>>>>;
1557
425
  isEditable: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1558
- /**
1559
- * Controls whether the references show a loading state in the intro
1560
- * @default false
1561
- */
1562
426
  isLoading: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1563
- /**
1564
- * Whether to show models in the sidebar, search, and content.
1565
- * @default false
1566
- */
1567
427
  hideModels: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1568
- /**
1569
- * Sets the file type of the document to download, set to `none` to hide the download button
1570
- * @default 'both'
1571
- */
1572
- documentDownloadType: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["yaml", "json", "both", "none"]>>>>;
1573
- /**
1574
- * Whether to show the "Download OpenAPI Document" button
1575
- * @default false
1576
- * @deprecated Use `documentDownloadType: 'none'` instead
1577
- */
428
+ documentDownloadType: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
429
+ none: "none";
430
+ yaml: "yaml";
431
+ json: "json";
432
+ both: "both";
433
+ direct: "direct";
434
+ }>>>>;
1578
435
  hideDownloadButton: z.ZodOptional<z.ZodBoolean>;
1579
- /**
1580
- * Whether to show the "Test Request" button
1581
- * @default false
1582
- */
1583
436
  hideTestRequestButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1584
- /**
1585
- * Whether to show the sidebar search bar
1586
- * @default false
1587
- */
1588
437
  hideSearch: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1589
- /** Whether dark mode is on or off initially (light mode) */
438
+ showOperationId: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1590
439
  darkMode: z.ZodOptional<z.ZodBoolean>;
1591
- /** forceDarkModeState makes it always this state no matter what */
1592
- forceDarkModeState: z.ZodOptional<z.ZodEnum<["dark", "light"]>>;
1593
- /**
1594
- * Whether to show the dark mode toggle
1595
- * @default false
1596
- */
440
+ forceDarkModeState: z.ZodOptional<z.ZodEnum<{
441
+ dark: "dark";
442
+ light: "light";
443
+ }>>;
1597
444
  hideDarkModeToggle: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1598
- /**
1599
- * If used, passed data will be added to the HTML header
1600
- * @see https://unhead.unjs.io/usage/composables/use-seo-meta
1601
- */
1602
445
  metaData: z.ZodOptional<z.ZodAny>;
1603
- /**
1604
- * Path to a favicon image
1605
- * @default undefined
1606
- * @example '/favicon.svg'
1607
- */
1608
446
  favicon: z.ZodOptional<z.ZodString>;
1609
- /**
1610
- * List of httpsnippet clients to hide from the clients menu
1611
- * By default hides Unirest, pass `[]` to show all clients
1612
- */
1613
- 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>]>>;
1614
- /** Determine the HTTP client that's selected by default */
447
+ hiddenClients: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodArray<z.ZodString>]>>, z.ZodArray<z.ZodString>, z.ZodLiteral<true>]>>;
1615
448
  defaultHttpClient: z.ZodOptional<z.ZodObject<{
1616
- targetKey: z.ZodType<"c" | "clojure" | "csharp" | "dart" | "http" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "rust" | "shell" | "swift", z.ZodTypeDef, "c" | "clojure" | "csharp" | "dart" | "http" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "rust" | "shell" | "swift">;
449
+ targetKey: z.ZodCustom<"c" | "clojure" | "csharp" | "dart" | "http" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "rust" | "shell" | "swift", "c" | "clojure" | "csharp" | "dart" | "http" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "rust" | "shell" | "swift">;
1617
450
  clientKey: z.ZodString;
1618
- }, "strip", z.ZodTypeAny, {
1619
- targetKey: "c" | "clojure" | "csharp" | "dart" | "http" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "rust" | "shell" | "swift";
1620
- clientKey: string;
1621
- }, {
1622
- targetKey: "c" | "clojure" | "csharp" | "dart" | "http" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "rust" | "shell" | "swift";
1623
- clientKey: string;
1624
- }>>;
1625
- /** Custom CSS to be added to the page */
451
+ }, z.core.$strip>>;
1626
452
  customCss: z.ZodOptional<z.ZodString>;
1627
- /** onSpecUpdate is fired on spec/swagger content change */
1628
- onSpecUpdate: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
1629
- /** onServerChange is fired on selected server change */
1630
- onServerChange: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
1631
- /** onDocumentSelect is fired when the config is selected */
1632
- onDocumentSelect: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
1633
- /** Callback fired when the reference is fully loaded */
1634
- onLoaded: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
1635
- /** onBeforeRequest is fired before the request is sent. You can modify the request here. */
1636
- onBeforeRequest: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
1637
- request: z.ZodType<Request, z.ZodTypeDef, Request>;
1638
- }, "strip", z.ZodTypeAny, {
453
+ onSpecUpdate: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodString], null>, z.ZodVoid>>;
454
+ onServerChange: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodString], null>, z.ZodVoid>>;
455
+ onDocumentSelect: z.ZodType<(() => Promise<void> | void) | undefined>;
456
+ onLoaded: z.ZodType<(() => Promise<void> | void) | undefined>;
457
+ onBeforeRequest: z.ZodType<((a: {
1639
458
  request: Request;
1640
- }, {
1641
- request: Request;
1642
- }>], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
1643
- /**
1644
- * onShowMore is fired when the user clicks the "Show more" button on the references
1645
- * @param tagId - The ID of the tag that was clicked
1646
- */
1647
- onShowMore: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
1648
- /**
1649
- * onSidebarClick is fired when the user clicks on a sidebar item
1650
- * @param href - The href of the sidebar item that was clicked
1651
- */
1652
- onSidebarClick: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodUnion<[z.ZodVoid, z.ZodPromise<z.ZodVoid>]>>>;
1653
- /**
1654
- * Route using paths instead of hashes, your server MUST support this
1655
- * @example '/standalone-api-reference/:custom(.*)?'
1656
- * @experimental
1657
- * @default undefined
1658
- */
459
+ }) => Promise<void> | void) | undefined>;
460
+ onShowMore: z.ZodType<((a: string) => Promise<void> | void) | undefined>;
461
+ onSidebarClick: z.ZodType<((a: string) => Promise<void> | void) | undefined>;
1659
462
  pathRouting: z.ZodOptional<z.ZodObject<{
1660
- /** Base path for the API reference */
1661
463
  basePath: z.ZodString;
1662
- }, "strip", z.ZodTypeAny, {
1663
- basePath: string;
1664
- }, {
1665
- basePath: string;
1666
- }>>;
1667
- /**
1668
- * Customize the heading portion of the hash
1669
- * @param heading - The heading object
1670
- * @returns A string ID used to generate the URL hash
1671
- * @default (heading) => `#description/${heading.slug}`
1672
- */
1673
- generateHeadingSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
464
+ }, z.core.$strip>>;
465
+ generateHeadingSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodObject<{
1674
466
  slug: z.ZodDefault<z.ZodString>;
1675
- }, "strip", z.ZodTypeAny, {
1676
- slug: string;
1677
- }, {
1678
- slug?: string | undefined;
1679
- }>], z.ZodUnknown>, z.ZodString>>;
1680
- /**
1681
- * Customize the model portion of the hash
1682
- * @param model - The model object with a name property
1683
- * @returns A string ID used to generate the URL hash
1684
- * @default (model) => slug(model.name)
1685
- */
1686
- generateModelSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
467
+ }, z.core.$strip>], null>, z.ZodString>>;
468
+ generateModelSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodObject<{
1687
469
  name: z.ZodDefault<z.ZodString>;
1688
- }, "strip", z.ZodTypeAny, {
1689
- name: string;
1690
- }, {
1691
- name?: string | undefined;
1692
- }>], z.ZodUnknown>, z.ZodString>>;
1693
- /**
1694
- * Customize the tag portion of the hash
1695
- * @param tag - The tag object
1696
- * @returns A string ID used to generate the URL hash
1697
- * @default (tag) => slug(tag.name)
1698
- */
1699
- generateTagSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
470
+ }, z.core.$strip>], null>, z.ZodString>>;
471
+ generateTagSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodObject<{
1700
472
  name: z.ZodDefault<z.ZodString>;
1701
- }, "strip", z.ZodTypeAny, {
1702
- name: string;
1703
- }, {
1704
- name?: string | undefined;
1705
- }>], z.ZodUnknown>, z.ZodString>>;
1706
- /**
1707
- * Customize the operation portion of the hash
1708
- * @param operation - The operation object
1709
- * @returns A string ID used to generate the URL hash
1710
- * @default (operation) => `${operation.method}${operation.path}`
1711
- */
1712
- generateOperationSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
473
+ }, z.core.$strip>], null>, z.ZodString>>;
474
+ generateOperationSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodObject<{
1713
475
  path: z.ZodString;
1714
476
  operationId: z.ZodOptional<z.ZodString>;
1715
477
  method: z.ZodString;
1716
478
  summary: z.ZodOptional<z.ZodString>;
1717
- }, "strip", z.ZodTypeAny, {
1718
- path: string;
1719
- method: string;
1720
- summary?: string | undefined;
1721
- operationId?: string | undefined;
1722
- }, {
1723
- path: string;
1724
- method: string;
1725
- summary?: string | undefined;
1726
- operationId?: string | undefined;
1727
- }>], z.ZodUnknown>, z.ZodString>>;
1728
- /**
1729
- * Customize the webhook portion of the hash
1730
- * @param webhook - The webhook object
1731
- * @returns A string ID used to generate the URL hash
1732
- * @default (webhook) => slug(webhook.name)
1733
- */
1734
- generateWebhookSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
479
+ }, z.core.$strip>], null>, z.ZodString>>;
480
+ generateWebhookSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodObject<{
1735
481
  name: z.ZodString;
1736
482
  method: z.ZodOptional<z.ZodString>;
1737
- }, "strip", z.ZodTypeAny, {
1738
- name: string;
1739
- method?: string | undefined;
1740
- }, {
1741
- name: string;
1742
- method?: string | undefined;
1743
- }>], z.ZodUnknown>, z.ZodString>>;
1744
- /**
1745
- * To handle redirects, pass a function that will recieve:
1746
- * - The current path with hash if pathRouting is enabled
1747
- * - The current hash if hashRouting (default)
1748
- * And then passes that to history.replaceState
1749
- *
1750
- * @example hashRouting (default)
1751
- * ```ts
1752
- * redirect: (hash: string) => hash.replace('#v1/old-path', '#v2/new-path')
1753
- * ```
1754
- * @example pathRouting
1755
- * ```ts
1756
- * redirect: (pathWithHash: string) => {
1757
- * if (pathWithHash.includes('#')) {
1758
- * return pathWithHash.replace('/v1/tags/user#operation/get-user', '/v1/tags/user/operation/get-user')
1759
- * }
1760
- * return null
1761
- * }
1762
- * ```
1763
- */
1764
- redirect: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
1765
- /**
1766
- * Whether to include default fonts
1767
- * @default true
1768
- */
483
+ }, z.core.$strip>], null>, z.ZodString>>;
484
+ redirect: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodString], null>, z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
1769
485
  withDefaultFonts: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1770
- /**
1771
- * Whether to expand all tags by default
1772
- *
1773
- * Warning this can cause performance issues on big documents
1774
- * @default false
1775
- */
1776
486
  defaultOpenAllTags: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1777
- /**
1778
- * Whether to expand all models by default
1779
- *
1780
- * Warning this can cause performance issues on big documents
1781
- * @default false
1782
- */
1783
487
  expandAllModelSections: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1784
- /**
1785
- * Whether to expand all responses by default
1786
- *
1787
- * Warning this can cause performance issues on big documents
1788
- * @default false
1789
- */
1790
488
  expandAllResponses: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1791
- /**
1792
- * Function to sort tags
1793
- * @default 'alpha' for alphabetical sorting
1794
- */
1795
- tagsSorter: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"alpha">, z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodAny], z.ZodUnknown>, z.ZodNumber>]>>;
1796
- /**
1797
- * Function to sort operations
1798
- * @default 'alpha' for alphabetical sorting
1799
- */
1800
- operationsSorter: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"alpha">, z.ZodLiteral<"method">, z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodAny], z.ZodUnknown>, z.ZodNumber>]>>;
1801
- /**
1802
- * Order the schema properties by
1803
- * @default 'alpha' for alphabetical sorting
1804
- */
1805
- orderSchemaPropertiesBy: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"alpha">, z.ZodLiteral<"preserve">]>>>>;
1806
- /**
1807
- * Sort the schema properties by required ones first
1808
- * @default true
1809
- */
489
+ tagsSorter: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"alpha">, z.ZodFunction<z.ZodTuple<readonly [z.ZodAny, z.ZodAny], null>, z.ZodNumber>]>>;
490
+ operationsSorter: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"alpha">, z.ZodLiteral<"method">, z.ZodFunction<z.ZodTuple<readonly [z.ZodAny, z.ZodAny], null>, z.ZodNumber>]>>;
491
+ orderSchemaPropertiesBy: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"alpha">, z.ZodLiteral<"preserve">]>>>>;
1810
492
  orderRequiredPropertiesFirst: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
1811
- }>, "strip", z.ZodTypeAny, {
493
+ }, z.core.$strip>, z.ZodTransform<{
1812
494
  hideClientButton: boolean;
1813
495
  showSidebar: boolean;
1814
- operationTitleSource: "path" | "summary";
1815
- theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none";
496
+ showToolbar: "never" | "always" | "localhost";
497
+ operationTitleSource: "summary" | "path";
498
+ theme: "default" | "alternate" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none";
1816
499
  persistAuth: boolean;
1817
500
  telemetry: boolean;
1818
501
  layout: "modern" | "classic";
1819
502
  isEditable: boolean;
1820
503
  isLoading: boolean;
1821
504
  hideModels: boolean;
1822
- documentDownloadType: "none" | "yaml" | "json" | "both";
505
+ documentDownloadType: "none" | "yaml" | "json" | "both" | "direct";
1823
506
  hideTestRequestButton: boolean;
1824
507
  hideSearch: boolean;
508
+ showOperationId: boolean;
1825
509
  hideDarkModeToggle: boolean;
510
+ onDocumentSelect: (() => Promise<void> | void) | undefined;
511
+ onLoaded: (() => Promise<void> | void) | undefined;
512
+ onBeforeRequest: ((a: {
513
+ request: Request;
514
+ }) => Promise<void> | void) | undefined;
515
+ onShowMore: ((a: string) => Promise<void> | void) | undefined;
516
+ onSidebarClick: ((a: string) => Promise<void> | void) | undefined;
1826
517
  withDefaultFonts: boolean;
1827
518
  defaultOpenAllTags: boolean;
1828
519
  expandAllModelSections: boolean;
1829
520
  expandAllResponses: boolean;
1830
521
  orderSchemaPropertiesBy: "alpha" | "preserve";
1831
522
  orderRequiredPropertiesFirst: boolean;
1832
- title?: string | undefined;
1833
- onBeforeRequest?: ((args_0: {
1834
- request: Request;
1835
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
1836
- fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
1837
523
  url?: string | undefined;
1838
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
1839
- slug?: string | undefined;
1840
- spec?: {
1841
- title?: string | undefined;
1842
- url?: string | undefined;
1843
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
1844
- slug?: string | undefined;
1845
- } | undefined;
1846
- authentication?: any;
1847
- baseServerURL?: string | undefined;
1848
- proxyUrl?: string | undefined;
1849
- 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;
1850
- servers?: any[] | undefined;
1851
- _integration?: "go" | "rust" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "svelte" | "vue" | null | undefined;
1852
- onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
1853
- plugins?: ((...args: unknown[]) => {
1854
- name: string;
1855
- extensions: {
1856
- name: string;
1857
- component?: unknown;
1858
- renderer?: unknown;
1859
- }[];
1860
- })[] | undefined;
1861
- proxy?: string | undefined;
1862
- hideDownloadButton?: boolean | undefined;
1863
- darkMode?: boolean | undefined;
1864
- forceDarkModeState?: "dark" | "light" | undefined;
1865
- metaData?: any;
1866
- favicon?: string | undefined;
1867
- hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
1868
- defaultHttpClient?: {
1869
- targetKey: "c" | "clojure" | "csharp" | "dart" | "http" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "rust" | "shell" | "swift";
1870
- clientKey: string;
1871
- } | undefined;
1872
- customCss?: string | undefined;
1873
- onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
1874
- onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
1875
- onDocumentSelect?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1876
- onLoaded?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1877
- onShowMore?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
1878
- onSidebarClick?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
1879
- pathRouting?: {
1880
- basePath: string;
1881
- } | undefined;
1882
- generateHeadingSlug?: ((args_0: {
1883
- slug?: string | undefined;
1884
- }, ...args: unknown[]) => string) | undefined;
1885
- generateModelSlug?: ((args_0: {
1886
- name?: string | undefined;
1887
- }, ...args: unknown[]) => string) | undefined;
1888
- generateTagSlug?: ((args_0: {
1889
- name?: string | undefined;
1890
- }, ...args: unknown[]) => string) | undefined;
1891
- generateOperationSlug?: ((args_0: {
1892
- path: string;
1893
- method: string;
1894
- summary?: string | undefined;
1895
- operationId?: string | undefined;
1896
- }, ...args: unknown[]) => string) | undefined;
1897
- generateWebhookSlug?: ((args_0: {
1898
- name: string;
1899
- method?: string | undefined;
1900
- }, ...args: unknown[]) => string) | undefined;
1901
- redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
1902
- tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
1903
- operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
1904
- }, {
524
+ content?: string | Record<string, any> | z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>> | null | undefined;
1905
525
  title?: string | undefined;
1906
- onBeforeRequest?: ((args_0: {
1907
- request: Request;
1908
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
1909
- fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
1910
- url?: string | undefined;
1911
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
1912
526
  slug?: string | undefined;
1913
527
  spec?: {
1914
- title?: string | undefined;
1915
528
  url?: string | undefined;
1916
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
529
+ content?: string | Record<string, any> | z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>> | null | undefined;
530
+ title?: string | undefined;
1917
531
  slug?: string | undefined;
1918
532
  } | undefined;
1919
533
  authentication?: any;
1920
534
  baseServerURL?: string | undefined;
1921
- hideClientButton?: unknown;
1922
535
  proxyUrl?: string | undefined;
1923
536
  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;
1924
537
  servers?: any[] | undefined;
1925
- showSidebar?: unknown;
1926
- operationTitleSource?: unknown;
1927
- theme?: unknown;
1928
538
  _integration?: "go" | "rust" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "svelte" | "vue" | null | undefined;
1929
- onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
1930
- persistAuth?: unknown;
1931
- plugins?: ((...args: unknown[]) => {
1932
- name: string;
1933
- extensions: {
1934
- name: string;
1935
- component?: unknown;
1936
- renderer?: unknown;
1937
- }[];
1938
- })[] | undefined;
1939
- telemetry?: boolean | undefined;
1940
- layout?: unknown;
539
+ onRequestSent?: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [z.ZodString], null>, z.ZodVoid> | undefined;
1941
540
  proxy?: string | undefined;
1942
- isEditable?: unknown;
1943
- isLoading?: unknown;
1944
- hideModels?: unknown;
1945
- documentDownloadType?: unknown;
541
+ fetch?: ((input: string | URL | Request, init?: RequestInit) => Promise<Response>) | undefined;
542
+ plugins?: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodObject<{
543
+ name: z.ZodString;
544
+ extensions: z.ZodArray<z.ZodObject<{
545
+ name: z.ZodString;
546
+ component: z.ZodUnknown;
547
+ renderer: z.ZodOptional<z.ZodUnknown>;
548
+ }, z.core.$strip>>;
549
+ }, z.core.$strip>>[] | undefined;
1946
550
  hideDownloadButton?: boolean | undefined;
1947
- hideTestRequestButton?: unknown;
1948
- hideSearch?: unknown;
1949
551
  darkMode?: boolean | undefined;
1950
552
  forceDarkModeState?: "dark" | "light" | undefined;
1951
- hideDarkModeToggle?: unknown;
1952
553
  metaData?: any;
1953
554
  favicon?: string | undefined;
1954
555
  hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
@@ -1957,184 +558,93 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
1957
558
  clientKey: string;
1958
559
  } | undefined;
1959
560
  customCss?: string | undefined;
1960
- onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
1961
- onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
1962
- onDocumentSelect?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1963
- onLoaded?: ((...args: unknown[]) => void | Promise<void>) | undefined;
1964
- onShowMore?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
1965
- onSidebarClick?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
561
+ onSpecUpdate?: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [z.ZodString], null>, z.ZodVoid> | undefined;
562
+ onServerChange?: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [z.ZodString], null>, z.ZodVoid> | undefined;
1966
563
  pathRouting?: {
1967
564
  basePath: string;
1968
565
  } | undefined;
1969
- generateHeadingSlug?: ((args_0: {
1970
- slug: string;
1971
- }, ...args: unknown[]) => string) | undefined;
1972
- generateModelSlug?: ((args_0: {
1973
- name: string;
1974
- }, ...args: unknown[]) => string) | undefined;
1975
- generateTagSlug?: ((args_0: {
1976
- name: string;
1977
- }, ...args: unknown[]) => string) | undefined;
1978
- generateOperationSlug?: ((args_0: {
1979
- path: string;
1980
- method: string;
1981
- summary?: string | undefined;
1982
- operationId?: string | undefined;
1983
- }, ...args: unknown[]) => string) | undefined;
1984
- generateWebhookSlug?: ((args_0: {
1985
- name: string;
1986
- method?: string | undefined;
1987
- }, ...args: unknown[]) => string) | undefined;
1988
- redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
1989
- withDefaultFonts?: unknown;
1990
- defaultOpenAllTags?: unknown;
1991
- expandAllModelSections?: unknown;
1992
- expandAllResponses?: unknown;
1993
- tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
1994
- operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
1995
- orderSchemaPropertiesBy?: unknown;
1996
- orderRequiredPropertiesFirst?: unknown;
1997
- }>, {
566
+ generateHeadingSlug?: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [z.ZodObject<{
567
+ slug: z.ZodDefault<z.ZodString>;
568
+ }, z.core.$strip>], null>, z.ZodString> | undefined;
569
+ generateModelSlug?: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [z.ZodObject<{
570
+ name: z.ZodDefault<z.ZodString>;
571
+ }, z.core.$strip>], null>, z.ZodString> | undefined;
572
+ generateTagSlug?: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [z.ZodObject<{
573
+ name: z.ZodDefault<z.ZodString>;
574
+ }, z.core.$strip>], null>, z.ZodString> | undefined;
575
+ generateOperationSlug?: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [z.ZodObject<{
576
+ path: z.ZodString;
577
+ operationId: z.ZodOptional<z.ZodString>;
578
+ method: z.ZodString;
579
+ summary: z.ZodOptional<z.ZodString>;
580
+ }, z.core.$strip>], null>, z.ZodString> | undefined;
581
+ generateWebhookSlug?: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [z.ZodObject<{
582
+ name: z.ZodString;
583
+ method: z.ZodOptional<z.ZodString>;
584
+ }, z.core.$strip>], null>, z.ZodString> | undefined;
585
+ redirect?: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [z.ZodString], null>, z.ZodOptional<z.ZodNullable<z.ZodString>>> | undefined;
586
+ tagsSorter?: "alpha" | z.core.$InferOuterFunctionType<z.ZodTuple<readonly [z.ZodAny, z.ZodAny], null>, z.ZodNumber> | undefined;
587
+ operationsSorter?: "method" | "alpha" | z.core.$InferOuterFunctionType<z.ZodTuple<readonly [z.ZodAny, z.ZodAny], null>, z.ZodNumber> | undefined;
588
+ }, {
1998
589
  hideClientButton: boolean;
1999
590
  showSidebar: boolean;
2000
- operationTitleSource: "path" | "summary";
2001
- theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none";
591
+ showToolbar: "never" | "always" | "localhost";
592
+ operationTitleSource: "summary" | "path";
593
+ theme: "default" | "alternate" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none";
2002
594
  persistAuth: boolean;
2003
595
  telemetry: boolean;
2004
596
  layout: "modern" | "classic";
2005
597
  isEditable: boolean;
2006
598
  isLoading: boolean;
2007
599
  hideModels: boolean;
2008
- documentDownloadType: "none" | "yaml" | "json" | "both";
600
+ documentDownloadType: "none" | "yaml" | "json" | "both" | "direct";
2009
601
  hideTestRequestButton: boolean;
2010
602
  hideSearch: boolean;
603
+ showOperationId: boolean;
2011
604
  hideDarkModeToggle: boolean;
605
+ onDocumentSelect: (() => Promise<void> | void) | undefined;
606
+ onLoaded: (() => Promise<void> | void) | undefined;
607
+ onBeforeRequest: ((a: {
608
+ request: Request;
609
+ }) => Promise<void> | void) | undefined;
610
+ onShowMore: ((a: string) => Promise<void> | void) | undefined;
611
+ onSidebarClick: ((a: string) => Promise<void> | void) | undefined;
2012
612
  withDefaultFonts: boolean;
2013
613
  defaultOpenAllTags: boolean;
2014
614
  expandAllModelSections: boolean;
2015
615
  expandAllResponses: boolean;
2016
616
  orderSchemaPropertiesBy: "alpha" | "preserve";
2017
617
  orderRequiredPropertiesFirst: boolean;
2018
- title?: string | undefined;
2019
- onBeforeRequest?: ((args_0: {
2020
- request: Request;
2021
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
2022
- fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
2023
618
  url?: string | undefined;
2024
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
2025
- slug?: string | undefined;
2026
- spec?: {
2027
- title?: string | undefined;
2028
- url?: string | undefined;
2029
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
2030
- slug?: string | undefined;
2031
- } | undefined;
2032
- authentication?: any;
2033
- baseServerURL?: string | undefined;
2034
- proxyUrl?: string | undefined;
2035
- 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;
2036
- servers?: any[] | undefined;
2037
- _integration?: "go" | "rust" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "svelte" | "vue" | null | undefined;
2038
- onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
2039
- plugins?: ((...args: unknown[]) => {
2040
- name: string;
2041
- extensions: {
2042
- name: string;
2043
- component?: unknown;
2044
- renderer?: unknown;
2045
- }[];
2046
- })[] | undefined;
2047
- proxy?: string | undefined;
2048
- hideDownloadButton?: boolean | undefined;
2049
- darkMode?: boolean | undefined;
2050
- forceDarkModeState?: "dark" | "light" | undefined;
2051
- metaData?: any;
2052
- favicon?: string | undefined;
2053
- hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
2054
- defaultHttpClient?: {
2055
- targetKey: "c" | "clojure" | "csharp" | "dart" | "http" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "rust" | "shell" | "swift";
2056
- clientKey: string;
2057
- } | undefined;
2058
- customCss?: string | undefined;
2059
- onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
2060
- onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
2061
- onDocumentSelect?: ((...args: unknown[]) => void | Promise<void>) | undefined;
2062
- onLoaded?: ((...args: unknown[]) => void | Promise<void>) | undefined;
2063
- onShowMore?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
2064
- onSidebarClick?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
2065
- pathRouting?: {
2066
- basePath: string;
2067
- } | undefined;
2068
- generateHeadingSlug?: ((args_0: {
2069
- slug?: string | undefined;
2070
- }, ...args: unknown[]) => string) | undefined;
2071
- generateModelSlug?: ((args_0: {
2072
- name?: string | undefined;
2073
- }, ...args: unknown[]) => string) | undefined;
2074
- generateTagSlug?: ((args_0: {
2075
- name?: string | undefined;
2076
- }, ...args: unknown[]) => string) | undefined;
2077
- generateOperationSlug?: ((args_0: {
2078
- path: string;
2079
- method: string;
2080
- summary?: string | undefined;
2081
- operationId?: string | undefined;
2082
- }, ...args: unknown[]) => string) | undefined;
2083
- generateWebhookSlug?: ((args_0: {
2084
- name: string;
2085
- method?: string | undefined;
2086
- }, ...args: unknown[]) => string) | undefined;
2087
- redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
2088
- tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
2089
- operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
2090
- }, {
619
+ content?: string | Record<string, any> | z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>> | null | undefined;
2091
620
  title?: string | undefined;
2092
- onBeforeRequest?: ((args_0: {
2093
- request: Request;
2094
- }, ...args: unknown[]) => void | Promise<void>) | undefined;
2095
- fetch?: ((args_0: string | Request | URL, args_1: any, ...args: unknown[]) => Promise<Response>) | undefined;
2096
- url?: string | undefined;
2097
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
2098
621
  slug?: string | undefined;
2099
622
  spec?: {
2100
- title?: string | undefined;
2101
623
  url?: string | undefined;
2102
- content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
624
+ content?: string | Record<string, any> | z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>> | null | undefined;
625
+ title?: string | undefined;
2103
626
  slug?: string | undefined;
2104
627
  } | undefined;
2105
628
  authentication?: any;
2106
629
  baseServerURL?: string | undefined;
2107
- hideClientButton?: unknown;
2108
630
  proxyUrl?: string | undefined;
2109
631
  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;
2110
632
  servers?: any[] | undefined;
2111
- showSidebar?: unknown;
2112
- operationTitleSource?: unknown;
2113
- theme?: unknown;
2114
633
  _integration?: "go" | "rust" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "svelte" | "vue" | null | undefined;
2115
- onRequestSent?: ((args_0: string, ...args: unknown[]) => void) | undefined;
2116
- persistAuth?: unknown;
2117
- plugins?: ((...args: unknown[]) => {
2118
- name: string;
2119
- extensions: {
2120
- name: string;
2121
- component?: unknown;
2122
- renderer?: unknown;
2123
- }[];
2124
- })[] | undefined;
2125
- telemetry?: boolean | undefined;
2126
- layout?: unknown;
634
+ onRequestSent?: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [z.ZodString], null>, z.ZodVoid> | undefined;
2127
635
  proxy?: string | undefined;
2128
- isEditable?: unknown;
2129
- isLoading?: unknown;
2130
- hideModels?: unknown;
2131
- documentDownloadType?: unknown;
636
+ fetch?: ((input: string | URL | Request, init?: RequestInit) => Promise<Response>) | undefined;
637
+ plugins?: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodObject<{
638
+ name: z.ZodString;
639
+ extensions: z.ZodArray<z.ZodObject<{
640
+ name: z.ZodString;
641
+ component: z.ZodUnknown;
642
+ renderer: z.ZodOptional<z.ZodUnknown>;
643
+ }, z.core.$strip>>;
644
+ }, z.core.$strip>>[] | undefined;
2132
645
  hideDownloadButton?: boolean | undefined;
2133
- hideTestRequestButton?: unknown;
2134
- hideSearch?: unknown;
2135
646
  darkMode?: boolean | undefined;
2136
647
  forceDarkModeState?: "dark" | "light" | undefined;
2137
- hideDarkModeToggle?: unknown;
2138
648
  metaData?: any;
2139
649
  favicon?: string | undefined;
2140
650
  hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
@@ -2143,44 +653,34 @@ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z
2143
653
  clientKey: string;
2144
654
  } | undefined;
2145
655
  customCss?: string | undefined;
2146
- onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
2147
- onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
2148
- onDocumentSelect?: ((...args: unknown[]) => void | Promise<void>) | undefined;
2149
- onLoaded?: ((...args: unknown[]) => void | Promise<void>) | undefined;
2150
- onShowMore?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
2151
- onSidebarClick?: ((args_0: string, ...args: unknown[]) => void | Promise<void>) | undefined;
656
+ onSpecUpdate?: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [z.ZodString], null>, z.ZodVoid> | undefined;
657
+ onServerChange?: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [z.ZodString], null>, z.ZodVoid> | undefined;
2152
658
  pathRouting?: {
2153
659
  basePath: string;
2154
660
  } | undefined;
2155
- generateHeadingSlug?: ((args_0: {
2156
- slug: string;
2157
- }, ...args: unknown[]) => string) | undefined;
2158
- generateModelSlug?: ((args_0: {
2159
- name: string;
2160
- }, ...args: unknown[]) => string) | undefined;
2161
- generateTagSlug?: ((args_0: {
2162
- name: string;
2163
- }, ...args: unknown[]) => string) | undefined;
2164
- generateOperationSlug?: ((args_0: {
2165
- path: string;
2166
- method: string;
2167
- summary?: string | undefined;
2168
- operationId?: string | undefined;
2169
- }, ...args: unknown[]) => string) | undefined;
2170
- generateWebhookSlug?: ((args_0: {
2171
- name: string;
2172
- method?: string | undefined;
2173
- }, ...args: unknown[]) => string) | undefined;
2174
- redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
2175
- withDefaultFonts?: unknown;
2176
- defaultOpenAllTags?: unknown;
2177
- expandAllModelSections?: unknown;
2178
- expandAllResponses?: unknown;
2179
- tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
2180
- operationsSorter?: "method" | "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
2181
- orderSchemaPropertiesBy?: unknown;
2182
- orderRequiredPropertiesFirst?: unknown;
2183
- }>;
661
+ generateHeadingSlug?: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [z.ZodObject<{
662
+ slug: z.ZodDefault<z.ZodString>;
663
+ }, z.core.$strip>], null>, z.ZodString> | undefined;
664
+ generateModelSlug?: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [z.ZodObject<{
665
+ name: z.ZodDefault<z.ZodString>;
666
+ }, z.core.$strip>], null>, z.ZodString> | undefined;
667
+ generateTagSlug?: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [z.ZodObject<{
668
+ name: z.ZodDefault<z.ZodString>;
669
+ }, z.core.$strip>], null>, z.ZodString> | undefined;
670
+ generateOperationSlug?: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [z.ZodObject<{
671
+ path: z.ZodString;
672
+ operationId: z.ZodOptional<z.ZodString>;
673
+ method: z.ZodString;
674
+ summary: z.ZodOptional<z.ZodString>;
675
+ }, z.core.$strip>], null>, z.ZodString> | undefined;
676
+ generateWebhookSlug?: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [z.ZodObject<{
677
+ name: z.ZodString;
678
+ method: z.ZodOptional<z.ZodString>;
679
+ }, z.core.$strip>], null>, z.ZodString> | undefined;
680
+ redirect?: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [z.ZodString], null>, z.ZodOptional<z.ZodNullable<z.ZodString>>> | undefined;
681
+ tagsSorter?: "alpha" | z.core.$InferOuterFunctionType<z.ZodTuple<readonly [z.ZodAny, z.ZodAny], null>, z.ZodNumber> | undefined;
682
+ operationsSorter?: "method" | "alpha" | z.core.$InferOuterFunctionType<z.ZodTuple<readonly [z.ZodAny, z.ZodAny], null>, z.ZodNumber> | undefined;
683
+ }>>;
2184
684
  /** Configuration after parsing, this is the main type */
2185
685
  export type ApiReferenceConfiguration = Omit<z.infer<typeof _apiReferenceConfigurationSchema>, 'proxy' | 'spec' | 'authentication'> & {
2186
686
  authentication?: AuthenticationConfiguration;