@scalar/types 0.0.36 → 0.0.37

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @scalar/types
2
2
 
3
+ ## 0.0.37
4
+
5
+ ### Patch Changes
6
+
7
+ - 89d8b75: feat: new ApiReferenceConfiguration type
8
+ - 8a04b8d: fix: adds vendor specific mime type support
9
+ - @scalar/openapi-types@0.1.9
10
+
3
11
  ## 0.0.36
4
12
 
5
13
  ### Patch Changes
@@ -0,0 +1,578 @@
1
+ import { z } from 'zod';
2
+ /** Configuration for the Api Client */
3
+ export declare const apiClientConfigurationSchema: z.ZodObject<{
4
+ /** Prefill authentication */
5
+ authentication: z.ZodOptional<z.ZodAny>;
6
+ /** Base URL for the API server */
7
+ baseServerURL: z.ZodOptional<z.ZodString>;
8
+ /**
9
+ * Whether to hide the client button
10
+ * @default false
11
+ */
12
+ hideClientButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
13
+ /** URL to a request proxy for the API client */
14
+ proxyUrl: z.ZodOptional<z.ZodString>;
15
+ /** Key used with CTRL/CMD to open the search modal (defaults to 'k' e.g. CMD+k) */
16
+ 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"]>>;
17
+ /** List of OpenAPI server objects */
18
+ servers: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
19
+ /**
20
+ * Whether to show the sidebar
21
+ * @default true
22
+ */
23
+ showSidebar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
24
+ /** The Swagger/OpenAPI spec to render */
25
+ spec: z.ZodOptional<z.ZodObject<{
26
+ /** URL to an OpenAPI/Swagger document */
27
+ url: z.ZodOptional<z.ZodString>;
28
+ /**
29
+ * Directly embed the OpenAPI document.
30
+ * Can be a string, object, function returning an object, or null.
31
+ * @remarks It's recommended to pass a URL instead of content.
32
+ */
33
+ 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]>>;
34
+ }, "strip", z.ZodTypeAny, {
35
+ url?: string | undefined;
36
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
37
+ }, {
38
+ url?: string | undefined;
39
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
40
+ }>>;
41
+ /** A string to use one of the color presets */
42
+ theme: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["alternate", "default", "moon", "purple", "solarized", "bluePlanet", "deepSpace", "saturn", "kepler", "elysiajs", "fastify", "mars", "none"]>>>>;
43
+ /** Integration type identifier */
44
+ _integration: z.ZodOptional<z.ZodNullable<z.ZodEnum<["adonisjs", "docusaurus", "dotnet", "elysiajs", "express", "fastapi", "fastify", "go", "hono", "html", "laravel", "litestar", "nestjs", "nextjs", "nitro", "nuxt", "platformatic", "react", "rust", "vue"]>>>;
45
+ }, "strip", z.ZodTypeAny, {
46
+ hideClientButton: boolean;
47
+ showSidebar: boolean;
48
+ theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "none";
49
+ servers?: any[] | undefined;
50
+ authentication?: any;
51
+ baseServerURL?: string | undefined;
52
+ proxyUrl?: string | undefined;
53
+ searchHotKey?: "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
54
+ spec?: {
55
+ url?: string | undefined;
56
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
57
+ } | undefined;
58
+ _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
59
+ }, {
60
+ servers?: any[] | undefined;
61
+ authentication?: any;
62
+ baseServerURL?: string | undefined;
63
+ hideClientButton?: unknown;
64
+ proxyUrl?: string | undefined;
65
+ searchHotKey?: "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
66
+ showSidebar?: unknown;
67
+ spec?: {
68
+ url?: string | undefined;
69
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
70
+ } | undefined;
71
+ theme?: unknown;
72
+ _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
73
+ }>;
74
+ export type ApiClientConfiguration = z.infer<typeof apiClientConfigurationSchema>;
75
+ /** Configuration for the Api Reference */
76
+ export declare const apiReferenceConfigurationSchema: z.ZodEffects<z.ZodObject<z.objectUtil.extendShape<{
77
+ /** Prefill authentication */
78
+ authentication: z.ZodOptional<z.ZodAny>;
79
+ /** Base URL for the API server */
80
+ baseServerURL: z.ZodOptional<z.ZodString>;
81
+ /**
82
+ * Whether to hide the client button
83
+ * @default false
84
+ */
85
+ hideClientButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
86
+ /** URL to a request proxy for the API client */
87
+ proxyUrl: z.ZodOptional<z.ZodString>;
88
+ /** Key used with CTRL/CMD to open the search modal (defaults to 'k' e.g. CMD+k) */
89
+ 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"]>>;
90
+ /** List of OpenAPI server objects */
91
+ servers: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
92
+ /**
93
+ * Whether to show the sidebar
94
+ * @default true
95
+ */
96
+ showSidebar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
97
+ /** The Swagger/OpenAPI spec to render */
98
+ spec: z.ZodOptional<z.ZodObject<{
99
+ /** URL to an OpenAPI/Swagger document */
100
+ url: z.ZodOptional<z.ZodString>;
101
+ /**
102
+ * Directly embed the OpenAPI document.
103
+ * Can be a string, object, function returning an object, or null.
104
+ * @remarks It's recommended to pass a URL instead of content.
105
+ */
106
+ 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]>>;
107
+ }, "strip", z.ZodTypeAny, {
108
+ url?: string | undefined;
109
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
110
+ }, {
111
+ url?: string | undefined;
112
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
113
+ }>>;
114
+ /** A string to use one of the color presets */
115
+ theme: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["alternate", "default", "moon", "purple", "solarized", "bluePlanet", "deepSpace", "saturn", "kepler", "elysiajs", "fastify", "mars", "none"]>>>>;
116
+ /** Integration type identifier */
117
+ _integration: z.ZodOptional<z.ZodNullable<z.ZodEnum<["adonisjs", "docusaurus", "dotnet", "elysiajs", "express", "fastapi", "fastify", "go", "hono", "html", "laravel", "litestar", "nestjs", "nextjs", "nitro", "nuxt", "platformatic", "react", "rust", "vue"]>>>;
118
+ }, {
119
+ /**
120
+ * The layout to use for the references
121
+ * @default 'modern'
122
+ */
123
+ layout: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["modern", "classic"]>>>>;
124
+ /**
125
+ * URL to a request proxy for the API client
126
+ * @deprecated Use proxyUrl instead
127
+ */
128
+ proxy: z.ZodOptional<z.ZodString>;
129
+ /**
130
+ * Whether the spec input should show
131
+ * @default false
132
+ */
133
+ isEditable: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
134
+ /**
135
+ * Whether to show models in the sidebar, search, and content.
136
+ * @default false
137
+ */
138
+ hideModels: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
139
+ /**
140
+ * Whether to show the "Download OpenAPI Document" button
141
+ * @default false
142
+ */
143
+ hideDownloadButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
144
+ /**
145
+ * Whether to show the "Test Request" button
146
+ * @default false
147
+ */
148
+ hideTestRequestButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
149
+ /**
150
+ * Whether to show the sidebar search bar
151
+ * @default false
152
+ */
153
+ hideSearch: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
154
+ /** Whether dark mode is on or off initially (light mode) */
155
+ darkMode: z.ZodOptional<z.ZodBoolean>;
156
+ /** forceDarkModeState makes it always this state no matter what */
157
+ forceDarkModeState: z.ZodOptional<z.ZodEnum<["dark", "light"]>>;
158
+ /**
159
+ * Whether to show the dark mode toggle
160
+ * @default false
161
+ */
162
+ hideDarkModeToggle: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
163
+ /**
164
+ * If used, passed data will be added to the HTML header
165
+ * @see https://unhead.unjs.io/usage/composables/use-seo-meta
166
+ */
167
+ metaData: z.ZodOptional<z.ZodAny>;
168
+ /**
169
+ * Path to a favicon image
170
+ * @default undefined
171
+ * @example '/favicon.svg'
172
+ */
173
+ favicon: z.ZodOptional<z.ZodString>;
174
+ /**
175
+ * List of httpsnippet clients to hide from the clients menu
176
+ * By default hides Unirest, pass `[]` to show all clients
177
+ */
178
+ hiddenClients: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>, z.ZodArray<z.ZodString, "many">]>>;
179
+ /** Determine the HTTP client that's selected by default */
180
+ defaultHttpClient: z.ZodOptional<z.ZodObject<{
181
+ targetKey: z.ZodType<"c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart", z.ZodTypeDef, "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart">;
182
+ clientKey: z.ZodString;
183
+ }, "strip", z.ZodTypeAny, {
184
+ targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
185
+ clientKey: string;
186
+ }, {
187
+ targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
188
+ clientKey: string;
189
+ }>>;
190
+ /** Custom CSS to be added to the page */
191
+ customCss: z.ZodOptional<z.ZodString>;
192
+ /** onSpecUpdate is fired on spec/swagger content change */
193
+ onSpecUpdate: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
194
+ /** onServerChange is fired on selected server change */
195
+ onServerChange: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodVoid>>;
196
+ /**
197
+ * Route using paths instead of hashes, your server MUST support this
198
+ * @example '/standalone-api-reference/:custom(.*)?'
199
+ * @experimental
200
+ * @default undefined
201
+ */
202
+ pathRouting: z.ZodOptional<z.ZodObject<{
203
+ /** Base path for the API reference */
204
+ basePath: z.ZodString;
205
+ }, "strip", z.ZodTypeAny, {
206
+ basePath: string;
207
+ }, {
208
+ basePath: string;
209
+ }>>;
210
+ /**
211
+ * Customize the heading portion of the hash
212
+ * @param heading - The heading object
213
+ * @returns A string ID used to generate the URL hash
214
+ * @default (heading) => `#description/${heading.slug}`
215
+ */
216
+ generateHeadingSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
217
+ slug: z.ZodDefault<z.ZodString>;
218
+ }, "strip", z.ZodTypeAny, {
219
+ slug: string;
220
+ }, {
221
+ slug?: string | undefined;
222
+ }>], z.ZodUnknown>, z.ZodString>>;
223
+ /**
224
+ * Customize the model portion of the hash
225
+ * @param model - The model object with a name property
226
+ * @returns A string ID used to generate the URL hash
227
+ * @default (model) => slug(model.name)
228
+ */
229
+ generateModelSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
230
+ name: z.ZodDefault<z.ZodString>;
231
+ }, "strip", z.ZodTypeAny, {
232
+ name: string;
233
+ }, {
234
+ name?: string | undefined;
235
+ }>], z.ZodUnknown>, z.ZodString>>;
236
+ /**
237
+ * Customize the tag portion of the hash
238
+ * @param tag - The tag object
239
+ * @returns A string ID used to generate the URL hash
240
+ * @default (tag) => slug(tag.name)
241
+ */
242
+ generateTagSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
243
+ name: z.ZodDefault<z.ZodString>;
244
+ }, "strip", z.ZodTypeAny, {
245
+ name: string;
246
+ }, {
247
+ name?: string | undefined;
248
+ }>], z.ZodUnknown>, z.ZodString>>;
249
+ /**
250
+ * Customize the operation portion of the hash
251
+ * @param operation - The operation object
252
+ * @returns A string ID used to generate the URL hash
253
+ * @default (operation) => `${operation.method}${operation.path}`
254
+ */
255
+ generateOperationSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
256
+ path: z.ZodString;
257
+ operationId: z.ZodOptional<z.ZodString>;
258
+ method: z.ZodString;
259
+ summary: z.ZodOptional<z.ZodString>;
260
+ }, "strip", z.ZodTypeAny, {
261
+ method: string;
262
+ path: string;
263
+ summary?: string | undefined;
264
+ operationId?: string | undefined;
265
+ }, {
266
+ method: string;
267
+ path: string;
268
+ summary?: string | undefined;
269
+ operationId?: string | undefined;
270
+ }>], z.ZodUnknown>, z.ZodString>>;
271
+ /**
272
+ * Customize the webhook portion of the hash
273
+ * @param webhook - The webhook object
274
+ * @returns A string ID used to generate the URL hash
275
+ * @default (webhook) => slug(webhook.name)
276
+ */
277
+ generateWebhookSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
278
+ name: z.ZodString;
279
+ method: z.ZodOptional<z.ZodString>;
280
+ }, "strip", z.ZodTypeAny, {
281
+ name: string;
282
+ method?: string | undefined;
283
+ }, {
284
+ name: string;
285
+ method?: string | undefined;
286
+ }>], z.ZodUnknown>, z.ZodString>>;
287
+ /** Callback fired when the reference is fully loaded */
288
+ onLoaded: z.ZodOptional<z.ZodUnion<[z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodVoid>, z.ZodUndefined]>>;
289
+ /**
290
+ * To handle redirects, pass a function that will recieve:
291
+ * - The current path with hash if pathRouting is enabled
292
+ * - The current hash if hashRouting (default)
293
+ * And then passes that to history.replaceState
294
+ *
295
+ * @example hashRouting (default)
296
+ * ```ts
297
+ * redirect: (hash: string) => hash.replace('#v1/old-path', '#v2/new-path')
298
+ * ```
299
+ * @example pathRouting
300
+ * ```ts
301
+ * redirect: (pathWithHash: string) => {
302
+ * if (pathWithHash.includes('#')) {
303
+ * return pathWithHash.replace('/v1/tags/user#operation/get-user', '/v1/tags/user/operation/get-user')
304
+ * }
305
+ * return null
306
+ * }
307
+ * ```
308
+ */
309
+ redirect: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
310
+ /**
311
+ * Whether to include default fonts
312
+ * @default true
313
+ */
314
+ withDefaultFonts: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
315
+ /** Whether to expand all tags by default */
316
+ defaultOpenAllTags: z.ZodOptional<z.ZodBoolean>;
317
+ /**
318
+ * Function to sort tags
319
+ * @default 'alpha' for alphabetical sorting
320
+ */
321
+ tagsSorter: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"alpha">, z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodAny], z.ZodUnknown>, z.ZodNumber>]>>;
322
+ /**
323
+ * Function to sort operations
324
+ * @default 'alpha' for alphabetical sorting
325
+ */
326
+ operationsSorter: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"alpha">, z.ZodLiteral<"method">, z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodAny], z.ZodUnknown>, z.ZodNumber>]>>;
327
+ }>, "strip", z.ZodTypeAny, {
328
+ hideClientButton: boolean;
329
+ showSidebar: boolean;
330
+ theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "none";
331
+ layout: "modern" | "classic";
332
+ isEditable: boolean;
333
+ hideModels: boolean;
334
+ hideDownloadButton: boolean;
335
+ hideTestRequestButton: boolean;
336
+ hideSearch: boolean;
337
+ hideDarkModeToggle: boolean;
338
+ withDefaultFonts: boolean;
339
+ servers?: any[] | undefined;
340
+ authentication?: any;
341
+ baseServerURL?: string | undefined;
342
+ proxyUrl?: string | undefined;
343
+ searchHotKey?: "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
344
+ spec?: {
345
+ url?: string | undefined;
346
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
347
+ } | undefined;
348
+ _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
349
+ proxy?: string | undefined;
350
+ darkMode?: boolean | undefined;
351
+ forceDarkModeState?: "dark" | "light" | undefined;
352
+ metaData?: any;
353
+ favicon?: string | undefined;
354
+ hiddenClients?: string[] | Record<string, boolean | string[]> | undefined;
355
+ defaultHttpClient?: {
356
+ targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
357
+ clientKey: string;
358
+ } | undefined;
359
+ customCss?: string | undefined;
360
+ onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
361
+ onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
362
+ pathRouting?: {
363
+ basePath: string;
364
+ } | undefined;
365
+ generateHeadingSlug?: ((args_0: {
366
+ slug?: string | undefined;
367
+ }, ...args: unknown[]) => string) | undefined;
368
+ generateModelSlug?: ((args_0: {
369
+ name?: string | undefined;
370
+ }, ...args: unknown[]) => string) | undefined;
371
+ generateTagSlug?: ((args_0: {
372
+ name?: string | undefined;
373
+ }, ...args: unknown[]) => string) | undefined;
374
+ generateOperationSlug?: ((args_0: {
375
+ method: string;
376
+ path: string;
377
+ summary?: string | undefined;
378
+ operationId?: string | undefined;
379
+ }, ...args: unknown[]) => string) | undefined;
380
+ generateWebhookSlug?: ((args_0: {
381
+ name: string;
382
+ method?: string | undefined;
383
+ }, ...args: unknown[]) => string) | undefined;
384
+ onLoaded?: ((...args: unknown[]) => void) | undefined;
385
+ redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
386
+ defaultOpenAllTags?: boolean | undefined;
387
+ tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
388
+ operationsSorter?: "alpha" | "method" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
389
+ }, {
390
+ servers?: any[] | undefined;
391
+ authentication?: any;
392
+ baseServerURL?: string | undefined;
393
+ hideClientButton?: unknown;
394
+ proxyUrl?: string | undefined;
395
+ searchHotKey?: "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
396
+ showSidebar?: unknown;
397
+ spec?: {
398
+ url?: string | undefined;
399
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
400
+ } | undefined;
401
+ theme?: unknown;
402
+ _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
403
+ layout?: unknown;
404
+ proxy?: string | undefined;
405
+ isEditable?: unknown;
406
+ hideModels?: unknown;
407
+ hideDownloadButton?: unknown;
408
+ hideTestRequestButton?: unknown;
409
+ hideSearch?: unknown;
410
+ darkMode?: boolean | undefined;
411
+ forceDarkModeState?: "dark" | "light" | undefined;
412
+ hideDarkModeToggle?: unknown;
413
+ metaData?: any;
414
+ favicon?: string | undefined;
415
+ hiddenClients?: string[] | Record<string, boolean | string[]> | undefined;
416
+ defaultHttpClient?: {
417
+ targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
418
+ clientKey: string;
419
+ } | undefined;
420
+ customCss?: string | undefined;
421
+ onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
422
+ onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
423
+ pathRouting?: {
424
+ basePath: string;
425
+ } | undefined;
426
+ generateHeadingSlug?: ((args_0: {
427
+ slug: string;
428
+ }, ...args: unknown[]) => string) | undefined;
429
+ generateModelSlug?: ((args_0: {
430
+ name: string;
431
+ }, ...args: unknown[]) => string) | undefined;
432
+ generateTagSlug?: ((args_0: {
433
+ name: string;
434
+ }, ...args: unknown[]) => string) | undefined;
435
+ generateOperationSlug?: ((args_0: {
436
+ method: string;
437
+ path: string;
438
+ summary?: string | undefined;
439
+ operationId?: string | undefined;
440
+ }, ...args: unknown[]) => string) | undefined;
441
+ generateWebhookSlug?: ((args_0: {
442
+ name: string;
443
+ method?: string | undefined;
444
+ }, ...args: unknown[]) => string) | undefined;
445
+ onLoaded?: ((...args: unknown[]) => void) | undefined;
446
+ redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
447
+ withDefaultFonts?: unknown;
448
+ defaultOpenAllTags?: boolean | undefined;
449
+ tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
450
+ operationsSorter?: "alpha" | "method" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
451
+ }>, {
452
+ hideClientButton: boolean;
453
+ showSidebar: boolean;
454
+ theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "none";
455
+ layout: "modern" | "classic";
456
+ isEditable: boolean;
457
+ hideModels: boolean;
458
+ hideDownloadButton: boolean;
459
+ hideTestRequestButton: boolean;
460
+ hideSearch: boolean;
461
+ hideDarkModeToggle: boolean;
462
+ withDefaultFonts: boolean;
463
+ servers?: any[] | undefined;
464
+ authentication?: any;
465
+ baseServerURL?: string | undefined;
466
+ proxyUrl?: string | undefined;
467
+ searchHotKey?: "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
468
+ spec?: {
469
+ url?: string | undefined;
470
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
471
+ } | undefined;
472
+ _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
473
+ proxy?: string | undefined;
474
+ darkMode?: boolean | undefined;
475
+ forceDarkModeState?: "dark" | "light" | undefined;
476
+ metaData?: any;
477
+ favicon?: string | undefined;
478
+ hiddenClients?: string[] | Record<string, boolean | string[]> | undefined;
479
+ defaultHttpClient?: {
480
+ targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
481
+ clientKey: string;
482
+ } | undefined;
483
+ customCss?: string | undefined;
484
+ onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
485
+ onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
486
+ pathRouting?: {
487
+ basePath: string;
488
+ } | undefined;
489
+ generateHeadingSlug?: ((args_0: {
490
+ slug?: string | undefined;
491
+ }, ...args: unknown[]) => string) | undefined;
492
+ generateModelSlug?: ((args_0: {
493
+ name?: string | undefined;
494
+ }, ...args: unknown[]) => string) | undefined;
495
+ generateTagSlug?: ((args_0: {
496
+ name?: string | undefined;
497
+ }, ...args: unknown[]) => string) | undefined;
498
+ generateOperationSlug?: ((args_0: {
499
+ method: string;
500
+ path: string;
501
+ summary?: string | undefined;
502
+ operationId?: string | undefined;
503
+ }, ...args: unknown[]) => string) | undefined;
504
+ generateWebhookSlug?: ((args_0: {
505
+ name: string;
506
+ method?: string | undefined;
507
+ }, ...args: unknown[]) => string) | undefined;
508
+ onLoaded?: ((...args: unknown[]) => void) | undefined;
509
+ redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
510
+ defaultOpenAllTags?: boolean | undefined;
511
+ tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
512
+ operationsSorter?: "alpha" | "method" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
513
+ }, {
514
+ servers?: any[] | undefined;
515
+ authentication?: any;
516
+ baseServerURL?: string | undefined;
517
+ hideClientButton?: unknown;
518
+ proxyUrl?: string | undefined;
519
+ searchHotKey?: "c" | "r" | "a" | "b" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | undefined;
520
+ showSidebar?: unknown;
521
+ spec?: {
522
+ url?: string | undefined;
523
+ content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
524
+ } | undefined;
525
+ theme?: unknown;
526
+ _integration?: "go" | "elysiajs" | "fastify" | "adonisjs" | "docusaurus" | "dotnet" | "express" | "fastapi" | "hono" | "html" | "laravel" | "litestar" | "nestjs" | "nextjs" | "nitro" | "nuxt" | "platformatic" | "react" | "rust" | "vue" | null | undefined;
527
+ layout?: unknown;
528
+ proxy?: string | undefined;
529
+ isEditable?: unknown;
530
+ hideModels?: unknown;
531
+ hideDownloadButton?: unknown;
532
+ hideTestRequestButton?: unknown;
533
+ hideSearch?: unknown;
534
+ darkMode?: boolean | undefined;
535
+ forceDarkModeState?: "dark" | "light" | undefined;
536
+ hideDarkModeToggle?: unknown;
537
+ metaData?: any;
538
+ favicon?: string | undefined;
539
+ hiddenClients?: string[] | Record<string, boolean | string[]> | undefined;
540
+ defaultHttpClient?: {
541
+ targetKey: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
542
+ clientKey: string;
543
+ } | undefined;
544
+ customCss?: string | undefined;
545
+ onSpecUpdate?: ((args_0: string, ...args: unknown[]) => void) | undefined;
546
+ onServerChange?: ((args_0: string, ...args: unknown[]) => void) | undefined;
547
+ pathRouting?: {
548
+ basePath: string;
549
+ } | undefined;
550
+ generateHeadingSlug?: ((args_0: {
551
+ slug: string;
552
+ }, ...args: unknown[]) => string) | undefined;
553
+ generateModelSlug?: ((args_0: {
554
+ name: string;
555
+ }, ...args: unknown[]) => string) | undefined;
556
+ generateTagSlug?: ((args_0: {
557
+ name: string;
558
+ }, ...args: unknown[]) => string) | undefined;
559
+ generateOperationSlug?: ((args_0: {
560
+ method: string;
561
+ path: string;
562
+ summary?: string | undefined;
563
+ operationId?: string | undefined;
564
+ }, ...args: unknown[]) => string) | undefined;
565
+ generateWebhookSlug?: ((args_0: {
566
+ name: string;
567
+ method?: string | undefined;
568
+ }, ...args: unknown[]) => string) | undefined;
569
+ onLoaded?: ((...args: unknown[]) => void) | undefined;
570
+ redirect?: ((args_0: string, ...args: unknown[]) => string | null | undefined) | undefined;
571
+ withDefaultFonts?: unknown;
572
+ defaultOpenAllTags?: boolean | undefined;
573
+ tagsSorter?: "alpha" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
574
+ operationsSorter?: "alpha" | "method" | ((args_0: any, args_1: any, ...args: unknown[]) => number) | undefined;
575
+ }>;
576
+ /** Configuration after parsing, this is the main type */
577
+ export type ApiReferenceConfiguration = Omit<z.infer<typeof apiReferenceConfigurationSchema>, 'proxy'>;
578
+ //# sourceMappingURL=api-reference-configuration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-reference-configuration.d.ts","sourceRoot":"","sources":["../../src/api-reference/api-reference-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAgGvB,uCAAuC;AACvC,eAAO,MAAM,4BAA4B;IACvC,6BAA6B;;IAE7B,kCAAkC;;IAElC;;;OAGG;;IAEH,gDAAgD;;IAEhD,mFAAmF;;IAEnF,qCAAqC;;IAErC;;;OAGG;;IAEH,yCAAyC;;QAtCzC,yCAAyC;;QAEzC;;;;WAIG;;;;;;;;;IAkCH,+CAA+C;;IAE/C,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAElC,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAKjF,0CAA0C;AAC1C,eAAO,MAAM,+BAA+B;IAlC1C,6BAA6B;;IAE7B,kCAAkC;;IAElC;;;OAGG;;IAEH,gDAAgD;;IAEhD,mFAAmF;;IAEnF,qCAAqC;;IAErC;;;OAGG;;IAEH,yCAAyC;;QAtCzC,yCAAyC;;QAEzC;;;;WAIG;;;;;;;;;IAkCH,+CAA+C;;IAE/C,kCAAkC;;;IAa9B;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH,4DAA4D;;IAE5D,mEAAmE;;IAEnE;;;OAGG;;IAEH;;;OAGG;;IAEH;;;;OAIG;;IAEH;;;OAGG;;IAEH,2DAA2D;;;;;;;;;;;IAO3D,yCAAyC;;IAEzC,2DAA2D;;IAE3D,wDAAwD;;IAExD;;;;;OAKG;;QAzHP,sCAAsC;;;;;;;IA2HlC;;;;;OAKG;;;;;;;;IAMH;;;;;OAKG;;;;;;;;IAMH;;;;;OAKG;;;;;;;;IAMH;;;;;OAKG;;;;;;;;;;;;;;;;;IAaH;;;;;OAKG;;;;;;;;;;;IAWH,wDAAwD;;IAExD;;;;;;;;;;;;;;;;;;;OAmBG;;IAEH;;;OAGG;;IAEH,4CAA4C;;IAE5C;;;OAGG;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsCL,CAAA;AAEJ,yDAAyD;AACzD,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC1C,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,EAE/C,OAAO,CACR,CAAA"}