@api-client/core 0.19.18 → 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 (154) 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/browser.d.ts +1 -1
  4. package/build/src/browser.d.ts.map +1 -1
  5. package/build/src/browser.js.map +1 -1
  6. package/build/src/index.d.ts +1 -1
  7. package/build/src/index.d.ts.map +1 -1
  8. package/build/src/index.js.map +1 -1
  9. package/build/src/mocking/lib/Organization.d.ts +5 -1
  10. package/build/src/mocking/lib/Organization.d.ts.map +1 -1
  11. package/build/src/mocking/lib/Organization.js +17 -0
  12. package/build/src/mocking/lib/Organization.js.map +1 -1
  13. package/build/src/modeling/ApiModel.d.ts +16 -5
  14. package/build/src/modeling/ApiModel.d.ts.map +1 -1
  15. package/build/src/modeling/ApiModel.js +17 -2
  16. package/build/src/modeling/ApiModel.js.map +1 -1
  17. package/build/src/modeling/ApiValidation.d.ts.map +1 -1
  18. package/build/src/modeling/ApiValidation.js +2 -1
  19. package/build/src/modeling/ApiValidation.js.map +1 -1
  20. package/build/src/modeling/DomainProperty.d.ts +12 -0
  21. package/build/src/modeling/DomainProperty.d.ts.map +1 -1
  22. package/build/src/modeling/DomainProperty.js +23 -28
  23. package/build/src/modeling/DomainProperty.js.map +1 -1
  24. package/build/src/modeling/DomainSerialization.js +1 -1
  25. package/build/src/modeling/DomainSerialization.js.map +1 -1
  26. package/build/src/modeling/ExposedEntity.d.ts +15 -1
  27. package/build/src/modeling/ExposedEntity.d.ts.map +1 -1
  28. package/build/src/modeling/ExposedEntity.js +42 -4
  29. package/build/src/modeling/ExposedEntity.js.map +1 -1
  30. package/build/src/modeling/actions/Action.d.ts.map +1 -1
  31. package/build/src/modeling/actions/Action.js +1 -0
  32. package/build/src/modeling/actions/Action.js.map +1 -1
  33. package/build/src/modeling/actions/ListAction.d.ts +3 -17
  34. package/build/src/modeling/actions/ListAction.d.ts.map +1 -1
  35. package/build/src/modeling/actions/ListAction.js +18 -38
  36. package/build/src/modeling/actions/ListAction.js.map +1 -1
  37. package/build/src/modeling/actions/SearchAction.d.ts +4 -4
  38. package/build/src/modeling/actions/SearchAction.d.ts.map +1 -1
  39. package/build/src/modeling/actions/SearchAction.js +16 -13
  40. package/build/src/modeling/actions/SearchAction.js.map +1 -1
  41. package/build/src/modeling/generators/oas_312/OasGenerator.d.ts +32 -0
  42. package/build/src/modeling/generators/oas_312/OasGenerator.d.ts.map +1 -0
  43. package/build/src/modeling/generators/oas_312/OasGenerator.js +1452 -0
  44. package/build/src/modeling/generators/oas_312/OasGenerator.js.map +1 -0
  45. package/build/src/modeling/generators/oas_312/OasSchemaGenerator.d.ts +27 -0
  46. package/build/src/modeling/generators/oas_312/OasSchemaGenerator.d.ts.map +1 -0
  47. package/build/src/modeling/generators/oas_312/OasSchemaGenerator.js +295 -0
  48. package/build/src/modeling/generators/oas_312/OasSchemaGenerator.js.map +1 -0
  49. package/build/src/modeling/generators/oas_312/types.d.ts +1010 -0
  50. package/build/src/modeling/generators/oas_312/types.d.ts.map +1 -0
  51. package/build/src/modeling/generators/oas_312/types.js +2 -0
  52. package/build/src/modeling/generators/oas_312/types.js.map +1 -0
  53. package/build/src/modeling/generators/oas_320/OasGenerator.d.ts +16 -0
  54. package/build/src/modeling/generators/oas_320/OasGenerator.d.ts.map +1 -0
  55. package/build/src/modeling/generators/oas_320/OasGenerator.js +306 -0
  56. package/build/src/modeling/generators/oas_320/OasGenerator.js.map +1 -0
  57. package/build/src/modeling/generators/oas_320/OasSchemaGenerator.d.ts +25 -0
  58. package/build/src/modeling/generators/oas_320/OasSchemaGenerator.d.ts.map +1 -0
  59. package/build/src/modeling/generators/oas_320/OasSchemaGenerator.js +237 -0
  60. package/build/src/modeling/generators/oas_320/OasSchemaGenerator.js.map +1 -0
  61. package/build/src/modeling/generators/oas_320/types.d.ts +1219 -0
  62. package/build/src/modeling/generators/oas_320/types.d.ts.map +1 -0
  63. package/build/src/modeling/generators/oas_320/types.js +2 -0
  64. package/build/src/modeling/generators/oas_320/types.js.map +1 -0
  65. package/build/src/modeling/types.d.ts +50 -13
  66. package/build/src/modeling/types.d.ts.map +1 -1
  67. package/build/src/modeling/types.js.map +1 -1
  68. package/build/src/modeling/validation/api_model_rules.d.ts +1 -0
  69. package/build/src/modeling/validation/api_model_rules.d.ts.map +1 -1
  70. package/build/src/modeling/validation/api_model_rules.js +105 -29
  71. package/build/src/modeling/validation/api_model_rules.js.map +1 -1
  72. package/build/src/models/ProjectRequest.d.ts.map +1 -1
  73. package/build/src/models/ProjectRequest.js +0 -4
  74. package/build/src/models/ProjectRequest.js.map +1 -1
  75. package/build/src/models/store/Organization.d.ts +13 -0
  76. package/build/src/models/store/Organization.d.ts.map +1 -1
  77. package/build/src/models/store/Organization.js.map +1 -1
  78. package/build/src/models/transformers/ArcDexieTransformer.d.ts.map +1 -1
  79. package/build/src/models/transformers/ArcDexieTransformer.js +0 -4
  80. package/build/src/models/transformers/ArcDexieTransformer.js.map +1 -1
  81. package/build/src/models/transformers/ImportUtils.js +1 -1
  82. package/build/src/models/transformers/ImportUtils.js.map +1 -1
  83. package/build/src/models/transformers/PostmanBackupTransformer.d.ts.map +1 -1
  84. package/build/src/models/transformers/PostmanBackupTransformer.js +0 -4
  85. package/build/src/models/transformers/PostmanBackupTransformer.js.map +1 -1
  86. package/build/src/runtime/constants.d.ts +7 -0
  87. package/build/src/runtime/constants.d.ts.map +1 -0
  88. package/build/src/runtime/constants.js +8 -0
  89. package/build/src/runtime/constants.js.map +1 -0
  90. package/build/src/runtime/http-engine/ntlm/Des.d.ts.map +1 -1
  91. package/build/src/runtime/http-engine/ntlm/Des.js +1 -0
  92. package/build/src/runtime/http-engine/ntlm/Des.js.map +1 -1
  93. package/build/src/runtime/variables/EvalFunctions.d.ts.map +1 -1
  94. package/build/src/runtime/variables/EvalFunctions.js +0 -1
  95. package/build/src/runtime/variables/EvalFunctions.js.map +1 -1
  96. package/build/src/sdk/OrganizationsSdk.d.ts +17 -1
  97. package/build/src/sdk/OrganizationsSdk.d.ts.map +1 -1
  98. package/build/src/sdk/OrganizationsSdk.js +76 -0
  99. package/build/src/sdk/OrganizationsSdk.js.map +1 -1
  100. package/build/src/sdk/RouteBuilder.d.ts +2 -0
  101. package/build/src/sdk/RouteBuilder.d.ts.map +1 -1
  102. package/build/src/sdk/RouteBuilder.js +6 -0
  103. package/build/src/sdk/RouteBuilder.js.map +1 -1
  104. package/build/src/sdk/SdkMock.d.ts +12 -0
  105. package/build/src/sdk/SdkMock.d.ts.map +1 -1
  106. package/build/src/sdk/SdkMock.js +32 -0
  107. package/build/src/sdk/SdkMock.js.map +1 -1
  108. package/build/tsconfig.tsbuildinfo +1 -1
  109. package/eslint.config.js +6 -0
  110. package/package.json +3 -1
  111. package/src/authorization/Utils.ts +3 -3
  112. package/src/mocking/lib/Organization.ts +22 -1
  113. package/src/modeling/ApiModel.ts +23 -8
  114. package/src/modeling/ApiValidation.ts +2 -0
  115. package/src/modeling/DomainProperty.ts +22 -18
  116. package/src/modeling/DomainSerialization.ts +1 -1
  117. package/src/modeling/ExposedEntity.ts +44 -4
  118. package/src/modeling/actions/Action.ts +1 -0
  119. package/src/modeling/actions/ListAction.ts +12 -30
  120. package/src/modeling/actions/SearchAction.ts +11 -8
  121. package/src/modeling/generators/oas_312/OasGenerator.ts +1685 -0
  122. package/src/modeling/generators/oas_312/OasSchemaGenerator.ts +322 -0
  123. package/src/modeling/generators/oas_312/types.ts +1052 -0
  124. package/src/modeling/generators/oas_320/OasGenerator.ts +359 -0
  125. package/src/modeling/generators/oas_320/OasSchemaGenerator.ts +255 -0
  126. package/src/modeling/generators/oas_320/types.ts +1259 -0
  127. package/src/modeling/types.ts +55 -22
  128. package/src/modeling/validation/api_model_rules.ts +103 -32
  129. package/src/models/ProjectRequest.ts +0 -4
  130. package/src/models/store/Organization.ts +14 -0
  131. package/src/models/transformers/ArcDexieTransformer.ts +0 -4
  132. package/src/models/transformers/ImportUtils.ts +1 -1
  133. package/src/models/transformers/PostmanBackupTransformer.ts +0 -5
  134. package/src/runtime/constants.ts +9 -0
  135. package/src/runtime/http-engine/ntlm/Des.ts +1 -0
  136. package/src/runtime/variables/EvalFunctions.ts +0 -1
  137. package/src/sdk/OrganizationsSdk.ts +81 -1
  138. package/src/sdk/RouteBuilder.ts +8 -0
  139. package/src/sdk/SdkMock.ts +50 -0
  140. package/tests/test-utils.ts +6 -2
  141. package/tests/unit/decorators/observed.spec.ts +8 -24
  142. package/tests/unit/decorators/observed_recursive.spec.ts +0 -1
  143. package/tests/unit/events/EventsTestHelpers.ts +0 -1
  144. package/tests/unit/events/events_polyfills.ts +0 -1
  145. package/tests/unit/legacy-transformers/DataTestHelper.ts +0 -2
  146. package/tests/unit/legacy-transformers/LegacyExportProcessor.spec.ts +0 -1
  147. package/tests/unit/modeling/actions/ListAction.spec.ts +9 -69
  148. package/tests/unit/modeling/actions/SearchAction.spec.ts +9 -35
  149. package/tests/unit/modeling/api_model.spec.ts +28 -0
  150. package/tests/unit/modeling/definitions/sku.spec.ts +0 -2
  151. package/tests/unit/modeling/domain_property.spec.ts +20 -1
  152. package/tests/unit/modeling/exposed_entity.spec.ts +71 -0
  153. package/tests/unit/modeling/generators/OasGenerator.spec.ts +302 -0
  154. package/tests/unit/modeling/validation/api_model_rules.spec.ts +113 -15
@@ -0,0 +1,1219 @@
1
+ import { type JSONSchema } from 'json-schema-typed/draft-2020-12';
2
+ /**
3
+ * This is the root object of the [OpenAPI Description](#openapi-description-structure).
4
+ */
5
+ export interface OpenApi320 {
6
+ /**
7
+ * This string MUST be the [version number](#versions-and-deprecation) 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 describes the OpenAPI document's version.
10
+ */
11
+ openapi: '3.2.0';
12
+ /**
13
+ * This string MUST be in the form of a URI reference as defined by [[RFC3986]] [Section
14
+ * 4.1](https://www.rfc-editor.org/rfc/rfc3986#section-4.1). The `$self` field provides the self-assigned URI of this
15
+ * document, which also serves as its base URI in accordance with [[RFC3986]] [Section
16
+ * 5.1.1](https://www.rfc-editor.org/rfc/rfc3986#section-5.1.1). Implementations MUST support identifying the targets
17
+ * of [API description URIs](#relative-references-in-api-description-uris) using the URI defined by this field when it
18
+ * is present. See [Establishing the Base URI](#establishing-the-base-uri) for the base URI behavior when `$self` is
19
+ * absent or relative, and see [Appendix F](#appendix-f-examples-of-base-uri-determination-and-reference-resolution)
20
+ * for examples of using `$self` to resolve references.
21
+ */
22
+ $self?: string;
23
+ /**
24
+ * Provides metadata about the API. The metadata MAY be used by tooling as required.
25
+ */
26
+ info: InfoObject;
27
+ /**
28
+ * The default value for the `$schema` keyword within [Schema Objects](#schema-object) contained within this OAS
29
+ * document. This MUST be in the form of a URI.
30
+ */
31
+ jsonSchemaDialect?: string;
32
+ /**
33
+ * An array of Server Objects, which provide connectivity information to a target server. If the `servers` field is
34
+ * not provided, or is an empty array, the default value would be an array consisting of a single [Server
35
+ * Object](#server-object) with a [url](#server-url) value of `/`.
36
+ */
37
+ servers?: ServerObject[];
38
+ /**
39
+ * The available paths and operations for the API.
40
+ */
41
+ paths?: PathsObject;
42
+ /**
43
+ * The incoming webhooks that MAY be received as part of this API and that the API consumer MAY choose to implement.
44
+ * Closely related to the `callbacks` feature, this section describes requests initiated other than by an API call,
45
+ * for example by an out of band registration. The key name is a unique string to refer to each webhook, while the
46
+ * (optionally referenced) Path Item Object describes a request that may be initiated by the API provider and the
47
+ * expected responses. An [example](https://learn.openapis.org/examples/v3.1/webhook-example.html) is available.
48
+ */
49
+ webhooks?: Record<string, PathItemObject>;
50
+ /**
51
+ * An element to hold various Objects for the OpenAPI Description.
52
+ */
53
+ components?: ComponentsObject;
54
+ /**
55
+ * A declaration of which security mechanisms can be used across the API. The list of values includes alternative
56
+ * Security Requirement Objects that can be used. Only one of the Security Requirement Objects need to be satisfied to
57
+ * authorize a request. Individual operations can override this definition. The list can be incomplete, up to being
58
+ * empty or absent. To make security explicitly optional, an empty security requirement (`{}`) can be included in the
59
+ * array.
60
+ */
61
+ security?: SecurityRequirementObject[];
62
+ /**
63
+ * A list of tags used by the OpenAPI Description with additional metadata. The order of the tags can be used to
64
+ * reflect on their order by the parsing tools. Not all tags that are used by the [Operation
65
+ * Object](#operation-object) must be declared. The tags that are not declared MAY be organized randomly or based on
66
+ * the tools' logic. Each tag name in the list MUST be unique.
67
+ */
68
+ tags?: TagObject[];
69
+ /**
70
+ * Additional external documentation.
71
+ */
72
+ externalDocs?: ExternalDocumentationObject;
73
+ }
74
+ /**
75
+ * The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented
76
+ * in editing or documentation generation tools for convenience.
77
+ */
78
+ export interface InfoObject {
79
+ /**
80
+ * The title of the API.
81
+ */
82
+ title: string;
83
+ /**
84
+ * A short summary of the API.
85
+ */
86
+ summary?: string;
87
+ /**
88
+ * A description of the API. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text
89
+ * representation.
90
+ */
91
+ description?: string;
92
+ /**
93
+ * A URI for the Terms of Service for the API. This MUST be in the form of a URI.
94
+ */
95
+ termsOfService?: string;
96
+ /**
97
+ * The contact information for the exposed API.
98
+ */
99
+ contact?: ContactObject;
100
+ /**
101
+ * The license information for the exposed API.
102
+ */
103
+ license?: LicenseObject;
104
+ /**
105
+ * The version of the OpenAPI document (which is distinct from the [OpenAPI Specification version](#oas-version) or
106
+ * the version of the API being described or the version of the OpenAPI Description).
107
+ */
108
+ version: string;
109
+ }
110
+ /**
111
+ * Contact information for the exposed API.
112
+ */
113
+ export interface ContactObject {
114
+ /**
115
+ * The identifying name of the contact person/organization.
116
+ */
117
+ name?: string;
118
+ /**
119
+ * The URI for the contact information. This MUST be in the form of a URI.
120
+ */
121
+ url?: string;
122
+ /**
123
+ * The email address of the contact person/organization. This MUST be in the form of an email address.
124
+ */
125
+ email?: string;
126
+ }
127
+ /**
128
+ * License information for the exposed API.
129
+ */
130
+ export interface LicenseObject {
131
+ /**
132
+ * The license name used for the API.
133
+ */
134
+ name: string;
135
+ /**
136
+ * An [SPDX](https://spdx.org/licenses/) license expression for the API. The `identifier` field is mutually exclusive
137
+ * of the `url` field.
138
+ */
139
+ identifier?: string;
140
+ /**
141
+ * 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
142
+ * the `identifier` field.
143
+ */
144
+ url?: string;
145
+ }
146
+ /**
147
+ * An object representing a Server.
148
+ */
149
+ export interface ServerObject {
150
+ /**
151
+ * A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host
152
+ * location is relative to the location where the document containing the Server Object is being served. Query and
153
+ * fragment MUST NOT be part of this URL. Variable substitutions will be made when a variable is named in
154
+ * `{`braces`}`.
155
+ */
156
+ url: string;
157
+ /**
158
+ * An optional string describing the host designated by the URL. [CommonMark syntax](https://spec.commonmark.org/) MAY
159
+ * be used for rich text representation.
160
+ */
161
+ description?: string;
162
+ /**
163
+ * An optional unique string to refer to the host designated by the URL.
164
+ */
165
+ name?: string;
166
+ /**
167
+ * A map between a variable name and its value. The value is used for substitution in the server's URL template.
168
+ */
169
+ variables?: Record<string, ServerVariableObject>;
170
+ }
171
+ /**
172
+ * An object representing a Server Variable for server URL template substitution. The server URL templating is defined
173
+ * by the following [ABNF](https://tools.ietf.org/html/rfc5234) syntax.
174
+ *
175
+ * ```abnf
176
+ * server-url-template = 1*( literals / server-variable )
177
+ * server-variable = "{" server-variable-name "}"
178
+ * server-variable-name = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every Unicode character except { and }
179
+ * literals = 1*( %x21 / %x23-24 / %x26-3B / %x3D / %x3F-5B
180
+ * / %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate
181
+ * / pct-encoded)
182
+ * ; any Unicode character except: CTL, SP,
183
+ * ; DQUOTE, "%" (aside from pct-encoded),
184
+ * ; "<", ">", "\", "^", "`", "{", "|", "}"
185
+ * pct-encoded = "%" HEXDIG HEXDIG
186
+ * ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF
187
+ * / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD
188
+ * / %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD
189
+ * / %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD
190
+ * / %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD
191
+ * / %xD0000-DFFFD / %xE1000-EFFFD
192
+ * iprivate = %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD
193
+ * ```
194
+ *
195
+ * Here, `literals`, `pct-encoded`, `ucschar` and `iprivate` definitions are taken from [RFC
196
+ * 6570](https://www.rfc-editor.org/rfc/rfc6570), incorporating the corrections specified in [Errata
197
+ * 6937](https://www.rfc-editor.org/errata/eid6937) for `literals`. Each server variable MUST NOT appear more than once
198
+ * in the URL template. See the [Paths Object](#paths-object) for guidance on constructing full request URLs.
199
+ *
200
+ * ```abnf
201
+ * server-url-template = 1*( literals / server-variable )
202
+ * server-variable = "{" server-variable-name "}"
203
+ * server-variable-name = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every Unicode character except { and }
204
+ * literals = 1*( %x21 / %x23-24 / %x26-3B / %x3D / %x3F-5B
205
+ * / %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate
206
+ * / pct-encoded)
207
+ * ; any Unicode character except: CTL, SP,
208
+ * ; DQUOTE, "%" (aside from pct-encoded),
209
+ * ; "<", ">", "\", "^", "`", "{", "|", "}"
210
+ * pct-encoded = "%" HEXDIG HEXDIG
211
+ * ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF
212
+ * / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD
213
+ * / %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD
214
+ * / %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD
215
+ * / %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD
216
+ * / %xD0000-DFFFD / %xE1000-EFFFD
217
+ * iprivate = %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD
218
+ * ```
219
+ */
220
+ export interface ServerVariableObject {
221
+ /**
222
+ * An enumeration of string values to be used if the substitution options are from a limited set. The array MUST NOT
223
+ * be empty.
224
+ */
225
+ enum?: string[];
226
+ /**
227
+ * The default value to use for substitution, which SHALL be sent if an alternate value is not_supplied. If the
228
+ * [`enum`](#server-variable-enum) is defined, the value MUST exist in the enum's values. Note that this behavior is
229
+ * different from the [Schema Object](#schema-object)'s `default` keyword, which documents the receiver's behavior
230
+ * rather than inserting the value into the data.
231
+ */
232
+ default: string;
233
+ /**
234
+ * An optional description for the server variable. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for
235
+ * rich text representation.
236
+ */
237
+ description?: string;
238
+ }
239
+ /**
240
+ * Holds a set of reusable objects for different aspects of the OAS. All objects defined within the Components Object
241
+ * will have no effect on the API unless they are explicitly referenced from outside the Components Object.
242
+ */
243
+ export interface ComponentsObject {
244
+ /**
245
+ * An object to hold reusable [Schema Objects](#schema-object).
246
+ */
247
+ schemas?: Record<string, SchemaObject>;
248
+ /**
249
+ * [Reference Object](#reference-object)]
250
+ */
251
+ responses?: Record<string, ResponseObject>;
252
+ /**
253
+ * [Reference Object](#reference-object)]
254
+ */
255
+ parameters?: Record<string, ParameterObject>;
256
+ /**
257
+ * [Reference Object](#reference-object)]
258
+ */
259
+ examples?: Record<string, ExampleObject>;
260
+ /**
261
+ * [Reference Object](#reference-object)]
262
+ */
263
+ requestBodies?: Record<string, RequestBodyObject>;
264
+ /**
265
+ * [Reference Object](#reference-object)]
266
+ */
267
+ headers?: Record<string, HeaderObject>;
268
+ /**
269
+ * [Reference Object](#reference-object)]
270
+ */
271
+ securitySchemes?: Record<string, SecuritySchemeObject | ReferenceObject>;
272
+ /**
273
+ * [Reference Object](#reference-object)]
274
+ */
275
+ links?: Record<string, LinkObject>;
276
+ /**
277
+ * [Reference Object](#reference-object)]
278
+ */
279
+ callbacks?: Record<string, CallbackObject>;
280
+ /**
281
+ * An object to hold reusable [Path Item Objects](#path-item-object).
282
+ */
283
+ pathItems?: Record<string, PathItemObject>;
284
+ /**
285
+ * [Reference Object](#reference-object)]
286
+ */
287
+ mediaTypes?: Record<string, MediaTypeObject>;
288
+ }
289
+ /**
290
+ * Holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the
291
+ * [Server Object](#server-object) in order to construct the full URL. The Paths Object MAY be empty, due to [Access
292
+ * Control List (ACL) constraints](#security-filtering). The key has a pattern: `/{path}`. A relative path to an
293
+ * individual endpoint. The field name MUST begin with a forward slash (`/`). The URL from the [Server
294
+ * Object](#server-object)'s `url` field, resolved and with template variables substituted, has the path **appended**
295
+ * (no relative URL resolution) to it in order to construct the full URL. [Path templating](#path-templating) is
296
+ * allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts.
297
+ * Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case
298
+ * of ambiguous matching, it's up to the tooling to decide which one to use.
299
+ */
300
+ export type PathsObject = Record<string, PathItemObject>;
301
+ /**
302
+ * Describes the operations available on a single path. A Path Item MAY be empty, due to [ACL
303
+ * constraints](#security-filtering). The path itself is still exposed to the documentation viewer but they will not
304
+ * know which operations and parameters are available.
305
+ */
306
+ export interface PathItemObject {
307
+ /**
308
+ * Allows for a referenced definition of this path item. The value MUST be in the form of a URI, and the referenced
309
+ * structure MUST be in the form of a [Path Item Object](#path-item-object). In case a Path Item Object field appears
310
+ * both in the defined object and the referenced object, the behavior is undefined. See the rules for resolving
311
+ * [Relative References](#relative-references-in-api-description-uris). _**Note:** The behavior of `$ref` with
312
+ * adjacent properties is likely to change in future versions of this specification to bring it into closer alignment
313
+ * with the behavior of the [Reference Object](#reference-object)._
314
+ */
315
+ $ref?: string;
316
+ /**
317
+ * An optional string summary, intended to apply to all operations in this path.
318
+ */
319
+ summary?: string;
320
+ /**
321
+ * An optional string description, intended to apply to all operations in this path. [CommonMark
322
+ * syntax](https://spec.commonmark.org/) MAY be used for rich text representation.
323
+ */
324
+ description?: string;
325
+ /**
326
+ * A definition of a GET operation on this path.
327
+ */
328
+ get?: OperationObject;
329
+ /**
330
+ * A definition of a PUT operation on this path.
331
+ */
332
+ put?: OperationObject;
333
+ /**
334
+ * A definition of a POST operation on this path.
335
+ */
336
+ post?: OperationObject;
337
+ /**
338
+ * A definition of a DELETE operation on this path.
339
+ */
340
+ delete?: OperationObject;
341
+ /**
342
+ * A definition of a OPTIONS operation on this path.
343
+ */
344
+ options?: OperationObject;
345
+ /**
346
+ * A definition of a HEAD operation on this path.
347
+ */
348
+ head?: OperationObject;
349
+ /**
350
+ * A definition of a PATCH operation on this path.
351
+ */
352
+ patch?: OperationObject;
353
+ /**
354
+ * A definition of a TRACE operation on this path.
355
+ */
356
+ trace?: OperationObject;
357
+ /**
358
+ * A definition of a QUERY operation, as defined in the most recent IETF draft
359
+ * ([draft-ietf-httpbis-safe-method-w-body-08](https://www.ietf.org/archive/id/draft-ietf-httpbis-safe-method-w-body-11.html)
360
+ * as of this writing) or its RFC successor, on this path.
361
+ */
362
+ query?: OperationObject;
363
+ /**
364
+ * A map of additional operations on this path. The map key is the HTTP method with the same capitalization that is to
365
+ * be sent in the request. This map MUST NOT contain any entry for the methods that can be defined by other fixed
366
+ * fields with Operation Object values (e.g. no `POST` entry, as the `post` field is used for this method).
367
+ */
368
+ additionalOperations?: Record<string, OperationObject>;
369
+ /**
370
+ * An alternative `servers` array to service all operations in this path. If a `servers` array is specified at the
371
+ * [OpenAPI Object](#oas-servers) level, it will be overridden by this value.
372
+ */
373
+ servers?: ServerObject[];
374
+ /**
375
+ * [Reference Object](#reference-object)]
376
+ */
377
+ parameters?: (ParameterObject | ReferenceObject)[];
378
+ }
379
+ /**
380
+ * Describes a single API operation on a path.
381
+ */
382
+ export interface OperationObject {
383
+ /**
384
+ * A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or
385
+ * any other qualifier.
386
+ */
387
+ tags?: string[];
388
+ /**
389
+ * A short summary of what the operation does.
390
+ */
391
+ summary?: string;
392
+ /**
393
+ * A verbose explanation of the operation behavior. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for
394
+ * rich text representation.
395
+ */
396
+ description?: string;
397
+ /**
398
+ * Additional external documentation for this operation.
399
+ */
400
+ externalDocs?: ExternalDocumentationObject;
401
+ /**
402
+ * Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The
403
+ * operationId value is **case-sensitive**. Tools and libraries MAY use the operationId to uniquely identify an
404
+ * operation, therefore, it is RECOMMENDED to follow common programming naming conventions.
405
+ */
406
+ operationId?: string;
407
+ /**
408
+ * A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item,
409
+ * the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A
410
+ * unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link
411
+ * to parameters that are defined in the OpenAPI Object’s components.parameters.
412
+ */
413
+ parameters?: (ParameterObject | ReferenceObject)[];
414
+ /**
415
+ * The request body applicable for this operation. The `requestBody` is fully supported in HTTP methods where the HTTP
416
+ * specification [[RFC9110](https://spec.openapis.org/oas/v3.2.0.html#bib-rfc9110)] [Section
417
+ * 9.3](https://datatracker.ietf.org/doc/html/rfc9110#section-9.3) has explicitly defined semantics for request
418
+ * bodies. In other cases where the HTTP spec discourages message content (such as GET and DELETE), `requestBody` is
419
+ * permitted but does not have well-defined semantics and SHOULD be avoided if possible.
420
+ */
421
+ requestBody?: RequestBodyObject | ReferenceObject;
422
+ /**
423
+ * The list of possible responses as they are returned from executing this operation.
424
+ */
425
+ responses?: ResponsesObject;
426
+ /**
427
+ * A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the
428
+ * Callback Object. Each value in the map is a Callback Object that describes a request that may be initiated by the
429
+ * API provider and the expected responses.
430
+ */
431
+ callbacks?: Record<string, CallbackObject | ReferenceObject>;
432
+ /**
433
+ * Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default
434
+ * value is `false`.
435
+ */
436
+ deprecated?: boolean;
437
+ /**
438
+ * A declaration of which security mechanisms can be used for this operation. The list of values includes alternative
439
+ * Security Requirement Objects that can be used. Only one of the Security Requirement Objects need to be satisfied to
440
+ * authorize a request. To make security optional, an empty security requirement (`{}`) can be included in the array.
441
+ * This definition overrides any declared top-level [`security`](#oas-security). To remove a top-level security
442
+ * declaration, an empty array can be used.
443
+ */
444
+ security?: SecurityRequirementObject[];
445
+ /**
446
+ * An alternative `servers` array to service this operation. If a `servers` array is specified at the [Path Item
447
+ * Object](#path-item-servers) or [OpenAPI Object](#oas-servers) level, it will be overridden by this value.
448
+ */
449
+ servers?: ServerObject[];
450
+ }
451
+ /**
452
+ * Allows referencing an external resource for extended documentation.
453
+ */
454
+ export interface ExternalDocumentationObject {
455
+ /**
456
+ * A description of the target documentation. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich
457
+ * text representation.
458
+ */
459
+ description?: string;
460
+ /**
461
+ * The URI for the target documentation. This MUST be in the form of a URI.
462
+ */
463
+ url: string;
464
+ }
465
+ /**
466
+ * An object grouping an internal or external example value with basic `summary` and `description` metadata. The
467
+ * examples can show either data suitable for schema validation, or serialized data as required by the containing [Media
468
+ * Type Object](#media-type-object), [Parameter Object](#parameter-object), or [Header Object](#header-object). This
469
+ * object is typically used in fields named `examples` (plural), and is a [referenceable](#reference-object) alternative
470
+ * to older `example` (singular) fields that do not support referencing or metadata. The various fields and types of
471
+ * examples are explained in more detail under [Working With Examples](#working-with-examples).
472
+ */
473
+ export interface ExampleObject {
474
+ /**
475
+ * Short description for the example.
476
+ */
477
+ summary?: string;
478
+ /**
479
+ * Long description for the example. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text
480
+ * representation.
481
+ */
482
+ description?: string;
483
+ /**
484
+ * An example of the data structure that MUST be valid according to the relevant [Schema Object](#schema-object). If
485
+ * this field is present, `value` MUST be absent.
486
+ */
487
+ dataValue?: unknown;
488
+ /**
489
+ * An example of the serialized form of the value, including encoding and escaping as described under [Validating
490
+ * Examples](#validating-examples). If `dataValue` is present, then this field SHOULD contain the serialization of the
491
+ * given data. Otherwise, it SHOULD be the valid serialization of a data value that itself MUST be valid as described
492
+ * for `dataValue`. This field SHOULD NOT be used if the serialization format is JSON, as the data form is easier to
493
+ * work with. If this field is present, `value`, and `externalValue` MUST be absent.
494
+ */
495
+ serializedValue?: string;
496
+ /**
497
+ * A URI that identifies the serialized example in a separate document, allowing for values not easily or readably
498
+ * expressed as a Unicode string. If `dataValue` is present, then this field SHOULD identify a serialization of the
499
+ * given data. Otherwise, the value SHOULD be the valid serialization of a data value that itself MUST be valid as
500
+ * described for `dataValue`. If this field is present, `serializedValue` and `value` MUST be absent. See also the
501
+ * rules for resolving [Relative References](#relative-references-in-api-description-uris).
502
+ */
503
+ externalValue?: string;
504
+ /**
505
+ * Embedded literal example. The `value` field and `externalValue` field are mutually exclusive. To represent examples
506
+ * of media types that cannot naturally be represented in JSON or YAML, use a string value to contain the example,
507
+ * escaping where necessary. **Deprecated for non-JSON serialization targets:** Use `dataValue` and/or
508
+ * `serializedValue`, which both have unambiguous syntax and semantics, instead.
509
+ */
510
+ value?: unknown;
511
+ }
512
+ /**
513
+ * Describes a single operation parameter. A unique parameter is defined by a combination of a [name](#parameter-name)
514
+ * and [location](#parameter-in). See [Appendix E](#appendix-e-percent-encoding-and-form-media-types) for a detailed
515
+ * examination of percent-encoding concerns, including interactions with the `application/x-www-form-urlencoded` query
516
+ * string format.
517
+ */
518
+ export interface ParameterObject {
519
+ /**
520
+ * The name of the parameter. Parameter names are _case-sensitive_. If [`in`](#parameter-in) is `"path"`, the `name`
521
+ * field MUST correspond to a single template expression occurring within the [path](#paths-path) field in the [Paths
522
+ * Object](#paths-object). See [Path Templating](#path-templating) for further information. If [`in`](#parameter-in)
523
+ * is `"header"` and the `name` field is `"Accept"`, `"Content-Type"` or `"Authorization"`, the parameter definition
524
+ * SHALL be ignored. If `in` is `"querystring"`, or for [certain combinations](#style-examples) of
525
+ * [`style`](#parameter-style) and [`explode`](#parameter-explode), the value of `name` is not used in the parameter
526
+ * serialization. For all other cases, the `name` corresponds to the parameter name used by the [`in`](#parameter-in)
527
+ * field.
528
+ */
529
+ name: string;
530
+ /**
531
+ * The location of the parameter.
532
+ */
533
+ in: 'query' | 'querystring' | 'header' | 'path' | 'cookie';
534
+ /**
535
+ * A brief description of the parameter. This could contain examples of use. [CommonMark
536
+ * syntax](https://spec.commonmark.org/) MAY be used for rich text representation.
537
+ */
538
+ description?: string;
539
+ /**
540
+ * Determines whether this parameter is mandatory. If the [parameter location](#parameter-in) is `"path"`, this field
541
+ * is **REQUIRED** and its value MUST be `true`. Otherwise, the field MAY be included and its default value is
542
+ * `false`.
543
+ */
544
+ required: boolean;
545
+ /**
546
+ * Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is `false`.
547
+ */
548
+ deprecated?: boolean;
549
+ /**
550
+ * If `true`, clients MAY pass a zero-length string value in place of parameters that would otherwise be omitted
551
+ * entirely, which the server SHOULD interpret as the parameter being unused. Default value is `false`. If
552
+ * [`style`](#parameter-style) is used, and if [behavior is _n/a_ (cannot be serialized)](#style-examples), the value
553
+ * of `allowEmptyValue` SHALL be ignored. Interactions between this field and the parameter's [Schema
554
+ * Object](#schema-object) are implementation-defined. This field is valid only for `query` parameters.
555
+ * **Deprecated:** Use of this field is NOT RECOMMENDED, and it is likely to be removed in a later revision.
556
+ */
557
+ allowEmptyValue?: boolean;
558
+ /**
559
+ * Example of the parameter's potential value; see [Working With Examples](#working-with-examples).
560
+ */
561
+ example?: unknown;
562
+ /**
563
+ * [Reference Object](#reference-object)]
564
+ */
565
+ examples?: Record<string, ExampleObject>;
566
+ /**
567
+ * Describes how the parameter value will be serialized depending on the type of the parameter value. Default values
568
+ * (based on value of `in`):
569
+ *
570
+ * - For `"query"` - `"form"`
571
+ * - For `"path"` - `"simple"`
572
+ * - For `"header"` - `"simple"`
573
+ * - For `"cookie"` - `"form"` (for compatibility reasons; note that `style: "cookie"` SHOULD be used with `in:
574
+ * "cookie"`; see [Appendix D](#appendix-d-serializing-headers-and-cookies) for details).
575
+ */
576
+ style?: string;
577
+ /**
578
+ * When this is true, parameter values of type `array` or `object` generate separate parameters for each value of the
579
+ * array or key-value pair of the map. For other types of parameters, or when [`style`](#parameter-style) is
580
+ * `"deepObject"`, this field has no effect. When `style` is `"form"` or `"cookie"`, the default value is `true`. For
581
+ * all other styles, the default value is `false`.
582
+ */
583
+ explode?: boolean;
584
+ /**
585
+ * When this is true, parameter values are serialized using reserved expansion, as defined by
586
+ * [RFC6570](https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.3), which allows [RFC3986's reserved character
587
+ * set](https://datatracker.ietf.org/doc/html/rfc3986#section-2.2), as well as percent-encoded triples, to pass
588
+ * through unchanged, while still percent-encoding all other disallowed characters (including `%` outside of
589
+ * percent-encoded triples). Applications are still responsible for percent-encoding reserved characters that are not
590
+ * allowed by the rules of the `in` destination or media type, or are [not allowed in the path by this
591
+ * specification](#path-templating); see [URL Percent-Encoding](#url-percent-encoding) for details. The default value
592
+ * is `false`. This field only applies to `in` and `style` values that automatically percent-encode.
593
+ */
594
+ allowReserved?: boolean;
595
+ /**
596
+ * The schema defining the type used for the parameter.
597
+ */
598
+ schema?: SchemaObject;
599
+ /**
600
+ * [Reference Object](#reference-object)]
601
+ */
602
+ content?: Record<string, MediaTypeObject>;
603
+ }
604
+ /**
605
+ * Describes a single request body.
606
+ */
607
+ export interface RequestBodyObject {
608
+ /**
609
+ * A brief description of the request body. This could contain examples of use. [CommonMark
610
+ * syntax](https://spec.commonmark.org/) MAY be used for rich text representation.
611
+ */
612
+ description?: string;
613
+ /**
614
+ * The content of the request body. The key is a media type or media type range and the value describes it. The map
615
+ * SHOULD have at least one entry; if it does not, the behavior is implementation-defined. For requests that match
616
+ * multiple keys, only the most specific key is applicable. e.g. "text/plain" overrides "text/*"
617
+ */
618
+ content?: Record<string, MediaTypeObject | ReferenceObject>;
619
+ /**
620
+ * Determines if the request body is required in the request. Defaults to `false`.
621
+ */
622
+ required?: boolean;
623
+ }
624
+ /**
625
+ * Each Media Type Object describes content structured in accordance with the media type identified by its key. Multiple
626
+ * Media Type Objects can be used to describe content that can appear in any of several different media types. When
627
+ * `example` or `examples` are provided, the example SHOULD match the specified schema and be in the correct format as
628
+ * specified by the media type and its encoding. The `example` and `examples` fields are mutually exclusive. See
629
+ * [Working With Examples](#working-with-examples) for further guidance regarding the different ways of specifying
630
+ * examples, including non-JSON/YAML values.
631
+ */
632
+ export interface MediaTypeObject {
633
+ /**
634
+ * A schema describing the complete content of the request, response, parameter, or header.
635
+ */
636
+ schema?: SchemaObject;
637
+ /**
638
+ * A schema describing each item within a [sequential media type](#sequential-media-types).
639
+ */
640
+ itemSchema?: SchemaObject;
641
+ /**
642
+ * Example of the media type; see [Working With Examples](#working-with-examples).
643
+ */
644
+ example?: unknown;
645
+ /**
646
+ * [Reference Object](#reference-object)]
647
+ */
648
+ examples?: Record<string, ExampleObject>;
649
+ /**
650
+ * A map between a property name and its encoding information, as defined under [Encoding By Name](#encoding-by-name).
651
+ * The `encoding` field SHALL only apply when the media type is `multipart` or `application/x-www-form-urlencoded`. If
652
+ * no Encoding Object is provided for a property, the behavior is determined by the default values documented for the
653
+ * Encoding Object. This field MUST NOT be present if `prefixEncoding` or `itemEncoding` are present.
654
+ */
655
+ encoding?: Record<string, EncodingObject>;
656
+ /**
657
+ * An array of positional encoding information, as defined under [Encoding By Position](#encoding-by-position). The
658
+ * `prefixEncoding` field SHALL only apply when the media type is `multipart`. If no Encoding Object is provided for a
659
+ * property, the behavior is determined by the default values documented for the Encoding Object. This field MUST NOT
660
+ * be present if `encoding` is present.
661
+ */
662
+ prefixEncoding?: EncodingObject[];
663
+ /**
664
+ * A single Encoding Object that provides encoding information for multiple array items, as defined under [Encoding By
665
+ * Position](#encoding-by-position). The `itemEncoding` field SHALL only apply when the media type is `multipart`. If
666
+ * no Encoding Object is provided for a property, the behavior is determined by the default values documented for the
667
+ * Encoding Object. This field MUST NOT be present if `encoding` is present.
668
+ */
669
+ itemEncoding?: EncodingObject;
670
+ }
671
+ /**
672
+ * A single encoding definition applied to a single value, with the mapping of Encoding Objects to values determined by
673
+ * the [Media Type Object](#media-type-object) as described under [Encoding Usage and
674
+ * Restrictions](#encoding-usage-and-restrictions). See [Appendix B](#appendix-b-data-type-conversion) for a discussion
675
+ * of converting values of various types to string representations. See [Appendix
676
+ * E](#appendix-e-percent-encoding-and-form-media-types) for a detailed examination of percent-encoding concerns for
677
+ * form media types.
678
+ */
679
+ export interface EncodingObject {
680
+ /**
681
+ * The `Content-Type` for encoding a specific property. The value is a comma-separated list, each element of which is
682
+ * either a specific media type (e.g. `image/png`) or a wildcard media type (e.g. `image/*`). The default value
683
+ * depends on the type as shown in the table below.
684
+ */
685
+ contentType?: string;
686
+ /**
687
+ * [Reference Object](#reference-object)]
688
+ */
689
+ headers?: Record<string, HeaderObject>;
690
+ /**
691
+ * Applies nested Encoding Objects in the same manner as the [Media Type Object](#media-type-object)'s `encoding`
692
+ * field.
693
+ */
694
+ encoding?: Record<string, EncodingObject>;
695
+ /**
696
+ * Applies nested Encoding Objects in the same manner as the [Media Type Object](#media-type-object)'s
697
+ * `prefixEncoding` field.
698
+ */
699
+ prefixEncoding?: EncodingObject[];
700
+ /**
701
+ * Applies nested Encoding Objects in the same manner as the [Media Type Object](#media-type-object)'s `itemEncoding`
702
+ * field.
703
+ */
704
+ itemEncoding?: EncodingObject;
705
+ /**
706
+ * Describes how a specific property value will be serialized depending on its type. See [Parameter
707
+ * Object](#parameter-object) for details on the [`style`](#parameter-style) field. The behavior follows the same
708
+ * values as `query` parameters, including the default value of `"form"` which applies only when `contentType` is
709
+ * _not_ being used due to one or both of `explode` or `allowReserved` being explicitly specified. Note that the
710
+ * initial `?` used in query strings is not used in `application/x-www-form-urlencoded` message bodies, and MUST be
711
+ * removed (if using an RFC6570 implementation) or simply not added (if constructing the string manually). This field
712
+ * SHALL be ignored if the media type is not `application/x-www-form-urlencoded` or `multipart/form-data`. If a value
713
+ * is explicitly defined, then the value of [`contentType`](#encoding-content-type) (implicit or explicit) SHALL be
714
+ * ignored.
715
+ */
716
+ style?: string;
717
+ /**
718
+ * When this is true, property values of type `array` or `object` generate separate parameters for each value of the
719
+ * array, or key-value-pair of the map. For other types of properties, or when [`style`](#encoding-style) is
720
+ * `"deepObject"`, this field has no effect. When `style` is `"form"`, the default value is `true`. For all other
721
+ * styles, the default value is `false`. This field SHALL be ignored if the media type is not
722
+ * `application/x-www-form-urlencoded` or `multipart/form-data`. If a value is explicitly defined, then the value of
723
+ * [`contentType`](#encoding-content-type) (implicit or explicit) SHALL be ignored.
724
+ */
725
+ explode?: boolean;
726
+ /**
727
+ * When this is true, parameter values are serialized using reserved expansion, as defined by
728
+ * [RFC6570](https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.3), which allows [RFC3986's reserved character
729
+ * set](https://datatracker.ietf.org/doc/html/rfc3986#section-2.2), as well as percent-encoded triples, to pass
730
+ * through unchanged, while still percent-encoding all other disallowed characters (including `%` outside of
731
+ * percent-encoded triples). Applications are still responsible for percent-encoding reserved characters that are not
732
+ * allowed in the target media type; see [URL Percent-Encoding](#url-percent-encoding) for details. The default value
733
+ * is `false`. This field SHALL be ignored if the media type is not `application/x-www-form-urlencoded` or
734
+ * `multipart/form-data`. If a value is explicitly defined, then the value of [`contentType`](#encoding-content-type)
735
+ * (implicit or explicit) SHALL be ignored.
736
+ */
737
+ allowReserved?: boolean;
738
+ }
739
+ /**
740
+ * A container for the expected responses of an operation. The container maps a HTTP response code to the expected
741
+ * response. The documentation is not necessarily expected to cover all possible HTTP response codes because they may
742
+ * not be known in advance. However, documentation is expected to cover a successful operation response and any known
743
+ * errors. The `default` MAY be used as a default Response Object for all HTTP codes that are not covered individually
744
+ * by the Responses Object. The Responses Object MUST contain at least one response code, and if only one response code
745
+ * is provided it SHOULD be the response for a successful operation call.
746
+ */
747
+ export interface ResponsesObject {
748
+ /**
749
+ * The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to
750
+ * cover undeclared responses.
751
+ */
752
+ default?: ResponseObject | ReferenceObject;
753
+ /**
754
+ * Pattern: [HTTP Status Code](#http-status-codes) Any HTTP status code can be used as the property name, but only one
755
+ * property per code, to describe the expected response for that HTTP status code. This field MUST be enclosed in
756
+ * quotation marks (for example, “200”) for compatibility between JSON and YAML. To define a range of response codes,
757
+ * this field MAY contain the uppercase wildcard character X. For example, 2XX represents all response codes between
758
+ * 200 and 299. Only the following range definitions are allowed: 1XX, 2XX, 3XX, 4XX, and 5XX. If a response is
759
+ * defined using an explicit code, the explicit code definition takes precedence over the range definition for that
760
+ * code.
761
+ */
762
+ [pattern: string]: ResponseObject | ReferenceObject | undefined;
763
+ }
764
+ /**
765
+ * Describes a single response from an API operation, including design-time, static `links` to operations based on the
766
+ * response.
767
+ */
768
+ export interface ResponseObject {
769
+ /**
770
+ * A short summary of the meaning of the response.
771
+ */
772
+ summary?: string;
773
+ /**
774
+ * A description of the response. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text
775
+ * representation.
776
+ */
777
+ description?: string;
778
+ /**
779
+ * [Reference Object](#reference-object)]
780
+ */
781
+ headers?: Record<string, HeaderObject>;
782
+ /**
783
+ * [Reference Object](#reference-object)]
784
+ */
785
+ content?: Record<string, MediaTypeObject>;
786
+ /**
787
+ * [Reference Object](#reference-object)]
788
+ */
789
+ links?: Record<string, LinkObject>;
790
+ }
791
+ /**
792
+ * A map of possible out-of band callbacks related to the parent operation. Each value in the map is a [Path Item
793
+ * Object](#path-item-object) that describes a set of requests that may be initiated by the API provider and the
794
+ * expected responses. The key value used to identify the Path Item Object is an expression, evaluated at runtime, that
795
+ * identifies a URL to use for the callback operation. To describe incoming requests from the API provider independent
796
+ * from another API call, use the [`webhooks`](#oas-webhooks) field. Pattern: {expression} A Path Item Object used to
797
+ * define a callback request and expected responses. A [complete
798
+ * example](https://learn.openapis.org/examples/v3.0/callback-example.html) is available.
799
+ */
800
+ export type CallbackObject = Record<string, PathItemObject>;
801
+ /**
802
+ * The Link Object represents a possible design-time link for a response. The presence of a link does not guarantee the
803
+ * caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between
804
+ * responses and other operations. Unlike _dynamic_ links (i.e. links provided **in** the response payload), the OAS
805
+ * linking mechanism does not require link information in the runtime response. For computing links and providing
806
+ * instructions to execute them, a [runtime expression](#runtime-expressions) is used for accessing values in an
807
+ * operation and using them as parameters while invoking the linked operation.
808
+ */
809
+ export interface LinkObject {
810
+ /**
811
+ * A URI reference to an OAS operation. This field is mutually exclusive of the `operationId` field, and MUST point to
812
+ * an [Operation Object](#operation-object). Relative `operationRef` values MAY be used to locate an existing
813
+ * [Operation Object](#operation-object) in the OpenAPI Description.
814
+ */
815
+ operationRef?: string;
816
+ /**
817
+ * The name of an _existing_, resolvable OAS operation, as defined with a unique `operationId`. This field is mutually
818
+ * exclusive of the `operationRef` field.
819
+ */
820
+ operationId?: string;
821
+ /**
822
+ * A map representing parameters to pass to an operation as specified with operationId or identified via
823
+ * `operationRef`. The key is the parameter name to be used (optionally qualified with the parameter location, e.g.
824
+ * path.id for an id parameter in the path), whereas the value can be a constant or an expression to be evaluated and
825
+ * passed to the linked operation.
826
+ */
827
+ parameters?: Record<string, unknown>;
828
+ /**
829
+ * [{expression}](#runtime-expressions)
830
+ */
831
+ requestBody?: unknown;
832
+ /**
833
+ * A description of the link. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text
834
+ * representation.
835
+ */
836
+ description?: string;
837
+ /**
838
+ * A server object to be used by the target operation.
839
+ */
840
+ server?: ServerObject;
841
+ }
842
+ /**
843
+ * Describes a single header for [HTTP responses](#response-headers) and for [individual parts in `multipart`
844
+ * representations](#encoding-headers); see the relevant [Response Object](#response-object) and [Encoding
845
+ * Object](#encoding-object) documentation for restrictions on which headers can be described. The Header Object follows
846
+ * the structure of the [Parameter Object](#parameter-object), including determining its serialization strategy based on
847
+ * whether `schema` or `content` is present, with the following changes:
848
+ *
849
+ * 1. `name` MUST NOT be specified, it is given in the corresponding `headers` map.
850
+ * 2. `in` MUST NOT be specified, it is implicitly in `header`.
851
+ * 3. All traits that are affected by the location MUST be applicable to a location of `header` (for example,
852
+ * [`style`](#parameter-style)). This means that `allowEmptyValue` MUST NOT be used, and `style`, if used, MUST be
853
+ * limited to `"simple"`.
854
+ * 4. `name` MUST NOT be specified, it is given in the corresponding `headers` map.
855
+ * 5. `in` MUST NOT be specified, it is implicitly in `header`.
856
+ * 6. All traits that are affected by the location MUST be applicable to a location of `header` (for example,
857
+ * [`style`](#parameter-style)). This means that `allowEmptyValue` MUST NOT be used, and `style`, if used, MUST be
858
+ * limited to `"simple"`.
859
+ */
860
+ export interface HeaderObject {
861
+ /**
862
+ * A brief description of the header. This could contain examples of use. [CommonMark
863
+ * syntax](https://spec.commonmark.org/) MAY be used for rich text representation.
864
+ */
865
+ description?: string;
866
+ /**
867
+ * Determines whether this header is mandatory. The default value is `false`.
868
+ */
869
+ required?: boolean;
870
+ /**
871
+ * Specifies that the header is deprecated and SHOULD be transitioned out of usage. Default value is `false`.
872
+ */
873
+ deprecated?: boolean;
874
+ /**
875
+ * Example of the header's potential value; see [Working With Examples](#working-with-examples).
876
+ */
877
+ example?: unknown;
878
+ /**
879
+ * [Reference Object](#reference-object)]
880
+ */
881
+ examples?: Record<string, ExampleObject>;
882
+ /**
883
+ * Describes how the header value will be serialized. The default (and only legal value for headers) is `"simple"`.
884
+ */
885
+ style?: string;
886
+ /**
887
+ * When this is true, header values of type `array` or `object` generate a single header whose value is a
888
+ * comma-separated list of the array items or key-value pairs of the map, see [Style Examples](#style-examples). For
889
+ * other data types this field has no effect. The default value is `false`.
890
+ */
891
+ explode?: boolean;
892
+ /**
893
+ * The schema defining the type used for the header.
894
+ */
895
+ schema?: SchemaObject;
896
+ /**
897
+ * [Reference Object](#reference-object)]
898
+ */
899
+ content?: Record<string, MediaTypeObject>;
900
+ }
901
+ /**
902
+ * Adds metadata to a single tag that is used by the [Operation Object](#operation-object). It is not mandatory to have
903
+ * a Tag Object per tag defined in the Operation Object instances.
904
+ */
905
+ export interface TagObject {
906
+ /**
907
+ * The name of the tag. Use this value in the `tags` array of an Operation.
908
+ */
909
+ name: string;
910
+ /**
911
+ * A short summary of the tag, used for display purposes.
912
+ */
913
+ summary?: string;
914
+ /**
915
+ * A description for the tag. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text
916
+ * representation.
917
+ */
918
+ description?: string;
919
+ /**
920
+ * Additional external documentation for this tag.
921
+ */
922
+ externalDocs?: ExternalDocumentationObject;
923
+ /**
924
+ * The `name` of a tag that this tag is nested under. The named tag MUST exist in the API description, and circular
925
+ * references between parent and child tags MUST NOT be used.
926
+ */
927
+ parent?: string;
928
+ /**
929
+ * A machine-readable string to categorize what sort of tag it is. Any string value can be used; common uses are `nav`
930
+ * for Navigation, `badge` for visible badges, `audience` for APIs used by different groups. A [registry of the most
931
+ * commonly used values](https://spec.openapis.org/registry/tag-kind/) is available.
932
+ */
933
+ kind?: string;
934
+ }
935
+ /**
936
+ * A simple object to allow referencing other components in the OpenAPI Description, internally and externally. The
937
+ * `$ref` string value contains a URI [RFC3986](https://tools.ietf.org/html/rfc3986), which identifies the value being
938
+ * referenced. See the rules for resolving [Relative References](#relative-references-in-api-description-uris).
939
+ */
940
+ export interface ReferenceObject {
941
+ /**
942
+ * The reference identifier. This MUST be in the form of a URI.
943
+ */
944
+ $ref: string;
945
+ /**
946
+ * A short summary which by default SHOULD override that of the referenced component. If the referenced object-type
947
+ * does not allow a `summary` field, then this field has no effect.
948
+ */
949
+ summary?: string;
950
+ /**
951
+ * A description which by default SHOULD override that of the referenced component. [CommonMark
952
+ * syntax](https://spec.commonmark.org/) MAY be used for rich text representation. If the referenced object-type does
953
+ * not allow a `description` field, then this field has no effect.
954
+ */
955
+ description?: string;
956
+ }
957
+ /**
958
+ * The Schema Object allows the definition of input and output data types. These types can be objects, but also
959
+ * primitives and arrays. This object is a superset of the [JSON Schema Specification Draft
960
+ * 2020-12](https://www.ietf.org/archive/id/draft-bhutton-json-schema-01.html). The empty schema (which allows any
961
+ * instance to validate) MAY be represented by the boolean value `true` and a schema which allows no instance to
962
+ * validate MAY be represented by the boolean value `false`. For more information about the keywords, see [JSON Schema
963
+ * Core](https://www.ietf.org/archive/id/draft-bhutton-json-schema-01.html) and [JSON Schema
964
+ * Validation](https://www.ietf.org/archive/id/draft-bhutton-json-schema-validation-01.html). Unless stated otherwise,
965
+ * the keyword definitions follow those of JSON Schema and do not add any additional semantics; this includes keywords
966
+ * such as `$schema`, `$id`, `$ref`, and `$dynamicRef` being URIs rather than URLs. Where JSON Schema indicates that
967
+ * behavior is defined by the application (e.g. for annotations), OAS also defers the definition of semantics to the
968
+ * application consuming the OpenAPI document.
969
+ */
970
+ export type SchemaObject = JSONSchema & {
971
+ /**
972
+ * The discriminator provides a "hint" for which of a set of schemas a payload is expected to satisfy. See
973
+ * [Composition and Inheritance](#composition-and-inheritance-polymorphism) for more details.
974
+ */
975
+ discriminator?: DiscriminatorObject;
976
+ /**
977
+ * Adds additional metadata to describe the XML representation of this schema.
978
+ */
979
+ xml?: XMLObject;
980
+ /**
981
+ * Additional external documentation for this schema.
982
+ */
983
+ externalDocs?: ExternalDocumentationObject;
984
+ /**
985
+ * A free-form field to include an example of an instance for this schema. To represent examples that cannot be
986
+ * naturally represented in JSON or YAML, a string value can be used to contain the example with escaping where
987
+ * necessary. **Deprecated:** The `example` field has been deprecated in favor of the JSON Schema `examples` keyword.
988
+ * Use of `example` is discouraged, and later versions of this specification may remove it.
989
+ */
990
+ example?: unknown;
991
+ };
992
+ /**
993
+ * When request bodies or response payloads may be one of a number of different schemas, these should use the JSON
994
+ * Schema `anyOf` or `oneOf` keywords to describe the possible schemas (see [Composition and
995
+ * Inheritance](#composition-and-inheritance-polymorphism)). A polymorphic schema MAY include a Discriminator Object,
996
+ * which defines the name of the property that may be used as a hint for which schema of the `anyOf` or `oneOf`, or
997
+ * which schema that references the current schema in an `allOf`, is expected to validate the structure of the model.
998
+ * This hint can be used to aid in serialization, deserialization, and validation. The Discriminator Object does this by
999
+ * implicitly or explicitly associating the possible values of a named property with alternative schemas. Note that
1000
+ * `discriminator` MUST NOT change the validation outcome of the schema.
1001
+ */
1002
+ export interface DiscriminatorObject {
1003
+ /**
1004
+ * The name of the discriminating property in the payload that will hold the discriminating value. The discriminating
1005
+ * property MAY be defined as required or optional, but when defined as optional the Discriminator Object MUST include
1006
+ * a `defaultMapping` field that specifies which schema is expected to validate the structure of the model when the
1007
+ * discriminating property is not present.
1008
+ */
1009
+ propertyName: string;
1010
+ /**
1011
+ * An object to hold mappings between payload values and schema names or URI references.
1012
+ */
1013
+ mapping?: Record<string, string>;
1014
+ /**
1015
+ * The schema name or URI reference to a schema that is expected to validate the structure of the model when the
1016
+ * discriminating property is not present in the payload or contains a value for which there is no explicit or
1017
+ * implicit mapping.
1018
+ */
1019
+ defaultMapping?: string;
1020
+ }
1021
+ /**
1022
+ * A metadata object that allows for more fine-tuned XML model definitions. When using a Schema Object with XML, if no
1023
+ * XML Object is present, the behavior is determined by the XML Object's default field values.
1024
+ */
1025
+ export interface XMLObject {
1026
+ /**
1027
+ * One of `element`, `attribute`, `text`, `cdata`, or `none`, as explained under [XML Node Types](#xml-node-types).
1028
+ * The default value is `none` if `$ref`, `$dynamicRef`, or `type: "array"` is present in the [Schema
1029
+ * Object](#schema-object) containing the XML Object, and `element` otherwise.
1030
+ */
1031
+ nodeType?: string;
1032
+ /**
1033
+ * Sets the name of the element/attribute corresponding to the schema, replacing the name that was inferred as
1034
+ * described under [XML Node Names](#xml-node-names). This field SHALL be ignored if the `nodeType` is `text`,
1035
+ * `cdata`, or `none`.
1036
+ */
1037
+ name?: string;
1038
+ /**
1039
+ * The IRI ([[RFC3987]]) of the namespace definition. Value MUST be in the form of a non-relative IRI.
1040
+ */
1041
+ namespace?: string;
1042
+ /**
1043
+ * The prefix to be used for the [name](#xml-name).
1044
+ */
1045
+ prefix?: string;
1046
+ /**
1047
+ * Declares whether the property definition translates to an attribute instead of an element. Default value is
1048
+ * `false`. If `nodeType` is present, this field MUST NOT be present. **Deprecated:** Use `nodeType: "attribute"`
1049
+ * instead of `attribute: true`
1050
+ */
1051
+ attribute?: boolean;
1052
+ /**
1053
+ * MAY be used only for an array definition. Signifies whether the array is wrapped (for example, `) or unwrapped (`).
1054
+ *
1055
+ * - Default value is `false`. The definition takes effect only when defined alongside `type` being `"array"` (outside
1056
+ * the `items`). If `nodeType` is present, this field MUST NOT be present. **Deprecated:** Use `nodeType: "element"`
1057
+ * instead of `wrapped: true`
1058
+ * - Default value is `false`. The definition takes effect only when defined alongside `type` being `"array"` (outside
1059
+ * the `items`). If `nodeType` is present, this field MUST NOT be present. **Deprecated:** Use `nodeType: "element"`
1060
+ * instead of `wrapped: true`
1061
+ */
1062
+ wrapped?: boolean;
1063
+ }
1064
+ /**
1065
+ * Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key
1066
+ * (either as a header, a cookie parameter or as a query parameter), mutual TLS (use of a client certificate), OAuth2's
1067
+ * common flows (implicit, password, client credentials and authorization code) as defined in
1068
+ * [RFC6749](https://tools.ietf.org/html/rfc6749), OAuth2 device authorization flow as defined in
1069
+ * [RFC8628](https://tools.ietf.org/html/rfc8628), and [[OpenID-Connect-Core]]. Please note that as of 2020, the
1070
+ * implicit flow is about to be deprecated by [OAuth 2.0 Security Best Current
1071
+ * Practice](https://tools.ietf.org/html/draft-ietf-oauth-security-topics). Recommended for most use cases is
1072
+ * Authorization Code Grant flow with PKCE.
1073
+ */
1074
+ export type SecuritySchemeObject = HttpSecurityScheme | ApiKeySecurityScheme | OAuth2SecurityScheme | OpenIdSecurityScheme;
1075
+ interface SecuritySchemeBase {
1076
+ description?: string;
1077
+ deprecated?: boolean;
1078
+ }
1079
+ export interface HttpSecurityScheme extends SecuritySchemeBase {
1080
+ type: 'http';
1081
+ /**
1082
+ * The name of the HTTP Authentication scheme to be used in the Authorization header as defined in [RFC9110] Section
1083
+ * 16.4.1. The values used SHOULD be registered in the IANA Authentication Scheme registry. The value is
1084
+ * case-insensitive, as defined in [RFC9110] Section 11.1.
1085
+ */
1086
+ scheme: 'Basic' | 'Bearer' | string;
1087
+ /**
1088
+ * A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an
1089
+ * authorization server, so this information is primarily for documentation purposes.
1090
+ */
1091
+ bearerFormat?: string;
1092
+ }
1093
+ export interface ApiKeySecurityScheme extends SecuritySchemeBase {
1094
+ type: 'apiKey';
1095
+ /**
1096
+ * The name of the header, query or cookie parameter to be used.
1097
+ */
1098
+ name: string;
1099
+ /**
1100
+ * The location of the API key.
1101
+ */
1102
+ in: 'query' | 'header' | 'cookie';
1103
+ }
1104
+ export interface OAuth2SecurityScheme extends SecuritySchemeBase {
1105
+ type: 'oauth2';
1106
+ /**
1107
+ * An object containing configuration information for the flow types supported.
1108
+ */
1109
+ flows: OAuthFlowsObject;
1110
+ }
1111
+ export interface OpenIdSecurityScheme extends SecuritySchemeBase {
1112
+ type: 'openIdConnect';
1113
+ /**
1114
+ * OpenID Connect Discovery URL as defined by [OpenID-Connect-Discovery-1.0].
1115
+ */
1116
+ openIdConnectUrl: string;
1117
+ }
1118
+ /**
1119
+ * Allows configuration of the supported OAuth Flows.
1120
+ */
1121
+ export interface OAuthFlowsObject {
1122
+ /**
1123
+ * Configuration for the OAuth Implicit flow
1124
+ */
1125
+ implicit?: ImplicitOAuthFlowObject;
1126
+ /**
1127
+ * Configuration for the OAuth Resource Owner Password flow
1128
+ */
1129
+ password?: PasswordOAuthFlowObject;
1130
+ /**
1131
+ * Configuration for the OAuth Client Credentials flow. Previously called `application` in OpenAPI 2.0.
1132
+ */
1133
+ clientCredentials?: ClientCredentialsOAuthFlowObject;
1134
+ /**
1135
+ * Configuration for the OAuth Authorization Code flow. Previously called `accessCode` in OpenAPI 2.0.
1136
+ */
1137
+ authorizationCode?: AuthorizationCodeOAuthFlowObject;
1138
+ /**
1139
+ * Configuration for the OAuth Device Authorization flow.
1140
+ */
1141
+ deviceAuthorization?: DeviceAuthorizationOAuthFlowObject;
1142
+ }
1143
+ /**
1144
+ * Configuration details for a supported OAuth Flow
1145
+ */
1146
+ export interface OAuthFlowObject {
1147
+ /**
1148
+ * The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the
1149
+ * use of TLS. Applies To:
1150
+ *
1151
+ * - Implicit
1152
+ * - AuthorizationCode
1153
+ */
1154
+ authorizationUrl?: string;
1155
+ /**
1156
+ * The device authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard
1157
+ * requires the use of TLS. Applies To:
1158
+ *
1159
+ * - DeviceAuthorization
1160
+ */
1161
+ deviceAuthorizationUrl?: string;
1162
+ /**
1163
+ * The device authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard
1164
+ * requires the use of TLS. Applies To:
1165
+ *
1166
+ * - Password
1167
+ * - ClientCredentials
1168
+ * - AuthorizationCode
1169
+ * - DeviceAuthorization
1170
+ */
1171
+ tokenUrl?: string;
1172
+ /**
1173
+ * The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. The OAuth2 standard requires
1174
+ * the use of TLS.
1175
+ */
1176
+ refreshUrl?: string;
1177
+ /**
1178
+ * The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it.
1179
+ * The map MAY be empty.
1180
+ */
1181
+ scopes: Record<string, string>;
1182
+ }
1183
+ export interface ImplicitOAuthFlowObject extends OAuthFlowObject {
1184
+ authorizationUrl: string;
1185
+ }
1186
+ export interface AuthorizationCodeOAuthFlowObject extends OAuthFlowObject {
1187
+ authorizationUrl: string;
1188
+ tokenUrl: string;
1189
+ }
1190
+ export interface PasswordOAuthFlowObject extends OAuthFlowObject {
1191
+ tokenUrl: string;
1192
+ }
1193
+ export interface ClientCredentialsOAuthFlowObject extends OAuthFlowObject {
1194
+ tokenUrl: string;
1195
+ }
1196
+ export interface DeviceAuthorizationOAuthFlowObject extends OAuthFlowObject {
1197
+ deviceAuthorizationUrl: string;
1198
+ tokenUrl: string;
1199
+ }
1200
+ /**
1201
+ * Lists the required security schemes to execute this operation. The name used for each property MUST either correspond
1202
+ * to a security scheme declared in the [Security Schemes](#components-security-schemes) under the [Components
1203
+ * Object](#components-object), or be the URI of a Security Scheme Object. Property names that are identical to a
1204
+ * component name under the Components Object MUST be treated as a component name. To reference a Security Scheme with a
1205
+ * single-segment relative URI reference (e.g. `foo`) that collides with a component name (e.g.
1206
+ * `#/components/securitySchemes/foo`), use the `.` path segment (e.g. `./foo`). Using a Security Scheme component name
1207
+ * that appears to be a URI is NOT RECOMMENDED, as the precedence of component-name-matching over URI resolution, which
1208
+ * is necessary to maintain compatibility with prior OAS versions, is counter-intuitive. See also [Security
1209
+ * Considerations](#security-considerations). A Security Requirement Object MAY refer to multiple security schemes in
1210
+ * which case all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where
1211
+ * multiple query parameters or HTTP headers are required to convey security information. When the `security` field is
1212
+ * defined on the [OpenAPI Object](#openapi-object) or [Operation Object](#operation-object) and contains multiple
1213
+ * Security Requirement Objects, only one of the entries in the list needs to be satisfied to authorize the request.
1214
+ * This enables support for scenarios where the API allows multiple, independent security schemes. An empty Security
1215
+ * Requirement Object (`{}`) indicates anonymous access is supported.
1216
+ */
1217
+ export type SecurityRequirementObject = Record<string, string[]>;
1218
+ export {};
1219
+ //# sourceMappingURL=types.d.ts.map