@scalar/oas-utils 0.2.43 → 0.2.44

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.
Files changed (188) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/diff/diff.d.ts +13 -0
  3. package/dist/diff/diff.d.ts.map +1 -0
  4. package/dist/diff/index.d.ts +1 -0
  5. package/dist/diff/index.d.ts.map +1 -0
  6. package/dist/diff/index.js +1 -0
  7. package/dist/entities/{workspace/cookie → cookie}/cookie.d.ts +1 -17
  8. package/dist/entities/cookie/cookie.d.ts.map +1 -0
  9. package/dist/entities/{workspace/cookie → cookie}/cookie.js +1 -4
  10. package/dist/entities/cookie/index.d.ts.map +1 -0
  11. package/dist/entities/cookie/index.js +1 -0
  12. package/dist/entities/environment/environment.d.ts +24 -0
  13. package/dist/entities/environment/environment.d.ts.map +1 -0
  14. package/dist/entities/environment/environment.js +12 -0
  15. package/dist/entities/environment/index.d.ts.map +1 -0
  16. package/dist/entities/environment/index.js +1 -0
  17. package/dist/entities/{workspace/consts/hot-keys.d.ts → hotkeys/hotkeys.d.ts} +2 -2
  18. package/dist/entities/hotkeys/hotkeys.d.ts.map +1 -0
  19. package/dist/entities/{workspace/consts/hot-keys.js → hotkeys/hotkeys.js} +1 -0
  20. package/dist/entities/hotkeys/index.d.ts +2 -0
  21. package/dist/entities/hotkeys/index.d.ts.map +1 -0
  22. package/dist/entities/hotkeys/index.js +1 -0
  23. package/dist/entities/index.d.ts +1 -1
  24. package/dist/entities/index.d.ts.map +1 -1
  25. package/dist/entities/index.js +1 -1
  26. package/dist/entities/shared/index.d.ts.map +1 -0
  27. package/dist/entities/shared/utility.d.ts.map +1 -0
  28. package/dist/entities/spec/collection.d.ts +489 -0
  29. package/dist/entities/spec/collection.d.ts.map +1 -0
  30. package/dist/entities/spec/collection.js +63 -0
  31. package/dist/entities/spec/index.d.ts +10 -0
  32. package/dist/entities/spec/index.d.ts.map +1 -0
  33. package/dist/entities/spec/index.js +7 -0
  34. package/dist/entities/spec/parameters.d.ts +42 -0
  35. package/dist/entities/spec/parameters.d.ts.map +1 -0
  36. package/dist/entities/spec/parameters.js +30 -0
  37. package/dist/entities/spec/request-examples.d.ts +915 -0
  38. package/dist/entities/spec/request-examples.d.ts.map +1 -0
  39. package/dist/entities/spec/request-examples.js +168 -0
  40. package/dist/entities/spec/requests.d.ts +317 -0
  41. package/dist/entities/spec/requests.d.ts.map +1 -0
  42. package/dist/entities/{workspace/spec → spec}/requests.js +56 -32
  43. package/dist/entities/spec/security.d.ts +964 -0
  44. package/dist/entities/spec/security.d.ts.map +1 -0
  45. package/dist/entities/spec/security.js +222 -0
  46. package/dist/entities/spec/server.d.ts +82 -0
  47. package/dist/entities/spec/server.d.ts.map +1 -0
  48. package/dist/entities/{workspace/server → spec}/server.js +11 -13
  49. package/dist/entities/spec/spec-objects.d.ts +279 -0
  50. package/dist/entities/spec/spec-objects.d.ts.map +1 -0
  51. package/dist/entities/{workspace/collection/collection.js → spec/spec-objects.js} +21 -45
  52. package/dist/entities/workspace/index.js +1 -1
  53. package/dist/entities/workspace/workspace.d.ts +24 -43
  54. package/dist/entities/workspace/workspace.d.ts.map +1 -1
  55. package/dist/entities/workspace/workspace.js +6 -7
  56. package/dist/helpers/httpMethods.d.ts +16 -82
  57. package/dist/helpers/httpMethods.d.ts.map +1 -1
  58. package/dist/helpers/httpMethods.js +45 -41
  59. package/dist/helpers/index.d.ts +2 -0
  60. package/dist/helpers/index.d.ts.map +1 -1
  61. package/dist/helpers/index.js +4 -2
  62. package/dist/helpers/local-storage.d.ts +16 -0
  63. package/dist/helpers/local-storage.d.ts.map +1 -0
  64. package/dist/helpers/local-storage.js +17 -0
  65. package/dist/helpers/redirectToProxy.d.ts +2 -0
  66. package/dist/helpers/redirectToProxy.d.ts.map +1 -1
  67. package/dist/helpers/redirectToProxy.js +6 -7
  68. package/dist/helpers/regexHelpers.d.ts +2 -0
  69. package/dist/helpers/regexHelpers.d.ts.map +1 -0
  70. package/dist/helpers/regexHelpers.js +3 -0
  71. package/dist/helpers/schema-model.d.ts +2 -2
  72. package/dist/helpers/schema-model.d.ts.map +1 -1
  73. package/dist/helpers/schema-model.js +11 -17
  74. package/dist/migrations/data-version.d.ts +12 -0
  75. package/dist/migrations/data-version.d.ts.map +1 -0
  76. package/dist/migrations/data-version.js +13 -0
  77. package/dist/migrations/generate-types.d.ts +2 -0
  78. package/dist/migrations/generate-types.d.ts.map +1 -0
  79. package/dist/migrations/index.d.ts +4 -0
  80. package/dist/migrations/index.d.ts.map +1 -0
  81. package/dist/migrations/index.js +3 -0
  82. package/dist/migrations/local-storage.d.ts +8 -0
  83. package/dist/migrations/local-storage.d.ts.map +1 -0
  84. package/dist/migrations/local-storage.js +36 -0
  85. package/dist/migrations/migrator.d.ts +4 -0
  86. package/dist/migrations/migrator.d.ts.map +1 -0
  87. package/dist/migrations/migrator.js +40 -0
  88. package/dist/migrations/semver.d.ts +5 -0
  89. package/dist/migrations/semver.d.ts.map +1 -0
  90. package/dist/migrations/semver.js +25 -0
  91. package/dist/migrations/v-0.0.0/index.d.ts +2 -0
  92. package/dist/migrations/v-0.0.0/index.d.ts.map +1 -0
  93. package/dist/migrations/v-0.0.0/index.js +1 -0
  94. package/dist/migrations/v-0.0.0/types.generated.d.ts +347 -0
  95. package/dist/migrations/v-0.0.0/types.generated.d.ts.map +1 -0
  96. package/dist/migrations/v-2.1.0/index.d.ts +3 -0
  97. package/dist/migrations/v-2.1.0/index.d.ts.map +1 -0
  98. package/dist/migrations/v-2.1.0/index.js +1 -0
  99. package/dist/migrations/v-2.1.0/migration.d.ts +334 -0
  100. package/dist/migrations/v-2.1.0/migration.d.ts.map +1 -0
  101. package/dist/migrations/v-2.1.0/migration.js +249 -0
  102. package/dist/migrations/v-2.1.0/types.generated.d.ts +42 -0
  103. package/dist/migrations/v-2.1.0/types.generated.d.ts.map +1 -0
  104. package/dist/spec-getters/getExampleFromSchema.d.ts.map +1 -1
  105. package/dist/spec-getters/getExampleFromSchema.js +21 -8
  106. package/dist/spec-getters/getParametersFromOperation.d.ts +1 -1
  107. package/dist/spec-getters/getParametersFromOperation.d.ts.map +1 -1
  108. package/dist/spec-getters/getParametersFromOperation.js +8 -7
  109. package/dist/spec-getters/getRequestBodyFromOperation.d.ts +12 -40
  110. package/dist/spec-getters/getRequestBodyFromOperation.d.ts.map +1 -1
  111. package/dist/spec-getters/getRequestBodyFromOperation.js +34 -23
  112. package/dist/spec-getters/getRequestFromOperation.d.ts.map +1 -1
  113. package/dist/spec-getters/getRequestFromOperation.js +1 -2
  114. package/dist/spec-getters/getServerVariableExamples.d.ts +4 -0
  115. package/dist/spec-getters/getServerVariableExamples.d.ts.map +1 -0
  116. package/dist/spec-getters/getServerVariableExamples.js +12 -0
  117. package/dist/spec-getters/index.d.ts +1 -0
  118. package/dist/spec-getters/index.d.ts.map +1 -1
  119. package/dist/spec-getters/index.js +1 -0
  120. package/dist/transforms/export-spec.d.ts +68 -0
  121. package/dist/transforms/export-spec.d.ts.map +1 -0
  122. package/dist/transforms/import-spec.d.ts +20 -68
  123. package/dist/transforms/import-spec.d.ts.map +1 -1
  124. package/dist/transforms/import-spec.js +209 -126
  125. package/package.json +42 -36
  126. package/dist/entities/workspace/collection/collection.d.ts +0 -330
  127. package/dist/entities/workspace/collection/collection.d.ts.map +0 -1
  128. package/dist/entities/workspace/collection/index.d.ts +0 -2
  129. package/dist/entities/workspace/collection/index.d.ts.map +0 -1
  130. package/dist/entities/workspace/collection/index.js +0 -1
  131. package/dist/entities/workspace/consts/hot-keys.d.ts.map +0 -1
  132. package/dist/entities/workspace/consts/index.d.ts +0 -2
  133. package/dist/entities/workspace/consts/index.d.ts.map +0 -1
  134. package/dist/entities/workspace/consts/index.js +0 -1
  135. package/dist/entities/workspace/cookie/cookie.d.ts.map +0 -1
  136. package/dist/entities/workspace/cookie/index.d.ts.map +0 -1
  137. package/dist/entities/workspace/cookie/index.js +0 -1
  138. package/dist/entities/workspace/environment/environment.d.ts +0 -55
  139. package/dist/entities/workspace/environment/environment.d.ts.map +0 -1
  140. package/dist/entities/workspace/environment/environment.js +0 -23
  141. package/dist/entities/workspace/environment/index.d.ts.map +0 -1
  142. package/dist/entities/workspace/environment/index.js +0 -1
  143. package/dist/entities/workspace/folder/folder.d.ts +0 -36
  144. package/dist/entities/workspace/folder/folder.d.ts.map +0 -1
  145. package/dist/entities/workspace/folder/folder.js +0 -21
  146. package/dist/entities/workspace/folder/index.d.ts +0 -2
  147. package/dist/entities/workspace/folder/index.d.ts.map +0 -1
  148. package/dist/entities/workspace/folder/index.js +0 -1
  149. package/dist/entities/workspace/security/index.d.ts +0 -3
  150. package/dist/entities/workspace/security/index.d.ts.map +0 -1
  151. package/dist/entities/workspace/security/index.js +0 -2
  152. package/dist/entities/workspace/security/security-requirement.d.ts +0 -13
  153. package/dist/entities/workspace/security/security-requirement.d.ts.map +0 -1
  154. package/dist/entities/workspace/security/security-requirement.js +0 -15
  155. package/dist/entities/workspace/security/security-schemes.d.ts +0 -696
  156. package/dist/entities/workspace/security/security-schemes.d.ts.map +0 -1
  157. package/dist/entities/workspace/security/security-schemes.js +0 -139
  158. package/dist/entities/workspace/server/index.d.ts +0 -2
  159. package/dist/entities/workspace/server/index.d.ts.map +0 -1
  160. package/dist/entities/workspace/server/index.js +0 -1
  161. package/dist/entities/workspace/server/server.d.ts +0 -91
  162. package/dist/entities/workspace/server/server.d.ts.map +0 -1
  163. package/dist/entities/workspace/shared/index.d.ts.map +0 -1
  164. package/dist/entities/workspace/shared/utility.d.ts.map +0 -1
  165. package/dist/entities/workspace/spec/components.d.ts +0 -3
  166. package/dist/entities/workspace/spec/components.d.ts.map +0 -1
  167. package/dist/entities/workspace/spec/index.d.ts +0 -5
  168. package/dist/entities/workspace/spec/index.d.ts.map +0 -1
  169. package/dist/entities/workspace/spec/index.js +0 -2
  170. package/dist/entities/workspace/spec/parameters.d.ts +0 -16
  171. package/dist/entities/workspace/spec/parameters.d.ts.map +0 -1
  172. package/dist/entities/workspace/spec/refs.d.ts +0 -30
  173. package/dist/entities/workspace/spec/refs.d.ts.map +0 -1
  174. package/dist/entities/workspace/spec/refs.js +0 -9
  175. package/dist/entities/workspace/spec/request-examples.d.ts +0 -1573
  176. package/dist/entities/workspace/spec/request-examples.d.ts.map +0 -1
  177. package/dist/entities/workspace/spec/request-examples.js +0 -96
  178. package/dist/entities/workspace/spec/requests.d.ts +0 -181
  179. package/dist/entities/workspace/spec/requests.d.ts.map +0 -1
  180. package/dist/entities/workspace/spec/spec.d.ts +0 -18
  181. package/dist/entities/workspace/spec/spec.d.ts.map +0 -1
  182. package/dist/entities/workspace/spec/spec.js +0 -8
  183. /package/dist/entities/{workspace/cookie → cookie}/index.d.ts +0 -0
  184. /package/dist/entities/{workspace/environment → environment}/index.d.ts +0 -0
  185. /package/dist/entities/{workspace/shared → shared}/index.d.ts +0 -0
  186. /package/dist/entities/{workspace/shared → shared}/index.js +0 -0
  187. /package/dist/entities/{workspace/shared → shared}/utility.d.ts +0 -0
  188. /package/dist/entities/{workspace/shared → shared}/utility.js +0 -0
@@ -0,0 +1,964 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Value schema for each type of OAuth Flow
4
+ * Request Examples can store populated values for a given security scheme
5
+ */
6
+ export declare const securitySchemeExampleValueSchema: z.ZodUnion<[z.ZodObject<{
7
+ type: z.ZodDefault<z.ZodLiteral<"apiKey">>;
8
+ name: z.ZodDefault<z.ZodString>;
9
+ value: z.ZodDefault<z.ZodString>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ type: "apiKey";
12
+ value: string;
13
+ name: string;
14
+ }, {
15
+ type?: "apiKey" | undefined;
16
+ value?: string | undefined;
17
+ name?: string | undefined;
18
+ }>, z.ZodObject<{
19
+ type: z.ZodDefault<z.ZodLiteral<"http">>;
20
+ username: z.ZodDefault<z.ZodString>;
21
+ password: z.ZodDefault<z.ZodString>;
22
+ token: z.ZodDefault<z.ZodString>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ type: "http";
25
+ username: string;
26
+ password: string;
27
+ token: string;
28
+ }, {
29
+ type?: "http" | undefined;
30
+ username?: string | undefined;
31
+ password?: string | undefined;
32
+ token?: string | undefined;
33
+ }>, z.ZodObject<{
34
+ type: z.ZodDefault<z.ZodLiteral<"oauth-implicit">>;
35
+ token: z.ZodDefault<z.ZodString>;
36
+ }, "strip", z.ZodTypeAny, {
37
+ type: "oauth-implicit";
38
+ token: string;
39
+ }, {
40
+ type?: "oauth-implicit" | undefined;
41
+ token?: string | undefined;
42
+ }>, z.ZodObject<{
43
+ type: z.ZodDefault<z.ZodLiteral<"oauth-password">>;
44
+ token: z.ZodDefault<z.ZodString>;
45
+ username: z.ZodDefault<z.ZodString>;
46
+ password: z.ZodDefault<z.ZodString>;
47
+ clientSecret: z.ZodDefault<z.ZodString>;
48
+ }, "strip", z.ZodTypeAny, {
49
+ type: "oauth-password";
50
+ username: string;
51
+ password: string;
52
+ token: string;
53
+ clientSecret: string;
54
+ }, {
55
+ type?: "oauth-password" | undefined;
56
+ username?: string | undefined;
57
+ password?: string | undefined;
58
+ token?: string | undefined;
59
+ clientSecret?: string | undefined;
60
+ }>, z.ZodObject<{
61
+ type: z.ZodDefault<z.ZodLiteral<"oauth-clientCredentials">>;
62
+ token: z.ZodDefault<z.ZodString>;
63
+ clientSecret: z.ZodDefault<z.ZodString>;
64
+ }, "strip", z.ZodTypeAny, {
65
+ type: "oauth-clientCredentials";
66
+ token: string;
67
+ clientSecret: string;
68
+ }, {
69
+ type?: "oauth-clientCredentials" | undefined;
70
+ token?: string | undefined;
71
+ clientSecret?: string | undefined;
72
+ }>, z.ZodObject<{
73
+ type: z.ZodDefault<z.ZodLiteral<"oauth-authorizationCode">>;
74
+ token: z.ZodDefault<z.ZodString>;
75
+ clientSecret: z.ZodDefault<z.ZodString>;
76
+ }, "strip", z.ZodTypeAny, {
77
+ type: "oauth-authorizationCode";
78
+ token: string;
79
+ clientSecret: string;
80
+ }, {
81
+ type?: "oauth-authorizationCode" | undefined;
82
+ token?: string | undefined;
83
+ clientSecret?: string | undefined;
84
+ }>]>;
85
+ export type SecuritySchemeExampleValue = z.infer<typeof securitySchemeExampleValueSchema>;
86
+ /** The example values for the oauth2 schemes */
87
+ export type SecuritySchemeOauth2ExampleValue = Extract<SecuritySchemeExampleValue, {
88
+ type: `oauth-${string}`;
89
+ }>;
90
+ /**
91
+ * Generates a base set of example data for a given securityScheme
92
+ *
93
+ * TODO: we can probably remove this unless we really want to keep it separate
94
+ */
95
+ export declare function authExampleFromSchema(scheme: SecurityScheme, baseValues?: any): {
96
+ type: "apiKey";
97
+ value: string;
98
+ name: string;
99
+ } | {
100
+ type: "http";
101
+ username: string;
102
+ password: string;
103
+ token: string;
104
+ } | {
105
+ type: "oauth-implicit";
106
+ token: string;
107
+ } | {
108
+ type: "oauth-password";
109
+ username: string;
110
+ password: string;
111
+ token: string;
112
+ clientSecret: string;
113
+ } | {
114
+ type: "oauth-clientCredentials";
115
+ token: string;
116
+ clientSecret: string;
117
+ } | {
118
+ type: "oauth-authorizationCode";
119
+ token: string;
120
+ clientSecret: string;
121
+ };
122
+ export declare const securitySchemeApiKeyIn: readonly ["query", "header", "cookie"];
123
+ export declare const securityApiKeySchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
124
+ description: z.ZodOptional<z.ZodString>;
125
+ }, {
126
+ type: z.ZodLiteral<"apiKey">;
127
+ /** REQUIRED. The name of the header, query or cookie parameter to be used. */
128
+ name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
129
+ /** REQUIRED. The location of the API key. Valid values are "query", "header" or "cookie". */
130
+ in: z.ZodDefault<z.ZodOptional<z.ZodEnum<["query", "header", "cookie"]>>>;
131
+ }>, {
132
+ uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
133
+ /** The name key that links a security requirement to a security object */
134
+ nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
135
+ }>, "strip", z.ZodTypeAny, {
136
+ type: "apiKey";
137
+ uid: string;
138
+ name: string;
139
+ in: "query" | "header" | "cookie";
140
+ nameKey: string;
141
+ description?: string | undefined;
142
+ }, {
143
+ type: "apiKey";
144
+ uid?: string | undefined;
145
+ name?: string | undefined;
146
+ description?: string | undefined;
147
+ in?: "query" | "header" | "cookie" | undefined;
148
+ nameKey?: string | undefined;
149
+ }>;
150
+ export type SecuritySchemeApiKey = z.infer<typeof securityApiKeySchema>;
151
+ export declare const securityHttpSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
152
+ description: z.ZodOptional<z.ZodString>;
153
+ }, {
154
+ type: z.ZodLiteral<"http">;
155
+ /**
156
+ * REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in
157
+ * [RFC7235]. The values used SHOULD be registered in the IANA Authentication Scheme registry.
158
+ */
159
+ scheme: z.ZodDefault<z.ZodOptional<z.ZodEnum<["basic", "bearer"]>>>;
160
+ /**
161
+ * A hint to the client to identify how the bearer token is formatted.
162
+ * Bearer tokens are usually generated by an authorization server, so
163
+ * this information is primarily for documentation purposes.
164
+ */
165
+ bearerFormat: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"JWT">, z.ZodString]>>>;
166
+ }>, {
167
+ uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
168
+ /** The name key that links a security requirement to a security object */
169
+ nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
170
+ }>, "strip", z.ZodTypeAny, {
171
+ type: "http";
172
+ uid: string;
173
+ nameKey: string;
174
+ scheme: "basic" | "bearer";
175
+ bearerFormat: string;
176
+ description?: string | undefined;
177
+ }, {
178
+ type: "http";
179
+ uid?: string | undefined;
180
+ description?: string | undefined;
181
+ nameKey?: string | undefined;
182
+ scheme?: "basic" | "bearer" | undefined;
183
+ bearerFormat?: string | undefined;
184
+ }>;
185
+ export type SecuritySchemaHttp = z.infer<typeof securityHttpSchema>;
186
+ export declare const securityOpenIdSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
187
+ description: z.ZodOptional<z.ZodString>;
188
+ }, {
189
+ type: z.ZodLiteral<"openIdConnect">;
190
+ /**
191
+ * REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the
192
+ * form of a URL. The OpenID Connect standard requires the use of TLS.
193
+ */
194
+ openIdConnectUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
195
+ }>, {
196
+ uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
197
+ /** The name key that links a security requirement to a security object */
198
+ nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
199
+ }>, "strip", z.ZodTypeAny, {
200
+ type: "openIdConnect";
201
+ uid: string;
202
+ nameKey: string;
203
+ openIdConnectUrl: string;
204
+ description?: string | undefined;
205
+ }, {
206
+ type: "openIdConnect";
207
+ uid?: string | undefined;
208
+ description?: string | undefined;
209
+ nameKey?: string | undefined;
210
+ openIdConnectUrl?: string | undefined;
211
+ }>;
212
+ export type SecuritySchemaOpenId = z.infer<typeof securityOpenIdSchema>;
213
+ export declare const securityOauthSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
214
+ description: z.ZodOptional<z.ZodString>;
215
+ }, {
216
+ type: z.ZodLiteral<"oauth2">;
217
+ /** REQUIRED. An object containing configuration information for the flow types supported. */
218
+ flow: z.ZodDefault<z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
219
+ /**
220
+ * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
221
+ * URL. The OAuth2 standard requires the use of TLS.
222
+ */
223
+ refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
224
+ /**
225
+ * REQUIRED. The available scopes for the OAuth2 security scheme. A map
226
+ * between the scope name and a short description for it. The map MAY be empty.
227
+ */
228
+ scopes: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodMap<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>>;
229
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
230
+ }, {
231
+ type: z.ZodLiteral<"implicit">;
232
+ authorizationUrl: z.ZodDefault<z.ZodString>;
233
+ 'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
234
+ }>, "strip", z.ZodTypeAny, {
235
+ type: "implicit";
236
+ refreshUrl: string;
237
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
238
+ selectedScopes: string[];
239
+ authorizationUrl: string;
240
+ 'x-scalar-redirect-uri': string;
241
+ }, {
242
+ type: "implicit";
243
+ refreshUrl?: string | undefined;
244
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
245
+ selectedScopes?: string[] | undefined;
246
+ authorizationUrl?: string | undefined;
247
+ 'x-scalar-redirect-uri'?: string | undefined;
248
+ }>, z.ZodObject<z.objectUtil.extendShape<{
249
+ /**
250
+ * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
251
+ * URL. The OAuth2 standard requires the use of TLS.
252
+ */
253
+ refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
254
+ /**
255
+ * REQUIRED. The available scopes for the OAuth2 security scheme. A map
256
+ * between the scope name and a short description for it. The map MAY be empty.
257
+ */
258
+ scopes: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodMap<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>>;
259
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
260
+ }, {
261
+ type: z.ZodLiteral<"password">;
262
+ tokenUrl: z.ZodDefault<z.ZodString>;
263
+ }>, "strip", z.ZodTypeAny, {
264
+ type: "password";
265
+ refreshUrl: string;
266
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
267
+ selectedScopes: string[];
268
+ tokenUrl: string;
269
+ }, {
270
+ type: "password";
271
+ refreshUrl?: string | undefined;
272
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
273
+ selectedScopes?: string[] | undefined;
274
+ tokenUrl?: string | undefined;
275
+ }>, z.ZodObject<z.objectUtil.extendShape<{
276
+ /**
277
+ * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
278
+ * URL. The OAuth2 standard requires the use of TLS.
279
+ */
280
+ refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
281
+ /**
282
+ * REQUIRED. The available scopes for the OAuth2 security scheme. A map
283
+ * between the scope name and a short description for it. The map MAY be empty.
284
+ */
285
+ scopes: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodMap<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>>;
286
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
287
+ }, {
288
+ type: z.ZodLiteral<"clientCredentials">;
289
+ tokenUrl: z.ZodDefault<z.ZodString>;
290
+ }>, "strip", z.ZodTypeAny, {
291
+ type: "clientCredentials";
292
+ refreshUrl: string;
293
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
294
+ selectedScopes: string[];
295
+ tokenUrl: string;
296
+ }, {
297
+ type: "clientCredentials";
298
+ refreshUrl?: string | undefined;
299
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
300
+ selectedScopes?: string[] | undefined;
301
+ tokenUrl?: string | undefined;
302
+ }>, z.ZodObject<z.objectUtil.extendShape<{
303
+ /**
304
+ * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
305
+ * URL. The OAuth2 standard requires the use of TLS.
306
+ */
307
+ refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
308
+ /**
309
+ * REQUIRED. The available scopes for the OAuth2 security scheme. A map
310
+ * between the scope name and a short description for it. The map MAY be empty.
311
+ */
312
+ scopes: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodMap<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>>;
313
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
314
+ }, {
315
+ type: z.ZodLiteral<"authorizationCode">;
316
+ authorizationUrl: z.ZodDefault<z.ZodString>;
317
+ 'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
318
+ tokenUrl: z.ZodDefault<z.ZodString>;
319
+ }>, "strip", z.ZodTypeAny, {
320
+ type: "authorizationCode";
321
+ refreshUrl: string;
322
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
323
+ selectedScopes: string[];
324
+ authorizationUrl: string;
325
+ 'x-scalar-redirect-uri': string;
326
+ tokenUrl: string;
327
+ }, {
328
+ type: "authorizationCode";
329
+ refreshUrl?: string | undefined;
330
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
331
+ selectedScopes?: string[] | undefined;
332
+ authorizationUrl?: string | undefined;
333
+ 'x-scalar-redirect-uri'?: string | undefined;
334
+ tokenUrl?: string | undefined;
335
+ }>]>>>;
336
+ /** Extension to save the client Id associated with an oauth flow */
337
+ 'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
338
+ }>, {
339
+ uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
340
+ /** The name key that links a security requirement to a security object */
341
+ nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
342
+ }>, "strip", z.ZodTypeAny, {
343
+ type: "oauth2";
344
+ uid: string;
345
+ nameKey: string;
346
+ flow: {
347
+ type: "implicit";
348
+ refreshUrl: string;
349
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
350
+ selectedScopes: string[];
351
+ authorizationUrl: string;
352
+ 'x-scalar-redirect-uri': string;
353
+ } | {
354
+ type: "password";
355
+ refreshUrl: string;
356
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
357
+ selectedScopes: string[];
358
+ tokenUrl: string;
359
+ } | {
360
+ type: "clientCredentials";
361
+ refreshUrl: string;
362
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
363
+ selectedScopes: string[];
364
+ tokenUrl: string;
365
+ } | {
366
+ type: "authorizationCode";
367
+ refreshUrl: string;
368
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
369
+ selectedScopes: string[];
370
+ authorizationUrl: string;
371
+ 'x-scalar-redirect-uri': string;
372
+ tokenUrl: string;
373
+ };
374
+ 'x-scalar-client-id': string;
375
+ description?: string | undefined;
376
+ }, {
377
+ type: "oauth2";
378
+ uid?: string | undefined;
379
+ description?: string | undefined;
380
+ nameKey?: string | undefined;
381
+ flow?: {
382
+ type: "implicit";
383
+ refreshUrl?: string | undefined;
384
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
385
+ selectedScopes?: string[] | undefined;
386
+ authorizationUrl?: string | undefined;
387
+ 'x-scalar-redirect-uri'?: string | undefined;
388
+ } | {
389
+ type: "password";
390
+ refreshUrl?: string | undefined;
391
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
392
+ selectedScopes?: string[] | undefined;
393
+ tokenUrl?: string | undefined;
394
+ } | {
395
+ type: "clientCredentials";
396
+ refreshUrl?: string | undefined;
397
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
398
+ selectedScopes?: string[] | undefined;
399
+ tokenUrl?: string | undefined;
400
+ } | {
401
+ type: "authorizationCode";
402
+ refreshUrl?: string | undefined;
403
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
404
+ selectedScopes?: string[] | undefined;
405
+ authorizationUrl?: string | undefined;
406
+ 'x-scalar-redirect-uri'?: string | undefined;
407
+ tokenUrl?: string | undefined;
408
+ } | undefined;
409
+ 'x-scalar-client-id'?: string | undefined;
410
+ }>;
411
+ export type SecuritySchemeOauth2 = z.infer<typeof securityOauthSchema>;
412
+ /**
413
+ * Security Requirement
414
+ * Lists the required security schemes to execute this operation OR the whole collection/spec.
415
+ * The name used for each property MUST correspond to a security scheme declared in the Security
416
+ * Schemes under the Components Object.
417
+ *
418
+ * The key (name) here will be matched to the key of the securityScheme for linking
419
+ *
420
+ * @see https://spec.openapis.org/oas/latest.html#security-requirement-object
421
+ */
422
+ export declare const oasSecurityRequirementSchema: z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>>;
423
+ /** OAS Compliant security schemes */
424
+ export declare const oasSecuritySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
425
+ description: z.ZodOptional<z.ZodString>;
426
+ }, {
427
+ type: z.ZodLiteral<"apiKey">;
428
+ /** REQUIRED. The name of the header, query or cookie parameter to be used. */
429
+ name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
430
+ /** REQUIRED. The location of the API key. Valid values are "query", "header" or "cookie". */
431
+ in: z.ZodDefault<z.ZodOptional<z.ZodEnum<["query", "header", "cookie"]>>>;
432
+ }>, "strip", z.ZodTypeAny, {
433
+ type: "apiKey";
434
+ name: string;
435
+ in: "query" | "header" | "cookie";
436
+ description?: string | undefined;
437
+ }, {
438
+ type: "apiKey";
439
+ name?: string | undefined;
440
+ description?: string | undefined;
441
+ in?: "query" | "header" | "cookie" | undefined;
442
+ }>, z.ZodObject<z.objectUtil.extendShape<{
443
+ description: z.ZodOptional<z.ZodString>;
444
+ }, {
445
+ type: z.ZodLiteral<"http">;
446
+ /**
447
+ * REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in
448
+ * [RFC7235]. The values used SHOULD be registered in the IANA Authentication Scheme registry.
449
+ */
450
+ scheme: z.ZodDefault<z.ZodOptional<z.ZodEnum<["basic", "bearer"]>>>;
451
+ /**
452
+ * A hint to the client to identify how the bearer token is formatted.
453
+ * Bearer tokens are usually generated by an authorization server, so
454
+ * this information is primarily for documentation purposes.
455
+ */
456
+ bearerFormat: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"JWT">, z.ZodString]>>>;
457
+ }>, "strip", z.ZodTypeAny, {
458
+ type: "http";
459
+ scheme: "basic" | "bearer";
460
+ bearerFormat: string;
461
+ description?: string | undefined;
462
+ }, {
463
+ type: "http";
464
+ description?: string | undefined;
465
+ scheme?: "basic" | "bearer" | undefined;
466
+ bearerFormat?: string | undefined;
467
+ }>, z.ZodObject<z.objectUtil.extendShape<{
468
+ description: z.ZodOptional<z.ZodString>;
469
+ }, {
470
+ type: z.ZodLiteral<"oauth2">;
471
+ /** REQUIRED. An object containing configuration information for the flow types supported. */
472
+ flow: z.ZodDefault<z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
473
+ /**
474
+ * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
475
+ * URL. The OAuth2 standard requires the use of TLS.
476
+ */
477
+ refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
478
+ /**
479
+ * REQUIRED. The available scopes for the OAuth2 security scheme. A map
480
+ * between the scope name and a short description for it. The map MAY be empty.
481
+ */
482
+ scopes: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodMap<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>>;
483
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
484
+ }, {
485
+ type: z.ZodLiteral<"implicit">;
486
+ authorizationUrl: z.ZodDefault<z.ZodString>;
487
+ 'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
488
+ }>, "strip", z.ZodTypeAny, {
489
+ type: "implicit";
490
+ refreshUrl: string;
491
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
492
+ selectedScopes: string[];
493
+ authorizationUrl: string;
494
+ 'x-scalar-redirect-uri': string;
495
+ }, {
496
+ type: "implicit";
497
+ refreshUrl?: string | undefined;
498
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
499
+ selectedScopes?: string[] | undefined;
500
+ authorizationUrl?: string | undefined;
501
+ 'x-scalar-redirect-uri'?: string | undefined;
502
+ }>, z.ZodObject<z.objectUtil.extendShape<{
503
+ /**
504
+ * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
505
+ * URL. The OAuth2 standard requires the use of TLS.
506
+ */
507
+ refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
508
+ /**
509
+ * REQUIRED. The available scopes for the OAuth2 security scheme. A map
510
+ * between the scope name and a short description for it. The map MAY be empty.
511
+ */
512
+ scopes: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodMap<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>>;
513
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
514
+ }, {
515
+ type: z.ZodLiteral<"password">;
516
+ tokenUrl: z.ZodDefault<z.ZodString>;
517
+ }>, "strip", z.ZodTypeAny, {
518
+ type: "password";
519
+ refreshUrl: string;
520
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
521
+ selectedScopes: string[];
522
+ tokenUrl: string;
523
+ }, {
524
+ type: "password";
525
+ refreshUrl?: string | undefined;
526
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
527
+ selectedScopes?: string[] | undefined;
528
+ tokenUrl?: string | undefined;
529
+ }>, z.ZodObject<z.objectUtil.extendShape<{
530
+ /**
531
+ * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
532
+ * URL. The OAuth2 standard requires the use of TLS.
533
+ */
534
+ refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
535
+ /**
536
+ * REQUIRED. The available scopes for the OAuth2 security scheme. A map
537
+ * between the scope name and a short description for it. The map MAY be empty.
538
+ */
539
+ scopes: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodMap<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>>;
540
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
541
+ }, {
542
+ type: z.ZodLiteral<"clientCredentials">;
543
+ tokenUrl: z.ZodDefault<z.ZodString>;
544
+ }>, "strip", z.ZodTypeAny, {
545
+ type: "clientCredentials";
546
+ refreshUrl: string;
547
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
548
+ selectedScopes: string[];
549
+ tokenUrl: string;
550
+ }, {
551
+ type: "clientCredentials";
552
+ refreshUrl?: string | undefined;
553
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
554
+ selectedScopes?: string[] | undefined;
555
+ tokenUrl?: string | undefined;
556
+ }>, z.ZodObject<z.objectUtil.extendShape<{
557
+ /**
558
+ * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
559
+ * URL. The OAuth2 standard requires the use of TLS.
560
+ */
561
+ refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
562
+ /**
563
+ * REQUIRED. The available scopes for the OAuth2 security scheme. A map
564
+ * between the scope name and a short description for it. The map MAY be empty.
565
+ */
566
+ scopes: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodMap<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>>;
567
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
568
+ }, {
569
+ type: z.ZodLiteral<"authorizationCode">;
570
+ authorizationUrl: z.ZodDefault<z.ZodString>;
571
+ 'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
572
+ tokenUrl: z.ZodDefault<z.ZodString>;
573
+ }>, "strip", z.ZodTypeAny, {
574
+ type: "authorizationCode";
575
+ refreshUrl: string;
576
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
577
+ selectedScopes: string[];
578
+ authorizationUrl: string;
579
+ 'x-scalar-redirect-uri': string;
580
+ tokenUrl: string;
581
+ }, {
582
+ type: "authorizationCode";
583
+ refreshUrl?: string | undefined;
584
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
585
+ selectedScopes?: string[] | undefined;
586
+ authorizationUrl?: string | undefined;
587
+ 'x-scalar-redirect-uri'?: string | undefined;
588
+ tokenUrl?: string | undefined;
589
+ }>]>>>;
590
+ /** Extension to save the client Id associated with an oauth flow */
591
+ 'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
592
+ }>, "strip", z.ZodTypeAny, {
593
+ type: "oauth2";
594
+ flow: {
595
+ type: "implicit";
596
+ refreshUrl: string;
597
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
598
+ selectedScopes: string[];
599
+ authorizationUrl: string;
600
+ 'x-scalar-redirect-uri': string;
601
+ } | {
602
+ type: "password";
603
+ refreshUrl: string;
604
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
605
+ selectedScopes: string[];
606
+ tokenUrl: string;
607
+ } | {
608
+ type: "clientCredentials";
609
+ refreshUrl: string;
610
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
611
+ selectedScopes: string[];
612
+ tokenUrl: string;
613
+ } | {
614
+ type: "authorizationCode";
615
+ refreshUrl: string;
616
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
617
+ selectedScopes: string[];
618
+ authorizationUrl: string;
619
+ 'x-scalar-redirect-uri': string;
620
+ tokenUrl: string;
621
+ };
622
+ 'x-scalar-client-id': string;
623
+ description?: string | undefined;
624
+ }, {
625
+ type: "oauth2";
626
+ description?: string | undefined;
627
+ flow?: {
628
+ type: "implicit";
629
+ refreshUrl?: string | undefined;
630
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
631
+ selectedScopes?: string[] | undefined;
632
+ authorizationUrl?: string | undefined;
633
+ 'x-scalar-redirect-uri'?: string | undefined;
634
+ } | {
635
+ type: "password";
636
+ refreshUrl?: string | undefined;
637
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
638
+ selectedScopes?: string[] | undefined;
639
+ tokenUrl?: string | undefined;
640
+ } | {
641
+ type: "clientCredentials";
642
+ refreshUrl?: string | undefined;
643
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
644
+ selectedScopes?: string[] | undefined;
645
+ tokenUrl?: string | undefined;
646
+ } | {
647
+ type: "authorizationCode";
648
+ refreshUrl?: string | undefined;
649
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
650
+ selectedScopes?: string[] | undefined;
651
+ authorizationUrl?: string | undefined;
652
+ 'x-scalar-redirect-uri'?: string | undefined;
653
+ tokenUrl?: string | undefined;
654
+ } | undefined;
655
+ 'x-scalar-client-id'?: string | undefined;
656
+ }>, z.ZodObject<z.objectUtil.extendShape<{
657
+ description: z.ZodOptional<z.ZodString>;
658
+ }, {
659
+ type: z.ZodLiteral<"openIdConnect">;
660
+ /**
661
+ * REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the
662
+ * form of a URL. The OpenID Connect standard requires the use of TLS.
663
+ */
664
+ openIdConnectUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
665
+ }>, "strip", z.ZodTypeAny, {
666
+ type: "openIdConnect";
667
+ openIdConnectUrl: string;
668
+ description?: string | undefined;
669
+ }, {
670
+ type: "openIdConnect";
671
+ description?: string | undefined;
672
+ openIdConnectUrl?: string | undefined;
673
+ }>]>;
674
+ /** Extended security schemes for workspace usage */
675
+ export declare const securitySchemeSchema: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
676
+ description: z.ZodOptional<z.ZodString>;
677
+ }, {
678
+ type: z.ZodLiteral<"apiKey">;
679
+ /** REQUIRED. The name of the header, query or cookie parameter to be used. */
680
+ name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
681
+ /** REQUIRED. The location of the API key. Valid values are "query", "header" or "cookie". */
682
+ in: z.ZodDefault<z.ZodOptional<z.ZodEnum<["query", "header", "cookie"]>>>;
683
+ }>, {
684
+ uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
685
+ /** The name key that links a security requirement to a security object */
686
+ nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
687
+ }>, "strip", z.ZodTypeAny, {
688
+ type: "apiKey";
689
+ uid: string;
690
+ name: string;
691
+ in: "query" | "header" | "cookie";
692
+ nameKey: string;
693
+ description?: string | undefined;
694
+ }, {
695
+ type: "apiKey";
696
+ uid?: string | undefined;
697
+ name?: string | undefined;
698
+ description?: string | undefined;
699
+ in?: "query" | "header" | "cookie" | undefined;
700
+ nameKey?: string | undefined;
701
+ }>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
702
+ description: z.ZodOptional<z.ZodString>;
703
+ }, {
704
+ type: z.ZodLiteral<"http">;
705
+ /**
706
+ * REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in
707
+ * [RFC7235]. The values used SHOULD be registered in the IANA Authentication Scheme registry.
708
+ */
709
+ scheme: z.ZodDefault<z.ZodOptional<z.ZodEnum<["basic", "bearer"]>>>;
710
+ /**
711
+ * A hint to the client to identify how the bearer token is formatted.
712
+ * Bearer tokens are usually generated by an authorization server, so
713
+ * this information is primarily for documentation purposes.
714
+ */
715
+ bearerFormat: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"JWT">, z.ZodString]>>>;
716
+ }>, {
717
+ uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
718
+ /** The name key that links a security requirement to a security object */
719
+ nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
720
+ }>, "strip", z.ZodTypeAny, {
721
+ type: "http";
722
+ uid: string;
723
+ nameKey: string;
724
+ scheme: "basic" | "bearer";
725
+ bearerFormat: string;
726
+ description?: string | undefined;
727
+ }, {
728
+ type: "http";
729
+ uid?: string | undefined;
730
+ description?: string | undefined;
731
+ nameKey?: string | undefined;
732
+ scheme?: "basic" | "bearer" | undefined;
733
+ bearerFormat?: string | undefined;
734
+ }>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
735
+ description: z.ZodOptional<z.ZodString>;
736
+ }, {
737
+ type: z.ZodLiteral<"openIdConnect">;
738
+ /**
739
+ * REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the
740
+ * form of a URL. The OpenID Connect standard requires the use of TLS.
741
+ */
742
+ openIdConnectUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
743
+ }>, {
744
+ uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
745
+ /** The name key that links a security requirement to a security object */
746
+ nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
747
+ }>, "strip", z.ZodTypeAny, {
748
+ type: "openIdConnect";
749
+ uid: string;
750
+ nameKey: string;
751
+ openIdConnectUrl: string;
752
+ description?: string | undefined;
753
+ }, {
754
+ type: "openIdConnect";
755
+ uid?: string | undefined;
756
+ description?: string | undefined;
757
+ nameKey?: string | undefined;
758
+ openIdConnectUrl?: string | undefined;
759
+ }>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
760
+ description: z.ZodOptional<z.ZodString>;
761
+ }, {
762
+ type: z.ZodLiteral<"oauth2">;
763
+ /** REQUIRED. An object containing configuration information for the flow types supported. */
764
+ flow: z.ZodDefault<z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
765
+ /**
766
+ * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
767
+ * URL. The OAuth2 standard requires the use of TLS.
768
+ */
769
+ refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
770
+ /**
771
+ * REQUIRED. The available scopes for the OAuth2 security scheme. A map
772
+ * between the scope name and a short description for it. The map MAY be empty.
773
+ */
774
+ scopes: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodMap<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>>;
775
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
776
+ }, {
777
+ type: z.ZodLiteral<"implicit">;
778
+ authorizationUrl: z.ZodDefault<z.ZodString>;
779
+ 'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
780
+ }>, "strip", z.ZodTypeAny, {
781
+ type: "implicit";
782
+ refreshUrl: string;
783
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
784
+ selectedScopes: string[];
785
+ authorizationUrl: string;
786
+ 'x-scalar-redirect-uri': string;
787
+ }, {
788
+ type: "implicit";
789
+ refreshUrl?: string | undefined;
790
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
791
+ selectedScopes?: string[] | undefined;
792
+ authorizationUrl?: string | undefined;
793
+ 'x-scalar-redirect-uri'?: string | undefined;
794
+ }>, z.ZodObject<z.objectUtil.extendShape<{
795
+ /**
796
+ * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
797
+ * URL. The OAuth2 standard requires the use of TLS.
798
+ */
799
+ refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
800
+ /**
801
+ * REQUIRED. The available scopes for the OAuth2 security scheme. A map
802
+ * between the scope name and a short description for it. The map MAY be empty.
803
+ */
804
+ scopes: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodMap<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>>;
805
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
806
+ }, {
807
+ type: z.ZodLiteral<"password">;
808
+ tokenUrl: z.ZodDefault<z.ZodString>;
809
+ }>, "strip", z.ZodTypeAny, {
810
+ type: "password";
811
+ refreshUrl: string;
812
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
813
+ selectedScopes: string[];
814
+ tokenUrl: string;
815
+ }, {
816
+ type: "password";
817
+ refreshUrl?: string | undefined;
818
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
819
+ selectedScopes?: string[] | undefined;
820
+ tokenUrl?: string | undefined;
821
+ }>, z.ZodObject<z.objectUtil.extendShape<{
822
+ /**
823
+ * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
824
+ * URL. The OAuth2 standard requires the use of TLS.
825
+ */
826
+ refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
827
+ /**
828
+ * REQUIRED. The available scopes for the OAuth2 security scheme. A map
829
+ * between the scope name and a short description for it. The map MAY be empty.
830
+ */
831
+ scopes: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodMap<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>>;
832
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
833
+ }, {
834
+ type: z.ZodLiteral<"clientCredentials">;
835
+ tokenUrl: z.ZodDefault<z.ZodString>;
836
+ }>, "strip", z.ZodTypeAny, {
837
+ type: "clientCredentials";
838
+ refreshUrl: string;
839
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
840
+ selectedScopes: string[];
841
+ tokenUrl: string;
842
+ }, {
843
+ type: "clientCredentials";
844
+ refreshUrl?: string | undefined;
845
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
846
+ selectedScopes?: string[] | undefined;
847
+ tokenUrl?: string | undefined;
848
+ }>, z.ZodObject<z.objectUtil.extendShape<{
849
+ /**
850
+ * The URL to be used for obtaining refresh tokens. This MUST be in the form of a
851
+ * URL. The OAuth2 standard requires the use of TLS.
852
+ */
853
+ refreshUrl: z.ZodDefault<z.ZodOptional<z.ZodString>>;
854
+ /**
855
+ * REQUIRED. The available scopes for the OAuth2 security scheme. A map
856
+ * between the scope name and a short description for it. The map MAY be empty.
857
+ */
858
+ scopes: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodMap<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>>;
859
+ selectedScopes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
860
+ }, {
861
+ type: z.ZodLiteral<"authorizationCode">;
862
+ authorizationUrl: z.ZodDefault<z.ZodString>;
863
+ 'x-scalar-redirect-uri': z.ZodDefault<z.ZodOptional<z.ZodString>>;
864
+ tokenUrl: z.ZodDefault<z.ZodString>;
865
+ }>, "strip", z.ZodTypeAny, {
866
+ type: "authorizationCode";
867
+ refreshUrl: string;
868
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
869
+ selectedScopes: string[];
870
+ authorizationUrl: string;
871
+ 'x-scalar-redirect-uri': string;
872
+ tokenUrl: string;
873
+ }, {
874
+ type: "authorizationCode";
875
+ refreshUrl?: string | undefined;
876
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
877
+ selectedScopes?: string[] | undefined;
878
+ authorizationUrl?: string | undefined;
879
+ 'x-scalar-redirect-uri'?: string | undefined;
880
+ tokenUrl?: string | undefined;
881
+ }>]>>>;
882
+ /** Extension to save the client Id associated with an oauth flow */
883
+ 'x-scalar-client-id': z.ZodDefault<z.ZodOptional<z.ZodString>>;
884
+ }>, {
885
+ uid: z.ZodDefault<z.ZodOptional<z.ZodString>>;
886
+ /** The name key that links a security requirement to a security object */
887
+ nameKey: z.ZodDefault<z.ZodOptional<z.ZodString>>;
888
+ }>, "strip", z.ZodTypeAny, {
889
+ type: "oauth2";
890
+ uid: string;
891
+ nameKey: string;
892
+ flow: {
893
+ type: "implicit";
894
+ refreshUrl: string;
895
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
896
+ selectedScopes: string[];
897
+ authorizationUrl: string;
898
+ 'x-scalar-redirect-uri': string;
899
+ } | {
900
+ type: "password";
901
+ refreshUrl: string;
902
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
903
+ selectedScopes: string[];
904
+ tokenUrl: string;
905
+ } | {
906
+ type: "clientCredentials";
907
+ refreshUrl: string;
908
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
909
+ selectedScopes: string[];
910
+ tokenUrl: string;
911
+ } | {
912
+ type: "authorizationCode";
913
+ refreshUrl: string;
914
+ scopes: Map<string, string | undefined> | Record<string, string | undefined> | {};
915
+ selectedScopes: string[];
916
+ authorizationUrl: string;
917
+ 'x-scalar-redirect-uri': string;
918
+ tokenUrl: string;
919
+ };
920
+ 'x-scalar-client-id': string;
921
+ description?: string | undefined;
922
+ }, {
923
+ type: "oauth2";
924
+ uid?: string | undefined;
925
+ description?: string | undefined;
926
+ nameKey?: string | undefined;
927
+ flow?: {
928
+ type: "implicit";
929
+ refreshUrl?: string | undefined;
930
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
931
+ selectedScopes?: string[] | undefined;
932
+ authorizationUrl?: string | undefined;
933
+ 'x-scalar-redirect-uri'?: string | undefined;
934
+ } | {
935
+ type: "password";
936
+ refreshUrl?: string | undefined;
937
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
938
+ selectedScopes?: string[] | undefined;
939
+ tokenUrl?: string | undefined;
940
+ } | {
941
+ type: "clientCredentials";
942
+ refreshUrl?: string | undefined;
943
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
944
+ selectedScopes?: string[] | undefined;
945
+ tokenUrl?: string | undefined;
946
+ } | {
947
+ type: "authorizationCode";
948
+ refreshUrl?: string | undefined;
949
+ scopes?: Map<string, string | undefined> | Record<string, string | undefined> | {} | undefined;
950
+ selectedScopes?: string[] | undefined;
951
+ authorizationUrl?: string | undefined;
952
+ 'x-scalar-redirect-uri'?: string | undefined;
953
+ tokenUrl?: string | undefined;
954
+ } | undefined;
955
+ 'x-scalar-client-id'?: string | undefined;
956
+ }>]>;
957
+ /**
958
+ * Security Scheme Object
959
+ *
960
+ * @see https://spec.openapis.org/oas/latest.html#security-scheme-object
961
+ */
962
+ export type SecurityScheme = z.infer<typeof securitySchemeSchema>;
963
+ export type SecuritySchemePayload = z.input<typeof securitySchemeSchema>;
964
+ //# sourceMappingURL=security.d.ts.map