@scalar/oas-utils 0.2.77 → 0.2.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/entities/spec/collection.d.ts +0 -278
- package/dist/entities/spec/collection.d.ts.map +1 -1
- package/dist/entities/spec/collection.js +1 -8
- package/dist/entities/spec/index.js +1 -1
- package/dist/entities/spec/requests.d.ts +2 -2
- package/dist/entities/spec/security.d.ts +1123 -783
- package/dist/entities/spec/security.d.ts.map +1 -1
- package/dist/entities/spec/security.js +73 -133
- package/dist/entities/workspace/workspace.d.ts +3 -7
- package/dist/entities/workspace/workspace.d.ts.map +1 -1
- package/dist/entities/workspace/workspace.js +0 -2
- package/dist/migrations/data-version.d.ts +3 -2
- package/dist/migrations/data-version.d.ts.map +1 -1
- package/dist/migrations/data-version.js +3 -2
- package/dist/migrations/local-storage.d.ts.map +1 -1
- package/dist/migrations/local-storage.js +3 -5
- package/dist/migrations/migrator.d.ts +2 -2
- package/dist/migrations/migrator.d.ts.map +1 -1
- package/dist/migrations/migrator.js +16 -13
- package/dist/migrations/v-0.0.0/types.generated.d.ts +139 -90
- package/dist/migrations/v-0.0.0/types.generated.d.ts.map +1 -1
- package/dist/migrations/v-2.1.0/migration.d.ts +11 -340
- package/dist/migrations/v-2.1.0/migration.d.ts.map +1 -1
- package/dist/migrations/v-2.1.0/migration.js +67 -46
- package/dist/migrations/v-2.1.0/types.generated.d.ts +353 -28
- package/dist/migrations/v-2.1.0/types.generated.d.ts.map +1 -1
- package/dist/migrations/v-2.2.0/index.d.ts +3 -0
- package/dist/migrations/v-2.2.0/index.d.ts.map +1 -0
- package/dist/migrations/v-2.2.0/index.js +1 -0
- package/dist/migrations/v-2.2.0/migration.d.ts +5 -0
- package/dist/migrations/v-2.2.0/migration.d.ts.map +1 -0
- package/dist/migrations/v-2.2.0/migration.js +110 -0
- package/dist/migrations/v-2.2.0/types.generated.d.ts +41 -0
- package/dist/migrations/v-2.2.0/types.generated.d.ts.map +1 -0
- package/dist/transforms/import-spec.d.ts +9 -4
- package/dist/transforms/import-spec.d.ts.map +1 -1
- package/dist/transforms/import-spec.js +74 -99
- package/dist/transforms/index.js +1 -1
- package/package.json +10 -5
|
@@ -1,100 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
/**
|
|
3
|
-
* Value schema for each type of OAuth Flow
|
|
4
|
-
* Request Examples can store populated values for a given security scheme
|
|
5
|
-
*/
|
|
6
|
-
export declare const securitySchemeExampleValueSchema: z.ZodUnion<[z.ZodObject<{
|
|
7
|
-
type: z.ZodDefault<z.ZodLiteral<"apiKey">>;
|
|
8
|
-
name: z.ZodDefault<z.ZodString>;
|
|
9
|
-
value: z.ZodDefault<z.ZodString>;
|
|
10
|
-
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
type: "apiKey";
|
|
12
|
-
value: string;
|
|
13
|
-
name: string;
|
|
14
|
-
}, {
|
|
15
|
-
type?: "apiKey" | undefined;
|
|
16
|
-
value?: string | undefined;
|
|
17
|
-
name?: string | undefined;
|
|
18
|
-
}>, z.ZodObject<{
|
|
19
|
-
type: z.ZodDefault<z.ZodLiteral<"http">>;
|
|
20
|
-
username: z.ZodDefault<z.ZodString>;
|
|
21
|
-
password: z.ZodDefault<z.ZodString>;
|
|
22
|
-
token: z.ZodDefault<z.ZodString>;
|
|
23
|
-
}, "strip", z.ZodTypeAny, {
|
|
24
|
-
type: "http";
|
|
25
|
-
username: string;
|
|
26
|
-
password: string;
|
|
27
|
-
token: string;
|
|
28
|
-
}, {
|
|
29
|
-
type?: "http" | undefined;
|
|
30
|
-
username?: string | undefined;
|
|
31
|
-
password?: string | undefined;
|
|
32
|
-
token?: string | undefined;
|
|
33
|
-
}>, z.ZodObject<{
|
|
34
|
-
type: z.ZodDefault<z.ZodLiteral<"oauth-implicit">>;
|
|
35
|
-
token: z.ZodDefault<z.ZodString>;
|
|
36
|
-
}, "strip", z.ZodTypeAny, {
|
|
37
|
-
type: "oauth-implicit";
|
|
38
|
-
token: string;
|
|
39
|
-
}, {
|
|
40
|
-
type?: "oauth-implicit" | undefined;
|
|
41
|
-
token?: string | undefined;
|
|
42
|
-
}>, z.ZodObject<{
|
|
43
|
-
type: z.ZodDefault<z.ZodLiteral<"oauth-password">>;
|
|
44
|
-
token: z.ZodDefault<z.ZodString>;
|
|
45
|
-
username: z.ZodDefault<z.ZodString>;
|
|
46
|
-
password: z.ZodDefault<z.ZodString>;
|
|
47
|
-
clientSecret: z.ZodDefault<z.ZodString>;
|
|
48
|
-
}, "strip", z.ZodTypeAny, {
|
|
49
|
-
type: "oauth-password";
|
|
50
|
-
username: string;
|
|
51
|
-
password: string;
|
|
52
|
-
token: string;
|
|
53
|
-
clientSecret: string;
|
|
54
|
-
}, {
|
|
55
|
-
type?: "oauth-password" | undefined;
|
|
56
|
-
username?: string | undefined;
|
|
57
|
-
password?: string | undefined;
|
|
58
|
-
token?: string | undefined;
|
|
59
|
-
clientSecret?: string | undefined;
|
|
60
|
-
}>, z.ZodObject<{
|
|
61
|
-
type: z.ZodDefault<z.ZodLiteral<"oauth-clientCredentials">>;
|
|
62
|
-
token: z.ZodDefault<z.ZodString>;
|
|
63
|
-
clientSecret: z.ZodDefault<z.ZodString>;
|
|
64
|
-
}, "strip", z.ZodTypeAny, {
|
|
65
|
-
type: "oauth-clientCredentials";
|
|
66
|
-
token: string;
|
|
67
|
-
clientSecret: string;
|
|
68
|
-
}, {
|
|
69
|
-
type?: "oauth-clientCredentials" | undefined;
|
|
70
|
-
token?: string | undefined;
|
|
71
|
-
clientSecret?: string | undefined;
|
|
72
|
-
}>, z.ZodObject<{
|
|
73
|
-
type: z.ZodDefault<z.ZodLiteral<"oauth-authorizationCode">>;
|
|
74
|
-
token: z.ZodDefault<z.ZodString>;
|
|
75
|
-
clientSecret: z.ZodDefault<z.ZodString>;
|
|
76
|
-
}, "strip", z.ZodTypeAny, {
|
|
77
|
-
type: "oauth-authorizationCode";
|
|
78
|
-
token: string;
|
|
79
|
-
clientSecret: string;
|
|
80
|
-
}, {
|
|
81
|
-
type?: "oauth-authorizationCode" | undefined;
|
|
82
|
-
token?: string | undefined;
|
|
83
|
-
clientSecret?: string | undefined;
|
|
84
|
-
}>]>;
|
|
85
|
-
export type SecuritySchemeExampleValue = z.infer<typeof securitySchemeExampleValueSchema>;
|
|
86
|
-
/** The example values for the oauth2 schemes */
|
|
87
|
-
export type SecuritySchemeOauth2ExampleValue = Extract<SecuritySchemeExampleValue, {
|
|
88
|
-
type: `oauth-${string}`;
|
|
89
|
-
}>;
|
|
90
|
-
/**
|
|
91
|
-
* Generates a base set of example data for a given securityScheme
|
|
92
|
-
*
|
|
93
|
-
* TODO: we can probably remove this unless we really want to keep it separate
|
|
94
|
-
*/
|
|
95
|
-
export declare function authExampleFromSchema(scheme: SecurityScheme, baseValues?: any): SecuritySchemeExampleValue | null;
|
|
96
2
|
export declare const securitySchemeApiKeyIn: readonly ["query", "header", "cookie"];
|
|
97
|
-
export declare const securityApiKeySchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
3
|
+
export declare const securityApiKeySchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
98
4
|
description: z.ZodOptional<z.ZodString>;
|
|
99
5
|
}, {
|
|
100
6
|
type: z.ZodLiteral<"apiKey">;
|
|
@@ -106,23 +12,27 @@ export declare const securityApiKeySchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
106
12
|
uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
107
13
|
/** The name key that links a security requirement to a security object */
|
|
108
14
|
nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
15
|
+
}>, {
|
|
16
|
+
value: z.ZodDefault<z.ZodString>;
|
|
109
17
|
}>, "strip", z.ZodTypeAny, {
|
|
110
18
|
type: "apiKey";
|
|
19
|
+
value: string;
|
|
111
20
|
uid: string;
|
|
112
21
|
name: string;
|
|
113
|
-
in: "query" | "header" | "cookie";
|
|
114
22
|
nameKey: string;
|
|
23
|
+
in: "query" | "header" | "cookie";
|
|
115
24
|
description?: string | undefined;
|
|
116
25
|
}, {
|
|
117
26
|
type: "apiKey";
|
|
27
|
+
value?: string | undefined;
|
|
118
28
|
uid?: string | undefined;
|
|
119
29
|
name?: string | undefined;
|
|
120
30
|
description?: string | undefined;
|
|
121
|
-
in?: "query" | "header" | "cookie" | undefined;
|
|
122
31
|
nameKey?: string | undefined;
|
|
32
|
+
in?: "query" | "header" | "cookie" | undefined;
|
|
123
33
|
}>;
|
|
124
34
|
export type SecuritySchemeApiKey = z.infer<typeof securityApiKeySchema>;
|
|
125
|
-
export declare const securityHttpSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
35
|
+
export declare const securityHttpSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
126
36
|
description: z.ZodOptional<z.ZodString>;
|
|
127
37
|
}, {
|
|
128
38
|
type: z.ZodLiteral<"http">;
|
|
@@ -141,12 +51,19 @@ export declare const securityHttpSchema: z.ZodObject<z.objectUtil.extendShape<z.
|
|
|
141
51
|
uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
142
52
|
/** The name key that links a security requirement to a security object */
|
|
143
53
|
nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
54
|
+
}>, {
|
|
55
|
+
username: z.ZodDefault<z.ZodString>;
|
|
56
|
+
password: z.ZodDefault<z.ZodString>;
|
|
57
|
+
token: z.ZodDefault<z.ZodString>;
|
|
144
58
|
}>, "strip", z.ZodTypeAny, {
|
|
145
59
|
type: "http";
|
|
146
60
|
uid: string;
|
|
147
61
|
nameKey: string;
|
|
148
62
|
scheme: "basic" | "bearer";
|
|
149
63
|
bearerFormat: string;
|
|
64
|
+
username: string;
|
|
65
|
+
password: string;
|
|
66
|
+
token: string;
|
|
150
67
|
description?: string | undefined;
|
|
151
68
|
}, {
|
|
152
69
|
type: "http";
|
|
@@ -155,6 +72,9 @@ export declare const securityHttpSchema: z.ZodObject<z.objectUtil.extendShape<z.
|
|
|
155
72
|
nameKey?: string | undefined;
|
|
156
73
|
scheme?: string | undefined;
|
|
157
74
|
bearerFormat?: string | undefined;
|
|
75
|
+
username?: string | undefined;
|
|
76
|
+
password?: string | undefined;
|
|
77
|
+
token?: string | undefined;
|
|
158
78
|
}>;
|
|
159
79
|
export type SecuritySchemaHttp = z.infer<typeof securityHttpSchema>;
|
|
160
80
|
export declare const securityOpenIdSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
@@ -186,265 +106,281 @@ export declare const securityOpenIdSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
186
106
|
export type SecuritySchemaOpenId = z.infer<typeof securityOpenIdSchema>;
|
|
187
107
|
/** Options for the x-usePkce extension */
|
|
188
108
|
export declare const pkceOptions: readonly ["SHA-256", "plain", "no"];
|
|
189
|
-
export declare const oasOauthFlowSchema: z.ZodDefault<z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
|
|
190
|
-
/**
|
|
191
|
-
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
192
|
-
* URL. The OAuth2 standard requires the use of TLS.
|
|
193
|
-
*/
|
|
194
|
-
refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
195
|
-
/**
|
|
196
|
-
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
197
|
-
* between the scope name and a short description for it. The map MAY be empty.
|
|
198
|
-
*/
|
|
199
|
-
scopes: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodMap<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>>;
|
|
200
|
-
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
201
|
-
}, {
|
|
202
|
-
type: z.ZodLiteral<"implicit">;
|
|
203
|
-
authorizationUrl: z.ZodDefault<z.ZodString>;
|
|
204
|
-
'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
205
|
-
}>, "strip", z.ZodTypeAny, {
|
|
206
|
-
type: "implicit";
|
|
207
|
-
refreshUrl: string;
|
|
208
|
-
scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
|
|
209
|
-
selectedScopes: string[];
|
|
210
|
-
authorizationUrl: string;
|
|
211
|
-
'x-scalar-redirect-uri': string;
|
|
212
|
-
}, {
|
|
213
|
-
type: "implicit";
|
|
214
|
-
refreshUrl?: string | undefined;
|
|
215
|
-
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
216
|
-
selectedScopes?: string[] | undefined;
|
|
217
|
-
authorizationUrl?: string | undefined;
|
|
218
|
-
'x-scalar-redirect-uri'?: string | undefined;
|
|
219
|
-
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
220
|
-
/**
|
|
221
|
-
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
222
|
-
* URL. The OAuth2 standard requires the use of TLS.
|
|
223
|
-
*/
|
|
224
|
-
refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
225
|
-
/**
|
|
226
|
-
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
227
|
-
* between the scope name and a short description for it. The map MAY be empty.
|
|
228
|
-
*/
|
|
229
|
-
scopes: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodMap<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>>;
|
|
230
|
-
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
231
|
-
}, {
|
|
232
|
-
type: z.ZodLiteral<"password">;
|
|
233
|
-
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
234
|
-
}>, "strip", z.ZodTypeAny, {
|
|
235
|
-
type: "password";
|
|
236
|
-
refreshUrl: string;
|
|
237
|
-
scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
|
|
238
|
-
selectedScopes: string[];
|
|
239
|
-
tokenUrl: string;
|
|
240
|
-
}, {
|
|
241
|
-
type: "password";
|
|
242
|
-
refreshUrl?: string | undefined;
|
|
243
|
-
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
244
|
-
selectedScopes?: string[] | undefined;
|
|
245
|
-
tokenUrl?: string | undefined;
|
|
246
|
-
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
247
|
-
/**
|
|
248
|
-
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
249
|
-
* URL. The OAuth2 standard requires the use of TLS.
|
|
250
|
-
*/
|
|
251
|
-
refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
252
|
-
/**
|
|
253
|
-
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
254
|
-
* between the scope name and a short description for it. The map MAY be empty.
|
|
255
|
-
*/
|
|
256
|
-
scopes: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodMap<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>>;
|
|
257
|
-
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
258
|
-
}, {
|
|
259
|
-
type: z.ZodLiteral<"clientCredentials">;
|
|
260
|
-
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
261
|
-
}>, "strip", z.ZodTypeAny, {
|
|
262
|
-
type: "clientCredentials";
|
|
263
|
-
refreshUrl: string;
|
|
264
|
-
scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
|
|
265
|
-
selectedScopes: string[];
|
|
266
|
-
tokenUrl: string;
|
|
267
|
-
}, {
|
|
268
|
-
type: "clientCredentials";
|
|
269
|
-
refreshUrl?: string | undefined;
|
|
270
|
-
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
271
|
-
selectedScopes?: string[] | undefined;
|
|
272
|
-
tokenUrl?: string | undefined;
|
|
273
|
-
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
274
|
-
/**
|
|
275
|
-
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
276
|
-
* URL. The OAuth2 standard requires the use of TLS.
|
|
277
|
-
*/
|
|
278
|
-
refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
279
|
-
/**
|
|
280
|
-
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
281
|
-
* between the scope name and a short description for it. The map MAY be empty.
|
|
282
|
-
*/
|
|
283
|
-
scopes: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodMap<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>>;
|
|
284
|
-
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
285
|
-
}, {
|
|
286
|
-
type: z.ZodLiteral<"authorizationCode">;
|
|
287
|
-
authorizationUrl: z.ZodDefault<z.ZodString>;
|
|
288
|
-
/**
|
|
289
|
-
* Whether to use PKCE for the authorization code flow.
|
|
290
|
-
*
|
|
291
|
-
* TODO: add docs
|
|
292
|
-
*/
|
|
293
|
-
'x-usePkce': z.ZodDefault<z.ZodOptional<z.ZodEnum<["SHA-256", "plain", "no"]>>>;
|
|
294
|
-
'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
295
|
-
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
296
|
-
}>, "strip", z.ZodTypeAny, {
|
|
297
|
-
type: "authorizationCode";
|
|
298
|
-
refreshUrl: string;
|
|
299
|
-
scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
|
|
300
|
-
selectedScopes: string[];
|
|
301
|
-
authorizationUrl: string;
|
|
302
|
-
'x-scalar-redirect-uri': string;
|
|
303
|
-
tokenUrl: string;
|
|
304
|
-
'x-usePkce': "SHA-256" | "plain" | "no";
|
|
305
|
-
}, {
|
|
306
|
-
type: "authorizationCode";
|
|
307
|
-
refreshUrl?: string | undefined;
|
|
308
|
-
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
309
|
-
selectedScopes?: string[] | undefined;
|
|
310
|
-
authorizationUrl?: string | undefined;
|
|
311
|
-
'x-scalar-redirect-uri'?: string | undefined;
|
|
312
|
-
tokenUrl?: string | undefined;
|
|
313
|
-
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
314
|
-
}>]>>>;
|
|
315
109
|
export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
316
110
|
description: z.ZodOptional<z.ZodString>;
|
|
317
111
|
}, {
|
|
318
112
|
type: z.ZodLiteral<"oauth2">;
|
|
319
113
|
/** REQUIRED. An object containing configuration information for the flow types supported. */
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
114
|
+
flows: z.ZodDefault<z.ZodObject<{
|
|
115
|
+
implicit: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
116
|
+
/**
|
|
117
|
+
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
118
|
+
* URL. The OAuth2 standard requires the use of TLS.
|
|
119
|
+
*/
|
|
120
|
+
refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
121
|
+
/**
|
|
122
|
+
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
123
|
+
* between the scope name and a short description for it. The map MAY be empty.
|
|
124
|
+
*/
|
|
125
|
+
scopes: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>;
|
|
126
|
+
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
127
|
+
/** Extension to save the client Id associated with an oauth flow */
|
|
128
|
+
'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
129
|
+
/** The auth token */
|
|
130
|
+
token: z.ZodDefault<z.ZodString>;
|
|
131
|
+
}, {
|
|
132
|
+
type: z.ZodLiteral<"implicit">;
|
|
133
|
+
authorizationUrl: z.ZodDefault<z.ZodString>;
|
|
134
|
+
'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
135
|
+
}>, "strip", z.ZodTypeAny, {
|
|
136
|
+
type: "implicit";
|
|
137
|
+
token: string;
|
|
138
|
+
refreshUrl: string;
|
|
139
|
+
scopes: Record<string, string>;
|
|
140
|
+
selectedScopes: string[];
|
|
141
|
+
'x-scalar-client-id': string;
|
|
142
|
+
authorizationUrl: string;
|
|
143
|
+
'x-scalar-redirect-uri': string;
|
|
144
|
+
}, {
|
|
145
|
+
type: "implicit";
|
|
146
|
+
token?: string | undefined;
|
|
147
|
+
refreshUrl?: string | undefined;
|
|
148
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
149
|
+
selectedScopes?: string[] | undefined;
|
|
150
|
+
'x-scalar-client-id'?: string | undefined;
|
|
151
|
+
authorizationUrl?: string | undefined;
|
|
152
|
+
'x-scalar-redirect-uri'?: string | undefined;
|
|
153
|
+
}>>;
|
|
154
|
+
password: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
155
|
+
/**
|
|
156
|
+
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
157
|
+
* URL. The OAuth2 standard requires the use of TLS.
|
|
158
|
+
*/
|
|
159
|
+
refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
160
|
+
/**
|
|
161
|
+
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
162
|
+
* between the scope name and a short description for it. The map MAY be empty.
|
|
163
|
+
*/
|
|
164
|
+
scopes: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>;
|
|
165
|
+
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
166
|
+
/** Extension to save the client Id associated with an oauth flow */
|
|
167
|
+
'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
168
|
+
/** The auth token */
|
|
169
|
+
token: z.ZodDefault<z.ZodString>;
|
|
170
|
+
}, {
|
|
171
|
+
type: z.ZodLiteral<"password">;
|
|
172
|
+
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
173
|
+
clientSecret: z.ZodDefault<z.ZodString>;
|
|
174
|
+
username: z.ZodDefault<z.ZodString>;
|
|
175
|
+
password: z.ZodDefault<z.ZodString>;
|
|
176
|
+
}>, "strip", z.ZodTypeAny, {
|
|
177
|
+
type: "password";
|
|
178
|
+
username: string;
|
|
179
|
+
password: string;
|
|
180
|
+
token: string;
|
|
181
|
+
refreshUrl: string;
|
|
182
|
+
scopes: Record<string, string>;
|
|
183
|
+
selectedScopes: string[];
|
|
184
|
+
'x-scalar-client-id': string;
|
|
185
|
+
tokenUrl: string;
|
|
186
|
+
clientSecret: string;
|
|
187
|
+
}, {
|
|
188
|
+
type: "password";
|
|
189
|
+
username?: string | undefined;
|
|
190
|
+
password?: string | undefined;
|
|
191
|
+
token?: string | undefined;
|
|
192
|
+
refreshUrl?: string | undefined;
|
|
193
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
194
|
+
selectedScopes?: string[] | undefined;
|
|
195
|
+
'x-scalar-client-id'?: string | undefined;
|
|
196
|
+
tokenUrl?: string | undefined;
|
|
197
|
+
clientSecret?: string | undefined;
|
|
198
|
+
}>>;
|
|
199
|
+
clientCredentials: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
200
|
+
/**
|
|
201
|
+
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
202
|
+
* URL. The OAuth2 standard requires the use of TLS.
|
|
203
|
+
*/
|
|
204
|
+
refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
205
|
+
/**
|
|
206
|
+
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
207
|
+
* between the scope name and a short description for it. The map MAY be empty.
|
|
208
|
+
*/
|
|
209
|
+
scopes: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>;
|
|
210
|
+
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
211
|
+
/** Extension to save the client Id associated with an oauth flow */
|
|
212
|
+
'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
213
|
+
/** The auth token */
|
|
214
|
+
token: z.ZodDefault<z.ZodString>;
|
|
215
|
+
}, {
|
|
216
|
+
type: z.ZodLiteral<"clientCredentials">;
|
|
217
|
+
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
218
|
+
clientSecret: z.ZodDefault<z.ZodString>;
|
|
219
|
+
}>, "strip", z.ZodTypeAny, {
|
|
220
|
+
type: "clientCredentials";
|
|
221
|
+
token: string;
|
|
222
|
+
refreshUrl: string;
|
|
223
|
+
scopes: Record<string, string>;
|
|
224
|
+
selectedScopes: string[];
|
|
225
|
+
'x-scalar-client-id': string;
|
|
226
|
+
tokenUrl: string;
|
|
227
|
+
clientSecret: string;
|
|
228
|
+
}, {
|
|
229
|
+
type: "clientCredentials";
|
|
230
|
+
token?: string | undefined;
|
|
231
|
+
refreshUrl?: string | undefined;
|
|
232
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
233
|
+
selectedScopes?: string[] | undefined;
|
|
234
|
+
'x-scalar-client-id'?: string | undefined;
|
|
235
|
+
tokenUrl?: string | undefined;
|
|
236
|
+
clientSecret?: string | undefined;
|
|
237
|
+
}>>;
|
|
238
|
+
authorizationCode: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
239
|
+
/**
|
|
240
|
+
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
241
|
+
* URL. The OAuth2 standard requires the use of TLS.
|
|
242
|
+
*/
|
|
243
|
+
refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
244
|
+
/**
|
|
245
|
+
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
246
|
+
* between the scope name and a short description for it. The map MAY be empty.
|
|
247
|
+
*/
|
|
248
|
+
scopes: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>;
|
|
249
|
+
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
250
|
+
/** Extension to save the client Id associated with an oauth flow */
|
|
251
|
+
'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
252
|
+
/** The auth token */
|
|
253
|
+
token: z.ZodDefault<z.ZodString>;
|
|
254
|
+
}, {
|
|
255
|
+
type: z.ZodLiteral<"authorizationCode">;
|
|
256
|
+
authorizationUrl: z.ZodDefault<z.ZodString>;
|
|
257
|
+
/**
|
|
258
|
+
* Whether to use PKCE for the authorization code flow.
|
|
259
|
+
*
|
|
260
|
+
* TODO: add docs
|
|
261
|
+
*/
|
|
262
|
+
'x-usePkce': z.ZodDefault<z.ZodOptional<z.ZodEnum<["SHA-256", "plain", "no"]>>>;
|
|
263
|
+
'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
264
|
+
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
265
|
+
clientSecret: z.ZodDefault<z.ZodString>;
|
|
266
|
+
}>, "strip", z.ZodTypeAny, {
|
|
267
|
+
type: "authorizationCode";
|
|
268
|
+
token: string;
|
|
269
|
+
refreshUrl: string;
|
|
270
|
+
scopes: Record<string, string>;
|
|
271
|
+
selectedScopes: string[];
|
|
272
|
+
'x-scalar-client-id': string;
|
|
273
|
+
authorizationUrl: string;
|
|
274
|
+
'x-scalar-redirect-uri': string;
|
|
275
|
+
tokenUrl: string;
|
|
276
|
+
clientSecret: string;
|
|
277
|
+
'x-usePkce': "SHA-256" | "plain" | "no";
|
|
278
|
+
}, {
|
|
279
|
+
type: "authorizationCode";
|
|
280
|
+
token?: string | undefined;
|
|
281
|
+
refreshUrl?: string | undefined;
|
|
282
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
283
|
+
selectedScopes?: string[] | undefined;
|
|
284
|
+
'x-scalar-client-id'?: string | undefined;
|
|
285
|
+
authorizationUrl?: string | undefined;
|
|
286
|
+
'x-scalar-redirect-uri'?: string | undefined;
|
|
287
|
+
tokenUrl?: string | undefined;
|
|
288
|
+
clientSecret?: string | undefined;
|
|
289
|
+
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
290
|
+
}>>;
|
|
291
|
+
}, "strip", z.ZodTypeAny, {
|
|
292
|
+
password?: {
|
|
293
|
+
type: "password";
|
|
294
|
+
username: string;
|
|
295
|
+
password: string;
|
|
296
|
+
token: string;
|
|
297
|
+
refreshUrl: string;
|
|
298
|
+
scopes: Record<string, string>;
|
|
299
|
+
selectedScopes: string[];
|
|
300
|
+
'x-scalar-client-id': string;
|
|
301
|
+
tokenUrl: string;
|
|
302
|
+
clientSecret: string;
|
|
303
|
+
} | undefined;
|
|
304
|
+
implicit?: {
|
|
305
|
+
type: "implicit";
|
|
306
|
+
token: string;
|
|
307
|
+
refreshUrl: string;
|
|
308
|
+
scopes: Record<string, string>;
|
|
309
|
+
selectedScopes: string[];
|
|
310
|
+
'x-scalar-client-id': string;
|
|
311
|
+
authorizationUrl: string;
|
|
312
|
+
'x-scalar-redirect-uri': string;
|
|
313
|
+
} | undefined;
|
|
314
|
+
clientCredentials?: {
|
|
315
|
+
type: "clientCredentials";
|
|
316
|
+
token: string;
|
|
317
|
+
refreshUrl: string;
|
|
318
|
+
scopes: Record<string, string>;
|
|
319
|
+
selectedScopes: string[];
|
|
320
|
+
'x-scalar-client-id': string;
|
|
321
|
+
tokenUrl: string;
|
|
322
|
+
clientSecret: string;
|
|
323
|
+
} | undefined;
|
|
324
|
+
authorizationCode?: {
|
|
325
|
+
type: "authorizationCode";
|
|
326
|
+
token: string;
|
|
327
|
+
refreshUrl: string;
|
|
328
|
+
scopes: Record<string, string>;
|
|
329
|
+
selectedScopes: string[];
|
|
330
|
+
'x-scalar-client-id': string;
|
|
331
|
+
authorizationUrl: string;
|
|
332
|
+
'x-scalar-redirect-uri': string;
|
|
333
|
+
tokenUrl: string;
|
|
334
|
+
clientSecret: string;
|
|
335
|
+
'x-usePkce': "SHA-256" | "plain" | "no";
|
|
336
|
+
} | undefined;
|
|
416
337
|
}, {
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
338
|
+
password?: {
|
|
339
|
+
type: "password";
|
|
340
|
+
username?: string | undefined;
|
|
341
|
+
password?: string | undefined;
|
|
342
|
+
token?: string | undefined;
|
|
343
|
+
refreshUrl?: string | undefined;
|
|
344
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
345
|
+
selectedScopes?: string[] | undefined;
|
|
346
|
+
'x-scalar-client-id'?: string | undefined;
|
|
347
|
+
tokenUrl?: string | undefined;
|
|
348
|
+
clientSecret?: string | undefined;
|
|
349
|
+
} | undefined;
|
|
350
|
+
implicit?: {
|
|
351
|
+
type: "implicit";
|
|
352
|
+
token?: string | undefined;
|
|
353
|
+
refreshUrl?: string | undefined;
|
|
354
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
355
|
+
selectedScopes?: string[] | undefined;
|
|
356
|
+
'x-scalar-client-id'?: string | undefined;
|
|
357
|
+
authorizationUrl?: string | undefined;
|
|
358
|
+
'x-scalar-redirect-uri'?: string | undefined;
|
|
359
|
+
} | undefined;
|
|
360
|
+
clientCredentials?: {
|
|
361
|
+
type: "clientCredentials";
|
|
362
|
+
token?: string | undefined;
|
|
363
|
+
refreshUrl?: string | undefined;
|
|
364
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
365
|
+
selectedScopes?: string[] | undefined;
|
|
366
|
+
'x-scalar-client-id'?: string | undefined;
|
|
367
|
+
tokenUrl?: string | undefined;
|
|
368
|
+
clientSecret?: string | undefined;
|
|
369
|
+
} | undefined;
|
|
370
|
+
authorizationCode?: {
|
|
371
|
+
type: "authorizationCode";
|
|
372
|
+
token?: string | undefined;
|
|
373
|
+
refreshUrl?: string | undefined;
|
|
374
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
375
|
+
selectedScopes?: string[] | undefined;
|
|
376
|
+
'x-scalar-client-id'?: string | undefined;
|
|
377
|
+
authorizationUrl?: string | undefined;
|
|
378
|
+
'x-scalar-redirect-uri'?: string | undefined;
|
|
379
|
+
tokenUrl?: string | undefined;
|
|
380
|
+
clientSecret?: string | undefined;
|
|
381
|
+
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
382
|
+
} | undefined;
|
|
383
|
+
}>>;
|
|
448
384
|
}>, {
|
|
449
385
|
uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
450
386
|
/** The name key that links a security requirement to a security object */
|
|
@@ -453,74 +389,112 @@ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
453
389
|
type: "oauth2";
|
|
454
390
|
uid: string;
|
|
455
391
|
nameKey: string;
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
392
|
+
flows: {
|
|
393
|
+
password?: {
|
|
394
|
+
type: "password";
|
|
395
|
+
username: string;
|
|
396
|
+
password: string;
|
|
397
|
+
token: string;
|
|
398
|
+
refreshUrl: string;
|
|
399
|
+
scopes: Record<string, string>;
|
|
400
|
+
selectedScopes: string[];
|
|
401
|
+
'x-scalar-client-id': string;
|
|
402
|
+
tokenUrl: string;
|
|
403
|
+
clientSecret: string;
|
|
404
|
+
} | undefined;
|
|
405
|
+
implicit?: {
|
|
406
|
+
type: "implicit";
|
|
407
|
+
token: string;
|
|
408
|
+
refreshUrl: string;
|
|
409
|
+
scopes: Record<string, string>;
|
|
410
|
+
selectedScopes: string[];
|
|
411
|
+
'x-scalar-client-id': string;
|
|
412
|
+
authorizationUrl: string;
|
|
413
|
+
'x-scalar-redirect-uri': string;
|
|
414
|
+
} | undefined;
|
|
415
|
+
clientCredentials?: {
|
|
416
|
+
type: "clientCredentials";
|
|
417
|
+
token: string;
|
|
418
|
+
refreshUrl: string;
|
|
419
|
+
scopes: Record<string, string>;
|
|
420
|
+
selectedScopes: string[];
|
|
421
|
+
'x-scalar-client-id': string;
|
|
422
|
+
tokenUrl: string;
|
|
423
|
+
clientSecret: string;
|
|
424
|
+
} | undefined;
|
|
425
|
+
authorizationCode?: {
|
|
426
|
+
type: "authorizationCode";
|
|
427
|
+
token: string;
|
|
428
|
+
refreshUrl: string;
|
|
429
|
+
scopes: Record<string, string>;
|
|
430
|
+
selectedScopes: string[];
|
|
431
|
+
'x-scalar-client-id': string;
|
|
432
|
+
authorizationUrl: string;
|
|
433
|
+
'x-scalar-redirect-uri': string;
|
|
434
|
+
tokenUrl: string;
|
|
435
|
+
clientSecret: string;
|
|
436
|
+
'x-usePkce': "SHA-256" | "plain" | "no";
|
|
437
|
+
} | undefined;
|
|
484
438
|
};
|
|
485
|
-
'x-scalar-client-id': string;
|
|
486
439
|
description?: string | undefined;
|
|
487
440
|
}, {
|
|
488
441
|
type: "oauth2";
|
|
489
442
|
uid?: string | undefined;
|
|
490
443
|
description?: string | undefined;
|
|
491
444
|
nameKey?: string | undefined;
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
445
|
+
flows?: {
|
|
446
|
+
password?: {
|
|
447
|
+
type: "password";
|
|
448
|
+
username?: string | undefined;
|
|
449
|
+
password?: string | undefined;
|
|
450
|
+
token?: string | undefined;
|
|
451
|
+
refreshUrl?: string | undefined;
|
|
452
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
453
|
+
selectedScopes?: string[] | undefined;
|
|
454
|
+
'x-scalar-client-id'?: string | undefined;
|
|
455
|
+
tokenUrl?: string | undefined;
|
|
456
|
+
clientSecret?: string | undefined;
|
|
457
|
+
} | undefined;
|
|
458
|
+
implicit?: {
|
|
459
|
+
type: "implicit";
|
|
460
|
+
token?: string | undefined;
|
|
461
|
+
refreshUrl?: string | undefined;
|
|
462
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
463
|
+
selectedScopes?: string[] | undefined;
|
|
464
|
+
'x-scalar-client-id'?: string | undefined;
|
|
465
|
+
authorizationUrl?: string | undefined;
|
|
466
|
+
'x-scalar-redirect-uri'?: string | undefined;
|
|
467
|
+
} | undefined;
|
|
468
|
+
clientCredentials?: {
|
|
469
|
+
type: "clientCredentials";
|
|
470
|
+
token?: string | undefined;
|
|
471
|
+
refreshUrl?: string | undefined;
|
|
472
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
473
|
+
selectedScopes?: string[] | undefined;
|
|
474
|
+
'x-scalar-client-id'?: string | undefined;
|
|
475
|
+
tokenUrl?: string | undefined;
|
|
476
|
+
clientSecret?: string | undefined;
|
|
477
|
+
} | undefined;
|
|
478
|
+
authorizationCode?: {
|
|
479
|
+
type: "authorizationCode";
|
|
480
|
+
token?: string | undefined;
|
|
481
|
+
refreshUrl?: string | undefined;
|
|
482
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
483
|
+
selectedScopes?: string[] | undefined;
|
|
484
|
+
'x-scalar-client-id'?: string | undefined;
|
|
485
|
+
authorizationUrl?: string | undefined;
|
|
486
|
+
'x-scalar-redirect-uri'?: string | undefined;
|
|
487
|
+
tokenUrl?: string | undefined;
|
|
488
|
+
clientSecret?: string | undefined;
|
|
489
|
+
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
490
|
+
} | undefined;
|
|
520
491
|
} | undefined;
|
|
521
|
-
'x-scalar-client-id'?: string | undefined;
|
|
522
492
|
}>;
|
|
523
493
|
export type SecuritySchemeOauth2 = z.infer<typeof securityOauthSchema>;
|
|
494
|
+
export type SecuritySchemeOauth2Payload = z.input<typeof securityOauthSchema>;
|
|
495
|
+
export type Oauth2Flow = NonNullable<SecuritySchemeOauth2['flows']['authorizationCode' | 'clientCredentials' | 'implicit' | 'password']>;
|
|
496
|
+
/** Payload for the oauth 2 flows + extensions */
|
|
497
|
+
export type Oauth2FlowPayload = NonNullable<SecuritySchemeOauth2Payload['flows']>['authorizationCode' | 'clientCredentials' | 'implicit' | 'password'] & Record<`x-${string}`, string>;
|
|
524
498
|
/**
|
|
525
499
|
* Security Requirement
|
|
526
500
|
* Lists the required security schemes to execute this operation OR the whole collection/spec.
|
|
@@ -581,200 +555,376 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
581
555
|
}, {
|
|
582
556
|
type: z.ZodLiteral<"oauth2">;
|
|
583
557
|
/** REQUIRED. An object containing configuration information for the flow types supported. */
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
558
|
+
flows: z.ZodDefault<z.ZodObject<{
|
|
559
|
+
implicit: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
560
|
+
/**
|
|
561
|
+
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
562
|
+
* URL. The OAuth2 standard requires the use of TLS.
|
|
563
|
+
*/
|
|
564
|
+
refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
565
|
+
/**
|
|
566
|
+
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
567
|
+
* between the scope name and a short description for it. The map MAY be empty.
|
|
568
|
+
*/
|
|
569
|
+
scopes: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>;
|
|
570
|
+
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
571
|
+
/** Extension to save the client Id associated with an oauth flow */
|
|
572
|
+
'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
573
|
+
/** The auth token */
|
|
574
|
+
token: z.ZodDefault<z.ZodString>;
|
|
575
|
+
}, {
|
|
576
|
+
type: z.ZodLiteral<"implicit">;
|
|
577
|
+
authorizationUrl: z.ZodDefault<z.ZodString>;
|
|
578
|
+
'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
579
|
+
}>, "strip", z.ZodTypeAny, {
|
|
580
|
+
type: "implicit";
|
|
581
|
+
token: string;
|
|
582
|
+
refreshUrl: string;
|
|
583
|
+
scopes: Record<string, string>;
|
|
584
|
+
selectedScopes: string[];
|
|
585
|
+
'x-scalar-client-id': string;
|
|
586
|
+
authorizationUrl: string;
|
|
587
|
+
'x-scalar-redirect-uri': string;
|
|
588
|
+
}, {
|
|
589
|
+
type: "implicit";
|
|
590
|
+
token?: string | undefined;
|
|
591
|
+
refreshUrl?: string | undefined;
|
|
592
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
593
|
+
selectedScopes?: string[] | undefined;
|
|
594
|
+
'x-scalar-client-id'?: string | undefined;
|
|
595
|
+
authorizationUrl?: string | undefined;
|
|
596
|
+
'x-scalar-redirect-uri'?: string | undefined;
|
|
597
|
+
}>>;
|
|
598
|
+
password: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
599
|
+
/**
|
|
600
|
+
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
601
|
+
* URL. The OAuth2 standard requires the use of TLS.
|
|
602
|
+
*/
|
|
603
|
+
refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
604
|
+
/**
|
|
605
|
+
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
606
|
+
* between the scope name and a short description for it. The map MAY be empty.
|
|
607
|
+
*/
|
|
608
|
+
scopes: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>;
|
|
609
|
+
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
610
|
+
/** Extension to save the client Id associated with an oauth flow */
|
|
611
|
+
'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
612
|
+
/** The auth token */
|
|
613
|
+
token: z.ZodDefault<z.ZodString>;
|
|
614
|
+
}, {
|
|
615
|
+
type: z.ZodLiteral<"password">;
|
|
616
|
+
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
617
|
+
clientSecret: z.ZodDefault<z.ZodString>;
|
|
618
|
+
username: z.ZodDefault<z.ZodString>;
|
|
619
|
+
password: z.ZodDefault<z.ZodString>;
|
|
620
|
+
}>, "strip", z.ZodTypeAny, {
|
|
621
|
+
type: "password";
|
|
622
|
+
username: string;
|
|
623
|
+
password: string;
|
|
624
|
+
token: string;
|
|
625
|
+
refreshUrl: string;
|
|
626
|
+
scopes: Record<string, string>;
|
|
627
|
+
selectedScopes: string[];
|
|
628
|
+
'x-scalar-client-id': string;
|
|
629
|
+
tokenUrl: string;
|
|
630
|
+
clientSecret: string;
|
|
631
|
+
}, {
|
|
632
|
+
type: "password";
|
|
633
|
+
username?: string | undefined;
|
|
634
|
+
password?: string | undefined;
|
|
635
|
+
token?: string | undefined;
|
|
636
|
+
refreshUrl?: string | undefined;
|
|
637
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
638
|
+
selectedScopes?: string[] | undefined;
|
|
639
|
+
'x-scalar-client-id'?: string | undefined;
|
|
640
|
+
tokenUrl?: string | undefined;
|
|
641
|
+
clientSecret?: string | undefined;
|
|
642
|
+
}>>;
|
|
643
|
+
clientCredentials: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
644
|
+
/**
|
|
645
|
+
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
646
|
+
* URL. The OAuth2 standard requires the use of TLS.
|
|
647
|
+
*/
|
|
648
|
+
refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
649
|
+
/**
|
|
650
|
+
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
651
|
+
* between the scope name and a short description for it. The map MAY be empty.
|
|
652
|
+
*/
|
|
653
|
+
scopes: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>;
|
|
654
|
+
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
655
|
+
/** Extension to save the client Id associated with an oauth flow */
|
|
656
|
+
'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
657
|
+
/** The auth token */
|
|
658
|
+
token: z.ZodDefault<z.ZodString>;
|
|
659
|
+
}, {
|
|
660
|
+
type: z.ZodLiteral<"clientCredentials">;
|
|
661
|
+
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
662
|
+
clientSecret: z.ZodDefault<z.ZodString>;
|
|
663
|
+
}>, "strip", z.ZodTypeAny, {
|
|
664
|
+
type: "clientCredentials";
|
|
665
|
+
token: string;
|
|
666
|
+
refreshUrl: string;
|
|
667
|
+
scopes: Record<string, string>;
|
|
668
|
+
selectedScopes: string[];
|
|
669
|
+
'x-scalar-client-id': string;
|
|
670
|
+
tokenUrl: string;
|
|
671
|
+
clientSecret: string;
|
|
672
|
+
}, {
|
|
673
|
+
type: "clientCredentials";
|
|
674
|
+
token?: string | undefined;
|
|
675
|
+
refreshUrl?: string | undefined;
|
|
676
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
677
|
+
selectedScopes?: string[] | undefined;
|
|
678
|
+
'x-scalar-client-id'?: string | undefined;
|
|
679
|
+
tokenUrl?: string | undefined;
|
|
680
|
+
clientSecret?: string | undefined;
|
|
681
|
+
}>>;
|
|
682
|
+
authorizationCode: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
683
|
+
/**
|
|
684
|
+
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
685
|
+
* URL. The OAuth2 standard requires the use of TLS.
|
|
686
|
+
*/
|
|
687
|
+
refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
688
|
+
/**
|
|
689
|
+
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
690
|
+
* between the scope name and a short description for it. The map MAY be empty.
|
|
691
|
+
*/
|
|
692
|
+
scopes: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>;
|
|
693
|
+
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
694
|
+
/** Extension to save the client Id associated with an oauth flow */
|
|
695
|
+
'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
696
|
+
/** The auth token */
|
|
697
|
+
token: z.ZodDefault<z.ZodString>;
|
|
698
|
+
}, {
|
|
699
|
+
type: z.ZodLiteral<"authorizationCode">;
|
|
700
|
+
authorizationUrl: z.ZodDefault<z.ZodString>;
|
|
701
|
+
/**
|
|
702
|
+
* Whether to use PKCE for the authorization code flow.
|
|
703
|
+
*
|
|
704
|
+
* TODO: add docs
|
|
705
|
+
*/
|
|
706
|
+
'x-usePkce': z.ZodDefault<z.ZodOptional<z.ZodEnum<["SHA-256", "plain", "no"]>>>;
|
|
707
|
+
'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
708
|
+
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
709
|
+
clientSecret: z.ZodDefault<z.ZodString>;
|
|
710
|
+
}>, "strip", z.ZodTypeAny, {
|
|
711
|
+
type: "authorizationCode";
|
|
712
|
+
token: string;
|
|
713
|
+
refreshUrl: string;
|
|
714
|
+
scopes: Record<string, string>;
|
|
715
|
+
selectedScopes: string[];
|
|
716
|
+
'x-scalar-client-id': string;
|
|
717
|
+
authorizationUrl: string;
|
|
718
|
+
'x-scalar-redirect-uri': string;
|
|
719
|
+
tokenUrl: string;
|
|
720
|
+
clientSecret: string;
|
|
721
|
+
'x-usePkce': "SHA-256" | "plain" | "no";
|
|
722
|
+
}, {
|
|
723
|
+
type: "authorizationCode";
|
|
724
|
+
token?: string | undefined;
|
|
725
|
+
refreshUrl?: string | undefined;
|
|
726
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
727
|
+
selectedScopes?: string[] | undefined;
|
|
728
|
+
'x-scalar-client-id'?: string | undefined;
|
|
729
|
+
authorizationUrl?: string | undefined;
|
|
730
|
+
'x-scalar-redirect-uri'?: string | undefined;
|
|
731
|
+
tokenUrl?: string | undefined;
|
|
732
|
+
clientSecret?: string | undefined;
|
|
733
|
+
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
734
|
+
}>>;
|
|
735
|
+
}, "strip", z.ZodTypeAny, {
|
|
736
|
+
password?: {
|
|
737
|
+
type: "password";
|
|
738
|
+
username: string;
|
|
739
|
+
password: string;
|
|
740
|
+
token: string;
|
|
741
|
+
refreshUrl: string;
|
|
742
|
+
scopes: Record<string, string>;
|
|
743
|
+
selectedScopes: string[];
|
|
744
|
+
'x-scalar-client-id': string;
|
|
745
|
+
tokenUrl: string;
|
|
746
|
+
clientSecret: string;
|
|
747
|
+
} | undefined;
|
|
748
|
+
implicit?: {
|
|
749
|
+
type: "implicit";
|
|
750
|
+
token: string;
|
|
751
|
+
refreshUrl: string;
|
|
752
|
+
scopes: Record<string, string>;
|
|
753
|
+
selectedScopes: string[];
|
|
754
|
+
'x-scalar-client-id': string;
|
|
755
|
+
authorizationUrl: string;
|
|
756
|
+
'x-scalar-redirect-uri': string;
|
|
757
|
+
} | undefined;
|
|
758
|
+
clientCredentials?: {
|
|
759
|
+
type: "clientCredentials";
|
|
760
|
+
token: string;
|
|
761
|
+
refreshUrl: string;
|
|
762
|
+
scopes: Record<string, string>;
|
|
763
|
+
selectedScopes: string[];
|
|
764
|
+
'x-scalar-client-id': string;
|
|
765
|
+
tokenUrl: string;
|
|
766
|
+
clientSecret: string;
|
|
767
|
+
} | undefined;
|
|
768
|
+
authorizationCode?: {
|
|
769
|
+
type: "authorizationCode";
|
|
770
|
+
token: string;
|
|
771
|
+
refreshUrl: string;
|
|
772
|
+
scopes: Record<string, string>;
|
|
773
|
+
selectedScopes: string[];
|
|
774
|
+
'x-scalar-client-id': string;
|
|
775
|
+
authorizationUrl: string;
|
|
776
|
+
'x-scalar-redirect-uri': string;
|
|
777
|
+
tokenUrl: string;
|
|
778
|
+
clientSecret: string;
|
|
779
|
+
'x-usePkce': "SHA-256" | "plain" | "no";
|
|
780
|
+
} | undefined;
|
|
653
781
|
}, {
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
}, {
|
|
701
|
-
type: "authorizationCode";
|
|
702
|
-
refreshUrl?: string | undefined;
|
|
703
|
-
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
704
|
-
selectedScopes?: string[] | undefined;
|
|
705
|
-
authorizationUrl?: string | undefined;
|
|
706
|
-
'x-scalar-redirect-uri'?: string | undefined;
|
|
707
|
-
tokenUrl?: string | undefined;
|
|
708
|
-
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
709
|
-
}>]>>>;
|
|
710
|
-
/** Extension to save the client Id associated with an oauth flow */
|
|
711
|
-
'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
782
|
+
password?: {
|
|
783
|
+
type: "password";
|
|
784
|
+
username?: string | undefined;
|
|
785
|
+
password?: string | undefined;
|
|
786
|
+
token?: string | undefined;
|
|
787
|
+
refreshUrl?: string | undefined;
|
|
788
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
789
|
+
selectedScopes?: string[] | undefined;
|
|
790
|
+
'x-scalar-client-id'?: string | undefined;
|
|
791
|
+
tokenUrl?: string | undefined;
|
|
792
|
+
clientSecret?: string | undefined;
|
|
793
|
+
} | undefined;
|
|
794
|
+
implicit?: {
|
|
795
|
+
type: "implicit";
|
|
796
|
+
token?: string | undefined;
|
|
797
|
+
refreshUrl?: string | undefined;
|
|
798
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
799
|
+
selectedScopes?: string[] | undefined;
|
|
800
|
+
'x-scalar-client-id'?: string | undefined;
|
|
801
|
+
authorizationUrl?: string | undefined;
|
|
802
|
+
'x-scalar-redirect-uri'?: string | undefined;
|
|
803
|
+
} | undefined;
|
|
804
|
+
clientCredentials?: {
|
|
805
|
+
type: "clientCredentials";
|
|
806
|
+
token?: string | undefined;
|
|
807
|
+
refreshUrl?: string | undefined;
|
|
808
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
809
|
+
selectedScopes?: string[] | undefined;
|
|
810
|
+
'x-scalar-client-id'?: string | undefined;
|
|
811
|
+
tokenUrl?: string | undefined;
|
|
812
|
+
clientSecret?: string | undefined;
|
|
813
|
+
} | undefined;
|
|
814
|
+
authorizationCode?: {
|
|
815
|
+
type: "authorizationCode";
|
|
816
|
+
token?: string | undefined;
|
|
817
|
+
refreshUrl?: string | undefined;
|
|
818
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
819
|
+
selectedScopes?: string[] | undefined;
|
|
820
|
+
'x-scalar-client-id'?: string | undefined;
|
|
821
|
+
authorizationUrl?: string | undefined;
|
|
822
|
+
'x-scalar-redirect-uri'?: string | undefined;
|
|
823
|
+
tokenUrl?: string | undefined;
|
|
824
|
+
clientSecret?: string | undefined;
|
|
825
|
+
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
826
|
+
} | undefined;
|
|
827
|
+
}>>;
|
|
712
828
|
}>, "strip", z.ZodTypeAny, {
|
|
713
829
|
type: "oauth2";
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
830
|
+
flows: {
|
|
831
|
+
password?: {
|
|
832
|
+
type: "password";
|
|
833
|
+
username: string;
|
|
834
|
+
password: string;
|
|
835
|
+
token: string;
|
|
836
|
+
refreshUrl: string;
|
|
837
|
+
scopes: Record<string, string>;
|
|
838
|
+
selectedScopes: string[];
|
|
839
|
+
'x-scalar-client-id': string;
|
|
840
|
+
tokenUrl: string;
|
|
841
|
+
clientSecret: string;
|
|
842
|
+
} | undefined;
|
|
843
|
+
implicit?: {
|
|
844
|
+
type: "implicit";
|
|
845
|
+
token: string;
|
|
846
|
+
refreshUrl: string;
|
|
847
|
+
scopes: Record<string, string>;
|
|
848
|
+
selectedScopes: string[];
|
|
849
|
+
'x-scalar-client-id': string;
|
|
850
|
+
authorizationUrl: string;
|
|
851
|
+
'x-scalar-redirect-uri': string;
|
|
852
|
+
} | undefined;
|
|
853
|
+
clientCredentials?: {
|
|
854
|
+
type: "clientCredentials";
|
|
855
|
+
token: string;
|
|
856
|
+
refreshUrl: string;
|
|
857
|
+
scopes: Record<string, string>;
|
|
858
|
+
selectedScopes: string[];
|
|
859
|
+
'x-scalar-client-id': string;
|
|
860
|
+
tokenUrl: string;
|
|
861
|
+
clientSecret: string;
|
|
862
|
+
} | undefined;
|
|
863
|
+
authorizationCode?: {
|
|
864
|
+
type: "authorizationCode";
|
|
865
|
+
token: string;
|
|
866
|
+
refreshUrl: string;
|
|
867
|
+
scopes: Record<string, string>;
|
|
868
|
+
selectedScopes: string[];
|
|
869
|
+
'x-scalar-client-id': string;
|
|
870
|
+
authorizationUrl: string;
|
|
871
|
+
'x-scalar-redirect-uri': string;
|
|
872
|
+
tokenUrl: string;
|
|
873
|
+
clientSecret: string;
|
|
874
|
+
'x-usePkce': "SHA-256" | "plain" | "no";
|
|
875
|
+
} | undefined;
|
|
742
876
|
};
|
|
743
|
-
'x-scalar-client-id': string;
|
|
744
877
|
description?: string | undefined;
|
|
745
878
|
}, {
|
|
746
879
|
type: "oauth2";
|
|
747
880
|
description?: string | undefined;
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
881
|
+
flows?: {
|
|
882
|
+
password?: {
|
|
883
|
+
type: "password";
|
|
884
|
+
username?: string | undefined;
|
|
885
|
+
password?: string | undefined;
|
|
886
|
+
token?: string | undefined;
|
|
887
|
+
refreshUrl?: string | undefined;
|
|
888
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
889
|
+
selectedScopes?: string[] | undefined;
|
|
890
|
+
'x-scalar-client-id'?: string | undefined;
|
|
891
|
+
tokenUrl?: string | undefined;
|
|
892
|
+
clientSecret?: string | undefined;
|
|
893
|
+
} | undefined;
|
|
894
|
+
implicit?: {
|
|
895
|
+
type: "implicit";
|
|
896
|
+
token?: string | undefined;
|
|
897
|
+
refreshUrl?: string | undefined;
|
|
898
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
899
|
+
selectedScopes?: string[] | undefined;
|
|
900
|
+
'x-scalar-client-id'?: string | undefined;
|
|
901
|
+
authorizationUrl?: string | undefined;
|
|
902
|
+
'x-scalar-redirect-uri'?: string | undefined;
|
|
903
|
+
} | undefined;
|
|
904
|
+
clientCredentials?: {
|
|
905
|
+
type: "clientCredentials";
|
|
906
|
+
token?: string | undefined;
|
|
907
|
+
refreshUrl?: string | undefined;
|
|
908
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
909
|
+
selectedScopes?: string[] | undefined;
|
|
910
|
+
'x-scalar-client-id'?: string | undefined;
|
|
911
|
+
tokenUrl?: string | undefined;
|
|
912
|
+
clientSecret?: string | undefined;
|
|
913
|
+
} | undefined;
|
|
914
|
+
authorizationCode?: {
|
|
915
|
+
type: "authorizationCode";
|
|
916
|
+
token?: string | undefined;
|
|
917
|
+
refreshUrl?: string | undefined;
|
|
918
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
919
|
+
selectedScopes?: string[] | undefined;
|
|
920
|
+
'x-scalar-client-id'?: string | undefined;
|
|
921
|
+
authorizationUrl?: string | undefined;
|
|
922
|
+
'x-scalar-redirect-uri'?: string | undefined;
|
|
923
|
+
tokenUrl?: string | undefined;
|
|
924
|
+
clientSecret?: string | undefined;
|
|
925
|
+
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
926
|
+
} | undefined;
|
|
776
927
|
} | undefined;
|
|
777
|
-
'x-scalar-client-id'?: string | undefined;
|
|
778
928
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
779
929
|
description: z.ZodOptional<z.ZodString>;
|
|
780
930
|
}, {
|
|
@@ -794,7 +944,7 @@ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUt
|
|
|
794
944
|
openIdConnectUrl?: string | undefined;
|
|
795
945
|
}>]>;
|
|
796
946
|
/** Extended security schemes for workspace usage */
|
|
797
|
-
export declare const securitySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
947
|
+
export declare const securitySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
798
948
|
description: z.ZodOptional<z.ZodString>;
|
|
799
949
|
}, {
|
|
800
950
|
type: z.ZodLiteral<"apiKey">;
|
|
@@ -806,21 +956,25 @@ export declare const securitySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUtil.
|
|
|
806
956
|
uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
807
957
|
/** The name key that links a security requirement to a security object */
|
|
808
958
|
nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
959
|
+
}>, {
|
|
960
|
+
value: z.ZodDefault<z.ZodString>;
|
|
809
961
|
}>, "strip", z.ZodTypeAny, {
|
|
810
962
|
type: "apiKey";
|
|
963
|
+
value: string;
|
|
811
964
|
uid: string;
|
|
812
965
|
name: string;
|
|
813
|
-
in: "query" | "header" | "cookie";
|
|
814
966
|
nameKey: string;
|
|
967
|
+
in: "query" | "header" | "cookie";
|
|
815
968
|
description?: string | undefined;
|
|
816
969
|
}, {
|
|
817
970
|
type: "apiKey";
|
|
971
|
+
value?: string | undefined;
|
|
818
972
|
uid?: string | undefined;
|
|
819
973
|
name?: string | undefined;
|
|
820
974
|
description?: string | undefined;
|
|
821
|
-
in?: "query" | "header" | "cookie" | undefined;
|
|
822
975
|
nameKey?: string | undefined;
|
|
823
|
-
|
|
976
|
+
in?: "query" | "header" | "cookie" | undefined;
|
|
977
|
+
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
824
978
|
description: z.ZodOptional<z.ZodString>;
|
|
825
979
|
}, {
|
|
826
980
|
type: z.ZodLiteral<"http">;
|
|
@@ -839,12 +993,19 @@ export declare const securitySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUtil.
|
|
|
839
993
|
uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
840
994
|
/** The name key that links a security requirement to a security object */
|
|
841
995
|
nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
996
|
+
}>, {
|
|
997
|
+
username: z.ZodDefault<z.ZodString>;
|
|
998
|
+
password: z.ZodDefault<z.ZodString>;
|
|
999
|
+
token: z.ZodDefault<z.ZodString>;
|
|
842
1000
|
}>, "strip", z.ZodTypeAny, {
|
|
843
1001
|
type: "http";
|
|
844
1002
|
uid: string;
|
|
845
1003
|
nameKey: string;
|
|
846
1004
|
scheme: "basic" | "bearer";
|
|
847
1005
|
bearerFormat: string;
|
|
1006
|
+
username: string;
|
|
1007
|
+
password: string;
|
|
1008
|
+
token: string;
|
|
848
1009
|
description?: string | undefined;
|
|
849
1010
|
}, {
|
|
850
1011
|
type: "http";
|
|
@@ -853,6 +1014,9 @@ export declare const securitySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUtil.
|
|
|
853
1014
|
nameKey?: string | undefined;
|
|
854
1015
|
scheme?: string | undefined;
|
|
855
1016
|
bearerFormat?: string | undefined;
|
|
1017
|
+
username?: string | undefined;
|
|
1018
|
+
password?: string | undefined;
|
|
1019
|
+
token?: string | undefined;
|
|
856
1020
|
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
857
1021
|
description: z.ZodOptional<z.ZodString>;
|
|
858
1022
|
}, {
|
|
@@ -883,134 +1047,276 @@ export declare const securitySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUtil.
|
|
|
883
1047
|
}, {
|
|
884
1048
|
type: z.ZodLiteral<"oauth2">;
|
|
885
1049
|
/** REQUIRED. An object containing configuration information for the flow types supported. */
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1050
|
+
flows: z.ZodDefault<z.ZodObject<{
|
|
1051
|
+
implicit: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
1052
|
+
/**
|
|
1053
|
+
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
1054
|
+
* URL. The OAuth2 standard requires the use of TLS.
|
|
1055
|
+
*/
|
|
1056
|
+
refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1057
|
+
/**
|
|
1058
|
+
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
1059
|
+
* between the scope name and a short description for it. The map MAY be empty.
|
|
1060
|
+
*/
|
|
1061
|
+
scopes: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>;
|
|
1062
|
+
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
1063
|
+
/** Extension to save the client Id associated with an oauth flow */
|
|
1064
|
+
'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1065
|
+
/** The auth token */
|
|
1066
|
+
token: z.ZodDefault<z.ZodString>;
|
|
1067
|
+
}, {
|
|
1068
|
+
type: z.ZodLiteral<"implicit">;
|
|
1069
|
+
authorizationUrl: z.ZodDefault<z.ZodString>;
|
|
1070
|
+
'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1071
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1072
|
+
type: "implicit";
|
|
1073
|
+
token: string;
|
|
1074
|
+
refreshUrl: string;
|
|
1075
|
+
scopes: Record<string, string>;
|
|
1076
|
+
selectedScopes: string[];
|
|
1077
|
+
'x-scalar-client-id': string;
|
|
1078
|
+
authorizationUrl: string;
|
|
1079
|
+
'x-scalar-redirect-uri': string;
|
|
1080
|
+
}, {
|
|
1081
|
+
type: "implicit";
|
|
1082
|
+
token?: string | undefined;
|
|
1083
|
+
refreshUrl?: string | undefined;
|
|
1084
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
1085
|
+
selectedScopes?: string[] | undefined;
|
|
1086
|
+
'x-scalar-client-id'?: string | undefined;
|
|
1087
|
+
authorizationUrl?: string | undefined;
|
|
1088
|
+
'x-scalar-redirect-uri'?: string | undefined;
|
|
1089
|
+
}>>;
|
|
1090
|
+
password: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
1091
|
+
/**
|
|
1092
|
+
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
1093
|
+
* URL. The OAuth2 standard requires the use of TLS.
|
|
1094
|
+
*/
|
|
1095
|
+
refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1096
|
+
/**
|
|
1097
|
+
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
1098
|
+
* between the scope name and a short description for it. The map MAY be empty.
|
|
1099
|
+
*/
|
|
1100
|
+
scopes: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>;
|
|
1101
|
+
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
1102
|
+
/** Extension to save the client Id associated with an oauth flow */
|
|
1103
|
+
'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1104
|
+
/** The auth token */
|
|
1105
|
+
token: z.ZodDefault<z.ZodString>;
|
|
1106
|
+
}, {
|
|
1107
|
+
type: z.ZodLiteral<"password">;
|
|
1108
|
+
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
1109
|
+
clientSecret: z.ZodDefault<z.ZodString>;
|
|
1110
|
+
username: z.ZodDefault<z.ZodString>;
|
|
1111
|
+
password: z.ZodDefault<z.ZodString>;
|
|
1112
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1113
|
+
type: "password";
|
|
1114
|
+
username: string;
|
|
1115
|
+
password: string;
|
|
1116
|
+
token: string;
|
|
1117
|
+
refreshUrl: string;
|
|
1118
|
+
scopes: Record<string, string>;
|
|
1119
|
+
selectedScopes: string[];
|
|
1120
|
+
'x-scalar-client-id': string;
|
|
1121
|
+
tokenUrl: string;
|
|
1122
|
+
clientSecret: string;
|
|
1123
|
+
}, {
|
|
1124
|
+
type: "password";
|
|
1125
|
+
username?: string | undefined;
|
|
1126
|
+
password?: string | undefined;
|
|
1127
|
+
token?: string | undefined;
|
|
1128
|
+
refreshUrl?: string | undefined;
|
|
1129
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
1130
|
+
selectedScopes?: string[] | undefined;
|
|
1131
|
+
'x-scalar-client-id'?: string | undefined;
|
|
1132
|
+
tokenUrl?: string | undefined;
|
|
1133
|
+
clientSecret?: string | undefined;
|
|
1134
|
+
}>>;
|
|
1135
|
+
clientCredentials: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
1136
|
+
/**
|
|
1137
|
+
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
1138
|
+
* URL. The OAuth2 standard requires the use of TLS.
|
|
1139
|
+
*/
|
|
1140
|
+
refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1141
|
+
/**
|
|
1142
|
+
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
1143
|
+
* between the scope name and a short description for it. The map MAY be empty.
|
|
1144
|
+
*/
|
|
1145
|
+
scopes: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>;
|
|
1146
|
+
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
1147
|
+
/** Extension to save the client Id associated with an oauth flow */
|
|
1148
|
+
'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1149
|
+
/** The auth token */
|
|
1150
|
+
token: z.ZodDefault<z.ZodString>;
|
|
1151
|
+
}, {
|
|
1152
|
+
type: z.ZodLiteral<"clientCredentials">;
|
|
1153
|
+
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
1154
|
+
clientSecret: z.ZodDefault<z.ZodString>;
|
|
1155
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1156
|
+
type: "clientCredentials";
|
|
1157
|
+
token: string;
|
|
1158
|
+
refreshUrl: string;
|
|
1159
|
+
scopes: Record<string, string>;
|
|
1160
|
+
selectedScopes: string[];
|
|
1161
|
+
'x-scalar-client-id': string;
|
|
1162
|
+
tokenUrl: string;
|
|
1163
|
+
clientSecret: string;
|
|
1164
|
+
}, {
|
|
1165
|
+
type: "clientCredentials";
|
|
1166
|
+
token?: string | undefined;
|
|
1167
|
+
refreshUrl?: string | undefined;
|
|
1168
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
1169
|
+
selectedScopes?: string[] | undefined;
|
|
1170
|
+
'x-scalar-client-id'?: string | undefined;
|
|
1171
|
+
tokenUrl?: string | undefined;
|
|
1172
|
+
clientSecret?: string | undefined;
|
|
1173
|
+
}>>;
|
|
1174
|
+
authorizationCode: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
|
|
1175
|
+
/**
|
|
1176
|
+
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
1177
|
+
* URL. The OAuth2 standard requires the use of TLS.
|
|
1178
|
+
*/
|
|
1179
|
+
refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1180
|
+
/**
|
|
1181
|
+
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
1182
|
+
* between the scope name and a short description for it. The map MAY be empty.
|
|
1183
|
+
*/
|
|
1184
|
+
scopes: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodString>>>>>;
|
|
1185
|
+
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
1186
|
+
/** Extension to save the client Id associated with an oauth flow */
|
|
1187
|
+
'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1188
|
+
/** The auth token */
|
|
1189
|
+
token: z.ZodDefault<z.ZodString>;
|
|
1190
|
+
}, {
|
|
1191
|
+
type: z.ZodLiteral<"authorizationCode">;
|
|
1192
|
+
authorizationUrl: z.ZodDefault<z.ZodString>;
|
|
1193
|
+
/**
|
|
1194
|
+
* Whether to use PKCE for the authorization code flow.
|
|
1195
|
+
*
|
|
1196
|
+
* TODO: add docs
|
|
1197
|
+
*/
|
|
1198
|
+
'x-usePkce': z.ZodDefault<z.ZodOptional<z.ZodEnum<["SHA-256", "plain", "no"]>>>;
|
|
1199
|
+
'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1200
|
+
tokenUrl: z.ZodDefault<z.ZodString>;
|
|
1201
|
+
clientSecret: z.ZodDefault<z.ZodString>;
|
|
1202
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1203
|
+
type: "authorizationCode";
|
|
1204
|
+
token: string;
|
|
1205
|
+
refreshUrl: string;
|
|
1206
|
+
scopes: Record<string, string>;
|
|
1207
|
+
selectedScopes: string[];
|
|
1208
|
+
'x-scalar-client-id': string;
|
|
1209
|
+
authorizationUrl: string;
|
|
1210
|
+
'x-scalar-redirect-uri': string;
|
|
1211
|
+
tokenUrl: string;
|
|
1212
|
+
clientSecret: string;
|
|
1213
|
+
'x-usePkce': "SHA-256" | "plain" | "no";
|
|
1214
|
+
}, {
|
|
1215
|
+
type: "authorizationCode";
|
|
1216
|
+
token?: string | undefined;
|
|
1217
|
+
refreshUrl?: string | undefined;
|
|
1218
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
1219
|
+
selectedScopes?: string[] | undefined;
|
|
1220
|
+
'x-scalar-client-id'?: string | undefined;
|
|
1221
|
+
authorizationUrl?: string | undefined;
|
|
1222
|
+
'x-scalar-redirect-uri'?: string | undefined;
|
|
1223
|
+
tokenUrl?: string | undefined;
|
|
1224
|
+
clientSecret?: string | undefined;
|
|
1225
|
+
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
1226
|
+
}>>;
|
|
1227
|
+
}, "strip", z.ZodTypeAny, {
|
|
1228
|
+
password?: {
|
|
1229
|
+
type: "password";
|
|
1230
|
+
username: string;
|
|
1231
|
+
password: string;
|
|
1232
|
+
token: string;
|
|
1233
|
+
refreshUrl: string;
|
|
1234
|
+
scopes: Record<string, string>;
|
|
1235
|
+
selectedScopes: string[];
|
|
1236
|
+
'x-scalar-client-id': string;
|
|
1237
|
+
tokenUrl: string;
|
|
1238
|
+
clientSecret: string;
|
|
1239
|
+
} | undefined;
|
|
1240
|
+
implicit?: {
|
|
1241
|
+
type: "implicit";
|
|
1242
|
+
token: string;
|
|
1243
|
+
refreshUrl: string;
|
|
1244
|
+
scopes: Record<string, string>;
|
|
1245
|
+
selectedScopes: string[];
|
|
1246
|
+
'x-scalar-client-id': string;
|
|
1247
|
+
authorizationUrl: string;
|
|
1248
|
+
'x-scalar-redirect-uri': string;
|
|
1249
|
+
} | undefined;
|
|
1250
|
+
clientCredentials?: {
|
|
1251
|
+
type: "clientCredentials";
|
|
1252
|
+
token: string;
|
|
1253
|
+
refreshUrl: string;
|
|
1254
|
+
scopes: Record<string, string>;
|
|
1255
|
+
selectedScopes: string[];
|
|
1256
|
+
'x-scalar-client-id': string;
|
|
1257
|
+
tokenUrl: string;
|
|
1258
|
+
clientSecret: string;
|
|
1259
|
+
} | undefined;
|
|
1260
|
+
authorizationCode?: {
|
|
1261
|
+
type: "authorizationCode";
|
|
1262
|
+
token: string;
|
|
1263
|
+
refreshUrl: string;
|
|
1264
|
+
scopes: Record<string, string>;
|
|
1265
|
+
selectedScopes: string[];
|
|
1266
|
+
'x-scalar-client-id': string;
|
|
1267
|
+
authorizationUrl: string;
|
|
1268
|
+
'x-scalar-redirect-uri': string;
|
|
1269
|
+
tokenUrl: string;
|
|
1270
|
+
clientSecret: string;
|
|
1271
|
+
'x-usePkce': "SHA-256" | "plain" | "no";
|
|
1272
|
+
} | undefined;
|
|
1002
1273
|
}, {
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1274
|
+
password?: {
|
|
1275
|
+
type: "password";
|
|
1276
|
+
username?: string | undefined;
|
|
1277
|
+
password?: string | undefined;
|
|
1278
|
+
token?: string | undefined;
|
|
1279
|
+
refreshUrl?: string | undefined;
|
|
1280
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
1281
|
+
selectedScopes?: string[] | undefined;
|
|
1282
|
+
'x-scalar-client-id'?: string | undefined;
|
|
1283
|
+
tokenUrl?: string | undefined;
|
|
1284
|
+
clientSecret?: string | undefined;
|
|
1285
|
+
} | undefined;
|
|
1286
|
+
implicit?: {
|
|
1287
|
+
type: "implicit";
|
|
1288
|
+
token?: string | undefined;
|
|
1289
|
+
refreshUrl?: string | undefined;
|
|
1290
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
1291
|
+
selectedScopes?: string[] | undefined;
|
|
1292
|
+
'x-scalar-client-id'?: string | undefined;
|
|
1293
|
+
authorizationUrl?: string | undefined;
|
|
1294
|
+
'x-scalar-redirect-uri'?: string | undefined;
|
|
1295
|
+
} | undefined;
|
|
1296
|
+
clientCredentials?: {
|
|
1297
|
+
type: "clientCredentials";
|
|
1298
|
+
token?: string | undefined;
|
|
1299
|
+
refreshUrl?: string | undefined;
|
|
1300
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
1301
|
+
selectedScopes?: string[] | undefined;
|
|
1302
|
+
'x-scalar-client-id'?: string | undefined;
|
|
1303
|
+
tokenUrl?: string | undefined;
|
|
1304
|
+
clientSecret?: string | undefined;
|
|
1305
|
+
} | undefined;
|
|
1306
|
+
authorizationCode?: {
|
|
1307
|
+
type: "authorizationCode";
|
|
1308
|
+
token?: string | undefined;
|
|
1309
|
+
refreshUrl?: string | undefined;
|
|
1310
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
1311
|
+
selectedScopes?: string[] | undefined;
|
|
1312
|
+
'x-scalar-client-id'?: string | undefined;
|
|
1313
|
+
authorizationUrl?: string | undefined;
|
|
1314
|
+
'x-scalar-redirect-uri'?: string | undefined;
|
|
1315
|
+
tokenUrl?: string | undefined;
|
|
1316
|
+
clientSecret?: string | undefined;
|
|
1317
|
+
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
1318
|
+
} | undefined;
|
|
1319
|
+
}>>;
|
|
1014
1320
|
}>, {
|
|
1015
1321
|
uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1016
1322
|
/** The name key that links a security requirement to a security object */
|
|
@@ -1019,72 +1325,106 @@ export declare const securitySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUtil.
|
|
|
1019
1325
|
type: "oauth2";
|
|
1020
1326
|
uid: string;
|
|
1021
1327
|
nameKey: string;
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1328
|
+
flows: {
|
|
1329
|
+
password?: {
|
|
1330
|
+
type: "password";
|
|
1331
|
+
username: string;
|
|
1332
|
+
password: string;
|
|
1333
|
+
token: string;
|
|
1334
|
+
refreshUrl: string;
|
|
1335
|
+
scopes: Record<string, string>;
|
|
1336
|
+
selectedScopes: string[];
|
|
1337
|
+
'x-scalar-client-id': string;
|
|
1338
|
+
tokenUrl: string;
|
|
1339
|
+
clientSecret: string;
|
|
1340
|
+
} | undefined;
|
|
1341
|
+
implicit?: {
|
|
1342
|
+
type: "implicit";
|
|
1343
|
+
token: string;
|
|
1344
|
+
refreshUrl: string;
|
|
1345
|
+
scopes: Record<string, string>;
|
|
1346
|
+
selectedScopes: string[];
|
|
1347
|
+
'x-scalar-client-id': string;
|
|
1348
|
+
authorizationUrl: string;
|
|
1349
|
+
'x-scalar-redirect-uri': string;
|
|
1350
|
+
} | undefined;
|
|
1351
|
+
clientCredentials?: {
|
|
1352
|
+
type: "clientCredentials";
|
|
1353
|
+
token: string;
|
|
1354
|
+
refreshUrl: string;
|
|
1355
|
+
scopes: Record<string, string>;
|
|
1356
|
+
selectedScopes: string[];
|
|
1357
|
+
'x-scalar-client-id': string;
|
|
1358
|
+
tokenUrl: string;
|
|
1359
|
+
clientSecret: string;
|
|
1360
|
+
} | undefined;
|
|
1361
|
+
authorizationCode?: {
|
|
1362
|
+
type: "authorizationCode";
|
|
1363
|
+
token: string;
|
|
1364
|
+
refreshUrl: string;
|
|
1365
|
+
scopes: Record<string, string>;
|
|
1366
|
+
selectedScopes: string[];
|
|
1367
|
+
'x-scalar-client-id': string;
|
|
1368
|
+
authorizationUrl: string;
|
|
1369
|
+
'x-scalar-redirect-uri': string;
|
|
1370
|
+
tokenUrl: string;
|
|
1371
|
+
clientSecret: string;
|
|
1372
|
+
'x-usePkce': "SHA-256" | "plain" | "no";
|
|
1373
|
+
} | undefined;
|
|
1050
1374
|
};
|
|
1051
|
-
'x-scalar-client-id': string;
|
|
1052
1375
|
description?: string | undefined;
|
|
1053
1376
|
}, {
|
|
1054
1377
|
type: "oauth2";
|
|
1055
1378
|
uid?: string | undefined;
|
|
1056
1379
|
description?: string | undefined;
|
|
1057
1380
|
nameKey?: string | undefined;
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1381
|
+
flows?: {
|
|
1382
|
+
password?: {
|
|
1383
|
+
type: "password";
|
|
1384
|
+
username?: string | undefined;
|
|
1385
|
+
password?: string | undefined;
|
|
1386
|
+
token?: string | undefined;
|
|
1387
|
+
refreshUrl?: string | undefined;
|
|
1388
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
1389
|
+
selectedScopes?: string[] | undefined;
|
|
1390
|
+
'x-scalar-client-id'?: string | undefined;
|
|
1391
|
+
tokenUrl?: string | undefined;
|
|
1392
|
+
clientSecret?: string | undefined;
|
|
1393
|
+
} | undefined;
|
|
1394
|
+
implicit?: {
|
|
1395
|
+
type: "implicit";
|
|
1396
|
+
token?: string | undefined;
|
|
1397
|
+
refreshUrl?: string | undefined;
|
|
1398
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
1399
|
+
selectedScopes?: string[] | undefined;
|
|
1400
|
+
'x-scalar-client-id'?: string | undefined;
|
|
1401
|
+
authorizationUrl?: string | undefined;
|
|
1402
|
+
'x-scalar-redirect-uri'?: string | undefined;
|
|
1403
|
+
} | undefined;
|
|
1404
|
+
clientCredentials?: {
|
|
1405
|
+
type: "clientCredentials";
|
|
1406
|
+
token?: string | undefined;
|
|
1407
|
+
refreshUrl?: string | undefined;
|
|
1408
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
1409
|
+
selectedScopes?: string[] | undefined;
|
|
1410
|
+
'x-scalar-client-id'?: string | undefined;
|
|
1411
|
+
tokenUrl?: string | undefined;
|
|
1412
|
+
clientSecret?: string | undefined;
|
|
1413
|
+
} | undefined;
|
|
1414
|
+
authorizationCode?: {
|
|
1415
|
+
type: "authorizationCode";
|
|
1416
|
+
token?: string | undefined;
|
|
1417
|
+
refreshUrl?: string | undefined;
|
|
1418
|
+
scopes?: Record<string, string | undefined> | undefined;
|
|
1419
|
+
selectedScopes?: string[] | undefined;
|
|
1420
|
+
'x-scalar-client-id'?: string | undefined;
|
|
1421
|
+
authorizationUrl?: string | undefined;
|
|
1422
|
+
'x-scalar-redirect-uri'?: string | undefined;
|
|
1423
|
+
tokenUrl?: string | undefined;
|
|
1424
|
+
clientSecret?: string | undefined;
|
|
1425
|
+
'x-usePkce'?: "SHA-256" | "plain" | "no" | undefined;
|
|
1426
|
+
} | undefined;
|
|
1086
1427
|
} | undefined;
|
|
1087
|
-
'x-scalar-client-id'?: string | undefined;
|
|
1088
1428
|
}>]>;
|
|
1089
1429
|
/**
|
|
1090
1430
|
* Security Scheme Object
|