@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.
@@ -1,287 +1,300 @@
1
- import type { ValueOf } from 'type-fest';
2
1
  import { z } from 'zod';
3
- declare const securitySchemeOauth2: z.ZodObject<{
4
- type: z.ZodLiteral<"oauth2">;
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
- flows: z.ZodDefault<z.ZodOptional<z.ZodObject<{
9
- /** Configuration for the OAuth Implicit flow */
10
- implicit: z.ZodOptional<z.ZodObject<{
11
- authorizationUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
12
- refreshUrl: z.ZodOptional<z.ZodString>;
13
- 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, {}, {}>]>>;
14
- selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
15
- token: z.ZodDefault<z.ZodOptional<z.ZodString>>;
16
- }, "strip", z.ZodTypeAny, {
17
- authorizationUrl: string;
18
- selectedScopes: string[];
19
- token: string;
20
- refreshUrl?: string | undefined;
21
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
22
- }, {
23
- authorizationUrl?: string | undefined;
24
- refreshUrl?: string | undefined;
25
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
26
- selectedScopes?: string[] | undefined;
27
- token?: string | undefined;
28
- }>>;
29
- /** Configuration for the OAuth Resource Owner Password flow */
30
- password: z.ZodOptional<z.ZodObject<{
31
- tokenUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
32
- refreshUrl: z.ZodOptional<z.ZodString>;
33
- 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, {}, {}>]>>;
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
- authorizationUrl?: string | undefined;
147
- refreshUrl?: string | undefined;
148
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
149
- selectedScopes?: string[] | undefined;
150
- token?: string | undefined;
151
- } | undefined;
152
- password?: {
153
- value?: string | undefined;
154
- secondValue?: string | undefined;
155
- refreshUrl?: string | undefined;
156
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
157
- selectedScopes?: string[] | undefined;
158
- token?: string | undefined;
159
- tokenUrl?: string | undefined;
160
- clientSecret?: string | undefined;
161
- } | undefined;
162
- clientCredentials?: {
163
- refreshUrl?: string | undefined;
164
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
165
- selectedScopes?: string[] | undefined;
166
- token?: string | undefined;
167
- tokenUrl?: string | undefined;
168
- clientSecret?: string | undefined;
169
- } | undefined;
170
- authorizationCode?: {
171
- authorizationUrl?: string | undefined;
172
- refreshUrl?: string | undefined;
173
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
174
- selectedScopes?: string[] | undefined;
175
- token?: string | undefined;
176
- tokenUrl?: string | undefined;
177
- clientSecret?: string | undefined;
178
- } | undefined;
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
- redirectUri: z.ZodDefault<z.ZodOptional<z.ZodString>>;
182
- }, "strip", z.ZodTypeAny, {
193
+ }>, "strip", z.ZodTypeAny, {
183
194
  type: "oauth2";
184
195
  uid: string;
185
- flows: {
186
- implicit?: {
187
- authorizationUrl: string;
188
- selectedScopes: string[];
189
- token: string;
190
- refreshUrl?: string | undefined;
191
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
192
- } | undefined;
193
- password?: {
194
- value: string;
195
- secondValue: string;
196
- selectedScopes: string[];
197
- token: string;
198
- tokenUrl: string;
199
- clientSecret: string;
200
- refreshUrl?: string | undefined;
201
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
202
- } | undefined;
203
- clientCredentials?: {
204
- selectedScopes: string[];
205
- token: string;
206
- tokenUrl: string;
207
- clientSecret: string;
208
- refreshUrl?: string | undefined;
209
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
210
- } | undefined;
211
- authorizationCode?: {
212
- authorizationUrl: string;
213
- selectedScopes: string[];
214
- token: string;
215
- tokenUrl: string;
216
- clientSecret: string;
217
- refreshUrl?: string | undefined;
218
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
219
- } | undefined;
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
- flows?: {
229
- implicit?: {
230
- authorizationUrl?: string | undefined;
231
- refreshUrl?: string | undefined;
232
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
233
- selectedScopes?: string[] | undefined;
234
- token?: string | undefined;
235
- } | undefined;
236
- password?: {
237
- value?: string | undefined;
238
- secondValue?: string | undefined;
239
- refreshUrl?: string | undefined;
240
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
241
- selectedScopes?: string[] | undefined;
242
- token?: string | undefined;
243
- tokenUrl?: string | undefined;
244
- clientSecret?: string | undefined;
245
- } | undefined;
246
- clientCredentials?: {
247
- refreshUrl?: string | undefined;
248
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
249
- selectedScopes?: string[] | undefined;
250
- token?: string | undefined;
251
- tokenUrl?: string | undefined;
252
- clientSecret?: string | undefined;
253
- } | undefined;
254
- authorizationCode?: {
255
- authorizationUrl?: string | undefined;
256
- refreshUrl?: string | undefined;
257
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
258
- selectedScopes?: string[] | undefined;
259
- token?: string | undefined;
260
- tokenUrl?: string | undefined;
261
- clientSecret?: string | undefined;
262
- } | undefined;
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
- export type SelectedSchemeOauth2 = {
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
- }, "strip", z.ZodTypeAny, {
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
- }, "strip", z.ZodTypeAny, {
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
- flows: z.ZodDefault<z.ZodOptional<z.ZodObject<{
336
- /** Configuration for the OAuth Implicit flow */
337
- implicit: z.ZodOptional<z.ZodObject<{
338
- authorizationUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
339
- refreshUrl: z.ZodOptional<z.ZodString>;
340
- 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, {}, {}>]>>;
341
- selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
342
- token: z.ZodDefault<z.ZodOptional<z.ZodString>>;
343
- }, "strip", z.ZodTypeAny, {
344
- authorizationUrl: string;
345
- selectedScopes: string[];
346
- token: string;
347
- refreshUrl?: string | undefined;
348
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
349
- }, {
350
- authorizationUrl?: string | undefined;
351
- refreshUrl?: string | undefined;
352
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
353
- selectedScopes?: string[] | undefined;
354
- token?: string | undefined;
355
- }>>;
356
- /** Configuration for the OAuth Resource Owner Password flow */
357
- password: z.ZodOptional<z.ZodObject<{
358
- tokenUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
359
- refreshUrl: z.ZodOptional<z.ZodString>;
360
- 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, {}, {}>]>>;
361
- /** Username */
362
- value: z.ZodDefault<z.ZodOptional<z.ZodString>>;
363
- /** Password */
364
- secondValue: z.ZodDefault<z.ZodOptional<z.ZodString>>;
365
- selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
366
- clientSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
367
- token: z.ZodDefault<z.ZodOptional<z.ZodString>>;
368
- }, "strip", z.ZodTypeAny, {
369
- value: string;
370
- secondValue: string;
371
- selectedScopes: string[];
372
- token: string;
373
- tokenUrl: string;
374
- clientSecret: string;
375
- refreshUrl?: string | undefined;
376
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
377
- }, {
378
- value?: string | undefined;
379
- secondValue?: string | undefined;
380
- refreshUrl?: string | undefined;
381
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
382
- selectedScopes?: string[] | undefined;
383
- token?: string | undefined;
384
- tokenUrl?: string | undefined;
385
- clientSecret?: string | undefined;
386
- }>>;
387
- /** Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0. */
388
- clientCredentials: z.ZodOptional<z.ZodObject<{
389
- tokenUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
390
- refreshUrl: z.ZodOptional<z.ZodString>;
391
- 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, {}, {}>]>>;
392
- clientSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
393
- selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
394
- token: z.ZodDefault<z.ZodOptional<z.ZodString>>;
395
- }, "strip", z.ZodTypeAny, {
396
- selectedScopes: string[];
397
- token: string;
398
- tokenUrl: string;
399
- clientSecret: string;
400
- refreshUrl?: string | undefined;
401
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
402
- }, {
403
- refreshUrl?: string | undefined;
404
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
405
- selectedScopes?: string[] | undefined;
406
- token?: string | undefined;
407
- tokenUrl?: string | undefined;
408
- clientSecret?: string | undefined;
409
- }>>;
410
- /** Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0.*/
411
- authorizationCode: z.ZodOptional<z.ZodObject<{
412
- authorizationUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
413
- tokenUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
414
- refreshUrl: z.ZodOptional<z.ZodString>;
415
- 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, {}, {}>]>>;
416
- clientSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
417
- selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
418
- token: z.ZodDefault<z.ZodOptional<z.ZodString>>;
419
- }, "strip", z.ZodTypeAny, {
420
- authorizationUrl: string;
421
- selectedScopes: string[];
422
- token: string;
423
- tokenUrl: string;
424
- clientSecret: string;
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
- implicit?: {
473
- authorizationUrl?: string | undefined;
474
- refreshUrl?: string | undefined;
475
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
476
- selectedScopes?: string[] | undefined;
477
- token?: string | undefined;
478
- } | undefined;
479
- password?: {
480
- value?: string | undefined;
481
- secondValue?: string | undefined;
482
- refreshUrl?: string | undefined;
483
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
484
- selectedScopes?: string[] | undefined;
485
- token?: string | undefined;
486
- tokenUrl?: string | undefined;
487
- clientSecret?: string | undefined;
488
- } | undefined;
489
- clientCredentials?: {
490
- refreshUrl?: string | undefined;
491
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
492
- selectedScopes?: string[] | undefined;
493
- token?: string | undefined;
494
- tokenUrl?: string | undefined;
495
- clientSecret?: string | undefined;
496
- } | undefined;
497
- authorizationCode?: {
498
- authorizationUrl?: string | undefined;
499
- refreshUrl?: string | undefined;
500
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
501
- selectedScopes?: string[] | undefined;
502
- token?: string | undefined;
503
- tokenUrl?: string | undefined;
504
- clientSecret?: string | undefined;
505
- } | undefined;
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
- redirectUri: z.ZodDefault<z.ZodOptional<z.ZodString>>;
509
- }, "strip", z.ZodTypeAny, {
509
+ }>, "strip", z.ZodTypeAny, {
510
510
  type: "oauth2";
511
511
  uid: string;
512
- flows: {
513
- implicit?: {
514
- authorizationUrl: string;
515
- selectedScopes: string[];
516
- token: string;
517
- refreshUrl?: string | undefined;
518
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
519
- } | undefined;
520
- password?: {
521
- value: string;
522
- secondValue: string;
523
- selectedScopes: string[];
524
- token: string;
525
- tokenUrl: string;
526
- clientSecret: string;
527
- refreshUrl?: string | undefined;
528
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
529
- } | undefined;
530
- clientCredentials?: {
531
- selectedScopes: string[];
532
- token: string;
533
- tokenUrl: string;
534
- clientSecret: string;
535
- refreshUrl?: string | undefined;
536
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
537
- } | undefined;
538
- authorizationCode?: {
539
- authorizationUrl: string;
540
- selectedScopes: string[];
541
- token: string;
542
- tokenUrl: string;
543
- clientSecret: string;
544
- refreshUrl?: string | undefined;
545
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
546
- } | undefined;
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
- flows?: {
556
- implicit?: {
557
- authorizationUrl?: string | undefined;
558
- refreshUrl?: string | undefined;
559
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
560
- selectedScopes?: string[] | undefined;
561
- token?: string | undefined;
562
- } | undefined;
563
- password?: {
564
- value?: string | undefined;
565
- secondValue?: string | undefined;
566
- refreshUrl?: string | undefined;
567
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
568
- selectedScopes?: string[] | undefined;
569
- token?: string | undefined;
570
- tokenUrl?: string | undefined;
571
- clientSecret?: string | undefined;
572
- } | undefined;
573
- clientCredentials?: {
574
- refreshUrl?: string | undefined;
575
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
576
- selectedScopes?: string[] | undefined;
577
- token?: string | undefined;
578
- tokenUrl?: string | undefined;
579
- clientSecret?: string | undefined;
580
- } | undefined;
581
- authorizationCode?: {
582
- authorizationUrl?: string | undefined;
583
- refreshUrl?: string | undefined;
584
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
585
- selectedScopes?: string[] | undefined;
586
- token?: string | undefined;
587
- tokenUrl?: string | undefined;
588
- clientSecret?: string | undefined;
589
- } | undefined;
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
- redirectUri?: string | undefined;
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
- }, "strip", z.ZodTypeAny, {
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
- flows: {
640
- implicit?: {
641
- authorizationUrl: string;
642
- selectedScopes: string[];
643
- token: string;
644
- refreshUrl?: string | undefined;
645
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
646
- } | undefined;
647
- password?: {
648
- value: string;
649
- secondValue: string;
650
- selectedScopes: string[];
651
- token: string;
652
- tokenUrl: string;
653
- clientSecret: string;
654
- refreshUrl?: string | undefined;
655
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
656
- } | undefined;
657
- clientCredentials?: {
658
- selectedScopes: string[];
659
- token: string;
660
- tokenUrl: string;
661
- clientSecret: string;
662
- refreshUrl?: string | undefined;
663
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
664
- } | undefined;
665
- authorizationCode?: {
666
- authorizationUrl: string;
667
- selectedScopes: string[];
668
- token: string;
669
- tokenUrl: string;
670
- clientSecret: string;
671
- refreshUrl?: string | undefined;
672
- scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
673
- } | undefined;
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
  };