@scalar/types 0.2.16 → 0.3.1
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 +19 -0
- package/dist/api-reference/api-client-configuration.d.ts +122 -0
- package/dist/api-reference/api-client-configuration.d.ts.map +1 -0
- package/dist/api-reference/api-client-configuration.js +7 -0
- package/dist/api-reference/api-client-configuration.js.map +7 -0
- package/dist/api-reference/api-client-plugin.d.ts +39 -0
- package/dist/api-reference/api-client-plugin.d.ts.map +1 -0
- package/dist/api-reference/api-client-plugin.js +34 -0
- package/dist/api-reference/api-client-plugin.js.map +7 -0
- package/dist/api-reference/api-reference-configuration.d.ts +177 -2144
- package/dist/api-reference/api-reference-configuration.d.ts.map +1 -1
- package/dist/api-reference/api-reference-configuration.js +263 -440
- package/dist/api-reference/api-reference-configuration.js.map +2 -2
- package/dist/api-reference/api-reference-plugin.d.ts +7 -65
- package/dist/api-reference/api-reference-plugin.d.ts.map +1 -1
- package/dist/api-reference/api-reference-plugin.js +8 -7
- package/dist/api-reference/api-reference-plugin.js.map +2 -2
- package/dist/api-reference/base-configuration.d.ts +118 -0
- package/dist/api-reference/base-configuration.d.ts.map +1 -0
- package/dist/api-reference/base-configuration.js +139 -0
- package/dist/api-reference/base-configuration.js.map +7 -0
- package/dist/api-reference/html-rendering-configuration.d.ts +3 -21
- package/dist/api-reference/html-rendering-configuration.d.ts.map +1 -1
- package/dist/api-reference/html-rendering-configuration.js.map +2 -2
- package/dist/api-reference/index.d.ts +6 -3
- package/dist/api-reference/index.d.ts.map +1 -1
- package/dist/api-reference/index.js +12 -3
- package/dist/api-reference/index.js.map +2 -2
- package/dist/api-reference/source-configuration.d.ts +18 -0
- package/dist/api-reference/source-configuration.d.ts.map +1 -0
- package/dist/api-reference/source-configuration.js +87 -0
- package/dist/api-reference/source-configuration.js.map +7 -0
- package/dist/entities/security-scheme.d.ts +220 -1641
- package/dist/entities/security-scheme.d.ts.map +1 -1
- package/dist/entities/security-scheme.js +11 -2
- package/dist/entities/security-scheme.js.map +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +2 -2
- package/dist/snippetz/snippetz.d.ts +9 -3
- package/dist/snippetz/snippetz.d.ts.map +1 -1
- package/dist/snippetz/snippetz.js +1 -0
- package/dist/snippetz/snippetz.js.map +2 -2
- package/package.json +4 -4
- package/dist/api-client/api-client-plugin.d.ts +0 -172
- package/dist/api-client/api-client-plugin.d.ts.map +0 -1
- package/dist/api-client/api-client-plugin.js +0 -33
- package/dist/api-client/api-client-plugin.js.map +0 -7
- package/dist/api-client/index.d.ts +0 -2
- package/dist/api-client/index.d.ts.map +0 -1
- package/dist/api-client/index.js +0 -6
- package/dist/api-client/index.js.map +0 -7
|
@@ -1,2204 +1,237 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
1
|
+
import { type ZodType, z } from 'zod';
|
|
2
2
|
import type { AuthenticationConfiguration } from './authentication-configuration.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* },
|
|
16
|
-
* }
|
|
17
|
-
*
|
|
18
|
-
* const newConfiguration = {
|
|
19
|
-
* url: 'https://example.com/openapi.json',
|
|
20
|
-
* }
|
|
21
|
-
* ```
|
|
22
|
-
**/
|
|
23
|
-
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
|
-
*/
|
|
53
|
-
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
|
-
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
|
-
}>;
|
|
77
|
-
export type SpecConfiguration = z.infer<typeof specConfigurationSchema>;
|
|
78
|
-
/** Configuration for the Api Client */
|
|
79
|
-
export declare const apiClientConfigurationSchema: z.ZodObject<{
|
|
80
|
-
/**
|
|
81
|
-
* URL to an OpenAPI/Swagger document
|
|
82
|
-
**/
|
|
83
|
-
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
|
-
*/
|
|
3
|
+
import { type SourceConfiguration } from './source-configuration.js';
|
|
4
|
+
/**
|
|
5
|
+
* Standard configuration for the Api Reference.
|
|
6
|
+
*
|
|
7
|
+
* This is used internally to the configure the applications and does not include the sources.
|
|
8
|
+
*
|
|
9
|
+
* Sources should only be specified in the user facing configurations.
|
|
10
|
+
*
|
|
11
|
+
* In the the future it is likely sources will be removed completely from the configuration and instead
|
|
12
|
+
* specified through a separate addDocument interface.
|
|
13
|
+
*/
|
|
14
|
+
export declare const apiReferenceConfigurationSchema: z.ZodObject<{
|
|
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
|
-
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
|
-
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
|
-
*/
|
|
161
|
-
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
|
-
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 */
|
|
186
17
|
authentication: z.ZodOptional<z.ZodAny>;
|
|
187
|
-
/** Base URL for the API server */
|
|
188
18
|
baseServerURL: z.ZodOptional<z.ZodString>;
|
|
189
|
-
/**
|
|
190
|
-
* Whether to hide the client button
|
|
191
|
-
* @default false
|
|
192
|
-
*/
|
|
193
19
|
hideClientButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
194
|
-
/** URL to a request proxy for the API client */
|
|
195
20
|
proxyUrl: z.ZodOptional<z.ZodString>;
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
title: z.ZodOptional<z.ZodString>;
|
|
224
|
-
component: z.ZodUnknown;
|
|
225
|
-
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">>;
|
|
235
|
-
'response.section': z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
236
|
-
title: z.ZodOptional<z.ZodString>;
|
|
237
|
-
component: z.ZodUnknown;
|
|
238
|
-
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
|
-
}>>;
|
|
271
|
-
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>;
|
|
281
|
-
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*/
|
|
354
|
-
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
|
-
}>;
|
|
452
|
-
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
|
-
/** 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
|
-
**/
|
|
459
|
-
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
|
-
*/
|
|
472
|
-
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
|
-
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
|
-
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
|
-
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
|
-
*/
|
|
537
|
-
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
|
-
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;
|
|
21
|
+
searchHotKey: z.ZodOptional<z.ZodEnum<{
|
|
22
|
+
a: "a";
|
|
23
|
+
b: "b";
|
|
24
|
+
c: "c";
|
|
25
|
+
d: "d";
|
|
26
|
+
e: "e";
|
|
27
|
+
f: "f";
|
|
28
|
+
g: "g";
|
|
29
|
+
h: "h";
|
|
30
|
+
i: "i";
|
|
31
|
+
j: "j";
|
|
32
|
+
k: "k";
|
|
33
|
+
l: "l";
|
|
34
|
+
m: "m";
|
|
35
|
+
n: "n";
|
|
36
|
+
o: "o";
|
|
37
|
+
p: "p";
|
|
38
|
+
q: "q";
|
|
39
|
+
r: "r";
|
|
40
|
+
s: "s";
|
|
41
|
+
t: "t";
|
|
42
|
+
u: "u";
|
|
43
|
+
v: "v";
|
|
44
|
+
w: "w";
|
|
45
|
+
x: "x";
|
|
46
|
+
y: "y";
|
|
47
|
+
z: "z";
|
|
560
48
|
}>>;
|
|
561
|
-
|
|
562
|
-
authentication: z.ZodOptional<z.ZodAny>;
|
|
563
|
-
/** Base URL for the API server */
|
|
564
|
-
baseServerURL: z.ZodOptional<z.ZodString>;
|
|
565
|
-
/**
|
|
566
|
-
* Whether to hide the client button
|
|
567
|
-
* @default false
|
|
568
|
-
*/
|
|
569
|
-
hideClientButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
570
|
-
/** URL to a request proxy for the API client */
|
|
571
|
-
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
|
-
*/
|
|
49
|
+
servers: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
580
50
|
showSidebar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
51
|
+
showToolbar: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
52
|
+
never: "never";
|
|
53
|
+
always: "always";
|
|
54
|
+
localhost: "localhost";
|
|
55
|
+
}>>>>;
|
|
56
|
+
operationTitleSource: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
57
|
+
summary: "summary";
|
|
58
|
+
path: "path";
|
|
59
|
+
}>>>>;
|
|
60
|
+
theme: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
61
|
+
default: "default";
|
|
62
|
+
alternate: "alternate";
|
|
63
|
+
moon: "moon";
|
|
64
|
+
purple: "purple";
|
|
65
|
+
solarized: "solarized";
|
|
66
|
+
bluePlanet: "bluePlanet";
|
|
67
|
+
deepSpace: "deepSpace";
|
|
68
|
+
saturn: "saturn";
|
|
69
|
+
kepler: "kepler";
|
|
70
|
+
elysiajs: "elysiajs";
|
|
71
|
+
fastify: "fastify";
|
|
72
|
+
mars: "mars";
|
|
73
|
+
laserwave: "laserwave";
|
|
74
|
+
none: "none";
|
|
75
|
+
}>>>>;
|
|
76
|
+
_integration: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
77
|
+
elysiajs: "elysiajs";
|
|
78
|
+
fastify: "fastify";
|
|
79
|
+
adonisjs: "adonisjs";
|
|
80
|
+
docusaurus: "docusaurus";
|
|
81
|
+
dotnet: "dotnet";
|
|
82
|
+
express: "express";
|
|
83
|
+
fastapi: "fastapi";
|
|
84
|
+
go: "go";
|
|
85
|
+
hono: "hono";
|
|
86
|
+
html: "html";
|
|
87
|
+
laravel: "laravel";
|
|
88
|
+
litestar: "litestar";
|
|
89
|
+
nestjs: "nestjs";
|
|
90
|
+
nextjs: "nextjs";
|
|
91
|
+
nitro: "nitro";
|
|
92
|
+
nuxt: "nuxt";
|
|
93
|
+
platformatic: "platformatic";
|
|
94
|
+
react: "react";
|
|
95
|
+
rust: "rust";
|
|
96
|
+
svelte: "svelte";
|
|
97
|
+
vue: "vue";
|
|
98
|
+
}>>>;
|
|
99
|
+
onRequestSent: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodString], null>, z.ZodVoid>>;
|
|
593
100
|
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
101
|
telemetry: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
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
|
-
*/
|
|
102
|
+
layout: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
103
|
+
modern: "modern";
|
|
104
|
+
classic: "classic";
|
|
105
|
+
}>>>>;
|
|
741
106
|
proxy: z.ZodOptional<z.ZodString>;
|
|
742
|
-
|
|
743
|
-
|
|
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<{
|
|
107
|
+
fetch: z.ZodOptional<z.ZodCustom<(input: string | URL | Request, init?: RequestInit) => Promise<Response>, (input: string | URL | Request, init?: RequestInit) => Promise<Response>>>;
|
|
108
|
+
plugins: z.ZodOptional<z.ZodArray<z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodObject<{
|
|
752
109
|
name: z.ZodString;
|
|
753
110
|
extensions: z.ZodArray<z.ZodObject<{
|
|
754
111
|
name: z.ZodString;
|
|
755
112
|
component: z.ZodUnknown;
|
|
756
113
|
renderer: z.ZodOptional<z.ZodUnknown>;
|
|
757
|
-
},
|
|
758
|
-
|
|
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
|
-
*/
|
|
114
|
+
}, z.core.$strip>>;
|
|
115
|
+
}, z.core.$strip>>>>;
|
|
785
116
|
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
117
|
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
118
|
hideModels: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
* @default false
|
|
804
|
-
* @deprecated Use `documentDownloadType: 'none'` instead
|
|
805
|
-
*/
|
|
119
|
+
documentDownloadType: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
120
|
+
none: "none";
|
|
121
|
+
yaml: "yaml";
|
|
122
|
+
json: "json";
|
|
123
|
+
both: "both";
|
|
124
|
+
direct: "direct";
|
|
125
|
+
}>>>>;
|
|
806
126
|
hideDownloadButton: z.ZodOptional<z.ZodBoolean>;
|
|
807
|
-
/**
|
|
808
|
-
* Whether to show the "Test Request" button
|
|
809
|
-
* @default false
|
|
810
|
-
*/
|
|
811
127
|
hideTestRequestButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
812
|
-
/**
|
|
813
|
-
* Whether to show the sidebar search bar
|
|
814
|
-
* @default false
|
|
815
|
-
*/
|
|
816
128
|
hideSearch: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
817
|
-
|
|
129
|
+
showOperationId: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
818
130
|
darkMode: z.ZodOptional<z.ZodBoolean>;
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
* Whether to show the dark mode toggle
|
|
823
|
-
* @default false
|
|
824
|
-
*/
|
|
825
|
-
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
|
-
metaData: z.ZodOptional<z.ZodAny>;
|
|
831
|
-
/**
|
|
832
|
-
* Path to a favicon image
|
|
833
|
-
* @default undefined
|
|
834
|
-
* @example '/favicon.svg'
|
|
835
|
-
*/
|
|
836
|
-
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 */
|
|
843
|
-
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">;
|
|
845
|
-
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 */
|
|
854
|
-
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
|
-
}, {
|
|
869
|
-
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
|
-
*/
|
|
887
|
-
pathRouting: z.ZodOptional<z.ZodObject<{
|
|
888
|
-
/** Base path for the API reference */
|
|
889
|
-
basePath: z.ZodString;
|
|
890
|
-
}, "strip", z.ZodTypeAny, {
|
|
891
|
-
basePath: string;
|
|
892
|
-
}, {
|
|
893
|
-
basePath: string;
|
|
131
|
+
forceDarkModeState: z.ZodOptional<z.ZodEnum<{
|
|
132
|
+
dark: "dark";
|
|
133
|
+
light: "light";
|
|
894
134
|
}>>;
|
|
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<{
|
|
902
|
-
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<{
|
|
915
|
-
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<{
|
|
928
|
-
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<{
|
|
941
|
-
path: z.ZodString;
|
|
942
|
-
operationId: z.ZodOptional<z.ZodString>;
|
|
943
|
-
method: z.ZodString;
|
|
944
|
-
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<{
|
|
963
|
-
name: z.ZodString;
|
|
964
|
-
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
|
-
*/
|
|
997
|
-
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
|
-
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
|
-
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
|
-
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
|
-
*/
|
|
1038
|
-
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" | "direct";
|
|
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
|
-
}>;
|
|
1226
|
-
/** 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
|
-
**/
|
|
1231
|
-
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
|
-
*/
|
|
1244
|
-
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
|
-
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
|
-
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
|
-
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
|
-
*/
|
|
1309
|
-
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
|
-
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 */
|
|
1334
|
-
authentication: z.ZodOptional<z.ZodAny>;
|
|
1335
|
-
/** Base URL for the API server */
|
|
1336
|
-
baseServerURL: z.ZodOptional<z.ZodString>;
|
|
1337
|
-
/**
|
|
1338
|
-
* Whether to hide the client button
|
|
1339
|
-
* @default false
|
|
1340
|
-
*/
|
|
1341
|
-
hideClientButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1342
|
-
/** URL to a request proxy for the API client */
|
|
1343
|
-
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
|
-
*/
|
|
1352
|
-
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 */
|
|
1365
|
-
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
|
-
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
|
-
*/
|
|
1513
|
-
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<{
|
|
1524
|
-
name: z.ZodString;
|
|
1525
|
-
extensions: z.ZodArray<z.ZodObject<{
|
|
1526
|
-
name: z.ZodString;
|
|
1527
|
-
component: z.ZodUnknown;
|
|
1528
|
-
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
|
-
*/
|
|
1557
|
-
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
|
-
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
|
-
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", "direct", "none"]>>>>;
|
|
1573
|
-
/**
|
|
1574
|
-
* Whether to show the "Download OpenAPI Document" button
|
|
1575
|
-
* @default false
|
|
1576
|
-
* @deprecated Use `documentDownloadType: 'none'` instead
|
|
1577
|
-
*/
|
|
1578
|
-
hideDownloadButton: z.ZodOptional<z.ZodBoolean>;
|
|
1579
|
-
/**
|
|
1580
|
-
* Whether to show the "Test Request" button
|
|
1581
|
-
* @default false
|
|
1582
|
-
*/
|
|
1583
|
-
hideTestRequestButton: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1584
|
-
/**
|
|
1585
|
-
* Whether to show the sidebar search bar
|
|
1586
|
-
* @default false
|
|
1587
|
-
*/
|
|
1588
|
-
hideSearch: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1589
|
-
/** Whether dark mode is on or off initially (light mode) */
|
|
1590
|
-
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
|
-
*/
|
|
1597
135
|
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
136
|
metaData: z.ZodOptional<z.ZodAny>;
|
|
1603
|
-
/**
|
|
1604
|
-
* Path to a favicon image
|
|
1605
|
-
* @default undefined
|
|
1606
|
-
* @example '/favicon.svg'
|
|
1607
|
-
*/
|
|
1608
137
|
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 */
|
|
138
|
+
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
139
|
defaultHttpClient: z.ZodOptional<z.ZodObject<{
|
|
1616
|
-
targetKey: z.
|
|
140
|
+
targetKey: z.ZodCustom<"c" | "r" | "go" | "rust" | "clojure" | "csharp" | "dart" | "http" | "fsharp" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "ruby" | "shell" | "swift", "c" | "r" | "go" | "rust" | "clojure" | "csharp" | "dart" | "http" | "fsharp" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "ruby" | "shell" | "swift">;
|
|
1617
141
|
clientKey: z.ZodString;
|
|
1618
|
-
},
|
|
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 */
|
|
142
|
+
}, z.core.$strip>>;
|
|
1626
143
|
customCss: z.ZodOptional<z.ZodString>;
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
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, {
|
|
144
|
+
onSpecUpdate: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodString], null>, z.ZodVoid>>;
|
|
145
|
+
onServerChange: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodString], null>, z.ZodVoid>>;
|
|
146
|
+
onDocumentSelect: z.ZodType<(() => Promise<void> | void) | undefined>;
|
|
147
|
+
onLoaded: z.ZodType<(() => Promise<void> | void) | undefined>;
|
|
148
|
+
onBeforeRequest: z.ZodType<((a: {
|
|
1639
149
|
request: Request;
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
|
-
|
|
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
|
-
*/
|
|
150
|
+
}) => Promise<void> | void) | undefined>;
|
|
151
|
+
onShowMore: z.ZodType<((a: string) => Promise<void> | void) | undefined>;
|
|
152
|
+
onSidebarClick: z.ZodType<((a: string) => Promise<void> | void) | undefined>;
|
|
1659
153
|
pathRouting: z.ZodOptional<z.ZodObject<{
|
|
1660
|
-
/** Base path for the API reference */
|
|
1661
154
|
basePath: z.ZodString;
|
|
1662
|
-
},
|
|
1663
|
-
|
|
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<{
|
|
155
|
+
}, z.core.$strip>>;
|
|
156
|
+
generateHeadingSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodObject<{
|
|
1674
157
|
slug: z.ZodDefault<z.ZodString>;
|
|
1675
|
-
},
|
|
1676
|
-
|
|
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<{
|
|
158
|
+
}, z.core.$strip>], null>, z.ZodString>>;
|
|
159
|
+
generateModelSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodObject<{
|
|
1687
160
|
name: z.ZodDefault<z.ZodString>;
|
|
1688
|
-
},
|
|
1689
|
-
|
|
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<{
|
|
161
|
+
}, z.core.$strip>], null>, z.ZodString>>;
|
|
162
|
+
generateTagSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodObject<{
|
|
1700
163
|
name: z.ZodDefault<z.ZodString>;
|
|
1701
|
-
},
|
|
1702
|
-
|
|
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<{
|
|
164
|
+
}, z.core.$strip>], null>, z.ZodString>>;
|
|
165
|
+
generateOperationSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodObject<{
|
|
1713
166
|
path: z.ZodString;
|
|
1714
167
|
operationId: z.ZodOptional<z.ZodString>;
|
|
1715
168
|
method: z.ZodString;
|
|
1716
169
|
summary: z.ZodOptional<z.ZodString>;
|
|
1717
|
-
},
|
|
1718
|
-
|
|
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<{
|
|
170
|
+
}, z.core.$strip>], null>, z.ZodString>>;
|
|
171
|
+
generateWebhookSlug: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodObject<{
|
|
1735
172
|
name: z.ZodString;
|
|
1736
173
|
method: z.ZodOptional<z.ZodString>;
|
|
1737
|
-
},
|
|
1738
|
-
|
|
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
|
-
*/
|
|
174
|
+
}, z.core.$strip>], null>, z.ZodString>>;
|
|
175
|
+
redirect: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [z.ZodString], null>, z.ZodOptional<z.ZodNullable<z.ZodString>>>>;
|
|
1769
176
|
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
177
|
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
178
|
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
179
|
expandAllResponses: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
180
|
+
tagsSorter: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"alpha">, z.ZodFunction<z.ZodTuple<readonly [z.ZodAny, z.ZodAny], null>, z.ZodNumber>]>>;
|
|
181
|
+
operationsSorter: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"alpha">, z.ZodLiteral<"method">, z.ZodFunction<z.ZodTuple<readonly [z.ZodAny, z.ZodAny], null>, z.ZodNumber>]>>;
|
|
182
|
+
orderSchemaPropertiesBy: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"alpha">, z.ZodLiteral<"preserve">]>>>>;
|
|
183
|
+
orderRequiredPropertiesFirst: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
184
|
+
}, z.core.$strip>;
|
|
185
|
+
/**
|
|
186
|
+
* Configuration for the Scalar Api Reference integrations
|
|
187
|
+
*
|
|
188
|
+
* See the type `ApiReferenceConfigurationWithSource` or `AnyApiReferenceConfiguration`\
|
|
189
|
+
* for the configuration that includes the sources for you OpenAPI documents
|
|
190
|
+
*/
|
|
191
|
+
export type ApiReferenceConfiguration = Omit<z.infer<typeof apiReferenceConfigurationSchema>, // Remove deprecated attributes
|
|
192
|
+
// Remove deprecated attributes
|
|
193
|
+
'proxy' | 'spec' | 'authentication'> & {
|
|
194
|
+
authentication?: AuthenticationConfiguration;
|
|
195
|
+
} & {
|
|
196
|
+
/** @deprecated
|
|
197
|
+
* This type now refers to the base configuration that does not include the sources.
|
|
198
|
+
* Use the type `ApiReferenceConfigurationWithSource` instead.
|
|
1804
199
|
*/
|
|
1805
|
-
|
|
1806
|
-
/**
|
|
1807
|
-
*
|
|
1808
|
-
*
|
|
200
|
+
url?: SourceConfiguration['url'];
|
|
201
|
+
/** @deprecated
|
|
202
|
+
* This type now refers to the base configuration that does not include the sources.
|
|
203
|
+
* Use the type `ApiReferenceConfigurationWithSource` instead.
|
|
1809
204
|
*/
|
|
1810
|
-
|
|
1811
|
-
}
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
isEditable: boolean;
|
|
1820
|
-
isLoading: boolean;
|
|
1821
|
-
hideModels: boolean;
|
|
1822
|
-
documentDownloadType: "none" | "yaml" | "json" | "both" | "direct";
|
|
1823
|
-
hideTestRequestButton: boolean;
|
|
1824
|
-
hideSearch: boolean;
|
|
1825
|
-
hideDarkModeToggle: boolean;
|
|
1826
|
-
withDefaultFonts: boolean;
|
|
1827
|
-
defaultOpenAllTags: boolean;
|
|
1828
|
-
expandAllModelSections: boolean;
|
|
1829
|
-
expandAllResponses: boolean;
|
|
1830
|
-
orderSchemaPropertiesBy: "alpha" | "preserve";
|
|
1831
|
-
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
|
-
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
|
-
}, {
|
|
1905
|
-
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
|
-
slug?: string | undefined;
|
|
1913
|
-
spec?: {
|
|
1914
|
-
title?: string | undefined;
|
|
1915
|
-
url?: string | undefined;
|
|
1916
|
-
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
1917
|
-
slug?: string | undefined;
|
|
1918
|
-
} | undefined;
|
|
1919
|
-
authentication?: any;
|
|
1920
|
-
baseServerURL?: string | undefined;
|
|
1921
|
-
hideClientButton?: unknown;
|
|
1922
|
-
proxyUrl?: string | undefined;
|
|
1923
|
-
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
|
-
servers?: any[] | undefined;
|
|
1925
|
-
showSidebar?: unknown;
|
|
1926
|
-
operationTitleSource?: unknown;
|
|
1927
|
-
theme?: unknown;
|
|
1928
|
-
_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;
|
|
1941
|
-
proxy?: string | undefined;
|
|
1942
|
-
isEditable?: unknown;
|
|
1943
|
-
isLoading?: unknown;
|
|
1944
|
-
hideModels?: unknown;
|
|
1945
|
-
documentDownloadType?: unknown;
|
|
1946
|
-
hideDownloadButton?: boolean | undefined;
|
|
1947
|
-
hideTestRequestButton?: unknown;
|
|
1948
|
-
hideSearch?: unknown;
|
|
1949
|
-
darkMode?: boolean | undefined;
|
|
1950
|
-
forceDarkModeState?: "dark" | "light" | undefined;
|
|
1951
|
-
hideDarkModeToggle?: unknown;
|
|
1952
|
-
metaData?: any;
|
|
1953
|
-
favicon?: string | undefined;
|
|
1954
|
-
hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
|
|
1955
|
-
defaultHttpClient?: {
|
|
1956
|
-
targetKey: "c" | "clojure" | "csharp" | "dart" | "http" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "rust" | "shell" | "swift";
|
|
1957
|
-
clientKey: string;
|
|
1958
|
-
} | undefined;
|
|
1959
|
-
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;
|
|
1966
|
-
pathRouting?: {
|
|
1967
|
-
basePath: string;
|
|
1968
|
-
} | 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
|
-
}>, {
|
|
1998
|
-
hideClientButton: boolean;
|
|
1999
|
-
showSidebar: boolean;
|
|
2000
|
-
operationTitleSource: "path" | "summary";
|
|
2001
|
-
theme: "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "deepSpace" | "saturn" | "kepler" | "elysiajs" | "fastify" | "mars" | "laserwave" | "none";
|
|
2002
|
-
persistAuth: boolean;
|
|
2003
|
-
telemetry: boolean;
|
|
2004
|
-
layout: "modern" | "classic";
|
|
2005
|
-
isEditable: boolean;
|
|
2006
|
-
isLoading: boolean;
|
|
2007
|
-
hideModels: boolean;
|
|
2008
|
-
documentDownloadType: "none" | "yaml" | "json" | "both" | "direct";
|
|
2009
|
-
hideTestRequestButton: boolean;
|
|
2010
|
-
hideSearch: boolean;
|
|
2011
|
-
hideDarkModeToggle: boolean;
|
|
2012
|
-
withDefaultFonts: boolean;
|
|
2013
|
-
defaultOpenAllTags: boolean;
|
|
2014
|
-
expandAllModelSections: boolean;
|
|
2015
|
-
expandAllResponses: boolean;
|
|
2016
|
-
orderSchemaPropertiesBy: "alpha" | "preserve";
|
|
2017
|
-
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
|
-
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
|
-
}, {
|
|
2091
|
-
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
|
-
slug?: string | undefined;
|
|
2099
|
-
spec?: {
|
|
2100
|
-
title?: string | undefined;
|
|
2101
|
-
url?: string | undefined;
|
|
2102
|
-
content?: string | Record<string, any> | ((...args: unknown[]) => Record<string, any>) | null | undefined;
|
|
2103
|
-
slug?: string | undefined;
|
|
2104
|
-
} | undefined;
|
|
2105
|
-
authentication?: any;
|
|
2106
|
-
baseServerURL?: string | undefined;
|
|
2107
|
-
hideClientButton?: unknown;
|
|
2108
|
-
proxyUrl?: string | undefined;
|
|
2109
|
-
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
|
-
servers?: any[] | undefined;
|
|
2111
|
-
showSidebar?: unknown;
|
|
2112
|
-
operationTitleSource?: unknown;
|
|
2113
|
-
theme?: unknown;
|
|
2114
|
-
_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;
|
|
2127
|
-
proxy?: string | undefined;
|
|
2128
|
-
isEditable?: unknown;
|
|
2129
|
-
isLoading?: unknown;
|
|
2130
|
-
hideModels?: unknown;
|
|
2131
|
-
documentDownloadType?: unknown;
|
|
2132
|
-
hideDownloadButton?: boolean | undefined;
|
|
2133
|
-
hideTestRequestButton?: unknown;
|
|
2134
|
-
hideSearch?: unknown;
|
|
2135
|
-
darkMode?: boolean | undefined;
|
|
2136
|
-
forceDarkModeState?: "dark" | "light" | undefined;
|
|
2137
|
-
hideDarkModeToggle?: unknown;
|
|
2138
|
-
metaData?: any;
|
|
2139
|
-
favicon?: string | undefined;
|
|
2140
|
-
hiddenClients?: true | string[] | Record<string, boolean | string[]> | undefined;
|
|
2141
|
-
defaultHttpClient?: {
|
|
2142
|
-
targetKey: "c" | "clojure" | "csharp" | "dart" | "http" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "rust" | "shell" | "swift";
|
|
2143
|
-
clientKey: string;
|
|
2144
|
-
} | undefined;
|
|
2145
|
-
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;
|
|
2152
|
-
pathRouting?: {
|
|
2153
|
-
basePath: string;
|
|
2154
|
-
} | 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
|
-
}>;
|
|
2184
|
-
/** Configuration after parsing, this is the main type */
|
|
2185
|
-
export type ApiReferenceConfiguration = Omit<z.infer<typeof _apiReferenceConfigurationSchema>, 'proxy' | 'spec' | 'authentication'> & {
|
|
205
|
+
content?: SourceConfiguration['content'];
|
|
206
|
+
};
|
|
207
|
+
/** Migrate the configuration through a transform */
|
|
208
|
+
/** Configuration for the Api Reference */
|
|
209
|
+
export declare const apiReferenceConfigurationWithSourceSchema: ZodType<Omit<ApiReferenceConfiguration, 'url' | 'content'> & SourceConfiguration>;
|
|
210
|
+
/**
|
|
211
|
+
* User facing configuration that includes the document source configuration
|
|
212
|
+
*/
|
|
213
|
+
export type ApiReferenceConfigurationWithSource = Omit<z.infer<typeof apiReferenceConfigurationWithSourceSchema>, 'proxy' | 'spec' | 'authentication'> & {
|
|
2186
214
|
authentication?: AuthenticationConfiguration;
|
|
2187
215
|
};
|
|
2188
|
-
/**
|
|
2189
|
-
|
|
216
|
+
/**
|
|
217
|
+
* When providing an array of configurations we extend with the default attribute
|
|
218
|
+
* which indicates which configuration should be used as the default one
|
|
219
|
+
*/
|
|
220
|
+
export type ApiReferenceConfigurationWithDefault = ApiReferenceConfigurationWithSource & {
|
|
2190
221
|
/** Whether to use this config as the default one */
|
|
2191
222
|
default?: boolean;
|
|
2192
223
|
};
|
|
2193
|
-
/**
|
|
2194
|
-
|
|
2195
|
-
|
|
224
|
+
/**
|
|
225
|
+
* Configuration for a single config with multiple sources
|
|
226
|
+
* The configuration will be shared between the documents
|
|
227
|
+
*/
|
|
228
|
+
export type ApiReferenceConfigurationWithMultipleSources = ApiReferenceConfigurationWithSource & {
|
|
229
|
+
sources: (SourceConfiguration & {
|
|
2196
230
|
default?: boolean;
|
|
2197
231
|
})[];
|
|
2198
232
|
};
|
|
2199
233
|
/** Configuration for multiple Api References */
|
|
2200
|
-
export type AnyApiReferenceConfiguration = Partial<
|
|
234
|
+
export type AnyApiReferenceConfiguration = Partial<ApiReferenceConfigurationWithSource> | Partial<ApiReferenceConfigurationWithMultipleSources> | Partial<ApiReferenceConfigurationWithDefault>[] | Partial<ApiReferenceConfigurationWithMultipleSources>[];
|
|
2201
235
|
/** Typeguard to check to narrow the configs to the one with sources */
|
|
2202
|
-
export declare const isConfigurationWithSources: (config: AnyApiReferenceConfiguration) => config is Partial<
|
|
2203
|
-
export {};
|
|
236
|
+
export declare const isConfigurationWithSources: (config: AnyApiReferenceConfiguration) => config is Partial<ApiReferenceConfigurationWithMultipleSources>;
|
|
2204
237
|
//# sourceMappingURL=api-reference-configuration.d.ts.map
|