@scalar/oas-utils 0.2.18 → 0.2.20
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 +13 -0
- package/dist/entities/workspace/collection/collection.d.ts +4 -22
- package/dist/entities/workspace/collection/collection.d.ts.map +1 -1
- package/dist/entities/workspace/collection/collection.js +2 -18
- package/dist/entities/workspace/security/index.js +1 -1
- package/dist/entities/workspace/security/security-schemes.d.ts +555 -544
- package/dist/entities/workspace/security/security-schemes.d.ts.map +1 -1
- package/dist/entities/workspace/security/security-schemes.js +65 -81
- package/dist/entities/workspace/server/server.d.ts +5 -5
- package/dist/entities/workspace/spec/request-examples.d.ts +40 -40
- package/dist/entities/workspace/spec/requests.d.ts +11 -3
- package/dist/entities/workspace/spec/requests.d.ts.map +1 -1
- package/dist/entities/workspace/spec/requests.js +4 -0
- package/dist/transforms/import-spec.d.ts +2 -5
- package/dist/transforms/import-spec.d.ts.map +1 -1
- package/dist/transforms/import-spec.js +0 -12
- package/package.json +2 -2
|
@@ -1,287 +1,300 @@
|
|
|
1
|
-
import type { ValueOf } from 'type-fest';
|
|
2
1
|
import { z } from 'zod';
|
|
3
|
-
declare const
|
|
4
|
-
|
|
2
|
+
export declare const securitySchemeApiKeyIn: readonly ["query", "header", "cookie"];
|
|
3
|
+
declare const securitySchemeApiKey: z.ZodObject<z.objectUtil.extendShape<{
|
|
5
4
|
uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
5
|
+
/** The name key that links a security requirement to a security object */
|
|
6
|
+
nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
6
7
|
description: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, {
|
|
9
|
+
type: z.ZodLiteral<"apiKey">;
|
|
10
|
+
/** REQUIRED. The name of the header, query or cookie parameter to be used. */
|
|
11
|
+
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
12
|
+
/** REQUIRED. The location of the API key. Valid values are "query", "header" or "cookie". */
|
|
13
|
+
in: z.ZodDefault<z.ZodOptional<z.ZodEnum<["query", "header", "cookie"]>>>;
|
|
14
|
+
value: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
15
|
+
}>, "strip", z.ZodTypeAny, {
|
|
16
|
+
type: "apiKey";
|
|
17
|
+
value: string;
|
|
18
|
+
uid: string;
|
|
19
|
+
nameKey: string;
|
|
20
|
+
name: string;
|
|
21
|
+
in: "query" | "header" | "cookie";
|
|
22
|
+
description?: string | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
type: "apiKey";
|
|
25
|
+
value?: string | undefined;
|
|
26
|
+
uid?: string | undefined;
|
|
27
|
+
nameKey?: string | undefined;
|
|
28
|
+
description?: string | undefined;
|
|
29
|
+
name?: string | undefined;
|
|
30
|
+
in?: "query" | "header" | "cookie" | undefined;
|
|
31
|
+
}>;
|
|
32
|
+
export type SecuritySchemeApiKey = z.infer<typeof securitySchemeApiKey>;
|
|
33
|
+
declare const securitySchemeOauth2: z.ZodObject<z.objectUtil.extendShape<{
|
|
34
|
+
uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
35
|
+
/** The name key that links a security requirement to a security object */
|
|
36
|
+
nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
37
|
+
description: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, {
|
|
39
|
+
type: z.ZodLiteral<"oauth2">;
|
|
7
40
|
/** REQUIRED. An object containing configuration information for the flow types supported. */
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
/** Username */
|
|
35
|
-
value: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
36
|
-
/** Password */
|
|
37
|
-
secondValue: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
38
|
-
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
39
|
-
clientSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
40
|
-
token: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
41
|
-
}, "strip", z.ZodTypeAny, {
|
|
42
|
-
value: string;
|
|
43
|
-
secondValue: string;
|
|
44
|
-
selectedScopes: string[];
|
|
45
|
-
token: string;
|
|
46
|
-
tokenUrl: string;
|
|
47
|
-
clientSecret: string;
|
|
48
|
-
refreshUrl?: string | undefined;
|
|
49
|
-
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
50
|
-
}, {
|
|
51
|
-
value?: string | undefined;
|
|
52
|
-
secondValue?: string | undefined;
|
|
53
|
-
refreshUrl?: string | undefined;
|
|
54
|
-
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
55
|
-
selectedScopes?: string[] | undefined;
|
|
56
|
-
token?: string | undefined;
|
|
57
|
-
tokenUrl?: string | undefined;
|
|
58
|
-
clientSecret?: string | undefined;
|
|
59
|
-
}>>;
|
|
60
|
-
/** Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0. */
|
|
61
|
-
clientCredentials: z.ZodOptional<z.ZodObject<{
|
|
62
|
-
tokenUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
63
|
-
refreshUrl: z.ZodOptional<z.ZodString>;
|
|
64
|
-
scopes: 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, {}, {}>]>>;
|
|
65
|
-
clientSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
66
|
-
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
67
|
-
token: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
68
|
-
}, "strip", z.ZodTypeAny, {
|
|
69
|
-
selectedScopes: string[];
|
|
70
|
-
token: string;
|
|
71
|
-
tokenUrl: string;
|
|
72
|
-
clientSecret: string;
|
|
73
|
-
refreshUrl?: string | undefined;
|
|
74
|
-
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
75
|
-
}, {
|
|
76
|
-
refreshUrl?: string | undefined;
|
|
77
|
-
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
78
|
-
selectedScopes?: string[] | undefined;
|
|
79
|
-
token?: string | undefined;
|
|
80
|
-
tokenUrl?: string | undefined;
|
|
81
|
-
clientSecret?: string | undefined;
|
|
82
|
-
}>>;
|
|
83
|
-
/** Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0.*/
|
|
84
|
-
authorizationCode: z.ZodOptional<z.ZodObject<{
|
|
85
|
-
authorizationUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
86
|
-
tokenUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
87
|
-
refreshUrl: z.ZodOptional<z.ZodString>;
|
|
88
|
-
scopes: 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, {}, {}>]>>;
|
|
89
|
-
clientSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
90
|
-
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
91
|
-
token: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
92
|
-
}, "strip", z.ZodTypeAny, {
|
|
93
|
-
authorizationUrl: string;
|
|
94
|
-
selectedScopes: string[];
|
|
95
|
-
token: string;
|
|
96
|
-
tokenUrl: string;
|
|
97
|
-
clientSecret: string;
|
|
98
|
-
refreshUrl?: string | undefined;
|
|
99
|
-
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
100
|
-
}, {
|
|
101
|
-
authorizationUrl?: string | undefined;
|
|
102
|
-
refreshUrl?: string | undefined;
|
|
103
|
-
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
104
|
-
selectedScopes?: string[] | undefined;
|
|
105
|
-
token?: string | undefined;
|
|
106
|
-
tokenUrl?: string | undefined;
|
|
107
|
-
clientSecret?: string | undefined;
|
|
108
|
-
}>>;
|
|
109
|
-
}, "strip", z.ZodTypeAny, {
|
|
110
|
-
implicit?: {
|
|
111
|
-
authorizationUrl: string;
|
|
112
|
-
selectedScopes: string[];
|
|
113
|
-
token: string;
|
|
114
|
-
refreshUrl?: string | undefined;
|
|
115
|
-
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
116
|
-
} | undefined;
|
|
117
|
-
password?: {
|
|
118
|
-
value: string;
|
|
119
|
-
secondValue: string;
|
|
120
|
-
selectedScopes: string[];
|
|
121
|
-
token: string;
|
|
122
|
-
tokenUrl: string;
|
|
123
|
-
clientSecret: string;
|
|
124
|
-
refreshUrl?: string | undefined;
|
|
125
|
-
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
126
|
-
} | undefined;
|
|
127
|
-
clientCredentials?: {
|
|
128
|
-
selectedScopes: string[];
|
|
129
|
-
token: string;
|
|
130
|
-
tokenUrl: string;
|
|
131
|
-
clientSecret: string;
|
|
132
|
-
refreshUrl?: string | undefined;
|
|
133
|
-
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
134
|
-
} | undefined;
|
|
135
|
-
authorizationCode?: {
|
|
136
|
-
authorizationUrl: string;
|
|
137
|
-
selectedScopes: string[];
|
|
138
|
-
token: string;
|
|
139
|
-
tokenUrl: string;
|
|
140
|
-
clientSecret: string;
|
|
141
|
-
refreshUrl?: string | undefined;
|
|
142
|
-
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
143
|
-
} | undefined;
|
|
41
|
+
flow: z.ZodDefault<z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
|
|
42
|
+
/**
|
|
43
|
+
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
44
|
+
* URL. The OAuth2 standard requires the use of TLS.
|
|
45
|
+
*/
|
|
46
|
+
refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
47
|
+
/**
|
|
48
|
+
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
49
|
+
* between the scope name and a short description for it. The map MAY be empty.
|
|
50
|
+
*/
|
|
51
|
+
scopes: 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, {}, {}>]>>;
|
|
52
|
+
/** User selected scopes per flow */
|
|
53
|
+
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
54
|
+
token: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
55
|
+
}, {
|
|
56
|
+
type: z.ZodLiteral<"implicit">;
|
|
57
|
+
authorizationUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
58
|
+
redirectUri: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
59
|
+
}>, "strip", z.ZodTypeAny, {
|
|
60
|
+
type: "implicit";
|
|
61
|
+
refreshUrl: string;
|
|
62
|
+
selectedScopes: string[];
|
|
63
|
+
token: string;
|
|
64
|
+
authorizationUrl: string;
|
|
65
|
+
redirectUri: string;
|
|
66
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
144
67
|
}, {
|
|
145
|
-
implicit
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
68
|
+
type: "implicit";
|
|
69
|
+
refreshUrl?: string | undefined;
|
|
70
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
71
|
+
selectedScopes?: string[] | undefined;
|
|
72
|
+
token?: string | undefined;
|
|
73
|
+
authorizationUrl?: string | undefined;
|
|
74
|
+
redirectUri?: string | undefined;
|
|
75
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
76
|
+
/**
|
|
77
|
+
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
78
|
+
* URL. The OAuth2 standard requires the use of TLS.
|
|
79
|
+
*/
|
|
80
|
+
refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
81
|
+
/**
|
|
82
|
+
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
83
|
+
* between the scope name and a short description for it. The map MAY be empty.
|
|
84
|
+
*/
|
|
85
|
+
scopes: 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, {}, {}>]>>;
|
|
86
|
+
/** User selected scopes per flow */
|
|
87
|
+
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
88
|
+
token: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
89
|
+
}, {
|
|
90
|
+
type: z.ZodLiteral<"password">;
|
|
91
|
+
tokenUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
92
|
+
/** Username */
|
|
93
|
+
value: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
94
|
+
/** Password */
|
|
95
|
+
secondValue: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
96
|
+
clientSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
97
|
+
}>, "strip", z.ZodTypeAny, {
|
|
98
|
+
type: "password";
|
|
99
|
+
value: string;
|
|
100
|
+
secondValue: string;
|
|
101
|
+
refreshUrl: string;
|
|
102
|
+
selectedScopes: string[];
|
|
103
|
+
token: string;
|
|
104
|
+
tokenUrl: string;
|
|
105
|
+
clientSecret: string;
|
|
106
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
107
|
+
}, {
|
|
108
|
+
type: "password";
|
|
109
|
+
value?: string | undefined;
|
|
110
|
+
secondValue?: string | undefined;
|
|
111
|
+
refreshUrl?: string | undefined;
|
|
112
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
113
|
+
selectedScopes?: string[] | undefined;
|
|
114
|
+
token?: string | undefined;
|
|
115
|
+
tokenUrl?: string | undefined;
|
|
116
|
+
clientSecret?: string | undefined;
|
|
117
|
+
}>, 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
|
+
*/
|
|
122
|
+
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
|
+
scopes: 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, {}, {}>]>>;
|
|
128
|
+
/** User selected scopes per flow */
|
|
129
|
+
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
130
|
+
token: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
131
|
+
}, {
|
|
132
|
+
type: z.ZodLiteral<"clientCredentials">;
|
|
133
|
+
tokenUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
134
|
+
clientSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
135
|
+
}>, "strip", z.ZodTypeAny, {
|
|
136
|
+
type: "clientCredentials";
|
|
137
|
+
refreshUrl: string;
|
|
138
|
+
selectedScopes: string[];
|
|
139
|
+
token: string;
|
|
140
|
+
tokenUrl: string;
|
|
141
|
+
clientSecret: string;
|
|
142
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
143
|
+
}, {
|
|
144
|
+
type: "clientCredentials";
|
|
145
|
+
refreshUrl?: string | undefined;
|
|
146
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
147
|
+
selectedScopes?: string[] | undefined;
|
|
148
|
+
token?: string | undefined;
|
|
149
|
+
tokenUrl?: string | undefined;
|
|
150
|
+
clientSecret?: string | undefined;
|
|
151
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
152
|
+
/**
|
|
153
|
+
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
154
|
+
* URL. The OAuth2 standard requires the use of TLS.
|
|
155
|
+
*/
|
|
156
|
+
refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
157
|
+
/**
|
|
158
|
+
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
159
|
+
* between the scope name and a short description for it. The map MAY be empty.
|
|
160
|
+
*/
|
|
161
|
+
scopes: 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, {}, {}>]>>;
|
|
162
|
+
/** User selected scopes per flow */
|
|
163
|
+
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
164
|
+
token: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
165
|
+
}, {
|
|
166
|
+
type: z.ZodLiteral<"authorizationCode">;
|
|
167
|
+
authorizationUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
168
|
+
redirectUri: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
169
|
+
tokenUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
170
|
+
clientSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
171
|
+
}>, "strip", z.ZodTypeAny, {
|
|
172
|
+
type: "authorizationCode";
|
|
173
|
+
refreshUrl: string;
|
|
174
|
+
selectedScopes: string[];
|
|
175
|
+
token: string;
|
|
176
|
+
authorizationUrl: string;
|
|
177
|
+
redirectUri: string;
|
|
178
|
+
tokenUrl: string;
|
|
179
|
+
clientSecret: string;
|
|
180
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
181
|
+
}, {
|
|
182
|
+
type: "authorizationCode";
|
|
183
|
+
refreshUrl?: string | undefined;
|
|
184
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
185
|
+
selectedScopes?: string[] | undefined;
|
|
186
|
+
token?: string | undefined;
|
|
187
|
+
authorizationUrl?: string | undefined;
|
|
188
|
+
redirectUri?: string | undefined;
|
|
189
|
+
tokenUrl?: string | undefined;
|
|
190
|
+
clientSecret?: string | undefined;
|
|
191
|
+
}>]>>>;
|
|
180
192
|
clientId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
181
|
-
|
|
182
|
-
}, "strip", z.ZodTypeAny, {
|
|
193
|
+
}>, "strip", z.ZodTypeAny, {
|
|
183
194
|
type: "oauth2";
|
|
184
195
|
uid: string;
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
196
|
+
nameKey: string;
|
|
197
|
+
flow: {
|
|
198
|
+
type: "implicit";
|
|
199
|
+
refreshUrl: string;
|
|
200
|
+
selectedScopes: string[];
|
|
201
|
+
token: string;
|
|
202
|
+
authorizationUrl: string;
|
|
203
|
+
redirectUri: string;
|
|
204
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
205
|
+
} | {
|
|
206
|
+
type: "password";
|
|
207
|
+
value: string;
|
|
208
|
+
secondValue: string;
|
|
209
|
+
refreshUrl: string;
|
|
210
|
+
selectedScopes: string[];
|
|
211
|
+
token: string;
|
|
212
|
+
tokenUrl: string;
|
|
213
|
+
clientSecret: string;
|
|
214
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
215
|
+
} | {
|
|
216
|
+
type: "clientCredentials";
|
|
217
|
+
refreshUrl: string;
|
|
218
|
+
selectedScopes: string[];
|
|
219
|
+
token: string;
|
|
220
|
+
tokenUrl: string;
|
|
221
|
+
clientSecret: string;
|
|
222
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
223
|
+
} | {
|
|
224
|
+
type: "authorizationCode";
|
|
225
|
+
refreshUrl: string;
|
|
226
|
+
selectedScopes: string[];
|
|
227
|
+
token: string;
|
|
228
|
+
authorizationUrl: string;
|
|
229
|
+
redirectUri: string;
|
|
230
|
+
tokenUrl: string;
|
|
231
|
+
clientSecret: string;
|
|
232
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
220
233
|
};
|
|
221
234
|
clientId: string;
|
|
222
|
-
redirectUri: string;
|
|
223
235
|
description?: string | undefined;
|
|
224
236
|
}, {
|
|
225
237
|
type: "oauth2";
|
|
226
238
|
uid?: string | undefined;
|
|
239
|
+
nameKey?: string | undefined;
|
|
227
240
|
description?: string | undefined;
|
|
228
|
-
|
|
229
|
-
implicit
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
241
|
+
flow?: {
|
|
242
|
+
type: "implicit";
|
|
243
|
+
refreshUrl?: string | undefined;
|
|
244
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
245
|
+
selectedScopes?: string[] | undefined;
|
|
246
|
+
token?: string | undefined;
|
|
247
|
+
authorizationUrl?: string | undefined;
|
|
248
|
+
redirectUri?: string | undefined;
|
|
249
|
+
} | {
|
|
250
|
+
type: "password";
|
|
251
|
+
value?: string | undefined;
|
|
252
|
+
secondValue?: string | undefined;
|
|
253
|
+
refreshUrl?: string | undefined;
|
|
254
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
255
|
+
selectedScopes?: string[] | undefined;
|
|
256
|
+
token?: string | undefined;
|
|
257
|
+
tokenUrl?: string | undefined;
|
|
258
|
+
clientSecret?: string | undefined;
|
|
259
|
+
} | {
|
|
260
|
+
type: "clientCredentials";
|
|
261
|
+
refreshUrl?: string | undefined;
|
|
262
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
263
|
+
selectedScopes?: string[] | undefined;
|
|
264
|
+
token?: string | undefined;
|
|
265
|
+
tokenUrl?: string | undefined;
|
|
266
|
+
clientSecret?: string | undefined;
|
|
267
|
+
} | {
|
|
268
|
+
type: "authorizationCode";
|
|
269
|
+
refreshUrl?: string | undefined;
|
|
270
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
271
|
+
selectedScopes?: string[] | undefined;
|
|
272
|
+
token?: string | undefined;
|
|
273
|
+
authorizationUrl?: string | undefined;
|
|
274
|
+
redirectUri?: string | undefined;
|
|
275
|
+
tokenUrl?: string | undefined;
|
|
276
|
+
clientSecret?: string | undefined;
|
|
263
277
|
} | undefined;
|
|
264
278
|
clientId?: string | undefined;
|
|
265
|
-
redirectUri?: string | undefined;
|
|
266
279
|
}>;
|
|
267
280
|
export type SecuritySchemeOauth2 = z.infer<typeof securitySchemeOauth2>;
|
|
268
|
-
|
|
269
|
-
scheme: SecuritySchemeOauth2;
|
|
270
|
-
flow: ValueOf<Required<SecuritySchemeOauth2['flows']>>;
|
|
271
|
-
};
|
|
272
|
-
declare const securityScheme: z.ZodUnion<[z.ZodObject<{
|
|
273
|
-
type: z.ZodLiteral<"apiKey">;
|
|
281
|
+
declare const securityScheme: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
|
|
274
282
|
uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
283
|
+
/** The name key that links a security requirement to a security object */
|
|
284
|
+
nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
275
285
|
description: z.ZodOptional<z.ZodString>;
|
|
286
|
+
}, {
|
|
287
|
+
type: z.ZodLiteral<"apiKey">;
|
|
276
288
|
/** REQUIRED. The name of the header, query or cookie parameter to be used. */
|
|
277
289
|
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
278
290
|
/** REQUIRED. The location of the API key. Valid values are "query", "header" or "cookie". */
|
|
279
291
|
in: z.ZodDefault<z.ZodOptional<z.ZodEnum<["query", "header", "cookie"]>>>;
|
|
280
292
|
value: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
281
|
-
}
|
|
293
|
+
}>, "strip", z.ZodTypeAny, {
|
|
282
294
|
type: "apiKey";
|
|
283
295
|
value: string;
|
|
284
296
|
uid: string;
|
|
297
|
+
nameKey: string;
|
|
285
298
|
name: string;
|
|
286
299
|
in: "query" | "header" | "cookie";
|
|
287
300
|
description?: string | undefined;
|
|
@@ -289,13 +302,17 @@ declare const securityScheme: z.ZodUnion<[z.ZodObject<{
|
|
|
289
302
|
type: "apiKey";
|
|
290
303
|
value?: string | undefined;
|
|
291
304
|
uid?: string | undefined;
|
|
305
|
+
nameKey?: string | undefined;
|
|
292
306
|
description?: string | undefined;
|
|
293
307
|
name?: string | undefined;
|
|
294
308
|
in?: "query" | "header" | "cookie" | undefined;
|
|
295
|
-
}>, z.ZodObject<{
|
|
296
|
-
type: z.ZodLiteral<"http">;
|
|
309
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
297
310
|
uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
311
|
+
/** The name key that links a security requirement to a security object */
|
|
312
|
+
nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
298
313
|
description: z.ZodOptional<z.ZodString>;
|
|
314
|
+
}, {
|
|
315
|
+
type: z.ZodLiteral<"http">;
|
|
299
316
|
/**
|
|
300
317
|
* REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in
|
|
301
318
|
* [RFC7235]. The values used SHOULD be registered in the IANA Authentication Scheme registry.
|
|
@@ -311,10 +328,11 @@ declare const securityScheme: z.ZodUnion<[z.ZodObject<{
|
|
|
311
328
|
value: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
312
329
|
/** Password */
|
|
313
330
|
secondValue: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
314
|
-
}
|
|
331
|
+
}>, "strip", z.ZodTypeAny, {
|
|
315
332
|
type: "http";
|
|
316
333
|
value: string;
|
|
317
334
|
uid: string;
|
|
335
|
+
nameKey: string;
|
|
318
336
|
scheme: "basic" | "bearer";
|
|
319
337
|
bearerFormat: string;
|
|
320
338
|
secondValue: string;
|
|
@@ -323,290 +341,279 @@ declare const securityScheme: z.ZodUnion<[z.ZodObject<{
|
|
|
323
341
|
type: "http";
|
|
324
342
|
value?: string | undefined;
|
|
325
343
|
uid?: string | undefined;
|
|
344
|
+
nameKey?: string | undefined;
|
|
326
345
|
description?: string | undefined;
|
|
327
346
|
scheme?: "basic" | "bearer" | undefined;
|
|
328
347
|
bearerFormat?: string | undefined;
|
|
329
348
|
secondValue?: string | undefined;
|
|
330
|
-
}>, z.ZodObject<{
|
|
331
|
-
type: z.ZodLiteral<"oauth2">;
|
|
349
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
332
350
|
uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
351
|
+
/** The name key that links a security requirement to a security object */
|
|
352
|
+
nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
333
353
|
description: z.ZodOptional<z.ZodString>;
|
|
354
|
+
}, {
|
|
355
|
+
type: z.ZodLiteral<"oauth2">;
|
|
334
356
|
/** REQUIRED. An object containing configuration information for the flow types supported. */
|
|
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
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
refreshUrl?: string | undefined;
|
|
426
|
-
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
427
|
-
}, {
|
|
428
|
-
authorizationUrl?: string | undefined;
|
|
429
|
-
refreshUrl?: string | undefined;
|
|
430
|
-
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
431
|
-
selectedScopes?: string[] | undefined;
|
|
432
|
-
token?: string | undefined;
|
|
433
|
-
tokenUrl?: string | undefined;
|
|
434
|
-
clientSecret?: string | undefined;
|
|
435
|
-
}>>;
|
|
436
|
-
}, "strip", z.ZodTypeAny, {
|
|
437
|
-
implicit?: {
|
|
438
|
-
authorizationUrl: string;
|
|
439
|
-
selectedScopes: string[];
|
|
440
|
-
token: string;
|
|
441
|
-
refreshUrl?: string | undefined;
|
|
442
|
-
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
443
|
-
} | undefined;
|
|
444
|
-
password?: {
|
|
445
|
-
value: string;
|
|
446
|
-
secondValue: string;
|
|
447
|
-
selectedScopes: string[];
|
|
448
|
-
token: string;
|
|
449
|
-
tokenUrl: string;
|
|
450
|
-
clientSecret: string;
|
|
451
|
-
refreshUrl?: string | undefined;
|
|
452
|
-
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
453
|
-
} | undefined;
|
|
454
|
-
clientCredentials?: {
|
|
455
|
-
selectedScopes: string[];
|
|
456
|
-
token: string;
|
|
457
|
-
tokenUrl: string;
|
|
458
|
-
clientSecret: string;
|
|
459
|
-
refreshUrl?: string | undefined;
|
|
460
|
-
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
461
|
-
} | undefined;
|
|
462
|
-
authorizationCode?: {
|
|
463
|
-
authorizationUrl: string;
|
|
464
|
-
selectedScopes: string[];
|
|
465
|
-
token: string;
|
|
466
|
-
tokenUrl: string;
|
|
467
|
-
clientSecret: string;
|
|
468
|
-
refreshUrl?: string | undefined;
|
|
469
|
-
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
470
|
-
} | undefined;
|
|
357
|
+
flow: z.ZodDefault<z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
|
|
358
|
+
/**
|
|
359
|
+
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
360
|
+
* URL. The OAuth2 standard requires the use of TLS.
|
|
361
|
+
*/
|
|
362
|
+
refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
363
|
+
/**
|
|
364
|
+
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
365
|
+
* between the scope name and a short description for it. The map MAY be empty.
|
|
366
|
+
*/
|
|
367
|
+
scopes: 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, {}, {}>]>>;
|
|
368
|
+
/** User selected scopes per flow */
|
|
369
|
+
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
370
|
+
token: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
371
|
+
}, {
|
|
372
|
+
type: z.ZodLiteral<"implicit">;
|
|
373
|
+
authorizationUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
374
|
+
redirectUri: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
375
|
+
}>, "strip", z.ZodTypeAny, {
|
|
376
|
+
type: "implicit";
|
|
377
|
+
refreshUrl: string;
|
|
378
|
+
selectedScopes: string[];
|
|
379
|
+
token: string;
|
|
380
|
+
authorizationUrl: string;
|
|
381
|
+
redirectUri: string;
|
|
382
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
383
|
+
}, {
|
|
384
|
+
type: "implicit";
|
|
385
|
+
refreshUrl?: string | undefined;
|
|
386
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
387
|
+
selectedScopes?: string[] | undefined;
|
|
388
|
+
token?: string | undefined;
|
|
389
|
+
authorizationUrl?: string | undefined;
|
|
390
|
+
redirectUri?: string | undefined;
|
|
391
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
392
|
+
/**
|
|
393
|
+
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
394
|
+
* URL. The OAuth2 standard requires the use of TLS.
|
|
395
|
+
*/
|
|
396
|
+
refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
397
|
+
/**
|
|
398
|
+
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
399
|
+
* between the scope name and a short description for it. The map MAY be empty.
|
|
400
|
+
*/
|
|
401
|
+
scopes: 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, {}, {}>]>>;
|
|
402
|
+
/** User selected scopes per flow */
|
|
403
|
+
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
404
|
+
token: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
405
|
+
}, {
|
|
406
|
+
type: z.ZodLiteral<"password">;
|
|
407
|
+
tokenUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
408
|
+
/** Username */
|
|
409
|
+
value: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
410
|
+
/** Password */
|
|
411
|
+
secondValue: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
412
|
+
clientSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
413
|
+
}>, "strip", z.ZodTypeAny, {
|
|
414
|
+
type: "password";
|
|
415
|
+
value: string;
|
|
416
|
+
secondValue: string;
|
|
417
|
+
refreshUrl: string;
|
|
418
|
+
selectedScopes: string[];
|
|
419
|
+
token: string;
|
|
420
|
+
tokenUrl: string;
|
|
421
|
+
clientSecret: string;
|
|
422
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
423
|
+
}, {
|
|
424
|
+
type: "password";
|
|
425
|
+
value?: string | undefined;
|
|
426
|
+
secondValue?: string | undefined;
|
|
427
|
+
refreshUrl?: string | undefined;
|
|
428
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
429
|
+
selectedScopes?: string[] | undefined;
|
|
430
|
+
token?: string | undefined;
|
|
431
|
+
tokenUrl?: string | undefined;
|
|
432
|
+
clientSecret?: string | undefined;
|
|
433
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
434
|
+
/**
|
|
435
|
+
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
436
|
+
* URL. The OAuth2 standard requires the use of TLS.
|
|
437
|
+
*/
|
|
438
|
+
refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
439
|
+
/**
|
|
440
|
+
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
441
|
+
* between the scope name and a short description for it. The map MAY be empty.
|
|
442
|
+
*/
|
|
443
|
+
scopes: 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, {}, {}>]>>;
|
|
444
|
+
/** User selected scopes per flow */
|
|
445
|
+
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
446
|
+
token: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
471
447
|
}, {
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
448
|
+
type: z.ZodLiteral<"clientCredentials">;
|
|
449
|
+
tokenUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
450
|
+
clientSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
451
|
+
}>, "strip", z.ZodTypeAny, {
|
|
452
|
+
type: "clientCredentials";
|
|
453
|
+
refreshUrl: string;
|
|
454
|
+
selectedScopes: string[];
|
|
455
|
+
token: string;
|
|
456
|
+
tokenUrl: string;
|
|
457
|
+
clientSecret: string;
|
|
458
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
459
|
+
}, {
|
|
460
|
+
type: "clientCredentials";
|
|
461
|
+
refreshUrl?: string | undefined;
|
|
462
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
463
|
+
selectedScopes?: string[] | undefined;
|
|
464
|
+
token?: string | undefined;
|
|
465
|
+
tokenUrl?: string | undefined;
|
|
466
|
+
clientSecret?: string | undefined;
|
|
467
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
468
|
+
/**
|
|
469
|
+
* The URL to be used for obtaining refresh tokens. This MUST be in the form of a
|
|
470
|
+
* URL. The OAuth2 standard requires the use of TLS.
|
|
471
|
+
*/
|
|
472
|
+
refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
473
|
+
/**
|
|
474
|
+
* REQUIRED. The available scopes for the OAuth2 security scheme. A map
|
|
475
|
+
* between the scope name and a short description for it. The map MAY be empty.
|
|
476
|
+
*/
|
|
477
|
+
scopes: 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, {}, {}>]>>;
|
|
478
|
+
/** User selected scopes per flow */
|
|
479
|
+
selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
480
|
+
token: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
481
|
+
}, {
|
|
482
|
+
type: z.ZodLiteral<"authorizationCode">;
|
|
483
|
+
authorizationUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
484
|
+
redirectUri: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
485
|
+
tokenUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
486
|
+
clientSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
487
|
+
}>, "strip", z.ZodTypeAny, {
|
|
488
|
+
type: "authorizationCode";
|
|
489
|
+
refreshUrl: string;
|
|
490
|
+
selectedScopes: string[];
|
|
491
|
+
token: string;
|
|
492
|
+
authorizationUrl: string;
|
|
493
|
+
redirectUri: string;
|
|
494
|
+
tokenUrl: string;
|
|
495
|
+
clientSecret: string;
|
|
496
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
497
|
+
}, {
|
|
498
|
+
type: "authorizationCode";
|
|
499
|
+
refreshUrl?: string | undefined;
|
|
500
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
501
|
+
selectedScopes?: string[] | undefined;
|
|
502
|
+
token?: string | undefined;
|
|
503
|
+
authorizationUrl?: string | undefined;
|
|
504
|
+
redirectUri?: string | undefined;
|
|
505
|
+
tokenUrl?: string | undefined;
|
|
506
|
+
clientSecret?: string | undefined;
|
|
507
|
+
}>]>>>;
|
|
507
508
|
clientId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
508
|
-
|
|
509
|
-
}, "strip", z.ZodTypeAny, {
|
|
509
|
+
}>, "strip", z.ZodTypeAny, {
|
|
510
510
|
type: "oauth2";
|
|
511
511
|
uid: string;
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
512
|
+
nameKey: string;
|
|
513
|
+
flow: {
|
|
514
|
+
type: "implicit";
|
|
515
|
+
refreshUrl: string;
|
|
516
|
+
selectedScopes: string[];
|
|
517
|
+
token: string;
|
|
518
|
+
authorizationUrl: string;
|
|
519
|
+
redirectUri: string;
|
|
520
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
521
|
+
} | {
|
|
522
|
+
type: "password";
|
|
523
|
+
value: string;
|
|
524
|
+
secondValue: string;
|
|
525
|
+
refreshUrl: string;
|
|
526
|
+
selectedScopes: string[];
|
|
527
|
+
token: string;
|
|
528
|
+
tokenUrl: string;
|
|
529
|
+
clientSecret: string;
|
|
530
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
531
|
+
} | {
|
|
532
|
+
type: "clientCredentials";
|
|
533
|
+
refreshUrl: string;
|
|
534
|
+
selectedScopes: string[];
|
|
535
|
+
token: string;
|
|
536
|
+
tokenUrl: string;
|
|
537
|
+
clientSecret: string;
|
|
538
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
539
|
+
} | {
|
|
540
|
+
type: "authorizationCode";
|
|
541
|
+
refreshUrl: string;
|
|
542
|
+
selectedScopes: string[];
|
|
543
|
+
token: string;
|
|
544
|
+
authorizationUrl: string;
|
|
545
|
+
redirectUri: string;
|
|
546
|
+
tokenUrl: string;
|
|
547
|
+
clientSecret: string;
|
|
548
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
547
549
|
};
|
|
548
550
|
clientId: string;
|
|
549
|
-
redirectUri: string;
|
|
550
551
|
description?: string | undefined;
|
|
551
552
|
}, {
|
|
552
553
|
type: "oauth2";
|
|
553
554
|
uid?: string | undefined;
|
|
555
|
+
nameKey?: string | undefined;
|
|
554
556
|
description?: string | undefined;
|
|
555
|
-
|
|
556
|
-
implicit
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
557
|
+
flow?: {
|
|
558
|
+
type: "implicit";
|
|
559
|
+
refreshUrl?: string | undefined;
|
|
560
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
561
|
+
selectedScopes?: string[] | undefined;
|
|
562
|
+
token?: string | undefined;
|
|
563
|
+
authorizationUrl?: string | undefined;
|
|
564
|
+
redirectUri?: string | undefined;
|
|
565
|
+
} | {
|
|
566
|
+
type: "password";
|
|
567
|
+
value?: string | undefined;
|
|
568
|
+
secondValue?: string | undefined;
|
|
569
|
+
refreshUrl?: string | undefined;
|
|
570
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
571
|
+
selectedScopes?: string[] | undefined;
|
|
572
|
+
token?: string | undefined;
|
|
573
|
+
tokenUrl?: string | undefined;
|
|
574
|
+
clientSecret?: string | undefined;
|
|
575
|
+
} | {
|
|
576
|
+
type: "clientCredentials";
|
|
577
|
+
refreshUrl?: string | undefined;
|
|
578
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
579
|
+
selectedScopes?: string[] | undefined;
|
|
580
|
+
token?: string | undefined;
|
|
581
|
+
tokenUrl?: string | undefined;
|
|
582
|
+
clientSecret?: string | undefined;
|
|
583
|
+
} | {
|
|
584
|
+
type: "authorizationCode";
|
|
585
|
+
refreshUrl?: string | undefined;
|
|
586
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
587
|
+
selectedScopes?: string[] | undefined;
|
|
588
|
+
token?: string | undefined;
|
|
589
|
+
authorizationUrl?: string | undefined;
|
|
590
|
+
redirectUri?: string | undefined;
|
|
591
|
+
tokenUrl?: string | undefined;
|
|
592
|
+
clientSecret?: string | undefined;
|
|
590
593
|
} | undefined;
|
|
591
594
|
clientId?: string | undefined;
|
|
592
|
-
|
|
593
|
-
}>, z.ZodObject<{
|
|
594
|
-
type: z.ZodLiteral<"openIdConnect">;
|
|
595
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
595
596
|
uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
597
|
+
/** The name key that links a security requirement to a security object */
|
|
598
|
+
nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
596
599
|
description: z.ZodOptional<z.ZodString>;
|
|
600
|
+
}, {
|
|
601
|
+
type: z.ZodLiteral<"openIdConnect">;
|
|
597
602
|
/**
|
|
598
603
|
* REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the
|
|
599
604
|
* form of a URL. The OpenID Connect standard requires the use of TLS.
|
|
600
605
|
*/
|
|
601
606
|
openIdConnectUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
602
|
-
}
|
|
607
|
+
}>, "strip", z.ZodTypeAny, {
|
|
603
608
|
type: "openIdConnect";
|
|
604
609
|
uid: string;
|
|
610
|
+
nameKey: string;
|
|
605
611
|
openIdConnectUrl: string;
|
|
606
612
|
description?: string | undefined;
|
|
607
613
|
}, {
|
|
608
614
|
type: "openIdConnect";
|
|
609
615
|
uid?: string | undefined;
|
|
616
|
+
nameKey?: string | undefined;
|
|
610
617
|
description?: string | undefined;
|
|
611
618
|
openIdConnectUrl?: string | undefined;
|
|
612
619
|
}>]>;
|
|
@@ -622,6 +629,7 @@ export declare const createSecurityScheme: (payload: SecuritySchemePayload) => {
|
|
|
622
629
|
type: "apiKey";
|
|
623
630
|
value: string;
|
|
624
631
|
uid: string;
|
|
632
|
+
nameKey: string;
|
|
625
633
|
name: string;
|
|
626
634
|
in: "query" | "header" | "cookie";
|
|
627
635
|
description?: string | undefined;
|
|
@@ -629,6 +637,7 @@ export declare const createSecurityScheme: (payload: SecuritySchemePayload) => {
|
|
|
629
637
|
type: "http";
|
|
630
638
|
value: string;
|
|
631
639
|
uid: string;
|
|
640
|
+
nameKey: string;
|
|
632
641
|
scheme: "basic" | "bearer";
|
|
633
642
|
bearerFormat: string;
|
|
634
643
|
secondValue: string;
|
|
@@ -636,48 +645,50 @@ export declare const createSecurityScheme: (payload: SecuritySchemePayload) => {
|
|
|
636
645
|
} | {
|
|
637
646
|
type: "oauth2";
|
|
638
647
|
uid: string;
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
648
|
+
nameKey: string;
|
|
649
|
+
flow: {
|
|
650
|
+
type: "implicit";
|
|
651
|
+
refreshUrl: string;
|
|
652
|
+
selectedScopes: string[];
|
|
653
|
+
token: string;
|
|
654
|
+
authorizationUrl: string;
|
|
655
|
+
redirectUri: string;
|
|
656
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
657
|
+
} | {
|
|
658
|
+
type: "password";
|
|
659
|
+
value: string;
|
|
660
|
+
secondValue: string;
|
|
661
|
+
refreshUrl: string;
|
|
662
|
+
selectedScopes: string[];
|
|
663
|
+
token: string;
|
|
664
|
+
tokenUrl: string;
|
|
665
|
+
clientSecret: string;
|
|
666
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
667
|
+
} | {
|
|
668
|
+
type: "clientCredentials";
|
|
669
|
+
refreshUrl: string;
|
|
670
|
+
selectedScopes: string[];
|
|
671
|
+
token: string;
|
|
672
|
+
tokenUrl: string;
|
|
673
|
+
clientSecret: string;
|
|
674
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
675
|
+
} | {
|
|
676
|
+
type: "authorizationCode";
|
|
677
|
+
refreshUrl: string;
|
|
678
|
+
selectedScopes: string[];
|
|
679
|
+
token: string;
|
|
680
|
+
authorizationUrl: string;
|
|
681
|
+
redirectUri: string;
|
|
682
|
+
tokenUrl: string;
|
|
683
|
+
clientSecret: string;
|
|
684
|
+
scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
|
|
674
685
|
};
|
|
675
686
|
clientId: string;
|
|
676
|
-
redirectUri: string;
|
|
677
687
|
description?: string | undefined;
|
|
678
688
|
} | {
|
|
679
689
|
type: "openIdConnect";
|
|
680
690
|
uid: string;
|
|
691
|
+
nameKey: string;
|
|
681
692
|
openIdConnectUrl: string;
|
|
682
693
|
description?: string | undefined;
|
|
683
694
|
};
|