codegen-openapi-ts 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 devteaa
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,287 @@
1
+ # OpenAPI Typescript Codegen
2
+
3
+ [![NPM][npm-image]][npm-url]
4
+ [![License][license-image]][license-url]
5
+
6
+ > Node.js library that generates Typescript clients based on the OpenAPI specification.
7
+
8
+ > This project is a fork from [Openapi Typescript Codegen](https://github.com/ferdikoomen/openapi-typescript-codegen) by [Ferdi Koomen](https://github.com/ferdikoomen), the reason is because I need some changes and use some of the lower level generated code that I can use on my projects.
9
+
10
+ ## Why?
11
+ - Frontend ❤️ OpenAPI, but we do not want to use JAVA codegen in our builds
12
+ - Quick, lightweight, robust and framework-agnostic 🚀
13
+ - Supports generation of TypeScript clients
14
+ - Supports OpenAPI specification v2.0 and v3.0
15
+ - Supports JSON and YAML files for input
16
+ - Supports generation through CLI, Node.js and NPX
17
+ - Supports tsc and @babel/plugin-transform-typescript
18
+ - Supports external references using [`json-schema-ref-parser`](https://github.com/APIDevTools/json-schema-ref-parser/)
19
+
20
+ ## Install
21
+
22
+ ```
23
+ npm install codegen-openapi-ts --save-dev
24
+ ```
25
+
26
+
27
+ ## Usage
28
+
29
+ ```
30
+ $ openapi --help
31
+
32
+ Usage: openapi [options]
33
+
34
+ Options:
35
+ -V, --version output the version number
36
+ -i, --input <value> OpenAPI specification, can be a path, url or string content (required)
37
+ -o, --output <value> Output directory (required)
38
+ --useUnionTypes Use union types instead of enums
39
+ --exportServices <value> Write services to disk (default: true)
40
+ --exportModels <value> Write models to disk (default: true)
41
+ --postfix <value> Service name postfix (default: "Service")
42
+ --request <value> Path to custom request file
43
+ -h, --help display help for command
44
+
45
+ Examples
46
+ $ openapi --input ./spec.json
47
+ $ openapi --input ./spec.json --output ./dist
48
+ $ openapi --input ./spec.json --output ./dist --client xhr
49
+ ```
50
+
51
+
52
+ ## Example
53
+
54
+ **package.json**
55
+ ```json
56
+ {
57
+ "scripts": {
58
+ "generate": "openapi --input ./spec.json --output ./dist"
59
+ }
60
+ }
61
+ ```
62
+
63
+ **NPX**
64
+
65
+ ```
66
+ npx codegen-openapi-ts --input ./spec.json --output ./dist
67
+ ```
68
+
69
+ **Node.js API**
70
+
71
+ ```javascript
72
+ const OpenAPI = require('codegen-openapi-ts');
73
+
74
+ OpenAPI.generate({
75
+ input: './spec.json',
76
+ output: './dist'
77
+ });
78
+
79
+ // Or by providing the content of the spec directly 🚀
80
+ OpenAPI.generate({
81
+ input: require('./spec.json'),
82
+ output: './dist'
83
+ });
84
+ ```
85
+
86
+
87
+ ## Features
88
+
89
+ ### Enums vs. Union Types `--useUnionTypes`
90
+ The OpenAPI spec allows you to define [enums](https://swagger.io/docs/specification/data-models/enums/) inside the
91
+ data model. By default, we convert these enums definitions to [TypeScript enums](https://www.typescriptlang.org/docs/handbook/enums.html).
92
+ However, these enums are merged inside the namespace of the model, this is unsupported by Babel, [see docs](https://babeljs.io/docs/en/babel-plugin-transform-typescript#impartial-namespace-support).
93
+ Because we also want to support projects that use Babel [@babel/plugin-transform-typescript](https://babeljs.io/docs/en/babel-plugin-transform-typescript),
94
+ we offer the flag `--useUnionTypes` to generate [union types](https://www.typescriptlang.org/docs/handbook/unions-and-intersections.html#union-types)
95
+ instead of the traditional enums. The difference can be seen below:
96
+
97
+ **Enums:**
98
+ ```typescript
99
+ // Model
100
+ export interface Order {
101
+ id?: number;
102
+ quantity?: number;
103
+ status?: Order.status;
104
+ }
105
+
106
+ export namespace Order {
107
+ export enum status {
108
+ PLACED = 'placed',
109
+ APPROVED = 'approved',
110
+ DELIVERED = 'delivered',
111
+ }
112
+ }
113
+
114
+ // Usage
115
+ const order: Order = {
116
+ id: 1,
117
+ quantity: 40,
118
+ status: Order.status.PLACED
119
+ }
120
+ ```
121
+
122
+ **Union Types:**
123
+ ```typescript
124
+ // Model
125
+ export interface Order {
126
+ id?: number;
127
+ quantity?: number;
128
+ status?: 'placed' | 'approved' | 'delivered';
129
+ }
130
+
131
+ // Usage
132
+ const order: Order = {
133
+ id: 1,
134
+ quantity: 40,
135
+ status: 'placed'
136
+ }
137
+ ```
138
+
139
+ ### Enum with custom names and descriptions
140
+ You can use `x-enum-varnames` and `x-enum-descriptions` in your spec to generate enum with custom names and descriptions.
141
+ It's not in official [spec](https://github.com/OAI/OpenAPI-Specification/issues/681) yet. But it's a supported extension
142
+ that can help developers use more meaningful enumerators.
143
+ ```json
144
+ {
145
+ "EnumWithStrings": {
146
+ "description": "This is a simple enum with strings",
147
+ "enum": [
148
+ 0,
149
+ 1,
150
+ 2
151
+ ],
152
+ "x-enum-varnames": [
153
+ "Success",
154
+ "Warning",
155
+ "Error"
156
+ ],
157
+ "x-enum-descriptions": [
158
+ "Used when the status of something is successful",
159
+ "Used when the status of something has a warning",
160
+ "Used when the status of something has an error"
161
+ ]
162
+ }
163
+ }
164
+ ```
165
+
166
+ Generated code:
167
+ ```typescript
168
+ enum EnumWithStrings {
169
+ /*
170
+ * Used when the status of something is successful
171
+ */
172
+ Success = 0,
173
+ /*
174
+ * Used when the status of something has a warning
175
+ */
176
+ Waring = 1,
177
+ /*
178
+ * Used when the status of something has an error
179
+ */
180
+ Error = 2,
181
+ }
182
+ ```
183
+
184
+
185
+ ### Nullable in OpenAPI v2
186
+ In the OpenAPI v3 spec you can create properties that can be NULL, by providing a `nullable: true` in your schema.
187
+ However, the v2 spec does not allow you to do this. You can use the unofficial `x-nullable` in your specification
188
+ to generate nullable properties in OpenApi v2.
189
+
190
+ ```json
191
+ {
192
+ "ModelWithNullableString": {
193
+ "required": ["requiredProp"],
194
+ "description": "This is a model with one string property",
195
+ "type": "object",
196
+ "properties": {
197
+ "prop": {
198
+ "description": "This is a simple string property",
199
+ "type": "string",
200
+ "x-nullable": true
201
+ },
202
+ "requiredProp": {
203
+ "description": "This is a simple string property",
204
+ "type": "string",
205
+ "x-nullable": true
206
+ }
207
+ }
208
+ }
209
+ }
210
+ ```
211
+
212
+ Generated code:
213
+ ```typescript
214
+ interface ModelWithNullableString {
215
+ prop?: string | null,
216
+ requiredProp: string | null,
217
+ }
218
+ ```
219
+
220
+ ### References
221
+
222
+ Local references to schema definitions (those beginning with `#/definitions/schemas/`)
223
+ will be converted to type references to the equivalent, generated top-level type.
224
+
225
+ The OpenAPI generator also supports external references, which allows you to break
226
+ down your openapi.yml into multiple sub-files, or incorporate third-party schemas
227
+ as part of your types to ensure everything is able to be TypeScript generated.
228
+
229
+ External references may be:
230
+ * *relative references* - references to other files at the same location e.g.
231
+ `{ $ref: 'schemas/customer.yml' }`
232
+ * *remote references* - fully qualified references to another remote location
233
+ e.g. `{ $ref: 'https://myexampledomain.com/schemas/customer_schema.yml' }`
234
+
235
+ For remote references, both files (when the file is on the current filesystem)
236
+ and http(s) URLs are supported.
237
+
238
+ External references may also contain internal paths in the external schema (e.g.
239
+ `schemas/collection.yml#/definitions/schemas/Customer`) and back-references to
240
+ the base openapi file or between files (so that you can reference another
241
+ schema in the main file as a type of an object or array property, for example).
242
+
243
+ At start-up, an OpenAPI or Swagger file with external references will be "bundled",
244
+ so that all external references and back-references will be resolved (but local
245
+ references preserved).
246
+
247
+
248
+ FAQ
249
+ ===
250
+
251
+ ### Babel support
252
+ If you use enums inside your models / definitions then those enums are by default inside a namespace with the same name
253
+ as your model. This is called declaration merging. However, the [@babel/plugin-transform-typescript](https://babeljs.io/docs/en/babel-plugin-transform-typescript)
254
+ does not support these namespaces, so if you are using babel in your project please use the `--useUnionTypes` flag
255
+ to generate union types instead of traditional enums. More info can be found here: [Enums vs. Union Types](#enums-vs-union-types---useuniontypes).
256
+
257
+ **Note:** If you are using Babel 7 and Typescript 3.8 (or higher) then you should enable the `onlyRemoveTypeImports` to
258
+ ignore any 'type only' imports, see https://babeljs.io/docs/en/babel-preset-typescript#onlyremovetypeimports for more info
259
+
260
+ ```javascript
261
+ module.exports = {
262
+ presets: [
263
+ ['@babel/preset-typescript', {
264
+ onlyRemoveTypeImports: true,
265
+ }],
266
+ ],
267
+ };
268
+ ```
269
+
270
+ In order to compile the project and resolve the imports, you will need to enable the `allowSyntheticDefaultImports`
271
+ in your `tsconfig.json` file.
272
+
273
+
274
+ [npm-url]: https://npmjs.org/package/
275
+ [npm-image]: https://img.shields.io/npm/v/codegen-openapi-ts.svg
276
+ [license-url]: LICENSE
277
+ [license-image]: http://img.shields.io/npm/l/codegen-openapi-ts.svg
278
+ [coverage-url]: https://codecov.io/gh/ferdikoomen/codegen-openapi-ts
279
+ [coverage-image]: https://img.shields.io/codecov/c/github/ferdikoomen/codegen-openapi-ts.svg
280
+ [quality-url]: https://lgtm.com/projects/g/ferdikoomen/codegen-openapi-ts
281
+ [quality-image]: https://img.shields.io/lgtm/grade/javascript/g/ferdikoomen/codegen-openapi-ts.svg
282
+ [climate-url]: https://codeclimate.com/github/ferdikoomen/codegen-openapi-ts
283
+ [climate-image]: https://img.shields.io/codeclimate/maintainability/ferdikoomen/codegen-openapi-ts.svg
284
+ [downloads-url]: http://npm-stat.com/charts.html?package=codegen-openapi-ts
285
+ [downloads-image]: http://img.shields.io/npm/dm/codegen-openapi-ts.svg
286
+ [build-url]: https://circleci.com/gh/ferdikoomen/codegen-openapi-ts/tree/master
287
+ [build-image]: https://circleci.com/gh/ferdikoomen/codegen-openapi-ts/tree/master.svg?style=svg
package/bin/index.js ADDED
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env node
2
+
3
+ 'use strict';
4
+
5
+ const path = require('path');
6
+ const program = require('commander');
7
+ const pkg = require('../package.json');
8
+
9
+ const params = program
10
+ .name('openapi')
11
+ .usage('[options]')
12
+ .version(pkg.version)
13
+ .requiredOption('-i, --input <value>', 'OpenAPI specification, can be a path, url or string content (required)')
14
+ .requiredOption('-o, --output <value>', 'Output directory (required)')
15
+ .option('-c, --client <value>', 'HTTP client to generate [fetch, xhr, node, axios]', 'fetch')
16
+ .option('--useOptions', 'Use options instead of arguments')
17
+ .option('--useUnionTypes', 'Use union types instead of enums')
18
+ .option('--exportServices <value>', 'Write services to disk', true)
19
+ .option('--exportModels <value>', 'Write models to disk', true)
20
+ .option('--postfix <value>', 'Service name postfix', 'Service')
21
+ .option('--request <value>', 'Path to custom request file')
22
+ .parse(process.argv)
23
+ .opts();
24
+
25
+ const OpenAPI = require(path.resolve(__dirname, '../dist/index.js'));
26
+
27
+ if (OpenAPI) {
28
+ OpenAPI.generate({
29
+ input: params.input,
30
+ output: params.output,
31
+ httpClient: params.client,
32
+ useOptions: params.useOptions,
33
+ useUnionTypes: params.useUnionTypes,
34
+ exportCore: false,
35
+ exportServices: JSON.parse(params.exportServices) === true,
36
+ exportModels: JSON.parse(params.exportModels) === true,
37
+ exportSchemas: false,
38
+ postfix: params.postfix,
39
+ request: params.request,
40
+ })
41
+ .then(() => {
42
+ process.exit(0);
43
+ })
44
+ .catch(error => {
45
+ console.error(error);
46
+ process.exit(1);
47
+ });
48
+ }
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("fs"),n=require("os"),r=require("camelcase"),t=require("json-schema-ref-parser"),a=require("handlebars/runtime"),o=require("path"),l=require("mkdirp"),i=require("rimraf"),s=require("util");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function p(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,t.get?t:{enumerable:!0,get:function(){return e[r]}})}})),n.default=e,Object.freeze(n)}var c,m=u(e),d=u(r),f=u(t),h=p(a),y=u(l),v=u(i);function g(e){return null==e?void 0:e.replace(/\\/g,"\\\\")}function b(e,n){const r=n["x-enum-varnames"],t=n["x-enum-descriptions"];return e.map(((e,n)=>({name:(null==r?void 0:r[n])||e.name,description:(null==t?void 0:t[n])||e.description,value:e.value,type:e.type})))}function P(e){return e?e.replace(/(\*\/)/g,"*_/").replace(/\r?\n(.*)/g,((e,r)=>`${n.EOL} * ${r.trim()}`)):null}function O(e){return null!=e&&""!==e}function x(e){return Array.isArray(e)?e.filter(((e,n,r)=>r.indexOf(e)===n)).filter(O).map((e=>"number"==typeof e?{name:`'_${e}'`,value:String(e),type:"number",description:null}:{name:String(e).replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:`'${e}'`,type:"string",description:null})):[]}function k(e){if(/^(\w+=[0-9]+)/g.test(e)){const n=e.match(/(\w+=[0-9]+,?)/g);if(n){const e=[];return n.forEach((n=>{const r=n.split("=")[0],t=parseInt(n.split("=")[1].replace(/[^0-9]/g,""));r&&Number.isInteger(t)&&e.push({name:r.replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:String(t),type:"number",description:null})})),e.filter(((e,n,r)=>r.map((e=>e.name)).indexOf(e.name)===n))}}return[]}function R(e){if(e){if(!/^[a-zA-Z_$][\w$]+$/g.test(e))return`'${e}'`}return e}exports.HttpClient=void 0,(c=exports.HttpClient||(exports.HttpClient={})).FETCH="fetch",c.XHR="xhr",c.NODE="node",c.AXIOS="axios";const w=new Map([["File","binary"],["file","binary"],["any","any"],["object","any"],["array","any[]"],["boolean","boolean"],["byte","number"],["int","number"],["integer","number"],["float","number"],["double","number"],["short","number"],["long","number"],["number","number"],["char","string"],["date","string"],["date-time","string"],["password","string"],["string","string"],["void","void"],["null","null"]]);function q(e){return e.replace(/^[^a-zA-Z_$]+/g,"").replace(/[^\w$]+/g,"_")}function C(e="any",n){const r={type:"any",base:"any",template:null,imports:[],isNullable:!1},t=function(e,n){return"binary"===n?"binary":w.get(e)}(e,n);if(t)return r.type=t,r.base=t,r;const a=decodeURIComponent(e.trim().replace(/^#\/definitions\//,"").replace(/^#\/parameters\//,"").replace(/^#\/responses\//,"").replace(/^#\/securityDefinitions\//,""));if(/\[.*\]$/g.test(a)){const e=a.match(/(.*?)\[(.*)\]$/);if(null==e?void 0:e.length){const n=C(q(e[1])),t=C(q(e[2]));return"any[]"===n.type?(r.type=`${t.type}[]`,r.base=t.type,n.imports=[]):t.type?(r.type=`${n.type}<${t.type}>`,r.base=n.type,r.template=t.type):(r.type=n.type,r.base=n.type,r.template=n.type),r.imports.push(...n.imports),r.imports.push(...t.imports),r}}if(a){const e=q(a);return r.type=e,r.base=e,r.imports.push(e),r}return r}function j(e,n,r){var t;const a=[];for(const o in n.properties)if(n.properties.hasOwnProperty(o)){const l=n.properties[o],i=!!(null===(t=n.required)||void 0===t?void 0:t.includes(o));if(l.$ref){const e=C(l.$ref);a.push({name:R(o),export:"reference",type:e.type,base:e.base,template:e.template,link:null,description:P(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:i,isNullable:!0===l["x-nullable"],format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:g(l.pattern),imports:e.imports,enum:[],enums:[],properties:[]})}else{const n=r(e,l);a.push({name:R(o),export:n.export,type:n.type,base:n.base,template:n.template,link:n.link,description:P(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:i,isNullable:!0===l["x-nullable"],format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:g(l.pattern),imports:n.imports,enum:n.enum,enums:n.enums,properties:n.properties})}}return a}const A=/~1/g,D=/~0/g;function I(e,n){if(n.$ref){const r=n.$ref.replace(/^#/g,"").split("/").filter((e=>e));let t=e;return r.forEach((e=>{const r=decodeURIComponent(e.replace(A,"/").replace(D,"~"));if(!t.hasOwnProperty(r))throw new Error(`Could not find reference: "${n.$ref}"`);t=t[r]})),t}return n}function E(e,n,r,t,a){const o={type:t,imports:[],enums:[],properties:[]},l=[];if(r.map((n=>a(e,n))).filter((e=>{const n=e.properties.length,r=e.enums.length;return!("any"===e.type&&!n&&!r)})).forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums),o.properties.push(e)})),n.required){const t=function(e,n,r,t){return r.reduce(((n,r)=>{if(r.$ref){const a=I(e,r);return[...n,...t(e,a).properties]}return[...n,...t(e,r).properties]}),[]).filter((e=>!e.isRequired&&n.includes(e.name))).map((e=>Object.assign(Object.assign({},e),{isRequired:!0})))}(e,n.required,r,a);t.forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums)})),l.push(...t)}if(n.properties){const r=j(e,n,a);r.forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums),"enum"===e.export&&o.enums.push(e)})),l.push(...r)}return l.length&&o.properties.push({name:"properties",export:"interface",type:"any",base:"any",template:null,link:null,description:"",isDefinition:!1,isReadOnly:!1,isNullable:!1,isRequired:!1,imports:[],enum:[],enums:[],properties:l}),o}function H(e,n,r=!1,t=""){var a;const o={name:t,export:"interface",type:"any",base:"any",template:null,link:null,description:P(n.description),isDefinition:r,isReadOnly:!0===n.readOnly,isNullable:!0===n["x-nullable"],isRequired:!1,format:n.format,maximum:n.maximum,exclusiveMaximum:n.exclusiveMaximum,minimum:n.minimum,exclusiveMinimum:n.exclusiveMinimum,multipleOf:n.multipleOf,maxLength:n.maxLength,minLength:n.minLength,maxItems:n.maxItems,minItems:n.minItems,uniqueItems:n.uniqueItems,maxProperties:n.maxProperties,minProperties:n.minProperties,pattern:g(n.pattern),imports:[],enum:[],enums:[],properties:[]};if(n.$ref){const e=C(n.$ref);return o.export="reference",o.type=e.type,o.base=e.base,o.template=e.template,o.imports.push(...e.imports),o}if(n.enum&&"boolean"!==n.type){const e=b(x(n.enum),n);if(e.length)return o.export="enum",o.type="string",o.base="string",o.enum.push(...e),o}if(("int"===n.type||"integer"===n.type)&&n.description){const e=k(n.description);if(e.length)return o.export="enum",o.type="number",o.base="number",o.enum.push(...e),o}if("array"===n.type&&n.items){if(n.items.$ref){const e=C(n.items.$ref);return o.export="array",o.type=e.type,o.base=e.base,o.template=e.template,o.imports.push(...e.imports),o}{const r=H(e,n.items);return o.export="array",o.type=r.type,o.base=r.base,o.template=r.template,o.link=r,o.imports.push(...r.imports),o}}if("object"===n.type&&"object"==typeof n.additionalProperties){if(n.additionalProperties.$ref){const e=C(n.additionalProperties.$ref);return o.export="dictionary",o.type=e.type,o.base=e.base,o.template=e.template,o.imports.push(...e.imports),o}{const r=H(e,n.additionalProperties);return o.export="dictionary",o.type=r.type,o.base=r.base,o.template=r.template,o.link=r,o.imports.push(...r.imports),o}}if(null===(a=n.allOf)||void 0===a?void 0:a.length){const r=E(e,n,n.allOf,"all-of",H);return o.export=r.type,o.imports.push(...r.imports),o.properties.push(...r.properties),o.enums.push(...r.enums),o}if("object"===n.type){if(o.export="interface",o.type="any",o.base="any",n.properties){j(e,n,H).forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums),o.properties.push(e),"enum"===e.export&&o.enums.push(e)}))}return o}if(n.type){const e=C(n.type,n.format);return o.export="generic",o.type=e.type,o.base=e.base,o.template=e.template,o.imports.push(...e.imports),o}return o}function T(e,n,r){return r.indexOf(e)===n}function S(e,n){var r;if(void 0===e.default)return;if(null===e.default)return"null";switch(e.type||typeof e.default){case"int":case"integer":case"number":return"enum"===n.export&&(null===(r=n.enum)||void 0===r?void 0:r[e.default])?n.enum[e.default].value:e.default;case"boolean":return JSON.stringify(e.default);case"string":return`'${e.default}'`;case"object":try{return JSON.stringify(e.default,null,4)}catch(e){}}}const $=/^(arguments|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|eval|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)$/g;function N(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return d.default(n).replace($,"_$1")}function B(e,n){const r={imports:[],parameters:[],parametersPath:[],parametersQuery:[],parametersForm:[],parametersCookie:[],parametersHeader:[],parametersBody:null};return n.forEach((n=>{const t=I(e,n),a=function(e,n){var r;const t={in:n.in,prop:n.name,export:"interface",name:N(n.name),type:"any",base:"any",template:null,link:null,description:P(n.description),isDefinition:!1,isReadOnly:!1,isRequired:!0===n.required,isNullable:!0===n["x-nullable"],format:n.format,maximum:n.maximum,exclusiveMaximum:n.exclusiveMaximum,minimum:n.minimum,exclusiveMinimum:n.exclusiveMinimum,multipleOf:n.multipleOf,maxLength:n.maxLength,minLength:n.minLength,maxItems:n.maxItems,minItems:n.minItems,uniqueItems:n.uniqueItems,pattern:g(n.pattern),imports:[],enum:[],enums:[],properties:[],mediaType:null};if(n.$ref){const e=C(n.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=S(n,t),t}if(n.enum){const e=b(x(n.enum),n);if(e.length)return t.export="enum",t.type="string",t.base="string",t.enum.push(...e),t.default=S(n,t),t}if(("int"===n.type||"integer"===n.type)&&n.description){const e=k(n.description);if(e.length)return t.export="enum",t.type="number",t.base="number",t.enum.push(...e),t.default=S(n,t),t}if("array"===n.type&&n.items){const e=C(n.items.type,n.items.format);return t.export="array",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=S(n,t),t}if("object"===n.type&&n.items){const e=C(n.items.type,n.items.format);return t.export="dictionary",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=S(n,t),t}let a=n.schema;if(a){if((null===(r=a.$ref)||void 0===r?void 0:r.startsWith("#/parameters/"))&&(a=I(e,a)),a.$ref){const e=C(a.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=S(n,t),t}{const r=H(e,a);return t.export=r.export,t.type=r.type,t.base=r.base,t.template=r.template,t.link=r.link,t.imports.push(...r.imports),t.enum.push(...r.enum),t.enums.push(...r.enums),t.properties.push(...r.properties),t.default=S(n,t),t}}if(n.type){const e=C(n.type,n.format);return t.export="generic",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=S(n,t),t}return t}(e,t);if("api-version"!==a.prop)switch(a.in){case"path":r.parametersPath.push(a),r.parameters.push(a),r.imports.push(...a.imports);break;case"query":r.parametersQuery.push(a),r.parameters.push(a),r.imports.push(...a.imports);break;case"header":r.parametersHeader.push(a),r.parameters.push(a),r.imports.push(...a.imports);break;case"formData":r.parametersForm.push(a),r.parameters.push(a),r.imports.push(...a.imports);break;case"body":r.parametersBody=a,r.parameters.push(a),r.imports.push(...a.imports)}})),r}function L(e,n,r){var t;const a={in:"response",name:"",code:r,description:P(n.description),export:"generic",type:"any",base:"any",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]};let o=n.schema;if(o){if((null===(t=o.$ref)||void 0===t?void 0:t.startsWith("#/responses/"))&&(o=I(e,o)),o.$ref){const e=C(o.$ref);return a.export="reference",a.type=e.type,a.base=e.base,a.template=e.template,a.imports.push(...e.imports),a}{const n=H(e,o);return a.export=n.export,a.type=n.type,a.base=n.base,a.template=n.template,a.link=n.link,a.isReadOnly=n.isReadOnly,a.isRequired=n.isRequired,a.isNullable=n.isNullable,a.format=n.format,a.maximum=n.maximum,a.exclusiveMaximum=n.exclusiveMaximum,a.minimum=n.minimum,a.exclusiveMinimum=n.exclusiveMinimum,a.multipleOf=n.multipleOf,a.maxLength=n.maxLength,a.minLength=n.minLength,a.maxItems=n.maxItems,a.minItems=n.minItems,a.uniqueItems=n.uniqueItems,a.maxProperties=n.maxProperties,a.minProperties=n.minProperties,a.pattern=g(n.pattern),a.imports.push(...n.imports),a.enum.push(...n.enum),a.enums.push(...n.enums),a.properties.push(...n.properties),a}}if(n.headers)for(const e in n.headers)if(n.headers.hasOwnProperty(e))return a.in="header",a.name=e,a.type="string",a.base="string",a;return a}function M(e){if("default"===e)return 200;if(/[0-9]+/g.test(e)){const n=parseInt(e);if(Number.isInteger(n))return Math.abs(n)}return null}function F(e,n){const r=e.type===n.type&&e.base===n.base&&e.template===n.template;return r&&e.link&&n.link?F(e.link,n.link):r}function U(e){const n=[];return e.forEach((e=>{const{code:r}=e;r&&204!==r&&r>=200&&r<300&&n.push(e)})),n.length||n.push({in:"response",name:"",code:200,description:"",export:"generic",type:"void",base:"void",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]}),n.filter(((e,n,r)=>r.findIndex((n=>F(n,e)))===n))}function W(e,n){const r=e.isRequired&&void 0===e.default,t=n.isRequired&&void 0===n.default;return r&&!t?-1:t&&!r?1:0}function _(e,n,r,t,a,o){const l=function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return d.default(n,{pascalCase:!0})}(t),i=`${r}${l}`,s=function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return d.default(n)}(a.operationId||i),u=function(e){return e.replace(/\{(.*?)\}/g,((e,n)=>`\${${N(n)}}`)).replace("${apiVersion}","${OpenAPI.VERSION}")}(n),p={service:l,name:s,summary:P(a.summary),description:P(a.description),deprecated:!0===a.deprecated,method:r.toUpperCase(),path:u,parameters:[...o.parameters],parametersPath:[...o.parametersPath],parametersQuery:[...o.parametersQuery],parametersForm:[...o.parametersForm],parametersHeader:[...o.parametersHeader],parametersCookie:[...o.parametersCookie],parametersBody:o.parametersBody,imports:[],errors:[],results:[],responseHeader:null};if(a.parameters){const n=B(e,a.parameters);p.imports.push(...n.imports),p.parameters.push(...n.parameters),p.parametersPath.push(...n.parametersPath),p.parametersQuery.push(...n.parametersQuery),p.parametersForm.push(...n.parametersForm),p.parametersHeader.push(...n.parametersHeader),p.parametersCookie.push(...n.parametersCookie),p.parametersBody=n.parametersBody}if(a.responses){const n=function(e,n){const r=[];for(const t in n)if(n.hasOwnProperty(t)){const a=I(e,n[t]),o=M(t);if(o){const n=L(e,a,o);r.push(n)}}return r.sort(((e,n)=>e.code<n.code?-1:e.code>n.code?1:0))}(e,a.responses),r=U(n);p.errors=function(e){return e.filter((e=>e.code>=300&&e.description)).map((e=>{return{code:e.code,description:(n=e.description,n.replace(/([^\\])`/g,"$1\\`").replace(/(\*\/)/g,"*_/"))};var n}))}(n),p.responseHeader=function(e){const n=e.find((e=>"header"===e.in));return n?n.name:null}(r),r.forEach((e=>{p.results.push(e),p.imports.push(...e.imports)}))}return p.parameters=p.parameters.sort(W),p}function V(e){const n=function(e="1.0"){return String(e).replace(/^v/gi,"")}(e.info.version),r=function(e){var n;const r=(null===(n=e.schemes)||void 0===n?void 0:n[0])||"http",t=e.host,a=e.basePath||"";return(t?`${r}://${t}${a}`:a).replace(/\/$/g,"")}(e),t=function(e){const n=[];for(const r in e.definitions)if(e.definitions.hasOwnProperty(r)){const t=H(e,e.definitions[r],!0,C(r).base);n.push(t)}return n}(e),a=function(e){var n;const r=new Map;for(const t in e.paths)if(e.paths.hasOwnProperty(t)){const a=e.paths[t],o=B(e,a.parameters||[]);for(const l in a)if(a.hasOwnProperty(l))switch(l){case"get":case"put":case"post":case"delete":case"options":case"head":case"patch":const i=a[l];((null===(n=i.tags)||void 0===n?void 0:n.filter(T))||["Service"]).forEach((n=>{const a=_(e,t,l,n,i,o),s=r.get(a.service)||{name:a.service,operations:[],imports:[]};s.operations.push(a),s.imports.push(...a.imports),r.set(a.service,s)}))}}return Array.from(r.values())}(e);return{version:n,server:r,models:t,services:a}}function z(e){return e?e.replace(/(\*\/)/g,"*_/").replace(/\r?\n(.*)/g,((e,r)=>`${n.EOL} * ${r.trim()}`)):null}function Q(e){if(e){if(!/^[a-zA-Z_$][\w$]+$/g.test(e))return`'${e}'`}return e}const J=new Map([["File","binary"],["file","binary"],["any","any"],["object","any"],["array","any[]"],["boolean","boolean"],["byte","number"],["int","number"],["integer","number"],["float","number"],["double","number"],["short","number"],["long","number"],["number","number"],["char","string"],["date","string"],["date-time","string"],["password","string"],["string","string"],["void","void"],["null","null"]]);function Z(e,n){return"binary"===n?"binary":J.get(e)}function G(e){return e.replace(/^[^a-zA-Z_$]+/g,"").replace(/[^\w$]+/g,"_")}function X(e="any",n){const r={type:"any",base:"any",template:null,imports:[],isNullable:!1};if(Array.isArray(e)){const t=e.filter((e=>"null"!==e)).map((e=>Z(e,n))).filter(O).join(" | ");return r.type=t,r.base=t,r.isNullable=e.includes("null"),r}const t=Z(e,n);if(t)return r.type=t,r.base=t,r;const a=decodeURIComponent(e.trim().replace(/^#\/components\/schemas\//,"").replace(/^#\/components\/responses\//,"").replace(/^#\/components\/parameters\//,"").replace(/^#\/components\/examples\//,"").replace(/^#\/components\/requestBodies\//,"").replace(/^#\/components\/headers\//,"").replace(/^#\/components\/securitySchemes\//,"").replace(/^#\/components\/links\//,"").replace(/^#\/components\/callbacks\//,""));if(/\[.*\]$/g.test(a)){const e=a.match(/(.*?)\[(.*)\]$/);if(null==e?void 0:e.length){const n=X(G(e[1])),t=X(G(e[2]));return"any[]"===n.type?(r.type=`${t.type}[]`,r.base=`${t.type}`,n.imports=[]):t.type?(r.type=`${n.type}<${t.type}>`,r.base=n.type,r.template=t.type):(r.type=n.type,r.base=n.type,r.template=n.type),r.imports.push(...n.imports),r.imports.push(...t.imports),r}}if(a){const e=G(a);return r.type=e,r.base=e,r.imports.push(e),r}return r}function K(e,n,r){var t;const a=[];for(const o in n.properties)if(n.properties.hasOwnProperty(o)){const l=n.properties[o],i=!!(null===(t=n.required)||void 0===t?void 0:t.includes(o));if(l.$ref){const e=X(l.$ref);a.push({name:Q(o),export:"reference",type:e.type,base:e.base,template:e.template,link:null,description:z(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:i,isNullable:e.isNullable||!0===l.nullable,format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:g(l.pattern),imports:e.imports,enum:[],enums:[],properties:[]})}else{const n=r(e,l);a.push({name:Q(o),export:n.export,type:n.type,base:n.base,template:n.template,link:n.link,description:z(l.description),isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:i,isNullable:n.isNullable||!0===l.nullable,format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:g(l.pattern),imports:n.imports,enum:n.enum,enums:n.enums,properties:n.properties})}}return a}const Y=/~1/g,ee=/~0/g;function ne(e,n){if(n.$ref){const r=n.$ref.replace(/^#/g,"").split("/").filter((e=>e));let t=e;return r.forEach((e=>{const r=decodeURIComponent(e.replace(Y,"/").replace(ee,"~"));if(!t.hasOwnProperty(r))throw new Error(`Could not find reference: "${n.$ref}"`);t=t[r]})),t}return n}function re(e,n,r,t,a){const o={type:t,imports:[],enums:[],properties:[]},l=[];if(r.map((n=>a(e,n))).filter((e=>{const n=e.properties.length,r=e.enums.length;return!("any"===e.type&&!n&&!r)})).forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums),o.properties.push(e)})),n.required){const t=function(e,n,r,t){return r.reduce(((n,r)=>{if(r.$ref){const a=ne(e,r);return[...n,...t(e,a).properties]}return[...n,...t(e,r).properties]}),[]).filter((e=>!e.isRequired&&n.includes(e.name))).map((e=>Object.assign(Object.assign({},e),{isRequired:!0})))}(e,n.required,r,a);t.forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums)})),l.push(...t)}if(n.properties){const r=K(e,n,a);r.forEach((e=>{o.imports.push(...e.imports),o.enums.push(...e.enums),"enum"===e.export&&o.enums.push(e)})),l.push(...r)}return l.length&&o.properties.push({name:"properties",export:"interface",type:"any",base:"any",template:null,link:null,description:"",isDefinition:!1,isReadOnly:!1,isNullable:!1,isRequired:!1,imports:[],enum:[],enums:[],properties:l}),o}function te(e,n){var r;if(void 0===e.default)return;if(null===e.default)return"null";switch(e.type||typeof e.default){case"int":case"integer":case"number":return"enum"===(null==n?void 0:n.export)&&(null===(r=n.enum)||void 0===r?void 0:r[e.default])?n.enum[e.default].value:e.default;case"boolean":return JSON.stringify(e.default);case"string":return`'${e.default}'`;case"object":try{return JSON.stringify(e.default,null,4)}catch(e){}}}function ae(e,n,r=!1,t=""){var a,o,l;const i={name:t,export:"interface",type:"any",base:"any",template:null,link:null,description:z(n.description),isDefinition:r,isReadOnly:!0===n.readOnly,isNullable:!0===n.nullable,isRequired:!1,format:n.format,maximum:n.maximum,exclusiveMaximum:n.exclusiveMaximum,minimum:n.minimum,exclusiveMinimum:n.exclusiveMinimum,multipleOf:n.multipleOf,maxLength:n.maxLength,minLength:n.minLength,maxItems:n.maxItems,minItems:n.minItems,uniqueItems:n.uniqueItems,maxProperties:n.maxProperties,minProperties:n.minProperties,pattern:g(n.pattern),imports:[],enum:[],enums:[],properties:[]};if(n.$ref){const e=X(n.$ref);return i.export="reference",i.type=e.type,i.base=e.base,i.template=e.template,i.imports.push(...e.imports),i.default=te(n,i),i}if(n.enum&&"boolean"!==n.type){const e=function(e,n){const r=n["x-enum-varnames"],t=n["x-enum-descriptions"];return e.map(((e,n)=>({name:(null==r?void 0:r[n])||e.name,description:(null==t?void 0:t[n])||e.description,value:e.value,type:e.type})))}((s=n.enum,Array.isArray(s)?s.filter(((e,n,r)=>r.indexOf(e)===n)).filter(O).map((e=>"number"==typeof e?{name:`'_${e}'`,value:String(e),type:"number",description:null}:{name:String(e).replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:`'${e}'`,type:"string",description:null})):[]),n);if(e.length)return i.export="enum",i.type="string",i.base="string",i.enum.push(...e),i.default=te(n,i),i}var s;if(("int"===n.type||"integer"===n.type)&&n.description){const e=function(e){if(/^(\w+=[0-9]+)/g.test(e)){const n=e.match(/(\w+=[0-9]+,?)/g);if(n){const e=[];return n.forEach((n=>{const r=n.split("=")[0],t=parseInt(n.split("=")[1].replace(/[^0-9]/g,""));r&&Number.isInteger(t)&&e.push({name:r.replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:String(t),type:"number",description:null})})),e.filter(((e,n,r)=>r.map((e=>e.name)).indexOf(e.name)===n))}}return[]}(n.description);if(e.length)return i.export="enum",i.type="number",i.base="number",i.enum.push(...e),i.default=te(n,i),i}if("array"===n.type&&n.items){if(n.items.$ref){const e=X(n.items.$ref);return i.export="array",i.type=e.type,i.base=e.base,i.template=e.template,i.imports.push(...e.imports),i.default=te(n,i),i}{const r=ae(e,n.items);return i.export="array",i.type=r.type,i.base=r.base,i.template=r.template,i.link=r,i.imports.push(...r.imports),i.default=te(n,i),i}}if("object"===n.type&&"object"==typeof n.additionalProperties){if(n.additionalProperties.$ref){const e=X(n.additionalProperties.$ref);return i.export="dictionary",i.type=e.type,i.base=e.base,i.template=e.template,i.imports.push(...e.imports),i.default=te(n,i),i}{const r=ae(e,n.additionalProperties);return i.export="dictionary",i.type=r.type,i.base=r.base,i.template=r.template,i.link=r,i.imports.push(...r.imports),i.default=te(n,i),i}}if(null===(a=n.oneOf)||void 0===a?void 0:a.length){const r=re(e,n,n.oneOf,"one-of",ae);return i.export=r.type,i.imports.push(...r.imports),i.properties.push(...r.properties),i.enums.push(...r.enums),i}if(null===(o=n.anyOf)||void 0===o?void 0:o.length){const r=re(e,n,n.anyOf,"any-of",ae);return i.export=r.type,i.imports.push(...r.imports),i.properties.push(...r.properties),i.enums.push(...r.enums),i}if(null===(l=n.allOf)||void 0===l?void 0:l.length){const r=re(e,n,n.allOf,"all-of",ae);return i.export=r.type,i.imports.push(...r.imports),i.properties.push(...r.properties),i.enums.push(...r.enums),i}if("object"===n.type){if(i.export="interface",i.type="any",i.base="any",i.default=te(n,i),n.properties){K(e,n,ae).forEach((e=>{i.imports.push(...e.imports),i.enums.push(...e.enums),i.properties.push(e),"enum"===e.export&&i.enums.push(e)}))}return i}if(n.type){const e=X(n.type,n.format);return i.export="generic",i.type=e.type,i.base=e.base,i.template=e.template,i.isNullable=e.isNullable||i.isNullable,i.imports.push(...e.imports),i.default=te(n,i),i}return i}const oe=/^(arguments|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|eval|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)$/g;function le(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return d.default(n).replace(oe,"_$1")}function ie(e,n){const r={imports:[],parameters:[],parametersPath:[],parametersQuery:[],parametersForm:[],parametersCookie:[],parametersHeader:[],parametersBody:null};return n.forEach((n=>{const t=ne(e,n),a=function(e,n){var r;const t={in:n.in,prop:n.name,export:"interface",name:le(n.name),type:"any",base:"any",template:null,link:null,description:z(n.description),isDefinition:!1,isReadOnly:!1,isRequired:!0===n.required,isNullable:!0===n.nullable,imports:[],enum:[],enums:[],properties:[],mediaType:null};if(n.$ref){const e=X(n.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t}let a=n.schema;if(a){if((null===(r=a.$ref)||void 0===r?void 0:r.startsWith("#/components/parameters/"))&&(a=ne(e,a)),a.$ref){const e=X(a.$ref);return t.export="reference",t.type=e.type,t.base=e.base,t.template=e.template,t.imports.push(...e.imports),t.default=te(a),t}{const n=ae(e,a);return t.export=n.export,t.type=n.type,t.base=n.base,t.template=n.template,t.link=n.link,t.isReadOnly=n.isReadOnly,t.isRequired=t.isRequired||n.isRequired,t.isNullable=t.isNullable||n.isNullable,t.format=n.format,t.maximum=n.maximum,t.exclusiveMaximum=n.exclusiveMaximum,t.minimum=n.minimum,t.exclusiveMinimum=n.exclusiveMinimum,t.multipleOf=n.multipleOf,t.maxLength=n.maxLength,t.minLength=n.minLength,t.maxItems=n.maxItems,t.minItems=n.minItems,t.uniqueItems=n.uniqueItems,t.maxProperties=n.maxProperties,t.minProperties=n.minProperties,t.pattern=g(n.pattern),t.default=n.default,t.imports.push(...n.imports),t.enum.push(...n.enum),t.enums.push(...n.enums),t.properties.push(...n.properties),t}}return t}(e,t);if("api-version"!==a.prop)switch(t.in){case"path":r.parametersPath.push(a),r.parameters.push(a),r.imports.push(...a.imports);break;case"query":r.parametersQuery.push(a),r.parameters.push(a),r.imports.push(...a.imports);break;case"formData":r.parametersForm.push(a),r.parameters.push(a),r.imports.push(...a.imports);break;case"cookie":r.parametersCookie.push(a),r.parameters.push(a),r.imports.push(...a.imports);break;case"header":r.parametersHeader.push(a),r.parameters.push(a),r.imports.push(...a.imports)}})),r}const se=["application/json-patch+json","application/json","application/x-www-form-urlencoded","text/json","text/plain","multipart/form-data","multipart/mixed","multipart/related","multipart/batch"];function ue(e,n){const r=Object.keys(n).filter((e=>{const n=e.split(";")[0].trim();return se.includes(n)})).find((e=>{var r;return O(null===(r=n[e])||void 0===r?void 0:r.schema)}));if(r)return{mediaType:r,schema:n[r].schema};const t=Object.keys(n).find((e=>{var r;return O(null===(r=n[e])||void 0===r?void 0:r.schema)}));return t?{mediaType:t,schema:n[t].schema}:null}function pe(e,n,r){var t;const a={in:"response",name:"",code:r,description:z(n.description),export:"generic",type:"any",base:"any",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]};if(n.content){const r=ue(0,n.content);if(r){if((null===(t=r.schema.$ref)||void 0===t?void 0:t.startsWith("#/components/responses/"))&&(r.schema=ne(e,r.schema)),r.schema.$ref){const e=X(r.schema.$ref);return a.export="reference",a.type=e.type,a.base=e.base,a.template=e.template,a.imports.push(...e.imports),a}{const n=ae(e,r.schema);return a.export=n.export,a.type=n.type,a.base=n.base,a.template=n.template,a.link=n.link,a.isReadOnly=n.isReadOnly,a.isRequired=n.isRequired,a.isNullable=n.isNullable,a.format=n.format,a.maximum=n.maximum,a.exclusiveMaximum=n.exclusiveMaximum,a.minimum=n.minimum,a.exclusiveMinimum=n.exclusiveMinimum,a.multipleOf=n.multipleOf,a.maxLength=n.maxLength,a.minLength=n.minLength,a.maxItems=n.maxItems,a.minItems=n.minItems,a.uniqueItems=n.uniqueItems,a.maxProperties=n.maxProperties,a.minProperties=n.minProperties,a.pattern=g(n.pattern),a.imports.push(...n.imports),a.enum.push(...n.enum),a.enums.push(...n.enums),a.properties.push(...n.properties),a}}}if(n.headers)for(const e in n.headers)if(n.headers.hasOwnProperty(e))return a.in="header",a.name=e,a.type="string",a.base="string",a;return a}function ce(e){if("default"===e)return 200;if(/[0-9]+/g.test(e)){const n=parseInt(e);if(Number.isInteger(n))return Math.abs(n)}return null}function me(e,n){const r=e.type===n.type&&e.base===n.base&&e.template===n.template;return r&&e.link&&n.link?me(e.link,n.link):r}function de(e){const n=[];return e.forEach((e=>{const{code:r}=e;r&&204!==r&&r>=200&&r<300&&n.push(e)})),n.length||n.push({in:"response",name:"",code:200,description:"",export:"generic",type:"void",base:"void",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]}),n.filter(((e,n,r)=>r.findIndex((n=>me(n,e)))===n))}function fe(e,n){const r=e.isRequired&&void 0===e.default,t=n.isRequired&&void 0===n.default;return r&&!t?-1:t&&!r?1:0}function he(e,n,r,t,a,o){const l=function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return d.default(n,{pascalCase:!0})}(t),i=`${r}${l}`,s=function(e){const n=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return d.default(n)}(a.operationId||i),u=function(e){return e.replace(/\{(.*?)\}/g,((e,n)=>`\${${le(n)}}`)).replace("${apiVersion}","${OpenAPI.VERSION}")}(n),p={service:l,name:s,summary:z(a.summary),description:z(a.description),deprecated:!0===a.deprecated,method:r.toUpperCase(),path:u,parameters:[...o.parameters],parametersPath:[...o.parametersPath],parametersQuery:[...o.parametersQuery],parametersForm:[...o.parametersForm],parametersHeader:[...o.parametersHeader],parametersCookie:[...o.parametersCookie],parametersBody:o.parametersBody,imports:[],errors:[],results:[],responseHeader:null};if(a.parameters){const n=ie(e,a.parameters);p.imports.push(...n.imports),p.parameters.push(...n.parameters),p.parametersPath.push(...n.parametersPath),p.parametersQuery.push(...n.parametersQuery),p.parametersForm.push(...n.parametersForm),p.parametersHeader.push(...n.parametersHeader),p.parametersCookie.push(...n.parametersCookie),p.parametersBody=n.parametersBody}if(a.requestBody){const n=function(e,n){const r={in:"body",export:"interface",prop:"requestBody",name:"requestBody",type:"any",base:"any",template:null,link:null,description:z(n.description),default:void 0,isDefinition:!1,isReadOnly:!1,isRequired:!0===n.required,isNullable:!0===n.nullable,imports:[],enum:[],enums:[],properties:[],mediaType:null};if(n.content){const t=ue(0,n.content);if(t){switch(r.mediaType=t.mediaType,r.mediaType){case"application/x-www-form-urlencoded":case"multipart/form-data":r.in="formData",r.name="formData",r.prop="formData"}if(t.schema.$ref){const e=X(t.schema.$ref);return r.export="reference",r.type=e.type,r.base=e.base,r.template=e.template,r.imports.push(...e.imports),r}{const n=ae(e,t.schema);return r.export=n.export,r.type=n.type,r.base=n.base,r.template=n.template,r.link=n.link,r.isReadOnly=n.isReadOnly,r.isRequired=r.isRequired||n.isRequired,r.isNullable=r.isNullable||n.isNullable,r.format=n.format,r.maximum=n.maximum,r.exclusiveMaximum=n.exclusiveMaximum,r.minimum=n.minimum,r.exclusiveMinimum=n.exclusiveMinimum,r.multipleOf=n.multipleOf,r.maxLength=n.maxLength,r.minLength=n.minLength,r.maxItems=n.maxItems,r.minItems=n.minItems,r.uniqueItems=n.uniqueItems,r.maxProperties=n.maxProperties,r.minProperties=n.minProperties,r.pattern=g(n.pattern),r.imports.push(...n.imports),r.enum.push(...n.enum),r.enums.push(...n.enums),r.properties.push(...n.properties),r}}}return r}(e,ne(e,a.requestBody));p.imports.push(...n.imports),p.parameters.push(n),p.parametersBody=n}if(a.responses){const n=function(e,n){const r=[];for(const t in n)if(n.hasOwnProperty(t)){const a=ne(e,n[t]),o=ce(t);if(o){const n=pe(e,a,o);r.push(n)}}return r.sort(((e,n)=>e.code<n.code?-1:e.code>n.code?1:0))}(e,a.responses),r=de(n);p.errors=function(e){return e.filter((e=>e.code>=300&&e.description)).map((e=>{return{code:e.code,description:(n=e.description,n.replace(/([^\\])`/g,"$1\\`").replace(/(\*\/)/g,"*_/"))};var n}))}(n),p.responseHeader=function(e){const n=e.find((e=>"header"===e.in));return n?n.name:null}(r),r.forEach((e=>{p.results.push(e),p.imports.push(...e.imports)}))}return p.parameters=p.parameters.sort(fe),p}function ye(e){const n=function(e="1.0"){return String(e).replace(/^v/gi,"")}(e.info.version),r=function(e){var n;const r=null===(n=e.servers)||void 0===n?void 0:n[0],t=(null==r?void 0:r.variables)||{};let a=(null==r?void 0:r.url)||"";for(const e in t)t.hasOwnProperty(e)&&(a=a.replace(`{${e}}`,t[e].default));return a.replace(/\/$/g,"")}(e),t=function(e){const n=[];if(e.components)for(const r in e.components.schemas)if(e.components.schemas.hasOwnProperty(r)){const t=ae(e,e.components.schemas[r],!0,X(r).base);n.push(t)}return n}(e),a=function(e){var n;const r=new Map;for(const t in e.paths)if(e.paths.hasOwnProperty(t)){const a=e.paths[t],o=ie(e,a.parameters||[]);for(const l in a)if(a.hasOwnProperty(l))switch(l){case"get":case"put":case"post":case"delete":case"options":case"head":case"patch":const i=a[l];((null===(n=i.tags)||void 0===n?void 0:n.filter(T))||["Service"]).forEach((n=>{const a=he(e,t,l,n,i,o),s=r.get(a.service)||{name:a.service,operations:[],imports:[]};s.operations.push(a),s.imports.push(...a.imports),r.set(a.service,s)}))}}return Array.from(r.values())}(e);return{version:n,server:r,models:t,services:a}}var ve;function ge(e){return"string"==typeof e}function be(e){return e.enum.filter(((e,n,r)=>r.findIndex((n=>n.name===e.name))===n))}function Pe(e){return e.enums.filter(((e,n,r)=>r.findIndex((n=>n.name===e.name))===n))}function Oe(e,n){const r=e.toLowerCase(),t=n.toLowerCase();return r.localeCompare(t,"en")}function xe(e){return e.imports.filter(T).sort(Oe).filter((n=>e.name!==n))}function ke(e,n){const r=[];return e.map(n).forEach((e=>{r.push(...e)})),r}function Re(e){const n=Object.assign({},e);return n.operations=function(e){const n=new Map;return e.operations.map((e=>{const r=Object.assign({},e);r.imports.push(...ke(r.parameters,(e=>e.imports))),r.imports.push(...ke(r.results,(e=>e.imports)));const t=r.name,a=n.get(t)||0;return a>0&&(r.name=`${t}${a}`),n.set(t,a+1),r}))}(n),n.operations.forEach((e=>{n.imports.push(...e.imports)})),n.imports=function(e){return e.imports.filter(T).sort(Oe)}(n),n}function we(e){return Object.assign(Object.assign({},e),{models:e.models.map((e=>function(e){return Object.assign(Object.assign({},e),{imports:xe(e),enums:Pe(e),enum:be(e)})}(e))),services:e.services.map((e=>Re(e)))})}!function(e){e[e.V2=2]="V2",e[e.V3=3]="V3"}(ve||(ve={}));var qe={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(t,"header"),n,{name:"header",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\nimport type { ApiResult } from './ApiResult';\r\n\r\nexport class ApiError extends Error {\r\n public readonly url: string;\r\n public readonly status: number;\r\n public readonly statusText: string;\r\n public readonly body: any;\r\n\r\n constructor(response: ApiResult, message: string) {\r\n super(message);\r\n\r\n this.name = 'ApiError';\r\n this.url = response.url;\r\n this.status = response.status;\r\n this.statusText = response.statusText;\r\n this.body = response.body;\r\n }\r\n}"},usePartial:!0,useData:!0},Ce={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(t,"header"),n,{name:"header",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\nexport type ApiRequestOptions = {\r\n readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';\r\n readonly path: string;\r\n readonly cookies?: Record<string, any>;\r\n readonly headers?: Record<string, any>;\r\n readonly query?: Record<string, any>;\r\n readonly formData?: Record<string, any>;\r\n readonly body?: any;\r\n readonly mediaType?: string;\r\n readonly responseHeader?: string;\r\n readonly errors?: Record<number, string>;\r\n}"},usePartial:!0,useData:!0},je={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(t,"header"),n,{name:"header",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\nexport type ApiResult = {\r\n readonly url: string;\r\n readonly ok: boolean;\r\n readonly status: number;\r\n readonly statusText: string;\r\n readonly body: any;\r\n}"},usePartial:!0,useData:!0},Ae={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"async function getHeaders(options: ApiRequestOptions, formData?: FormData): Promise<Record<string, string>> {\r\n const token = await resolve(options, OpenAPI.TOKEN);\r\n const username = await resolve(options, OpenAPI.USERNAME);\r\n const password = await resolve(options, OpenAPI.PASSWORD);\r\n const additionalHeaders = await resolve(options, OpenAPI.HEADERS);\r\n const formHeaders = typeof formData?.getHeaders === 'function' && formData?.getHeaders() || {}\r\n\r\n const headers = Object.entries({\r\n Accept: 'application/json',\r\n ...additionalHeaders,\r\n ...options.headers,\r\n ...formHeaders,\r\n })\r\n .filter(([_, value]) => isDefined(value))\r\n .reduce((headers, [key, value]) => ({\r\n ...headers,\r\n [key]: String(value),\r\n }), {} as Record<string, string>);\r\n\r\n if (isStringWithValue(token)) {\r\n headers['Authorization'] = `Bearer ${token}`;\r\n }\r\n\r\n if (isStringWithValue(username) && isStringWithValue(password)) {\r\n const credentials = base64(`${username}:${password}`);\r\n headers['Authorization'] = `Basic ${credentials}`;\r\n }\r\n\r\n return headers;\r\n}"},useData:!0},De={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"function getRequestBody(options: ApiRequestOptions): any {\r\n if (options.body) {\r\n return options.body;\r\n }\r\n return;\r\n}"},useData:!0},Ie={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"function getResponseBody(response: AxiosResponse<any>): any {\r\n if (response.status !== 204) {\r\n return response.data;\r\n }\r\n return;\r\n}"},useData:!0},Ee={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"function getResponseHeader(response: AxiosResponse<any>, responseHeader?: string): string | undefined {\r\n if (responseHeader) {\r\n const content = response.headers[responseHeader];\r\n if (isString(content)) {\r\n return content;\r\n }\r\n }\r\n return;\r\n}"},useData:!0},He={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(t,"header"),n,{name:"header",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\nimport axios, { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';\r\nimport Blob from 'cross-blob'\r\nimport FormData from 'form-data';\r\n\r\nimport { ApiError } from './ApiError';\r\nimport type { ApiRequestOptions } from './ApiRequestOptions';\r\nimport type { ApiResult } from './ApiResult';\r\nimport { CancelablePromise } from './CancelablePromise';\r\nimport type { OnCancel } from './CancelablePromise';\r\nimport { OpenAPI } from './OpenAPI';\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/isString"),n,{name:"functions/isString",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/isBlob"),n,{name:"functions/isBlob",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/isSuccess"),n,{name:"functions/isSuccess",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/base64"),n,{name:"functions/base64",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"axios/getHeaders"),n,{name:"axios/getHeaders",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"axios/getRequestBody"),n,{name:"axios/getRequestBody",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"axios/sendRequest"),n,{name:"axios/sendRequest",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"axios/getResponseHeader"),n,{name:"axios/getResponseHeader",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"axios/getResponseBody"),n,{name:"axios/getResponseBody",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n/**\r\n * Request using axios client\r\n * @param options The request options from the the service\r\n * @returns CancelablePromise<T>\r\n * @throws ApiError\r\n */\r\nexport function request<T>(options: ApiRequestOptions): CancelablePromise<T> {\r\n return new CancelablePromise(async (resolve, reject, onCancel) => {\r\n try {\r\n const url = getUrl(options);\r\n const formData = getFormData(options);\r\n const body = getRequestBody(options);\r\n const headers = await getHeaders(options, formData);\r\n\r\n if (!onCancel.isCancelled) {\r\n const response = await sendRequest(options, url, formData, body, headers, onCancel);\r\n const responseBody = getResponseBody(response);\r\n const responseHeader = getResponseHeader(response, options.responseHeader);\r\n\r\n const result: ApiResult = {\r\n url,\r\n ok: isSuccess(response.status),\r\n status: response.status,\r\n statusText: response.statusText,\r\n body: responseHeader || responseBody,\r\n };\r\n\r\n catchErrors(options, result);\r\n\r\n resolve(result.body);\r\n }\r\n } catch (error) {\r\n reject(error);\r\n }\r\n });\r\n}"},usePartial:!0,useData:!0},Te={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"async function sendRequest(\r\n options: ApiRequestOptions,\r\n url: string,\r\n formData: FormData | undefined,\r\n body: any,\r\n headers: Record<string, string>,\r\n onCancel: OnCancel\r\n): Promise<AxiosResponse<any>> {\r\n const source = axios.CancelToken.source();\r\n\r\n const config: AxiosRequestConfig = {\r\n url,\r\n headers,\r\n data: body || formData,\r\n method: options.method,\r\n withCredentials: OpenAPI.WITH_CREDENTIALS,\r\n cancelToken: source.token,\r\n };\r\n\r\n onCancel(() => source.cancel('The user aborted a request.'));\r\n\r\n try {\r\n return await axios.request(config);\r\n } catch (error) {\r\n const axiosError = error as AxiosError;\r\n if (axiosError.response) {\r\n return axiosError.response;\r\n }\r\n throw error;\r\n }\r\n}"},useData:!0},Se={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(t,"header"),n,{name:"header",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\nexport class CancelError extends Error {\r\n\r\n constructor(reason: string = 'Promise was canceled') {\r\n super(reason);\r\n this.name = 'CancelError';\r\n }\r\n\r\n public get isCancelled(): boolean {\r\n return true;\r\n }\r\n}\r\n\r\nexport interface OnCancel {\r\n readonly isPending: boolean;\r\n readonly isCancelled: boolean;\r\n\r\n (cancelHandler: () => void): void;\r\n}\r\n\r\nexport class CancelablePromise<T> implements Promise<T> {\r\n readonly [Symbol.toStringTag]: string;\r\n\r\n #isPending: boolean;\r\n #isCancelled: boolean;\r\n readonly #cancelHandlers: (() => void)[];\r\n readonly #promise: Promise<T>;\r\n #resolve?: (value: T | PromiseLike<T>) => void;\r\n #reject?: (reason?: any) => void;\r\n\r\n constructor(\r\n executor: (\r\n resolve: (value: T | PromiseLike<T>) => void,\r\n reject: (reason?: any) => void,\r\n onCancel: OnCancel\r\n ) => void\r\n ) {\r\n this.#isPending = true;\r\n this.#isCancelled = false;\r\n this.#cancelHandlers = [];\r\n this.#promise = new Promise<T>((resolve, reject) => {\r\n this.#resolve = resolve;\r\n this.#reject = reject;\r\n\r\n const onResolve = (value: T | PromiseLike<T>): void => {\r\n if (!this.#isCancelled) {\r\n this.#isPending = false;\r\n this.#resolve?.(value);\r\n }\r\n };\r\n\r\n const onReject = (reason?: any): void => {\r\n this.#isPending = false;\r\n this.#reject?.(reason);\r\n };\r\n\r\n const onCancel = (cancelHandler: () => void): void => {\r\n if (this.#isPending) {\r\n this.#cancelHandlers.push(cancelHandler);\r\n }\r\n };\r\n\r\n Object.defineProperty(onCancel, 'isPending', {\r\n get: (): boolean => this.#isPending,\r\n });\r\n\r\n Object.defineProperty(onCancel, 'isCancelled', {\r\n get: (): boolean => this.#isCancelled,\r\n });\r\n\r\n return executor(onResolve, onReject, onCancel as OnCancel);\r\n });\r\n }\r\n\r\n public then<TResult1 = T, TResult2 = never>(\r\n onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,\r\n onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null\r\n ): Promise<TResult1 | TResult2> {\r\n return this.#promise.then(onFulfilled, onRejected);\r\n }\r\n\r\n public catch<TResult = never>(\r\n onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null\r\n ): Promise<T | TResult> {\r\n return this.#promise.catch(onRejected);\r\n }\r\n\r\n public finally(onFinally?: (() => void) | null): Promise<T> {\r\n return this.#promise.finally(onFinally);\r\n }\r\n\r\n public cancel(): void {\r\n if (!this.#isPending || this.#isCancelled) {\r\n return;\r\n }\r\n this.#isCancelled = true;\r\n if (this.#cancelHandlers.length) {\r\n try {\r\n for (const cancelHandler of this.#cancelHandlers) {\r\n cancelHandler();\r\n }\r\n } catch (error) {\r\n this.#reject?.(error);\r\n return;\r\n }\r\n }\r\n }\r\n\r\n public get isCancelled(): boolean {\r\n return this.#isCancelled;\r\n }\r\n}"},usePartial:!0,useData:!0},$e={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"async function getHeaders(options: ApiRequestOptions): Promise<Headers> {\r\n const token = await resolve(options, OpenAPI.TOKEN);\r\n const username = await resolve(options, OpenAPI.USERNAME);\r\n const password = await resolve(options, OpenAPI.PASSWORD);\r\n const additionalHeaders = await resolve(options, OpenAPI.HEADERS);\r\n\r\n const defaultHeaders = Object.entries({\r\n Accept: 'application/json',\r\n ...additionalHeaders,\r\n ...options.headers,\r\n })\r\n .filter(([_, value]) => isDefined(value))\r\n .reduce((headers, [key, value]) => ({\r\n ...headers,\r\n [key]: String(value),\r\n }), {} as Record<string, string>);\r\n\r\n const headers = new Headers(defaultHeaders);\r\n\r\n if (isStringWithValue(token)) {\r\n headers.append('Authorization', `Bearer ${token}`);\r\n }\r\n\r\n if (isStringWithValue(username) && isStringWithValue(password)) {\r\n const credentials = base64(`${username}:${password}`);\r\n headers.append('Authorization', `Basic ${credentials}`);\r\n }\r\n\r\n if (options.body) {\r\n if (options.mediaType) {\r\n headers.append('Content-Type', options.mediaType);\r\n } else if (isBlob(options.body)) {\r\n headers.append('Content-Type', options.body.type || 'application/octet-stream');\r\n } else if (isString(options.body)) {\r\n headers.append('Content-Type', 'text/plain');\r\n } else {\r\n headers.append('Content-Type', 'application/json');\r\n }\r\n }\r\n\r\n return headers;\r\n}"},useData:!0},Ne={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"function getRequestBody(options: ApiRequestOptions): BodyInit | undefined {\r\n if (options.body) {\r\n if (options.mediaType?.includes('/json')) {\r\n return JSON.stringify(options.body)\r\n } else if (isString(options.body) || isBlob(options.body)) {\r\n return options.body;\r\n } else {\r\n return JSON.stringify(options.body);\r\n }\r\n }\r\n return;\r\n}"},useData:!0},Be={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"async function getResponseBody(response: Response): Promise<any> {\r\n if (response.status !== 204) {\r\n try {\r\n const contentType = response.headers.get('Content-Type');\r\n if (contentType) {\r\n const isJSON = contentType.toLowerCase().startsWith('application/json');\r\n if (isJSON) {\r\n return await response.json();\r\n } else {\r\n return await response.text();\r\n }\r\n }\r\n } catch (error) {\r\n console.error(error);\r\n }\r\n }\r\n return;\r\n}"},useData:!0},Le={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"function getResponseHeader(response: Response, responseHeader?: string): string | undefined {\r\n if (responseHeader) {\r\n const content = response.headers.get(responseHeader);\r\n if (isString(content)) {\r\n return content;\r\n }\r\n }\r\n return;\r\n}"},useData:!0},Me={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(t,"header"),n,{name:"header",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\nimport { ApiError } from './ApiError';\r\nimport type { ApiRequestOptions } from './ApiRequestOptions';\r\nimport type { ApiResult } from './ApiResult';\r\nimport { CancelablePromise } from './CancelablePromise';\r\nimport type { OnCancel } from './CancelablePromise';\r\nimport { OpenAPI } from './OpenAPI';\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/isString"),n,{name:"functions/isString",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/isBlob"),n,{name:"functions/isBlob",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/base64"),n,{name:"functions/base64",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"fetch/getHeaders"),n,{name:"fetch/getHeaders",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"fetch/getRequestBody"),n,{name:"fetch/getRequestBody",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"fetch/sendRequest"),n,{name:"fetch/sendRequest",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"fetch/getResponseHeader"),n,{name:"fetch/getResponseHeader",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"fetch/getResponseBody"),n,{name:"fetch/getResponseBody",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n/**\r\n * Request using fetch client\r\n * @param options The request options from the the service\r\n * @returns CancelablePromise<T>\r\n * @throws ApiError\r\n */\r\nexport function request<T>(options: ApiRequestOptions): CancelablePromise<T> {\r\n return new CancelablePromise(async (resolve, reject, onCancel) => {\r\n try {\r\n const url = getUrl(options);\r\n const formData = getFormData(options);\r\n const body = getRequestBody(options);\r\n const headers = await getHeaders(options);\r\n\r\n if (!onCancel.isCancelled) {\r\n const response = await sendRequest(options, url, formData, body, headers, onCancel);\r\n const responseBody = await getResponseBody(response);\r\n const responseHeader = getResponseHeader(response, options.responseHeader);\r\n\r\n const result: ApiResult = {\r\n url,\r\n ok: response.ok,\r\n status: response.status,\r\n statusText: response.statusText,\r\n body: responseHeader || responseBody,\r\n };\r\n\r\n catchErrors(options, result);\r\n\r\n resolve(result.body);\r\n }\r\n } catch (error) {\r\n reject(error);\r\n }\r\n });\r\n}"},usePartial:!0,useData:!0},Fe={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"async function sendRequest(\r\n options: ApiRequestOptions,\r\n url: string,\r\n formData: FormData | undefined,\r\n body: BodyInit | undefined,\r\n headers: Headers,\r\n onCancel: OnCancel\r\n): Promise<Response> {\r\n const controller = new AbortController();\r\n\r\n const request: RequestInit = {\r\n headers,\r\n body: body || formData,\r\n method: options.method,\r\n signal: controller.signal,\r\n };\r\n\r\n if (OpenAPI.WITH_CREDENTIALS) {\r\n request.credentials = OpenAPI.CREDENTIALS;\r\n }\r\n\r\n onCancel(() => controller.abort());\r\n\r\n return await fetch(url, request);\r\n}"},useData:!0},Ue={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"function base64(str: string): string {\r\n try {\r\n return btoa(str);\r\n } catch (err) {\r\n // @ts-ignore\r\n return Buffer.from(str).toString('base64');\r\n }\r\n}"},useData:!0},We={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"function catchErrors(options: ApiRequestOptions, result: ApiResult): void {\r\n const errors: Record<number, string> = {\r\n 400: 'Bad Request',\r\n 401: 'Unauthorized',\r\n 403: 'Forbidden',\r\n 404: 'Not Found',\r\n 500: 'Internal Server Error',\r\n 502: 'Bad Gateway',\r\n 503: 'Service Unavailable',\r\n ...options.errors,\r\n }\r\n\r\n const error = errors[result.status];\r\n if (error) {\r\n throw new ApiError(result, error);\r\n }\r\n\r\n if (!result.ok) {\r\n throw new ApiError(result, 'Generic Error');\r\n }\r\n}"},useData:!0},_e={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"function getFormData(options: ApiRequestOptions): FormData | undefined {\r\n if (options.formData) {\r\n const formData = new FormData();\r\n\r\n const append = (key: string, value: any) => {\r\n if (isString(value) || isBlob(value)) {\r\n formData.append(key, value);\r\n } else {\r\n formData.append(key, JSON.stringify(value));\r\n }\r\n };\r\n\r\n Object.entries(options.formData)\r\n .filter(([_, value]) => isDefined(value))\r\n .forEach(([key, value]) => {\r\n if (Array.isArray(value)) {\r\n value.forEach(v => append(key, v));\r\n } else {\r\n append(key, value);\r\n }\r\n });\r\n\r\n return formData;\r\n }\r\n return;\r\n}"},useData:!0},Ve={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"function getQueryString(params: Record<string, any>): string {\r\n const qs: string[] = [];\r\n\r\n const append = (key: string, value: any) => {\r\n qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);\r\n };\r\n\r\n Object.entries(params)\r\n .filter(([_, value]) => isDefined(value))\r\n .forEach(([key, value]) => {\r\n if (Array.isArray(value)) {\r\n value.forEach(v => append(key, v));\r\n } else {\r\n append(key, value);\r\n }\r\n });\r\n\r\n if (qs.length > 0) {\r\n return `?${qs.join('&')}`;\r\n }\r\n\r\n return '';\r\n}"},useData:!0},ze={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"function getUrl(options: ApiRequestOptions): string {\r\n const path = OpenAPI.ENCODE_PATH ? OpenAPI.ENCODE_PATH(options.path) : options.path;\r\n const url = `${OpenAPI.BASE}${path}`;\r\n if (options.query) {\r\n return `${url}${getQueryString(options.query)}`;\r\n }\r\n\r\n return url;\r\n}"},useData:!0},Qe={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"function isBlob(value: any): value is Blob {\r\n return value instanceof Blob;\r\n}"},useData:!0},Je={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"function isDefined<T>(value: T | null | undefined): value is Exclude<T, null | undefined> {\r\n return value !== undefined && value !== null;\r\n}"},useData:!0},Ze={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"function isString(value: any): value is string {\r\n return typeof value === 'string';\r\n}"},useData:!0},Ge={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"function isStringWithValue(value: any): value is string {\r\n return isString(value) && value !== '';\r\n}"},useData:!0},Xe={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"function isSuccess(status: number): boolean {\r\n return status >= 200 && status < 300;\r\n}"},useData:!0},Ke={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\r\n\r\nasync function resolve<T>(options: ApiRequestOptions, resolver?: T | Resolver<T>): Promise<T | undefined> {\r\n if (typeof resolver === 'function') {\r\n return (resolver as Resolver<T>)(options);\r\n }\r\n return resolver;\r\n}"},useData:!0},Ye={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"async function getHeaders(options: ApiRequestOptions): Promise<Headers> {\r\n const token = await resolve(options, OpenAPI.TOKEN);\r\n const username = await resolve(options, OpenAPI.USERNAME);\r\n const password = await resolve(options, OpenAPI.PASSWORD);\r\n const additionalHeaders = await resolve(options, OpenAPI.HEADERS);\r\n\r\n const defaultHeaders = Object.entries({\r\n Accept: 'application/json',\r\n ...additionalHeaders,\r\n ...options.headers,\r\n })\r\n .filter(([_, value]) => isDefined(value))\r\n .reduce((headers, [key, value]) => ({\r\n ...headers,\r\n [key]: String(value),\r\n }), {} as Record<string, string>);\r\n\r\n const headers = new Headers(defaultHeaders);\r\n\r\n if (isStringWithValue(token)) {\r\n headers.append('Authorization', `Bearer ${token}`);\r\n }\r\n\r\n if (isStringWithValue(username) && isStringWithValue(password)) {\r\n const credentials = base64(`${username}:${password}`);\r\n headers.append('Authorization', `Basic ${credentials}`);\r\n }\r\n\r\n if (options.body) {\r\n if (options.mediaType) {\r\n headers.append('Content-Type', options.mediaType);\r\n } else if (isBlob(options.body)) {\r\n headers.append('Content-Type', 'application/octet-stream');\r\n } else if (isString(options.body)) {\r\n headers.append('Content-Type', 'text/plain');\r\n } else {\r\n headers.append('Content-Type', 'application/json');\r\n }\r\n }\r\n return headers;\r\n}"},useData:!0},en={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"function getRequestBody(options: ApiRequestOptions): BodyInit | undefined {\r\n if (options.body) {\r\n if (options.mediaType?.includes('/json')) {\r\n return JSON.stringify(options.body)\r\n } else if (isString(options.body) || isBlob(options.body)) {\r\n return options.body as any;\r\n } else {\r\n return JSON.stringify(options.body);\r\n }\r\n }\r\n return;\r\n}"},useData:!0},nn={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"async function getResponseBody(response: Response): Promise<any> {\r\n if (response.status !== 204) {\r\n try {\r\n const contentType = response.headers.get('Content-Type');\r\n if (contentType) {\r\n const isJSON = contentType.toLowerCase().startsWith('application/json');\r\n if (isJSON) {\r\n return await response.json();\r\n } else {\r\n return await response.text();\r\n }\r\n }\r\n } catch (error) {\r\n console.error(error);\r\n }\r\n }\r\n return;\r\n}"},useData:!0},rn={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"function getResponseHeader(response: Response, responseHeader?: string): string | undefined {\r\n if (responseHeader) {\r\n const content = response.headers.get(responseHeader);\r\n if (isString(content)) {\r\n return content;\r\n }\r\n }\r\n return;\r\n}"},useData:!0},tn={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(t,"header"),n,{name:"header",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\nimport { AbortController } from 'abort-controller';\r\nimport Blob from 'cross-blob'\r\nimport FormData from 'form-data';\r\nimport fetch, { BodyInit, Headers, RequestInit, Response } from 'node-fetch';\r\n\r\nimport { ApiError } from './ApiError';\r\nimport type { ApiRequestOptions } from './ApiRequestOptions';\r\nimport type { ApiResult } from './ApiResult';\r\nimport { CancelablePromise } from './CancelablePromise';\r\nimport type { OnCancel } from './CancelablePromise';\r\nimport { OpenAPI } from './OpenAPI';\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/isString"),n,{name:"functions/isString",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/isBlob"),n,{name:"functions/isBlob",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/base64"),n,{name:"functions/base64",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"node/getHeaders"),n,{name:"node/getHeaders",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"node/getRequestBody"),n,{name:"node/getRequestBody",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"node/sendRequest"),n,{name:"node/sendRequest",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"node/getResponseHeader"),n,{name:"node/getResponseHeader",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"node/getResponseBody"),n,{name:"node/getResponseBody",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n/**\r\n * Request using node-fetch client\r\n * @param options The request options from the the service\r\n * @returns CancelablePromise<T>\r\n * @throws ApiError\r\n */\r\nexport function request<T>(options: ApiRequestOptions): CancelablePromise<T> {\r\n return new CancelablePromise(async (resolve, reject, onCancel) => {\r\n try {\r\n const url = getUrl(options);\r\n const formData = getFormData(options);\r\n const body = getRequestBody(options);\r\n const headers = await getHeaders(options);\r\n\r\n if (!onCancel.isCancelled) {\r\n const response = await sendRequest(options, url, formData, body, headers, onCancel);\r\n const responseBody = await getResponseBody(response);\r\n const responseHeader = getResponseHeader(response, options.responseHeader);\r\n\r\n const result: ApiResult = {\r\n url,\r\n ok: response.ok,\r\n status: response.status,\r\n statusText: response.statusText,\r\n body: responseHeader || responseBody,\r\n };\r\n\r\n catchErrors(options, result);\r\n\r\n resolve(result.body);\r\n }\r\n } catch (error) {\r\n reject(error);\r\n }\r\n });\r\n}"},usePartial:!0,useData:!0},an={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"async function sendRequest(\r\n options: ApiRequestOptions,\r\n url: string,\r\n formData: FormData | undefined,\r\n body: BodyInit | undefined,\r\n headers: Headers,\r\n onCancel: OnCancel\r\n): Promise<Response> {\r\n const controller = new AbortController();\r\n\r\n const request: RequestInit = {\r\n headers,\r\n method: options.method,\r\n body: body || formData,\r\n signal: controller.signal,\r\n };\r\n\r\n onCancel(() => controller.abort());\r\n\r\n return await fetch(url, request);\r\n}"},useData:!0},on={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(s(t,"header"),n,{name:"header",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\nimport type { ApiRequestOptions } from './ApiRequestOptions';\r\n\r\ntype Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\r\ntype Headers = Record<string, string>;\r\n\r\ntype Config = {\r\n BASE: string;\r\n VERSION: string;\r\n WITH_CREDENTIALS: boolean;\r\n CREDENTIALS: 'include' | 'omit' | 'same-origin';\r\n TOKEN?: string | Resolver<string>;\r\n USERNAME?: string | Resolver<string>;\r\n PASSWORD?: string | Resolver<string>;\r\n HEADERS?: Headers | Resolver<Headers>;\r\n ENCODE_PATH?: (path: string) => string;\r\n}\r\n\r\nexport const OpenAPI: Config = {\r\n BASE: '"+(null!=(o=i(l(n,"server",{start:{line:21,column:14},end:{line:21,column:20}}),n))?o:"")+"',\r\n VERSION: '"+(null!=(o=i(l(n,"version",{start:{line:22,column:17},end:{line:22,column:24}}),n))?o:"")+"',\r\n WITH_CREDENTIALS: false,\r\n CREDENTIALS: 'include',\r\n TOKEN: undefined,\r\n USERNAME: undefined,\r\n PASSWORD: undefined,\r\n HEADERS: undefined,\r\n ENCODE_PATH: undefined,\r\n};"},usePartial:!0,useData:!0},ln={1:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(t,"fetch/request"),n,{name:"fetch/request",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:""},3:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(t,"xhr/request"),n,{name:"xhr/request",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:""},5:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(t,"axios/request"),n,{name:"axios/request",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:""},7:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(t,"node/request"),n,{name:"node/request",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(r,"equals").call(l,i(i(a,"root"),"httpClient"),"fetch",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:67}}}))?o:"")+(null!=(o=i(r,"equals").call(l,i(i(a,"root"),"httpClient"),"xhr",{name:"equals",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:63}}}))?o:"")+(null!=(o=i(r,"equals").call(l,i(i(a,"root"),"httpClient"),"axios",{name:"equals",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:3,column:67}}}))?o:"")+(null!=(o=i(r,"equals").call(l,i(i(a,"root"),"httpClient"),"node",{name:"equals",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:4,column:65}}}))?o:"")},usePartial:!0,useData:!0},sn={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"async function getHeaders(options: ApiRequestOptions): Promise<Headers> {\r\n const token = await resolve(options, OpenAPI.TOKEN);\r\n const username = await resolve(options, OpenAPI.USERNAME);\r\n const password = await resolve(options, OpenAPI.PASSWORD);\r\n const additionalHeaders = await resolve(options, OpenAPI.HEADERS);\r\n\r\n const defaultHeaders = Object.entries({\r\n Accept: 'application/json',\r\n ...additionalHeaders,\r\n ...options.headers,\r\n })\r\n .filter(([_, value]) => isDefined(value))\r\n .reduce((headers, [key, value]) => ({\r\n ...headers,\r\n [key]: String(value),\r\n }), {} as Record<string, string>);\r\n\r\n const headers = new Headers(defaultHeaders);\r\n\r\n if (isStringWithValue(token)) {\r\n headers.append('Authorization', `Bearer ${token}`);\r\n }\r\n\r\n if (isStringWithValue(username) && isStringWithValue(password)) {\r\n const credentials = base64(`${username}:${password}`);\r\n headers.append('Authorization', `Basic ${credentials}`);\r\n }\r\n\r\n if (options.body) {\r\n if (options.mediaType) {\r\n headers.append('Content-Type', options.mediaType);\r\n } else if (isBlob(options.body)) {\r\n headers.append('Content-Type', options.body.type || 'application/octet-stream');\r\n } else if (isString(options.body)) {\r\n headers.append('Content-Type', 'text/plain');\r\n } else {\r\n headers.append('Content-Type', 'application/json');\r\n }\r\n }\r\n return headers;\r\n}"},useData:!0},un={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"function getRequestBody(options: ApiRequestOptions): any {\r\n if (options.body) {\r\n if (options.mediaType?.includes('/json')) {\r\n return JSON.stringify(options.body)\r\n } else if (isString(options.body) || isBlob(options.body)) {\r\n return options.body;\r\n } else {\r\n return JSON.stringify(options.body);\r\n }\r\n }\r\n\r\n return;\r\n}"},useData:!0},pn={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"function getResponseBody(xhr: XMLHttpRequest): any {\r\n if (xhr.status !== 204) {\r\n try {\r\n const contentType = xhr.getResponseHeader('Content-Type');\r\n if (contentType) {\r\n const isJSON = contentType.toLowerCase().startsWith('application/json');\r\n if (isJSON) {\r\n return JSON.parse(xhr.responseText);\r\n } else {\r\n return xhr.responseText;\r\n }\r\n }\r\n } catch (error) {\r\n console.error(error);\r\n }\r\n }\r\n return;\r\n}"},useData:!0},cn={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"function getResponseHeader(xhr: XMLHttpRequest, responseHeader?: string): string | undefined {\r\n if (responseHeader) {\r\n const content = xhr.getResponseHeader(responseHeader);\r\n if (isString(content)) {\r\n return content;\r\n }\r\n }\r\n return;\r\n}"},useData:!0},mn={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(t,"header"),n,{name:"header",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\nimport { ApiError } from './ApiError';\r\nimport type { ApiRequestOptions } from './ApiRequestOptions';\r\nimport type { ApiResult } from './ApiResult';\r\nimport { CancelablePromise } from './CancelablePromise';\r\nimport type { OnCancel } from './CancelablePromise';\r\nimport { OpenAPI } from './OpenAPI';\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/isDefined"),n,{name:"functions/isDefined",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/isString"),n,{name:"functions/isString",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/isStringWithValue"),n,{name:"functions/isStringWithValue",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/isBlob"),n,{name:"functions/isBlob",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/isSuccess"),n,{name:"functions/isSuccess",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/base64"),n,{name:"functions/base64",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/getQueryString"),n,{name:"functions/getQueryString",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/getUrl"),n,{name:"functions/getUrl",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/getFormData"),n,{name:"functions/getFormData",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/resolve"),n,{name:"functions/resolve",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"fetch/getHeaders"),n,{name:"fetch/getHeaders",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"xhr/getRequestBody"),n,{name:"xhr/getRequestBody",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"xhr/sendRequest"),n,{name:"xhr/sendRequest",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"xhr/getResponseHeader"),n,{name:"xhr/getResponseHeader",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"xhr/getResponseBody"),n,{name:"xhr/getResponseBody",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n"+(null!=(o=e.invokePartial(l(t,"functions/catchErrors"),n,{name:"functions/catchErrors",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n\r\n/**\r\n * Request using XHR client\r\n * @param options The request options from the the service\r\n * @returns CancelablePromise<T>\r\n * @throws ApiError\r\n */\r\nexport function request<T>(options: ApiRequestOptions): CancelablePromise<T> {\r\n return new CancelablePromise(async (resolve, reject, onCancel) => {\r\n try {\r\n const url = getUrl(options);\r\n const formData = getFormData(options);\r\n const body = getRequestBody(options);\r\n const headers = await getHeaders(options);\r\n\r\n if (!onCancel.isCancelled) {\r\n const response = await sendRequest(options, url, formData, body, headers, onCancel);\r\n const responseBody = getResponseBody(response);\r\n const responseHeader = getResponseHeader(response, options.responseHeader);\r\n\r\n const result: ApiResult = {\r\n url,\r\n ok: isSuccess(response.status),\r\n status: response.status,\r\n statusText: response.statusText,\r\n body: responseHeader || responseBody,\r\n };\r\n\r\n catchErrors(options, result);\r\n\r\n resolve(result.body);\r\n }\r\n } catch (error) {\r\n reject(error);\r\n }\r\n });\r\n}"},usePartial:!0,useData:!0},dn={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"async function sendRequest(\r\n options: ApiRequestOptions,\r\n url: string,\r\n formData: FormData | undefined,\r\n body: any,\r\n headers: Headers,\r\n onCancel: OnCancel\r\n): Promise<XMLHttpRequest> {\r\n const xhr = new XMLHttpRequest();\r\n xhr.open(options.method, url, true);\r\n xhr.withCredentials = OpenAPI.WITH_CREDENTIALS;\r\n\r\n headers.forEach((value, key) => {\r\n xhr.setRequestHeader(key, value);\r\n });\r\n\r\n return new Promise<XMLHttpRequest>((resolve, reject) => {\r\n xhr.onload = () => resolve(xhr);\r\n xhr.onabort = () => reject(new Error('The user aborted a request.'));\r\n xhr.onerror = () => reject(new Error('Network error.'));\r\n xhr.send(body || formData);\r\n\r\n onCancel(() => xhr.abort());\r\n });\r\n}"},useData:!0},fn={1:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\r\n"+(null!=(o=l(r,"each").call(null!=n?n:e.nullContext||{},l(n,"imports"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:0},end:{line:7,column:9}}}))?o:"")},2:function(e,n,r,t,a){var o,l=e.lambda;return"import type { "+(null!=(o=l(n,n))?o:"")+" } from './"+(null!=(o=l(n,n))?o:"")+"';\r\n"},4:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(t,"exportInterface"),n,{name:"exportInterface",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:""},6:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"one-of",{name:"equals",hash:{},fn:e.program(7,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:12,column:0},end:{line:26,column:0}}}))?o:""},7:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(t,"exportComposition"),n,{name:"exportComposition",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:""},9:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"any-of",{name:"equals",hash:{},fn:e.program(7,a,0),inverse:e.program(10,a,0),data:a,loc:{start:{line:14,column:0},end:{line:26,column:0}}}))?o:""},10:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"all-of",{name:"equals",hash:{},fn:e.program(7,a,0),inverse:e.program(11,a,0),data:a,loc:{start:{line:16,column:0},end:{line:26,column:0}}}))?o:""},11:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"enum",{name:"equals",hash:{},fn:e.program(12,a,0),inverse:e.program(13,a,0),data:a,loc:{start:{line:18,column:0},end:{line:26,column:0}}}))?o:""},12:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"if").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useUnionTypes"),{name:"if",hash:{},fn:e.program(13,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:19,column:0},end:{line:23,column:7}}}))?o:""},13:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(t,"exportType"),n,{name:"exportType",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:""},15:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(t,"exportEnum"),n,{name:"exportEnum",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(t,"header"),n,{name:"header",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n"+(null!=(o=i(r,"if").call(l,i(n,"imports"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:8,column:7}}}))?o:"")+"\r\n"+(null!=(o=i(r,"equals").call(l,i(n,"export"),"interface",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:10,column:0},end:{line:26,column:11}}}))?o:"")},usePartial:!0,useData:!0},hn={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(t,"header"),n,{name:"header",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\nexport const $"+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:3,column:17},end:{line:3,column:21}}),n))?o:"")+" = "+(null!=(o=e.invokePartial(l(t,"schema"),n,{name:"schema",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+" as const;"},usePartial:!0,useData:!0},yn={1:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"each").call(null!=n?n:e.nullContext||{},l(n,"imports"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:6,column:9}}}))?o:""},2:function(e,n,r,t,a){var o,l=e.lambda;return"import type { "+(null!=(o=l(n,n))?o:"")+" } from '../models/"+(null!=(o=l(n,n))?o:"")+"';\r\n"},4:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"hasLength").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"hasLength",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:11,column:2},end:{line:21,column:16}}}))?o:""},5:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"hasProperty").call(null!=n?n:e.nullContext||{},l(n,"parameters"),"path",{name:"hasProperty",hash:{},fn:e.program(6,a,0),inverse:e.program(14,a,0),data:a,loc:{start:{line:12,column:2},end:{line:20,column:18}}}))?o:""},6:function(e,n,r,t,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" "+(null!=(o=i(r,"capitalizeFirstLetter").call(l,i(n,"name"),{name:"capitalizeFirstLetter",hash:{},data:a,loc:{start:{line:13,column:2},end:{line:13,column:32}}}))?o:"")+": ({ "+(null!=(o=i(r,"each").call(l,i(n,"parameters"),{name:"each",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:37},end:{line:14,column:50}}}))?o:"")+"\r\n }: { "+(null!=(o=i(r,"each").call(l,i(n,"parameters"),{name:"each",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a,loc:{start:{line:15,column:7},end:{line:16,column:98}}}))?o:"")+"\r\n }) => `"+(null!=(o=e.lambda(e.strict(n,"path",{start:{line:17,column:11},end:{line:17,column:15}}),n))?o:"")+"`,\r\n"},7:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"in"),"path",{name:"equals",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:57},end:{line:14,column:41}}}))?o:""},8:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\r\n "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:14,column:7},end:{line:14,column:11}}),n))?o:"")+(null!=(o=e.invokePartial(l(t,"isRequired"),n,{name:"isRequired",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+","},10:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"in"),"path",{name:"equals",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a,loc:{start:{line:15,column:27},end:{line:16,column:89}}}))?o:""},11:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\r\n "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:16,column:7},end:{line:16,column:11}}),n))?o:"")+(null!=(o=e.invokePartial(l(t,"isRequired"),n,{name:"isRequired",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(l(t,"type"),n,{name:"type",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+(null!=(o=l(r,"if").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"if",hash:{},fn:e.program(12,a,0),inverse:e.noop,data:a,loc:{start:{line:16,column:40},end:{line:16,column:78}}}))?o:"")},12:function(e,n,r,t,a){var o;return" = "+(null!=(o=e.lambda(e.strict(n,"default",{start:{line:16,column:61},end:{line:16,column:68}}),n))?o:"")},14:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" "+(null!=(o=l(r,"capitalizeFirstLetter").call(null!=n?n:e.nullContext||{},l(n,"name"),{name:"capitalizeFirstLetter",hash:{},data:a,loc:{start:{line:19,column:2},end:{line:19,column:32}}}))?o:"")+": '"+(null!=(o=e.lambda(e.strict(n,"path",{start:{line:19,column:37},end:{line:19,column:41}}),n))?o:"")+"',\r\n"},16:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"hasLength").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"hasLength",hash:{},fn:e.program(17,a,0),inverse:e.noop,data:a,loc:{start:{line:26,column:0},end:{line:41,column:14}}}))?o:""},17:function(e,n,r,t,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"/**\r\n"+(null!=(o=i(r,"each").call(l,i(n,"parameters"),{name:"each",hash:{},fn:e.program(18,a,0),inverse:e.noop,data:a,loc:{start:{line:28,column:0},end:{line:32,column:9}}}))?o:"")+" */\r\nexport type "+(null!=(o=i(r,"capitalizeFirstLetter").call(l,i(n,"name"),{name:"capitalizeFirstLetter",hash:{},data:a,loc:{start:{line:34,column:12},end:{line:34,column:42}}}))?o:"")+" = {\r\n response: "+(null!=(o=i(r,"each").call(l,i(n,"results"),{name:"each",hash:{},fn:e.program(21,a,0),inverse:e.noop,data:a,loc:{start:{line:35,column:12},end:{line:35,column:48}}}))?o:"")+"\r\n request: {\r\n "+(null!=(o=e.invokePartial(i(t,"parametersType"),n,{name:"parametersType",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+" }\r\n}\r\n\r\n"},18:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"if").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"if",hash:{},fn:e.program(19,a,0),inverse:e.noop,data:a,loc:{start:{line:29,column:0},end:{line:31,column:7}}}))?o:""},19:function(e,n,r,t,a){var o,l=e.strict,i=e.lambda;return" * @type "+(null!=(o=i(l(n,"name",{start:{line:30,column:12},end:{line:30,column:16}}),n))?o:"")+" = "+(null!=(o=i(l(n,"default",{start:{line:30,column:24},end:{line:30,column:31}}),n))?o:"")+"\r\n"},21:function(e,n,r,t,a){var o;return null!=(o=e.lambda(e.strict(n,"type",{start:{line:35,column:32},end:{line:35,column:36}}),n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=null!=n?n:e.nullContext||{},i=e.strict,s=e.lambda,u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(u(t,"header"),n,{name:"header",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n"+(null!=(o=u(r,"if").call(l,u(n,"imports"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:7,column:7}}}))?o:"")+"\r\nexport const "+(null!=(o=s(i(n,"name",{start:{line:9,column:16},end:{line:9,column:20}}),n))?o:"")+(null!=(o=s(i(u(a,"root"),"postfix",{start:{line:9,column:26},end:{line:9,column:39}}),n))?o:"")+"Url = {\r\n"+(null!=(o=u(r,"each").call(l,u(n,"operations"),{name:"each",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:2},end:{line:22,column:11}}}))?o:"")+"}\r\n\r\n"+(null!=(o=u(r,"each").call(l,u(n,"operations"),{name:"each",hash:{},fn:e.program(16,a,0),inverse:e.noop,data:a,loc:{start:{line:25,column:0},end:{line:42,column:9}}}))?o:"")},usePartial:!0,useData:!0},vn={1:function(e,n,r,t,a){return"\r\nexport { ApiError } from './core/ApiError';\r\nexport { CancelablePromise } from './core/CancelablePromise';\r\nexport { OpenAPI } from './core/OpenAPI';\r\n"},3:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"if").call(null!=n?n:e.nullContext||{},l(n,"models"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:22,column:7}}}))?o:""},4:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\r\n"+(null!=(o=l(r,"each").call(null!=n?n:e.nullContext||{},l(n,"models"),{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:11,column:0},end:{line:21,column:9}}}))?o:"")},5:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"if").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useUnionTypes"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.program(8,a,0),data:a,loc:{start:{line:12,column:0},end:{line:20,column:7}}}))?o:""},6:function(e,n,r,t,a){var o,l=e.strict,i=e.lambda;return"export type { "+(null!=(o=i(l(n,"name",{start:{line:13,column:17},end:{line:13,column:21}}),n))?o:"")+" } from './models/"+(null!=(o=i(l(n,"name",{start:{line:13,column:45},end:{line:13,column:49}}),n))?o:"")+"';\r\n"},8:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"if").call(null!=n?n:e.nullContext||{},l(n,"enum"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.program(11,a,0),data:a,loc:{start:{line:14,column:0},end:{line:20,column:0}}}))?o:""},9:function(e,n,r,t,a){var o,l=e.strict,i=e.lambda;return"export { "+(null!=(o=i(l(n,"name",{start:{line:15,column:12},end:{line:15,column:16}}),n))?o:"")+" } from './models/"+(null!=(o=i(l(n,"name",{start:{line:15,column:40},end:{line:15,column:44}}),n))?o:"")+"';\r\n"},11:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"if").call(null!=n?n:e.nullContext||{},l(n,"enums"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:16,column:0},end:{line:20,column:0}}}))?o:""},13:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"if").call(null!=n?n:e.nullContext||{},l(n,"models"),{name:"if",hash:{},fn:e.program(14,a,0),inverse:e.noop,data:a,loc:{start:{line:25,column:0},end:{line:30,column:7}}}))?o:""},14:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\r\n"+(null!=(o=l(r,"each").call(null!=n?n:e.nullContext||{},l(n,"models"),{name:"each",hash:{},fn:e.program(15,a,0),inverse:e.noop,data:a,loc:{start:{line:27,column:0},end:{line:29,column:9}}}))?o:"")},15:function(e,n,r,t,a){var o,l=e.strict,i=e.lambda;return"export { $"+(null!=(o=i(l(n,"name",{start:{line:28,column:13},end:{line:28,column:17}}),n))?o:"")+" } from './schemas/$"+(null!=(o=i(l(n,"name",{start:{line:28,column:43},end:{line:28,column:47}}),n))?o:"")+"';\r\n"},17:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"if").call(null!=n?n:e.nullContext||{},l(n,"services"),{name:"if",hash:{},fn:e.program(18,a,0),inverse:e.noop,data:a,loc:{start:{line:34,column:0},end:{line:38,column:7}}}))?o:""},18:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"each").call(null!=n?n:e.nullContext||{},l(n,"services"),{name:"each",hash:{},fn:e.program(19,a,0),inverse:e.noop,data:a,loc:{start:{line:35,column:0},end:{line:37,column:9}}}))?o:""},19:function(e,n,r,t,a){var o,l=e.strict,i=e.lambda,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"export { "+(null!=(o=i(l(n,"name",{start:{line:36,column:12},end:{line:36,column:16}}),n))?o:"")+(null!=(o=i(l(s(a,"root"),"postfix",{start:{line:36,column:22},end:{line:36,column:35}}),n))?o:"")+"Url } from './services/"+(null!=(o=i(l(n,"name",{start:{line:36,column:64},end:{line:36,column:68}}),n))?o:"")+(null!=(o=i(l(s(a,"root"),"postfix",{start:{line:36,column:74},end:{line:36,column:87}}),n))?o:"")+"';\r\n"},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(i(t,"header"),n,{name:"header",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+(null!=(o=i(r,"if").call(l,i(i(a,"root"),"exportCore"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:7,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(i(a,"root"),"exportModels"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:23,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(i(a,"root"),"exportSchemas"),{name:"if",hash:{},fn:e.program(13,a,0),inverse:e.noop,data:a,loc:{start:{line:24,column:0},end:{line:31,column:7}}}))?o:"")+"\r\n"+(null!=(o=i(r,"if").call(l,i(i(a,"root"),"exportServices"),{name:"if",hash:{},fn:e.program(17,a,0),inverse:e.noop,data:a,loc:{start:{line:33,column:0},end:{line:39,column:7}}}))?o:"")},usePartial:!0,useData:!0},gn={1:function(e,n,r,t,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(r,"equals").call(l,i(i(a,"root"),"httpClient"),"fetch",{name:"equals",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:53}}}))?o:"")+(null!=(o=i(r,"equals").call(l,i(i(a,"root"),"httpClient"),"xhr",{name:"equals",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:3,column:51}}}))?o:"")+(null!=(o=i(r,"equals").call(l,i(i(a,"root"),"httpClient"),"axios",{name:"equals",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:4,column:53}}}))?o:"")+(null!=(o=i(r,"equals").call(l,i(i(a,"root"),"httpClient"),"node",{name:"equals",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:0},end:{line:5,column:52}}}))?o:"")},2:function(e,n,r,t,a){return"Blob"},4:function(e,n,r,t,a){var o;return null!=(o=e.lambda(e.strict(n,"base",{start:{line:7,column:3},end:{line:7,column:7}}),n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"base"),"binary",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.program(4,a,0),data:a,loc:{start:{line:1,column:0},end:{line:8,column:13}}}))?o:""},useData:!0},bn={1:function(e,n,r,t,a){var o;return"/**\r\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\r\n */\r\n"},3:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"unless").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useUnionTypes"),{name:"unless",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:27,column:11}}}))?o:""},4:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\r\nexport namespace "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:10,column:20},end:{line:10,column:24}}),n))?o:"")+" {\r\n\r\n"+(null!=(o=l(r,"each").call(null!=n?n:e.nullContext||{},l(n,"enums"),{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:12,column:4},end:{line:24,column:13}}}))?o:"")+"\r\n}\r\n"},5:function(e,n,r,t,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(r,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:4},end:{line:17,column:11}}}))?o:"")+" export enum "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:18,column:19},end:{line:18,column:23}}),n))?o:"")+" {\r\n"+(null!=(o=i(r,"each").call(l,i(n,"enum"),{name:"each",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:19,column:8},end:{line:21,column:17}}}))?o:"")+" }\r\n\r\n"},6:function(e,n,r,t,a){var o;return" /**\r\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:15,column:10},end:{line:15,column:21}}),n))?o:"")+"\r\n */\r\n"},8:function(e,n,r,t,a){var o,l=e.strict,i=e.lambda;return" "+(null!=(o=i(l(n,"name",{start:{line:20,column:11},end:{line:20,column:15}}),n))?o:"")+" = "+(null!=(o=i(l(n,"value",{start:{line:20,column:24},end:{line:20,column:29}}),n))?o:"")+",\r\n"},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(r,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?o:"")+"export type "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:6,column:15},end:{line:6,column:19}}),n))?o:"")+" = "+(null!=(o=e.invokePartial(i(t,"type"),n,{name:"type",hash:{parent:i(n,"name")},data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+";\r\n"+(null!=(o=i(r,"if").call(l,i(n,"enums"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:0},end:{line:28,column:7}}}))?o:"")},usePartial:!0,useData:!0},Pn={1:function(e,n,r,t,a){var o;return"/**\r\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\r\n */\r\n"},3:function(e,n,r,t,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(r,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:4},end:{line:12,column:11}}}))?o:"")+(null!=(o=i(r,"containsSpaces").call(l,i(n,"name"),{name:"containsSpaces",hash:{},fn:e.program(6,a,0),inverse:e.program(8,a,0),data:a,loc:{start:{line:13,column:4},end:{line:17,column:23}}}))?o:"")},4:function(e,n,r,t,a){var o;return" /**\r\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:10,column:10},end:{line:10,column:21}}),n))?o:"")+"\r\n */\r\n"},6:function(e,n,r,t,a){var o,l=e.strict,i=e.lambda;return' "'+(null!=(o=i(l(n,"name",{start:{line:14,column:8},end:{line:14,column:12}}),n))?o:"")+'" = '+(null!=(o=i(l(n,"value",{start:{line:14,column:22},end:{line:14,column:27}}),n))?o:"")+",\r\n"},8:function(e,n,r,t,a){var o,l=e.strict,i=e.lambda;return" "+(null!=(o=i(l(n,"name",{start:{line:16,column:7},end:{line:16,column:11}}),n))?o:"")+" = "+(null!=(o=i(l(n,"value",{start:{line:16,column:20},end:{line:16,column:25}}),n))?o:"")+",\r\n"},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(r,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?o:"")+"export enum "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:6,column:15},end:{line:6,column:19}}),n))?o:"")+" {\r\n"+(null!=(o=i(r,"each").call(l,i(n,"enum"),{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:4},end:{line:18,column:13}}}))?o:"")+"}"},useData:!0},On={1:function(e,n,r,t,a){var o;return"/**\r\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\r\n */\r\n"},3:function(e,n,r,t,a,o,l){var i,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(i=s(r,"if").call(null!=n?n:e.nullContext||{},s(n,"description"),{name:"if",hash:{},fn:e.program(4,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:8,column:4},end:{line:12,column:11}}}))?i:"")+" "+(null!=(i=e.invokePartial(s(t,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:r,partials:t,decorators:e.decorators}))?i:"")+(null!=(i=e.lambda(e.strict(n,"name",{start:{line:13,column:22},end:{line:13,column:26}}),n))?i:"")+(null!=(i=e.invokePartial(s(t,"isRequired"),n,{name:"isRequired",data:a,helpers:r,partials:t,decorators:e.decorators}))?i:"")+": "+(null!=(i=e.invokePartial(s(t,"type"),n,{name:"type",hash:{parent:s(l[1],"name")},data:a,helpers:r,partials:t,decorators:e.decorators}))?i:"")+";\r\n"},4:function(e,n,r,t,a){var o;return" /**\r\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:10,column:10},end:{line:10,column:21}}),n))?o:"")+"\r\n */\r\n"},6:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"unless").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useUnionTypes"),{name:"unless",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:0},end:{line:36,column:11}}}))?o:""},7:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\r\nexport namespace "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:19,column:20},end:{line:19,column:24}}),n))?o:"")+" {\r\n\r\n"+(null!=(o=l(r,"each").call(null!=n?n:e.nullContext||{},l(n,"enums"),{name:"each",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:21,column:4},end:{line:33,column:13}}}))?o:"")+"\r\n}\r\n"},8:function(e,n,r,t,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(r,"if").call(l,i(n,"description"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:22,column:4},end:{line:26,column:11}}}))?o:"")+" export enum "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:27,column:19},end:{line:27,column:23}}),n))?o:"")+" {\r\n"+(null!=(o=i(r,"each").call(l,i(n,"enum"),{name:"each",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:28,column:8},end:{line:30,column:17}}}))?o:"")+" }\r\n\r\n"},9:function(e,n,r,t,a){var o,l=e.strict,i=e.lambda;return" "+(null!=(o=i(l(n,"name",{start:{line:29,column:11},end:{line:29,column:15}}),n))?o:"")+" = "+(null!=(o=i(l(n,"value",{start:{line:29,column:24},end:{line:29,column:29}}),n))?o:"")+",\r\n"},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a,o,l){var i,s=null!=n?n:e.nullContext||{},u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(i=u(r,"if").call(s,u(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?i:"")+"export type "+(null!=(i=e.lambda(e.strict(n,"name",{start:{line:6,column:15},end:{line:6,column:19}}),n))?i:"")+" = {\r\n"+(null!=(i=u(r,"each").call(s,u(n,"properties"),{name:"each",hash:{},fn:e.program(3,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:7,column:4},end:{line:14,column:13}}}))?i:"")+"}\r\n"+(null!=(i=u(r,"if").call(s,u(n,"enums"),{name:"if",hash:{},fn:e.program(6,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:16,column:0},end:{line:37,column:7}}}))?i:"")},usePartial:!0,useData:!0,useDepths:!0},xn={1:function(e,n,r,t,a){var o;return"/**\r\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:3,column:6},end:{line:3,column:17}}),n))?o:"")+"\r\n */\r\n"},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(r,"if").call(null!=n?n:e.nullContext||{},l(n,"description"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?o:"")+"export type "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:6,column:15},end:{line:6,column:19}}),n))?o:"")+" = "+(null!=(o=e.invokePartial(l(t,"type"),n,{name:"type",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+";"},usePartial:!0,useData:!0},kn={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){return"/* istanbul ignore file */\r\n/* tslint:disable */\r\n/* eslint-disable */"},useData:!0},Rn={1:function(e,n,r,t,a){return" | null"},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"if").call(null!=n?n:e.nullContext||{},l(n,"isNullable"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:32}}}))?o:""},useData:!0},wn={1:function(e,n,r,t,a){return"readonly "},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"if").call(null!=n?n:e.nullContext||{},l(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:34}}}))?o:""},useData:!0},qn={1:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"unless").call(null!=n?n:e.nullContext||{},l(n,"isRequired"),{name:"unless",hash:{},fn:e.program(2,a,0),inverse:e.program(4,a,0),data:a,loc:{start:{line:2,column:0},end:{line:2,column:54}}}))?o:""},2:function(e,n,r,t,a){return"?"},4:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"if").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:23},end:{line:2,column:43}}}))?o:""},6:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"unless").call(null!=n?n:e.nullContext||{},l(n,"isRequired"),{name:"unless",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:4,column:64}}}))?o:""},7:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"unless").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"unless",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:22},end:{line:4,column:53}}}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"if").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useOptions"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},useData:!0},Cn={1:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"if").call(null!=n?n:e.nullContext||{},l(l(a,"root"),"useOptions"),{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:2,column:0},end:{line:20,column:7}}}))?o:""},2:function(e,n,r,t,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\r\n"+(null!=(o=i(r,"each").call(l,i(n,"parameters"),{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:6,column:9}}}))?o:"")+"}: {\r\n"+(null!=(o=i(r,"each").call(l,i(n,"parameters"),{name:"each",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:13,column:9}}}))?o:"")+"}"},3:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.lambda(e.strict(n,"name",{start:{line:5,column:3},end:{line:5,column:7}}),n))?o:"")+(null!=(o=l(r,"if").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:10},end:{line:5,column:48}}}))?o:"")+",\r\n"},4:function(e,n,r,t,a){var o;return" = "+(null!=(o=e.lambda(e.strict(n,"default",{start:{line:5,column:31},end:{line:5,column:38}}),n))?o:"")},6:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(r,"if").call(null!=n?n:e.nullContext||{},l(n,"description"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:12,column:3},end:{line:12,column:7}}),n))?o:"")+(null!=(o=e.invokePartial(l(t,"isRequired"),n,{name:"isRequired",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(l(t,"type"),n,{name:"type",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+",\r\n"},7:function(e,n,r,t,a){var o;return"/** "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:10,column:7},end:{line:10,column:18}}),n))?o:"")+" **/\r\n"},9:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"\r\n"+(null!=(o=l(r,"each").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"each",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:0},end:{line:19,column:9}}}))?o:"")},10:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.lambda(e.strict(n,"name",{start:{line:18,column:3},end:{line:18,column:7}}),n))?o:"")+(null!=(o=e.invokePartial(l(t,"isRequired"),n,{name:"isRequired",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(l(t,"type"),n,{name:"type",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+(null!=(o=l(r,"if").call(null!=n?n:e.nullContext||{},l(n,"default"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:18,column:36},end:{line:18,column:74}}}))?o:"")+",\r\n"},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"if").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:21,column:7}}}))?o:""},usePartial:!0,useData:!0},jn={1:function(e,n,r,t,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=i(r,"hasProperty").call(l,i(n,"parameters"),"path",{name:"hasProperty",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:10,column:16}}}))?o:"")+(null!=(o=i(r,"hasProperty").call(l,i(n,"parameters"),"query",{name:"hasProperty",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:11,column:0},end:{line:19,column:16}}}))?o:"")+(null!=(o=i(r,"hasProperty").call(l,i(n,"parameters"),"body",{name:"hasProperty",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:20,column:0},end:{line:28,column:16}}}))?o:"")},2:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"path: {\r\n"+(null!=(o=l(r,"each").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:8,column:9}}}))?o:"")+"}\r\n"},3:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"in"),"path",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:2},end:{line:7,column:13}}}))?o:""},4:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:6,column:5},end:{line:6,column:9}}),n))?o:"")+(null!=(o=e.invokePartial(l(t,"isRequired"),n,{name:"isRequired",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(l(t,"type"),n,{name:"type",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+"\r\n"},6:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"query: {\r\n"+(null!=(o=l(r,"each").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"each",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:0},end:{line:17,column:9}}}))?o:"")+"}\r\n"},7:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"in"),"query",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:14,column:2},end:{line:16,column:13}}}))?o:""},9:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"body: {\r\n"+(null!=(o=l(r,"each").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"each",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a,loc:{start:{line:22,column:0},end:{line:26,column:9}}}))?o:"")+"}\r\n"},10:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"in"),"body",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:23,column:2},end:{line:25,column:13}}}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"if").call(null!=n?n:e.nullContext||{},l(n,"parameters"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:29,column:7}}}))?o:""},usePartial:!0,useData:!0},An={1:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"each").call(null!=n?n:e.nullContext||{},l(n,"results"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:2,column:66}}}))?o:""},2:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(t,"type"),n,{name:"type",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+(null!=(o=l(r,"unless").call(null!=n?n:e.nullContext||{},l(a,"last"),{name:"unless",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:26},end:{line:2,column:57}}}))?o:"")},3:function(e,n,r,t,a){return" | "},5:function(e,n,r,t,a){return"void"},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"if").call(null!=n?n:e.nullContext||{},l(n,"results"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(5,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},Dn={1:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(t,"schemaInterface"),n,{name:"schemaInterface",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:""},3:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"enum",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:3,column:0},end:{line:17,column:0}}}))?o:""},4:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(t,"schemaEnum"),n,{name:"schemaEnum",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:""},6:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"array",{name:"equals",hash:{},fn:e.program(7,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:5,column:0},end:{line:17,column:0}}}))?o:""},7:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(t,"schemaArray"),n,{name:"schemaArray",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:""},9:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"dictionary",{name:"equals",hash:{},fn:e.program(10,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:7,column:0},end:{line:17,column:0}}}))?o:""},10:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(t,"schemaDictionary"),n,{name:"schemaDictionary",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:""},12:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"any-of",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:9,column:0},end:{line:17,column:0}}}))?o:""},13:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(t,"schemaComposition"),n,{name:"schemaComposition",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:""},15:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"all-of",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(16,a,0),data:a,loc:{start:{line:11,column:0},end:{line:17,column:0}}}))?o:""},16:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"one-of",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(17,a,0),data:a,loc:{start:{line:13,column:0},end:{line:17,column:0}}}))?o:""},17:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(t,"schemaGeneric"),n,{name:"schemaGeneric",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"interface",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:17,column:11}}}))?o:""},usePartial:!0,useData:!0},In={1:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" contains: "+(null!=(o=e.invokePartial(l(t,"schema"),l(n,"link"),{name:"schema",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+",\r\n"},3:function(e,n,r,t,a){var o;return" contains: {\r\n type: '"+(null!=(o=e.lambda(e.strict(n,"base",{start:{line:7,column:18},end:{line:7,column:22}}),n))?o:"")+"',\r\n },\r\n"},5:function(e,n,r,t,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:11,column:19},end:{line:11,column:29}}),n))?o:"")+",\r\n"},7:function(e,n,r,t,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:14,column:19},end:{line:14,column:29}}),n))?o:"")+",\r\n"},9:function(e,n,r,t,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:17,column:19},end:{line:17,column:29}}),n))?o:"")+",\r\n"},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\r\n type: 'array',\r\n"+(null!=(o=i(r,"if").call(l,i(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:3,column:0},end:{line:9,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:0},end:{line:15,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:16,column:0},end:{line:18,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},En={1:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(t,"schema"),n,{name:"schema",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+(null!=(o=l(r,"unless").call(null!=n?n:e.nullContext||{},l(a,"last"),{name:"unless",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:46},end:{line:3,column:76}}}))?o:"")},2:function(e,n,r,t,a){return", "},4:function(e,n,r,t,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:5,column:19},end:{line:5,column:29}}),n))?o:"")+",\r\n"},6:function(e,n,r,t,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:8,column:19},end:{line:8,column:29}}),n))?o:"")+",\r\n"},8:function(e,n,r,t,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:11,column:19},end:{line:11,column:29}}),n))?o:"")+",\r\n"},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\r\n type: '"+(null!=(o=e.lambda(e.strict(n,"export",{start:{line:2,column:13},end:{line:2,column:19}}),n))?o:"")+"',\r\n contains: ["+(null!=(o=i(r,"each").call(l,i(n,"properties"),{name:"each",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:15},end:{line:3,column:85}}}))?o:"")+"],\r\n"+(null!=(o=i(r,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:6,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:7,column:0},end:{line:9,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},Hn={1:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" contains: "+(null!=(o=e.invokePartial(l(t,"schema"),l(n,"link"),{name:"schema",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+",\r\n"},3:function(e,n,r,t,a){var o;return" contains: {\r\n type: '"+(null!=(o=e.lambda(e.strict(n,"base",{start:{line:7,column:18},end:{line:7,column:22}}),n))?o:"")+"',\r\n },\r\n"},5:function(e,n,r,t,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:11,column:19},end:{line:11,column:29}}),n))?o:"")+",\r\n"},7:function(e,n,r,t,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:14,column:19},end:{line:14,column:29}}),n))?o:"")+",\r\n"},9:function(e,n,r,t,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:17,column:19},end:{line:17,column:29}}),n))?o:"")+",\r\n"},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\r\n type: 'dictionary',\r\n"+(null!=(o=i(r,"if").call(l,i(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:3,column:0},end:{line:9,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:13,column:0},end:{line:15,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:16,column:0},end:{line:18,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},Tn={1:function(e,n,r,t,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:4,column:19},end:{line:4,column:29}}),n))?o:"")+",\r\n"},3:function(e,n,r,t,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:7,column:19},end:{line:7,column:29}}),n))?o:"")+",\r\n"},5:function(e,n,r,t,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:10,column:19},end:{line:10,column:29}}),n))?o:"")+",\r\n"},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\r\n type: 'Enum',\r\n"+(null!=(o=i(r,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:5,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:6,column:0},end:{line:8,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+"}"},useData:!0},Sn={1:function(e,n,r,t,a){var o;return" type: '"+(null!=(o=e.lambda(e.strict(n,"base",{start:{line:3,column:14},end:{line:3,column:18}}),n))?o:"")+"',\r\n"},3:function(e,n,r,t,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:6,column:19},end:{line:6,column:29}}),n))?o:"")+",\r\n"},5:function(e,n,r,t,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:9,column:19},end:{line:9,column:29}}),n))?o:"")+",\r\n"},7:function(e,n,r,t,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:12,column:19},end:{line:12,column:29}}),n))?o:"")+",\r\n"},9:function(e,n,r,t,a){var o;return" format: '"+(null!=(o=e.lambda(e.strict(n,"format",{start:{line:15,column:16},end:{line:15,column:22}}),n))?o:"")+"',\r\n"},11:function(e,n,r,t,a){var o;return" maximum: "+(null!=(o=e.lambda(e.strict(n,"maximum",{start:{line:18,column:16},end:{line:18,column:23}}),n))?o:"")+",\r\n"},13:function(e,n,r,t,a){var o;return" exclusiveMaximum: "+(null!=(o=e.lambda(e.strict(n,"exclusiveMaximum",{start:{line:21,column:25},end:{line:21,column:41}}),n))?o:"")+",\r\n"},15:function(e,n,r,t,a){var o;return" minimum: "+(null!=(o=e.lambda(e.strict(n,"minimum",{start:{line:24,column:16},end:{line:24,column:23}}),n))?o:"")+",\r\n"},17:function(e,n,r,t,a){var o;return" exclusiveMinimum: "+(null!=(o=e.lambda(e.strict(n,"exclusiveMinimum",{start:{line:27,column:25},end:{line:27,column:41}}),n))?o:"")+",\r\n"},19:function(e,n,r,t,a){var o;return" multipleOf: "+(null!=(o=e.lambda(e.strict(n,"multipleOf",{start:{line:30,column:19},end:{line:30,column:29}}),n))?o:"")+",\r\n"},21:function(e,n,r,t,a){var o;return" maxLength: "+(null!=(o=e.lambda(e.strict(n,"maxLength",{start:{line:33,column:18},end:{line:33,column:27}}),n))?o:"")+",\r\n"},23:function(e,n,r,t,a){var o;return" minLength: "+(null!=(o=e.lambda(e.strict(n,"minLength",{start:{line:36,column:18},end:{line:36,column:27}}),n))?o:"")+",\r\n"},25:function(e,n,r,t,a){var o;return" pattern: '"+(null!=(o=e.lambda(e.strict(n,"pattern",{start:{line:39,column:17},end:{line:39,column:24}}),n))?o:"")+"',\r\n"},27:function(e,n,r,t,a){var o;return" maxItems: "+(null!=(o=e.lambda(e.strict(n,"maxItems",{start:{line:42,column:17},end:{line:42,column:25}}),n))?o:"")+",\r\n"},29:function(e,n,r,t,a){var o;return" minItems: "+(null!=(o=e.lambda(e.strict(n,"minItems",{start:{line:45,column:17},end:{line:45,column:25}}),n))?o:"")+",\r\n"},31:function(e,n,r,t,a){var o;return" uniqueItems: "+(null!=(o=e.lambda(e.strict(n,"uniqueItems",{start:{line:48,column:20},end:{line:48,column:31}}),n))?o:"")+",\r\n"},33:function(e,n,r,t,a){var o;return" maxProperties: "+(null!=(o=e.lambda(e.strict(n,"maxProperties",{start:{line:51,column:22},end:{line:51,column:35}}),n))?o:"")+",\r\n"},35:function(e,n,r,t,a){var o;return" minProperties: "+(null!=(o=e.lambda(e.strict(n,"minProperties",{start:{line:54,column:22},end:{line:54,column:35}}),n))?o:"")+",\r\n"},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\r\n"+(null!=(o=i(r,"if").call(l,i(n,"type"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:2,column:0},end:{line:4,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a,loc:{start:{line:5,column:0},end:{line:7,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a,loc:{start:{line:8,column:0},end:{line:10,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a,loc:{start:{line:11,column:0},end:{line:13,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"format"),{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a,loc:{start:{line:14,column:0},end:{line:16,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"maximum"),{name:"if",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a,loc:{start:{line:17,column:0},end:{line:19,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"exclusiveMaximum"),{name:"if",hash:{},fn:e.program(13,a,0),inverse:e.noop,data:a,loc:{start:{line:20,column:0},end:{line:22,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"minimum"),{name:"if",hash:{},fn:e.program(15,a,0),inverse:e.noop,data:a,loc:{start:{line:23,column:0},end:{line:25,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"exclusiveMinimum"),{name:"if",hash:{},fn:e.program(17,a,0),inverse:e.noop,data:a,loc:{start:{line:26,column:0},end:{line:28,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"multipleOf"),{name:"if",hash:{},fn:e.program(19,a,0),inverse:e.noop,data:a,loc:{start:{line:29,column:0},end:{line:31,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"maxLength"),{name:"if",hash:{},fn:e.program(21,a,0),inverse:e.noop,data:a,loc:{start:{line:32,column:0},end:{line:34,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"minLength"),{name:"if",hash:{},fn:e.program(23,a,0),inverse:e.noop,data:a,loc:{start:{line:35,column:0},end:{line:37,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"pattern"),{name:"if",hash:{},fn:e.program(25,a,0),inverse:e.noop,data:a,loc:{start:{line:38,column:0},end:{line:40,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"maxItems"),{name:"if",hash:{},fn:e.program(27,a,0),inverse:e.noop,data:a,loc:{start:{line:41,column:0},end:{line:43,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"minItems"),{name:"if",hash:{},fn:e.program(29,a,0),inverse:e.noop,data:a,loc:{start:{line:44,column:0},end:{line:46,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"uniqueItems"),{name:"if",hash:{},fn:e.program(31,a,0),inverse:e.noop,data:a,loc:{start:{line:47,column:0},end:{line:49,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"maxProperties"),{name:"if",hash:{},fn:e.program(33,a,0),inverse:e.noop,data:a,loc:{start:{line:50,column:0},end:{line:52,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"minProperties"),{name:"if",hash:{},fn:e.program(35,a,0),inverse:e.noop,data:a,loc:{start:{line:53,column:0},end:{line:55,column:7}}}))?o:"")+"}"},useData:!0},$n={1:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"each").call(null!=n?n:e.nullContext||{},l(n,"properties"),{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a,loc:{start:{line:4,column:4},end:{line:6,column:13}}}))?o:""},2:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return" "+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:5,column:11},end:{line:5,column:15}}),n))?o:"")+": "+(null!=(o=e.invokePartial(l(t,"schema"),n,{name:"schema",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+",\r\n"},4:function(e,n,r,t,a){var o;return" isReadOnly: "+(null!=(o=e.lambda(e.strict(n,"isReadOnly",{start:{line:10,column:19},end:{line:10,column:29}}),n))?o:"")+",\r\n"},6:function(e,n,r,t,a){var o;return" isRequired: "+(null!=(o=e.lambda(e.strict(n,"isRequired",{start:{line:13,column:19},end:{line:13,column:29}}),n))?o:"")+",\r\n"},8:function(e,n,r,t,a){var o;return" isNullable: "+(null!=(o=e.lambda(e.strict(n,"isNullable",{start:{line:16,column:19},end:{line:16,column:29}}),n))?o:"")+",\r\n"},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=null!=n?n:e.nullContext||{},i=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\r\n properties: {\r\n"+(null!=(o=i(r,"if").call(l,i(n,"properties"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:7,column:7}}}))?o:"")+" },\r\n"+(null!=(o=i(r,"if").call(l,i(n,"isReadOnly"),{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"isRequired"),{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a,loc:{start:{line:12,column:0},end:{line:14,column:7}}}))?o:"")+(null!=(o=i(r,"if").call(l,i(n,"isNullable"),{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a,loc:{start:{line:15,column:0},end:{line:17,column:7}}}))?o:"")+"}"},usePartial:!0,useData:!0},Nn={1:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(t,"typeInterface"),n,{name:"typeInterface",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:""},3:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"reference",{name:"equals",hash:{},fn:e.program(4,a,0),inverse:e.program(6,a,0),data:a,loc:{start:{line:3,column:0},end:{line:19,column:0}}}))?o:""},4:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(t,"typeReference"),n,{name:"typeReference",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:""},6:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"enum",{name:"equals",hash:{},fn:e.program(7,a,0),inverse:e.program(9,a,0),data:a,loc:{start:{line:5,column:0},end:{line:19,column:0}}}))?o:""},7:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(t,"typeEnum"),n,{name:"typeEnum",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:""},9:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"array",{name:"equals",hash:{},fn:e.program(10,a,0),inverse:e.program(12,a,0),data:a,loc:{start:{line:7,column:0},end:{line:19,column:0}}}))?o:""},10:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(t,"typeArray"),n,{name:"typeArray",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:""},12:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"dictionary",{name:"equals",hash:{},fn:e.program(13,a,0),inverse:e.program(15,a,0),data:a,loc:{start:{line:9,column:0},end:{line:19,column:0}}}))?o:""},13:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(t,"typeDictionary"),n,{name:"typeDictionary",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:""},15:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"one-of",{name:"equals",hash:{},fn:e.program(16,a,0),inverse:e.program(18,a,0),data:a,loc:{start:{line:11,column:0},end:{line:19,column:0}}}))?o:""},16:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(t,"typeUnion"),n,{name:"typeUnion",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:""},18:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"any-of",{name:"equals",hash:{},fn:e.program(16,a,0),inverse:e.program(19,a,0),data:a,loc:{start:{line:13,column:0},end:{line:19,column:0}}}))?o:""},19:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"all-of",{name:"equals",hash:{},fn:e.program(20,a,0),inverse:e.program(22,a,0),data:a,loc:{start:{line:15,column:0},end:{line:19,column:0}}}))?o:""},20:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(t,"typeIntersection"),n,{name:"typeIntersection",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:""},22:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=e.invokePartial(l(t,"typeGeneric"),n,{name:"typeGeneric",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"equals").call(null!=n?n:e.nullContext||{},l(n,"export"),"interface",{name:"equals",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:19,column:11}}}))?o:""},usePartial:!0,useData:!0},Bn={1:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Array<"+(null!=(o=e.invokePartial(l(t,"type"),l(n,"link"),{name:"type",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(t,"isNullable"),n,{name:"isNullable",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")},3:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Array<"+(null!=(o=e.invokePartial(l(t,"base"),n,{name:"base",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(t,"isNullable"),n,{name:"isNullable",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"if").call(null!=n?n:e.nullContext||{},l(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},Ln={1:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Record<string, "+(null!=(o=e.invokePartial(l(t,"type"),l(n,"link"),{name:"type",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(t,"isNullable"),n,{name:"isNullable",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")},3:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"Record<string, "+(null!=(o=e.invokePartial(l(t,"base"),n,{name:"base",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+">"+(null!=(o=e.invokePartial(l(t,"isNullable"),n,{name:"isNullable",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(o=l(r,"if").call(null!=n?n:e.nullContext||{},l(n,"link"),{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?o:""},usePartial:!0,useData:!0},Mn={1:function(e,n,r,t,a){var o;return null!=(o=e.lambda(n,n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(r,"enumerator").call(null!=n?n:e.nullContext||{},l(n,"enum"),l(n,"parent"),l(n,"name"),{name:"enumerator",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:55}}}))?o:"")+(null!=(o=e.invokePartial(l(t,"isNullable"),n,{name:"isNullable",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},Fn={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(t,"base"),n,{name:"base",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+(null!=(o=e.invokePartial(l(t,"isNullable"),n,{name:"isNullable",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},Un={1:function(e,n,r,t,a,o,l){var i,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return"{\r\n"+(null!=(i=s(r,"each").call(null!=n?n:e.nullContext||{},s(n,"properties"),{name:"each",hash:{},fn:e.program(2,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:3,column:0},end:{line:14,column:9}}}))?i:"")+"}"+(null!=(i=e.invokePartial(s(t,"isNullable"),n,{name:"isNullable",data:a,helpers:r,partials:t,decorators:e.decorators}))?i:"")},2:function(e,n,r,t,a,o,l){var i,s=null!=n?n:e.nullContext||{},u=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(i=u(r,"if").call(s,u(n,"description"),{name:"if",hash:{},fn:e.program(3,a,0,o,l),inverse:e.noop,data:a,loc:{start:{line:4,column:0},end:{line:8,column:7}}}))?i:"")+(null!=(i=u(r,"if").call(s,u(l[1],"parent"),{name:"if",hash:{},fn:e.program(5,a,0,o,l),inverse:e.program(7,a,0,o,l),data:a,loc:{start:{line:9,column:0},end:{line:13,column:7}}}))?i:"")},3:function(e,n,r,t,a){var o;return"/**\r\n * "+(null!=(o=e.lambda(e.strict(n,"description",{start:{line:6,column:6},end:{line:6,column:17}}),n))?o:"")+"\r\n */\r\n"},5:function(e,n,r,t,a,o,l){var i,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(i=e.invokePartial(s(t,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:r,partials:t,decorators:e.decorators}))?i:"")+(null!=(i=e.lambda(e.strict(n,"name",{start:{line:10,column:18},end:{line:10,column:22}}),n))?i:"")+(null!=(i=e.invokePartial(s(t,"isRequired"),n,{name:"isRequired",data:a,helpers:r,partials:t,decorators:e.decorators}))?i:"")+": "+(null!=(i=e.invokePartial(s(t,"type"),n,{name:"type",hash:{parent:s(l[1],"parent")},data:a,helpers:r,partials:t,decorators:e.decorators}))?i:"")+";\r\n"},7:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(t,"isReadOnly"),n,{name:"isReadOnly",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+(null!=(o=e.lambda(e.strict(n,"name",{start:{line:12,column:18},end:{line:12,column:22}}),n))?o:"")+(null!=(o=e.invokePartial(l(t,"isRequired"),n,{name:"isRequired",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+": "+(null!=(o=e.invokePartial(l(t,"type"),n,{name:"type",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+";\r\n"},9:function(e,n,r,t,a){return"any"},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a,o,l){var i,s=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return null!=(i=s(r,"if").call(null!=n?n:e.nullContext||{},s(n,"properties"),{name:"if",hash:{},fn:e.program(1,a,0,o,l),inverse:e.program(9,a,0,o,l),data:a,loc:{start:{line:1,column:0},end:{line:18,column:9}}}))?i:""},usePartial:!0,useData:!0,useDepths:!0},Wn={1:function(e,n,r,t,a){var o;return null!=(o=e.lambda(n,n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(r,"intersection").call(null!=n?n:e.nullContext||{},l(n,"properties"),l(n,"parent"),{name:"intersection",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:60}}}))?o:"")+(null!=(o=e.invokePartial(l(t,"isNullable"),n,{name:"isNullable",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},_n={compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=e.invokePartial(l(t,"base"),n,{name:"base",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")+(null!=(o=e.invokePartial(l(t,"isNullable"),n,{name:"isNullable",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0},Vn={1:function(e,n,r,t,a){var o;return null!=(o=e.lambda(n,n))?o:""},compiler:[8,">= 4.3.0"],main:function(e,n,r,t,a){var o,l=e.lookupProperty||function(e,n){if(Object.prototype.hasOwnProperty.call(e,n))return e[n]};return(null!=(o=l(r,"union").call(null!=n?n:e.nullContext||{},l(n,"properties"),l(n,"parent"),{name:"union",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a,loc:{start:{line:1,column:0},end:{line:1,column:46}}}))?o:"")+(null!=(o=e.invokePartial(l(t,"isNullable"),n,{name:"isNullable",data:a,helpers:r,partials:t,decorators:e.decorators}))?o:"")},usePartial:!0,useData:!0};function zn(e){!function(e){h.registerHelper("capitalizeFirstLetter",(function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),h.registerHelper("hasProperty",(function(e,n,r){return e.map((e=>e.in)).find((e=>e===n))?r.fn(this):r.inverse(this)})),h.registerHelper("hasLength",(function(e,n){return e.length>0?n.fn(this):n.inverse(this)})),h.registerHelper("equals",(function(e,n,r){return e===n?r.fn(this):r.inverse(this)})),h.registerHelper("notEquals",(function(e,n,r){return e!==n?r.fn(this):r.inverse(this)})),h.registerHelper("containsSpaces",(function(e,n){return/\s+/.test(e)?n.fn(this):n.inverse(this)})),h.registerHelper("union",(function(n,r,t){const a=h.partials.type,o=n.map((n=>a(Object.assign(Object.assign(Object.assign({},e),n),{parent:r})))).filter(T);let l=o.join(" | ");return o.length>1&&(l=`(${l})`),t.fn(l)})),h.registerHelper("intersection",(function(n,r,t){const a=h.partials.type,o=n.map((n=>a(Object.assign(Object.assign(Object.assign({},e),n),{parent:r})))).filter(T);let l=o.join(" & ");return o.length>1&&(l=`(${l})`),t.fn(l)})),h.registerHelper("enumerator",(function(n,r,t,a){return!e.useUnionTypes&&r&&t?`${r}.${t}`:a.fn(n.map((e=>e.value)).filter(T).join(" | "))}))}(e);const n={index:h.template(vn),exports:{model:h.template(fn),schema:h.template(hn),service:h.template(yn)},core:{settings:h.template(on),apiError:h.template(qe),apiRequestOptions:h.template(Ce),apiResult:h.template(je),cancelablePromise:h.template(Se),request:h.template(ln)}};return h.registerPartial("exportEnum",h.template(Pn)),h.registerPartial("exportInterface",h.template(On)),h.registerPartial("exportComposition",h.template(bn)),h.registerPartial("exportType",h.template(xn)),h.registerPartial("header",h.template(kn)),h.registerPartial("isNullable",h.template(Rn)),h.registerPartial("isReadOnly",h.template(wn)),h.registerPartial("isRequired",h.template(qn)),h.registerPartial("parameters",h.template(Cn)),h.registerPartial("parametersType",h.template(jn)),h.registerPartial("result",h.template(An)),h.registerPartial("schema",h.template(Dn)),h.registerPartial("schemaArray",h.template(In)),h.registerPartial("schemaDictionary",h.template(Hn)),h.registerPartial("schemaEnum",h.template(Tn)),h.registerPartial("schemaGeneric",h.template(Sn)),h.registerPartial("schemaInterface",h.template($n)),h.registerPartial("schemaComposition",h.template(En)),h.registerPartial("type",h.template(Nn)),h.registerPartial("typeArray",h.template(Bn)),h.registerPartial("typeDictionary",h.template(Ln)),h.registerPartial("typeEnum",h.template(Mn)),h.registerPartial("typeGeneric",h.template(Fn)),h.registerPartial("typeInterface",h.template(Un)),h.registerPartial("typeReference",h.template(_n)),h.registerPartial("typeUnion",h.template(Vn)),h.registerPartial("typeIntersection",h.template(Wn)),h.registerPartial("base",h.template(gn)),h.registerPartial("functions/catchErrors",h.template(We)),h.registerPartial("functions/getFormData",h.template(_e)),h.registerPartial("functions/getQueryString",h.template(Ve)),h.registerPartial("functions/getUrl",h.template(ze)),h.registerPartial("functions/isBlob",h.template(Qe)),h.registerPartial("functions/isDefined",h.template(Je)),h.registerPartial("functions/isString",h.template(Ze)),h.registerPartial("functions/isStringWithValue",h.template(Ge)),h.registerPartial("functions/isSuccess",h.template(Xe)),h.registerPartial("functions/base64",h.template(Ue)),h.registerPartial("functions/resolve",h.template(Ke)),h.registerPartial("fetch/getHeaders",h.template($e)),h.registerPartial("fetch/getRequestBody",h.template(Ne)),h.registerPartial("fetch/getResponseBody",h.template(Be)),h.registerPartial("fetch/getResponseHeader",h.template(Le)),h.registerPartial("fetch/sendRequest",h.template(Fe)),h.registerPartial("fetch/request",h.template(Me)),h.registerPartial("xhr/getHeaders",h.template(sn)),h.registerPartial("xhr/getRequestBody",h.template(un)),h.registerPartial("xhr/getResponseBody",h.template(pn)),h.registerPartial("xhr/getResponseHeader",h.template(cn)),h.registerPartial("xhr/sendRequest",h.template(dn)),h.registerPartial("xhr/request",h.template(mn)),h.registerPartial("node/getHeaders",h.template(Ye)),h.registerPartial("node/getRequestBody",h.template(en)),h.registerPartial("node/getResponseBody",h.template(nn)),h.registerPartial("node/getResponseHeader",h.template(rn)),h.registerPartial("node/sendRequest",h.template(an)),h.registerPartial("node/request",h.template(tn)),h.registerPartial("axios/getHeaders",h.template(Ae)),h.registerPartial("axios/getRequestBody",h.template(De)),h.registerPartial("axios/getResponseBody",h.template(Ie)),h.registerPartial("axios/getResponseHeader",h.template(Ee)),h.registerPartial("axios/sendRequest",h.template(Te)),h.registerPartial("axios/request",h.template(He)),n}s.promisify(e.readFile);const Qn=s.promisify(e.writeFile),Jn=s.promisify(e.copyFile),Zn=s.promisify(e.exists),Gn=y.default,Xn=e=>new Promise(((n,r)=>{v.default(e,(e=>{e?r(e):n()}))}));function Kn(e){let r=0,t=e.split(n.EOL);return t=t.map((e=>{e=e.trim().replace(/^\*/g," *");let n=r;(e.endsWith("(")||e.endsWith("{")||e.endsWith("["))&&r++,(e.startsWith(")")||e.startsWith("}")||e.startsWith("]"))&&n&&(r--,n--);const t=`${" ".repeat(n)}${e}`;return""===t.trim()?"":t})),t.join(n.EOL)}async function Yn(e,n,r,t,a,l,i,s,u,p,c,m){const d=o.resolve(process.cwd(),r),f=o.resolve(d,"core"),h=o.resolve(d,"models"),y=o.resolve(d,"schemas"),v=o.resolve(d,"services");if(g=process.cwd(),b=r,!o.relative(b,g).startsWith(".."))throw new Error("Output folder is not a subdirectory of the current working directory");var g,b;i&&(await Xn(f),await Gn(f),await async function(e,n,r,t,a){const l={httpClient:t,server:e.server,version:e.version};if(await Qn(o.resolve(r,"OpenAPI.ts"),n.core.settings(l)),await Qn(o.resolve(r,"ApiError.ts"),n.core.apiError({})),await Qn(o.resolve(r,"ApiRequestOptions.ts"),n.core.apiRequestOptions({})),await Qn(o.resolve(r,"ApiResult.ts"),n.core.apiResult({})),await Qn(o.resolve(r,"CancelablePromise.ts"),n.core.cancelablePromise({})),await Qn(o.resolve(r,"request.ts"),n.core.request(l)),a){const e=o.resolve(process.cwd(),a);if(!await Zn(e))throw new Error(`Custom request file "${e}" does not exists`);await Jn(e,o.resolve(r,"request.ts"))}}(e,n,f,t,m)),s&&(await Xn(v),await Gn(v),await async function(e,n,r,t,a,l,i){for(const s of e){const e=o.resolve(r,`${s.name}${i}.ts`),u=s.operations.some((e=>e.path.includes("OpenAPI.VERSION"))),p=n.exports.service(Object.assign(Object.assign({},s),{httpClient:t,useUnionTypes:a,useVersion:u,useOptions:l,postfix:i}));await Qn(e,Kn(p))}}(e.services,n,v,t,l,a,c)),p&&(await Xn(y),await Gn(y),await async function(e,n,r,t,a){for(const l of e){const e=o.resolve(r,`$${l.name}.ts`),i=n.exports.schema(Object.assign(Object.assign({},l),{httpClient:t,useUnionTypes:a}));await Qn(e,Kn(i))}}(e.models,n,y,t,l)),u&&(await Xn(h),await Gn(h),await async function(e,n,r,t,a){for(const l of e){const e=o.resolve(r,`${l.name}.ts`),i=n.exports.model(Object.assign(Object.assign({},l),{httpClient:t,useUnionTypes:a}));await Qn(e,Kn(i))}}(e.models,n,h,t,l)),(i||s||p||u)&&(await Gn(d),await async function(e,n,r,t,a,l,i,s,u){var p,c;await Qn(o.resolve(r,"index.ts"),n.index({exportCore:a,exportServices:l,exportModels:i,exportSchemas:s,useUnionTypes:t,postfix:u,server:e.server,version:e.version,models:(c=e.models,c.sort(((e,n)=>{const r=e.name.toLowerCase(),t=n.name.toLowerCase();return r.localeCompare(t,"en")}))),services:(p=e.services,p.sort(((e,n)=>{const r=e.name.toLowerCase(),t=n.name.toLowerCase();return r.localeCompare(t,"en")})))}))}(e,n,d,l,i,s,u,p,c))}const er=require("api-spec-converter");async function nr({input:e,output:n,httpClient:r=exports.HttpClient.FETCH,useOptions:t=!1,useUnionTypes:a=!1,exportCore:o=!0,exportServices:l=!0,exportModels:i=!0,exportSchemas:s=!1,postfix:u="Service",request:p,write:c=!0}){const m=ge(e)?await async function(e){return await f.default.bundle(e,e,{})}(e):e,d=function(e){const n=e.swagger||e.openapi;if("string"==typeof n){const e=n.charAt(0),r=Number.parseInt(e);if(r===ve.V2||r===ve.V3)return r}throw new Error(`Unsupported Open API version: "${String(n)}"`)}(m),h=zn({httpClient:r,useUnionTypes:a,useOptions:!1});switch(d){case ve.V2:{const e=we(V(m));if(!c)break;await Yn(e,h,n,r,!1,a,!1,l,i,!1,u,p);break}case ve.V3:{const e=we(ye(m));if(!c)break;await Yn(e,h,n,r,!1,a,!1,l,i,!1,u,p);break}}}exports.convertAndGenerate=async function(e,n){try{const r=await er.convert(e);if(r.validate(),!ge(n.input))return void console.error("Please provide correct path for input file to be generated");m.default.writeFileSync(n.input,r.stringify()),nr(n)}catch({errors:e,warnings:n}){(e||n)&&console.error(JSON.stringify(e||n,null,2))}},exports.generate=nr;
package/package.json ADDED
@@ -0,0 +1,106 @@
1
+ {
2
+ "name": "codegen-openapi-ts",
3
+ "version": "0.2.2",
4
+ "description": "Library that generates Typescript clients based on the OpenAPI specification.",
5
+ "author": "devteaa",
6
+ "homepage": "https://github.com/devteaa/codegen-openapi-ts",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/devteaa/codegen-openapi-ts.git"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/devteaa/codegen-openapi/issues"
13
+ },
14
+ "license": "MIT",
15
+ "keywords": [
16
+ "openapi",
17
+ "swagger",
18
+ "codegen",
19
+ "generator",
20
+ "typescript",
21
+ "yaml",
22
+ "json",
23
+ "node"
24
+ ],
25
+ "maintainers": [
26
+ {
27
+ "name": "devteaa",
28
+ "email": "devtea@protonmail.com"
29
+ }
30
+ ],
31
+ "main": "dist/index.js",
32
+ "types": "types/index.d.ts",
33
+ "bin": {
34
+ "openapi": "bin/index.js"
35
+ },
36
+ "files": [
37
+ "bin/index.js",
38
+ "dist/index.js",
39
+ "types/index.d.ts"
40
+ ],
41
+ "scripts": {
42
+ "clean": "rimraf ./dist ./test/generated ./test/e2e/generated ./samples/generated ./coverage ./node_modules/.cache",
43
+ "build": "rollup --config --environment NODE_ENV:development",
44
+ "build:watch": "rollup --config --environment NODE_ENV:development --watch",
45
+ "release": "rollup --config --environment NODE_ENV:production",
46
+ "run": "NODE_ENV=production node ./test/index.js",
47
+ "test": "jest --selectProjects UNIT",
48
+ "test:update": "jest --selectProjects UNIT --updateSnapshot",
49
+ "test:watch": "jest --selectProjects UNIT --watch",
50
+ "test:coverage": "jest --selectProjects UNIT --coverage",
51
+ "test:e2e": "jest --selectProjects E2E --runInBand",
52
+ "eslint": "eslint \"./src/**/*.ts\" \"./bin/index.js\" \"./types/index.d.ts\"",
53
+ "eslint:fix": "eslint \"./src/**/*.ts\" \"./bin/index.js\" \"./types/index.d.ts\" --fix",
54
+ "prettier": "prettier \"./src/**/*.ts\" \"./bin/index.js\" \"./types/index.d.ts\" --check",
55
+ "prettier:fix": "prettier \"./src/**/*.ts\" \"./bin/index.js\" \"./types/index.d.ts\" --write",
56
+ "prepublishOnly": "yarn run clean && yarn run release",
57
+ "codecov": "codecov --token=66c30c23-8954-4892-bef9-fbaed0a2e42b"
58
+ },
59
+ "dependencies": {
60
+ "@types/node-fetch": "^2.5.12",
61
+ "abort-controller": "^3.0.0",
62
+ "axios": "^0.24.0",
63
+ "api-spec-converter": "^2.12.0",
64
+ "camelcase": "^6.2.1",
65
+ "commander": "^8.3.0",
66
+ "cross-blob": "^2.0.1",
67
+ "form-data": "^4.0.0",
68
+ "handlebars": "^4.7.6",
69
+ "json-schema-ref-parser": "^9.0.7",
70
+ "mkdirp": "^1.0.4",
71
+ "node-fetch": "^2.6.5",
72
+ "rimraf": "^3.0.2"
73
+ },
74
+ "devDependencies": {
75
+ "@babel/cli": "7.16.0",
76
+ "@babel/core": "7.16.0",
77
+ "@babel/preset-env": "7.16.4",
78
+ "@babel/preset-typescript": "7.16.0",
79
+ "@rollup/plugin-commonjs": "21.0.1",
80
+ "@rollup/plugin-node-resolve": "13.0.6",
81
+ "@types/express": "4.17.13",
82
+ "@types/glob": "7.2.0",
83
+ "@types/jest": "27.0.3",
84
+ "@types/node": "16.11.11",
85
+ "@types/qs": "6.9.7",
86
+ "@typescript-eslint/eslint-plugin": "5.5.0",
87
+ "@typescript-eslint/parser": "5.5.0",
88
+ "codecov": "3.8.3",
89
+ "eslint": "8.3.0",
90
+ "eslint-config-prettier": "8.3.0",
91
+ "eslint-plugin-prettier": "4.0.0",
92
+ "eslint-plugin-simple-import-sort": "7.0.0",
93
+ "express": "4.17.1",
94
+ "glob": "7.2.0",
95
+ "jest": "27.4.3",
96
+ "jest-cli": "27.4.3",
97
+ "prettier": "2.5.0",
98
+ "puppeteer": "12.0.1",
99
+ "qs": "6.10.1",
100
+ "rollup": "2.60.2",
101
+ "rollup-plugin-terser": "7.0.2",
102
+ "rollup-plugin-typescript2": "0.31.1",
103
+ "tslib": "2.3.1",
104
+ "typescript": "4.5.2"
105
+ }
106
+ }
@@ -0,0 +1,22 @@
1
+ export declare enum HttpClient {
2
+ FETCH = 'fetch',
3
+ XHR = 'xhr',
4
+ NODE = 'node',
5
+ AXIOS = 'axios',
6
+ }
7
+
8
+ export type Options = {
9
+ input: string | Record<string, any>;
10
+ output: string;
11
+ httpClient?: HttpClient;
12
+ useOptions?: boolean;
13
+ useUnionTypes?: boolean;
14
+ exportCore?: boolean;
15
+ exportServices?: boolean;
16
+ exportModels?: boolean;
17
+ exportSchemas?: boolean;
18
+ request?: string;
19
+ write?: boolean;
20
+ };
21
+
22
+ export declare function generate(options: Options): Promise<void>;