@api-client/core 0.19.19 → 0.19.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.
Files changed (124) hide show
  1. package/build/src/authorization/Utils.js +3 -3
  2. package/build/src/authorization/Utils.js.map +1 -1
  3. package/build/src/modeling/ApiModel.d.ts +16 -5
  4. package/build/src/modeling/ApiModel.d.ts.map +1 -1
  5. package/build/src/modeling/ApiModel.js +17 -2
  6. package/build/src/modeling/ApiModel.js.map +1 -1
  7. package/build/src/modeling/ApiValidation.d.ts.map +1 -1
  8. package/build/src/modeling/ApiValidation.js +2 -1
  9. package/build/src/modeling/ApiValidation.js.map +1 -1
  10. package/build/src/modeling/DomainProperty.d.ts +12 -0
  11. package/build/src/modeling/DomainProperty.d.ts.map +1 -1
  12. package/build/src/modeling/DomainProperty.js +23 -28
  13. package/build/src/modeling/DomainProperty.js.map +1 -1
  14. package/build/src/modeling/DomainSerialization.js +1 -1
  15. package/build/src/modeling/DomainSerialization.js.map +1 -1
  16. package/build/src/modeling/ExposedEntity.d.ts +15 -1
  17. package/build/src/modeling/ExposedEntity.d.ts.map +1 -1
  18. package/build/src/modeling/ExposedEntity.js +42 -4
  19. package/build/src/modeling/ExposedEntity.js.map +1 -1
  20. package/build/src/modeling/actions/Action.d.ts.map +1 -1
  21. package/build/src/modeling/actions/Action.js +1 -0
  22. package/build/src/modeling/actions/Action.js.map +1 -1
  23. package/build/src/modeling/actions/ListAction.d.ts +3 -17
  24. package/build/src/modeling/actions/ListAction.d.ts.map +1 -1
  25. package/build/src/modeling/actions/ListAction.js +18 -38
  26. package/build/src/modeling/actions/ListAction.js.map +1 -1
  27. package/build/src/modeling/actions/SearchAction.d.ts +4 -4
  28. package/build/src/modeling/actions/SearchAction.d.ts.map +1 -1
  29. package/build/src/modeling/actions/SearchAction.js +16 -13
  30. package/build/src/modeling/actions/SearchAction.js.map +1 -1
  31. package/build/src/modeling/generators/oas_312/OasGenerator.d.ts +32 -0
  32. package/build/src/modeling/generators/oas_312/OasGenerator.d.ts.map +1 -0
  33. package/build/src/modeling/generators/oas_312/OasGenerator.js +1452 -0
  34. package/build/src/modeling/generators/oas_312/OasGenerator.js.map +1 -0
  35. package/build/src/modeling/generators/oas_312/OasSchemaGenerator.d.ts +27 -0
  36. package/build/src/modeling/generators/oas_312/OasSchemaGenerator.d.ts.map +1 -0
  37. package/build/src/modeling/generators/oas_312/OasSchemaGenerator.js +295 -0
  38. package/build/src/modeling/generators/oas_312/OasSchemaGenerator.js.map +1 -0
  39. package/build/src/modeling/generators/oas_312/types.d.ts +1010 -0
  40. package/build/src/modeling/generators/oas_312/types.d.ts.map +1 -0
  41. package/build/src/modeling/generators/oas_312/types.js +2 -0
  42. package/build/src/modeling/generators/oas_312/types.js.map +1 -0
  43. package/build/src/modeling/generators/oas_320/OasGenerator.d.ts +16 -0
  44. package/build/src/modeling/generators/oas_320/OasGenerator.d.ts.map +1 -0
  45. package/build/src/modeling/generators/oas_320/OasGenerator.js +306 -0
  46. package/build/src/modeling/generators/oas_320/OasGenerator.js.map +1 -0
  47. package/build/src/modeling/generators/oas_320/OasSchemaGenerator.d.ts +25 -0
  48. package/build/src/modeling/generators/oas_320/OasSchemaGenerator.d.ts.map +1 -0
  49. package/build/src/modeling/generators/oas_320/OasSchemaGenerator.js +237 -0
  50. package/build/src/modeling/generators/oas_320/OasSchemaGenerator.js.map +1 -0
  51. package/build/src/modeling/generators/oas_320/types.d.ts +1219 -0
  52. package/build/src/modeling/generators/oas_320/types.d.ts.map +1 -0
  53. package/build/src/modeling/generators/oas_320/types.js +2 -0
  54. package/build/src/modeling/generators/oas_320/types.js.map +1 -0
  55. package/build/src/modeling/types.d.ts +50 -13
  56. package/build/src/modeling/types.d.ts.map +1 -1
  57. package/build/src/modeling/types.js.map +1 -1
  58. package/build/src/modeling/validation/api_model_rules.d.ts +1 -0
  59. package/build/src/modeling/validation/api_model_rules.d.ts.map +1 -1
  60. package/build/src/modeling/validation/api_model_rules.js +105 -29
  61. package/build/src/modeling/validation/api_model_rules.js.map +1 -1
  62. package/build/src/models/ProjectRequest.d.ts.map +1 -1
  63. package/build/src/models/ProjectRequest.js +0 -4
  64. package/build/src/models/ProjectRequest.js.map +1 -1
  65. package/build/src/models/transformers/ArcDexieTransformer.d.ts.map +1 -1
  66. package/build/src/models/transformers/ArcDexieTransformer.js +0 -4
  67. package/build/src/models/transformers/ArcDexieTransformer.js.map +1 -1
  68. package/build/src/models/transformers/ImportUtils.js +1 -1
  69. package/build/src/models/transformers/ImportUtils.js.map +1 -1
  70. package/build/src/models/transformers/PostmanBackupTransformer.d.ts.map +1 -1
  71. package/build/src/models/transformers/PostmanBackupTransformer.js +0 -4
  72. package/build/src/models/transformers/PostmanBackupTransformer.js.map +1 -1
  73. package/build/src/runtime/constants.d.ts +7 -0
  74. package/build/src/runtime/constants.d.ts.map +1 -0
  75. package/build/src/runtime/constants.js +8 -0
  76. package/build/src/runtime/constants.js.map +1 -0
  77. package/build/src/runtime/http-engine/ntlm/Des.d.ts.map +1 -1
  78. package/build/src/runtime/http-engine/ntlm/Des.js +1 -0
  79. package/build/src/runtime/http-engine/ntlm/Des.js.map +1 -1
  80. package/build/src/runtime/variables/EvalFunctions.d.ts.map +1 -1
  81. package/build/src/runtime/variables/EvalFunctions.js +0 -1
  82. package/build/src/runtime/variables/EvalFunctions.js.map +1 -1
  83. package/build/tsconfig.tsbuildinfo +1 -1
  84. package/eslint.config.js +6 -0
  85. package/package.json +3 -1
  86. package/src/authorization/Utils.ts +3 -3
  87. package/src/modeling/ApiModel.ts +23 -8
  88. package/src/modeling/ApiValidation.ts +2 -0
  89. package/src/modeling/DomainProperty.ts +22 -18
  90. package/src/modeling/DomainSerialization.ts +1 -1
  91. package/src/modeling/ExposedEntity.ts +44 -4
  92. package/src/modeling/actions/Action.ts +1 -0
  93. package/src/modeling/actions/ListAction.ts +12 -30
  94. package/src/modeling/actions/SearchAction.ts +11 -8
  95. package/src/modeling/generators/oas_312/OasGenerator.ts +1685 -0
  96. package/src/modeling/generators/oas_312/OasSchemaGenerator.ts +322 -0
  97. package/src/modeling/generators/oas_312/types.ts +1052 -0
  98. package/src/modeling/generators/oas_320/OasGenerator.ts +359 -0
  99. package/src/modeling/generators/oas_320/OasSchemaGenerator.ts +255 -0
  100. package/src/modeling/generators/oas_320/types.ts +1259 -0
  101. package/src/modeling/types.ts +55 -22
  102. package/src/modeling/validation/api_model_rules.ts +103 -32
  103. package/src/models/ProjectRequest.ts +0 -4
  104. package/src/models/transformers/ArcDexieTransformer.ts +0 -4
  105. package/src/models/transformers/ImportUtils.ts +1 -1
  106. package/src/models/transformers/PostmanBackupTransformer.ts +0 -5
  107. package/src/runtime/constants.ts +9 -0
  108. package/src/runtime/http-engine/ntlm/Des.ts +1 -0
  109. package/src/runtime/variables/EvalFunctions.ts +0 -1
  110. package/tests/test-utils.ts +6 -2
  111. package/tests/unit/decorators/observed.spec.ts +8 -24
  112. package/tests/unit/decorators/observed_recursive.spec.ts +0 -1
  113. package/tests/unit/events/EventsTestHelpers.ts +0 -1
  114. package/tests/unit/events/events_polyfills.ts +0 -1
  115. package/tests/unit/legacy-transformers/DataTestHelper.ts +0 -2
  116. package/tests/unit/legacy-transformers/LegacyExportProcessor.spec.ts +0 -1
  117. package/tests/unit/modeling/actions/ListAction.spec.ts +9 -69
  118. package/tests/unit/modeling/actions/SearchAction.spec.ts +9 -35
  119. package/tests/unit/modeling/api_model.spec.ts +28 -0
  120. package/tests/unit/modeling/definitions/sku.spec.ts +0 -2
  121. package/tests/unit/modeling/domain_property.spec.ts +20 -1
  122. package/tests/unit/modeling/exposed_entity.spec.ts +71 -0
  123. package/tests/unit/modeling/generators/OasGenerator.spec.ts +302 -0
  124. package/tests/unit/modeling/validation/api_model_rules.spec.ts +113 -15
@@ -0,0 +1,1010 @@
1
+ import { type JSONSchema } from 'json-schema-typed/draft-2020-12';
2
+ /**
3
+ * This is the root object of the [OpenAPI Description](#openapi-description).
4
+ */
5
+ export interface OpenApi312 {
6
+ /**
7
+ * This string MUST be the [version number](#versions) of the OpenAPI Specification that the OpenAPI
8
+ * Document uses. The `openapi` field SHOULD be used by tooling to interpret the OpenAPI Document. This is _not_
9
+ * related to the [`info.version`](#info-version) string, which is the version of the OpenAPI Document.
10
+ */
11
+ openapi: '3.1.0';
12
+ /**
13
+ * Provides metadata about the API. The metadata MAY be used by tooling as required.
14
+ */
15
+ info: InfoObject;
16
+ /**
17
+ * The default value for the `$schema` keyword within [Schema Objects](#schema-object) contained within this OAS
18
+ * document. This MUST be in the form of a URI.
19
+ */
20
+ jsonSchemaDialect?: string;
21
+ /**
22
+ * An array of Server Objects, which provide connectivity information to a target server. If the `servers` field is
23
+ * not provided, or is an empty array, the default value would be a [Server Object](#server-object) with a
24
+ * [url](#server-url) value of `/`.
25
+ */
26
+ servers?: ServerObject[];
27
+ /**
28
+ * The available paths and operations for the API.
29
+ */
30
+ paths?: PathsObject;
31
+ /**
32
+ * The incoming webhooks that MAY be received as part of this API and that the API consumer MAY choose to implement.
33
+ * Closely related to the `callbacks` feature, this section describes requests initiated other than by an API call,
34
+ * for example by an out of band registration. The key name is a unique string to refer to each webhook, while the
35
+ * (optionally referenced) Path Item Object describes a request that may be initiated by the API provider and the
36
+ * expected responses. An [example](https://learn.openapis.org/examples/v3.1/webhook-example.html) is available.
37
+ */
38
+ webhooks?: Record<string, PathItemObject>;
39
+ /**
40
+ * An element to hold various Objects for the OpenAPI Description.
41
+ */
42
+ components?: ComponentsObject;
43
+ /**
44
+ * A declaration of which security mechanisms can be used across the API. The list of values includes alternative
45
+ * Security Requirement Objects that can be used. Only one of the Security Requirement Objects need to be satisfied to
46
+ * authorize a request. Individual operations can override this definition. The list can be incomplete, up to being
47
+ * empty or absent. To make security explicitly optional, an empty security requirement (`{}`) can be included in the
48
+ * array.
49
+ */
50
+ security?: SecurityRequirementObject[];
51
+ /**
52
+ * A list of tags used by the OpenAPI Description with additional metadata. The order of the tags can be used to
53
+ * reflect on their order by the parsing tools. Not all tags that are used by the [Operation
54
+ * Object](#operation-object) must be declared. The tags that are not declared MAY be organized randomly or based on
55
+ * the tools' logic. Each tag name in the list MUST be unique.
56
+ */
57
+ tags?: TagObject[];
58
+ /**
59
+ * Additional external documentation.
60
+ */
61
+ externalDocs?: ExternalDocumentationObject;
62
+ }
63
+ /**
64
+ * The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented
65
+ * in editing or documentation generation tools for convenience.
66
+ */
67
+ export interface InfoObject {
68
+ /**
69
+ * The title of the API.
70
+ */
71
+ title: string;
72
+ /**
73
+ * A short summary of the API.
74
+ */
75
+ summary?: string;
76
+ /**
77
+ * A description of the API. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text
78
+ * representation.
79
+ */
80
+ description?: string;
81
+ /**
82
+ * A URI for the Terms of Service for the API. This MUST be in the form of a URI.
83
+ */
84
+ termsOfService?: string;
85
+ /**
86
+ * The contact information for the exposed API.
87
+ */
88
+ contact?: ContactObject;
89
+ /**
90
+ * The license information for the exposed API.
91
+ */
92
+ license?: LicenseObject;
93
+ /**
94
+ * The version of the OpenAPI Document (which is distinct from the [OpenAPI Specification
95
+ * version](#oas-version) or the version of the API being described or the version of the OpenAPI Description).
96
+ */
97
+ version: string;
98
+ }
99
+ /**
100
+ * Contact information for the exposed API.
101
+ */
102
+ export interface ContactObject {
103
+ /**
104
+ * The identifying name of the contact person/organization.
105
+ */
106
+ name?: string;
107
+ /**
108
+ * The URI for the contact information. This MUST be in the form of a URI.
109
+ */
110
+ url?: string;
111
+ /**
112
+ * The email address of the contact person/organization. This MUST be in the form of an email address.
113
+ */
114
+ email?: string;
115
+ }
116
+ /**
117
+ * License information for the exposed API.
118
+ */
119
+ export interface LicenseObject {
120
+ /**
121
+ * The license name used for the API.
122
+ */
123
+ name: string;
124
+ /**
125
+ * An [SPDX](https://spdx.org/licenses/) license expression for the API. The `identifier` field is mutually exclusive
126
+ * of the `url` field.
127
+ */
128
+ identifier?: string;
129
+ /**
130
+ * A URI for the license used for the API. This MUST be in the form of a URI. The `url` field is mutually exclusive of
131
+ * the `identifier` field.
132
+ */
133
+ url?: string;
134
+ }
135
+ /**
136
+ * An object representing a Server.
137
+ */
138
+ export interface ServerObject {
139
+ /**
140
+ * A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that
141
+ * the host location is relative to the location where the document containing the Server Object is being served.
142
+ * Query and fragment MUST NOT be part of this URL. Variable substitutions will be made when a variable is named in
143
+ * `{`braces`}`.
144
+ */
145
+ url: string;
146
+ /**
147
+ * An optional string describing the host designated by the URL. [CommonMark syntax](https://spec.commonmark.org/) MAY
148
+ * be used for rich text representation.
149
+ */
150
+ description?: string;
151
+ /**
152
+ * A map between a variable name and its value. The value is used for substitution in the server's URL template.
153
+ */
154
+ variables?: Record<string, ServerVariableObject>;
155
+ }
156
+ /**
157
+ * An object representing a Server Variable for server URL template substitution.
158
+ */
159
+ export interface ServerVariableObject {
160
+ /**
161
+ * An enumeration of string values to be used if the substitution options are from a limited set. The array MUST NOT
162
+ * be empty.
163
+ */
164
+ enum?: string[];
165
+ /**
166
+ * The default value to use for substitution, which SHALL be sent if an alternate value is _not_
167
+ * supplied. If the [`enum`](#server-variable-enum) is defined, the value MUST exist in the enum's values. Note that
168
+ * this behavior is different from the [Schema Object](#schema-object)'s `default` keyword, which documents the
169
+ * receiver's behavior rather than inserting the value into the data.
170
+ */
171
+ default: string;
172
+ /**
173
+ * An optional description for the server variable. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for
174
+ * rich text representation.
175
+ */
176
+ description?: string;
177
+ }
178
+ /**
179
+ * Holds a set of reusable objects for different aspects of the OAS. All objects defined within the Components Object
180
+ * will have no effect on the API unless they are explicitly referenced from outside the Components Object.
181
+ */
182
+ export interface ComponentsObject {
183
+ /**
184
+ * An object to hold reusable [Schema Objects](#schema-object).
185
+ */
186
+ schemas?: Record<string, SchemaObject>;
187
+ /**
188
+ * [Reference Object](#reference-object)]
189
+ */
190
+ responses?: Record<string, ResponseObject>;
191
+ /**
192
+ * [Reference Object](#reference-object)]
193
+ */
194
+ parameters?: Record<string, ParameterObject>;
195
+ /**
196
+ * [Reference Object](#reference-object)]
197
+ */
198
+ examples?: Record<string, ExampleObject>;
199
+ /**
200
+ * [Reference Object](#reference-object)]
201
+ */
202
+ requestBodies?: Record<string, RequestBodyObject>;
203
+ /**
204
+ * [Reference Object](#reference-object)]
205
+ */
206
+ headers?: Record<string, HeaderObject>;
207
+ /**
208
+ * [Reference Object](#reference-object)]
209
+ */
210
+ securitySchemes?: Record<string, SecuritySchemeObject>;
211
+ /**
212
+ * [Reference Object](#reference-object)]
213
+ */
214
+ links?: Record<string, LinkObject>;
215
+ /**
216
+ * [Reference Object](#reference-object)]
217
+ */
218
+ callbacks?: Record<string, CallbackObject>;
219
+ /**
220
+ * An object to hold reusable [Path Item Objects](#path-item-object).
221
+ */
222
+ pathItems?: Record<string, PathItemObject>;
223
+ }
224
+ /**
225
+ * Holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the
226
+ * [Server Object](#server-object) in order to construct the full URL. The Paths Object MAY be empty, due to [Access
227
+ * Control List (ACL) constraints](#security-filtering).
228
+ */
229
+ export type PathsObject = Record<string, PathItemObject>;
230
+ /**
231
+ * Describes the operations available on a single path. A Path Item MAY be empty, due to [ACL
232
+ * constraints](#security-filtering). The path itself is still exposed to the documentation viewer but they will not
233
+ * know which operations and parameters are available.
234
+ */
235
+ export interface PathItemObject {
236
+ /**
237
+ * Allows for a referenced definition of this path item. The value MUST be in the form of a URI, and the referenced
238
+ * structure MUST be in the form of a [Path Item Object](#path-item-object). In case a Path Item Object field appears
239
+ * both in the defined object and the referenced object, the behavior is undefined. See the rules for resolving
240
+ * [Relative References](#relative-references-in-api-description-uris). _**Note:** The behavior of `$ref` with
241
+ * adjacent properties is likely to change in future versions of this specification to bring it into closer alignment
242
+ * with the behavior of the [Reference Object](#reference-object)._
243
+ */
244
+ $ref?: string;
245
+ /**
246
+ * An optional string summary, intended to apply to all operations in this path.
247
+ */
248
+ summary?: string;
249
+ /**
250
+ * An optional string description, intended to apply to all operations in this path. [CommonMark
251
+ * syntax](https://spec.commonmark.org/) MAY be used for rich text representation.
252
+ */
253
+ description?: string;
254
+ /**
255
+ * A definition of a GET operation on this path.
256
+ */
257
+ get?: OperationObject;
258
+ /**
259
+ * A definition of a PUT operation on this path.
260
+ */
261
+ put?: OperationObject;
262
+ /**
263
+ * A definition of a POST operation on this path.
264
+ */
265
+ post?: OperationObject;
266
+ /**
267
+ * A definition of a DELETE operation on this path.
268
+ */
269
+ delete?: OperationObject;
270
+ /**
271
+ * A definition of a OPTIONS operation on this path.
272
+ */
273
+ options?: OperationObject;
274
+ /**
275
+ * A definition of a HEAD operation on this path.
276
+ */
277
+ head?: OperationObject;
278
+ /**
279
+ * A definition of a PATCH operation on this path.
280
+ */
281
+ patch?: OperationObject;
282
+ /**
283
+ * A definition of a TRACE operation on this path.
284
+ */
285
+ trace?: OperationObject;
286
+ /**
287
+ * An alternative `servers` array to service all operations in this path. If a `servers` array is specified at the
288
+ * [OpenAPI Object](#oas-servers) level, it will be overridden by this value.
289
+ */
290
+ servers?: ServerObject[];
291
+ /**
292
+ * [Reference Object](#reference-object)]
293
+ */
294
+ parameters?: (ParameterObject | ReferenceObject)[];
295
+ }
296
+ /**
297
+ * Describes a single API operation on a path.
298
+ */
299
+ export interface OperationObject {
300
+ /**
301
+ * A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or
302
+ * any other qualifier.
303
+ */
304
+ tags?: string[];
305
+ /**
306
+ * A short summary of what the operation does.
307
+ */
308
+ summary?: string;
309
+ /**
310
+ * A verbose explanation of the operation behavior. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for
311
+ * rich text representation.
312
+ */
313
+ description?: string;
314
+ /**
315
+ * Additional external documentation for this operation.
316
+ */
317
+ externalDocs?: ExternalDocumentationObject;
318
+ /**
319
+ * Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The
320
+ * operationId value is **case-sensitive**. Tools and libraries MAY use the operationId to uniquely identify an
321
+ * operation, therefore, it is RECOMMENDED to follow common programming naming conventions.
322
+ */
323
+ operationId?: string;
324
+ /**
325
+ * [Reference Object](#reference-object)]
326
+ */
327
+ parameters?: (ParameterObject | ReferenceObject)[];
328
+ /**
329
+ * [Reference Object](#reference-object)
330
+ */
331
+ requestBody?: RequestBodyObject | ReferenceObject;
332
+ /**
333
+ * The list of possible responses as they are returned from executing this operation.
334
+ */
335
+ responses?: ResponsesObject;
336
+ /**
337
+ * A map of possible out-of band callbacks related to the parent operation.
338
+ * The key is a unique identifier for the Callback Object.
339
+ * Each value in the map is a Callback Object that describes a request
340
+ * that may be initiated by the API provider and the expected responses.
341
+ */
342
+ callbacks?: Record<string, CallbackObject>;
343
+ /**
344
+ * Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default
345
+ * value is `false`.
346
+ */
347
+ deprecated?: boolean;
348
+ /**
349
+ * A declaration of which security mechanisms can be used for this operation. The list of values includes alternative
350
+ * Security Requirement Objects that can be used. Only one of the Security Requirement Objects need to be satisfied to
351
+ * authorize a request. To make security optional, an empty security requirement (`{}`) can be included in the array.
352
+ * This definition overrides any declared top-level [`security`](#oas-security). To remove a top-level security
353
+ * declaration, an empty array can be used.
354
+ */
355
+ security?: SecurityRequirementObject[];
356
+ /**
357
+ * An alternative `servers` array to service this operation. If a `servers` array is specified at the [Path Item
358
+ * Object](#path-item-servers) or [OpenAPI Object](#oas-servers) level, it will be overridden by this value.
359
+ */
360
+ servers?: ServerObject[];
361
+ }
362
+ /**
363
+ * Allows referencing an external resource for extended documentation.
364
+ */
365
+ export interface ExternalDocumentationObject {
366
+ /**
367
+ * A description of the target documentation. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich
368
+ * text representation.
369
+ */
370
+ description?: string;
371
+ /**
372
+ * The URI for the target documentation. This MUST be in the form of a URI.
373
+ */
374
+ url: string;
375
+ }
376
+ /**
377
+ * Describes a single operation parameter. A unique parameter is defined by a combination of a [name](#parameter-name)
378
+ * and [location](#parameter-in). See [Appendix E](#appendix-e-percent-encoding-and-form-media-types) for a detailed
379
+ * examination of percent-encoding concerns, including interactions with the `application/x-www-form-urlencoded` query
380
+ * string format.
381
+ */
382
+ export interface ParameterObject {
383
+ /**
384
+ * The name of the parameter. Parameter names are _case sensitive_. If [`in`](#parameter-in) is
385
+ * `"path"`, the `name` field MUST correspond to a template expression occurring within the [path](#paths-path) field
386
+ * in the [Paths Object](#paths-object). See [Path Templating](#path-templating) for further information.If
387
+ * [`in`](#parameter-in) is `"header"` and the `name` field is `"Accept"`, `"Content-Type"` or `"Authorization"`, the
388
+ * parameter definition SHALL be ignored.For all other cases, the `name` corresponds to the parameter name used by the
389
+ * [`in`](#parameter-in) field.
390
+ */
391
+ name: string;
392
+ /**
393
+ * The location of the parameter.
394
+ */
395
+ in: 'query' | 'header' | 'path' | 'cookie';
396
+ /**
397
+ * A brief description of the parameter. This could contain examples of use. [CommonMark
398
+ * syntax](https://spec.commonmark.org/) MAY be used for rich text representation.
399
+ */
400
+ description?: string;
401
+ /**
402
+ * Determines whether this parameter is mandatory. If the [parameter location](#parameter-in) is `"path"`, this field
403
+ * is **REQUIRED** and its value MUST be `true`. Otherwise, the field MAY be included and its default value is
404
+ * `false`.
405
+ */
406
+ required: boolean;
407
+ /**
408
+ * Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is `false`.
409
+ */
410
+ deprecated?: boolean;
411
+ /**
412
+ * If `true`, clients MAY pass a zero-length string value in place of parameters that would otherwise be omitted
413
+ * entirely, which the server SHOULD interpret as the parameter being unused. Default value is `false`. If
414
+ * [`style`](#parameter-style) is used, and if [behavior is _n/a_ (cannot be serialized)](#style-examples), the value
415
+ * of `allowEmptyValue` SHALL be ignored. Interactions between this field and the parameter's [Schema
416
+ * Object](#schema-object) are implementation-defined. This field is valid only for `query` parameters. Use of this
417
+ * field is NOT RECOMMENDED, and it is likely to be removed in a later revision.
418
+ */
419
+ allowEmptyValue?: boolean;
420
+ /**
421
+ * Describes how the parameter value will be serialized depending on the type of the parameter value. Default values
422
+ * (based on value of `in`): for `"query"` - `"form"`; for `"path"` - `"simple"`; for `"header"` - `"simple"`; for
423
+ * `"cookie"` - `"form"`.
424
+ */
425
+ style?: string;
426
+ /**
427
+ * When this is true, parameter values of type `array` or `object` generate separate parameters for each value of the
428
+ * array or key-value pair of the map. For other types of parameters this field has no effect. When
429
+ * [`style`](#parameter-style) is `"form"`, the default value is `true`. For all other styles, the default value is
430
+ * `false`. Note that despite `false` being the default for `deepObject`, the combination of `false` with `deepObject`
431
+ * is undefined.
432
+ */
433
+ explode?: boolean;
434
+ /**
435
+ * When this is true, parameter values are serialized using reserved expansion, as defined by
436
+ * [RFC6570](https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.3), which allows [RFC3986's reserved character
437
+ * set](https://datatracker.ietf.org/doc/html/rfc3986#section-2.2), as well as percent-encoded triples, to pass
438
+ * through unchanged, while still percent-encoding all other disallowed characters (including `%` outside of
439
+ * percent-encoded triples). Applications are still responsible for percent-encoding reserved characters that are [not
440
+ * allowed in the query string](https://datatracker.ietf.org/doc/html/rfc3986#section-3.4) (`[`, `]`, `#`), or have a
441
+ * special meaning in `application/x-www-form-urlencoded` (`-`, `&`, `+`); see [URL
442
+ * Percent-Encoding](#url-percent-encoding) for details. This field only applies to parameters with an `in` value of
443
+ * `query`. The default value is `false`.
444
+ */
445
+ allowReserved?: boolean;
446
+ /**
447
+ * The schema defining the type used for the parameter.
448
+ */
449
+ schema?: SchemaObject;
450
+ /**
451
+ * Example of the parameter's potential value; see [Working With Examples](#working-with-examples).
452
+ */
453
+ example?: unknown;
454
+ /**
455
+ * [Reference Object](#reference-object)]
456
+ */
457
+ examples?: Record<string, ExampleObject>;
458
+ /**
459
+ * A map containing the representations for the parameter. The key is the media type and the value describes it. The
460
+ * map MUST only contain one entry.
461
+ */
462
+ content?: Record<string, MediaTypeObject>;
463
+ }
464
+ /**
465
+ * Describes a single request body.
466
+ */
467
+ export interface RequestBodyObject {
468
+ /**
469
+ * A brief description of the request body. This could contain examples of use. [CommonMark
470
+ * syntax](https://spec.commonmark.org/) MAY be used for rich text representation.
471
+ */
472
+ description?: string;
473
+ /**
474
+ * The content of the request body. The key is a media type or [media type
475
+ * range](https://tools.ietf.org/html/rfc7231#appendix-D) and the value describes it. The map SHOULD have at least one
476
+ * entry; if it does not, the behavior is implementation-defined. For requests that match multiple keys, only the most
477
+ * specific key is applicable. e.g. `"text/plain"` overrides `"text/*"`
478
+ */
479
+ content: Record<string, MediaTypeObject>;
480
+ /**
481
+ * Determines if the request body is required in the request. Defaults to `false`.
482
+ */
483
+ required?: boolean;
484
+ }
485
+ /**
486
+ * Each Media Type Object provides schema and examples for the media type identified by its key. When `example` or
487
+ * `examples` are provided, the example SHOULD match the specified schema and be in the correct format as specified by
488
+ * the media type and its encoding. The `example` and `examples` fields are mutually exclusive, and if either is present
489
+ * it SHALL _override_ any `example` in the schema. See [Working With Examples](#working-with-examples) for further
490
+ * guidance regarding the different ways of specifying examples, including non-JSON/YAML values.
491
+ */
492
+ export interface MediaTypeObject {
493
+ /**
494
+ * The schema defining the content of the request, response, parameter, or header.
495
+ */
496
+ schema?: SchemaObject;
497
+ /**
498
+ * Example of the media type; see [Working With Examples](#working-with-examples).
499
+ */
500
+ example?: unknown;
501
+ /**
502
+ * [Reference Object](#reference-object)]
503
+ */
504
+ examples?: Record<string, ExampleObject>;
505
+ /**
506
+ * A map between a property name and its encoding information. The key, being the property name, MUST exist in the
507
+ * schema as a property. The `encoding` field SHALL only apply to [Request Body Objects](#request-body-object), and
508
+ * only when the media type is `multipart` or `application/x-www-form-urlencoded`. If no Encoding Object is provided
509
+ * for a property, the behavior is determined by the default values documented for the Encoding Object.
510
+ */
511
+ encoding?: Record<string, EncodingObject>;
512
+ }
513
+ /**
514
+ * A single encoding definition applied to a single schema property. See [Appendix B](#appendix-b-data-type-conversion)
515
+ * for a discussion of converting values of various types to string representations. Properties are correlated with
516
+ * `multipart` parts using the [`name` parameter](https://www.rfc-editor.org/rfc/rfc7578#section-4.2) of
517
+ * `Content-Disposition: form-data`, and with `application/x-www-form-urlencoded` using the query string parameter
518
+ * names. In both cases, their order is implementation-defined. See [Appendix
519
+ * E](#appendix-e-percent-encoding-and-form-media-types) for a detailed examination of percent-encoding concerns for
520
+ * form media types.
521
+ */
522
+ export interface EncodingObject {
523
+ /**
524
+ * The `Content-Type` for encoding a specific property. The value is a comma-separated list, each element of which is
525
+ * either a specific media type (e.g. `image/png`) or a wildcard media type (e.g. `image/*`). Default value depends on
526
+ * the property type as shown in the table below.
527
+ */
528
+ contentType?: string;
529
+ /**
530
+ * [Reference Object](#reference-object)]
531
+ */
532
+ headers?: Record<string, HeaderObject>;
533
+ /**
534
+ * Describes how a specific property value will be serialized depending on its type. See [Parameter
535
+ * Object](#parameter-object) for details on the [`style`](#parameter-style) field. The behavior follows the same
536
+ * values as `query` parameters, including the default value of `"form"` which applies only when `contentType` is
537
+ * _not_ being used due to one or both of `explode` or `allowReserved` being explicitly specified. Note that the
538
+ * initial `?` used in query strings is not used in `application/x-www-form-urlencoded` message bodies, and MUST be
539
+ * removed (if using an RFC6570 implementation) or simply not added (if constructing the string manually). This field
540
+ * SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded` or
541
+ * `multipart/form-data`. If a value is explicitly defined, then the value of [`contentType`](#encoding-content-type)
542
+ * (implicit or explicit) SHALL be ignored.
543
+ */
544
+ style?: string;
545
+ /**
546
+ * When this is true, property values of type `array` or `object` generate separate parameters for each value of the
547
+ * array, or key-value-pair of the map. For other types of properties this field has no effect. When
548
+ * [`style`](#encoding-style) is `"form"`, the default value is `true`. For all other styles, the default value is
549
+ * `false`. Note that despite `false` being the default for `deepObject`, the combination of `false` with `deepObject`
550
+ * is undefined. This field SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded`
551
+ * or `multipart/form-data`. If a value is explicitly defined, then the value of
552
+ * [`contentType`](#encoding-content-type) (implicit or explicit) SHALL be ignored.
553
+ */
554
+ explode?: boolean;
555
+ /**
556
+ * When this is true, parameter values are serialized using reserved expansion, as defined by
557
+ * [RFC6570](https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.3), which allows [RFC3986's reserved character
558
+ * set](https://datatracker.ietf.org/doc/html/rfc3986#section-2.2), as well as percent-encoded triples, to pass
559
+ * through unchanged, while still percent-encoding all other disallowed characters (including `%` outside of
560
+ * percent-encoded triples). Applications are still responsible for percent-encoding reserved characters that are [not
561
+ * allowed in the query string](https://datatracker.ietf.org/doc/html/rfc3986#section-3.4) (`[`, `]`, `#`), or have a
562
+ * special meaning in `application/x-www-form-urlencoded` (`-`, `&`, `+`); see [URL
563
+ * Percent-Encoding](#url-percent-encoding) for details. The default value is `false`. This field SHALL be ignored if
564
+ * the request body media type is not `application/x-www-form-urlencoded` or `multipart/form-data`. If a value is
565
+ * explicitly defined, then the value of [`contentType`](#encoding-content-type) (implicit or explicit) SHALL be
566
+ * ignored.
567
+ */
568
+ allowReserved?: boolean;
569
+ }
570
+ /**
571
+ * A container for the expected responses of an operation. The container maps a HTTP response code to the expected
572
+ * response. The documentation is not necessarily expected to cover all possible HTTP response codes because they may
573
+ * not be known in advance. However, documentation is expected to cover a successful operation response and any known
574
+ * errors. The `default` MAY be used as a default Response Object for all HTTP codes that are not covered individually
575
+ * by the Responses Object. The Responses Object MUST contain at least one response code, and if only one response code
576
+ * is provided it SHOULD be the response for a successful operation call.
577
+ */
578
+ export interface ResponsesObject {
579
+ /**
580
+ * [Reference Object](#reference-object)
581
+ */
582
+ default?: ResponseObject | ReferenceObject;
583
+ /**
584
+ * Pattern: [HTTP Status Code](#http-status-codes) [Reference Object](#reference-object)
585
+ */
586
+ [pattern: string]: ResponseObject | ReferenceObject | undefined;
587
+ }
588
+ /**
589
+ * Describes a single response from an API operation, including design-time, static `links` to operations based on the
590
+ * response.
591
+ */
592
+ export interface ResponseObject {
593
+ /**
594
+ * A description of the response. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich
595
+ * text representation.
596
+ */
597
+ description: string;
598
+ /**
599
+ * [Reference Object](#reference-object)]
600
+ */
601
+ headers?: Record<string, HeaderObject>;
602
+ /**
603
+ * A map containing descriptions of potential response payloads. The key is a media type or [media type
604
+ * range](https://tools.ietf.org/html/rfc7231#appendix-D) and the value describes it. For responses that match
605
+ * multiple keys, only the most specific key is applicable. e.g. `"text/plain"` overrides `"text/*"`
606
+ */
607
+ content?: Record<string, MediaTypeObject>;
608
+ /**
609
+ * [Reference Object](#reference-object)]
610
+ */
611
+ links?: Record<string, LinkObject>;
612
+ }
613
+ /**
614
+ * A map of possible out-of band callbacks related to the parent operation. Each value in the map is a [Path Item
615
+ * Object](#path-item-object) that describes a set of requests that may be initiated by the API provider and the
616
+ * expected responses. The key value used to identify the Path Item Object is an expression, evaluated at runtime, that
617
+ * identifies a URL to use for the callback operation. To describe incoming requests from the API provider independent
618
+ * from another API call, use the [`webhooks`](#oas-webhooks) field.
619
+ */
620
+ export type CallbackObject = Record<string, PathItemObject>;
621
+ /**
622
+ * An object grouping an internal or external example value with basic `summary` and `description` metadata. This object
623
+ * is typically used in fields named `examples` (plural), and is a [referenceable](#reference-object) alternative to
624
+ * older `example` (singular) fields that do not support referencing or metadata. Examples allow demonstration of the
625
+ * usage of properties, parameters and objects within OpenAPI.
626
+ */
627
+ export interface ExampleObject {
628
+ /**
629
+ * Short description for the example.
630
+ */
631
+ summary?: string;
632
+ /**
633
+ * Long description for the example. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text
634
+ * representation.
635
+ */
636
+ description?: string;
637
+ /**
638
+ * Embedded literal example. The `value` field and `externalValue` field are mutually exclusive. To represent examples
639
+ * of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example,
640
+ * escaping where necessary.
641
+ */
642
+ value?: unknown;
643
+ /**
644
+ * A URI that identifies the literal example. This provides the capability to reference examples that cannot easily be
645
+ * included in JSON or YAML documents. The `value` field and `externalValue` field are mutually exclusive. See the
646
+ * rules for resolving [Relative References](#relative-references-in-api-description-uris).
647
+ */
648
+ externalValue?: string;
649
+ }
650
+ /**
651
+ * The Link Object represents a possible design-time link for a response. The presence of a link does not guarantee the
652
+ * caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between
653
+ * responses and other operations. Unlike _dynamic_ links (i.e. links provided **in** the response payload), the OAS
654
+ * linking mechanism does not require link information in the runtime response. For computing links and providing
655
+ * instructions to execute them, a [runtime expression](#runtime-expressions) is used for accessing values in an
656
+ * operation and using them as parameters while invoking the linked operation.
657
+ */
658
+ export interface LinkObject {
659
+ /**
660
+ * A URI reference to an OAS operation. This field is mutually exclusive of the `operationId` field, and MUST point to
661
+ * an [Operation Object](#operation-object). Relative `operationRef` values MAY be used to locate an existing
662
+ * [Operation Object](#operation-object) in the OpenAPI Description.
663
+ */
664
+ operationRef?: string;
665
+ /**
666
+ * The name of an _existing_, resolvable OAS operation, as defined with a unique `operationId`. This field is mutually
667
+ * exclusive of the `operationRef` field.
668
+ */
669
+ operationId?: string;
670
+ /**
671
+ * [{expression}](#runtime-expressions)]
672
+ */
673
+ parameters?: Record<string, unknown>;
674
+ /**
675
+ * [{expression}](#runtime-expressions)
676
+ */
677
+ requestBody?: unknown;
678
+ /**
679
+ * A description of the link. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text
680
+ * representation.
681
+ */
682
+ description?: string;
683
+ /**
684
+ * A server object to be used by the target operation.
685
+ */
686
+ server?: ServerObject;
687
+ }
688
+ /**
689
+ * Describes a single header for [HTTP responses](#response-headers) and for [individual parts in `multipart`
690
+ * representations](#encoding-headers); see the relevant [Response Object](#response-object) and [Encoding
691
+ * Object](#encoding-object) documentation for restrictions on which headers can be described. The Header Object follows
692
+ * the structure of the [Parameter Object](#parameter-object), including determining its serialization strategy based on
693
+ * whether `schema` or `content` is present, with the following changes:
694
+ *
695
+ * 1. `name` MUST NOT be specified, it is given in the corresponding `headers` map.
696
+ * 2. `in` MUST NOT be specified, it is implicitly in `header`.
697
+ * 3. All traits that are affected by the location MUST be applicable to a location of `header` (for example,
698
+ * [`style`](#parameter-style)). This means that `allowEmptyValue` and `allowReserved` MUST NOT be used, and `style`,
699
+ * if used, MUST be limited to `"simple"`.
700
+ * 4. `name` MUST NOT be specified, it is given in the corresponding `headers` map.
701
+ * 5. `in` MUST NOT be specified, it is implicitly in `header`.
702
+ * 6. All traits that are affected by the location MUST be applicable to a location of `header` (for example,
703
+ * [`style`](#parameter-style)). This means that `allowEmptyValue` and `allowReserved` MUST NOT be used, and `style`,
704
+ * if used, MUST be limited to `"simple"`.
705
+ */
706
+ export interface HeaderObject {
707
+ /**
708
+ * A brief description of the header. This could contain examples of use. [CommonMark
709
+ * syntax](https://spec.commonmark.org/) MAY be used for rich text representation.
710
+ */
711
+ description?: string;
712
+ /**
713
+ * Determines whether this header is mandatory. The default value is `false`.
714
+ */
715
+ required?: boolean;
716
+ /**
717
+ * Specifies that the header is deprecated and SHOULD be transitioned out of usage. Default value is `false`.
718
+ */
719
+ deprecated?: boolean;
720
+ /**
721
+ * Describes how the header value will be serialized. The default (and only legal value for headers) is `"simple"`.
722
+ */
723
+ style?: 'simple';
724
+ /**
725
+ * When this is true, header values of type `array` or `object` generate a single header whose value is a
726
+ * comma-separated list of the array items or key-value pairs of the map, see [Style Examples](#style-examples). For
727
+ * other data types this field has no effect. The default value is `false`.
728
+ */
729
+ explode?: boolean;
730
+ /**
731
+ * The schema defining the type used for the header.
732
+ */
733
+ schema?: SchemaObject;
734
+ /**
735
+ * Example of the header's potential value; see [Working With Examples](#working-with-examples).
736
+ */
737
+ example?: unknown;
738
+ /**
739
+ * [Reference Object](#reference-object)]
740
+ */
741
+ examples?: Record<string, ExampleObject>;
742
+ /**
743
+ * A map containing the representations for the header. The key is the media type and the value describes it. The map
744
+ * MUST only contain one entry.
745
+ */
746
+ content?: Record<string, MediaTypeObject>;
747
+ }
748
+ /**
749
+ * Adds metadata to a single tag that is used by the [Operation Object](#operation-object). It is not mandatory to have
750
+ * a Tag Object per tag defined in the Operation Object instances.
751
+ */
752
+ export interface TagObject {
753
+ /**
754
+ * The name of the tag.
755
+ */
756
+ name: string;
757
+ /**
758
+ * A description for the tag. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text
759
+ * representation.
760
+ */
761
+ description?: string;
762
+ /**
763
+ * Additional external documentation for this tag.
764
+ */
765
+ externalDocs?: ExternalDocumentationObject;
766
+ }
767
+ /**
768
+ * A simple object to allow referencing other components in the OpenAPI Description, internally and externally. The
769
+ * `$ref` string value contains a URI [RFC3986](https://tools.ietf.org/html/rfc3986), which identifies the value being
770
+ * referenced. See the rules for resolving [Relative References](#relative-references-in-api-description-uris).
771
+ */
772
+ export interface ReferenceObject {
773
+ /**
774
+ * The reference identifier. This MUST be in the form of a URI.
775
+ */
776
+ $ref: string;
777
+ /**
778
+ * A short summary which by default SHOULD override that of the referenced component. If the referenced object-type
779
+ * does not allow a `summary` field, then this field has no effect.
780
+ */
781
+ summary?: string;
782
+ /**
783
+ * A description which by default SHOULD override that of the referenced component. [CommonMark
784
+ * syntax](https://spec.commonmark.org/) MAY be used for rich text representation. If the referenced object-type does
785
+ * not allow a `description` field, then this field has no effect.
786
+ */
787
+ description?: string;
788
+ }
789
+ /**
790
+ * The Schema Object allows the definition of input and output data types. These types can be objects, but also
791
+ * primitives and arrays. This object is a superset of the [JSON Schema Specification Draft
792
+ * 2020-12](https://tools.ietf.org/html/draft-bhutton-json-schema-00). The empty schema (which allows any instance to
793
+ * validate) MAY be represented by the boolean value `true` and a schema which allows no instance to validate MAY be
794
+ * represented by the boolean value `false`. For more information about the keywords, see [JSON Schema
795
+ * Core](https://tools.ietf.org/html/draft-bhutton-json-schema-00) and [JSON Schema
796
+ * Validation](https://tools.ietf.org/html/draft-bhutton-json-schema-validation-00). Unless stated otherwise, the
797
+ * keyword definitions follow those of JSON Schema and do not add any additional semantics; this includes keywords such
798
+ * as `$schema`, `$id`, `$ref`, and `$dynamicRef` being URIs rather than URLs. Where JSON Schema indicates that behavior
799
+ * is defined by the application (e.g. for annotations), OAS also defers the definition of semantics to the application
800
+ * consuming the OpenAPI document.
801
+ */
802
+ export type SchemaObject = JSONSchema & {
803
+ /**
804
+ * Adds support for polymorphism. The discriminator is used to determine which of a set of schemas a payload is
805
+ * expected to satisfy. See [Composition and Inheritance](#composition-and-inheritance-polymorphism) for more
806
+ * details.
807
+ */
808
+ discriminator?: DiscriminatorObject;
809
+ /**
810
+ * This MAY be used only on property schemas. It has no effect on root schemas. Adds additional metadata to describe
811
+ * the XML representation of this property.
812
+ */
813
+ xml?: XMLObject;
814
+ /**
815
+ * Additional external documentation for this schema.
816
+ */
817
+ externalDocs?: ExternalDocumentationObject;
818
+ /**
819
+ * A free-form field to include an example of an instance for this schema. To represent examples that cannot be
820
+ * naturally represented in JSON or YAML, a string value can be used to contain the example with escaping where
821
+ * necessary. **Deprecated:** The `example` field has been deprecated in favor of the JSON Schema `examples` keyword.
822
+ * Use of `example` is discouraged, and later versions of this specification may remove it.
823
+ */
824
+ example?: unknown;
825
+ };
826
+ /**
827
+ * When request bodies or response payloads may be one of a number of different schemas, a Discriminator Object gives a
828
+ * hint about the expected schema of the document. This hint can be used to aid in serialization, deserialization, and
829
+ * validation. The Discriminator Object does this by implicitly or explicitly associating the possible values of a named
830
+ * property with alternative schemas. Note that `discriminator` MUST NOT change the validation outcome of the schema.
831
+ */
832
+ export interface DiscriminatorObject {
833
+ /**
834
+ * The name of the property in the payload that will hold the discriminating value. This property SHOULD
835
+ * be required in the payload schema, as the behavior when the property is absent is undefined.
836
+ */
837
+ propertyName: string;
838
+ /**
839
+ * An object to hold mappings between payload values and schema names or URI references.
840
+ */
841
+ mapping?: Record<string, string>;
842
+ }
843
+ /**
844
+ * A metadata object that allows for more fine-tuned XML model definitions. When using arrays, XML element names are
845
+ * _not_ inferred (for singular/plural forms) and the `name` field SHOULD be used to add that information. See examples
846
+ * for expected behavior.
847
+ */
848
+ export interface XMLObject {
849
+ /**
850
+ * Replaces the inferred name of the element/attribute used for the described schema property. For the root schema
851
+ * object of a [schema component](#components-schemas), the inferred name is the name of the component; for other
852
+ * schemas the name is inferred from the parent property name. When defined within `items`, it will affect the name of
853
+ * the individual XML elements within the list. When defined alongside `type` being `"array"` (outside the `items`),
854
+ * it will affect the wrapping element if and only if `wrapped` is `true`. If `wrapped` is `false`, it will be
855
+ * ignored.
856
+ */
857
+ name?: string;
858
+ /**
859
+ * The URI of the namespace definition. Value MUST be in the form of a non-relative URI.
860
+ */
861
+ namespace?: string;
862
+ /**
863
+ * The prefix to be used for the [name](#xml-name).
864
+ */
865
+ prefix?: string;
866
+ /**
867
+ * Declares whether the property definition translates to an attribute instead of an element. Default value is
868
+ * `false`.
869
+ */
870
+ attribute?: boolean;
871
+ /**
872
+ * MAY be used only for an array definition. Signifies whether the array is wrapped (for example, `) or unwrapped (`).
873
+ * Default value is `false`. The definition takes effect only when defined alongside `type` being `"array"` (outside
874
+ * the `items`).
875
+ */
876
+ wrapped?: boolean;
877
+ }
878
+ /**
879
+ * Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key
880
+ * (either as a header, a cookie parameter or as a query parameter), mutual TLS (use of a client certificate), OAuth2's
881
+ * common flows (implicit, password, client credentials and authorization code) as defined in
882
+ * [RFC6749](https://tools.ietf.org/html/rfc6749), and [[OpenID-Connect-Core]]. Please note that as of 2020, the
883
+ * implicit flow is about to be deprecated by [OAuth 2.0 Security Best Current
884
+ * Practice](https://tools.ietf.org/html/draft-ietf-oauth-security-topics). Recommended for most use cases is
885
+ * Authorization Code Grant flow with PKCE.
886
+ */
887
+ /**
888
+ * Allows configuration of the supported OAuth Flows.
889
+ */
890
+ export interface OAuthFlowsObject {
891
+ /**
892
+ * Configuration for the OAuth Implicit flow
893
+ */
894
+ implicit?: ImplicitOAuthFlowObject;
895
+ /**
896
+ * Configuration for the OAuth Resource Owner Password flow
897
+ */
898
+ password?: PasswordOAuthFlowObject;
899
+ /**
900
+ * Configuration for the OAuth Client Credentials flow. Previously called `application` in OpenAPI 2.0.
901
+ */
902
+ clientCredentials?: ClientCredentialsOAuthFlowObject;
903
+ /**
904
+ * Configuration for the OAuth Authorization Code flow. Previously called `accessCode` in OpenAPI 2.0.
905
+ */
906
+ authorizationCode?: AuthorizationCodeOAuthFlowObject;
907
+ }
908
+ /**
909
+ * Configuration details for a supported OAuth Flow
910
+ */
911
+ export interface OAuthFlowObject {
912
+ /**
913
+ * The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the
914
+ * use of TLS. Applies To:
915
+ *
916
+ * - Implicit
917
+ * - AuthorizationCode
918
+ */
919
+ authorizationUrl?: string;
920
+ /**
921
+ * The device authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard
922
+ * requires the use of TLS. Applies To:
923
+ *
924
+ * - Password
925
+ * - ClientCredentials
926
+ * - AuthorizationCode
927
+ */
928
+ tokenUrl?: string;
929
+ /**
930
+ * The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires
931
+ * the use of TLS.
932
+ */
933
+ refreshUrl?: string;
934
+ /**
935
+ * The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it.
936
+ * The map MAY be empty.
937
+ */
938
+ scopes: Record<string, string>;
939
+ }
940
+ export interface ImplicitOAuthFlowObject extends OAuthFlowObject {
941
+ authorizationUrl: string;
942
+ }
943
+ export interface AuthorizationCodeOAuthFlowObject extends OAuthFlowObject {
944
+ authorizationUrl: string;
945
+ tokenUrl: string;
946
+ }
947
+ export interface PasswordOAuthFlowObject extends OAuthFlowObject {
948
+ tokenUrl: string;
949
+ }
950
+ export interface ClientCredentialsOAuthFlowObject extends OAuthFlowObject {
951
+ tokenUrl: string;
952
+ }
953
+ /**
954
+ * Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a
955
+ * security scheme declared in the [Security Schemes](#components-security-schemes) under the [Components
956
+ * Object](#components-object). A Security Requirement Object MAY refer to multiple security schemes in which case all
957
+ * schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query
958
+ * parameters or HTTP headers are required to convey security information. When the `security` field is defined on the
959
+ * [OpenAPI Object](#openapi-object) or [Operation Object](#operation-object) and contains multiple Security Requirement
960
+ * Objects, only one of the entries in the list needs to be satisfied to authorize the request. This enables support for
961
+ * scenarios where the API allows multiple, independent security schemes. An empty Security Requirement Object (`{}`)
962
+ * indicates anonymous access is supported.
963
+ */
964
+ export type SecurityRequirementObject = Record<string, string[]>;
965
+ export type SecuritySchemeObject = HttpSecurityScheme | ApiKeySecurityScheme | OAuth2SecurityScheme | OpenIdSecurityScheme;
966
+ interface SecuritySchemeBase {
967
+ description?: string;
968
+ deprecated?: boolean;
969
+ }
970
+ export interface HttpSecurityScheme extends SecuritySchemeBase {
971
+ type: 'http';
972
+ /**
973
+ * The name of the HTTP Authentication scheme to be used in the Authorization header as defined in [RFC9110] Section
974
+ * 16.4.1. The values used SHOULD be registered in the IANA Authentication Scheme registry. The value is
975
+ * case-insensitive, as defined in [RFC9110] Section 11.1.
976
+ */
977
+ scheme: 'Basic' | 'Bearer' | string;
978
+ /**
979
+ * A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an
980
+ * authorization server, so this information is primarily for documentation purposes.
981
+ */
982
+ bearerFormat?: string;
983
+ }
984
+ export interface ApiKeySecurityScheme extends SecuritySchemeBase {
985
+ type: 'apiKey';
986
+ /**
987
+ * The name of the header, query or cookie parameter to be used.
988
+ */
989
+ name: string;
990
+ /**
991
+ * The location of the API key.
992
+ */
993
+ in: 'query' | 'header' | 'cookie';
994
+ }
995
+ export interface OAuth2SecurityScheme extends SecuritySchemeBase {
996
+ type: 'oauth2';
997
+ /**
998
+ * An object containing configuration information for the flow types supported.
999
+ */
1000
+ flows: OAuthFlowsObject;
1001
+ }
1002
+ export interface OpenIdSecurityScheme extends SecuritySchemeBase {
1003
+ type: 'openIdConnect';
1004
+ /**
1005
+ * OpenID Connect Discovery URL as defined by [OpenID-Connect-Discovery-1.0].
1006
+ */
1007
+ openIdConnectUrl: string;
1008
+ }
1009
+ export {};
1010
+ //# sourceMappingURL=types.d.ts.map