@scalar/types 0.17.1 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @scalar/types
|
|
2
2
|
|
|
3
|
+
## 0.18.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#9868](https://github.com/scalar/scalar/pull/9868): Control OAuth2 flow tabs from your OpenAPI document. Add `x-order` to a flow to set the order of the tabs in the auth section (the first tab is selected by default, so the lowest `x-order` also becomes the default flow), and add `x-scalar-ignore` to a flow to hide its tab — useful for flows that cannot run in the browser, like Client Credentials, which usually fails on CORS. `x-scalar-ignore` on a whole security scheme now hides it from the auth selector too.
|
|
8
|
+
|
|
3
9
|
## 0.17.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const securityApiKeySchema: z.ZodObject<{
|
|
3
3
|
description: z.ZodOptional<z.ZodString>;
|
|
4
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
4
5
|
type: z.ZodLiteral<"apiKey">;
|
|
5
6
|
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
6
7
|
in: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
@@ -15,6 +16,7 @@ export declare const securityApiKeySchema: z.ZodObject<{
|
|
|
15
16
|
export type SecuritySchemeApiKey = z.infer<typeof securityApiKeySchema>;
|
|
16
17
|
export declare const securityHttpSchema: z.ZodObject<{
|
|
17
18
|
description: z.ZodOptional<z.ZodString>;
|
|
19
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
18
20
|
type: z.ZodLiteral<"http">;
|
|
19
21
|
scheme: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodEnum<{
|
|
20
22
|
basic: "basic";
|
|
@@ -30,6 +32,7 @@ export declare const securityHttpSchema: z.ZodObject<{
|
|
|
30
32
|
export type SecuritySchemaHttp = z.infer<typeof securityHttpSchema>;
|
|
31
33
|
export declare const securityOpenIdSchema: z.ZodObject<{
|
|
32
34
|
description: z.ZodOptional<z.ZodString>;
|
|
35
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
33
36
|
type: z.ZodLiteral<"openIdConnect">;
|
|
34
37
|
openIdConnectUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
35
38
|
uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme", "out">;
|
|
@@ -40,6 +43,7 @@ export type SecuritySchemaOpenId = z.infer<typeof securityOpenIdSchema>;
|
|
|
40
43
|
export declare const pkceOptions: readonly ["SHA-256", "plain", "no"];
|
|
41
44
|
export declare const securityOauthSchema: z.ZodObject<{
|
|
42
45
|
description: z.ZodOptional<z.ZodString>;
|
|
46
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
43
47
|
type: z.ZodLiteral<"oauth2">;
|
|
44
48
|
'x-default-scopes': z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
45
49
|
flows: z.ZodDefault<z.ZodObject<{
|
|
@@ -52,6 +56,8 @@ export declare const securityOauthSchema: z.ZodObject<{
|
|
|
52
56
|
'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
53
57
|
'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
54
58
|
'x-tokenName': z.ZodOptional<z.ZodString>;
|
|
59
|
+
'x-order': z.ZodOptional<z.ZodNumber>;
|
|
60
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
55
61
|
type: z.ZodDefault<z.ZodLiteral<"implicit">>;
|
|
56
62
|
authorizationUrl: z.ZodDefault<z.ZodString>;
|
|
57
63
|
'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -65,6 +71,8 @@ export declare const securityOauthSchema: z.ZodObject<{
|
|
|
65
71
|
'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
66
72
|
'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
67
73
|
'x-tokenName': z.ZodOptional<z.ZodString>;
|
|
74
|
+
'x-order': z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
68
76
|
type: z.ZodDefault<z.ZodLiteral<"password">>;
|
|
69
77
|
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
70
78
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
@@ -84,6 +92,8 @@ export declare const securityOauthSchema: z.ZodObject<{
|
|
|
84
92
|
'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
85
93
|
'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
86
94
|
'x-tokenName': z.ZodOptional<z.ZodString>;
|
|
95
|
+
'x-order': z.ZodOptional<z.ZodNumber>;
|
|
96
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
87
97
|
type: z.ZodDefault<z.ZodLiteral<"clientCredentials">>;
|
|
88
98
|
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
89
99
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
@@ -101,6 +111,8 @@ export declare const securityOauthSchema: z.ZodObject<{
|
|
|
101
111
|
'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
102
112
|
'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
103
113
|
'x-tokenName': z.ZodOptional<z.ZodString>;
|
|
114
|
+
'x-order': z.ZodOptional<z.ZodNumber>;
|
|
115
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
104
116
|
type: z.ZodDefault<z.ZodLiteral<"authorizationCode">>;
|
|
105
117
|
authorizationUrl: z.ZodDefault<z.ZodString>;
|
|
106
118
|
'x-usePkce': z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
@@ -139,6 +151,7 @@ export declare const oasSecurityRequirementSchema: z.ZodRecord<z.ZodString, z.Zo
|
|
|
139
151
|
/** OAS Compliant security schemes */
|
|
140
152
|
export declare const oasSecuritySchemeSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
141
153
|
description: z.ZodOptional<z.ZodString>;
|
|
154
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
142
155
|
type: z.ZodLiteral<"apiKey">;
|
|
143
156
|
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
144
157
|
in: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
@@ -148,6 +161,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
148
161
|
}>>>>;
|
|
149
162
|
}, z.core.$strip>, z.ZodObject<{
|
|
150
163
|
description: z.ZodOptional<z.ZodString>;
|
|
164
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
151
165
|
type: z.ZodLiteral<"http">;
|
|
152
166
|
scheme: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodEnum<{
|
|
153
167
|
basic: "basic";
|
|
@@ -156,6 +170,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
156
170
|
bearerFormat: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"JWT">, z.ZodString]>>>;
|
|
157
171
|
}, z.core.$strip>, z.ZodObject<{
|
|
158
172
|
description: z.ZodOptional<z.ZodString>;
|
|
173
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
159
174
|
type: z.ZodLiteral<"oauth2">;
|
|
160
175
|
'x-default-scopes': z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
161
176
|
flows: z.ZodDefault<z.ZodObject<{
|
|
@@ -168,6 +183,8 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
168
183
|
'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
169
184
|
'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
170
185
|
'x-tokenName': z.ZodOptional<z.ZodString>;
|
|
186
|
+
'x-order': z.ZodOptional<z.ZodNumber>;
|
|
187
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
171
188
|
type: z.ZodDefault<z.ZodLiteral<"implicit">>;
|
|
172
189
|
authorizationUrl: z.ZodDefault<z.ZodString>;
|
|
173
190
|
'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -181,6 +198,8 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
181
198
|
'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
182
199
|
'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
183
200
|
'x-tokenName': z.ZodOptional<z.ZodString>;
|
|
201
|
+
'x-order': z.ZodOptional<z.ZodNumber>;
|
|
202
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
184
203
|
type: z.ZodDefault<z.ZodLiteral<"password">>;
|
|
185
204
|
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
186
205
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
@@ -200,6 +219,8 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
200
219
|
'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
201
220
|
'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
202
221
|
'x-tokenName': z.ZodOptional<z.ZodString>;
|
|
222
|
+
'x-order': z.ZodOptional<z.ZodNumber>;
|
|
223
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
203
224
|
type: z.ZodDefault<z.ZodLiteral<"clientCredentials">>;
|
|
204
225
|
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
205
226
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
@@ -217,6 +238,8 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
217
238
|
'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
218
239
|
'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
219
240
|
'x-tokenName': z.ZodOptional<z.ZodString>;
|
|
241
|
+
'x-order': z.ZodOptional<z.ZodNumber>;
|
|
242
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
220
243
|
type: z.ZodDefault<z.ZodLiteral<"authorizationCode">>;
|
|
221
244
|
authorizationUrl: z.ZodDefault<z.ZodString>;
|
|
222
245
|
'x-usePkce': z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
@@ -235,12 +258,14 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
235
258
|
}, z.core.$strip>>;
|
|
236
259
|
}, z.core.$strip>, z.ZodObject<{
|
|
237
260
|
description: z.ZodOptional<z.ZodString>;
|
|
261
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
238
262
|
type: z.ZodLiteral<"openIdConnect">;
|
|
239
263
|
openIdConnectUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
240
264
|
}, z.core.$strip>]>;
|
|
241
265
|
/** Extended security schemes for workspace usage */
|
|
242
266
|
export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
243
267
|
description: z.ZodOptional<z.ZodString>;
|
|
268
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
244
269
|
type: z.ZodLiteral<"apiKey">;
|
|
245
270
|
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
246
271
|
in: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
@@ -253,6 +278,7 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
|
|
|
253
278
|
value: z.ZodDefault<z.ZodString>;
|
|
254
279
|
}, z.core.$strip>, z.ZodObject<{
|
|
255
280
|
description: z.ZodOptional<z.ZodString>;
|
|
281
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
256
282
|
type: z.ZodLiteral<"http">;
|
|
257
283
|
scheme: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodEnum<{
|
|
258
284
|
basic: "basic";
|
|
@@ -266,12 +292,14 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
|
|
|
266
292
|
token: z.ZodDefault<z.ZodString>;
|
|
267
293
|
}, z.core.$strip>, z.ZodObject<{
|
|
268
294
|
description: z.ZodOptional<z.ZodString>;
|
|
295
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
269
296
|
type: z.ZodLiteral<"openIdConnect">;
|
|
270
297
|
openIdConnectUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
271
298
|
uid: z.core.$ZodBranded<z.ZodDefault<z.ZodString>, "securityScheme", "out">;
|
|
272
299
|
nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
273
300
|
}, z.core.$strip>, z.ZodObject<{
|
|
274
301
|
description: z.ZodOptional<z.ZodString>;
|
|
302
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
275
303
|
type: z.ZodLiteral<"oauth2">;
|
|
276
304
|
'x-default-scopes': z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
277
305
|
flows: z.ZodDefault<z.ZodObject<{
|
|
@@ -284,6 +312,8 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
|
|
|
284
312
|
'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
285
313
|
'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
286
314
|
'x-tokenName': z.ZodOptional<z.ZodString>;
|
|
315
|
+
'x-order': z.ZodOptional<z.ZodNumber>;
|
|
316
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
287
317
|
type: z.ZodDefault<z.ZodLiteral<"implicit">>;
|
|
288
318
|
authorizationUrl: z.ZodDefault<z.ZodString>;
|
|
289
319
|
'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -297,6 +327,8 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
|
|
|
297
327
|
'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
298
328
|
'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
299
329
|
'x-tokenName': z.ZodOptional<z.ZodString>;
|
|
330
|
+
'x-order': z.ZodOptional<z.ZodNumber>;
|
|
331
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
300
332
|
type: z.ZodDefault<z.ZodLiteral<"password">>;
|
|
301
333
|
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
302
334
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
@@ -316,6 +348,8 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
|
|
|
316
348
|
'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
317
349
|
'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
318
350
|
'x-tokenName': z.ZodOptional<z.ZodString>;
|
|
351
|
+
'x-order': z.ZodOptional<z.ZodNumber>;
|
|
352
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
319
353
|
type: z.ZodDefault<z.ZodLiteral<"clientCredentials">>;
|
|
320
354
|
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
321
355
|
clientSecret: z.ZodDefault<z.ZodString>;
|
|
@@ -333,6 +367,8 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
|
|
|
333
367
|
'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
334
368
|
'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
335
369
|
'x-tokenName': z.ZodOptional<z.ZodString>;
|
|
370
|
+
'x-order': z.ZodOptional<z.ZodNumber>;
|
|
371
|
+
'x-scalar-ignore': z.ZodOptional<z.ZodBoolean>;
|
|
336
372
|
type: z.ZodDefault<z.ZodLiteral<"authorizationCode">>;
|
|
337
373
|
authorizationUrl: z.ZodDefault<z.ZodString>;
|
|
338
374
|
'x-usePkce': z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
@@ -359,6 +395,7 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
|
|
|
359
395
|
nameKey: string;
|
|
360
396
|
value: string;
|
|
361
397
|
description?: string | undefined;
|
|
398
|
+
'x-scalar-ignore'?: boolean | undefined;
|
|
362
399
|
} | {
|
|
363
400
|
type: "http";
|
|
364
401
|
scheme: "basic" | "bearer";
|
|
@@ -369,12 +406,14 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
|
|
|
369
406
|
password: string;
|
|
370
407
|
token: string;
|
|
371
408
|
description?: string | undefined;
|
|
409
|
+
'x-scalar-ignore'?: boolean | undefined;
|
|
372
410
|
} | {
|
|
373
411
|
type: "openIdConnect";
|
|
374
412
|
openIdConnectUrl: string;
|
|
375
413
|
uid: string & z.core.$brand<"securityScheme">;
|
|
376
414
|
nameKey: string;
|
|
377
415
|
description?: string | undefined;
|
|
416
|
+
'x-scalar-ignore'?: boolean | undefined;
|
|
378
417
|
} | {
|
|
379
418
|
type: "oauth2";
|
|
380
419
|
flows: {
|
|
@@ -390,6 +429,8 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
|
|
|
390
429
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
391
430
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
392
431
|
'x-tokenName'?: string | undefined;
|
|
432
|
+
'x-order'?: number | undefined;
|
|
433
|
+
'x-scalar-ignore'?: boolean | undefined;
|
|
393
434
|
} | undefined;
|
|
394
435
|
password?: {
|
|
395
436
|
refreshUrl: string;
|
|
@@ -405,6 +446,8 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
|
|
|
405
446
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
406
447
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
407
448
|
'x-tokenName'?: string | undefined;
|
|
449
|
+
'x-order'?: number | undefined;
|
|
450
|
+
'x-scalar-ignore'?: boolean | undefined;
|
|
408
451
|
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
409
452
|
} | undefined;
|
|
410
453
|
clientCredentials?: {
|
|
@@ -419,6 +462,8 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
|
|
|
419
462
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
420
463
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
421
464
|
'x-tokenName'?: string | undefined;
|
|
465
|
+
'x-order'?: number | undefined;
|
|
466
|
+
'x-scalar-ignore'?: boolean | undefined;
|
|
422
467
|
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
423
468
|
} | undefined;
|
|
424
469
|
authorizationCode?: {
|
|
@@ -436,12 +481,15 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
|
|
|
436
481
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
437
482
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
438
483
|
'x-tokenName'?: string | undefined;
|
|
484
|
+
'x-order'?: number | undefined;
|
|
485
|
+
'x-scalar-ignore'?: boolean | undefined;
|
|
439
486
|
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
440
487
|
} | undefined;
|
|
441
488
|
};
|
|
442
489
|
uid: string & z.core.$brand<"securityScheme">;
|
|
443
490
|
nameKey: string;
|
|
444
491
|
description?: string | undefined;
|
|
492
|
+
'x-scalar-ignore'?: boolean | undefined;
|
|
445
493
|
'x-default-scopes'?: string[] | undefined;
|
|
446
494
|
}, {
|
|
447
495
|
type: "apiKey";
|
|
@@ -451,6 +499,7 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
|
|
|
451
499
|
nameKey: string;
|
|
452
500
|
value: string;
|
|
453
501
|
description?: string | undefined;
|
|
502
|
+
'x-scalar-ignore'?: boolean | undefined;
|
|
454
503
|
} | {
|
|
455
504
|
type: "http";
|
|
456
505
|
scheme: "basic" | "bearer";
|
|
@@ -461,12 +510,14 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
|
|
|
461
510
|
password: string;
|
|
462
511
|
token: string;
|
|
463
512
|
description?: string | undefined;
|
|
513
|
+
'x-scalar-ignore'?: boolean | undefined;
|
|
464
514
|
} | {
|
|
465
515
|
type: "openIdConnect";
|
|
466
516
|
openIdConnectUrl: string;
|
|
467
517
|
uid: string & z.core.$brand<"securityScheme">;
|
|
468
518
|
nameKey: string;
|
|
469
519
|
description?: string | undefined;
|
|
520
|
+
'x-scalar-ignore'?: boolean | undefined;
|
|
470
521
|
} | {
|
|
471
522
|
type: "oauth2";
|
|
472
523
|
flows: {
|
|
@@ -482,6 +533,8 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
|
|
|
482
533
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
483
534
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
484
535
|
'x-tokenName'?: string | undefined;
|
|
536
|
+
'x-order'?: number | undefined;
|
|
537
|
+
'x-scalar-ignore'?: boolean | undefined;
|
|
485
538
|
} | undefined;
|
|
486
539
|
password?: {
|
|
487
540
|
refreshUrl: string;
|
|
@@ -497,6 +550,8 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
|
|
|
497
550
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
498
551
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
499
552
|
'x-tokenName'?: string | undefined;
|
|
553
|
+
'x-order'?: number | undefined;
|
|
554
|
+
'x-scalar-ignore'?: boolean | undefined;
|
|
500
555
|
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
501
556
|
} | undefined;
|
|
502
557
|
clientCredentials?: {
|
|
@@ -511,6 +566,8 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
|
|
|
511
566
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
512
567
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
513
568
|
'x-tokenName'?: string | undefined;
|
|
569
|
+
'x-order'?: number | undefined;
|
|
570
|
+
'x-scalar-ignore'?: boolean | undefined;
|
|
514
571
|
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
515
572
|
} | undefined;
|
|
516
573
|
authorizationCode?: {
|
|
@@ -528,12 +585,15 @@ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.
|
|
|
528
585
|
'x-scalar-security-query'?: Record<string, string> | undefined;
|
|
529
586
|
'x-scalar-security-body'?: Record<string, string> | undefined;
|
|
530
587
|
'x-tokenName'?: string | undefined;
|
|
588
|
+
'x-order'?: number | undefined;
|
|
589
|
+
'x-scalar-ignore'?: boolean | undefined;
|
|
531
590
|
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
532
591
|
} | undefined;
|
|
533
592
|
};
|
|
534
593
|
uid: string & z.core.$brand<"securityScheme">;
|
|
535
594
|
nameKey: string;
|
|
536
595
|
description?: string | undefined;
|
|
596
|
+
'x-scalar-ignore'?: boolean | undefined;
|
|
537
597
|
'x-default-scopes'?: string[] | undefined;
|
|
538
598
|
}>>;
|
|
539
599
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"security-scheme.d.ts","sourceRoot":"","sources":["../../src/entities/security-scheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"security-scheme.d.ts","sourceRoot":"","sources":["../../src/entities/security-scheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAsCvB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;iBAAiF,CAAA;AAClH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAkCvE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;iBAA6E,CAAA;AAC5G,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAanE,eAAO,MAAM,oBAAoB;;;;;;;iBAAwD,CAAA;AACzF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAgDvE,0CAA0C;AAC1C,eAAO,MAAM,WAAW,qCAAsC,CAAA;AA4D9D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAwD,CAAA;AAExF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AACtE,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAC7E,MAAM,MAAM,UAAU,GAAG,WAAW,CAClC,oBAAoB,CAAC,OAAO,CAAC,CAAC,mBAAmB,GAAG,mBAAmB,GAAG,UAAU,GAAG,UAAU,CAAC,CACnG,CAAA;AACD,iDAAiD;AACjD,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,2BAA2B,CAAC,OAAO,CAAC,CAAC,CAC7E,mBAAmB,GACnB,mBAAmB,GACnB,UAAU,GACV,UAAU,CAAC,GACb,MAAM,CAAC,KAAK,MAAM,EAAE,EAAE,MAAM,CAAC,CAAA;AAK/B;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B,gFAAmE,CAAA;AAE5G,qCAAqC;AACrC,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAKlC,CAAA;AAEF,oDAAoD;AACpD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAa7B,CAAA;AAEJ;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AACjE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA"}
|
|
@@ -6,6 +6,8 @@ import { nanoidSchema } from '../utils/nanoid.js';
|
|
|
6
6
|
const commonProps = z.object({
|
|
7
7
|
/* A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
|
|
8
8
|
description: z.string().optional(),
|
|
9
|
+
/** When true, the whole scheme is hidden from the auth UI. See documentation/openapi.md. */
|
|
10
|
+
'x-scalar-ignore': z.boolean().optional(),
|
|
9
11
|
});
|
|
10
12
|
const extendedSecuritySchema = z.object({
|
|
11
13
|
uid: nanoidSchema.brand(),
|
|
@@ -101,6 +103,10 @@ const flowsCommon = z.object({
|
|
|
101
103
|
'x-scalar-security-body': z.record(z.string(), z.string()).optional(),
|
|
102
104
|
/** Extension to specify custom token name in the response (defaults to 'access_token') */
|
|
103
105
|
'x-tokenName': z.string().optional(),
|
|
106
|
+
/** Display order of this flow's tab in the auth UI (ascending). See documentation/openapi.md. */
|
|
107
|
+
'x-order': z.number().optional(),
|
|
108
|
+
/** When true, this flow's tab is hidden from the auth UI. See documentation/openapi.md. */
|
|
109
|
+
'x-scalar-ignore': z.boolean().optional(),
|
|
104
110
|
});
|
|
105
111
|
/** Setup a default redirect uri if we can */
|
|
106
112
|
const defaultRedirectUri = typeof window !== 'undefined' ? window.location.origin + window.location.pathname : '';
|