@scalar/types 0.2.16 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,611 +1,126 @@
1
1
  import { z } from 'zod';
2
2
  export declare const securitySchemeApiKeyIn: readonly ["query", "header", "cookie"];
3
- export declare const securityApiKeySchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
3
+ export declare const securityApiKeySchema: z.ZodObject<{
4
4
  description: z.ZodOptional<z.ZodString>;
5
- }, {
6
5
  type: z.ZodLiteral<"apiKey">;
7
- /** REQUIRED. The name of the header, query or cookie parameter to be used. */
8
6
  name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
9
- /** REQUIRED. The location of the API key. Valid values are "query", "header" or "cookie". */
10
- in: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["query", "header", "cookie"]>>>>;
11
- }>, {
12
- uid: z.ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
13
- /** The name key that links a security requirement to a security object */
7
+ in: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
8
+ cookie: "cookie";
9
+ query: "query";
10
+ header: "header";
11
+ }>>>>;
12
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
14
13
  nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
15
- }>, {
16
14
  value: z.ZodDefault<z.ZodString>;
17
- }>, "strip", z.ZodTypeAny, {
18
- type: "apiKey";
19
- value: string;
20
- name: string;
21
- uid: string & z.BRAND<"securityScheme">;
22
- nameKey: string;
23
- in: "cookie" | "query" | "header";
24
- description?: string | undefined;
25
- }, {
26
- type: "apiKey";
27
- value?: string | undefined;
28
- name?: string | undefined;
29
- description?: string | undefined;
30
- uid?: string | undefined;
31
- nameKey?: string | undefined;
32
- in?: unknown;
33
- }>;
15
+ }, z.core.$strip>;
34
16
  export type SecuritySchemeApiKey = z.infer<typeof securityApiKeySchema>;
35
- export declare const securityHttpSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
17
+ export declare const securityHttpSchema: z.ZodObject<{
36
18
  description: z.ZodOptional<z.ZodString>;
37
- }, {
38
19
  type: z.ZodLiteral<"http">;
39
- /**
40
- * REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in
41
- * [RFC7235]. The values used SHOULD be registered in the IANA Authentication Scheme registry.
42
- */
43
- scheme: z.ZodDefault<z.ZodOptional<z.ZodPipeline<z.ZodString, z.ZodEnum<["basic", "bearer"]>>>>;
44
- /**
45
- * A hint to the client to identify how the bearer token is formatted.
46
- * Bearer tokens are usually generated by an authorization server, so
47
- * this information is primarily for documentation purposes.
48
- */
49
- bearerFormat: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"JWT">, z.ZodString]>>>;
50
- }>, {
51
- uid: z.ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
52
- /** The name key that links a security requirement to a security object */
20
+ scheme: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodEnum<{
21
+ basic: "basic";
22
+ bearer: "bearer";
23
+ }>>>>;
24
+ bearerFormat: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"JWT">, z.ZodString]>>>;
25
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
53
26
  nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
54
- }>, {
55
27
  username: z.ZodDefault<z.ZodString>;
56
28
  password: z.ZodDefault<z.ZodString>;
57
29
  token: z.ZodDefault<z.ZodString>;
58
- }>, "strip", z.ZodTypeAny, {
59
- type: "http";
60
- uid: string & z.BRAND<"securityScheme">;
61
- nameKey: string;
62
- scheme: "basic" | "bearer";
63
- bearerFormat: string;
64
- username: string;
65
- password: string;
66
- token: string;
67
- description?: string | undefined;
68
- }, {
69
- type: "http";
70
- description?: string | undefined;
71
- uid?: string | undefined;
72
- nameKey?: string | undefined;
73
- scheme?: string | undefined;
74
- bearerFormat?: string | undefined;
75
- username?: string | undefined;
76
- password?: string | undefined;
77
- token?: string | undefined;
78
- }>;
30
+ }, z.core.$strip>;
79
31
  export type SecuritySchemaHttp = z.infer<typeof securityHttpSchema>;
80
- export declare const securityOpenIdSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
32
+ export declare const securityOpenIdSchema: z.ZodObject<{
81
33
  description: z.ZodOptional<z.ZodString>;
82
- }, {
83
34
  type: z.ZodLiteral<"openIdConnect">;
84
- /**
85
- * REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the
86
- * form of a URL. The OpenID Connect standard requires the use of TLS.
87
- */
88
35
  openIdConnectUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
89
- }>, {
90
- uid: z.ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
91
- /** The name key that links a security requirement to a security object */
36
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
92
37
  nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
93
- }>, "strip", z.ZodTypeAny, {
94
- type: "openIdConnect";
95
- uid: string & z.BRAND<"securityScheme">;
96
- nameKey: string;
97
- openIdConnectUrl: string;
98
- description?: string | undefined;
99
- }, {
100
- type: "openIdConnect";
101
- description?: string | undefined;
102
- uid?: string | undefined;
103
- nameKey?: string | undefined;
104
- openIdConnectUrl?: string | undefined;
105
- }>;
38
+ }, z.core.$strip>;
106
39
  export type SecuritySchemaOpenId = z.infer<typeof securityOpenIdSchema>;
107
40
  /** Options for the x-usePkce extension */
108
41
  export declare const pkceOptions: readonly ["SHA-256", "plain", "no"];
109
- export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
42
+ export declare const securityOauthSchema: z.ZodObject<{
110
43
  description: z.ZodOptional<z.ZodString>;
111
- }, {
112
44
  type: z.ZodLiteral<"oauth2">;
113
- /** The default scopes for the oauth flow */
114
- 'x-default-scopes': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
115
- /** REQUIRED. An object containing configuration information for the flow types supported. */
45
+ 'x-default-scopes': z.ZodOptional<z.ZodArray<z.ZodString>>;
116
46
  flows: z.ZodDefault<z.ZodObject<{
117
- implicit: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
118
- /**
119
- * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
120
- * URL. The OAuth2 standard requires the use of TLS.
121
- */
47
+ implicit: z.ZodOptional<z.ZodObject<{
122
48
  refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
123
- /**
124
- * REQUIRED. The available scopes for the OAuth2 security scheme. A map
125
- * between the scope name and a short description for it. The map MAY be empty.
126
- */
127
49
  scopes: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>>;
128
- selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
129
- /** Extension to save the client Id associated with an oauth flow */
50
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
130
51
  'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
131
- /** The auth token */
132
52
  token: z.ZodDefault<z.ZodString>;
133
- /** Additional query parameters for the OAuth authorization request. Example: { prompt: 'consent', audience: 'scalar' }. */
134
53
  'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
135
- /** Additional body parameters for the OAuth token request. Example: { audience: 'foo' }. */
136
54
  'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
137
- /** Extension to specify custom token name in the response (defaults to 'access_token') */
138
55
  'x-tokenName': z.ZodOptional<z.ZodString>;
139
- }, {
140
56
  type: z.ZodDefault<z.ZodLiteral<"implicit">>;
141
57
  authorizationUrl: z.ZodDefault<z.ZodString>;
142
58
  'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
143
- }>, "strip", z.ZodTypeAny, {
144
- type: "implicit";
145
- token: string;
146
- refreshUrl: string;
147
- scopes: Record<string, string>;
148
- selectedScopes: string[];
149
- 'x-scalar-client-id': string;
150
- authorizationUrl: string;
151
- 'x-scalar-redirect-uri': string;
152
- 'x-scalar-security-query'?: Record<string, string> | undefined;
153
- 'x-scalar-security-body'?: Record<string, string> | undefined;
154
- 'x-tokenName'?: string | undefined;
155
- }, {
156
- type?: "implicit" | undefined;
157
- token?: string | undefined;
158
- refreshUrl?: string | undefined;
159
- scopes?: unknown;
160
- selectedScopes?: string[] | undefined;
161
- 'x-scalar-client-id'?: string | undefined;
162
- 'x-scalar-security-query'?: Record<string, string> | undefined;
163
- 'x-scalar-security-body'?: Record<string, string> | undefined;
164
- 'x-tokenName'?: string | undefined;
165
- authorizationUrl?: string | undefined;
166
- 'x-scalar-redirect-uri'?: string | undefined;
167
- }>>;
168
- password: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
169
- /**
170
- * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
171
- * URL. The OAuth2 standard requires the use of TLS.
172
- */
59
+ }, z.core.$strip>>;
60
+ password: z.ZodOptional<z.ZodObject<{
173
61
  refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
174
- /**
175
- * REQUIRED. The available scopes for the OAuth2 security scheme. A map
176
- * between the scope name and a short description for it. The map MAY be empty.
177
- */
178
62
  scopes: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>>;
179
- selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
180
- /** Extension to save the client Id associated with an oauth flow */
63
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
181
64
  'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
182
- /** The auth token */
183
65
  token: z.ZodDefault<z.ZodString>;
184
- /** Additional query parameters for the OAuth authorization request. Example: { prompt: 'consent', audience: 'scalar' }. */
185
66
  'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
186
- /** Additional body parameters for the OAuth token request. Example: { audience: 'foo' }. */
187
67
  'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
188
- /** Extension to specify custom token name in the response (defaults to 'access_token') */
189
68
  'x-tokenName': z.ZodOptional<z.ZodString>;
190
- }, {
191
69
  type: z.ZodDefault<z.ZodLiteral<"password">>;
192
70
  tokenUrl: z.ZodDefault<z.ZodString>;
193
71
  clientSecret: z.ZodDefault<z.ZodString>;
194
72
  username: z.ZodDefault<z.ZodString>;
195
73
  password: z.ZodDefault<z.ZodString>;
196
- 'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
197
- }>, "strip", z.ZodTypeAny, {
198
- type: "password";
199
- username: string;
200
- password: string;
201
- token: string;
202
- refreshUrl: string;
203
- scopes: Record<string, string>;
204
- selectedScopes: string[];
205
- 'x-scalar-client-id': string;
206
- tokenUrl: string;
207
- clientSecret: string;
208
- 'x-scalar-security-query'?: Record<string, string> | undefined;
209
- 'x-scalar-security-body'?: Record<string, string> | undefined;
210
- 'x-tokenName'?: string | undefined;
211
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
212
- }, {
213
- type?: "password" | undefined;
214
- username?: string | undefined;
215
- password?: string | undefined;
216
- token?: string | undefined;
217
- refreshUrl?: string | undefined;
218
- scopes?: unknown;
219
- selectedScopes?: string[] | undefined;
220
- 'x-scalar-client-id'?: string | undefined;
221
- 'x-scalar-security-query'?: Record<string, string> | undefined;
222
- 'x-scalar-security-body'?: Record<string, string> | undefined;
223
- 'x-tokenName'?: string | undefined;
224
- tokenUrl?: string | undefined;
225
- clientSecret?: string | undefined;
226
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
227
- }>>;
228
- clientCredentials: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
229
- /**
230
- * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
231
- * URL. The OAuth2 standard requires the use of TLS.
232
- */
74
+ 'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<{
75
+ header: "header";
76
+ body: "body";
77
+ }>>;
78
+ }, z.core.$strip>>;
79
+ clientCredentials: z.ZodOptional<z.ZodObject<{
233
80
  refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
234
- /**
235
- * REQUIRED. The available scopes for the OAuth2 security scheme. A map
236
- * between the scope name and a short description for it. The map MAY be empty.
237
- */
238
81
  scopes: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>>;
239
- selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
240
- /** Extension to save the client Id associated with an oauth flow */
82
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
241
83
  'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
242
- /** The auth token */
243
84
  token: z.ZodDefault<z.ZodString>;
244
- /** Additional query parameters for the OAuth authorization request. Example: { prompt: 'consent', audience: 'scalar' }. */
245
85
  'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
246
- /** Additional body parameters for the OAuth token request. Example: { audience: 'foo' }. */
247
86
  'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
248
- /** Extension to specify custom token name in the response (defaults to 'access_token') */
249
87
  'x-tokenName': z.ZodOptional<z.ZodString>;
250
- }, {
251
88
  type: z.ZodDefault<z.ZodLiteral<"clientCredentials">>;
252
89
  tokenUrl: z.ZodDefault<z.ZodString>;
253
90
  clientSecret: z.ZodDefault<z.ZodString>;
254
- 'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
255
- }>, "strip", z.ZodTypeAny, {
256
- type: "clientCredentials";
257
- token: string;
258
- refreshUrl: string;
259
- scopes: Record<string, string>;
260
- selectedScopes: string[];
261
- 'x-scalar-client-id': string;
262
- tokenUrl: string;
263
- clientSecret: string;
264
- 'x-scalar-security-query'?: Record<string, string> | undefined;
265
- 'x-scalar-security-body'?: Record<string, string> | undefined;
266
- 'x-tokenName'?: string | undefined;
267
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
268
- }, {
269
- type?: "clientCredentials" | undefined;
270
- token?: string | undefined;
271
- refreshUrl?: string | undefined;
272
- scopes?: unknown;
273
- selectedScopes?: string[] | undefined;
274
- 'x-scalar-client-id'?: string | undefined;
275
- 'x-scalar-security-query'?: Record<string, string> | undefined;
276
- 'x-scalar-security-body'?: Record<string, string> | undefined;
277
- 'x-tokenName'?: string | undefined;
278
- tokenUrl?: string | undefined;
279
- clientSecret?: string | undefined;
280
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
281
- }>>;
282
- authorizationCode: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
283
- /**
284
- * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
285
- * URL. The OAuth2 standard requires the use of TLS.
286
- */
91
+ 'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<{
92
+ header: "header";
93
+ body: "body";
94
+ }>>;
95
+ }, z.core.$strip>>;
96
+ authorizationCode: z.ZodOptional<z.ZodObject<{
287
97
  refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
288
- /**
289
- * REQUIRED. The available scopes for the OAuth2 security scheme. A map
290
- * between the scope name and a short description for it. The map MAY be empty.
291
- */
292
98
  scopes: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>>;
293
- selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
294
- /** Extension to save the client Id associated with an oauth flow */
99
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
295
100
  'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
296
- /** The auth token */
297
101
  token: z.ZodDefault<z.ZodString>;
298
- /** Additional query parameters for the OAuth authorization request. Example: { prompt: 'consent', audience: 'scalar' }. */
299
102
  'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
300
- /** Additional body parameters for the OAuth token request. Example: { audience: 'foo' }. */
301
103
  'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
302
- /** Extension to specify custom token name in the response (defaults to 'access_token') */
303
104
  'x-tokenName': z.ZodOptional<z.ZodString>;
304
- }, {
305
105
  type: z.ZodDefault<z.ZodLiteral<"authorizationCode">>;
306
106
  authorizationUrl: z.ZodDefault<z.ZodString>;
307
- 'x-usePkce': z.ZodDefault<z.ZodOptional<z.ZodEnum<["SHA-256", "plain", "no"]>>>;
107
+ 'x-usePkce': z.ZodDefault<z.ZodOptional<z.ZodEnum<{
108
+ "SHA-256": "SHA-256";
109
+ plain: "plain";
110
+ no: "no";
111
+ }>>>;
308
112
  'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
309
113
  tokenUrl: z.ZodDefault<z.ZodString>;
310
114
  clientSecret: z.ZodDefault<z.ZodString>;
311
- 'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
312
- }>, "strip", z.ZodTypeAny, {
313
- type: "authorizationCode";
314
- token: string;
315
- refreshUrl: string;
316
- scopes: Record<string, string>;
317
- selectedScopes: string[];
318
- 'x-scalar-client-id': string;
319
- authorizationUrl: string;
320
- 'x-scalar-redirect-uri': string;
321
- tokenUrl: string;
322
- clientSecret: string;
323
- 'x-usePkce': "SHA-256" | "plain" | "no";
324
- 'x-scalar-security-query'?: Record<string, string> | undefined;
325
- 'x-scalar-security-body'?: Record<string, string> | undefined;
326
- 'x-tokenName'?: string | undefined;
327
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
328
- }, {
329
- type?: "authorizationCode" | undefined;
330
- token?: string | undefined;
331
- refreshUrl?: string | undefined;
332
- scopes?: unknown;
333
- selectedScopes?: string[] | undefined;
334
- 'x-scalar-client-id'?: string | undefined;
335
- 'x-scalar-security-query'?: Record<string, string> | undefined;
336
- 'x-scalar-security-body'?: Record<string, string> | undefined;
337
- 'x-tokenName'?: string | undefined;
338
- authorizationUrl?: string | undefined;
339
- 'x-scalar-redirect-uri'?: string | undefined;
340
- tokenUrl?: string | undefined;
341
- clientSecret?: string | undefined;
342
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
343
- 'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
344
- }>>;
345
- }, "strip", z.ZodTypeAny, {
346
- password?: {
347
- type: "password";
348
- username: string;
349
- password: string;
350
- token: string;
351
- refreshUrl: string;
352
- scopes: Record<string, string>;
353
- selectedScopes: string[];
354
- 'x-scalar-client-id': string;
355
- tokenUrl: string;
356
- clientSecret: string;
357
- 'x-scalar-security-query'?: Record<string, string> | undefined;
358
- 'x-scalar-security-body'?: Record<string, string> | undefined;
359
- 'x-tokenName'?: string | undefined;
360
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
361
- } | undefined;
362
- implicit?: {
363
- type: "implicit";
364
- token: string;
365
- refreshUrl: string;
366
- scopes: Record<string, string>;
367
- selectedScopes: string[];
368
- 'x-scalar-client-id': string;
369
- authorizationUrl: string;
370
- 'x-scalar-redirect-uri': string;
371
- 'x-scalar-security-query'?: Record<string, string> | undefined;
372
- 'x-scalar-security-body'?: Record<string, string> | undefined;
373
- 'x-tokenName'?: string | undefined;
374
- } | undefined;
375
- clientCredentials?: {
376
- type: "clientCredentials";
377
- token: string;
378
- refreshUrl: string;
379
- scopes: Record<string, string>;
380
- selectedScopes: string[];
381
- 'x-scalar-client-id': string;
382
- tokenUrl: string;
383
- clientSecret: string;
384
- 'x-scalar-security-query'?: Record<string, string> | undefined;
385
- 'x-scalar-security-body'?: Record<string, string> | undefined;
386
- 'x-tokenName'?: string | undefined;
387
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
388
- } | undefined;
389
- authorizationCode?: {
390
- type: "authorizationCode";
391
- token: string;
392
- refreshUrl: string;
393
- scopes: Record<string, string>;
394
- selectedScopes: string[];
395
- 'x-scalar-client-id': string;
396
- authorizationUrl: string;
397
- 'x-scalar-redirect-uri': string;
398
- tokenUrl: string;
399
- clientSecret: string;
400
- 'x-usePkce': "SHA-256" | "plain" | "no";
401
- 'x-scalar-security-query'?: Record<string, string> | undefined;
402
- 'x-scalar-security-body'?: Record<string, string> | undefined;
403
- 'x-tokenName'?: string | undefined;
404
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
405
- } | undefined;
406
- }, {
407
- password?: {
408
- type?: "password" | undefined;
409
- username?: string | undefined;
410
- password?: string | undefined;
411
- token?: string | undefined;
412
- refreshUrl?: string | undefined;
413
- scopes?: unknown;
414
- selectedScopes?: string[] | undefined;
415
- 'x-scalar-client-id'?: string | undefined;
416
- 'x-scalar-security-query'?: Record<string, string> | undefined;
417
- 'x-scalar-security-body'?: Record<string, string> | undefined;
418
- 'x-tokenName'?: string | undefined;
419
- tokenUrl?: string | undefined;
420
- clientSecret?: string | undefined;
421
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
422
- } | undefined;
423
- implicit?: {
424
- type?: "implicit" | undefined;
425
- token?: string | undefined;
426
- refreshUrl?: string | undefined;
427
- scopes?: unknown;
428
- selectedScopes?: string[] | undefined;
429
- 'x-scalar-client-id'?: string | undefined;
430
- 'x-scalar-security-query'?: Record<string, string> | undefined;
431
- 'x-scalar-security-body'?: Record<string, string> | undefined;
432
- 'x-tokenName'?: string | undefined;
433
- authorizationUrl?: string | undefined;
434
- 'x-scalar-redirect-uri'?: string | undefined;
435
- } | undefined;
436
- clientCredentials?: {
437
- type?: "clientCredentials" | undefined;
438
- token?: string | undefined;
439
- refreshUrl?: string | undefined;
440
- scopes?: unknown;
441
- selectedScopes?: string[] | undefined;
442
- 'x-scalar-client-id'?: string | undefined;
443
- 'x-scalar-security-query'?: Record<string, string> | undefined;
444
- 'x-scalar-security-body'?: Record<string, string> | undefined;
445
- 'x-tokenName'?: string | undefined;
446
- tokenUrl?: string | undefined;
447
- clientSecret?: string | undefined;
448
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
449
- } | undefined;
450
- authorizationCode?: {
451
- type?: "authorizationCode" | undefined;
452
- token?: string | undefined;
453
- refreshUrl?: string | undefined;
454
- scopes?: unknown;
455
- selectedScopes?: string[] | undefined;
456
- 'x-scalar-client-id'?: string | undefined;
457
- 'x-scalar-security-query'?: Record<string, string> | undefined;
458
- 'x-scalar-security-body'?: Record<string, string> | undefined;
459
- 'x-tokenName'?: string | undefined;
460
- authorizationUrl?: string | undefined;
461
- 'x-scalar-redirect-uri'?: string | undefined;
462
- tokenUrl?: string | undefined;
463
- clientSecret?: string | undefined;
464
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
465
- 'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
466
- } | undefined;
467
- }>>;
468
- }>, {
469
- uid: z.ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
470
- /** The name key that links a security requirement to a security object */
115
+ 'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<{
116
+ header: "header";
117
+ body: "body";
118
+ }>>;
119
+ }, z.core.$strip>>;
120
+ }, z.core.$strip>>;
121
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
471
122
  nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
472
- }>, "strip", z.ZodTypeAny, {
473
- type: "oauth2";
474
- uid: string & z.BRAND<"securityScheme">;
475
- nameKey: string;
476
- flows: {
477
- password?: {
478
- type: "password";
479
- username: string;
480
- password: string;
481
- token: string;
482
- refreshUrl: string;
483
- scopes: Record<string, string>;
484
- selectedScopes: string[];
485
- 'x-scalar-client-id': string;
486
- tokenUrl: string;
487
- clientSecret: string;
488
- 'x-scalar-security-query'?: Record<string, string> | undefined;
489
- 'x-scalar-security-body'?: Record<string, string> | undefined;
490
- 'x-tokenName'?: string | undefined;
491
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
492
- } | undefined;
493
- implicit?: {
494
- type: "implicit";
495
- token: string;
496
- refreshUrl: string;
497
- scopes: Record<string, string>;
498
- selectedScopes: string[];
499
- 'x-scalar-client-id': string;
500
- authorizationUrl: string;
501
- 'x-scalar-redirect-uri': string;
502
- 'x-scalar-security-query'?: Record<string, string> | undefined;
503
- 'x-scalar-security-body'?: Record<string, string> | undefined;
504
- 'x-tokenName'?: string | undefined;
505
- } | undefined;
506
- clientCredentials?: {
507
- type: "clientCredentials";
508
- token: string;
509
- refreshUrl: string;
510
- scopes: Record<string, string>;
511
- selectedScopes: string[];
512
- 'x-scalar-client-id': string;
513
- tokenUrl: string;
514
- clientSecret: string;
515
- 'x-scalar-security-query'?: Record<string, string> | undefined;
516
- 'x-scalar-security-body'?: Record<string, string> | undefined;
517
- 'x-tokenName'?: string | undefined;
518
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
519
- } | undefined;
520
- authorizationCode?: {
521
- type: "authorizationCode";
522
- token: string;
523
- refreshUrl: string;
524
- scopes: Record<string, string>;
525
- selectedScopes: string[];
526
- 'x-scalar-client-id': string;
527
- authorizationUrl: string;
528
- 'x-scalar-redirect-uri': string;
529
- tokenUrl: string;
530
- clientSecret: string;
531
- 'x-usePkce': "SHA-256" | "plain" | "no";
532
- 'x-scalar-security-query'?: Record<string, string> | undefined;
533
- 'x-scalar-security-body'?: Record<string, string> | undefined;
534
- 'x-tokenName'?: string | undefined;
535
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
536
- } | undefined;
537
- };
538
- description?: string | undefined;
539
- 'x-default-scopes'?: string | string[] | undefined;
540
- }, {
541
- type: "oauth2";
542
- description?: string | undefined;
543
- uid?: string | undefined;
544
- nameKey?: string | undefined;
545
- 'x-default-scopes'?: string | string[] | undefined;
546
- flows?: {
547
- password?: {
548
- type?: "password" | undefined;
549
- username?: string | undefined;
550
- password?: string | undefined;
551
- token?: string | undefined;
552
- refreshUrl?: string | undefined;
553
- scopes?: unknown;
554
- selectedScopes?: string[] | undefined;
555
- 'x-scalar-client-id'?: string | undefined;
556
- 'x-scalar-security-query'?: Record<string, string> | undefined;
557
- 'x-scalar-security-body'?: Record<string, string> | undefined;
558
- 'x-tokenName'?: string | undefined;
559
- tokenUrl?: string | undefined;
560
- clientSecret?: string | undefined;
561
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
562
- } | undefined;
563
- implicit?: {
564
- type?: "implicit" | undefined;
565
- token?: string | undefined;
566
- refreshUrl?: string | undefined;
567
- scopes?: unknown;
568
- selectedScopes?: string[] | undefined;
569
- 'x-scalar-client-id'?: string | undefined;
570
- 'x-scalar-security-query'?: Record<string, string> | undefined;
571
- 'x-scalar-security-body'?: Record<string, string> | undefined;
572
- 'x-tokenName'?: string | undefined;
573
- authorizationUrl?: string | undefined;
574
- 'x-scalar-redirect-uri'?: string | undefined;
575
- } | undefined;
576
- clientCredentials?: {
577
- type?: "clientCredentials" | undefined;
578
- token?: string | undefined;
579
- refreshUrl?: string | undefined;
580
- scopes?: unknown;
581
- selectedScopes?: string[] | undefined;
582
- 'x-scalar-client-id'?: string | undefined;
583
- 'x-scalar-security-query'?: Record<string, string> | undefined;
584
- 'x-scalar-security-body'?: Record<string, string> | undefined;
585
- 'x-tokenName'?: string | undefined;
586
- tokenUrl?: string | undefined;
587
- clientSecret?: string | undefined;
588
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
589
- } | undefined;
590
- authorizationCode?: {
591
- type?: "authorizationCode" | undefined;
592
- token?: string | undefined;
593
- refreshUrl?: string | undefined;
594
- scopes?: unknown;
595
- selectedScopes?: string[] | undefined;
596
- 'x-scalar-client-id'?: string | undefined;
597
- 'x-scalar-security-query'?: Record<string, string> | undefined;
598
- 'x-scalar-security-body'?: Record<string, string> | undefined;
599
- 'x-tokenName'?: string | undefined;
600
- authorizationUrl?: string | undefined;
601
- 'x-scalar-redirect-uri'?: string | undefined;
602
- tokenUrl?: string | undefined;
603
- clientSecret?: string | undefined;
604
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
605
- 'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
606
- } | undefined;
607
- } | undefined;
608
- }>;
123
+ }, z.core.$strip>;
609
124
  export type SecuritySchemeOauth2 = z.infer<typeof securityOauthSchema>;
610
125
  export type SecuritySchemeOauth2Payload = z.input<typeof securityOauthSchema>;
611
126
  export type Oauth2Flow = NonNullable<SecuritySchemeOauth2['flows']['authorizationCode' | 'clientCredentials' | 'implicit' | 'password']>;
@@ -621,1063 +136,285 @@ export type Oauth2FlowPayload = NonNullable<SecuritySchemeOauth2Payload['flows']
621
136
  *
622
137
  * @see https://spec.openapis.org/oas/latest.html#security-requirement-object
623
138
  */
624
- export declare const oasSecurityRequirementSchema: z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>>;
139
+ export declare const oasSecurityRequirementSchema: z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>>;
625
140
  /** OAS Compliant security schemes */
626
- export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
141
+ export declare const oasSecuritySchemeSchema: z.ZodUnion<readonly [z.ZodObject<{
627
142
  description: z.ZodOptional<z.ZodString>;
628
- }, {
629
143
  type: z.ZodLiteral<"apiKey">;
630
- /** REQUIRED. The name of the header, query or cookie parameter to be used. */
631
144
  name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
632
- /** REQUIRED. The location of the API key. Valid values are "query", "header" or "cookie". */
633
- in: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["query", "header", "cookie"]>>>>;
634
- }>, "strip", z.ZodTypeAny, {
635
- type: "apiKey";
636
- name: string;
637
- in: "cookie" | "query" | "header";
638
- description?: string | undefined;
639
- }, {
640
- type: "apiKey";
641
- name?: string | undefined;
642
- description?: string | undefined;
643
- in?: unknown;
644
- }>, z.ZodObject<z.objectUtil.extendShape<{
145
+ in: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
146
+ cookie: "cookie";
147
+ query: "query";
148
+ header: "header";
149
+ }>>>>;
150
+ }, z.core.$strip>, z.ZodObject<{
645
151
  description: z.ZodOptional<z.ZodString>;
646
- }, {
647
152
  type: z.ZodLiteral<"http">;
648
- /**
649
- * REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in
650
- * [RFC7235]. The values used SHOULD be registered in the IANA Authentication Scheme registry.
651
- */
652
- scheme: z.ZodDefault<z.ZodOptional<z.ZodPipeline<z.ZodString, z.ZodEnum<["basic", "bearer"]>>>>;
653
- /**
654
- * A hint to the client to identify how the bearer token is formatted.
655
- * Bearer tokens are usually generated by an authorization server, so
656
- * this information is primarily for documentation purposes.
657
- */
658
- bearerFormat: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"JWT">, z.ZodString]>>>;
659
- }>, "strip", z.ZodTypeAny, {
660
- type: "http";
661
- scheme: "basic" | "bearer";
662
- bearerFormat: string;
663
- description?: string | undefined;
664
- }, {
665
- type: "http";
666
- description?: string | undefined;
667
- scheme?: string | undefined;
668
- bearerFormat?: string | undefined;
669
- }>, z.ZodObject<z.objectUtil.extendShape<{
153
+ scheme: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodEnum<{
154
+ basic: "basic";
155
+ bearer: "bearer";
156
+ }>>>>;
157
+ bearerFormat: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"JWT">, z.ZodString]>>>;
158
+ }, z.core.$strip>, z.ZodObject<{
670
159
  description: z.ZodOptional<z.ZodString>;
671
- }, {
672
160
  type: z.ZodLiteral<"oauth2">;
673
- /** The default scopes for the oauth flow */
674
- 'x-default-scopes': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
675
- /** REQUIRED. An object containing configuration information for the flow types supported. */
161
+ 'x-default-scopes': z.ZodOptional<z.ZodArray<z.ZodString>>;
676
162
  flows: z.ZodDefault<z.ZodObject<{
677
- implicit: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
678
- /**
679
- * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
680
- * URL. The OAuth2 standard requires the use of TLS.
681
- */
163
+ implicit: z.ZodOptional<z.ZodObject<{
682
164
  refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
683
- /**
684
- * REQUIRED. The available scopes for the OAuth2 security scheme. A map
685
- * between the scope name and a short description for it. The map MAY be empty.
686
- */
687
165
  scopes: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>>;
688
- selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
689
- /** Extension to save the client Id associated with an oauth flow */
166
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
690
167
  'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
691
- /** The auth token */
692
168
  token: z.ZodDefault<z.ZodString>;
693
- /** Additional query parameters for the OAuth authorization request. Example: { prompt: 'consent', audience: 'scalar' }. */
694
169
  'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
695
- /** Additional body parameters for the OAuth token request. Example: { audience: 'foo' }. */
696
170
  'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
697
- /** Extension to specify custom token name in the response (defaults to 'access_token') */
698
171
  'x-tokenName': z.ZodOptional<z.ZodString>;
699
- }, {
700
172
  type: z.ZodDefault<z.ZodLiteral<"implicit">>;
701
173
  authorizationUrl: z.ZodDefault<z.ZodString>;
702
174
  'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
703
- }>, "strip", z.ZodTypeAny, {
704
- type: "implicit";
705
- token: string;
706
- refreshUrl: string;
707
- scopes: Record<string, string>;
708
- selectedScopes: string[];
709
- 'x-scalar-client-id': string;
710
- authorizationUrl: string;
711
- 'x-scalar-redirect-uri': string;
712
- 'x-scalar-security-query'?: Record<string, string> | undefined;
713
- 'x-scalar-security-body'?: Record<string, string> | undefined;
714
- 'x-tokenName'?: string | undefined;
715
- }, {
716
- type?: "implicit" | undefined;
717
- token?: string | undefined;
718
- refreshUrl?: string | undefined;
719
- scopes?: unknown;
720
- selectedScopes?: string[] | undefined;
721
- 'x-scalar-client-id'?: string | undefined;
722
- 'x-scalar-security-query'?: Record<string, string> | undefined;
723
- 'x-scalar-security-body'?: Record<string, string> | undefined;
724
- 'x-tokenName'?: string | undefined;
725
- authorizationUrl?: string | undefined;
726
- 'x-scalar-redirect-uri'?: string | undefined;
727
- }>>;
728
- password: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
729
- /**
730
- * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
731
- * URL. The OAuth2 standard requires the use of TLS.
732
- */
175
+ }, z.core.$strip>>;
176
+ password: z.ZodOptional<z.ZodObject<{
733
177
  refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
734
- /**
735
- * REQUIRED. The available scopes for the OAuth2 security scheme. A map
736
- * between the scope name and a short description for it. The map MAY be empty.
737
- */
738
178
  scopes: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>>;
739
- selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
740
- /** Extension to save the client Id associated with an oauth flow */
179
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
741
180
  'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
742
- /** The auth token */
743
181
  token: z.ZodDefault<z.ZodString>;
744
- /** Additional query parameters for the OAuth authorization request. Example: { prompt: 'consent', audience: 'scalar' }. */
745
182
  'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
746
- /** Additional body parameters for the OAuth token request. Example: { audience: 'foo' }. */
747
183
  'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
748
- /** Extension to specify custom token name in the response (defaults to 'access_token') */
749
184
  'x-tokenName': z.ZodOptional<z.ZodString>;
750
- }, {
751
185
  type: z.ZodDefault<z.ZodLiteral<"password">>;
752
186
  tokenUrl: z.ZodDefault<z.ZodString>;
753
187
  clientSecret: z.ZodDefault<z.ZodString>;
754
188
  username: z.ZodDefault<z.ZodString>;
755
189
  password: z.ZodDefault<z.ZodString>;
756
- 'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
757
- }>, "strip", z.ZodTypeAny, {
758
- type: "password";
759
- username: string;
760
- password: string;
761
- token: string;
762
- refreshUrl: string;
763
- scopes: Record<string, string>;
764
- selectedScopes: string[];
765
- 'x-scalar-client-id': string;
766
- tokenUrl: string;
767
- clientSecret: string;
768
- 'x-scalar-security-query'?: Record<string, string> | undefined;
769
- 'x-scalar-security-body'?: Record<string, string> | undefined;
770
- 'x-tokenName'?: string | undefined;
771
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
772
- }, {
773
- type?: "password" | undefined;
774
- username?: string | undefined;
775
- password?: string | undefined;
776
- token?: string | undefined;
777
- refreshUrl?: string | undefined;
778
- scopes?: unknown;
779
- selectedScopes?: string[] | undefined;
780
- 'x-scalar-client-id'?: string | undefined;
781
- 'x-scalar-security-query'?: Record<string, string> | undefined;
782
- 'x-scalar-security-body'?: Record<string, string> | undefined;
783
- 'x-tokenName'?: string | undefined;
784
- tokenUrl?: string | undefined;
785
- clientSecret?: string | undefined;
786
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
787
- }>>;
788
- clientCredentials: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
789
- /**
790
- * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
791
- * URL. The OAuth2 standard requires the use of TLS.
792
- */
190
+ 'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<{
191
+ header: "header";
192
+ body: "body";
193
+ }>>;
194
+ }, z.core.$strip>>;
195
+ clientCredentials: z.ZodOptional<z.ZodObject<{
793
196
  refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
794
- /**
795
- * REQUIRED. The available scopes for the OAuth2 security scheme. A map
796
- * between the scope name and a short description for it. The map MAY be empty.
797
- */
798
197
  scopes: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>>;
799
- selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
800
- /** Extension to save the client Id associated with an oauth flow */
198
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
801
199
  'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
802
- /** The auth token */
803
200
  token: z.ZodDefault<z.ZodString>;
804
- /** Additional query parameters for the OAuth authorization request. Example: { prompt: 'consent', audience: 'scalar' }. */
805
201
  'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
806
- /** Additional body parameters for the OAuth token request. Example: { audience: 'foo' }. */
807
202
  'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
808
- /** Extension to specify custom token name in the response (defaults to 'access_token') */
809
203
  'x-tokenName': z.ZodOptional<z.ZodString>;
810
- }, {
811
204
  type: z.ZodDefault<z.ZodLiteral<"clientCredentials">>;
812
205
  tokenUrl: z.ZodDefault<z.ZodString>;
813
206
  clientSecret: z.ZodDefault<z.ZodString>;
814
- 'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
815
- }>, "strip", z.ZodTypeAny, {
816
- type: "clientCredentials";
817
- token: string;
818
- refreshUrl: string;
819
- scopes: Record<string, string>;
820
- selectedScopes: string[];
821
- 'x-scalar-client-id': string;
822
- tokenUrl: string;
823
- clientSecret: string;
824
- 'x-scalar-security-query'?: Record<string, string> | undefined;
825
- 'x-scalar-security-body'?: Record<string, string> | undefined;
826
- 'x-tokenName'?: string | undefined;
827
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
828
- }, {
829
- type?: "clientCredentials" | undefined;
830
- token?: string | undefined;
831
- refreshUrl?: string | undefined;
832
- scopes?: unknown;
833
- selectedScopes?: string[] | undefined;
834
- 'x-scalar-client-id'?: string | undefined;
835
- 'x-scalar-security-query'?: Record<string, string> | undefined;
836
- 'x-scalar-security-body'?: Record<string, string> | undefined;
837
- 'x-tokenName'?: string | undefined;
838
- tokenUrl?: string | undefined;
839
- clientSecret?: string | undefined;
840
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
841
- }>>;
842
- authorizationCode: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
843
- /**
844
- * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
845
- * URL. The OAuth2 standard requires the use of TLS.
846
- */
207
+ 'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<{
208
+ header: "header";
209
+ body: "body";
210
+ }>>;
211
+ }, z.core.$strip>>;
212
+ authorizationCode: z.ZodOptional<z.ZodObject<{
847
213
  refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
848
- /**
849
- * REQUIRED. The available scopes for the OAuth2 security scheme. A map
850
- * between the scope name and a short description for it. The map MAY be empty.
851
- */
852
214
  scopes: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>>;
853
- selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
854
- /** Extension to save the client Id associated with an oauth flow */
215
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
855
216
  'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
856
- /** The auth token */
857
217
  token: z.ZodDefault<z.ZodString>;
858
- /** Additional query parameters for the OAuth authorization request. Example: { prompt: 'consent', audience: 'scalar' }. */
859
218
  'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
860
- /** Additional body parameters for the OAuth token request. Example: { audience: 'foo' }. */
861
219
  'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
862
- /** Extension to specify custom token name in the response (defaults to 'access_token') */
863
220
  'x-tokenName': z.ZodOptional<z.ZodString>;
864
- }, {
865
221
  type: z.ZodDefault<z.ZodLiteral<"authorizationCode">>;
866
222
  authorizationUrl: z.ZodDefault<z.ZodString>;
867
- 'x-usePkce': z.ZodDefault<z.ZodOptional<z.ZodEnum<["SHA-256", "plain", "no"]>>>;
223
+ 'x-usePkce': z.ZodDefault<z.ZodOptional<z.ZodEnum<{
224
+ "SHA-256": "SHA-256";
225
+ plain: "plain";
226
+ no: "no";
227
+ }>>>;
868
228
  'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
869
229
  tokenUrl: z.ZodDefault<z.ZodString>;
870
230
  clientSecret: z.ZodDefault<z.ZodString>;
871
- 'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
872
- }>, "strip", z.ZodTypeAny, {
873
- type: "authorizationCode";
874
- token: string;
875
- refreshUrl: string;
876
- scopes: Record<string, string>;
877
- selectedScopes: string[];
878
- 'x-scalar-client-id': string;
879
- authorizationUrl: string;
880
- 'x-scalar-redirect-uri': string;
881
- tokenUrl: string;
882
- clientSecret: string;
883
- 'x-usePkce': "SHA-256" | "plain" | "no";
884
- 'x-scalar-security-query'?: Record<string, string> | undefined;
885
- 'x-scalar-security-body'?: Record<string, string> | undefined;
886
- 'x-tokenName'?: string | undefined;
887
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
888
- }, {
889
- type?: "authorizationCode" | undefined;
890
- token?: string | undefined;
891
- refreshUrl?: string | undefined;
892
- scopes?: unknown;
893
- selectedScopes?: string[] | undefined;
894
- 'x-scalar-client-id'?: string | undefined;
895
- 'x-scalar-security-query'?: Record<string, string> | undefined;
896
- 'x-scalar-security-body'?: Record<string, string> | undefined;
897
- 'x-tokenName'?: string | undefined;
898
- authorizationUrl?: string | undefined;
899
- 'x-scalar-redirect-uri'?: string | undefined;
900
- tokenUrl?: string | undefined;
901
- clientSecret?: string | undefined;
902
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
903
- 'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
904
- }>>;
905
- }, "strip", z.ZodTypeAny, {
906
- password?: {
907
- type: "password";
908
- username: string;
909
- password: string;
910
- token: string;
911
- refreshUrl: string;
912
- scopes: Record<string, string>;
913
- selectedScopes: string[];
914
- 'x-scalar-client-id': string;
915
- tokenUrl: string;
916
- clientSecret: string;
917
- 'x-scalar-security-query'?: Record<string, string> | undefined;
918
- 'x-scalar-security-body'?: Record<string, string> | undefined;
919
- 'x-tokenName'?: string | undefined;
920
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
921
- } | undefined;
922
- implicit?: {
923
- type: "implicit";
924
- token: string;
925
- refreshUrl: string;
926
- scopes: Record<string, string>;
927
- selectedScopes: string[];
928
- 'x-scalar-client-id': string;
929
- authorizationUrl: string;
930
- 'x-scalar-redirect-uri': string;
931
- 'x-scalar-security-query'?: Record<string, string> | undefined;
932
- 'x-scalar-security-body'?: Record<string, string> | undefined;
933
- 'x-tokenName'?: string | undefined;
934
- } | undefined;
935
- clientCredentials?: {
936
- type: "clientCredentials";
937
- token: string;
938
- refreshUrl: string;
939
- scopes: Record<string, string>;
940
- selectedScopes: string[];
941
- 'x-scalar-client-id': string;
942
- tokenUrl: string;
943
- clientSecret: string;
944
- 'x-scalar-security-query'?: Record<string, string> | undefined;
945
- 'x-scalar-security-body'?: Record<string, string> | undefined;
946
- 'x-tokenName'?: string | undefined;
947
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
948
- } | undefined;
949
- authorizationCode?: {
950
- type: "authorizationCode";
951
- token: string;
952
- refreshUrl: string;
953
- scopes: Record<string, string>;
954
- selectedScopes: string[];
955
- 'x-scalar-client-id': string;
956
- authorizationUrl: string;
957
- 'x-scalar-redirect-uri': string;
958
- tokenUrl: string;
959
- clientSecret: string;
960
- 'x-usePkce': "SHA-256" | "plain" | "no";
961
- 'x-scalar-security-query'?: Record<string, string> | undefined;
962
- 'x-scalar-security-body'?: Record<string, string> | undefined;
963
- 'x-tokenName'?: string | undefined;
964
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
965
- } | undefined;
966
- }, {
967
- password?: {
968
- type?: "password" | undefined;
969
- username?: string | undefined;
970
- password?: string | undefined;
971
- token?: string | undefined;
972
- refreshUrl?: string | undefined;
973
- scopes?: unknown;
974
- selectedScopes?: string[] | undefined;
975
- 'x-scalar-client-id'?: string | undefined;
976
- 'x-scalar-security-query'?: Record<string, string> | undefined;
977
- 'x-scalar-security-body'?: Record<string, string> | undefined;
978
- 'x-tokenName'?: string | undefined;
979
- tokenUrl?: string | undefined;
980
- clientSecret?: string | undefined;
981
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
982
- } | undefined;
983
- implicit?: {
984
- type?: "implicit" | undefined;
985
- token?: string | undefined;
986
- refreshUrl?: string | undefined;
987
- scopes?: unknown;
988
- selectedScopes?: string[] | undefined;
989
- 'x-scalar-client-id'?: string | undefined;
990
- 'x-scalar-security-query'?: Record<string, string> | undefined;
991
- 'x-scalar-security-body'?: Record<string, string> | undefined;
992
- 'x-tokenName'?: string | undefined;
993
- authorizationUrl?: string | undefined;
994
- 'x-scalar-redirect-uri'?: string | undefined;
995
- } | undefined;
996
- clientCredentials?: {
997
- type?: "clientCredentials" | undefined;
998
- token?: string | undefined;
999
- refreshUrl?: string | undefined;
1000
- scopes?: unknown;
1001
- selectedScopes?: string[] | undefined;
1002
- 'x-scalar-client-id'?: string | undefined;
1003
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1004
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1005
- 'x-tokenName'?: string | undefined;
1006
- tokenUrl?: string | undefined;
1007
- clientSecret?: string | undefined;
1008
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1009
- } | undefined;
1010
- authorizationCode?: {
1011
- type?: "authorizationCode" | undefined;
1012
- token?: string | undefined;
1013
- refreshUrl?: string | undefined;
1014
- scopes?: unknown;
1015
- selectedScopes?: string[] | undefined;
1016
- 'x-scalar-client-id'?: string | undefined;
1017
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1018
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1019
- 'x-tokenName'?: string | undefined;
1020
- authorizationUrl?: string | undefined;
1021
- 'x-scalar-redirect-uri'?: string | undefined;
1022
- tokenUrl?: string | undefined;
1023
- clientSecret?: string | undefined;
1024
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1025
- 'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
1026
- } | undefined;
1027
- }>>;
1028
- }>, "strip", z.ZodTypeAny, {
1029
- type: "oauth2";
1030
- flows: {
1031
- password?: {
1032
- type: "password";
1033
- username: string;
1034
- password: string;
1035
- token: string;
1036
- refreshUrl: string;
1037
- scopes: Record<string, string>;
1038
- selectedScopes: string[];
1039
- 'x-scalar-client-id': string;
1040
- tokenUrl: string;
1041
- clientSecret: string;
1042
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1043
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1044
- 'x-tokenName'?: string | undefined;
1045
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1046
- } | undefined;
1047
- implicit?: {
1048
- type: "implicit";
1049
- token: string;
1050
- refreshUrl: string;
1051
- scopes: Record<string, string>;
1052
- selectedScopes: string[];
1053
- 'x-scalar-client-id': string;
1054
- authorizationUrl: string;
1055
- 'x-scalar-redirect-uri': string;
1056
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1057
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1058
- 'x-tokenName'?: string | undefined;
1059
- } | undefined;
1060
- clientCredentials?: {
1061
- type: "clientCredentials";
1062
- token: string;
1063
- refreshUrl: string;
1064
- scopes: Record<string, string>;
1065
- selectedScopes: string[];
1066
- 'x-scalar-client-id': string;
1067
- tokenUrl: string;
1068
- clientSecret: string;
1069
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1070
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1071
- 'x-tokenName'?: string | undefined;
1072
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1073
- } | undefined;
1074
- authorizationCode?: {
1075
- type: "authorizationCode";
1076
- token: string;
1077
- refreshUrl: string;
1078
- scopes: Record<string, string>;
1079
- selectedScopes: string[];
1080
- 'x-scalar-client-id': string;
1081
- authorizationUrl: string;
1082
- 'x-scalar-redirect-uri': string;
1083
- tokenUrl: string;
1084
- clientSecret: string;
1085
- 'x-usePkce': "SHA-256" | "plain" | "no";
1086
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1087
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1088
- 'x-tokenName'?: string | undefined;
1089
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1090
- } | undefined;
1091
- };
1092
- description?: string | undefined;
1093
- 'x-default-scopes'?: string | string[] | undefined;
1094
- }, {
1095
- type: "oauth2";
1096
- description?: string | undefined;
1097
- 'x-default-scopes'?: string | string[] | undefined;
1098
- flows?: {
1099
- password?: {
1100
- type?: "password" | undefined;
1101
- username?: string | undefined;
1102
- password?: string | undefined;
1103
- token?: string | undefined;
1104
- refreshUrl?: string | undefined;
1105
- scopes?: unknown;
1106
- selectedScopes?: string[] | undefined;
1107
- 'x-scalar-client-id'?: string | undefined;
1108
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1109
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1110
- 'x-tokenName'?: string | undefined;
1111
- tokenUrl?: string | undefined;
1112
- clientSecret?: string | undefined;
1113
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1114
- } | undefined;
1115
- implicit?: {
1116
- type?: "implicit" | undefined;
1117
- token?: string | undefined;
1118
- refreshUrl?: string | undefined;
1119
- scopes?: unknown;
1120
- selectedScopes?: string[] | undefined;
1121
- 'x-scalar-client-id'?: string | undefined;
1122
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1123
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1124
- 'x-tokenName'?: string | undefined;
1125
- authorizationUrl?: string | undefined;
1126
- 'x-scalar-redirect-uri'?: string | undefined;
1127
- } | undefined;
1128
- clientCredentials?: {
1129
- type?: "clientCredentials" | undefined;
1130
- token?: string | undefined;
1131
- refreshUrl?: string | undefined;
1132
- scopes?: unknown;
1133
- selectedScopes?: string[] | undefined;
1134
- 'x-scalar-client-id'?: string | undefined;
1135
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1136
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1137
- 'x-tokenName'?: string | undefined;
1138
- tokenUrl?: string | undefined;
1139
- clientSecret?: string | undefined;
1140
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1141
- } | undefined;
1142
- authorizationCode?: {
1143
- type?: "authorizationCode" | undefined;
1144
- token?: string | undefined;
1145
- refreshUrl?: string | undefined;
1146
- scopes?: unknown;
1147
- selectedScopes?: string[] | undefined;
1148
- 'x-scalar-client-id'?: string | undefined;
1149
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1150
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1151
- 'x-tokenName'?: string | undefined;
1152
- authorizationUrl?: string | undefined;
1153
- 'x-scalar-redirect-uri'?: string | undefined;
1154
- tokenUrl?: string | undefined;
1155
- clientSecret?: string | undefined;
1156
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1157
- 'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
1158
- } | undefined;
1159
- } | undefined;
1160
- }>, z.ZodObject<z.objectUtil.extendShape<{
231
+ 'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<{
232
+ header: "header";
233
+ body: "body";
234
+ }>>;
235
+ }, z.core.$strip>>;
236
+ }, z.core.$strip>>;
237
+ }, z.core.$strip>, z.ZodObject<{
1161
238
  description: z.ZodOptional<z.ZodString>;
1162
- }, {
1163
239
  type: z.ZodLiteral<"openIdConnect">;
1164
- /**
1165
- * REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the
1166
- * form of a URL. The OpenID Connect standard requires the use of TLS.
1167
- */
1168
240
  openIdConnectUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1169
- }>, "strip", z.ZodTypeAny, {
1170
- type: "openIdConnect";
1171
- openIdConnectUrl: string;
1172
- description?: string | undefined;
1173
- }, {
1174
- type: "openIdConnect";
1175
- description?: string | undefined;
1176
- openIdConnectUrl?: string | undefined;
1177
- }>]>;
241
+ }, z.core.$strip>]>;
1178
242
  /** Extended security schemes for workspace usage */
1179
- export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
243
+ export declare const securitySchemeSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject<{
1180
244
  description: z.ZodOptional<z.ZodString>;
1181
- }, {
1182
245
  type: z.ZodLiteral<"apiKey">;
1183
- /** REQUIRED. The name of the header, query or cookie parameter to be used. */
1184
246
  name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1185
- /** REQUIRED. The location of the API key. Valid values are "query", "header" or "cookie". */
1186
- in: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<["query", "header", "cookie"]>>>>;
1187
- }>, {
1188
- uid: z.ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
1189
- /** The name key that links a security requirement to a security object */
247
+ in: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
248
+ cookie: "cookie";
249
+ query: "query";
250
+ header: "header";
251
+ }>>>>;
252
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
1190
253
  nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1191
- }>, {
1192
254
  value: z.ZodDefault<z.ZodString>;
1193
- }>, "strip", z.ZodTypeAny, {
1194
- type: "apiKey";
1195
- value: string;
1196
- name: string;
1197
- uid: string & z.BRAND<"securityScheme">;
1198
- nameKey: string;
1199
- in: "cookie" | "query" | "header";
1200
- description?: string | undefined;
1201
- }, {
1202
- type: "apiKey";
1203
- value?: string | undefined;
1204
- name?: string | undefined;
1205
- description?: string | undefined;
1206
- uid?: string | undefined;
1207
- nameKey?: string | undefined;
1208
- in?: unknown;
1209
- }>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
255
+ }, z.core.$strip>, z.ZodObject<{
1210
256
  description: z.ZodOptional<z.ZodString>;
1211
- }, {
1212
257
  type: z.ZodLiteral<"http">;
1213
- /**
1214
- * REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in
1215
- * [RFC7235]. The values used SHOULD be registered in the IANA Authentication Scheme registry.
1216
- */
1217
- scheme: z.ZodDefault<z.ZodOptional<z.ZodPipeline<z.ZodString, z.ZodEnum<["basic", "bearer"]>>>>;
1218
- /**
1219
- * A hint to the client to identify how the bearer token is formatted.
1220
- * Bearer tokens are usually generated by an authorization server, so
1221
- * this information is primarily for documentation purposes.
1222
- */
1223
- bearerFormat: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"JWT">, z.ZodString]>>>;
1224
- }>, {
1225
- uid: z.ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
1226
- /** The name key that links a security requirement to a security object */
258
+ scheme: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodEnum<{
259
+ basic: "basic";
260
+ bearer: "bearer";
261
+ }>>>>;
262
+ bearerFormat: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"JWT">, z.ZodString]>>>;
263
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
1227
264
  nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1228
- }>, {
1229
265
  username: z.ZodDefault<z.ZodString>;
1230
266
  password: z.ZodDefault<z.ZodString>;
1231
267
  token: z.ZodDefault<z.ZodString>;
1232
- }>, "strip", z.ZodTypeAny, {
1233
- type: "http";
1234
- uid: string & z.BRAND<"securityScheme">;
1235
- nameKey: string;
1236
- scheme: "basic" | "bearer";
1237
- bearerFormat: string;
1238
- username: string;
1239
- password: string;
1240
- token: string;
1241
- description?: string | undefined;
1242
- }, {
1243
- type: "http";
1244
- description?: string | undefined;
1245
- uid?: string | undefined;
1246
- nameKey?: string | undefined;
1247
- scheme?: string | undefined;
1248
- bearerFormat?: string | undefined;
1249
- username?: string | undefined;
1250
- password?: string | undefined;
1251
- token?: string | undefined;
1252
- }>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
268
+ }, z.core.$strip>, z.ZodObject<{
1253
269
  description: z.ZodOptional<z.ZodString>;
1254
- }, {
1255
270
  type: z.ZodLiteral<"openIdConnect">;
1256
- /**
1257
- * REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the
1258
- * form of a URL. The OpenID Connect standard requires the use of TLS.
1259
- */
1260
271
  openIdConnectUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1261
- }>, {
1262
- uid: z.ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
1263
- /** The name key that links a security requirement to a security object */
272
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
1264
273
  nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1265
- }>, "strip", z.ZodTypeAny, {
1266
- type: "openIdConnect";
1267
- uid: string & z.BRAND<"securityScheme">;
1268
- nameKey: string;
1269
- openIdConnectUrl: string;
1270
- description?: string | undefined;
1271
- }, {
1272
- type: "openIdConnect";
1273
- description?: string | undefined;
1274
- uid?: string | undefined;
1275
- nameKey?: string | undefined;
1276
- openIdConnectUrl?: string | undefined;
1277
- }>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
274
+ }, z.core.$strip>, z.ZodObject<{
1278
275
  description: z.ZodOptional<z.ZodString>;
1279
- }, {
1280
276
  type: z.ZodLiteral<"oauth2">;
1281
- /** The default scopes for the oauth flow */
1282
- 'x-default-scopes': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1283
- /** REQUIRED. An object containing configuration information for the flow types supported. */
277
+ 'x-default-scopes': z.ZodOptional<z.ZodArray<z.ZodString>>;
1284
278
  flows: z.ZodDefault<z.ZodObject<{
1285
- implicit: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
1286
- /**
1287
- * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
1288
- * URL. The OAuth2 standard requires the use of TLS.
1289
- */
279
+ implicit: z.ZodOptional<z.ZodObject<{
1290
280
  refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1291
- /**
1292
- * REQUIRED. The available scopes for the OAuth2 security scheme. A map
1293
- * between the scope name and a short description for it. The map MAY be empty.
1294
- */
1295
281
  scopes: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>>;
1296
- selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
1297
- /** Extension to save the client Id associated with an oauth flow */
282
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
1298
283
  'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
1299
- /** The auth token */
1300
284
  token: z.ZodDefault<z.ZodString>;
1301
- /** Additional query parameters for the OAuth authorization request. Example: { prompt: 'consent', audience: 'scalar' }. */
1302
285
  'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1303
- /** Additional body parameters for the OAuth token request. Example: { audience: 'foo' }. */
1304
286
  'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1305
- /** Extension to specify custom token name in the response (defaults to 'access_token') */
1306
287
  'x-tokenName': z.ZodOptional<z.ZodString>;
1307
- }, {
1308
288
  type: z.ZodDefault<z.ZodLiteral<"implicit">>;
1309
289
  authorizationUrl: z.ZodDefault<z.ZodString>;
1310
290
  'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
1311
- }>, "strip", z.ZodTypeAny, {
1312
- type: "implicit";
1313
- token: string;
1314
- refreshUrl: string;
1315
- scopes: Record<string, string>;
1316
- selectedScopes: string[];
1317
- 'x-scalar-client-id': string;
1318
- authorizationUrl: string;
1319
- 'x-scalar-redirect-uri': string;
1320
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1321
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1322
- 'x-tokenName'?: string | undefined;
1323
- }, {
1324
- type?: "implicit" | undefined;
1325
- token?: string | undefined;
1326
- refreshUrl?: string | undefined;
1327
- scopes?: unknown;
1328
- selectedScopes?: string[] | undefined;
1329
- 'x-scalar-client-id'?: string | undefined;
1330
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1331
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1332
- 'x-tokenName'?: string | undefined;
1333
- authorizationUrl?: string | undefined;
1334
- 'x-scalar-redirect-uri'?: string | undefined;
1335
- }>>;
1336
- password: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
1337
- /**
1338
- * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
1339
- * URL. The OAuth2 standard requires the use of TLS.
1340
- */
291
+ }, z.core.$strip>>;
292
+ password: z.ZodOptional<z.ZodObject<{
1341
293
  refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1342
- /**
1343
- * REQUIRED. The available scopes for the OAuth2 security scheme. A map
1344
- * between the scope name and a short description for it. The map MAY be empty.
1345
- */
1346
294
  scopes: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>>;
1347
- selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
1348
- /** Extension to save the client Id associated with an oauth flow */
295
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
1349
296
  'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
1350
- /** The auth token */
1351
297
  token: z.ZodDefault<z.ZodString>;
1352
- /** Additional query parameters for the OAuth authorization request. Example: { prompt: 'consent', audience: 'scalar' }. */
1353
298
  'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1354
- /** Additional body parameters for the OAuth token request. Example: { audience: 'foo' }. */
1355
299
  'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1356
- /** Extension to specify custom token name in the response (defaults to 'access_token') */
1357
300
  'x-tokenName': z.ZodOptional<z.ZodString>;
1358
- }, {
1359
301
  type: z.ZodDefault<z.ZodLiteral<"password">>;
1360
302
  tokenUrl: z.ZodDefault<z.ZodString>;
1361
303
  clientSecret: z.ZodDefault<z.ZodString>;
1362
304
  username: z.ZodDefault<z.ZodString>;
1363
305
  password: z.ZodDefault<z.ZodString>;
1364
- 'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
1365
- }>, "strip", z.ZodTypeAny, {
1366
- type: "password";
1367
- username: string;
1368
- password: string;
1369
- token: string;
1370
- refreshUrl: string;
1371
- scopes: Record<string, string>;
1372
- selectedScopes: string[];
1373
- 'x-scalar-client-id': string;
1374
- tokenUrl: string;
1375
- clientSecret: string;
1376
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1377
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1378
- 'x-tokenName'?: string | undefined;
1379
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1380
- }, {
1381
- type?: "password" | undefined;
1382
- username?: string | undefined;
1383
- password?: string | undefined;
1384
- token?: string | undefined;
1385
- refreshUrl?: string | undefined;
1386
- scopes?: unknown;
1387
- selectedScopes?: string[] | undefined;
1388
- 'x-scalar-client-id'?: string | undefined;
1389
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1390
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1391
- 'x-tokenName'?: string | undefined;
1392
- tokenUrl?: string | undefined;
1393
- clientSecret?: string | undefined;
1394
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1395
- }>>;
1396
- clientCredentials: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
1397
- /**
1398
- * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
1399
- * URL. The OAuth2 standard requires the use of TLS.
1400
- */
306
+ 'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<{
307
+ header: "header";
308
+ body: "body";
309
+ }>>;
310
+ }, z.core.$strip>>;
311
+ clientCredentials: z.ZodOptional<z.ZodObject<{
1401
312
  refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1402
- /**
1403
- * REQUIRED. The available scopes for the OAuth2 security scheme. A map
1404
- * between the scope name and a short description for it. The map MAY be empty.
1405
- */
1406
313
  scopes: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>>;
1407
- selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
1408
- /** Extension to save the client Id associated with an oauth flow */
314
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
1409
315
  'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
1410
- /** The auth token */
1411
316
  token: z.ZodDefault<z.ZodString>;
1412
- /** Additional query parameters for the OAuth authorization request. Example: { prompt: 'consent', audience: 'scalar' }. */
1413
317
  'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1414
- /** Additional body parameters for the OAuth token request. Example: { audience: 'foo' }. */
1415
318
  'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1416
- /** Extension to specify custom token name in the response (defaults to 'access_token') */
1417
319
  'x-tokenName': z.ZodOptional<z.ZodString>;
1418
- }, {
1419
- type: z.ZodDefault<z.ZodLiteral<"clientCredentials">>;
1420
- tokenUrl: z.ZodDefault<z.ZodString>;
1421
- clientSecret: z.ZodDefault<z.ZodString>;
1422
- 'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
1423
- }>, "strip", z.ZodTypeAny, {
1424
- type: "clientCredentials";
1425
- token: string;
1426
- refreshUrl: string;
1427
- scopes: Record<string, string>;
1428
- selectedScopes: string[];
1429
- 'x-scalar-client-id': string;
1430
- tokenUrl: string;
1431
- clientSecret: string;
1432
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1433
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1434
- 'x-tokenName'?: string | undefined;
1435
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1436
- }, {
1437
- type?: "clientCredentials" | undefined;
1438
- token?: string | undefined;
1439
- refreshUrl?: string | undefined;
1440
- scopes?: unknown;
1441
- selectedScopes?: string[] | undefined;
1442
- 'x-scalar-client-id'?: string | undefined;
1443
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1444
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1445
- 'x-tokenName'?: string | undefined;
1446
- tokenUrl?: string | undefined;
1447
- clientSecret?: string | undefined;
1448
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1449
- }>>;
1450
- authorizationCode: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
1451
- /**
1452
- * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
1453
- * URL. The OAuth2 standard requires the use of TLS.
1454
- */
320
+ type: z.ZodDefault<z.ZodLiteral<"clientCredentials">>;
321
+ tokenUrl: z.ZodDefault<z.ZodString>;
322
+ clientSecret: z.ZodDefault<z.ZodString>;
323
+ 'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<{
324
+ header: "header";
325
+ body: "body";
326
+ }>>;
327
+ }, z.core.$strip>>;
328
+ authorizationCode: z.ZodOptional<z.ZodObject<{
1455
329
  refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1456
- /**
1457
- * REQUIRED. The available scopes for the OAuth2 security scheme. A map
1458
- * between the scope name and a short description for it. The map MAY be empty.
1459
- */
1460
330
  scopes: z.ZodCatch<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>>;
1461
- selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
1462
- /** Extension to save the client Id associated with an oauth flow */
331
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
1463
332
  'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
1464
- /** The auth token */
1465
333
  token: z.ZodDefault<z.ZodString>;
1466
- /** Additional query parameters for the OAuth authorization request. Example: { prompt: 'consent', audience: 'scalar' }. */
1467
334
  'x-scalar-security-query': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1468
- /** Additional body parameters for the OAuth token request. Example: { audience: 'foo' }. */
1469
335
  'x-scalar-security-body': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1470
- /** Extension to specify custom token name in the response (defaults to 'access_token') */
1471
336
  'x-tokenName': z.ZodOptional<z.ZodString>;
1472
- }, {
1473
337
  type: z.ZodDefault<z.ZodLiteral<"authorizationCode">>;
1474
338
  authorizationUrl: z.ZodDefault<z.ZodString>;
1475
- 'x-usePkce': z.ZodDefault<z.ZodOptional<z.ZodEnum<["SHA-256", "plain", "no"]>>>;
339
+ 'x-usePkce': z.ZodDefault<z.ZodOptional<z.ZodEnum<{
340
+ "SHA-256": "SHA-256";
341
+ plain: "plain";
342
+ no: "no";
343
+ }>>>;
1476
344
  'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
1477
345
  tokenUrl: z.ZodDefault<z.ZodString>;
1478
346
  clientSecret: z.ZodDefault<z.ZodString>;
1479
- 'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<["header", "body"]>>;
1480
- }>, "strip", z.ZodTypeAny, {
1481
- type: "authorizationCode";
1482
- token: string;
347
+ 'x-scalar-credentials-location': z.ZodOptional<z.ZodEnum<{
348
+ header: "header";
349
+ body: "body";
350
+ }>>;
351
+ }, z.core.$strip>>;
352
+ }, z.core.$strip>>;
353
+ uid: z.core.$ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
354
+ nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
355
+ }, z.core.$strip>], "type">, z.ZodTransform<{
356
+ type: "apiKey";
357
+ name: string;
358
+ in: "cookie" | "query" | "header";
359
+ uid: string & z.core.$brand<"securityScheme">;
360
+ nameKey: string;
361
+ value: string;
362
+ description?: string | undefined;
363
+ } | {
364
+ type: "http";
365
+ scheme: "basic" | "bearer";
366
+ bearerFormat: string;
367
+ uid: string & z.core.$brand<"securityScheme">;
368
+ nameKey: string;
369
+ username: string;
370
+ password: string;
371
+ token: string;
372
+ description?: string | undefined;
373
+ } | {
374
+ type: "openIdConnect";
375
+ openIdConnectUrl: string;
376
+ uid: string & z.core.$brand<"securityScheme">;
377
+ nameKey: string;
378
+ description?: string | undefined;
379
+ } | {
380
+ type: "oauth2";
381
+ flows: {
382
+ implicit?: {
1483
383
  refreshUrl: string;
1484
384
  scopes: Record<string, string>;
1485
385
  selectedScopes: string[];
1486
386
  'x-scalar-client-id': string;
1487
- authorizationUrl: string;
1488
- 'x-scalar-redirect-uri': string;
1489
- tokenUrl: string;
1490
- clientSecret: string;
1491
- 'x-usePkce': "SHA-256" | "plain" | "no";
1492
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1493
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1494
- 'x-tokenName'?: string | undefined;
1495
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1496
- }, {
1497
- type?: "authorizationCode" | undefined;
1498
- token?: string | undefined;
1499
- refreshUrl?: string | undefined;
1500
- scopes?: unknown;
1501
- selectedScopes?: string[] | undefined;
1502
- 'x-scalar-client-id'?: string | undefined;
1503
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1504
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1505
- 'x-tokenName'?: string | undefined;
1506
- authorizationUrl?: string | undefined;
1507
- 'x-scalar-redirect-uri'?: string | undefined;
1508
- tokenUrl?: string | undefined;
1509
- clientSecret?: string | undefined;
1510
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1511
- 'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
1512
- }>>;
1513
- }, "strip", z.ZodTypeAny, {
1514
- password?: {
1515
- type: "password";
1516
- username: string;
1517
- password: string;
1518
387
  token: string;
1519
- refreshUrl: string;
1520
- scopes: Record<string, string>;
1521
- selectedScopes: string[];
1522
- 'x-scalar-client-id': string;
1523
- tokenUrl: string;
1524
- clientSecret: string;
1525
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1526
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1527
- 'x-tokenName'?: string | undefined;
1528
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1529
- } | undefined;
1530
- implicit?: {
1531
388
  type: "implicit";
1532
- token: string;
1533
- refreshUrl: string;
1534
- scopes: Record<string, string>;
1535
- selectedScopes: string[];
1536
- 'x-scalar-client-id': string;
1537
389
  authorizationUrl: string;
1538
390
  'x-scalar-redirect-uri': string;
1539
391
  'x-scalar-security-query'?: Record<string, string> | undefined;
1540
392
  'x-scalar-security-body'?: Record<string, string> | undefined;
1541
393
  'x-tokenName'?: string | undefined;
1542
394
  } | undefined;
1543
- clientCredentials?: {
1544
- type: "clientCredentials";
1545
- token: string;
395
+ password?: {
1546
396
  refreshUrl: string;
1547
397
  scopes: Record<string, string>;
1548
398
  selectedScopes: string[];
1549
399
  'x-scalar-client-id': string;
1550
- tokenUrl: string;
1551
- clientSecret: string;
1552
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1553
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1554
- 'x-tokenName'?: string | undefined;
1555
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1556
- } | undefined;
1557
- authorizationCode?: {
1558
- type: "authorizationCode";
1559
400
  token: string;
1560
- refreshUrl: string;
1561
- scopes: Record<string, string>;
1562
- selectedScopes: string[];
1563
- 'x-scalar-client-id': string;
1564
- authorizationUrl: string;
1565
- 'x-scalar-redirect-uri': string;
401
+ type: "password";
1566
402
  tokenUrl: string;
1567
403
  clientSecret: string;
1568
- 'x-usePkce': "SHA-256" | "plain" | "no";
1569
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1570
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1571
- 'x-tokenName'?: string | undefined;
1572
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1573
- } | undefined;
1574
- }, {
1575
- password?: {
1576
- type?: "password" | undefined;
1577
- username?: string | undefined;
1578
- password?: string | undefined;
1579
- token?: string | undefined;
1580
- refreshUrl?: string | undefined;
1581
- scopes?: unknown;
1582
- selectedScopes?: string[] | undefined;
1583
- 'x-scalar-client-id'?: string | undefined;
1584
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1585
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1586
- 'x-tokenName'?: string | undefined;
1587
- tokenUrl?: string | undefined;
1588
- clientSecret?: string | undefined;
1589
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1590
- } | undefined;
1591
- implicit?: {
1592
- type?: "implicit" | undefined;
1593
- token?: string | undefined;
1594
- refreshUrl?: string | undefined;
1595
- scopes?: unknown;
1596
- selectedScopes?: string[] | undefined;
1597
- 'x-scalar-client-id'?: string | undefined;
1598
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1599
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1600
- 'x-tokenName'?: string | undefined;
1601
- authorizationUrl?: string | undefined;
1602
- 'x-scalar-redirect-uri'?: string | undefined;
1603
- } | undefined;
1604
- clientCredentials?: {
1605
- type?: "clientCredentials" | undefined;
1606
- token?: string | undefined;
1607
- refreshUrl?: string | undefined;
1608
- scopes?: unknown;
1609
- selectedScopes?: string[] | undefined;
1610
- 'x-scalar-client-id'?: string | undefined;
1611
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1612
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1613
- 'x-tokenName'?: string | undefined;
1614
- tokenUrl?: string | undefined;
1615
- clientSecret?: string | undefined;
1616
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1617
- } | undefined;
1618
- authorizationCode?: {
1619
- type?: "authorizationCode" | undefined;
1620
- token?: string | undefined;
1621
- refreshUrl?: string | undefined;
1622
- scopes?: unknown;
1623
- selectedScopes?: string[] | undefined;
1624
- 'x-scalar-client-id'?: string | undefined;
1625
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1626
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1627
- 'x-tokenName'?: string | undefined;
1628
- authorizationUrl?: string | undefined;
1629
- 'x-scalar-redirect-uri'?: string | undefined;
1630
- tokenUrl?: string | undefined;
1631
- clientSecret?: string | undefined;
1632
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1633
- 'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
1634
- } | undefined;
1635
- }>>;
1636
- }>, {
1637
- uid: z.ZodBranded<z.ZodDefault<z.ZodOptional<z.ZodString>>, "securityScheme">;
1638
- /** The name key that links a security requirement to a security object */
1639
- nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1640
- }>, "strip", z.ZodTypeAny, {
1641
- type: "oauth2";
1642
- uid: string & z.BRAND<"securityScheme">;
1643
- nameKey: string;
1644
- flows: {
1645
- password?: {
1646
- type: "password";
1647
404
  username: string;
1648
405
  password: string;
1649
- token: string;
1650
- refreshUrl: string;
1651
- scopes: Record<string, string>;
1652
- selectedScopes: string[];
1653
- 'x-scalar-client-id': string;
1654
- tokenUrl: string;
1655
- clientSecret: string;
1656
406
  'x-scalar-security-query'?: Record<string, string> | undefined;
1657
407
  'x-scalar-security-body'?: Record<string, string> | undefined;
1658
408
  'x-tokenName'?: string | undefined;
1659
409
  'x-scalar-credentials-location'?: "header" | "body" | undefined;
1660
410
  } | undefined;
1661
- implicit?: {
1662
- type: "implicit";
1663
- token: string;
1664
- refreshUrl: string;
1665
- scopes: Record<string, string>;
1666
- selectedScopes: string[];
1667
- 'x-scalar-client-id': string;
1668
- authorizationUrl: string;
1669
- 'x-scalar-redirect-uri': string;
1670
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1671
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1672
- 'x-tokenName'?: string | undefined;
1673
- } | undefined;
1674
411
  clientCredentials?: {
1675
- type: "clientCredentials";
1676
- token: string;
1677
412
  refreshUrl: string;
1678
413
  scopes: Record<string, string>;
1679
414
  selectedScopes: string[];
1680
415
  'x-scalar-client-id': string;
416
+ token: string;
417
+ type: "clientCredentials";
1681
418
  tokenUrl: string;
1682
419
  clientSecret: string;
1683
420
  'x-scalar-security-query'?: Record<string, string> | undefined;
@@ -1686,158 +423,90 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
1686
423
  'x-scalar-credentials-location'?: "header" | "body" | undefined;
1687
424
  } | undefined;
1688
425
  authorizationCode?: {
1689
- type: "authorizationCode";
1690
- token: string;
1691
426
  refreshUrl: string;
1692
427
  scopes: Record<string, string>;
1693
428
  selectedScopes: string[];
1694
429
  'x-scalar-client-id': string;
430
+ token: string;
431
+ type: "authorizationCode";
1695
432
  authorizationUrl: string;
433
+ 'x-usePkce': "SHA-256" | "plain" | "no";
1696
434
  'x-scalar-redirect-uri': string;
1697
435
  tokenUrl: string;
1698
436
  clientSecret: string;
1699
- 'x-usePkce': "SHA-256" | "plain" | "no";
1700
437
  'x-scalar-security-query'?: Record<string, string> | undefined;
1701
438
  'x-scalar-security-body'?: Record<string, string> | undefined;
1702
439
  'x-tokenName'?: string | undefined;
1703
440
  'x-scalar-credentials-location'?: "header" | "body" | undefined;
1704
441
  } | undefined;
1705
442
  };
443
+ uid: string & z.core.$brand<"securityScheme">;
444
+ nameKey: string;
1706
445
  description?: string | undefined;
1707
- 'x-default-scopes'?: string | string[] | undefined;
446
+ 'x-default-scopes'?: string[] | undefined;
1708
447
  }, {
1709
- type: "oauth2";
1710
- description?: string | undefined;
1711
- uid?: string | undefined;
1712
- nameKey?: string | undefined;
1713
- 'x-default-scopes'?: string | string[] | undefined;
1714
- flows?: {
1715
- password?: {
1716
- type?: "password" | undefined;
1717
- username?: string | undefined;
1718
- password?: string | undefined;
1719
- token?: string | undefined;
1720
- refreshUrl?: string | undefined;
1721
- scopes?: unknown;
1722
- selectedScopes?: string[] | undefined;
1723
- 'x-scalar-client-id'?: string | undefined;
1724
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1725
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1726
- 'x-tokenName'?: string | undefined;
1727
- tokenUrl?: string | undefined;
1728
- clientSecret?: string | undefined;
1729
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1730
- } | undefined;
1731
- implicit?: {
1732
- type?: "implicit" | undefined;
1733
- token?: string | undefined;
1734
- refreshUrl?: string | undefined;
1735
- scopes?: unknown;
1736
- selectedScopes?: string[] | undefined;
1737
- 'x-scalar-client-id'?: string | undefined;
1738
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1739
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1740
- 'x-tokenName'?: string | undefined;
1741
- authorizationUrl?: string | undefined;
1742
- 'x-scalar-redirect-uri'?: string | undefined;
1743
- } | undefined;
1744
- clientCredentials?: {
1745
- type?: "clientCredentials" | undefined;
1746
- token?: string | undefined;
1747
- refreshUrl?: string | undefined;
1748
- scopes?: unknown;
1749
- selectedScopes?: string[] | undefined;
1750
- 'x-scalar-client-id'?: string | undefined;
1751
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1752
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1753
- 'x-tokenName'?: string | undefined;
1754
- tokenUrl?: string | undefined;
1755
- clientSecret?: string | undefined;
1756
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1757
- } | undefined;
1758
- authorizationCode?: {
1759
- type?: "authorizationCode" | undefined;
1760
- token?: string | undefined;
1761
- refreshUrl?: string | undefined;
1762
- scopes?: unknown;
1763
- selectedScopes?: string[] | undefined;
1764
- 'x-scalar-client-id'?: string | undefined;
1765
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1766
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1767
- 'x-tokenName'?: string | undefined;
1768
- authorizationUrl?: string | undefined;
1769
- 'x-scalar-redirect-uri'?: string | undefined;
1770
- tokenUrl?: string | undefined;
1771
- clientSecret?: string | undefined;
1772
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1773
- 'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
1774
- } | undefined;
1775
- } | undefined;
1776
- }>]>, {
1777
448
  type: "apiKey";
1778
- value: string;
1779
449
  name: string;
1780
- uid: string & z.BRAND<"securityScheme">;
1781
- nameKey: string;
1782
450
  in: "cookie" | "query" | "header";
451
+ uid: string & z.core.$brand<"securityScheme">;
452
+ nameKey: string;
453
+ value: string;
1783
454
  description?: string | undefined;
1784
455
  } | {
1785
456
  type: "http";
1786
- uid: string & z.BRAND<"securityScheme">;
1787
- nameKey: string;
1788
457
  scheme: "basic" | "bearer";
1789
458
  bearerFormat: string;
459
+ uid: string & z.core.$brand<"securityScheme">;
460
+ nameKey: string;
1790
461
  username: string;
1791
462
  password: string;
1792
463
  token: string;
1793
464
  description?: string | undefined;
1794
465
  } | {
1795
466
  type: "openIdConnect";
1796
- uid: string & z.BRAND<"securityScheme">;
1797
- nameKey: string;
1798
467
  openIdConnectUrl: string;
468
+ uid: string & z.core.$brand<"securityScheme">;
469
+ nameKey: string;
1799
470
  description?: string | undefined;
1800
471
  } | {
1801
472
  type: "oauth2";
1802
- uid: string & z.BRAND<"securityScheme">;
1803
- nameKey: string;
1804
473
  flows: {
1805
- password?: {
1806
- type: "password";
1807
- username: string;
1808
- password: string;
1809
- token: string;
474
+ implicit?: {
1810
475
  refreshUrl: string;
1811
476
  scopes: Record<string, string>;
1812
477
  selectedScopes: string[];
1813
478
  'x-scalar-client-id': string;
1814
- tokenUrl: string;
1815
- clientSecret: string;
479
+ token: string;
480
+ type: "implicit";
481
+ authorizationUrl: string;
482
+ 'x-scalar-redirect-uri': string;
1816
483
  'x-scalar-security-query'?: Record<string, string> | undefined;
1817
484
  'x-scalar-security-body'?: Record<string, string> | undefined;
1818
485
  'x-tokenName'?: string | undefined;
1819
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1820
486
  } | undefined;
1821
- implicit?: {
1822
- type: "implicit";
1823
- token: string;
487
+ password?: {
1824
488
  refreshUrl: string;
1825
489
  scopes: Record<string, string>;
1826
490
  selectedScopes: string[];
1827
491
  'x-scalar-client-id': string;
1828
- authorizationUrl: string;
1829
- 'x-scalar-redirect-uri': string;
492
+ token: string;
493
+ type: "password";
494
+ tokenUrl: string;
495
+ clientSecret: string;
496
+ username: string;
497
+ password: string;
1830
498
  'x-scalar-security-query'?: Record<string, string> | undefined;
1831
499
  'x-scalar-security-body'?: Record<string, string> | undefined;
1832
500
  'x-tokenName'?: string | undefined;
501
+ 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1833
502
  } | undefined;
1834
503
  clientCredentials?: {
1835
- type: "clientCredentials";
1836
- token: string;
1837
504
  refreshUrl: string;
1838
505
  scopes: Record<string, string>;
1839
506
  selectedScopes: string[];
1840
507
  'x-scalar-client-id': string;
508
+ token: string;
509
+ type: "clientCredentials";
1841
510
  tokenUrl: string;
1842
511
  clientSecret: string;
1843
512
  'x-scalar-security-query'?: Record<string, string> | undefined;
@@ -1846,118 +515,28 @@ export declare const securitySchemeSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
1846
515
  'x-scalar-credentials-location'?: "header" | "body" | undefined;
1847
516
  } | undefined;
1848
517
  authorizationCode?: {
1849
- type: "authorizationCode";
1850
- token: string;
1851
518
  refreshUrl: string;
1852
519
  scopes: Record<string, string>;
1853
520
  selectedScopes: string[];
1854
521
  'x-scalar-client-id': string;
522
+ token: string;
523
+ type: "authorizationCode";
1855
524
  authorizationUrl: string;
525
+ 'x-usePkce': "SHA-256" | "plain" | "no";
1856
526
  'x-scalar-redirect-uri': string;
1857
527
  tokenUrl: string;
1858
528
  clientSecret: string;
1859
- 'x-usePkce': "SHA-256" | "plain" | "no";
1860
529
  'x-scalar-security-query'?: Record<string, string> | undefined;
1861
530
  'x-scalar-security-body'?: Record<string, string> | undefined;
1862
531
  'x-tokenName'?: string | undefined;
1863
532
  'x-scalar-credentials-location'?: "header" | "body" | undefined;
1864
533
  } | undefined;
1865
534
  };
535
+ uid: string & z.core.$brand<"securityScheme">;
536
+ nameKey: string;
1866
537
  description?: string | undefined;
1867
- 'x-default-scopes'?: string | string[] | undefined;
1868
- }, {
1869
- type: "apiKey";
1870
- value?: string | undefined;
1871
- name?: string | undefined;
1872
- description?: string | undefined;
1873
- uid?: string | undefined;
1874
- nameKey?: string | undefined;
1875
- in?: unknown;
1876
- } | {
1877
- type: "http";
1878
- description?: string | undefined;
1879
- uid?: string | undefined;
1880
- nameKey?: string | undefined;
1881
- scheme?: string | undefined;
1882
- bearerFormat?: string | undefined;
1883
- username?: string | undefined;
1884
- password?: string | undefined;
1885
- token?: string | undefined;
1886
- } | {
1887
- type: "openIdConnect";
1888
- description?: string | undefined;
1889
- uid?: string | undefined;
1890
- nameKey?: string | undefined;
1891
- openIdConnectUrl?: string | undefined;
1892
- } | {
1893
- type: "oauth2";
1894
- description?: string | undefined;
1895
- uid?: string | undefined;
1896
- nameKey?: string | undefined;
1897
- 'x-default-scopes'?: string | string[] | undefined;
1898
- flows?: {
1899
- password?: {
1900
- type?: "password" | undefined;
1901
- username?: string | undefined;
1902
- password?: string | undefined;
1903
- token?: string | undefined;
1904
- refreshUrl?: string | undefined;
1905
- scopes?: unknown;
1906
- selectedScopes?: string[] | undefined;
1907
- 'x-scalar-client-id'?: string | undefined;
1908
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1909
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1910
- 'x-tokenName'?: string | undefined;
1911
- tokenUrl?: string | undefined;
1912
- clientSecret?: string | undefined;
1913
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1914
- } | undefined;
1915
- implicit?: {
1916
- type?: "implicit" | undefined;
1917
- token?: string | undefined;
1918
- refreshUrl?: string | undefined;
1919
- scopes?: unknown;
1920
- selectedScopes?: string[] | undefined;
1921
- 'x-scalar-client-id'?: string | undefined;
1922
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1923
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1924
- 'x-tokenName'?: string | undefined;
1925
- authorizationUrl?: string | undefined;
1926
- 'x-scalar-redirect-uri'?: string | undefined;
1927
- } | undefined;
1928
- clientCredentials?: {
1929
- type?: "clientCredentials" | undefined;
1930
- token?: string | undefined;
1931
- refreshUrl?: string | undefined;
1932
- scopes?: unknown;
1933
- selectedScopes?: string[] | undefined;
1934
- 'x-scalar-client-id'?: string | undefined;
1935
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1936
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1937
- 'x-tokenName'?: string | undefined;
1938
- tokenUrl?: string | undefined;
1939
- clientSecret?: string | undefined;
1940
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1941
- } | undefined;
1942
- authorizationCode?: {
1943
- type?: "authorizationCode" | undefined;
1944
- token?: string | undefined;
1945
- refreshUrl?: string | undefined;
1946
- scopes?: unknown;
1947
- selectedScopes?: string[] | undefined;
1948
- 'x-scalar-client-id'?: string | undefined;
1949
- 'x-scalar-security-query'?: Record<string, string> | undefined;
1950
- 'x-scalar-security-body'?: Record<string, string> | undefined;
1951
- 'x-tokenName'?: string | undefined;
1952
- authorizationUrl?: string | undefined;
1953
- 'x-scalar-redirect-uri'?: string | undefined;
1954
- tokenUrl?: string | undefined;
1955
- clientSecret?: string | undefined;
1956
- 'x-scalar-credentials-location'?: "header" | "body" | undefined;
1957
- 'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
1958
- } | undefined;
1959
- } | undefined;
1960
- }>;
538
+ 'x-default-scopes'?: string[] | undefined;
539
+ }>>;
1961
540
  /**
1962
541
  * Security Scheme Object
1963
542
  *